智慧园区前端大屏
linwe
2024-12-03 334441ca3ad8f64f516f1ec90fba1da3488f76d1
Merge remote-tracking branch 'origin/main'
5 files modified
1 files added
147 ■■■■ changed files
public/img/mapicon/fxy-zd.png patch | view | raw | blame | history
src/pages/map/components/scomponents/layersControl.vue 103 ●●●●● patch | view | raw | blame | history
src/styles/base/dc-base.scss 16 ●●●●● patch | view | raw | blame | history
src/views/rs/components/box/dataContent.vue 8 ●●●● patch | view | raw | blame | history
src/views/rs/components/leftContainer.vue 6 ●●●● patch | view | raw | blame | history
vite.config.js 14 ●●●● patch | view | raw | blame | history
public/img/mapicon/fxy-zd.png
src/pages/map/components/scomponents/layersControl.vue
@@ -2,7 +2,7 @@
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2024-10-31 10:47:29
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2024-12-03 12:51:24
 * @LastEditTime: 2024-12-03 13:44:43
 * @FilePath: \bigScreen\src\pages\map\components\scomponents\layersControl.vue
 * @Description:
 *
@@ -71,8 +71,8 @@
import { getList as getRiskList } from "@/api/riskSource/riskSource"
import { getPanoramaList } from "@/api/panorama/"
import yqfw from "@/assets/json/yqfw"
import gsgw from "@/assets/json/gsgw"
import rqgw from "@/assets/json/rqgw"
// import gsgw from "@/assets/json/gsgw"
// import rqgw from "@/assets/json/rqgw"
import wsgw from "@/assets/json/wsgw"
import ysgw from "@/assets/json/ysgw"
import { onUnmounted } from 'vue'
@@ -257,26 +257,26 @@
            color: DC.Color.CYAN.withAlpha(0.9),
            height: 60,
          },
          {
            id: '3-3-1',
            label: '给水管网',
            type: 'layer',
            subType: 'geojsonPipe',
            layerName: 'gsgw',
            source: gsgw,
            color: DC.Color.BLUE.withAlpha(0.9),
            height: 60.4,
          },
          {
            id: '3-3-3',
            label: '燃气管网',
            type: 'layer',
            subType: 'geojsonPipe',
            layerName: 'rqgw',
            source: rqgw,
            color: DC.Color.RED.withAlpha(0.9),
            height: 60.6,
          },
          // {
          //   id: '3-3-1',
          //   label: '给水管网',
          //   type: 'layer',
          //   subType: 'geojsonPipe',
          //   layerName: 'gsgw',
          //   source: gsgw,
          //   color: DC.Color.BLUE.withAlpha(0.9),
          //   height: 60.4,
          // },
          // {
          //   id: '3-3-3',
          //   label: '燃气管网',
          //   type: 'layer',
          //   subType: 'geojsonPipe',
          //   layerName: 'rqgw',
          //   source: rqgw,
          //   color: DC.Color.RED.withAlpha(0.9),
          //   height: 60.6,
          // },
        ]
      },
@@ -552,6 +552,45 @@
        backgroundIcon: VITE_APP_BASE + 'img/mapicon/fxy-jd.png',
        showPanel: false,
        layerName: 'fxyLarger',
        incident: (e) => {
          const { attrParams } = e.overlay
          // 删除
          destroyPop()
          addPopLayers[attrParams.name] = new DC.HtmlLayer(attrParams.name)
          window.$viewer.addLayer(addPopLayers[attrParams.name])
          let iconEl = `<div class="marsBlueGradientPnl">
            <li>${attrParams.firmName || ''}</li>
            <li>${attrParams.name || ''}</li>
            <li>${attrParams.riskLevelName || ''}</li>
            </div>`
          let divIcon = new DC.DivIcon(
            new DC.Position(attrParams.lng, attrParams.lat, attrParams.ele || 64),
            `<div class="public-map-popup-three">
                    ${iconEl}
                  </div>`
          )
          let incident = () => {
            destroyPop()
          }
          divIcon.on(DC.MouseEventType.CLICK, incident)
          addPopLayers[attrParams.name].addOverlay(divIcon)
        }
      },
      {
        id: '4-9',
        label: '暂定',
        type: 'layer',
        subType: 'labelPoint',
        method: getRiskList,
        params: {
          riskLevel: 9,
          size: 1000
        },
        showParams: 'category',
        className: 'fxy-zd',
        backgroundIcon: VITE_APP_BASE + 'img/mapicon/fxy-zd.png',
        showPanel: false,
        layerName: 'fxyZdLarger',
        incident: (e) => {
          const { attrParams } = e.overlay
          // 删除
@@ -977,9 +1016,9 @@
  EventBus.emit('restHandleDelChange', `3-1`)
  EventBus.emit('restHandleDelChange', `3-2`)
  EventBus.emit('restHandleDelChange', `3-3`)
  EventBus.emit('restHandleDelChange', `3-3-1`)
  // EventBus.emit('restHandleDelChange', `3-3-1`)
  EventBus.emit('restHandleDelChange', `3-3-2`)
  EventBus.emit('restHandleDelChange', `3-3-3`)
  // EventBus.emit('restHandleDelChange', `3-3-3`)
  EventBus.emit('restHandleDelChange', `3-3-4`)
  EventBus.emit('restHandleDelChange', `3-4`)
  EventBus.emit('restHandleDelChange', `3-5`)
@@ -990,6 +1029,8 @@
  EventBus.emit('restHandleDelChange', `4`)
  EventBus.emit('restHandleDelChange', `4-1`)
  EventBus.emit('restHandleDelChange', `4-2`)
  EventBus.emit('restHandleDelChange', `4-9`)
  EventBus.emit('restHandleDelChange', `8`)
  destroyPop()
}
@@ -1009,13 +1050,13 @@
// 销毁
function destroyPop () {
  let arr = Object.keys(addPopLayers)
  if(arr.length > 0){
  if (arr.length > 0) {
    arr.forEach(i => {
    addPopLayers[i] && window.$viewer && window.$viewer.removeLayer(addPopLayers[i])
    addPopLayers[i] = null
    delete addPopLayers[i]
  })
  addPopLayers = {}
      addPopLayers[i] && window.$viewer && window.$viewer.removeLayer(addPopLayers[i])
      addPopLayers[i] = null
      delete addPopLayers[i]
    })
    addPopLayers = {}
  }
}
src/styles/base/dc-base.scss
@@ -273,6 +273,22 @@
  }
}
.fxy-zd {
  &::after {
    background: linear-gradient(to bottom, rgba(173, 173, 173, 0.8), rgba(173, 173, 173, 0.2));
  }
  .map-name {
    color: rgba(255, 201, 0, 1);
    width: 240px;
  }
  .map-icon {
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.3) 20%, rgba(173, 173, 173, 0.9) 100%);
    box-shadow: 0px 0px 10px rgb(173, 173, 173);
  }
}
.qyfb-box {
  &::after {
    background: linear-gradient(to bottom, rgba(0, 136, 255, 0.8), rgba(0, 136, 255, 0.2));
src/views/rs/components/box/dataContent.vue
@@ -2,7 +2,7 @@
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2023-03-13 14:54:26
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2024-11-27 14:26:33
 * @LastEditTime: 2024-12-03 13:23:57
 * @FilePath: \bigScreen\src\views\rs\components\box\dataContent.vue
 * @Description: 
 * 
@@ -44,6 +44,10 @@
    {
      label: '较大',
      value: 2
    },
    {
      label: '暂定',
      value: 9
    }
  ]
})
@@ -111,7 +115,7 @@
    .then((res) => {
      const data = res.data.data
      data.records.forEach(item => {
        if(!item.riskLevelName){
        if (!item.riskLevelName) {
          item.riskLevelName = '暂定'
        }
      })
src/views/rs/components/leftContainer.vue
@@ -2,7 +2,7 @@
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2023-03-10 15:27:59
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2024-11-19 17:25:37
 * @LastEditTime: 2024-12-03 13:23:28
 * @FilePath: \bigScreen\src\views\rs\components\leftContainer.vue
 * @Description: 
 * 
@@ -22,6 +22,10 @@
    {
      label: '较大',
      value: 2
    },
    {
      label: '暂定',
      value: 9
    }
  ]
})
vite.config.js
@@ -2,7 +2,7 @@
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2024-10-25 10:56:27
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2024-12-02 19:53:54
 * @LastEditTime: 2024-12-03 13:42:55
 * @FilePath: \bigScreen\vite.config.js
 * @Description: 
 * 
@@ -116,12 +116,12 @@
          rewrite: path => path.replace(/^\/zhyq\/newMx/, ''),
        },
        '/zhyq/mx': {
          // target: 'http://localhost',
          target: 'https://wrj.shuixiongit.com/zhyq/mx',
          changeOrigin: true,
          rewrite: path => path.replace(/^\/zhyq\/mx/, ''),
        },
        // '/zhyq/mx': {
        //   // target: 'http://localhost',
        //   target: 'https://wrj.shuixiongit.com/zhyq/mx',
        //   changeOrigin: true,
        //   rewrite: path => path.replace(/^\/zhyq\/mx/, ''),
        // },
        '/zhyqapi': {
          // target: 'http://localhost:8082',