ming преди 1 година
родител
ревизия
0cdbe4ec93
променени са 3 файла, в които са добавени 166 реда и са изтрити 65 реда
  1. 75 1
      src/components/mixins/map-data1.js
  2. 34 42
      src/components/unitBox/index.vue
  3. 57 22
      src/views/security-plan.vue

+ 75 - 1
src/components/mixins/map-data1.js

@@ -1217,6 +1217,80 @@ export default {
                                 }, ];
                                 this.popup(val._attrbutes, arrayList, true)
                             }
+                            if (type.indexOf(' ')!=-1) {
+                                console.log(val.attrbutes)
+                                let arrayList = [{
+                                    title: [type, true],
+                                    children: [
+                                        ["单位名称:", val.attrbutes.facilityName, 24],
+                                        // ["设施类型:", val.attrbutes.facilityType, 24],
+                                        ["地址:", val.attrbutes.address, 24],
+                                        ["所属街镇:", val.attrbutes.streetTown, 24],
+                                    ],
+                                }, ];
+                                this.popup(val._attrbutes, arrayList, true)
+                            }
+                            if (type.indexOf('镇')!=-1||type.indexOf('街道')!=-1 ){
+                                let arrayList = [{
+                                    title: [type, true],
+                                    children: [
+                                        ["单位名称:", val.attrbutes.facilityName, 24],
+                                        // ["设施类型:", val.attrbutes.facilityType, 24],
+                                        ["地址:", val.attrbutes.address, 24],
+                                        ["所属街镇:", val.attrbutes.streetTown, 24],
+                                    ],
+                                }, ];
+                                this.popup(val._attrbutes, arrayList, true)
+                            }
+                            if (type == "七宝镇") {
+                                alert(typeof(type))
+                                let arrayList = [{
+                                    title: ["七宝镇", true],
+                                    children: [
+                                        ["单位名称:", val.attrbutes.facilityName, 24],
+                                        // ["设施类型:", val.attrbutes.facilityType, 24],
+                                        ["地址:", val.attrbutes.address, 24],
+                                        ["所属街镇:", val.attrbutes.streetTown, 24],
+                                    ],
+                                }, ];
+                                this.popup(val._attrbutes, arrayList, true)
+                            }
+                            // if (type == "华漕镇") {
+                            //     let arrayList = [{
+                            //         title: ["华漕镇", true],
+                            //         children: [
+                            //             ["单位名称:", val.attrbutes.facilityName, 24],
+                            //             // ["设施类型:", val.attrbutes.facilityType, 24],
+                            //             ["地址:", val.attrbutes.address, 24],
+                            //             ["所属街镇:", val.attrbutes.streetTown, 24],
+                            //         ],
+                            //     }, ];
+                            //     this.popup(val._attrbutes, arrayList, true)
+                            // }
+                            // if (type == "新虹街道") {
+                            //     let arrayList = [{
+                            //         title: ["新虹街道", true],
+                            //         children: [
+                            //             ["单位名称:", val.attrbutes.facilityName, 24],
+                            //             // ["设施类型:", val.attrbutes.facilityType, 24],
+                            //             ["地址:", val.attrbutes.address, 24],
+                            //             ["所属街镇:", val.attrbutes.streetTown, 24],
+                            //         ],
+                            //     }, ];
+                            //     this.popup(val._attrbutes, arrayList, true)
+                            // }
+                            // if (type == "虹桥镇") {
+                            //     let arrayList = [{
+                            //         title: ["虹桥镇", true],
+                            //         children: [
+                            //             ["单位名称:", val.attrbutes.facilityName, 24],
+                            //             // ["设施类型:", val.attrbutes.facilityType, 24],
+                            //             ["地址:", val.attrbutes.address, 24],
+                            //             ["所属街镇:", val.attrbutes.streetTown, 24],
+                            //         ],
+                            //     }, ];
+                            //     this.popup(val._attrbutes, arrayList, true)
+                            // }
                         }
                         //火灾数据分析
                         if (pageType == "fire-data-analysis") {
@@ -1259,7 +1333,7 @@ export default {
                                         ["受伤人数:", val.attrbutes.injuredNumber + "人", 24],
                                         ["起火经过:", val.attrbutes.fireProcess, 24],
                                     ],
-                                }, ];
+                                }, ];                                      
                                 this.popup(val._attrbutes, arrayList, true)
                             }
                         }

+ 34 - 42
src/components/unitBox/index.vue

@@ -5,34 +5,54 @@
             <el-col :offset="1" :span="4"><img  src="@/assets/img/securityPlan/iconEb.svg" alt="" class="img" width="20"></el-col>
             <el-col  :span="8">华漕镇</el-col>
             <el-col  :span="9" ><a href="http://32.0.15.107:8080/mhvi/hcddc.pdf" target="_blank">摸排报告</a></el-col>
-            <el-col  :span="2" style="color:#73FBFD;text-align:center"> <i class="el-icon-arrow-right"></i></el-col>
+            <el-col  :span="2" style="color:#73FBFD;text-align:center"></el-col>
             <div class="panel-footer"></div>
         </el-row>
         <el-row class="ebItem">
             <el-col :offset="1" :span="4"><img  src="@/assets/img/securityPlan/iconEb.svg" alt="" class="img" width="20"></el-col>
             <el-col  :span="8">新虹街道</el-col>
             <el-col  :span="9" ><a href="http://32.0.15.107:8080/mhvi/xhddc.pdf" target="_blank">摸排报告</a></el-col>
-            <el-col  :span="2" style="color:#73FBFD;text-align:center"> <i class="el-icon-arrow-right"></i></el-col>
+            <el-col  :span="2" style="color:#73FBFD;text-align:center"></el-col>
             <div class="panel-footer"></div>
         </el-row>
         <el-row class="ebItem">
             <el-col :offset="1" :span="4"><img  src="@/assets/img/securityPlan/iconEb.svg" alt="" class="img" width="20"></el-col>
             <el-col  :span="8">七宝镇</el-col>
             <el-col  :span="9" ><a href="http://32.0.15.107:8080/mhvi/qbddc.pdf" target="_blank">摸排报告</a></el-col>
-            <el-col  :span="2" style="color:#73FBFD;text-align:center"> <i class="el-icon-arrow-right"></i></el-col>
+            <el-col  :span="2" style="color:#73FBFD;text-align:center"></el-col>
             <div class="panel-footer"></div>
         </el-row>
         <el-row class="ebItem">
             <el-col :offset="1" :span="4"><img  src="@/assets/img/securityPlan/iconEb.svg" alt="" class="img" width="20"></el-col>
             <el-col  :span="8">虹桥镇</el-col>
             <el-col  :span="9" ><a href="http://32.0.15.107:8080/mhvi/hqddc.pdf" target="_blank">摸排报告</a></el-col>
-            <el-col  :span="2" style="color:#73FBFD;text-align:center"> <i class="el-icon-arrow-right"></i></el-col>
+            <el-col  :span="2" style="color:#73FBFD;text-align:center"></el-col>
             <div class="panel-footer"></div>
         </el-row>
     </div> 
 
-     <!-- 宾馆酒店信息统计   大型商业  各街镇  规模租赁 三合一   图表+统计 -->
-     <div  v-else-if="typeValue==23||typeValue==26||typeValue==28">
+     
+
+    <!-- 养老  医疗机构清单 表格 -->
+    <!-- <div>{{ arrayData }}</div> -->
+    <div class="rightBotContent" v-else-if="typeValue==29||typeValue==30" style="margin-top:15px;height: calc(100% - .7rem)">
+        <el-table  ref="reportTable" height="100%" :data="arrayData"  class="transparentTableRow" style="width: 100%"
+            @mouseenter="autoScroll(true)" @mouseleave="autoScroll()">
+            <el-table-column align="left" label="单位名称" prop="facilityName" show-overflow-tooltip></el-table-column>
+            <!-- <el-table-column align="left" label="设施类型"  prop="facilityType"></el-table-column> -->
+            <el-table-column align="left" label="地址" prop="address" show-overflow-tooltip></el-table-column>
+            <el-table-column align="left" label="所属街镇" prop="streetTown" show-overflow-tooltip></el-table-column>
+            <el-table-column align="left" label="隐患问题" prop="extendData" show-overflow-tooltip>
+                <template #default="scope">
+                        {{scope.row.test1}}
+                </template>
+            </el-table-column>
+          
+        </el-table>
+    </div>
+
+    <!-- 图表+统计 -->
+    <div v-else>
         <el-row >
             <el-col :span="10">
             <bar :total="staticData.total" v-if="staticData.total"></bar>
@@ -59,22 +79,9 @@
             </el-col>
         </el-row>
     </div>
-
-    <!-- 养老  医疗机构清单 表格 -->
-    <!-- <div>{{ arrayData }}</div> -->
-    <div class="rightBotContent" v-else-if="typeValue==29||typeValue==30" style="margin-top:15px;height: calc(100% - .7rem)">
-        <el-table  ref="reportTable" height="100%" :data="arrayData"  class="transparentTableRow" style="width: 100%"
-            @mouseenter="autoScroll(true)" @mouseleave="autoScroll()">
-            <el-table-column align="left" label="设施名称" prop="facilityName"></el-table-column>
-            <!-- <el-table-column align="left" label="设施类型"  prop="facilityType"></el-table-column> -->
-            <el-table-column align="left" label="地址" prop="address"></el-table-column>
-            <el-table-column align="left" label="所属街镇" prop="streetTown"></el-table-column>
-          
-        </el-table>
-    </div>
     <!-- <div>{{ staticData.array }}</div> -->
 
-    <div v-else style="text-align:center;margin-top:1rem;color:antiquewhite">暂无数据 ...</div>
+    <!-- <div v-else style="text-align:center;margin-top:1rem;color:antiquewhite">暂无数据 ...</div> -->
 
 
      
@@ -86,23 +93,14 @@
 </template>
 
 <script>
-// import axios from "axios";
-// import linstener from "@c/mixins/linstener";
 
-import axios from "axios";
 import linstener from "@c/mixins/linstener";
-import map from "@c/mixins/map-data1";
-import gauge from "@c/gauge/index6";
-// import map from "@c/mixins/map-gaode-public";
-import category from "@c/category/index22";
-import unitBox from "@c/unitBox/index";
-import CountTo from "@/components/count-to/index.js";
-import Hls from "hls.js";
+
 
 
 import bar from "@c/bar/index2";
 export default {
-    mixins: [linstener, map],
+    mixins: [linstener],
     components: { bar },
     props: {
         typeValue: { type: Number, default: () => 1 },
@@ -239,22 +237,16 @@ export default {
     },
     methods: {
         staticsPoint(val){
-            // alert(val)
-            // alert(this.typeValue)
+            let that = this
             this.$axios.post(this.$api.water.baseGgpFacilityList,{
-                                "facilityType": [23] ,
-                                // "streetTown": [val ] 
+                                "facilityType": [this.typeValue] ,
+                                "streetTown": val 
                         }).then((res) => {
                             console.log(res)
                                 let arr = []
                                 if(res.data.length>0){
-                                        arr = res.data;
-                                        // this.arrayData= res.data;
-                                        // if(val=='29'){
-                                        //     this.addMarker(arr, "security-plan", "养老机构安全隐患清单")
-                                        // }else{
-                                        //     this.addMarker(arr, "security-plan", "医疗机构安全隐患清单")
-                                        // }
+                                    arr = res.data;
+                                    that.$emit("staticsPoint",arr,this.typeValue,val)
                                 }  
                         });
 

+ 57 - 22
src/views/security-plan.vue

@@ -61,7 +61,7 @@
                                 class="basicItem"
                                 v-for="(item, index) in line3Array"
                                 :key="index"
-                                @click="basicStaticsData(item.value)"
+                                @click="basicStaticsData(item.value,item.name)"
                             >
                                 <div style="padding: 0.03rem 0; text-align: center">
                                     <span style="display: block">
@@ -121,7 +121,7 @@
                             </el-form>
                         </div>
                     </div>
-                    <unit-box :typeValue="value111" :arrayData="arrayData" :staticData="staticData" v-if="staticData.total" ></unit-box>
+                    <unit-box :typeValue="value111" :arrayData="arrayData" :staticData="staticData" v-if="staticData.total"  @staticsPoint="staticsPoint"></unit-box>
                     <div v-else>暂无数据</div>
 
                     <!-- <category
@@ -979,11 +979,11 @@ export default {
             label: '宾馆酒店',
         },
         {
-            value: '1',
+            value: '25', //
             label: '大型商业综合体',
         },   
         {
-            value: '2',
+            value: '13', //?
             label: '消防安全重点单位',
         },
         {
@@ -996,16 +996,16 @@ export default {
         },
         
         {
-            value: '3',
+            value: '24',
             label: '厂房仓库',
         },
         {
-            value: '4',
+            value: '27',
             label: '批发市场',
         },
         {
             value: '5',
-            label: '居民小区',
+            label: '居民小区',  //??
         },
        
         {
@@ -1018,7 +1018,7 @@ export default {
         },
        
         {
-            value: '6',
+            value: '6',//???? 
             label: '电动自行车领域',
         },
        
@@ -1028,73 +1028,89 @@ export default {
                 {
                     "name": "大型综合体",
                     "count": 21,
+                    "value":25
                 },
                 {
                     "name": "重点单位",
                     "count": 14,
+                    "value":13
                 },
                 {
                     "name": "酒店/宾馆",
                     "count": 110,
+                    "value":23
                 },
                 {
-                    "name": "高层建筑",
+                    "name": "高层建筑",   
                     "count": 839,
+                    "value":0  //?
                 },{
                     "name": "厂房/仓库",
                     "count": 131,
+                    "value":24  
                 },
                 {
                     "name": "商市场",
                     "count": 11,
+                    "value":0  //?
                 },
                 {
                     "name": "公共娱乐场所",
                     "count": 38,
+                    "value":0  //?
                 },
                 {
                     "name": "医疗机构",
                     "count": 12,
-                    "value":30
+                    "value":30,
                 },{
                     "name": "养老机构",
                     "count": 5,
-                    "value":29
+                    "value":29,
                 },
                 
                 {
                     "name": "规模租赁",
                     "count": 67,
+                    "value":26  
                 },
                 {
                     "name": "办公楼宇",
                     "count": 52,
+                    "value":0  //?
                 },
                 {
                     "name": "在建工地",
                     "count": 6,
+                    "value":0  //?
                 },
                 {
                     "name": "居民小区",
                     "count": 199,
+                    "value":0  //?
                 },{
                     "name": "沿街门面",
                     "count": 3080,
+                    "value":0  //?
                 },
                 {
                     "name": "宗教场所",
                     "count": 4,
+                    "value":0  //?
                 },
                 {
                     "name": "学校",
                     "count": 23,
+                    "value":37  
                 },
                 {
                     "name": "加油(汽)站",
                     "count": 10,
+                    "value":0  //?
                 },{
                     "name": "地铁站",
                     "count": 4,
+                    "value":0  //?
                 }
                 
             ],
@@ -1528,6 +1544,13 @@ export default {
                 }
             })
         },
+        staticsPoint(arr,type,val){  //疏导区社会单位情况统计撒点
+            // alert(type)
+            // alert(val)
+            this.addMarker(arr, "security-plan", val)
+            console.log(arr)
+
+        },
         goPoints(type){
             // alert(type)
             this.$axios.post(this.$api.water.baseGgpFacilityList,{
@@ -1554,7 +1577,7 @@ export default {
 
         },
 
-        basicStaticsData(type){  //疏导区基本情况 统计点击事件
+        basicStaticsData(type,name){  //疏导区基本情况 统计点击事件
             this.$axios.post(this.$api.water.baseGgpFacilityList,{
                                 "facilityType": [type ] 
                         }).then((res) => {
@@ -1563,11 +1586,12 @@ export default {
                                 if(res.data.length>0){
                                         arr = res.data;
                                         this.arrayData= res.data;
-                                        if(type=='29'){
-                                            this.addMarker(arr, "security-plan", "养老机构")
-                                        }else if(type=='30'){
-                                            this.addMarker(arr, "security-plan", "医疗机构")
-                                        }
+                                        this.addMarker(arr, "security-plan", name+' ')
+                                        // if(type=='29'){
+                                        //     this.addMarker(arr, "security-plan", "养老机构")
+                                        // }else if(type=='30'){
+                                        //     this.addMarker(arr, "security-plan", "医疗机构")
+                                        // }
                                 }  
                         });
 
@@ -1608,12 +1632,14 @@ export default {
                                 "facilityType": [type ] ,
                                 "statisticType":"street",
                         }).then((res) => {
-                    this.staticData.array=res.data;
+
+                     //筛选4个街镇的数据
+                    this.staticData.array = res.data.filter(item=> item.streetTown=='华漕镇'||item.streetTown=='新虹街道'||item.streetTown=='七宝镇'||item.streetTown=='虹桥镇')
                     var colorArr=['#00C8B8','#068DFF','#FF843A','#7DD807'];
                     this.staticData.array.forEach((item, index) => {
                         item.color = colorArr[index]
                     })
-                    console.log(this.staticData.array)
+                    // console.log(this.staticData.array)
 
                     var totalCount=0
                     res.data.forEach(function(item){
@@ -1633,17 +1659,26 @@ export default {
                                 let arr = []
                                 if(res.data.length>0){
                                         arr = res.data;
+                                        
                                         this.arrayData= res.data;
+                                    //    console.log(JSON.parse(this.arrayData[1].extendData) )
+                                        this.arrayData.forEach((item) => {
+                                            item.test1=item.extendData?JSON.parse(item.extendData).test1:'111'
+                                      
+                                        })
                                         if(val=='29'){
-                                            this.addMarker(arr, "security-plan", "养老机构安全隐患清单")
+                                            this.addMarker(arr, "security-plan", "养老机构")
                                         }else{
-                                            this.addMarker(arr, "security-plan", "医疗机构安全隐患清单")
+                                            this.addMarker(arr, "security-plan", "医疗机构")
                                         }
                                 }  
                         });
 
-            }else if(val=='23'||val=='26'||val=='28'){ //统计
+            }else if(val=='6'){ 
+               
+            }else{//统计
                 this.getStaticData(val)
+
             }
         },
         beforeDestroy() {