Quellcode durchsuchen

1.中网格缺失修复

wangtao vor 1 Jahr
Ursprung
Commit
0835633da7
4 geänderte Dateien mit 279 neuen und 19 gelöschten Zeilen
  1. 17 14
      src/components/mixins/map-data1.js
  2. 1 0
      src/http/api.js
  3. 261 4
      src/views/security-plan.vue
  4. 0 1
      src/views/self-management.vue

+ 17 - 14
src/components/mixins/map-data1.js

@@ -1356,10 +1356,9 @@ export default {
                                 })
                             }
                         }
-                        console.log(11111, arr)
                         for (let i = 0; i < arr.length; i++) {
                             let target = {
-                                id: i + 1,
+                                id: 1000 + i,
                                 attributes: {
                                     name: i,
                                 },
@@ -1387,7 +1386,7 @@ export default {
                             };
                             setTimeout(() => {
                                 window.jMap.Locate.trackLocate(target, options);
-                            }, 1000)
+                            }, 100)
 
                         }
 
@@ -1397,15 +1396,16 @@ export default {
                         //画线---------------------------------- 
                         //区域---------------------------------- 
                         var bigArr = obj.features.filter(function(el) {
-                            return el.attributes.name.indexOf('新虹街道') > -1 ||
-                                el.attributes.name.indexOf('华漕') > -1 ||
-                                el.attributes.name.indexOf('七宝中片') > -1 ||
-                                el.attributes.name.indexOf('航华网格') > -1 ||
-                                el.attributes.name.indexOf('七宝北片网格') > -1 ||
-                                el.attributes.name.indexOf('紫藤、红松') > -1 ||
-                                el.attributes.name.indexOf('虹梅区域') > -1
+                                return el.attributes.name.indexOf('新虹街道') > -1 ||
+                                    el.attributes.name.indexOf('华漕') > -1 ||
+                                    el.attributes.name.indexOf('七宝中片') > -1 ||
+                                    el.attributes.name.indexOf('航华网格') > -1 ||
+                                    el.attributes.name.indexOf('七宝北片网格') > -1 ||
+                                    el.attributes.name.indexOf('紫藤、红松') > -1 ||
+                                    el.attributes.name.indexOf('虹梅区域') > -1
 
-                        })
+                            })
+                            // console.log(111, bigArr)
                         bigArr.forEach(function(item, index) {
                             var aaa = item.geometry.rings[0];
                             var newArr = aaa.map(function(value, index) {
@@ -1421,7 +1421,7 @@ export default {
 
                         })
                         bigNewArr.forEach(function(item, index) {
-                            var idx = index + 1;
+                            var idx = index;
                             setTimeout(() => {
                                 // 2区域分布
                                 var target = {
@@ -1534,6 +1534,7 @@ export default {
                             //画线---------------------------------
                         let huaxian = []
                         for (let i = 0; i < big2Arr.length; i++) {
+
                             huaxian.push([])
                             for (let ii = 0; ii < big2Arr[i].length; ii++) {
                                 huaxian[i].push(
@@ -1543,7 +1544,7 @@ export default {
                         }
                         for (let i = 0; i < huaxian.length; i++) {
                             let target = {
-                                id: i + 1,
+                                id: 10000 + i,
                                 attributes: {
                                     name: i,
                                 },
@@ -2213,7 +2214,9 @@ export default {
                         //企业自主
                         if (pageType == "self-management") {
                             if (val.attrbutes.type == "重点单位") {
-                                this.elementInfo(val.attrbutes, "重点单位")
+                                console.log(111111111111111111)
+                                    // this.elementInfo(val.attrbutes, "重点单位")
+                                that.stores.zddwIdSD(val.attrbutes.companyId);
                             } else if (val.attrbutes.type == "大型综合体") {
                                 let msgParse = JSON.parse(val.attrbutes.extendData)
                                 let arrayList = [{

+ 1 - 0
src/http/api.js

@@ -49,6 +49,7 @@ let api = {
         iotDisposal: "/prod-api/service-fire/bscEnterpriseAutonomy/iotDisposal", //企业自主管理-物联网处置情况
         deviceTypeList: "/prod-api/service-fire/baseDevice/deviceTypeList", //企业自主管理-物联网设备情况
         deviceTypeScatter: "/prod-api/service-fire/baseDevice/deviceTypeScatter", //企业自主管理-物联网设备撒点
+        scatterData: "/prod-api/service-fire/bscEnterpriseAutonomy/scatterData", //重点单位单位报告接口
     },
     water: {
         //消防水源情况

+ 261 - 4
src/views/security-plan.vue

@@ -460,10 +460,10 @@
                     
                         <el-row class="row_g2">
                             <el-col :span="8">消防安全重点单位</el-col>
-                            <el-col :span="4" style="color:red">高风险<br>0(家)</el-col>
-                            <el-col :span="4" style="color:orange">较高风险<br>9(家)</el-col>
-                            <el-col :span="4" style="color:yellow">一般风险<br>15(家)</el-col>
-                            <el-col :span="4" style="color:green">低风险<br>152(家)</el-col>
+                            <el-col :span="4" style="color:red" @click="djActiveClick(0)">高风险<br>0(家)</el-col>
+                            <el-col :span="4" style="color:orange" @click="djActiveClick(1)">较高风险<br>9(家)</el-col>
+                            <el-col :span="4" style="color:yellow" @click="djActiveClick(2)">一般风险<br>15(家)</el-col>
+                            <el-col :span="4" style="color:green" @click="djActiveClick(3)">低风险<br>152(家)</el-col>
                         </el-row>
                         <el-row class="row_g2">
                             <el-col :span="8">九小场所</el-col>
@@ -928,6 +928,119 @@
                 ></iframe>
             </el-dialog>
         </div>
+        <!-- 消防安全重点单位弹框 -->
+        <transition name="el-fade-in-linear">
+            <div class="tableTooltipwt2" v-if="tk">
+                <img src="~@a/img/icon/close.png" alt="" class="close" @click="closeTk" />
+                <el-col class="mk">
+                    <el-row>
+                        <el-col>
+                            <span class="color2">单位名称:</span>
+                            <span class="color1">{{ tkData.companyName }}</span>
+                        </el-col>
+                        <el-col>
+                            <span class="color2">单位类型:</span>
+                            <span class="color1">重点单位</span>
+                        </el-col>
+                        <el-col>
+                            <span class="color2">联系电话:</span>
+                            <span class="color1">{{ tkData.linkPhone }}</span>
+                        </el-col>
+                        <el-col style="border-bottom: 1px solid #fff; padding-bottom: 10px">
+                            <span class="color2">地址:</span>
+                            <span class="color1">{{ tkData.address }}</span>
+                        </el-col>
+                        <el-col style="margin-top: 6px">
+                            <span class="color1" style="margin-left: 0">企业消防综合评估</span>
+                            <span class="color1" style="float: right"
+                                >综合得分:{{
+                                    tkData.fireRisk + tkData.buildIntegrity + tkData.lawEnforce + tkData.selfManage + tkData.facilityStatus
+                                        ? (tkData.fireRisk + tkData.buildIntegrity + tkData.lawEnforce + tkData.selfManage + tkData.facilityStatus).toFixed(2)
+                                        : 0
+                                }}
+                                分</span
+                            >
+                        </el-col>
+                        <table border="0" cellspacing="0" cellpadding="0">
+                            <thead>
+                                <tr>
+                                    <th>指数</th>
+                                    <th>建筑整体指数</th>
+                                    <th>火灾风险指数</th>
+                                    <th>监督执法指数</th>
+                                    <th>自主管理指数</th>
+                                    <th>设施状况指数</th>
+                                </tr>
+                            </thead>
+                            <tbody>
+                                <tr>
+                                    <td>得分</td>
+                                    <td>{{ tkData.fireRisk }}</td>
+                                    <td>{{ tkData.buildIntegrity }}</td>
+                                    <td>{{ tkData.lawEnforce }}</td>
+                                    <td>{{ tkData.selfManage }}</td>
+                                    <td>{{ tkData.facilityStatus }}</td>
+                                </tr>
+                            </tbody>
+                        </table>
+                        <el-col style="margin-top: 6px" v-if="tkData.reformPart">
+                            <span class="color1" style="margin-left: 0">消防整改情况</span>
+                        </el-col>
+                        <el-col v-if="tkData.reformPart">
+                            <span class="color1" style="margin-left: 0">编号:{{ tkData.reformCode }}</span>
+                            <span class="color1" style="float: right">整改期限:{{ tkData.limitTime ? tkData.limitTime.split("T")[0] + " " + tkData.limitTime.split("T")[1] : "" }}</span>
+                        </el-col>
+                        <table border="0" cellspacing="0" cellpadding="0" v-if="tkData.reformPart">
+                            <thead>
+                                <tr>
+                                    <th>序号</th>
+                                    <th>整改项</th>
+                                    <th>原因</th>
+                                </tr>
+                            </thead>
+                            <tbody>
+                                <tr v-for="(item, index) in tkData.reformPart.data" :key="index">
+                                    <td>{{ index + 1 }}</td>
+                                    <td>{{ item.item }}</td>
+                                    <td>{{ item.reason }}</td>
+                                </tr>
+                            </tbody>
+                        </table>
+                        <div style="margin-top: 40px" v-if="tkData.reformStatus != 0">
+                            <el-steps
+                                :active="tkData.reformStatus == 1 ? 1 : tkData.reformStatus == 2 || tkData.reformStatus == 3 ? 1 : tkData.reformStatus == 4 || tkData.reformStatus == 5 ? 2 : 0"
+                                align-center
+                            >
+                                <el-step title="已接收" :description="tkData.receivedTime.replace('T', ' ')"></el-step>
+                                <el-step
+                                    :title="tkData.reformStatus == 2 ? '整改中' : tkData.reformStatus == 3 || tkData.reformStatus == 4 || tkData.reformStatus == 5 ? '整改完成' : '整改中'"
+                                    :description="tkData.reformTime.replace('T', ' ')"
+                                ></el-step>
+                                <el-step
+                                    :title="
+                                        tkData.reformStatus == 1 || tkData.reformStatus == 2 || tkData.reformStatus == 3
+                                            ? '待审核'
+                                            : tkData.reformStatus == 4
+                                            ? '审核不通过'
+                                            : tkData.reformStatus == 5
+                                            ? '审核通过'
+                                            : ''
+                                    "
+                                    :description="tkData.reviewTime.replace('T', ' ')"
+                                ></el-step>
+                            </el-steps>
+                        </div>
+                        <div style="margin: 10px auto" v-if="tkData.companyName == '上海虹桥国际特商物流港'">
+                            <el-button type="primary" size="small" style="background: none; border-radius: 4px; border: 1px solid #73fbfd; height: 30px; padding: 0 6px !important; margin: 10px 0 0"
+                                ><a href="http://file.usky.cn/statics/202303/20232D91E7B3D14C346BC9F009FA0B76FA5BF.pdf" target="_blank" style="color: #fff; text-decoration: none"
+                                    >&nbsp;&nbsp;查看报告&nbsp;&nbsp;</a
+                                ></el-button
+                            >
+                        </div>
+                    </el-row>
+                </el-col>
+            </div>
+        </transition>
 
         
     </el-row>
@@ -952,6 +1065,8 @@ export default {
     components: { category, gauge, CountTo,unitBox ,Vue3SeamlessScroll },
     data() {
         return {
+                tk:false,
+                tkData: {},//消防安全重点单位弹框数据
             jxcstj:[0,0,0,0],//九小场所统计
             check: 1,
             dialogTableVisible:false,
@@ -1656,6 +1771,30 @@ export default {
         
     },
     methods: {
+        
+        /**
+         * @消防安全重点单位撒点详情
+         * @api接口请求
+         */
+         async zddwSd(id) {
+            let res = await this.$axios.get(
+                this.$api.selfManagement.scatterData +
+                    "?" +
+                    this.$qs.stringify({
+                        companyId: id,
+                    })
+            );
+            if (res.data) {
+                this.tkData = res.data[0];
+                this.tk = true;
+            }
+        },
+        /**
+         * 消防安全重点单位关闭
+         */
+        closeTk() {
+            this.tk = false;
+        },
         /**
          * 每日动态弹框打开pdf
          */
@@ -1753,6 +1892,7 @@ export default {
             })
         },
         staticsPoint(arr,type,val){  //疏导区社会单位情况统计撒点
+                this.anbaoSDUWG()//疏导区网格
             this.addMarker(arr, "security-plan", val)
         },
         goPoints(type){
@@ -1781,8 +1921,47 @@ export default {
 
 
         },
+        /**
+         * 消防安全重点单位
+         * @param {*} id
+         */
+         djActiveClick(id) {
+               
+                let type = "重点单位";
+                let arr = [];
+                this.$axios
+                    .get(
+                        this.$api.selfManagement.riskGradeScatter +
+                            "?" +
+                            this.$qs.stringify({
+                                streetTown: this.stroes.$state.streetTown,
+                                riskGrade: id + 1,
+                            })
+                    )
+                    .then((res) => {
+                        this.anbaoSDUWG()//疏导区网格
+                        if (res.data.length > 0) {
+                            //点分布
+                            let data = res.data;
+                            for (let i = 0; i < data.length; i++) {
+                                arr[i] = data[i];
+                                arr[i].gisX = data[i].longitude;
+                                arr[i].gisY = data[i].latitude;
+                                arr[i].companyId = data[i].companyId;
+                                arr[i].type = type;
+                            }
+                            setTimeout(() => {
+                                this.addMarker(arr.splice(0, 500), "self-management", id == 0 ? "高风险" : id ==1 ? "较高风险" : id == 2 ?  "一般风险" : id == 3 ? "低风险" : "");
+                            }, 500);
+                        } else {
+                            this.addMarker([], "self-management", type);
+                           
+                        }
+                    });
+        },
 
         basicStaticsData(type,name){  //疏导区基本情况 统计点击事件
+                
             this.$axios.post(this.$api.water.baseGgpFacilityList,{
                                 "facilityType": [type ] 
                         }).then((res) => {
@@ -1798,6 +1977,7 @@ export default {
                                         arr.push(data)
                                         let dataOther = []
                                         if(type == 39){ //九小场所
+                                                this.anbaoSDUWG()//疏导区网格
                                                 if(name){
                                                         // console.log(arr)
                                                         for(let i=0;i<arr.length;i++){
@@ -1833,6 +2013,7 @@ export default {
                                                 }
                                                 
                                         }else{
+                                                this.anbaoSDUWG()//疏导区网格
                                                 this.addMarker(arr, "security-plan", name)
                                         }
                                         
@@ -1899,7 +2080,9 @@ export default {
 
         },
         getOneUnit(val){
+                
             if(val=='29'||val=='30'){  //表格及撒点
+                this.anbaoSDUWG()//疏导区网格
                 this.$axios.post(this.$api.water.baseGgpFacilityList,{
                                 "facilityType": [val ] 
                         }).then((res) => {
@@ -2917,6 +3100,7 @@ export default {
                 });
         },
     },
+
     watch: {
         "stores.$state.gridData": function (newValue, oldValue) {
             
@@ -2935,6 +3119,10 @@ export default {
             // "http://videocdn.didano.com/school765class0channelId2761namedingdangm/playlist.m3u8"
             this.play()
         },
+        "stores.$state.zddwId": function (newValue, oldValue) {
+            
+                this.zddwSd(newValue);
+        },
      
 
     },
@@ -3674,6 +3862,75 @@ export default {
    
   }
 }
+.tableTooltipwt2 {
+    width: 6rem;
+    background: transparent;
+    border-radius: 0.05rem;
+    box-shadow: inset 0 0 1px 0.0125rem rgba(115, 251, 253, 1);
+    background: rgba(0, 29, 49, 0.5);
+    font-size: 0.2rem;
+    padding: 0.1875rem;
+    position: fixed;
+    top: 140px;
+    right: 600px;
+    z-index: 10000;
+    .close {
+        width: 20px;
+        height: 20px;
+        position: absolute;
+        right: 10px;
+        top: 10px;
+        z-index: 10000;
+        display: block;
+    }
+    .tableContent {
+        p {
+            @include color_primary($color-primary1);
+        }
+
+        .el-col {
+            margin-top: 0.05rem;
+            line-height: 0.3rem;
+            text-overflow: ellipsis !important;
+            white-space: normal !important;
+        }
+        .mk {
+            margin-top: 0px;
+        }
+    }
+}
+.color1 {
+    @include color_primary($color-primary3);
+    margin-left: 10px;
+}
+.color2 {
+    @include color_primary($color-primary1);
+}
+table {
+    width: 100%;
+    text-align: center;
+    color: #fff;
+    border: 1px solid #fff;
+    font-size: 12px;
+}
+
+table thead tr th {
+    padding: 5px 0px;
+    font-weight: 400;
+    border: 1px solid #fff;
+}
+
+table tbody tr td {
+    padding: 5px 0px;
+}
+
+table tbody tr:nth-child(2n) td {
+    //     background-color: lightblue;
+}
+
+td {
+    border: 0.5px solid #fff;
+}
 </style>
 <style>
 .el-tooltip__popper {

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

@@ -1486,7 +1486,6 @@ export default {
             this.djActive = [false, false, false, false];
             this.djActive[id] = !status;
             let type = "重点单位";
-            console.log(type,id)
             let arr = [];
             if (this.djActive[id]) {
                 this.$axios