Browse Source

船舶模拟增加参数,需要动态传值;对江轮渡航线开启关闭修改;

sbj 1 year ago
parent
commit
8816409b92

+ 1 - 2
src/router/index.js

@@ -52,9 +52,8 @@ export const defaultRoutes = [
 
 const router = createRouter({
   routes:defaultRoutes,
-  base: '/ghjg-digital-twin', // 打包发布时Tomcat中webapp下的项目路径
+  // base: '/ghjg-digital-twin', // 打包发布时Tomcat中webapp下的项目路径
   history:createWebHashHistory()
- 
 })
 
 

+ 4 - 0
src/utils/map/ArcgisUtil.js

@@ -492,6 +492,10 @@ export function openBoatDriving(data){
     let params = {
         "ActionName": "AddBoatDriving",
         "Parameters": {
+            "mmsi": data.mmsi,
+            "shipName": data.shipName,
+            "shipTypeName": data.shipTypeName,
+            "direction": data.direction,
             "mapx": data.mapx,
             "mapy": data.mapy
         }

+ 7 - 5
src/utils/map/Boat.js

@@ -54,7 +54,9 @@ export function locationBoat(mmsi,isShow){
 
     }else{
         if (!showBoat){
-            clearMap({is_draw: false, is_search:false, layers: ['boatLayer','boatPathLayer','boatGraphicLayer']})
+            clearMap({is_draw: false, is_search:true, layers: ['boatLayer','boatPathLayer','boatGraphicLayer']})
+        }else{
+            clearMap({is_draw: false, is_search:true, layers: []})
         }
     }
 }
@@ -235,13 +237,13 @@ export function playAreaBoatHistory(type){
 /**
  * 模拟驾驶
  * */
-export function boatDriving(isShow){
+export function boatDriving(data,isShow){
     if(isShow){
-        openBoatDriving({mapx: 2100,mapy: 220})
+        openBoatDriving(data)
     }else{
         closeBoatDriving()
-        clearMap({is_draw: false, is_search:true, layers: ['boatLayer','boatPathLayer','boatGraphicLayer']})
-        setCenter()
+        // clearMap({is_draw: false, is_search:true, layers: ['boatLayer','boatPathLayer','boatGraphicLayer']})
+        // setCenter()
     }
 }
 

+ 0 - 33
src/utils/map/WaterPassenger.js

@@ -190,39 +190,6 @@ export function djldLineAll(isShow) {
         token: '',
         is_goto: true
     })
-   /* if(isShow){
-        // GetShipRout({keywords:'',type:''}).then(res =>{
-        //     let list = res.data.Rows.list;
-        //     for(let i = 0; i < list.length;i++){
-        //         let lineData = list[i].pointList;
-        //         let lineName = list[i].name;
-        //         let points = []
-        //         for(let j=0;j<lineData.length;j++){
-        //             let point = [Number(lineData[j].mapx),Number(lineData[j].mapy)]
-        //             points.push(point)
-        //         }
-        //         let params = {
-        //             title: lineName,
-        //             type: 'polyline',
-        //             data: points,
-        //             edit: false,
-        //             clear: false,
-        //             temp: false,
-        //             goto: false,
-        //             attributes: null,
-        //             symbol: {
-        //                 type: "simple-line",
-        //                 color: [255, 255, 0],
-        //                 width: 2
-        //             }
-        //         }
-        //         // 绘制到地图上
-        //         addGraphic(params)
-        //     }
-        // })
-    }else{
-        clearMap({is_draw: false, is_search: true, layers: []})
-    }*/
 }
 
 // 对江轮渡航线

+ 4 - 3
src/views/ssky/Index.vue

@@ -430,13 +430,14 @@ export default {
 
   function handleLineClick() {
     lineSelected.value = !lineSelected.value
-    if(lineSelected.value) {
-      djldLine()
+/*    if(lineSelected.value) {
+      djldLineAll()
       // ueCallShowLine()
     } else {
       clearMap({is_draw: false, is_search:true, layers: []})
       // ueCallCloseLine()
-    }
+    }*/
+    djldLineAll(lineSelected.value)
   }
 
   const pjylSelected = ref(false)

+ 3 - 6
vue.config.js

@@ -1,15 +1,12 @@
 const { defineConfig } = require('@vue/cli-service')
 
-module.exports = defineConfig({
-  transpileDependencies: true,
-  lintOnSave:false,
-  publicPath: '/ghjg-digital-twin'
-})
-
 const webpack = require("webpack");
 
 
 module.exports = {
+  transpileDependencies: true,
+  lintOnSave:false,
+  publicPath: './',
   configureWebpack: {
     plugins: [
       new webpack.ProvidePlugin({