|
|
@@ -3,6 +3,9 @@
|
|
|
<div id="bmap"></div>
|
|
|
<ShipSearch
|
|
|
class="ship-search z20"
|
|
|
+ :api="'searchShipSelect'"
|
|
|
+ v-model="shipStr"
|
|
|
+ @selectItem="selectShip"
|
|
|
style="position: absolute; top: 40px; right: 524px"
|
|
|
></ShipSearch>
|
|
|
<NumberVue
|
|
|
@@ -39,6 +42,7 @@
|
|
|
import ShipSearch from "comps/ShipSearch.vue";
|
|
|
import router from "router/index";
|
|
|
import store from "store/index";
|
|
|
+import api from "apis/fetch";
|
|
|
import { ref, onMounted, watch } from "vue";
|
|
|
export default {
|
|
|
components: {
|
|
|
@@ -66,14 +70,27 @@ export default {
|
|
|
arr.value = e;
|
|
|
});
|
|
|
}
|
|
|
+ let shipStr = ref("");
|
|
|
+
|
|
|
+ function selectShip(item) {
|
|
|
+ if (store.state.currentTabText == "运输安全管理中心") {
|
|
|
+ store.dispatch("GetManageShipDetail", item.key);
|
|
|
+ }
|
|
|
+ if (store.state.currentTabText == "智能交易中心") {
|
|
|
+ getTradeShipDetail(item.key);
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
onMounted(() => {
|
|
|
- initMap();
|
|
|
+ // initMap();
|
|
|
+ // store.dispatch("GetManageShipDetail", 51710);
|
|
|
getNumbers(store.state.currentTabText == "运输安全管理中心");
|
|
|
});
|
|
|
return {
|
|
|
initMap,
|
|
|
arr,
|
|
|
+ shipStr,
|
|
|
+ selectShip,
|
|
|
};
|
|
|
},
|
|
|
};
|