Przeglądaj źródła

Merge remote-tracking branch 'origin/dev' into dev

王杰 3 miesięcy temu
rodzic
commit
7f005fdf82

+ 1 - 4
src/utils/request.js

@@ -1,5 +1,5 @@
 import axios from 'axios'
-// import Cookies from 'js-cookie'
+import Cookies from 'js-cookie'
 axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
 // 创建axios实例
 const service = axios.create({
@@ -11,10 +11,7 @@ const service = axios.create({
 // request拦截器
 service.interceptors.request.use(
   (config) => {
-    const token =
-    //  'eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6ImExNDZhYTM0LTBkNTYtNDU5My1iOWVkLTdiMDkxZDYwYWM5ZSJ9.SY61O-6bGj8NsPEgKDhIeUO4ywEZFHoUKbbwL-NK68PckviJhIXuKKdD5laNPhCRvDJT5h2aC614SL7GEqOfWw'
     config.headers['Authorization'] = 'Bearer ' + Cookies.get('Admin-Token')
-    config.headers['Authorization'] = 'Bearer ' + token
     return config
   },
   (error) => {

+ 18 - 1
src/views/components/layerList/index.vue

@@ -406,7 +406,7 @@ export default {
       window.map.addLayer(graphicsLayer)
       window.requestSDK('/sddnWeiHe/device/deviceSimpleList', { pageNum: 1, pageSize: 10, platFlag: '1', operType: '0' }, {}, 'post').then((res) => {
         const data = res.data
-        data.forEach((point) => {
+        data.forEach((point, index) => {
           const graphic = new mars3d.graphic.BillboardEntity({
             position: [point.longitude, point.latitude],
             style: {
@@ -420,6 +420,23 @@ export default {
             },
             attr: { ...point }
           })
+          //添加可视化区域
+          const sector = new this.mars3d.graphic.CircleEntity({
+            id: 'sector_' + index,
+            positions: [[point.longitude, point.latitude, 0]],
+            style: {
+              radius: 6000,
+              color: '#32edda',
+              opacity: 0.35,
+              outline: true,
+              outlineWidth: 1,
+              outlineColor: '#32edda',
+              visibleDepth: false,
+              clampToGround: true
+            },
+            attr: { ...point }
+          })
+          graphicsLayer.addGraphic(sector)
           graphicsLayer.addGraphic(graphic)
           let that = this
           graphic.on(this.mars3d.EventType.click, function () {

+ 3 - 3
src/views/index.vue

@@ -143,10 +143,10 @@ export default {
           positions: positions,
           style: {
             fill: true,
-            color: 'rgb(2,26,79)',
-            opacity: 0.9,
+            color: 'rgb(255,255,255)',
+            opacity: 0.35,
             outline: false,
-            outlineColor: '#39E09B',
+            outlineColor: '#fff',
             outlineWidth: 8,
             outlineOpacity: 0.8,
             arcType: this.Cesium.ArcType.GEODESIC,

+ 20 - 3
src/views/safety-inspection/index.vue

@@ -48,13 +48,13 @@ export default {
     addInitialPoints() {
       graphicsLayer = new this.mars3d.layer.GraphicLayer()
       window.map.addLayer(graphicsLayer)
-      this.inspectionOptions.forEach((point) => {
-        this.addPointToMap(point)
+      this.inspectionOptions.forEach((point, index) => {
+        this.addPointToMap(point, index)
       })
     },
 
     // 添加点到地图
-    addPointToMap(point) {
+    addPointToMap(point, index) {
       const graphic = new this.mars3d.graphic.BillboardEntity({
         position: [point.longitude, point.latitude],
         style: {
@@ -65,6 +65,23 @@ export default {
         },
         attr: { ...point }
       })
+      //添加可视化区域
+      const sector = new this.mars3d.graphic.CircleEntity({
+        id: 'sector_' + index,
+        positions: [[point.longitude, point.latitude, 0]],
+        style: {
+          radius: 6000,
+          color: '#32edda',
+          opacity: 0.35,
+          outline: true,
+          outlineWidth: 1,
+          outlineColor: '#32edda',
+          visibleDepth: false,
+          clampToGround: true
+        },
+        attr: { ...point }
+      })
+      graphicsLayer.addGraphic(sector)
       graphicsLayer.addGraphic(graphic)
       let that = this
       graphic.on(this.mars3d.EventType.click, function () {

+ 1 - 1
src/views/water-station-popup/index.vue

@@ -382,8 +382,8 @@ export default {
           },
           attr: { deviceCode: item.deviceCode, channelCode: item.channelCode, devName: item.devName }
         })
-        graphicsLayer.addGraphic(graphic)
         graphicsLayer.addGraphic(sector)
+        graphicsLayer.addGraphic(graphic)
       })
     },
     // 定位到点

+ 1 - 1
vue.config.js

@@ -56,7 +56,7 @@ module.exports = defineConfig({
       },
       '/api/sddnWeiHe/': {
         //测试环境
-        target: 'http://127.0.0.1:28132/api/sddnWeiHe/',//http://192.168.1.185:28131
+        target: 'http://10.157.200.5:28132/api/sddnWeiHe/',//http://192.168.1.185:28131
         changOrigin: true
       }
     }