소스 검색

监督检查撒点

wangtao 1 년 전
부모
커밋
52bc6c729b
6개의 변경된 파일134개의 추가작업 그리고 90개의 파일을 삭제
  1. 36 23
      src/components/mixins/map-data1.js
  2. 1 1
      src/http/api.js
  3. 60 60
      src/http/axios.js
  4. 4 4
      src/store/modules/public.js
  5. 32 2
      src/views/security-plan.vue
  6. 1 0
      src/views/self-management.vue

+ 36 - 23
src/components/mixins/map-data1.js

@@ -226,24 +226,11 @@ export default {
                                         },
                                         click: regionLocateCallBack,
                                         style: {
-                                            color: name[index] == "华漕镇处置网格二(纪王西片区)" ? "#2c6395" : 
-                                            name[index] == "华漕镇处置网格一(纪王东片区)" ? "#1b6cb6" : 
-                                            name[index] == "华漕镇处置网格四(诸翟北片区)" ? "#40a4ff" : 
-                                            name[index] == "华漕镇处置网格五(诸翟南片区)" ? "#8ac7ff" : 
-                                            name[index] == "华漕镇处置网格三(老华漕片区)" ? "#b1cce5" : 
-                                            name[index] == "新虹街道处置网格二(爱博)" ? "#a03523" : 
-                                            name[index] == "新虹街道处置网格三(华美)" ? "#d71e00" : 
-                                            name[index] == "新虹街道处置网格一(枢纽)" ? "#ffa192" : 
-                                            name[index] == "新虹街道处置网格四(航华)" ? "#dba197" : 
-                                            name[index] == "七宝镇处置网格一(七宝北片网格)" ? "#009081" : 
-                                            name[index] == "七宝镇处置网格二(七宝中片网格)" ? "#00ae9c" : 
-                                            name[index] == "七宝镇处置网格五(航华网格)" ? "#50ffed" : 
-                                            name[index] == "虹桥镇处置网格四(紫藤、红松区域)" ? "#b2ec0a" : 
-                                            name[index] == "虹桥镇处置网格二(虹梅区域)" ? "#b2ec4a" : "#729900",
+                                            color: name[index] == "华漕镇处置网格二(纪王西片区)" ? "#2c6395" : name[index] == "华漕镇处置网格一(纪王东片区)" ? "#1b6cb6" : name[index] == "华漕镇处置网格四(诸翟北片区)" ? "#40a4ff" : name[index] == "华漕镇处置网格五(诸翟南片区)" ? "#8ac7ff" : name[index] == "华漕镇处置网格三(老华漕片区)" ? "#b1cce5" : name[index] == "新虹街道处置网格二(爱博)" ? "#a03523" : name[index] == "新虹街道处置网格三(华美)" ? "#d71e00" : name[index] == "新虹街道处置网格一(枢纽)" ? "#ffa192" : name[index] == "新虹街道处置网格四(航华)" ? "#dba197" : name[index] == "七宝镇处置网格一(七宝北片网格)" ? "#009081" : name[index] == "七宝镇处置网格二(七宝中片网格)" ? "#00ae9c" : name[index] == "七宝镇处置网格五(航华网格)" ? "#50ffed" : name[index] == "虹桥镇处置网格四(紫藤、红松区域)" ? "#b2ec0a" : name[index] == "虹桥镇处置网格二(虹梅区域)" ? "#b2ec4a" : "#729900",
                                             transparency: 0.6,
                                             outline: true,
                                             outlineColor: 'blue',
-                            
+
                                             // "#4d6700",
                                             // "#729900",
                                         }
@@ -593,12 +580,12 @@ export default {
          */
         addMarker(lnglats, pageType, type) {
             console.log(lnglats, pageType, type)
-            // if(pageType == "security-plan"){
+                // if(pageType == "security-plan"){
 
             // }else{
-                window.jMap.Locate.clearLocate();
+            window.jMap.Locate.clearLocate();
             // }
-            
+
             let that = this
             let icon = "";
             let arr = []
@@ -671,7 +658,7 @@ export default {
 
                                 type == "高风险" ? this.stores.sadianIcon.gfx : type == "较高风险" ? this.stores.sadianIcon.jgfx : type == "一般风险" ? this.stores.sadianIcon.ybfx : type == "低风险" ? this.stores.sadianIcon.dfx :
 
-                                type == "单位巡检" ? this.stores.sadianIcon.dwxj : type == "物联网设备" ? this.stores.sadianIcon.dwxj : type == "监控视频" ? this.stores.sadianIcon.ssjq :
+                                type == "单位巡检" ? this.stores.sadianIcon.dwxj : type == "物联网设备" ? this.stores.sadianIcon.dwxj : type == "监控视频" ? this.stores.sadianIcon.ssjq : type == "监督检查" ? this.stores.sadianIcon.jdjc :
 
 
                                 this.stores.sadianIcon.trsy,
@@ -1020,14 +1007,14 @@ export default {
                             // if (val._attrbutes.type != "国家会展中心") {
                             //     this.popup(val._attrbutes, arrayList, true)
                             // }
-                            if(type == "监控视频"){
-                                  let arrayList = [{
+                            if (type == "监控视频") {
+                                let arrayList = [{
                                     title: ["监控视频", true],
                                     children: [
                                         ["监控名称:", val.attrbutes.name, 24],
                                         ["监控地址:", val.attrbutes.installPlace, 24],
                                     ],
-                                    url:val.attrbutes.viewUrl,
+                                    url: val.attrbutes.viewUrl,
                                     id: val.attrbutes.id
                                 }, ];
                                 that.stores.jkspChange(arrayList);
@@ -1036,6 +1023,31 @@ export default {
                                 //     this.popup(val._attrbutes, arrayList, true)
                                 // }
                             }
+                            console.log(type)
+                            if (type == "监督检查") {
+                                console.log(val.attrbutes)
+                                let arrayList = [{
+                                    title: ["监督检查", true],
+                                    children: [
+                                        ["检查员名称:", val.attrbutes.checkName, 24],
+                                        ["检查人员所属单位:", val.attrbutes.subordinateCompany, 24],
+                                        ["检查时间:", val.attrbutes.checkTime, 24],
+                                        ["单位类型:", val.attrbutes.companyType, 24],
+                                        ["单位使用性质:", val.attrbutes.companyUseNature, 24],
+                                        ["单位法人:", val.attrbutes.companyName, 24],
+                                        ["单位(场所)实际名称:", val.attrbutes.companyActualName, 24],
+                                        ["网格号:", val.attrbutes.gridNum, 24],
+                                        ["所辖派出所:", val.attrbutes.subordinatePoliceStation, 24],
+                                        ["街镇:", val.attrbutes.street, 24],
+                                        ["单位地址:", val.attrbutes.companyAddress, 24],
+                                        ["消防安全责任人姓名:", val.attrbutes.fireDutyName, 24],
+                                        ["消防安全管理人姓名:", val.attrbutes.fireManageName, 24],
+                                        ["联系电话:", val.attrbutes.phone, 24],
+                                        // ["隐患图片:", val.attrbutes.hiddImage ? JSON.parse(val.attrbutes.hiddImage) : NULL, 24],
+                                    ],
+                                }, ];
+                                this.popup(val._attrbutes, arrayList, true)
+                            }
                         }
                         //火灾数据分析
                         if (pageType == "fire-data-analysis") {
@@ -1657,12 +1669,13 @@ export default {
                     }
                     for (let i = 0; i < arrayList[0].children.length; i++) {
                         if (arrayList[0].children[i][1]) {
+
                             let textWrap = document.createElement('div');
                             textWrap.setAttribute('style', 'font-size:14px;color:#fff;line-height:25px;');
                             let p1 = document.createElement('span');
                             p1.setAttribute('style', 'color:#73fbfd;');
                             p1.innerHTML = arrayList[0].children[i][0]
-
+                                // if()
                             let p2 = document.createElement('span');
                             p2.setAttribute('style', 'color:#fff;word-break:break-all !important');
                             p2.innerHTML = arrayList[0].children[i][1]

+ 1 - 1
src/http/api.js

@@ -19,7 +19,7 @@ let api = {
         adLicenseStatistic: "/prod-api/service-fire/demNewLaw/adLicenseStatistic", //行政许可情况统计
         fireStatisticCollect: "/prod-api/service-fire/demFireStatisticsAttach/fireStatisticCollect", //火灾信息统计
         fireStatisticScattor: "/prod-api/service-fire/demFireStatisticsAttach/fireStatisticScattor", //亡人、伤人撒点
-
+        fireSafetyInspectionScatter: "/prod-api/service-fire/demFireSafetyInspection/fireSafetyInspectionScatter", //监督检查撒点
 
     },
     siaeall: {

+ 60 - 60
src/http/axios.js

@@ -1,72 +1,72 @@
 import axios from "axios";
 import { ElMessage } from "element-plus";
 if (process.env.NODE_ENV !== "development") {
-  axios.defaults.baseURL = process.env.VUE_APP_BASE_URL;
-  axios.defaults.timeout = 15000
+    axios.defaults.baseURL = process.env.VUE_APP_BASE_URL;
+    axios.defaults.timeout = 50000
 }
 // console.log( axios.defaults)
 // 请求拦截
 axios.interceptors.request.use(
-  (config) => {
-    // 1. 这个位置是请求前最后的配置
-    // 2. 当然你也可以在这个位置 加入你的后端需要的用户授权信息
-    // 	config.headers.authorization = `Bearer ${localStorage.getItem('token')}`
-    return config;
-  },
-  (error) => {
-    return Promise.reject(error);
-  }
+    (config) => {
+        // 1. 这个位置是请求前最后的配置
+        // 2. 当然你也可以在这个位置 加入你的后端需要的用户授权信息
+        // 	config.headers.authorization = `Bearer ${localStorage.getItem('token')}`
+        return config;
+    },
+    (error) => {
+        return Promise.reject(error);
+    }
 );
 
 // 响应拦截
 axios.interceptors.response.use(
-  (response) => {
-    // 请求成功
-    // 1. 根据自己项目需求定制自己的拦截
-    // 2. 然后返回数据
-    // console.log(response)
-    if (response.data.status === "SUCCESS" || response.data.showapi_res_code === 0) {
-      return response.data;
-    } else if (response.data.status === 200) {
-      return response.data.result;
-    } else if (response.status === 200 || response.code == 200) {
-      return response.data;
-    } else {
-      ElMessage({
-        showClose: true,
-        message: response.data.msg || response.data.msg,
-        type: "error",
-      });
-      return {};
-    }
-  },
-  (error) => {
-    // 请求失败
-    if (error && error.response) {
-      ElMessage({
-        showClose: true,
-        message: error.response.data.msg || error.response.data.msg,
-        type: "error",
-      });
-      return {};
-      // switch (error.response.status) {
-      //     case 400:
-      //         console.log('400错误')
-      //         break
-      //     case 401:
-      //         console.log('401错误')
-      //         break
-      //     case 500:
-      //         ElMessage({
-      //             showClose: true,
-      //             message: error.response.data.msg || error.response.data.msg,
-      //             type: 'error'
-      //         });
-      //         break
-      //     default:
-      //         // 如果以上都不是的处理
-      //         return Promise.reject(error);
-      // }
+    (response) => {
+        // 请求成功
+        // 1. 根据自己项目需求定制自己的拦截
+        // 2. 然后返回数据
+        // console.log(response)
+        if (response.data.status === "SUCCESS" || response.data.showapi_res_code === 0) {
+            return response.data;
+        } else if (response.data.status === 200) {
+            return response.data.result;
+        } else if (response.status === 200 || response.code == 200) {
+            return response.data;
+        } else {
+            ElMessage({
+                showClose: true,
+                message: response.data.msg || response.data.msg,
+                type: "error",
+            });
+            return {};
+        }
+    },
+    (error) => {
+        // 请求失败
+        if (error && error.response) {
+            ElMessage({
+                showClose: true,
+                message: error.response.data.msg || error.response.data.msg,
+                type: "error",
+            });
+            return {};
+            // switch (error.response.status) {
+            //     case 400:
+            //         console.log('400错误')
+            //         break
+            //     case 401:
+            //         console.log('401错误')
+            //         break
+            //     case 500:
+            //         ElMessage({
+            //             showClose: true,
+            //             message: error.response.data.msg || error.response.data.msg,
+            //             type: 'error'
+            //         });
+            //         break
+            //     default:
+            //         // 如果以上都不是的处理
+            //         return Promise.reject(error);
+            // }
+        }
     }
-  }
-);
+);

+ 4 - 4
src/store/modules/public.js

@@ -196,16 +196,16 @@ const useStore = defineStore("public", {
         xfzfdt: {}, //执法记录仪
         arrayList: [], //撒点弹框数据存储,
         gridData: {},
-        jkspData:{},//监控视频数据
+        jkspData: {}, //监控视频数据
     }),
     actions: {
         gridDataChange(data) {
             this.gridData = data
-            console.log(123,data)
+            console.log(123, data)
         },
-        jkspChange(data){
+        jkspChange(data) {
             this.jkspData = data[0]
-            console.log(234,this.jkspData)
+            console.log(234, this.jkspData)
         },
 
         /**

+ 32 - 2
src/views/security-plan.vue

@@ -263,10 +263,14 @@
                                 <img :src="stores.sadianIcon.zddw" alt="" />
                                 <span>小网格</span>
                             </div>
-                            <div @click="checkboxChange(17)" :class="checkedArray.checkedData[0] == 2 ? 'checkTypeSelect' : ''">
+                            <div @click="checkboxChange(17)" :class="checkedArray.checkedData[0] == 17 ? 'checkTypeSelect' : ''">
                                 <img :src="stores.sadianIcon.ssjq" alt="" />
                                 <span>监控视频</span>
                             </div>
+                            <div @click="checkboxChange(18)" :class="checkedArray.checkedData[0] == 18 ? 'checkTypeSelect' : ''">
+                                <img :src="stores.sadianIcon.jdjc" alt="" />
+                                <span>监督检查</span>
+                            </div>
                         </div>
                     </div>
                 </div>
@@ -859,6 +863,8 @@ export default {
                     { value: 15, label: "中网格" },
                     { value: 16, label: "小网格" },
                     { value: 17, label: "监控视频" },
+                    { value: 18, label: "监督检查" },
+                    
                     
                 ],
             }, //类型筛选
@@ -1520,7 +1526,13 @@ export default {
          * 撒点测绘院、高德
          */
         sadianSelect(id) {
-            let type = this.checkedArray.checkedList[this.checkedArray.checkedData[0]].label;
+                let type = undefined
+            for(let i =0;i<this.checkedArray.checkedList.length;i++){
+                if(id ==this.checkedArray.checkedList[i].value ){
+                        type = this.checkedArray.checkedList[i].label
+                        // this.checkedSelectLabel = type
+                }
+            }
             let that = this;
             let arr = [];
             if (this.stroes.$state.mapBool == 1) {
@@ -1758,6 +1770,24 @@ export default {
                             this.addMarker(arr, "rescue-station", "街镇专职消防队");
                         });
                 }
+                if (id == 18) {
+                        this.$axios
+                        .get(this.$api.fire.fireSafetyInspectionScatter)
+                        .then((res) => {
+                            console.log(123,res)
+                            for(let i =0;i<res.data.length;i++){
+                                res.data[i].type = "监督检查"
+                                arr.push(res.data[i])
+                            }
+                            let data = {
+                                gisX: 121.302183,
+                                gisY: 31.189991,
+                                type: "国家会展中心",
+                            };
+                            arr.push(data);
+                            this.addMarker(arr, "security-plan", "监督检查");
+                        });
+                }
             }
         },
         /**

+ 1 - 0
src/views/self-management.vue

@@ -1863,6 +1863,7 @@ export default {
                 this.$api.selfManagement.deviceTypeList 
             );
             if(res){
+                console.log(1234,res)
                 this.diskData.total = res.data.deviceCount;
                 this.diskData.data = res.data.typeList;
                 this.diskData.data = res.data.typeList.map(item=>{