Преглед изворни кода

新增 船舶信息,货主信息store

wzh пре 4 година
родитељ
комит
93386c0d3d
1 измењених фајлова са 22 додато и 0 уклоњено
  1. 22 0
      src/store/index.js

+ 22 - 0
src/store/index.js

@@ -4,6 +4,22 @@ const store = createStore({
   state: {
     isLogin: false,
     currentTab: "运输安全管理中心",
+    cargoOwnerInfo: {
+      cargoOwnerName: "货主王",
+      cargo: "石油焦",
+      tons: "30000",
+      shipRoute: "秦皇岛-上海",
+      contractId: 1,
+    },
+    shipInfo: {
+      shipOwnerName: "船东王",
+      shipOwnerId: "898980000000000909",
+      shipName: "航海家998",
+      icon: "china",
+      mmsi: "410999888",
+      length: 100,
+      width: 30,
+    },
   },
   mutations: {
     changeLogin(state, b) {
@@ -12,6 +28,12 @@ const store = createStore({
     changeTab(state, text) {
       state.currentTabText = text;
     },
+    setCargoOwner(state, info) {
+      state.cargoOwnerInfo = info;
+    },
+    setShipInfo(state, info) {
+      state.shipInfo = info;
+    },
   },
   actions: {
     Login({ commit }, userInfo) {