智慧园区前端大屏
shuishen
2024-11-25 edb0f849ff83afbb8468cb014c896c2345153a34
Merge branch 'main' of http://139.196.74.78:10010/r/zhyq/bigScreen
4 files modified
82 ■■■■ changed files
src/api/space/space.js 8 ●●●●● patch | view | raw | blame | history
src/pages/layout/components/scomponents/layersControl.vue 52 ●●●●● patch | view | raw | blame | history
src/views/companyInfo/components/box/fireSource.vue 17 ●●●●● patch | view | raw | blame | history
src/views/pac/components/box/dataContent.vue 5 ●●●●● patch | view | raw | blame | history
src/api/space/space.js
@@ -20,3 +20,11 @@
        params,
    });
};
export const getGouQu = (params) => {
    const url = `/yw/emergencySpace/page`;
    return request({
        url,
        method: 'get',
        params,
    });
};
src/pages/layout/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-11-24 16:59:40
 * @LastEditTime: 2024-11-25 15:32:31
 * @FilePath: \bigScreen\src\pages\layout\components\scomponents\layersControl.vue
 * @Description:
 *
@@ -59,7 +59,7 @@
})
import panorama from './popup/panorama.vue'
import { getPage } from '@/api/indParkInfo'
import { getList } from "@/api/space/space"
import { getList, getGouQu } from "@/api/space/space"
import { getList as getRiskList } from "@/api/riskSource/riskSource"
import { getPanoramaList } from "@/api/panorama/"
import yqfw from "@/assets/json/yqfw"
@@ -271,7 +271,7 @@
            subType: 'geojsonPipe',
            layerName: 'wsgw',
            source: wsgw,
            color: DC.Color.BLACK,
            color: DC.Color.DARKBLUE,
            height: 68,
          },
          {
@@ -456,6 +456,20 @@
          divIcon.on(DC.MouseEventType.CLICK, incident)
          addPupoLayers[attrParams.name].addOverlay(divIcon)
        }
      },
      {
        id: '3-8',
        label: '沟渠',
        type: 'layer',
        subType: 'geojsonPolygon',
        method: getGouQu,
        params: {
          type: 8,
        },
        backgroundIcon: VITE_APP_BASE + 'img/mapicon/xfs.png',
        className: 'xfs-box',
        showPanel: false,
        layerName: 'gouqu'
      }
    ]
  },
@@ -799,6 +813,36 @@
        } else {
          addTileLayers[item.layerName].show = true
        }
      } else if (item.subType == 'geojsonPolygon') {
        if (!addTileLayers[item.layerName]) {
          addTileLayers[item.layerName] = new DC.VectorLayer(item.layerName)
          window.$viewer.addLayer(addTileLayers[item.layerName])
          item.method(item.params).then(res => {
            let data = res.data.data.records
            data.forEach(i => {
              let stl = ''
              try {
                let geom = JSON.parse(i.geom)
                if (geom && geom.coordinates && geom.coordinates[0]) {
                  stl = geom.coordinates[0][0].map(d => d[0] + ',' + d[1]).join(';')
                } else {
                  console.error('Invalid geom structure')
                }
              } catch (error) {
                console.error('Failed to parse geom:', error)
              }
              let polygon = new DC.Polygon(stl)
              polygon.setStyle({
                width: 2,
                material: DC.Color.BLUE,
                clampToGround: true
              })
              addTileLayers[item.layerName].addOverlay(polygon)
            })
          })
        } else {
          addTileLayers[item.layerName].show = true
        }
      }
    } else {
      if (addTileLayers[item.layerName]) {
@@ -810,6 +854,8 @@
          addTileLayers[item.layerName].show = false
        } else if (item.subType == 'geojsonPipe') {
          addTileLayers[item.layerName].show = false
        } else if (item.subType == 'geojsonPolygon') {
          addTileLayers[item.layerName].show = false
        }
      }
    }
src/views/companyInfo/components/box/fireSource.vue
@@ -27,12 +27,13 @@
    </div>
    <div class="company-info">
      <div class="" style="text-align: center;margin-top: 10px;">基本信息</div>
      <div class="company-info-item" v-for="item in companyInfoList" :key="item.id">
        <el-row>
          <el-col :span="8">
          <el-col :span="6">
            <div class="company-info-title">{{ item.title }}</div>
          </el-col>
          <el-col :span="16">
          <el-col :span="18">
            <div class="company-info-content">{{ item.content }}</div>
          </el-col>
        </el-row>
@@ -43,10 +44,10 @@
      <div class="" style="text-align: center;margin-top: 10px;">救援队伍</div>
      <div class="company-info-item" v-for="item in rescueTeamList" :key="item.id">
        <el-row>
          <el-col :span="8">
          <el-col :span="6">
            <div class="company-info-title">{{ item.title }}</div>
          </el-col>
          <el-col :span="16">
          <el-col :span="18">
            <div class="company-info-content">{{ item.content }}</div>
          </el-col>
        </el-row>
@@ -189,15 +190,17 @@
}
.company-info-item {
  margin-top: 13px;
  // margin-top: 13px;
}
.company-info-title {
  font-weight: bold;
  // font-weight: bold;
  margin: 4px 0;
}
.company-info-content {
  font-size: 13px;
  // font-size: 13px;
  margin: 4px 0;
}
src/views/pac/components/box/dataContent.vue
@@ -129,6 +129,11 @@
  if (row.type == 2 || row.type == 3) {
    EventBus.emit('restHandleCheckChange', `3-3-2`)
    EventBus.emit('restHandleCheckChange', `3-3-4`)
    if (row.type == 3) {
      EventBus.emit('restHandleCheckChange', `3-8`)
    } else {
      EventBus.emit('restHandleDelChange', `3-8`)
    }
  } else {
    EventBus.emit('restHandleDelChange', `3-3-2`)
    EventBus.emit('restHandleDelChange', `3-3-4`)