|
|
@@ -148,19 +148,39 @@ const store = createStore({
|
|
|
commit("setDamInfo", e.data.result);
|
|
|
});
|
|
|
},
|
|
|
- GetNumbers({ commit, state }, type) {
|
|
|
- return new Promise((resolve, reject) => {
|
|
|
- let arr1 = [
|
|
|
- { icon: "loading", title: "装货中船舶数量", num: 22033 },
|
|
|
- { icon: "transit", title: "运输中船舶数量", num: 12312 },
|
|
|
- { icon: "unloading", title: "卸货中船舶数量", num: 87655 },
|
|
|
- ];
|
|
|
- let arr2 = [
|
|
|
- { icon: "ship-fill-2", title: "装货中船舶数量", num: 16090 },
|
|
|
- { icon: "ship-line", title: "运输中船舶数量", num: 20090 },
|
|
|
- ];
|
|
|
- resolve(type ? arr1 : arr2);
|
|
|
- });
|
|
|
+ GetNumbers({ commit, state }) {
|
|
|
+ let t = state.currentTabText == "运输安全管理中心";
|
|
|
+ if (t) {
|
|
|
+ api.getShipStatusCount().then((e) => {
|
|
|
+ console.log(e);
|
|
|
+ let { result } = e.data;
|
|
|
+ state.numbers = [
|
|
|
+ {
|
|
|
+ icon: "loading",
|
|
|
+ title: "装货中船舶数量",
|
|
|
+ num: result.loadingShipCount,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ icon: "transit",
|
|
|
+ title: "运输中船舶数量",
|
|
|
+ num: result.transitShipCount,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ icon: "unloading",
|
|
|
+ title: "卸货中船舶数量",
|
|
|
+ num: result.unloadingShipCount,
|
|
|
+ },
|
|
|
+ ];
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ api.getShipTracksCount().then((e) => {
|
|
|
+ let { result } = e.data;
|
|
|
+ state.numbers = [
|
|
|
+ { icon: "ship-fill-2", title: "船舶数量", num: result.shipNum },
|
|
|
+ { icon: "ship-line", title: "轨迹数量", num: result.trackNum },
|
|
|
+ ];
|
|
|
+ });
|
|
|
+ }
|
|
|
},
|
|
|
GetManageShipDetail({ commit }, shipId) {
|
|
|
api.getManageShipDetail({ shipId }).then((e) => {
|