Просмотр исходного кода

Merge branch 'lifeline_develop_siping' of http://116.142.80.13:3000/sooka_onest/visu_lifeline into lifeline_develop_siping

yhfu 3 дней назад
Родитель
Сommit
4756576c4c

+ 1 - 0
src/api/components/supermap.js

@@ -40,6 +40,7 @@ export const iconList = {
   'marker': require('@/assets/icons/supermap/marker.png'),
   'positioning': require('@/assets/icons/supermap/positioning.png'), // 地图选点照片
   'hzqy': require('@/assets/icons/supermap/hz_qy.png'),
+  'area': require('@/assets/images/sentinel/hz_qy2.png'),
   'sj-icon-event': require('@/assets/images/sentinel/hz_qy.png'),
   'sj-icon-event-yingji': require('@/assets/images/sentinel/hz_qy4.png'),
 }

+ 45 - 0
src/api/data.js

@@ -0,0 +1,45 @@
+//哨兵数据信息接口
+import request from '@/utils/request'
+
+/**
+ * 查询用户数量
+ * @returns {*}
+ */
+export function userStats() {
+  return request({
+    url: '/sooka-digital-construction/community/userStats',
+    method: 'get',
+  })
+}
+/**
+ * 查询管线长度
+ * @returns {*}
+ */
+export function getPipeLengthByPressureLevel() {
+  return request({
+    url: '/sooka-digital-construction/gas/getPipeLengthByPressureLevel',
+    method: 'get',
+  })
+}
+
+/**
+ * 预警信息
+ * @returns {*}
+ */
+export function countByWarningCategory() {
+  return request({
+    url: '/sooka-digital-construction/ability/countByWarningCategory',
+    method: 'get',
+  })
+}
+/**
+ * 根据企业查小区
+ * @returns {*}
+ */
+export function getCommunityByDeptId(deptId) {
+  return request({
+    url: '/sooka-digital-construction/gas/getCommunityByDeptId?deptId='+deptId,
+    method: 'get',
+  })
+}
+

+ 26 - 1
src/api/event.js

@@ -21,7 +21,7 @@ export function getStatisticByEventType(param) {
  */
 export function eventTypesListAll() {
   return request({
-    url: '/sooka-digital-construction/eventTypes/listAll',
+    url: '/sooka-digital-construction/eventTypes/getAll',
     method: 'get',
   })
 }
@@ -69,6 +69,31 @@ export function getPlanList(param) {
 }
 
 /**
+ * 统计各公司近七天的事件数量
+ * @param param
+ * @returns {AxiosPromise}
+ */
+export function getStatisticByBrand(param) {
+  return request({
+    url: '/sooka-digital-construction/eventSubject/getStatisticByBrand',
+    method: 'get',
+    params: param
+  })
+}
+/**
+ * 统计各公司近七天的事件数量
+ * @param param
+ * @returns {AxiosPromise}
+ */
+export function countByDepartment(param) {
+  return request({
+    url: '/sooka-digital-construction/eventSubject/countByDepartment',
+    method: 'get',
+    params: param
+  })
+}
+
+/**
  * 根据id获取事件详情
  * @param param
  * @returns {AxiosPromise}

+ 35 - 11
src/api/sentinel.js

@@ -1,33 +1,57 @@
 import request from '@/utils/request'
 
 // 查询监测设备列表(所有)
-export function listDeviceAll(params) {
+export function brandPageList(params) {
   return request({
-    url: `/center-monitor/device/listDeviceAll?brand=${params.brand}&deviceType=10&pageNum=${params.pageNum}&deviceName=${params.deviceName}&pageSize=${params.pageSize}`,
+    url: `/sooka-digital-construction/deviceInfo/brandPageList?brand=${params.brand}&pageNum=${params.pageNum}&deviceName=${params.deviceName}&pageSize=${params.pageSize}`,
     method: 'get'
   })
 }
 
-// 查询哨兵所有品牌(根据品牌去重)
-export function selectBrandList() {
+// 查询哨兵设备统计详情
+export function selectDailyThreshold(deviceCode) {
   return request({
-    url: `/center-monitor/device/selectBrandList`,
+    url: `/sooka-digital-construction/deviceThreshold/selectDailyThreshold/${deviceCode}`,
     method: 'get'
   })
 }
 
-// 查询哨兵设备统计详情
-export function selectDailyThreshold(deviceCode) {
+// 根据设备id查询设备详情
+export function selectByDeviceId({id}) {
   return request({
-    url: `/center-monitor/device/selectDailyThreshold/${deviceCode}`,
+    url: `/sooka-digital-construction/deviceInfo/${id}`,
     method: 'get'
   })
 }
 
-// 根据设备id查询设备详情
-export function selectByDeviceId({id}) {
+/**
+ * 根据企业统计设备
+ * @returns {*}
+ */
+export function countByBrand() {
+  return request({
+    url: `/sooka-digital-construction/deviceInfo/countByBrand`,
+    method: 'get'
+  })
+}
+
+/**
+ * 根据部门统计
+ * @returns {*}
+ */
+export function countByDepartment() {
+  return request({
+    url: `/sooka-digital-construction/deviceInfo/countByDepartment`,
+    method: 'get'
+  })
+}
+/**
+ * 根据哨兵类型统计在离线分析
+ * @returns {*}
+ */
+export function countByTypeForStatus() {
   return request({
-    url: `/center-monitor/device/selectByDeviceId/${id}`,
+    url: `/sooka-digital-construction/deviceInfo/countByTypeForStatus`,
     method: 'get'
   })
 }

+ 287 - 73
src/components/supermap-2.5d.vue

@@ -87,8 +87,15 @@
         </Form>
       </div>
       <!--地图选择、框选 显示 结束-->
-
-
+      <div id="pipeBurstAnalysis" v-if="showPipeBurstAnalysis" class="param-container tool-bar">
+        <select id="options" class="form-control">
+          <option selected value="down">下游分析</option>
+          <option value="up">上游分析</option>
+          <option value="faclilities">上游关键设施查找</option>
+        </select>
+        <button id="excavation">选择分析管线</button>
+        <button id="clear">清除结果</button>
+      </div>
     </div>
   </div>
 </template>
@@ -110,6 +117,7 @@ export default {
       showExcavation:false,//开挖图示
       showExcavationAnalyze:false,//填开挖分析图示
       showSoxSelection:false,//选择、框选
+      showPipeBurstAnalysis:false,//爆管分析
       boxSelectionTooltip:null,//选择、框选Tooltip
       boxSelectionObjects : {//选择、框选元素
         isCallInMoving: false,
@@ -167,7 +175,8 @@ export default {
       eventStatusValue: '',
       cameraCode: '',
       cameraRadius: '',
-      open_LifelineList: [], //生命线图层控制图层
+      open_LifelineList_3D: [], //生命线图层控制图层
+      open_LifelineList_2D: [], //生命线图层控制图层
       imageryProvider_hideList: [], //隐藏图层实体
       open_hideList: [], //隐藏图层实体
       openModel_hideList: [], //隐藏图层实体
@@ -387,13 +396,13 @@ export default {
           //首先移除之前添加的点
           // viewer.entities.removeAll();
           //获取点击位置笛卡尔坐标
-          var position = that.scene.pickPosition(e.position);
+          let position = that.scene.pickPosition(e.position);
 
           //将笛卡尔坐标转化为经纬度坐标
-          var cartographic = SuperMap3D.Cartographic.fromCartesian(position);
-          var longitude = SuperMap3D.Math.toDegrees(cartographic.longitude);
-          var latitude = SuperMap3D.Math.toDegrees(cartographic.latitude);
-          var height = cartographic.height;
+          let cartographic = SuperMap3D.Cartographic.fromCartesian(position);
+          let longitude = SuperMap3D.Math.toDegrees(cartographic.longitude);
+          let latitude = SuperMap3D.Math.toDegrees(cartographic.latitude);
+          let height = cartographic.height;
           if (height < 0) {
             height = 0;
           }
@@ -439,45 +448,79 @@ export default {
     // ***************************生命线---图层过滤 开始************************************************
     addLifelineOpen(checkedCities) {
       this.checkedCities=checkedCities
-      checkedCities.forEach(url => {
-        if (!url) return;  // 如果没有 URL,跳过当前迭代
-        if(!this.open_LifelineList.some(item => item.url === url)){//查找已勾选的图层数组
-          let obj = this.scene.open(this.superMapRootUrl +url,undefined,{
-            autoSetView : false      //不自动定位
-          })
-          this.open_LifelineList.push({
-            url: url,
-            mapObj: obj
-          })
+      var checkedCities_2D=[]
+      var checkedCities_3D=[]
 
-          // 管线流动
-          // SuperMap3D.when(obj, function (layer) {
-          //   var line = scene.layers.find("huashengranqi");
-          //   line.textureUVSpeed = new SuperMap3D.Cartesian2(0, -2);//模型纹理在UV坐标上的运动速度
-          // });
-
-        }else{
-          SuperMap3D.when.all(this.selectMapObj(url), function (layers) {
-            for (var layer of layers) {
-              layer.visible = true;
+      let List_2 = this.open_LifelineList_2D.map(item => item.url)
+      List_2.forEach(url => {
+        if (!url) return;  // 如果没有 URL,跳过当前迭代
+        this.viewer.imageryLayers.remove(this.selectMapObj_2D(url));
+      });
+      this.open_LifelineList_2D = []
+
+      this.checkedCities.forEach(urlList => {
+        if (!urlList.length) return;  // 如果没有 URL,跳过当前迭代
+
+        //加载三维图层
+          if(urlList[0]){
+            if(!this.open_LifelineList_3D.some(item => item.url === urlList[0])){//查找已勾选的图层数组
+              let obj = this.scene.open(this.superMapRootUrl + urlList[0],undefined,{
+                autoSetView : false      //不自动定位
+              })
+              this.open_LifelineList_3D.push({
+                url:  urlList[0],
+                mapObj: obj
+              })
+            }else{
+              SuperMap3D.when.all(this.selectMapObj_3D(urlList[0]), function (layers) {
+                for (let layer of layers) {
+                  layer.visible = true;
+                }
+              });
             }
-          });
+            checkedCities_3D.push(urlList[0])
+          }
+
+          //加载二维图层
+        if(urlList[1]){
+            let obj = this.viewer.imageryLayers.addImageryProvider(new SuperMap3D.SuperMapImageryProvider({
+              url:this.superMapRootUrl + urlList[1]
+            }));
+            this.open_LifelineList_2D.push({
+              url:  urlList[1],
+              mapObj: obj
+            })
+          checkedCities_2D.push(urlList[1])
         }
       });
-      const urlsToRemove = this.open_LifelineList.map(item => item.url).filter(url => !checkedCities.includes(url));//查找没勾选的图层数组
-      console.log('选中的url:', checkedCities);
-      console.log('移除的url:', urlsToRemove);
-      urlsToRemove.forEach(url => {
+      const urlsToRemove_2D = this.open_LifelineList_2D.map(item => item.url).filter(url => !checkedCities_2D.includes(url));//查找没勾选的图层数组2D
+      const urlsToRemove_3D = this.open_LifelineList_3D.map(item => item.url).filter(url => !checkedCities_3D.includes(url));//查找没勾选的图层数组3D
+      urlsToRemove_3D.forEach(url => {
         if (!url) return;  // 如果没有 URL,跳过当前迭代
-        SuperMap3D.when.all(this.selectMapObj(url), function (layers) {
-          for (var layer of layers) {
+        SuperMap3D.when.all(this.selectMapObj_3D(url), function (layers) {
+          for (let layer of layers) {
             layer.visible = false;
           }
         });
       });
+      urlsToRemove_2D.forEach(url => {
+        if (!url) return;  // 如果没有 URL,跳过当前迭代
+        this.viewer.imageryLayers.remove(this.selectMapObj_2D(url));
+      });
+      console.log('选中的url_2D:', checkedCities_2D);
+      console.log('选中的url_3D:', checkedCities_3D);
+      console.log('移除的url_2D:', urlsToRemove_2D);
+      console.log('移除的url_3D:', urlsToRemove_3D);
+      console.log('加载的url_2D:', this.open_LifelineList_2D);
+      console.log('加载的url_3D:', this.open_LifelineList_3D);
+    },
+    selectMapObj_2D(url) {
+      const item = this.open_LifelineList_2D.find(item => item.url === url);
+      let mapObj= item ? item.mapObj : null;
+      return mapObj
     },
-    selectMapObj(url) {
-      const item = this.open_LifelineList.find(item => item.url === url);
+    selectMapObj_3D(url) {
+      const item = this.open_LifelineList_3D.find(item => item.url === url);
       let mapObj= item ? item.mapObj : null;
       return mapObj
     },
@@ -570,7 +613,7 @@ export default {
       if (that.open_hideList != null && that.open_hideList.length > 0) {
         for (let i = 0; i < that.open_hideList.length; i++) {
           SuperMap3D.when.all(that.open_hideList[i], function (layers) {
-            for (var layer of layers) {
+            for (let layer of layers) {
               // that.scene.layers.remove(layer.name);
               layer.visible = false;
             }
@@ -585,7 +628,7 @@ export default {
         for (let i = 0; i < that.openModel_hideList.length; i++) {
           SuperMap3D.when.all(that.openModel_hideList[i], function (layers) {
             const reversedLayers = [...layers].reverse();
-            for (var layer of reversedLayers) {
+            for (let layer of reversedLayers) {
               that.scene.layers.remove(layer.name);
               that.viewer.imageryLayers.remove(layer)
             }
@@ -991,13 +1034,13 @@ export default {
       that.handlerDis.clampMode = 1
       //注册测距功能事件
       that.handlerDis.measureEvt.addEventListener(function(result) {
-        var dis = Number(result.distance)
-        var selOptV = that.selOptV
+        let dis = Number(result.distance)
+        let selOptV = that.selOptV
         if (selOptV == 3 || selOptV == 4) {
           dis = Number(calcClampDistance(positions))
         }
 
-        var distance = dis > 1000 ? (dis / 1000).toFixed(2) + 'km' : dis.toFixed(2) + 'm'
+        let distance = dis > 1000 ? (dis / 1000).toFixed(2) + 'km' : dis.toFixed(2) + 'm'
         that.handlerDis.disLabel.text = '距离:' + distance
 
       })
@@ -1028,8 +1071,8 @@ export default {
 
       that.handlerArea.clampMode = 1
       that.handlerArea.measureEvt.addEventListener(function(result) {
-        var mj = Number(result.area)
-        var area = mj > 1000000 ? (mj / 1000000).toFixed(2) + 'km²' : mj.toFixed(2) + '㎡'
+        let mj = Number(result.area)
+        let area = mj > 1000000 ? (mj / 1000000).toFixed(2) + 'km²' : mj.toFixed(2) + '㎡'
         that.handlerArea.areaLabel.text = '面积:' + area
       })
       that.handlerArea.activeEvt.addEventListener(function(isActive) {
@@ -1057,9 +1100,9 @@ export default {
       //初始化测量高度
       that.handlerHeight = new SuperMap3D.MeasureHandler(that.viewer, SuperMap3D.MeasureMode.DVH);
       that.handlerHeight.measureEvt.addEventListener(function (result) {
-        var distance = result.distance > 1000 ? (result.distance / 1000).toFixed(2) + 'km' : result.distance + 'm';
-        var vHeight = result.verticalHeight > 1000 ? (result.verticalHeight / 1000).toFixed(2) + 'km' : result.verticalHeight + 'm';
-        var hDistance = result.horizontalDistance > 1000 ? (result.horizontalDistance / 1000).toFixed(2) + 'km' : result.horizontalDistance + 'm';
+        let distance = result.distance > 1000 ? (result.distance / 1000).toFixed(2) + 'km' : result.distance + 'm';
+        let vHeight = result.verticalHeight > 1000 ? (result.verticalHeight / 1000).toFixed(2) + 'km' : result.verticalHeight + 'm';
+        let hDistance = result.horizontalDistance > 1000 ? (result.horizontalDistance / 1000).toFixed(2) + 'km' : result.horizontalDistance + 'm';
         that.handlerHeight.disLabel.text = '空间距离:' + distance;
         that.handlerHeight.vLabel.text = '垂直高度:' + vHeight;
         that.handlerHeight.hLabel.text = '水平距离:' + hDistance;
@@ -1088,7 +1131,7 @@ export default {
       let that = this
       that.showExcavation=true
       setTimeout(function() {
-        var tooltip = createTooltip(document.body);
+        let tooltip = createTooltip(document.body);
         that.handlerExcavation = new SuperMap3D.DrawHandler(that.viewer, SuperMap3D.DrawMode.Polygon);
         that.handlerExcavation.activeEvt.addEventListener(function(isActive) {
           if(isActive == true) {
@@ -1108,13 +1151,13 @@ export default {
           }
         });
         that.handlerExcavation.drawEvt.addEventListener(function(res) {
-          var positions = [].concat(res.object.positions);
-          var positionsDegrees = [];
-          for(var i = 0; i < positions.length; i++) {
-            var cartographic = SuperMap3D.Cartographic.fromCartesian(positions[i]);
-            var lon = SuperMap3D.Math.toDegrees(cartographic.longitude);
-            var lat = SuperMap3D.Math.toDegrees(cartographic.latitude);
-            var h = cartographic.height;
+          let positions = [].concat(res.object.positions);
+          let positionsDegrees = [];
+          for(let i = 0; i < positions.length; i++) {
+            let cartographic = SuperMap3D.Cartographic.fromCartesian(positions[i]);
+            let lon = SuperMap3D.Math.toDegrees(cartographic.longitude);
+            let lat = SuperMap3D.Math.toDegrees(cartographic.latitude);
+            let h = cartographic.height;
             positionsDegrees = positionsDegrees.concat([lon, lat, h]);
           }
           that.extract(positionsDegrees);
@@ -1219,7 +1262,7 @@ export default {
       let that = this
       that.showExcavationAnalyze=true
       setTimeout(function() {
-        var tooltip = createTooltip(document.body);
+        let tooltip = createTooltip(document.body);
         that.handlerExcavationAnalyze = new SuperMap3D.DrawHandler(that.viewer, SuperMap3D.DrawMode.Polygon, that.clampMode);
 
         that.handlerExcavationAnalyze.activeEvt.addEventListener(function (isActive) {
@@ -1247,16 +1290,16 @@ export default {
           that.handlerExcavationAnalyze.deactivate();
           tooltip.setVisible(false);
 
-          var dep = document.getElementById("depth").value;
+          let dep = document.getElementById("depth").value;
 
-          var array = [].concat(result.object.positions);
-          var positions = [];
-          var positionsii = [];
-          for (var i = 0, len = array.length; i < len; i++) {
-            var cartographic = SuperMap3D.Cartographic.fromCartesian(array[i]);
-            var longitude = SuperMap3D.Math.toDegrees(cartographic.longitude);
-            var latitude = SuperMap3D.Math.toDegrees(cartographic.latitude);
-            var h = cartographic.height;
+          let array = [].concat(result.object.positions);
+          let positions = [];
+          let positionsii = [];
+          for (let i = 0, len = array.length; i < len; i++) {
+            let cartographic = SuperMap3D.Cartographic.fromCartesian(array[i]);
+            let longitude = SuperMap3D.Math.toDegrees(cartographic.longitude);
+            let latitude = SuperMap3D.Math.toDegrees(cartographic.latitude);
+            let h = cartographic.height;
             if (positions.indexOf(longitude) == -1 && positions.indexOf(latitude) == -1) {
 
               positions.push(longitude);
@@ -1277,11 +1320,11 @@ export default {
             position: positions
           });
 
-          var length = [];
+          let length = [];
           length.push(positionsii.length);
 
           //需要在此 动态构造一个 REGION类型的对象
-          var geometry = {
+          let geometry = {
             "id": 23,
             "parts": length,
             "points": positionsii,
@@ -1290,7 +1333,7 @@ export default {
           };
 
 
-          var queryObj = {
+          let queryObj = {
             "cutFillType": "REGIONANDALTITUDE",
             "baseAltitude": dep,
             "region": geometry,
@@ -1298,15 +1341,15 @@ export default {
             "buildPyramid": true,
             "deleteExistResultDataset": true
           };
-          var queryObjJSON = JSON.stringify(queryObj);
+          let queryObjJSON = JSON.stringify(queryObj);
           $.ajax({
             type: 'post',
             url: "http://www.supermapol.com/realspace/services/spatialAnalysis-dxyx_ios/restjsr/spatialanalyst/datasets/DEM@%E5%9B%9B%E5%A7%91%E5%A8%98%E5%B1%B1/terraincalculation/cutfill.json?returnContent=true",
             data: queryObjJSON,
             success: function (data) {
               console.log(data);
-              // var resultObj = JSON.parse(data);
-              var resultObj = data;
+              // let resultObj = JSON.parse(data);
+              let resultObj = data;
 
               document.getElementById("cutarea").value = resultObj.cutArea;
               document.getElementById("cutVolume").value = resultObj.cutVolume;
@@ -1347,7 +1390,7 @@ export default {
       let layersAll = [];
       that.checkedCities.forEach(url => {
         if (!url) return;  // 如果没有 URL,跳过当前迭代
-        SuperMap3D.when.all(that.selectMapObj(url), function (layers) {
+        SuperMap3D.when.all(that.selectMapObj_3D(url), function (layers) {
           layersAll.push(layers)
         });
       });
@@ -1706,6 +1749,177 @@ export default {
 
       }, 1000)
     },
+    //爆管分析
+    pipeBurstAnalysis(){
+      let that=this;
+      that.showPipeBurstAnalysis=true
+      // 开启地下模式
+      that.scene.undergroundMode = true
+      that.scene.screenSpaceCameraController.minimumZoomDistance = -1000
+      that.scene.globe.show = false
+      that.viewer.resolutionScale = window.devicePixelRatio;
+      // 添加地下管线模型
+      let promise_underground = that.scene.open('http://116.142.80.12:8090/iserver/services/3D-burstAnalysis/rest/realspace');
+
+      // setTimeout(()=>{
+      //   new SuperMap3D.when(promise_underground, function (layers) {
+      //     alert(layers)
+      //     // 设置图层的LOD层级切换距离缩放系数。
+      //     for (let layer of layers) {
+      //       layer.lodRangeScale = 50
+      //     }
+      //
+      //     //查询所有阀门
+      //     queryALLValve()
+      //     //粒子特效
+      //     let multiFireUrl = '../src/particle/fountain.json';
+      //     modelMatrix = new SuperMap3D.Matrix4();
+      //     let pos = new SuperMap3D.Cartesian3.fromDegrees(0, 0, 0)
+      //     new SuperMap3D.Transforms.eastNorthUpToFixedFrame(pos, undefined, modelMatrix);
+      //     new SuperMap3D.ParticleHelper.fromJsonUrl(multiFireUrl, that.scene).then(function (particleSys) {
+      //       particleSystem = particleSys;
+      //       particleSystem.emitRate = 200
+      //       particleSystem.gravity = new SuperMap3D.Cartesian3(0, 0, 4)
+      //       particleSystem.minLifeTime = 1
+      //       particleSystem.maxLifeTime = 2
+      //       particleSystem.minSize = 1
+      //       particleSystem.maxSize = 4
+      //       particleSystem.modelMatrix = modelMatrix;
+      //       particleSystem.start();
+      //     });
+      //     // 获取管线管点图层
+      //     pipeedge = that.scene.layers.find('PipeNetWork@Pipe3D#1')
+      //     pipenode = that.scene.layers.find('PipeNetWork_Node@Pipe3D#1')
+      //     pipenode1 = that.scene.layers.find('PipeNetWork_Node@Pipe3D')
+      //     handler = new SuperMap3D.ScreenSpaceEventHandler(that.scene.canvas);
+      //
+      //     // 开始分析按钮事件
+      //     document.getElementById('excavation').onclick = () => {
+      //       if (handler) {
+      //
+      //         handler.setInputAction(function (e) {
+      //           // 获取点击的管线ID
+      //           pipesec = pipeedge.getSelection()
+      //           if (!pipesec && pipesec.length === 0) {
+      //             return
+      //           }
+      //           let position = that.scene.pickPosition(e.position)
+      //           //爆管分析
+      //           burstAnalysis(pipesec, position)
+      //         }, SuperMap3D.ScreenSpaceEventType.LEFT_CLICK)
+      //       }
+      //     }
+      //
+      //     // 清除按钮事件
+      //     document.getElementById('clear').onclick = () => {
+      //       if (handler) {
+      //         handler.removeInputAction(SuperMap3D.ScreenSpaceEventType.LEFT_CLICK)
+      //       }
+      //       let pos = SuperMap3D.Cartesian3.fromDegrees(0, 0, 0)
+      //       SuperMap3D.Transforms.eastNorthUpToFixedFrame(pos, undefined, modelMatrix);
+      //       particleSystem.modelMatrix = modelMatrix;
+      //       pipeedge.setObjsColor(edgeIds, SuperMap3D.Color.WHITE)
+      //       pipenode.setObjsColor(nodeIds, SuperMap3D.Color.WHITE)
+      //       pipenode1.setObjsColor(nodeIds, SuperMap3D.Color.WHITE)
+      //
+      //     }
+      //   })
+      // },1000)
+
+      if (!that.scene.pickPositionSupported) {
+        alert('不支持深度纹理,无法绘制多边形,地形开挖功能无法使用!');
+      }
+      $('#toolbar').show();
+      $('#loadingbar').remove();
+
+      /*
+  爆管分析,pipesec:选取管线id,position:鼠标点击位置
+  */
+      function burstAnalysis(pipesec, position) {
+        SuperMap3D.Transforms.eastNorthUpToFixedFrame(position, undefined, modelMatrix);
+        particleSystem.modelMatrix = modelMatrix;
+        console.log(pipesec)
+        // 获取当前选择的分析方式
+        let value = document.getElementById('options').value
+        // 根据分析方式创建请求体
+
+        if (value === "down") {
+          workURL = 'http://116.142.80.12:8090/iserver/services/networkAnalyst3D-burstAnalysis-2/rest/facilityanalyst3d/PipeNetWork@Pipe3D/tracedownresult.json'
+          queryObj = {
+            edgeID: pipesec[0],
+            isUncertainDirectionValid: true,
+            weightName: 'WeightField'
+          }
+        } else if (value === 'up') {
+          workURL = 'http://116.142.80.12:8090/iserver/services/networkAnalyst3D-burstAnalysis-2/rest/facilityanalyst3d/PipeNetWork@Pipe3D/traceupresult.json'
+          queryObj = {
+            edgeID: pipesec[0],
+            isUncertainDirectionValid: true,
+            weightName: 'WeightField'
+          }
+        } else if (value === 'faclilities') {
+          let valve = valves
+          let ids = JSON.stringify(valve)
+          workURL = 'http://116.142.80.12:8090/iserver/services/networkAnalyst3D-burstAnalysis-2/rest/facilityanalyst3d/PipeNetWork@Pipe3D/upstreamcirticalfaclilities.json'
+          queryObj = {
+            sourceNodeIDs: ids,
+            edgeID: pipesec[0],
+            isUncertainDirectionValid: true
+          }
+        }
+        // 发送请求
+        $.ajax({
+          type: 'GET',
+          url: workURL,
+          data: queryObj,
+          success: data => {
+            // 得到结果
+            console.log(data)
+            if (data.edges) {
+              edgeIds = data.edges
+              pipeedge.setObjsColor(data.edges, SuperMap3D.Color.RED)
+            }
+            if (data.nodes) {
+              nodeIds = data.nodes
+              pipenode.setObjsColor(data.nodes, SuperMap3D.Color.RED)
+              pipenode1.setObjsColor(data.nodes, SuperMap3D.Color.RED)
+            }
+          },
+          error: res => {
+            console.log(res)
+          }
+        })
+      }
+      // 查询所有阀门
+      function queryALLValve() {
+        debugger
+        //查询阀门地址和参数
+        let dataServiceUrl = 'http://116.142.80.12:8090/iserver/services/data-burstAnalysis/rest/data/featureResults.json?returnContent=true';
+        let queryObj = {
+          getFeatureMode: 'SQL',
+          datasetNames: ['Pipe3D:PipeNetWork_Node'],
+          queryParameter: {
+            attributeFilter: "Name='阀门'"
+          }
+        };
+        queryObjJSON = JSON.stringify(queryObj); // 转化为JSON字符串作为查询参数
+        $.ajax({
+          type: "post",
+          url: dataServiceUrl,
+          data: queryObjJSON,
+          success: function (result) {
+            valves = []
+            result.features.map(function (element) {
+              // 遍历数组,对每个元素进行操作
+              valves.push(element.ID);
+            });
+          },
+          error: function (msg) {
+            console.log(msg);
+          }
+        })
+      }
+    },
     //清除框选
     removeBoxSelection(){
       this.showSoxSelection= false
@@ -1993,7 +2207,7 @@ export default {
       if (radius != undefined && radius != null) {
         let that = this
         // 初始化颜色选择控件
-        var initialScanColor = '#2263e6'
+        let initialScanColor = '#2263e6'
         that.viewer.scene.scanEffect.color = SuperMap3D.Color.fromCssColorString(initialScanColor)
         // 获取或设置扫描线的运行周期,单位:秒。
         that.viewer.scene.scanEffect.period = radius / 500

+ 9 - 9
src/views/Cockpit.vue

@@ -575,15 +575,15 @@ import {
 let echarts = require('echarts')
 
 
-const cityOptions1_1 = [{ type: '企业', url: '' }, { type: '厂站', url: '' }, { type: '阀门', url: '' }, { type: '次高压管网', url: '/3D-huashengranqi-2/rest/realspace' }, { type: '中压管网', url: '' }];
-const cityOptions1_2 = [{ type: '企业', url: '' }, { type: '厂站', url: '' }, { type: '阀门', url: '' }, { type: '次高压管网', url: '/3D-ganghuaranqi/rest/realspace' }, { type: '中压管网', url: '' }];
-const cityOptions1_3 = [{ type: '企业', url: '' }, { type: '厂站', url: '' }, { type: '阀门', url: '' }, { type: '次高压管网', url: '/3D-aode/rest/realspace' }, { type: '中压管网', url: '' }];
-const cityOptions1_4 = [{ type: '企业', url: '' }, { type: '厂站', url: '' }, { type: '阀门', url: '' }, { type: '次高压管网', url: '' }, { type: '中压管网', url: '' }];
-const cityOptions2 = [{ type: '企业', url: '' }, { type: '管廊', url: '' }];
-const cityOptions3 = [{ type: '企业', url: '' }, { type: '阀门', url: '' }, { type: '泵站', url: '' }, { type: '管网', url: '' }];
-const cityOptions4 = [{ type: '企业', url: '' }, { type: '合流管', url: '/3D-PaiShui/rest/realspace' }, { type: '污水管', url: '' }, { type: '雨水管', url: '' }, { type: '雨水篦子', url: '' }];
-const cityOptions5 = [{ type: '企业', url: '' }, { type: '一次网', url: '/3D-reli_yici_erci_guanduan-2/rest/realspace' }, { type: '二次网', url: '' }, { type: '阀门', url: '' }];
-const cityOptions6 = [{ type: '企业', url: '' }, { type: '直供网', url: '' }];
+const cityOptions1_1 = [{ type: '企业', url:[] }, { type: '厂站', url:[] },  { type: '次高压管网', url: ['/3D-huashengranqi/rest/realspace','/map-GHRQ/rest/maps/all@huasheng'] }, { type: '中压管网', url:[] }];
+const cityOptions1_2 = [{ type: '企业', url:[] }, { type: '厂站', url:[] },  { type: '次高压管网', url: ['/3D-GH_tiedong/rest/realspace','/map-GangHua/rest/maps/guandao_cigao@Ganghua_tiedong'] }, { type: '中压管网', url:['/3D-GH_tiedong/rest/realspace','/map-GangHua/rest/maps/guandao_zhong@Ganghua_tiedong'] }];
+const cityOptions1_3 = [{ type: '企业', url:[] }, { type: '厂站', url:[] },  { type: '次高压管网', url: ['/3D-aode_he/rest/realspace','/map-Aoderanqi/rest/maps/he@aode'] }, { type: '中压管网', url:[] }];
+const cityOptions1_4 = [{ type: '企业', url:[] }, { type: '厂站', url:[] },  { type: '次高压管网', url: ['/3D-runfa_he/rest/realspace','/map-RunFaRanQi/rest/maps/he@runfa'] }, { type: '中压管网', url:[] }];
+const cityOptions2 = [{ type: '企业', url:[] }, { type: '管廊', url:[] }];
+const cityOptions3 = [{ type: '企业', url:[] }, { type: '阀门', url:[] }, { type: '泵站', url:[] }, { type: '管网', url:[] }];
+const cityOptions4 = [{ type: '企业', url:[] }, { type: '合流管', url: ['/3D-PaiShui/rest/realspace',null] }, { type: '污水管', url:[] }, { type: '雨水管', url:[] }, { type: '雨水篦子', url:[] }];
+const cityOptions5 = [{ type: '企业', url:[] }, { type: '一次网', url: ['/3D-reli_yici_erci_guanduan-2/rest/realspace',null] }, { type: '二次网', url:[] }, { type: '阀门', url:[] }];
+const cityOptions6 = [{ type: '企业', url:[] }, { type: '直供网', url:[] }];
 export default {
   components: {
     supermap,

+ 160 - 154
src/views/SenEquipmentCenter.vue

@@ -12,10 +12,10 @@
 			<div class="list_tit">设备列表</div>
 			<el-select v-model="listParams.brand" placeholder="请选择品牌" @change="brandHasChanged" clearable style="width:100%;margin-bottom: 10px;">
 				<el-option
-						v-for="item in options"
-						:key="item.value"
-						:label="item.label"
-						:value="item.value">
+            v-for="dict in dict.type.sentinel_installation_method"
+						:key="dict.value"
+						:label="dict.label"
+						:value="dict.value">
 				</el-option>
 			</el-select>
 			<el-input
@@ -59,10 +59,12 @@
 	import supermap from '@/components/supermap-2.5d' //超图
 	import {getUserProfile} from "@/api/system/user";
 	import {
-		listDeviceAll,
-		selectBrandList,
+		brandPageList,
 		selectByDeviceId,
-		selectDailyThreshold
+		selectDailyThreshold,
+    countByBrand,
+    countByDepartment,
+    countByTypeForStatus
 	} from "@/api/sentinel"
 
 	import '../assets/styles/sb_body.css';
@@ -72,11 +74,13 @@
 	} from "@/api/system/config";
 	// import * as echarts from 'echarts'
 	let echarts = require("echarts");
+
 	export default {
 		name:'MyChart',
 		components: {
 			supermap,
 		},
+    dicts:['sentinel_installation_method'],
 		metaInfo () {
 			return {
 				title:'四平市智慧哨兵监管平台',
@@ -91,19 +95,6 @@
 		},
 		created() {
       this.getListDeviceAll()
-			// 查询品牌
-			selectBrandList().then(res => {
-				if(res.data){
-					let brandoptions = []
-					res.data.forEach(e => {
-						brandoptions.push({
-							value:e,
-							label:e
-						})
-					})
-					this.options = brandoptions
-				}
-			})
 		},
 		mounted() {
       this.equipmentEcharts();
@@ -135,151 +126,166 @@
 		},
 		methods: {
       equipmentEcharts(){
-        const echartsByCompany = echarts.init(this.$refs.echartsByCompany);
-        let echartsByCompanyOption = {
-          series: [
-            {
-              type: 'pie',
-              radius: ['30%', '60%'],
-              avoidLabelOverlap: false,
-              padAngle: 10,
-              itemStyle: {
-                borderRadius: 20
-              },
-              label: {
-                show: false,
-                position: 'center'
-              },
-              emphasis: {
+        countByBrand().then(res => {
+          const seriesData = []
+          for(let item of res.data){
+            seriesData.push({name:item.brandName,value:item.count})
+          }
+          const echartsByCompany = echarts.init(this.$refs.echartsByCompany);
+          let echartsByCompanyOption = {
+            series: [
+              {
+                type: 'pie',
+                radius: ['30%', '60%'],
+                avoidLabelOverlap: false,
+                padAngle: 10,
+                itemStyle: {
+                  borderRadius: 20
+                },
+                label: {
+                  show: false,
+                  position: 'center'
+                },
+                emphasis: {
+                  label: {
+                    show: true,
+                    fontSize: 14,
+                    fontWeight: 'bold',
+                    formatter: '{b}:{c} \n {d}%'
+                  }
+                },
+                labelLine: {
+                  show: false
+                },
+                color: ["rgb(131,249,103)", "#FBFE27", "#FE5050","#1DB7E5"],
+                data: seriesData
+              }
+            ]
+          };
+          echartsByCompany.setOption(echartsByCompanyOption);
+        })
+        countByDepartment().then(res => {
+          const seriesData = []
+          for(let item of res.data){
+            seriesData.push({name:item.departmentName,value:item.deviceCount})
+          }
+          const echartsByType = echarts.init(this.$refs.echartsByType);
+          let echartsByTypeOption = {
+            series: [
+              {
+                type: 'pie',
+                radius: [20, 70],
+                center: ['50%', '50%'],
+                roseType: 'area',
+                itemStyle: {
+                  borderRadius: 2
+                },
+                labelLine:{
+                  show:true,
+                  position:'outside',
+                  length:10,
+                  length2:10,
+                },
                 label: {
                   show: true,
-                  fontSize: 14,
-                  fontWeight: 'bold',
-                  formatter: '{b}:{c} \n {d}%'
-                }
-              },
-              labelLine: {
-                show: false
-              },
-              color: ["rgb(131,249,103)", "#FBFE27", "#FE5050","#1DB7E5"],
-              data: [
-                { value: 1048, name: '港华' },
-                { value: 735, name: '奥德' },
-                { value: 580, name: '华生' },
-                { value: 484, name: '润发' }
-              ]
-            }
-          ]
-        };
-        echartsByCompany.setOption(echartsByCompanyOption);
-        const echartsByType = echarts.init(this.$refs.echartsByType);
-        let echartsByTypeOption = {
-          series: [
-            {
-              type: 'pie',
-              radius: [20, 70],
-              center: ['50%', '50%'],
-              roseType: 'area',
-              itemStyle: {
-                borderRadius: 2
-              },
-              labelLine:{
-                show:true,
-                position:'outside',
-                length:5,
-                length2:5
-              },
-              label: {
-                show: true,
-                formatter: '{b}:{c}'
+                  normal: {
+                    textStyle: {
+                      color: '#fff'  // 改变标示文字的颜色
+                    }
+                  },
+                  formatter: '{b}:{c}'
+                },
+                color: ["#ffa518", "#ff5629","#60b49b","#f3d435","#343df5"],
+                data: seriesData
+              }
+            ]
+          };
+          echartsByType.setOption(echartsByTypeOption);
+        })
+        countByTypeForStatus().then(res => {
+          const echartsByOnOff = echarts.init(this.$refs.echartsByOnOff);
+          let product = ['product'];
+          let on = ['在线'];
+          let off = ['离线'];
+          for(let item of res.data){
+            product.push(item.deviceType);
+            on.push(item.onlineCount);
+            off.push(item.offlineCount);
+          }
+
+          let source = [product,on,off];
+          let echartsByOnOffOption = {
+            title: {
+              text: product[1],
+              textStyle: {
+                color: '#b2de82', // 文字颜色
+                fontSize: 20, // 字体大小
+                fontWeight: 'bold', // 字体粗细
+                fontFamily: 'Arial' // 字体家族
               },
-              color: ["#ffa518", "#ff5629","#60b49b"],
-              data: [
-                { value: 36, name: '地埋' },
-                { value: 20, name: '桩式' },
-                { value: 25, name: '阀井哨兵' },
-              ]
-            }
-          ]
-        };
-        echartsByType.setOption(echartsByTypeOption);
-        const echartsByOnOff = echarts.init(this.$refs.echartsByOnOff);
-        let product = ['product', '地埋', '桩式','阀井哨兵'];
-        let on = ['在线', 10, 20,50];
-        let off = ['离线', 30, 40,50];
-        let source = [product,on,off];
-        let echartsByOnOffOption = {
-          title: {
-            text: product[1],
-            textStyle: {
-              color: '#b2de82', // 文字颜色
-              fontSize: 20, // 字体大小
-              fontWeight: 'bold', // 字体粗细
-              fontFamily: 'Arial' // 字体家族
+              left: 'left' // 标题位置
             },
-            left: 'left' // 标题位置
-          },
-          tooltip: {
-            trigger: 'axis',
-            showContent: false
-          },
-          dataset: {
-            source: source
-          },
-          xAxis: { type: 'category',
-            axisLabel: {
-              color: '#b2de82'
-            }
-          },
-          yAxis: { gridIndex: 0 },
-          grid: { top: '55%' },
-          color: ["#6cb956", "#629ab2"],
-          series: [
-            {
-              type: 'bar',
-              smooth: true,
-              seriesLayoutBy: 'row',
-              emphasis: { focus: 'series' }
+            tooltip: {
+              trigger: 'axis',
+              showContent: false
             },
-            {
-              type: 'bar',
-              smooth: true,
-              seriesLayoutBy: 'row',
-              emphasis: { focus: 'series' }
+            dataset: {
+              source: source
             },
-            {
-              type: 'pie',
-              id: 'pie',
-              radius: '30%',
-              center: ['50%', '25%'],
-              emphasis: {
-                focus: 'self'
-              },
-              label: {
-                formatter: '{b}: {@地埋} ({d}%)'
+            xAxis: { type: 'category',
+              axisLabel: {
+                color: '#b2de82'
+              }
+            },
+            yAxis: { gridIndex: 0 },
+            grid: { top: '55%' },
+            color: ["#28717d", "#629ab2"],
+            series: [
+              {
+                type: 'bar',
+                smooth: true,
+                seriesLayoutBy: 'row',
+                emphasis: { focus: 'series' }
               },
-            }
-          ]
-        };
-        echartsByOnOff.on('updateAxisPointer', function (event) {
-          const xAxisInfo = event.axesInfo[0];
-          if (xAxisInfo) {
-            const dimension = xAxisInfo.value + 1;
-            echartsByOnOff.setOption({
-              title: {
-                text: product[dimension]
+              {
+                type: 'bar',
+                smooth: true,
+                seriesLayoutBy: 'row',
+                emphasis: { focus: 'series' }
               },
-              series: {
+              {
+                type: 'pie',
                 id: 'pie',
+                radius: '30%',
+                center: ['50%', '25%'],
+                emphasis: {
+                  focus: 'self'
+                },
                 label: {
-                  formatter: '{b}: {@[' + dimension + ']} ({d}%)'
+                  formatter: '{b}: {@地埋} ({d}%)'
                 },
               }
-            });
-          }
-        });
-        echartsByOnOff.setOption(echartsByOnOffOption);
-
+            ]
+          };
+          echartsByOnOff.on('updateAxisPointer', function (event) {
+            const xAxisInfo = event.axesInfo[0];
+            if (xAxisInfo) {
+              const dimension = xAxisInfo.value + 1;
+              echartsByOnOff.setOption({
+                title: {
+                  text: product[dimension]
+                },
+                series: {
+                  id: 'pie',
+                  label: {
+                    formatter: '{b}: {@[' + dimension + ']} ({d}%)'
+                  },
+                }
+              });
+            }
+          });
+          echartsByOnOff.setOption(echartsByOnOffOption);
+        })
       },
 			closeDetail(){
 				this.isDetailVisible = false
@@ -293,7 +299,7 @@
 			},
 			// 查询设备列表
 			getListDeviceAll(){
-				listDeviceAll(this.listParams).then(res => {
+				brandPageList(this.listParams).then(res => {
 					this.deviceList = res.rows
 					this.deviceListSearch = res.rows
           			this.deviceTotal = res.total

+ 71 - 92
src/views/SenEventCenter.vue

@@ -13,12 +13,16 @@
 		<div class="con_left">
 			<div class="list_tit">预警中心</div>
 			<div class="yjzx_div">
-				<div class="yjzx_k1">
-					<img src="../assets/images/sentinel/sb_icon1.png"/>
-					<span>总计</span>
-					<b>{{eventTotal}}</b>
-				</div>
+<!--				<div class="yjzx_k1">-->
+<!--					<img src="../assets/images/sentinel/sb_icon1.png"/>-->
+<!--					<span>总计</span>-->
+<!--					<b>{{eventTotal}}</b>-->
+<!--				</div>-->
 				<div class="yjzx_k2">
+          <p>
+            <span>总计</span>
+            <b>{{eventTotal}}</b>
+          </p>
 					<p v-for="item in eventNumberList">
             <span>{{item.eventTypeName}}</span>
             <b>{{item.countSum}}</b>
@@ -97,7 +101,13 @@
 <script>
 	import Cookies from 'js-cookie'
 	import {getUserProfile} from "@/api/system/user";
-  import {eventTypesListAll, getEventList, getStatisticByEventType} from "@/api/event";
+  import {
+    countByDepartment,
+    eventTypesListAll,
+    getEventList,
+    getStatisticByBrand,
+    getStatisticByEventType
+  } from "@/api/event";
 
 	import '../assets/styles/sb_body.css';
 
@@ -123,19 +133,19 @@
 			}
 		},
 		created() {
-      this.getEventLeft(1);
-      this.getEventRight(1);
+      // this.getEventRight(1);
       this.getSupermapEvent();
       this.getStatisticByEventType();
       this.eventTypesListAll();
+      this.getStatisticByBrand();
+      this.countByDepartment();
+      this.getEventLeft(1);
 		},
 		mounted() {
 			// 初始化地图数据
 			setTimeout(() => {
 				this.title = '四平市智慧哨兵监管平台'
 			}, 1000);
-      this.eventAnalyzeChart();
-      this.enterpriseAnalyzeChart();
 		},
 		data() {
 			return {
@@ -188,7 +198,11 @@
 		},
 		methods: {
       //事件分析
-      eventAnalyzeChart() {
+      eventAnalyzeChart(data) {
+        let datas = [];
+        for(let item of data){
+          datas.push({name:item.departmentName,value:item.count})
+        }
         const chartDom = this.$refs.eventAnalyze;
         const myChart = echarts.init(chartDom);
         this.option = {
@@ -196,7 +210,6 @@
             trigger: "item",
             formatter: "{b} : {c} ({d}%)",
           },
-
           visualMap: {
             show: false,
             min: 500,
@@ -208,31 +221,11 @@
           series: [{
             name: "访问来源",
             type: "pie",
-            radius: "80%",
+            radius: "60%",
             center: ["50%", "50%"],
             color: ["rgb(131,249,103)", "#FBFE27", "#FE5050","#f17c7c","#1DB7E5"
             ], //'#FBFE27','rgb(11,228,96)','#FE5050'
-            data: [{
-              value: 285,
-              name: "伊通县",
-            },
-              {
-                value: 410,
-                name: "梨树县",
-              },
-              {
-                value: 274,
-                name: "铁东区",
-              },
-              {
-                value: 235,
-                name: "铁西区",
-              },,
-              {
-                value: 235,
-                name: "双辽市",
-              },
-            ].sort(function(a, b) {
+            data: datas.sort(function(a, b) {
               return a.value - b.value;
             }),
             roseType: "radius",
@@ -282,35 +275,39 @@
 
       },
       //企业分析
-      enterpriseAnalyzeChart() {
+      enterpriseAnalyzeChart(data) {
+        let series =  [];
+        let corors = ['#5470c6', '#91cc75', '#fac858', '#ee6666'];
+        for (let i = 0; i < data.series.length; i++) {
+          series.push({
+            name: data.series[i].name,
+            type: 'line',
+            stack: 'Total',
+            itemStyle: {
+              color: corors[i] // 蓝色
+            },
+            data: data.series[i].data
+          })
+        }
         const chartDom = this.$refs.enterpriseAnalyze;
         const myChart = echarts.init(chartDom);
         this.option =  {
           tooltip: {
             trigger: 'axis'
           },
-          legend: {
-            data: ['华生','港华', '奥德', '润发'],
-            textStyle: {
-              color: '#13e845'  // 图例文字颜色,设置为深灰色
-            }
-          },
           grid: {
-            left: '3%',
+            top: '5%',
+            left: '12%',
             right: '4%',
-            bottom: '3%',
+            bottom: '2%',
             containLabel: true
           },
-          toolbox: {
-            feature: {
-              saveAsImage: {}
-            }
-          },
           xAxis: {
             type: 'category',
             boundaryGap: false,
-            data: ['2025-09-17', '2025-09-18', '2025-09-19', '2025-09-20', '2025-09-21', '2025-09-22', '2025-09-23'],
+            data: data.categories,
             axisLabel: {
+              rotate: 45,  // 旋转角度范围-90到90
               color: '#13e845'  // X轴刻度颜色,这里设置为深灰色
             }
           },
@@ -320,44 +317,7 @@
               color: '#eed113'  // Y轴刻度颜色,这里设置为深灰色
             }
           },
-          series: [
-            {
-              name: '华生',
-              type: 'line',
-              stack: 'Total',
-              itemStyle: {
-                color: '#5470c6'  // 蓝色
-              },
-              data: [120, 132, 101, 134, 90, 230, 210]
-            },
-            {
-              name: '港华',
-              type: 'line',
-              stack: 'Total',
-              itemStyle: {
-                color: '#91cc75'  // 绿色
-              },
-              data: [220, 182, 191, 234, 290, 330, 310]
-            },
-            {
-              name: '奥德',
-              type: 'line',
-              stack: 'Total',
-              itemStyle: {
-                color: '#fac858'  // 黄色
-              },
-              data: [150, 232, 201, 154, 190, 330, 410]
-            },
-            {
-              name: '润发',
-              type: 'line',
-              stack: 'Total',
-              itemStyle: {
-                color: '#ee6666'  // 红色
-              },
-              data: [320, 332, 301, 334, 390, 330, 320]
-            },
-          ]
+          series: series
         };
 
 
@@ -379,6 +339,7 @@
       eventTypesListAll(){
         eventTypesListAll().then(req => {
           this.eventTypes = req.data;
+          // this.eventType = req.data[0].eventTypeCode;
         })
       },
       getCurrentDataStr(date) {
@@ -395,12 +356,30 @@
         this.getEventRight(1);
         this.getStatisticByEventType();
         this.getSupermapEvent();
+        this.getStatisticByBrand();
+        this.countByDepartment();
+      },
+      getStatisticByBrand(){
+        let data ={
+          selectDay:this.dataValue
+        }
+        getStatisticByBrand(data).then(req => {
+          this.enterpriseAnalyzeChart(req.data)
+        })
+      },
+      countByDepartment(){
+        let data ={
+          selectDay:this.dataValue
+        }
+        countByDepartment(data).then(req => {
+          this.eventAnalyzeChart(req.data)
+        })
       },
       getEventLeft(pageNum){
         let param = {
           pageNum: pageNum,
           pageSize: 10,
-          eventTypeCode: this.eventType,
+          eventTypeCode: this.eventType === '' ? 'all' : this.eventType,
           eventTitle: this.searchLeft,
           createTimeRange: this.dataValue+","+this.dataValue,
         };
@@ -410,7 +389,7 @@
         })
       },
       flyTo(longitude,latitude){
-        this.$parent.$refs.supermap.flyTo(longitude,latitude);
+        this.$parent.$refs.supermap.dropLocation(longitude * 1,latitude * 1);
       },
       getEventRight(pageNum){
         let param = {
@@ -498,7 +477,7 @@
 		}
 		.yjzx_k2{
 			height: 211px;
-			width: 260px;
+			//width: 100%;
 			p{
 				display: inline-block;
 				background: url("../assets/images/sentinel/sb_btnbg2.png") no-repeat center;
@@ -506,11 +485,11 @@
 				width: 88px;
 				height: 101px;
 			}
-			:nth-child(1){
+			:nth-child(1),:nth-child(2),:nth-child(4),:nth-child(5){
 				margin-right: 7px;
 				margin-bottom: 7px;
 			}
-			:nth-child(3){
+			:nth-child(3),:nth-child(6){
 				margin-right: 7px;
 			}
 			span{

+ 41 - 73
src/views/SenWarningCenter.vue

@@ -7,88 +7,40 @@
 
 <template>
     <div>
-        <div class="warning_left" style="top: 70px;">
-			<h4>可燃气体泄露预警</h4>
-            <h2>3056</h2>
-            <img src="@/assets/images/warningBg.png">
-		</div>
-        <div class="warning_left" style="top: 240px;">
-			<h4>位移预警</h4>
-            <h2>355</h2>
-            <img src="@/assets/images/warningBg.png">
-		</div>
-        <div class="warning_left" style="top: 410px;">
-			<h4>振动预警</h4>
-            <h2>937</h2>
-            <img src="@/assets/images/warningBg.png">
-		</div>
-        <div class="warning_left" style="top: 580px;">
-			<h4>水位预警</h4>
-            <h2>37</h2>
-            <img src="@/assets/images/warningBg.png">
-		</div>
-        <div class="warning_left" style="top: 747px;">
-			<h4>异常流量预警</h4>
-            <h2>86</h2>
-            <img src="@/assets/images/warningBg.png">
-		</div>
-        <div class="con_right con_left_js" style="top: 70px;">
-			<div class="list_tit">可燃气体泄露预警说明</div>
-			<!-- 预警说明内容主体 -->
-            <div class="text_content">
-                <h4>预警名称:可燃性气体泄漏预警</h4>
-                <h4>预警描述:通过安装在燃气管道附近的燃气哨兵设备,实现管道燃气周边可燃性气体(甲烷)含量变化。</h4>
-                <h4>预警阈值:3%</h4>
-            </div>
-		</div>
-        <div class="con_right con_left_js" style="top: 240px;">
-			<div class="list_tit">位移预警说明</div>
-			<!-- 预警说明内容主体 -->
-            <div class="text_content">
-                <h4>预警名称:可燃性气体泄漏预警</h4>
-                <h4>预警描述:通过安装在燃气管道附近的燃气哨兵设备,实现管道燃气周边可燃性气体(甲烷)含量变化。</h4>
-                <h4>预警阈值:3%</h4>
-            </div>
-		</div>
-        <div class="con_right con_left_js" style="top: 410px;">
-			<div class="list_tit">振动预警说明</div>
-			<!-- 预警说明内容主体 -->
-            <div class="text_content">
-                <h4>预警名称:可燃性气体泄漏预警</h4>
-                <h4>预警描述:通过安装在燃气管道附近的燃气哨兵设备,实现管道燃气周边可燃性气体(甲烷)含量变化。</h4>
-                <h4>预警阈值:3%</h4>
-            </div>
-		</div>
-        <div class="con_right con_left_js" style="top: 580px;">
-			<div class="list_tit">水位预警说明</div>
-			<!-- 预警说明内容主体 -->
-            <div class="text_content">
-                <h4>预警名称:可燃性气体泄漏预警</h4>
-                <h4>预警描述:通过安装在燃气管道附近的燃气哨兵设备,实现管道燃气周边可燃性气体(甲烷)含量变化。</h4>
-                <h4>预警阈值:3%</h4>
-            </div>
-		</div>
-        <div class="con_right con_left_js" style="top: 747px;">
-			<div class="list_tit">异常流量预警说明</div>
-			<!-- 预警说明内容主体 -->
-            <div class="text_content">
-                <h4>预警名称:可燃性气体泄漏预警</h4>
-                <h4>预警描述:通过安装在燃气管道附近的燃气哨兵设备,实现管道燃气周边可燃性气体(甲烷)含量变化。</h4>
-                <h4>预警阈值:3%</h4>
-            </div>
-		</div>
+      <div class="warning_left" :class="'warning_'+index" v-for="(item,index) in option" >
+        <h4>{{item.typeName}}</h4>
+        <h2>{{item.count}}</h2>
+        <img src="@/assets/images/warningBg.png">
+      </div>
+      <div class="con_right con_left_js" :class="'warning_'+index" v-for="(item,index) in option" >
+        <div class="list_tit">{{item.typeName}}说明</div>
+        <!-- 预警说明内容主体 -->
+              <div class="text_content">
+                  <h4>预警名称:{{item.typeName}}</h4>
+                  <h4>预警描述:{{item.warningDescription}}</h4>
+                  <h4>告警阈值:{{item.concentrationUp}};紧急阈值:{{item.urgentUp}}</h4>
+              </div>
+      </div>
     </div>
 </template>
 
 <script>
+import {countByWarningCategory} from "@/api/data";
 export default {
     data(){
-        return {
-        }
+      return {
+        option:[],
+      }
     },
     mounted(){
+      this.countByWarningCategory();
     },
     methods:{
+      countByWarningCategory(){
+        countByWarningCategory().then(req => {
+          this.option = req.data;
+        })
+      }
     }
 }
 </script>
@@ -131,6 +83,22 @@ export default {
 	.con_left_js {
 		width: 400px !important;
 	}
+    .warning_0{
+      top: 70px !important;
+    }
+    .warning_1{
+      top: 240px !important;
+    }
+    .warning_2{
+      top: 410px !important;
+    }
+    .warning_3{
+      top: 580px !important;
+    }
+    .warning_4{
+      top: 747px !important;
+    }
+
 
     .warning_left{
         position: absolute;
@@ -164,4 +132,4 @@ export default {
     }
 
 
-</style>
+</style>

+ 178 - 127
src/views/SentryCockpit.vue

@@ -5,25 +5,25 @@
 		<div class="con_left con_left_js">
 			<div class="list_tit">基本信息</div>
 			<div class="info-list_left">
-				<p>用户总数:257005户</p>
-				<p>管线总长:930公里</p>
-				<p>商业用户:3999户 </p>
-				<p>中压长度:186.707公里</p>
-				<p>居民用户:252906户 </p>
-				<p>次高压长度:65.9公里</p>
-				<p>工业用户:100户 </p>
-				<p>低压长度:577公里</p>
+				<p>用户总数:{{totalUsers}}户</p>
+				<p>管线总长:{{totalLength}}公里</p>
+				<p>商业用户:{{businessUsers}}户 </p>
+				<p>中压长度:{{centerPressLength}}公里</p>
+				<p>居民用户:{{civilUsers}}户 </p>
+				<p>次高压长度:{{secondaryPressLength}}公里</p>
+				<p>工业用户:{{industryUsers}}户 </p>
+				<p>低压长度:{{lowPressLength}}公里</p>
 			</div>
       <div class="list_tit">监测长度</div>
       <div class="cd_fx" ref="jccd"></div>
         <div class="list_tit">图层控制</div>
-        <div class="map_tab">
-            <span v-for="(item,index) in tabList"
-                  :key="index"
-                  :class="{on:currentClass==index}"
-                  @click="toggleTab(index)">{{item}}</span>
+<!--        <div class="map_tab">-->
+<!--            <span v-for="(item,index) in tabList"-->
+<!--                  :key="index"-->
+<!--                  :class="{on:currentClass==index}"-->
+<!--                  @click="toggleTab(index)">{{item}}</span>-->
 
-        </div>
+<!--        </div>-->
         <div class="con_tckz_div">
           <div class="tab_con" v-show="currentTab==0">
                 <div class="rq_div tekz_div">
@@ -75,6 +75,7 @@
                   <button class="map_btn_span" @click="choseMeasuringArea()">测面</button>
                   <button class="map_btn_span" @click="choseMeasuringHeight()">测高</button>
                   <button class="map_btn_span" @click="boxSelection()">框选</button>
+<!--                  <button class="map_btn_span" @click="pipeBurstAnalysis()">爆管分析</button>-->
                   <button class="map_btn_span" @click="clearAll()">清除</button>
                   <!--                  <button class="map_btn_span" @click="showExcavationAnalyze()">填挖方分析</button>-->
                 </div>
@@ -129,6 +130,7 @@
                   <button class="map_btn_span" @click="choseMeasuringArea()">测面</button>
                   <button class="map_btn_span" @click="choseMeasuringHeight()">测高</button>
                   <button class="map_btn_span" @click="boxSelection()">框选</button>
+<!--                  <button class="map_btn_span" @click="pipeBurstAnalysis()">爆管分析</button>-->
                   <button class="map_btn_span" @click="clearAll()">清除</button>
                   <!--                  <button class="map_btn_span" @click="showExcavationAnalyze()">填挖方分析</button>-->
                 </div>
@@ -183,6 +185,7 @@
                   <button class="map_btn_span" @click="choseMeasuringArea()">测面</button>
                   <button class="map_btn_span" @click="choseMeasuringHeight()">测高</button>
                   <button class="map_btn_span" @click="boxSelection()">框选</button>
+<!--                  <button class="map_btn_span" @click="pipeBurstAnalysis()">爆管分析</button>-->
                   <button class="map_btn_span" @click="clearAll()">清除</button>
                   <!--                  <button class="map_btn_span" @click="showExcavationAnalyze()">填挖方分析</button>-->
                 </div>
@@ -197,10 +200,11 @@
 			<div class="yh_fx" ref="yhfx"></div>
 			<div class="list_tit">事件分析</div>
       <div class="info-list_right">
-        <p>报警累计:6</p>
-        <p>已处理:6,未处理:0</p>
-        <p>泄露:3,震动:1</p>
-        <p>位移:2,超限:0</p>
+        <p>报警累计:{{eventTotal}}</p>
+        <p>已处理:{{eventTotal}},未处理:0</p>
+        <p style="width:100%">
+          <span style="margin-right: 20px;" v-for="item in eventNumberList">{{item.eventTypeName.substring(0,2)}}:{{item.countSum}}</span>
+        </p>
       </div>
 			<div class="sj_fx" ref="sjfx"></div>
 		</div>
@@ -216,7 +220,11 @@
 		getUserProfile
 	} from "@/api/system/user";
   import {
-    getEventList,
+    getPipeLengthByPressureLevel,
+    userStats
+  } from "@/api/data";
+  import {
+    getEventList, getStatisticByEventType,
     getStatisticByMonth
   } from "@/api/event";
 
@@ -225,12 +233,13 @@
 		selectConfigKey
 	} from "@/api/system/config";
 	import * as echarts from 'echarts'
+  import {countByBrand} from "@/api/sentinel";
 
 
-  const cityOptions1_1 = [{ type: '企业', url: '' }, { type: '厂站', url: '' }, { type: '阀门', url: '' }, { type: '次高压管网', url: '/3D-huashengranqi-2/rest/realspace' }, { type: '中压管网', url: '' }];
-  const cityOptions1_2 = [{ type: '企业', url: '' }, { type: '厂站', url: '' }, { type: '阀门', url: '' }, { type: '次高压管网', url: '/3D-ganghuaranqi/rest/realspace' }, { type: '中压管网', url: '' }];
-  const cityOptions1_3 = [{ type: '企业', url: '' }, { type: '厂站', url: '' }, { type: '阀门', url: '' }, { type: '次高压管网', url: '/3D-aode/rest/realspace' }, { type: '中压管网', url: '' }];
-  const cityOptions1_4 = [{ type: '企业', url: '' }, { type: '厂站', url: '' }, { type: '阀门', url: '' }, { type: '次高压管网', url: '' }, { type: '中压管网', url: '' }];
+  const cityOptions1_1 = [{ type: '企业', url:[] }, { type: '厂站', url:[] },  { type: '次高压管网', url: ['/3D-huashengranqi/rest/realspace','/map-GHRQ/rest/maps/all@huasheng'] }, { type: '中压管网', url:[] }];
+  const cityOptions1_2 = [{ type: '企业', url:[] }, { type: '厂站', url:[] },  { type: '次高压管网', url: ['/3D-GH_tiedong/rest/realspace','/map-GangHua/rest/maps/guandao_cigao@Ganghua_tiedong'] }, { type: '中压管网', url:['/3D-GH_tiedong/rest/realspace','/map-GangHua/rest/maps/guandao_zhong@Ganghua_tiedong'] }];
+  const cityOptions1_3 = [{ type: '企业', url:[] }, { type: '厂站', url:[] },  { type: '次高压管网', url: ['/3D-aode_he/rest/realspace','/map-Aoderanqi/rest/maps/he@aode'] }, { type: '中压管网', url:[] }];
+  const cityOptions1_4 = [{ type: '企业', url:[] }, { type: '厂站', url:[] },  { type: '次高压管网', url: ['/3D-runfa_he/rest/realspace','/map-RunFaRanQi/rest/maps/he@runfa'] }, { type: '中压管网', url:[] }];
 	export default {
 		name: 'SentryCockpit',
 		components: {
@@ -252,13 +261,16 @@
 
 		},
 		mounted() {
+      this.userStats();
+      this.getPipeLengthByPressureLevel();
       this.jccdChart();
 			this.sbfxChart();
-			this.yhfxChart();
 			this.sjfxChart();
+			this.getStatisticByEventType();
 			// 初始化地图数据
 			// this.getSuperMapUrl();
 			setTimeout(() => {
+
 				this.title = '四平市智慧哨兵监管平台'
 			}, 1000);
 
@@ -279,10 +291,52 @@
         currentTab: 0,
         currentClass: 0,
         tabList:[ '四平市', '铁东区', '铁西区'],
+
+        /** 用户数量信息 **/
+        totalUsers:0,
+        businessUsers:0,
+        civilUsers:0,
+        industryUsers:0,
+        /** 用户数量信息 **/
+        /** 管线长度数量信息 **/
+        centerPressLength:0,
+        lowPressLength:0,
+        secondaryPressLengt:0,
+        totalLength:0,
+        /** 管线长度数量信息 **/
+
+        dataValue: this.getCurrentDataStr(new Date()),
+        eventNumberList:[],
+        eventTotal:0,
 			}
 		},
 
 		methods: {
+      getCurrentDataStr(date) {
+        let y = date.getFullYear()
+        let m = date.getMonth() + 1
+        m = m < 10 ? '0' + m : m
+        let d = date.getDate()
+        d = d < 10 ? '0' + d : d
+        return y + '-' + m + '-' + d
+      },
+      userStats(){
+        userStats().then(req => {
+          this.totalUsers=req.data.totalUsers;
+          this.businessUsers=req.data.businessUsers;
+          this.civilUsers=req.data.civilUsers;
+          this.industryUsers=req.data.industryUsers;
+          this.yhfxChart();
+        })
+      },
+      getPipeLengthByPressureLevel(){
+        getPipeLengthByPressureLevel().then(req => {
+          this.totalLength=req.data.totalLength;
+          this.centerPressLength=req.data.centerPressLength;
+          this.lowPressLength=req.data.lowPressLength;
+          this.secondaryPressLength=req.data.secondaryPressLength;
+        })
+      },
       toggleTab(current){
         this.currentTab = current;
         this.currentClass = current;
@@ -315,6 +369,10 @@
       boxSelection() {
         this.$parent.$refs.supermap.boxSelection()
       },
+      //爆管分析
+      pipeBurstAnalysis() {
+        this.$parent.$refs.supermap.pipeBurstAnalysis()
+      },
       //清除
       clearAll() {
         this.$parent.$refs.supermap.closeMeasuringAll()
@@ -411,23 +469,19 @@
           };
         });
         this.option = {
-          legend: {
-            top: "5%",
-            // left: 10,
+          title:{
+            text:'监测长度\n11.83\nkm',
+            left: 'center',
+            top: 'center',
             textStyle: {
               color: "#f2f2f2",
               fontSize: 12,
             },
-            icon: "circle",
-            data: data,
-          },
-          tooltip: {
-            formatter: "<br/>{b}: {c}KM",
           },
           series: [
             // 主要展示层的
             {
-              radius: ["33%", "61%"],
+              radius: ["50%", "90%"],
               center: ["50%", "50%"],
               type: "pie",
               label: {
@@ -451,7 +505,7 @@
             },
             // 边框的设置
             {
-              radius: ["31%", "34%"],
+              radius: ["48%", "60%"],
               center: ["50%", "50%"],
               type: "pie",
               label: {
@@ -478,7 +532,7 @@
             },
             // 中心的圆圈
             {
-              radius: ["26%", "31%"],
+              radius: ["45%", "50%"],
               center: ["50%", "50%"],
               type: "pie",
               label: {
@@ -523,92 +577,78 @@
       },
 			//设备分析
 			sbfxChart() {
-				const chartDom = this.$refs.sbfx;
-				const myChart = echarts.init(chartDom);
-				this.option = {
-					tooltip: {
-						trigger: "item",
-						formatter: "{b} : {c} ({d}%)",
-					},
-
-					visualMap: {
-						show: false,
-						min: 500,
-						max: 600,
-						inRange: {
-							//colorLightness: [0, 1]
-						},
-					},
-					series: [{
-						name: "访问来源",
-						type: "pie",
-						radius: "80%",
-						center: ["50%", "50%"],
-						color: ["rgb(131,249,103)", "#FBFE27", "#FE5050","#1DB7E5"], //'#FBFE27','rgb(11,228,96)','#FE5050'
-						data: [{
-								value: 285,
-								name: "设备1",
-							},
-							{
-								value: 410,
-								name: "设备2",
-							},
-							{
-								value: 274,
-								name: "设备3",
-							},
-							{
-								value: 235,
-								name: "设备4",
-							},
-						].sort(function(a, b) {
-							return a.value - b.value;
-						}),
-						roseType: "radius",
-
-						label: {
-							normal: {
-								formatter: ["{c|{c}}", "{b|{b}}"].join("\n"),
-								rich: {
-									c: {
-										color: "rgb(241,246,104)",
-										fontSize: 20,
-										fontWeight: "bold",
-										lineHeight: 5,
-									},
-									b: {
-										color: "rgb(98,137,169)",
-										fontSize: 15,
-										height: 40,
-									},
-								},
-							},
-						},
-						labelLine: {
-							normal: {
-								lineStyle: {
-									color: "rgb(98,137,169)",
-								},
-								smooth: 0.2,
-								length: 10,
-								length2: 20,
-							},
-						},
-						itemStyle: {
-							normal: {
-								shadowColor: "rgba(0, 0, 0, 0.8)",
-								shadowBlur: 50,
-							},
-						},
-					}, ],
-				};
-
+        countByBrand().then(res => {
+          const data = [];
+          for(let item of res.data){
+            data.push({name:item.brandName,value:item.count})
+          }
+          const chartDom = this.$refs.sbfx;
+          const myChart = echarts.init(chartDom);
+          this.option = {
+            tooltip: {
+              trigger: "item",
+              formatter: "{b} : {c} ({d}%)",
+            },
 
-				myChart.setOption(this.option, true);
-				window.addEventListener("resize", function() {
-					myChart.resize();
-				});
+            visualMap: {
+              show: false,
+              min: 500,
+              max: 600,
+              inRange: {
+              },
+            },
+            series: [{
+              name: "访问来源",
+              type: "pie",
+              radius: "55%",
+              center: ["50%", "50%"],
+              color: ["rgb(131,249,103)", "#FBFE27", "#FE5050","#1DB7E5"], //'#FBFE27','rgb(11,228,96)','#FE5050'
+              data: data.sort(function(a, b) {
+                return a.value - b.value;
+              }),
+              roseType: "radius",
 
+              label: {
+                normal: {
+                  formatter: ["{c|{c}}", "{b|{b}}"].join("\n"),
+                  rich: {
+                    c: {
+                      color: "rgb(241,246,104)",
+                      fontSize: 20,
+                      fontWeight: "bold",
+                      lineHeight: 5,
+                    },
+                    b: {
+                      color: "rgb(98,137,169)",
+                      fontSize: 15,
+                      height: 40,
+                    },
+                  },
+                },
+              },
+              labelLine: {
+                normal: {
+                  lineStyle: {
+                    color: "rgb(98,137,169)",
+                  },
+                  smooth: 0.2,
+                  length: 10,
+                  length2: 20,
+                },
+              },
+              itemStyle: {
+                normal: {
+                  shadowColor: "rgba(0, 0, 0, 0.8)",
+                  shadowBlur: 50,
+                },
+              },
+            }, ],
+          };
+          myChart.setOption(this.option, true);
+          window.addEventListener("resize", function() {
+            myChart.resize();
+          });
+        })
 			},
 			//用户分析
 			yhfxChart() {
@@ -629,15 +669,15 @@
 					yData = [];
 				var data = [{
 						name: "商业用户",
-						value: 3999,
+						value: this.businessUsers,
 					},
 					{
 						name: "居民用户",
-						value: 252906,
+						value: this.civilUsers,
 					},
 					{
 						name: "工业用户",
-						value: 100,
+						value: this.industryUsers,
 					},
 				];
 				data.map((a, b) => {
@@ -714,7 +754,7 @@
 						data: data,
 					},
 					tooltip: {
-						formatter: "{a}:<br/>{b}: {c}",
+						formatter: "{a}:<br/>{b}: {c}",
 					},
 					series: [
 						// 主要展示层的
@@ -813,15 +853,24 @@
 				});
 
 			},
-			//事件分析
+      //事件分析
+      getStatisticByEventType(){
+        getStatisticByEventType({createTimeRange:this.dataValue+","+this.dataValue}).then(req => {
+          this.eventNumberList = req.data;
+          this.eventTotal = 0;
+          for(let item of req.data){
+            this.eventTotal += item.countSum
+          }
+        })
+      },
+
 			sjfxChart() {
         let that = this;
         getStatisticByMonth().then(res => {
-
           const chartDom = that.$refs.sjfx;
           const myChart = echarts.init(chartDom);
           var xData = res.data.categories[0];
-          var color = ["#1a9bfc", "#99da69", "#e32f46", "#7049f0", "#fa704d", "#01babc"];
+          var color = ["#1a9bfc", "#99da69", "#e32f46", "#7049f0", "#fa704d", "#01babc","#1a9bfc", "#99da69", "#e32f46", "#7049f0", "#fa704d", "#01babc"];
 
           var name = [];
           var data = [];
@@ -983,7 +1032,9 @@
 		background-color: rgba(20, 107, 115, 0.3);
 		color: #fff;
 	}
-
+  .el-checkbox__label{
+    color: #ffffff;
+  }
 
 	.hz_body {
 		position: relative;

+ 20 - 17
src/views/SentryEmergencyCenter.vue

@@ -350,7 +350,6 @@
     } from "@/api/event.js"
 	import {
 		listDeviceAll,
-		selectBrandList,
 		selectByDeviceId,
 		selectDailyThreshold
 	} from "@/api/sentinel"
@@ -380,21 +379,7 @@
 			}
 		},
 		created() {
-            this.getEventList()
-			this.getPlanList()
-			// 查询品牌
-			selectBrandList().then(res => {
-				if(res.data){
-					let brandoptions = []
-					res.data.forEach(e => {
-						brandoptions.push({
-							value:e,
-							label:e
-						})
-					})
-					this.options = brandoptions
-				}
-			})
+			this.getListDeviceAll()
 		},
 		mounted() {
 			// 初始化地图数据
@@ -781,7 +766,9 @@
 				let xdata = data.time //x轴
 				let dataArr = data.value //value
 				let dashedArr = data.threshold
-				let titleName = "阈值";
+				let dashedArr1 = data.threshold
+				let titleName = "告警阈值";
+				let titleName1 = "紧急阈值";
 				let titleNames = "实际值";
 				let option = {
 					backgroundColor: "rgba(25,44,59,.4)",
@@ -899,6 +886,22 @@
 							data: dashedArr,
 						},
 						{
+							name: titleName1,
+							type: "line",
+							smooth: true,
+							symbol: "none",
+							itemStyle: {
+								normal: {
+									lineStyle: {
+										type: "dashed",
+									},
+									color: "#f6502b", //拐点的颜色
+									borderColor: "#f6502b", //拐点边框的颜色
+								},
+							},
+							data: dashedArr1,
+						},
+						{
 							name: titleNames,
 							type: "line",
 							stack: "总量",

+ 21 - 3
src/views/SentryPage.vue

@@ -317,9 +317,11 @@
 				const myChart = echarts.init(document.getElementById('sbxqChart'))
 				let xdata = data.time //x轴
 				let dataArr = data.value //value
-				let dashedArr = data.threshold
-				let titleName = "阈值";
-				let titleNames = "实际值";
+        let dashedArr = data.threshold
+        let dashedArr1 = data.urgent
+        let titleName = "告警阈值";
+        let titleName1 = "紧急阈值";
+        let titleNames = "实际值";
 				let option = {
 					backgroundColor: "rgba(25,44,59,.4)",
 					grid: {
@@ -435,6 +437,22 @@
 							},
 							data: dashedArr,
 						},
+            {
+              name: titleName1,
+              type: "line",
+              smooth: true,
+              symbol: "none",
+              itemStyle: {
+                normal: {
+                  lineStyle: {
+                    type: "dashed",
+                  },
+                  color: "#f6502b", //拐点的颜色
+                  borderColor: "#f6502b", //拐点边框的颜色
+                },
+              },
+              data: dashedArr1,
+            },
 						{
 							name: titleNames,
 							type: "line",

+ 117 - 269
src/views/useCenter.vue

@@ -4,22 +4,24 @@
     <!--主体-->
     <div class="con_left">
       <div style="color: #FFF;display: flex;justify-content: space-between">
-        <div class="left-top-botton " :class="index === botIndex ? 'active':''" v-for="(item,index) in enterpriseList"
-             @click="botIndex = index">{{ item }}
+        <div class="left-top-botton " :class="item.id === botIndex ? 'active':''" v-for="(item,index) in enterpriseList"
+             @click="getCommunityByDeptId(item.id)">{{ item.name }}
         </div>
       </div>
       <el-input
-        placeholder="请输入用户姓名"
+        placeholder="请输入小区名称"
         suffix-icon="el-icon-search"
         v-model="input1">
       </el-input>
       <dl class="sp_list">
-        <dt><span class="dt1" style="width: 180px">名称</span><span class="dt2" style="width: 120px">用户数量</span>
+        <dt><span class="dt1" style="width: 150px!important">名称</span><span class="dt2" style="width: 100px!important">用户数量</span><span class="dt3" style="width: 30px!important">定位</span>
         </dt>
         <div class="hei_scroll" style="height: 46vh">
-          <dd v-for="item in 30">
-            <span class="dt1" style="width: 180px">xxxxxxxxx-{{ item }}</span>
-            <span class="dt2" style="width: 120px">1212</span>
+          <dd v-for="item in communityList">
+            <span class="dt1" style="width: 150px!important">{{ item.communityName }}</span>
+            <span class="dt2" style="width: 100px!important">{{ item.personNum }}</span>
+            <span class="dt3" style="width: 30px!important" @click="dropLocation(item.latitude,item.longitude)"><img
+              src="../assets/images/sentinel/hz_list_d.png"/></span>
           </dd>
         </div>
       </dl>
@@ -30,7 +32,7 @@
       <img src="../assets/images/sentinel/hz_qy.png" class="qydw1"/>
       <img src="../assets/images/sentinel/hz_qy.png" class="qydw2"/>
       <img src="../assets/images/sentinel/hz_qy.png" class="qydw3"/>
-      <div class="tk_div">
+      <div class="tk_div" v-if="false">
         <div class="tk1 tk_bor">
           <h1>用户信息<i>使用中</i></h1>
           <p>用户名称:XXXXXXXXXXX</p>
@@ -47,62 +49,36 @@
         </div>
       </div>
       <!--弹框演示模板 结束-->
-
-
-      <!-- 地图 -->
-      <supermap ref="supermap" style="width: 100%;height: 100vh;">
-      </supermap>
     </div>
     <div class="con_right">
       <div class="list_tit">用户列表</div>
-      <el-select v-model="value" placeholder="请选择">
-        <el-option
-          v-for="item in options"
-          :key="item.value"
-          :label="item.label"
-          :value="item.value">
-        </el-option>
-      </el-select>
-      <el-input
-        placeholder="请输入用户姓名"
-        suffix-icon="el-icon-search"
-        v-model="input1">
-      </el-input>
+      <div style="display: flex; gap: 10px;">
+        <el-input
+          placeholder="请输入用户姓名"
+          suffix-icon="el-icon-search"
+          v-model="input1">
+          style="flex: 1;">
+        </el-input>
+      </div>
+
       <dl class="sp_list">
-        <dt><span class="dt1">序号</span><span class="dt2">用户</span><span class="dt3">定位</span></dt>
+        <dt>
+          <span class="dt1" style="width: 80px!important;">序号</span>
+          <span class="dt2" style="width: 80px!important;">用户</span>
+          <span class="dt3" style="width: 80px!important;">手机号码</span>
+        </dt>
         <div class="hei_scroll hei56">
-          <dd><span class="dt1">0101</span><span class="dt2">王大力</span><span class="dt3"><img
-            src="../assets/images/sentinel/hz_list_d.png"/></span></dd>
-          <dd><span class="dt1">0102</span><span class="dt2">王大力</span><span class="dt3"><img
-            src="../assets/images/sentinel/hz_list_d.png"/></span></dd>
-          <dd><span class="dt1">0103</span><span class="dt2">王大力</span><span class="dt3"><img
-            src="../assets/images/sentinel/hz_list_d.png"/></span></dd>
-          <dd><span class="dt1">0104</span><span class="dt2">王大力</span><span class="dt3"><img
-            src="../assets/images/sentinel/hz_list_d.png"/></span></dd>
-          <dd><span class="dt1">0105</span><span class="dt2">王大力</span><span class="dt3"><img
-            src="../assets/images/sentinel/hz_list_d.png"/></span></dd>
-          <dd><span class="dt1">0101</span><span class="dt2">王大力</span><span class="dt3"><img
-            src="../assets/images/sentinel/hz_list_d.png"/></span></dd>
-          <dd><span class="dt1">0102</span><span class="dt2">王大力</span><span class="dt3"><img
-            src="../assets/images/sentinel/hz_list_d.png"/></span></dd>
-          <dd><span class="dt1">0103</span><span class="dt2">王大力</span><span class="dt3"><img
-            src="../assets/images/sentinel/hz_list_d.png"/></span></dd>
-          <dd><span class="dt1">0104</span><span class="dt2">王大力</span><span class="dt3"><img
-            src="../assets/images/sentinel/hz_list_d.png"/></span></dd>
-          <dd><span class="dt1">0105</span><span class="dt2">王大力</span><span class="dt3"><img
-            src="../assets/images/sentinel/hz_list_d.png"/></span></dd>
-          <dd><span class="dt1">0102</span><span class="dt2">王大力</span><span class="dt3"><img
-            src="../assets/images/sentinel/hz_list_d.png"/></span></dd>
-          <dd><span class="dt1">0103</span><span class="dt2">王大力</span><span class="dt3"><img
-            src="../assets/images/sentinel/hz_list_d.png"/></span></dd>
-          <dd><span class="dt1">0104</span><span class="dt2">王大力</span><span class="dt3"><img
-            src="../assets/images/sentinel/hz_list_d.png"/></span></dd>
+          <dd v-for="(e,idx) in userListSearch" :key="idx">
+            <span class="dt1" style="width: 80px!important;">{{ idx + 1 }}</span>
+            <span class="dt2" style="width: 80px!important;">{{ e.name }}</span>
+            <span class="dt2" style="width: 80px!important;">{{ e.number }}</span>
+          </dd>
         </div>
       </dl>
       <el-pagination
         background
         layout="prev, pager, next"
-        :total="100">
+        :total="10">
       </el-pagination>
     </div>
   </div>
@@ -110,20 +86,17 @@
 
 <script>
 import Cookies from 'js-cookie'
-import supermap from '@/components/supermap-2.5d' //超图
-import {getUserProfile} from "@/api/system/user";
-
 import '../assets/styles/hz_body.css';
 
 import {
   selectConfigKey
 } from "@/api/system/config";
+import { userStats,getCommunityByDeptId } from '@/api/data'
 // import * as echarts from 'echarts'
 let echarts = require("echarts");
 export default {
   name: 'MyChart',
   components: {
-    supermap,
   },
   metaInfo() {
     return {
@@ -141,14 +114,11 @@ export default {
 
   },
   mounted() {
-    // 初始化地图数据
-    this.getSuperMapUrl();
-    this.getSuperMapUrl();
     setTimeout(() => {
       this.title = '四平市智慧哨兵监管平台'
-      this.chart();
-      this.initChart();
     }, 1000);
+    this.userStats();
+    this.getCommunityByDeptId(314459);
   },
   data() {
     return {
@@ -158,28 +128,79 @@ export default {
       input: '',
       input1: '',
       title: '四平市智慧哨兵监管平台',
-      enterpriseList: ["奥德", "华生", "港华", "润发"],
-      options: [
-        {
-          value: '选项1',
-          label: '华生1'
-        }, {
-          value: '选项2',
-          label: '华生2'
-        }, {
-          value: '选项3',
-          label: '华生3'
-        }, {
-          value: '选项4',
-          label: '华生4'
-        }, {
-          value: '选项5',
-          label: '华生5'
-        }],
-      value: ''
+      enterpriseList: [
+        {name:'华生',id:314459},
+        {name:'港华',id:314462},
+        {name:'奥德',id:314453},
+        {name:'润发',id:314454},
+      ],
+      communityList:[],
+      userListSearch:[
+        {name:'张利',number:'15602523655'},
+        {name:'李明',number:'13812345678'},
+        {name:'王芳',number:'13923456789'},
+        {name:'刘洋',number:'13734567890'},
+        {name:'陈静',number:'13645678901'},
+        {name:'杨帆',number:'13556789012'},
+        {name:'赵敏',number:'13467890123'},
+        {name:'黄勇',number:'13378901234'},
+        {name:'周杰',number:'13289012345'},
+        {name:'吴娜',number:'13190123456'},
+        {name:'徐强',number:'13001234567'},
+        {name:'孙丽',number:'18912345678'},
+        {name:'马超',number:'18823456789'},
+        {name:'朱琳',number:'18734567890'},
+        {name:'胡斌',number:'18645678901'},
+        {name:'林涛',number:'18556789012'},
+        {name:'何敏',number:'18467890123'},
+        {name:'郭伟',number:'18378901234'},
+        {name:'罗娜',number:'18289012345'},
+        {name:'高飞',number:'18190123456'}
+      ],
+      /** 用户数量信息 **/
+      totalUsers:0,
+      businessUsers:0,
+      civilUsers:0,
+      industryUsers:0,
     }
   },
   methods: {
+    getCommunityByDeptId(id){
+      let that = this;
+      getCommunityByDeptId(id).then(req => {
+        that.botIndex=id
+        that.communityList = req.data;
+        const markersList = []
+        if (req.data != null && req.data.length > 0) {
+          for (let i = 0; i < req.data.length; i++) {
+            let markersMap = {
+              lng: 124.59,
+              lat: 43.02,
+              icon: 'area',
+              bindPopupHtml: '',
+              click: 'openDetails',
+              parameter: req.data[i],
+              keepBindPopup: false,
+              isAggregation: false
+            }
+            markersMap.lng = req.data[i].longitude
+            markersMap.lat = req.data[i].latitude
+            markersList.push(markersMap);
+          }
+          setTimeout(() => {
+            that.$parent.$refs.supermap.clearM()
+            that.$parent.$refs.supermap.setMarkers(markersList)
+          }, 1000)
+        } else {
+          setTimeout(() => {
+            that.$parent.$refs.supermap.clearM()
+          }, 1000)
+        }
+      })
+    },
+    dropLocation(lat, lng) {
+      this.$parent.$refs.supermap.dropLocation(lat*1, lng*1)
+    },
     //设备分析
     chart() {
       const chartDom = this.$refs.chart;
@@ -206,16 +227,16 @@ export default {
             "#1DB7E5"
           ], //'#FBFE27','rgb(11,228,96)','#FE5050'
           data: [{
-            value: 285,
-            name: "商业",
+            name: "商业用户",
+            value: this.businessUsers,
           },
             {
-              value: 410,
-              name: "工业",
+              name: "居民用户",
+              value: this.civilUsers,
             },
             {
-              value: 274,
-              name: "居民",
+              name: "工业用户",
+              value: this.industryUsers,
             },
           ].sort(function (a, b) {
             return a.value - b.value;
@@ -264,191 +285,18 @@ export default {
       });
 
     },
-    getSuperMapUrl() {
-      getUserProfile().then(response => {
-        let mapDeptId = response.mapDeptId
-        let num = 0;
-        if (mapDeptId == "365") {
-          num = 0;
-        } else if (mapDeptId == "369") {
-          num = 1;
-        } else if (mapDeptId == "371") {
-          num = 2;
-        } else if (mapDeptId == "373") {
-          num = 3;
-        } else if (mapDeptId == "372") {
-          num = 4;
-        } else if (mapDeptId == "370") {
-          num = 5;
-        }
-        this.$refs.supermap.removeAllviewer(mapDeptId, -1);
-      });
+    userStats(){
+      userStats().then(req => {
+        this.totalUsers=req.data.totalUsers;
+        this.businessUsers=req.data.businessUsers;
+        this.civilUsers=req.data.civilUsers;
+        this.industryUsers=req.data.industryUsers;
+        this.chart();
+      })
     },
     toggleDisplay() {
       this.isVisible = !this.isVisible; // 点击按钮时切换isVisible的值
     },
-    initChart() {
-      // 基于准备好的dom,初始化echarts实例
-      const myChart = echarts.init(this.$refs.myChart)
-      let xdata = [
-        "B4",
-        "B3",
-        "C4",
-        "A1",
-        "E2",
-        "C1",
-        "D1",
-        "A3",
-        "E3",
-        "A2",
-        "D2",
-        "C2",
-        "D3",
-        "D4",
-        "B2",
-        "A4",
-        "C3",
-        "E1",
-        "B1",
-      ]; //x轴
-      let dataArr = [
-        4000, 4200, 3800, 3500, 4100, 4150, 4800, 4000, 3200, 3600, 3200, 3100, 4700,
-        3500, 4600, 4500, 3900, 4700, 3400,
-      ]; //value
-      let dashedArr = [
-        4000, 4000, 4000, 4000, 4000, 4000, 4000, 4000, 4000, 4000, 4000, 4000, 4000,
-        4000, 4000, 4000, 4000, 4000, 4000,
-      ];
-      let titleName = "预期值";
-      let titleNames = "各馆实际承载力";
-      let option = {
-        backgroundColor: "#11183c",
-        grid: {
-          left: "5%",
-          bottom: "10%",
-          top: "18%",
-          containLabel: true,
-        },
-        tooltip: {
-          trigger: "axis",
-          axisPointer: {
-            type: "shadow",
-          },
-        },
-        legend: {
-          show: true,
-          x: "center",
-          y: 60,
-          textStyle: {
-            color: "#fff", // 图例文字颜色
-            fontSize: 16,
-          },
-        },
-        xAxis: {
-          type: "category",
-          boundaryGap: false,
-          data: xdata,
-          axisLabel: {
-            show: true,
-            textStyle: {
-              color: "#fff",
-            },
-          },
-          axisLine: {
-            lineStyle: {
-              color: "transparent",
-              width: 2, //这里是为了突出显示加上的
-            },
-          },
-        },
-        yAxis: [
-          {
-            type: "value",
-            name: "立方米",
-            nameTextStyle: {
-              color: "#fff",
-            },
-            min: 0,
-            max: 6000,
-            axisLabel: {
-              formatter: "{value}",
-              textStyle: {
-                color: "#fff",
-              },
-            },
-            axisLine: {
-              lineStyle: {
-                color: "transparent",
-                width: 2, //这里是为了突出显示加上的
-              },
-            },
-            axisTick: {
-              show: false,
-            },
-            splitLine: {
-              show: true,
-              lineStyle: {
-                color: "#11366e",
-              },
-            },
-          },
-        ],
-        series: [
-          {
-            name: titleName,
-            type: "line",
-            smooth: true,
-            symbol: "none",
-            itemStyle: {
-              normal: {
-                lineStyle: {
-                  type: "dashed",
-                },
-                color: "#01F699", //拐点的颜色
-                borderColor: "#01F699", //拐点边框的颜色
-              },
-            },
-            data: dashedArr,
-          },
-          {
-            name: titleNames,
-            type: "line",
-            stack: "总量",
-            smooth: true, //平滑曲线显示
-            symbol: "circle", //标记的图形为实心圆
-            symbolSize: 8,
-            itemStyle: {
-              normal: {
-                color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [
-                  {
-                    offset: 0,
-                    color: "rgba(3,191,255,1)",
-                  },
-                  {
-                    offset: 1,
-                    color: "rgba(18,93,236,1)",
-                  },
-                ]),
-                areaStyle: {
-                  color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
-                    {
-                      offset: 0,
-                      color: "rgba(3,191,255,.3)",
-                    },
-                    {
-                      offset: 1,
-                      color: "rgba(18,93,236,.3)",
-                    },
-                  ]),
-                },
-              },
-            },
-            data: dataArr,
-          },
-        ],
-      };
-      myChart.setOption(option);
-    }
   },
 }
 </script>