Bläddra i källkod

feat:空状态交互

LAPTOP-U5GOA5HA\zz 1 år sedan
förälder
incheckning
3d77fd1fba

BIN
app/src/assets/images/null2.png


+ 29 - 23
app/src/views/Fire/components/Construction.vue

@@ -1,9 +1,14 @@
 <template>
   <div>
     <div class="unit" @click="showHunit(3)">
-      <span class="unit-c" >管理主体</span>
-      <div class="unit-num" v-for="(item,index) in glztList" :key="index" @click="showHunit" >
-        <div >
+      <span class="unit-c">管理主体</span>
+      <div
+        class="unit-num"
+        v-for="(item, index) in glztList"
+        :key="index"
+        @click="showHunit"
+      >
+        <div>
           <LinearText
             style="display: inline-block"
             :text="item.sl"
@@ -11,8 +16,9 @@
           ></LinearText>
           <span>家</span>
         </div>
-        <div>{{ item.sfzddw}}</div>
+        <div>重点单位</div>
       </div>
+      
       <!-- <div class="unit-num">
         <div>
           <LinearText
@@ -33,7 +39,7 @@
     </div>
     <div class="unit maintenance" @click="showHunit(2)">
       <span class="unit-w">维保形式</span>
-      <div class="unit-num" v-for="(item,index) in wbxsList" :key="index">
+      <div class="unit-num" v-for="(item, index) in wbxsList" :key="index">
         <div>
           <LinearText
             style="display: inline-block"
@@ -67,7 +73,7 @@
         <div>无维保</div>
       </div> -->
     </div>
-    
+
     <!-- 弹窗 -->
     <basic-modal top="120px" ref="higthModal" name="高层建筑管理">
       <higthList :flag="flag" :qx="qx" />
@@ -80,31 +86,33 @@ import unit3D from "@/components/unit3D.vue";
 import { gettotalGlxx } from "@/api/management.js";
 import higthList from "./higthList.vue";
 export default {
-  components: { unit3D,higthList },
+  components: { unit3D, higthList },
   props: {
     qx: String,
-    glztList:Array,
-    wbxsList:Array,
-  
+    glztList: Array,
+    wbxsList: Array,
   },
   data() {
     return {
       fierList: [],
       params: {
         pageSize: 100,
-        pageNum: 1
+        pageNum: 1,
       },
-      flag:1
+      flag: 1,
     };
   },
   watch: {
     qx() {
-      this.manageList()
-    }
+      this.manageList();
+    },
   },
-  methods:{
+  methods: {
     manageList() {
-      gettotalGlxx({...this.params, qx: this.qx === '重庆市' ? "" : this.qx}).then((res) => {
+      gettotalGlxx({
+        ...this.params,
+        qx: this.qx === "重庆市" ? "" : this.qx,
+      }).then((res) => {
         this.fierList = res.data.rows.map((item) => {
           return {
             name: item.xfaqglxs,
@@ -113,13 +121,12 @@ export default {
         });
       });
     },
-    
+
     // 弹窗
-    showHunit(val){
-      this.flag=val
+    showHunit(val) {
+      this.flag = val;
       this.showModal("higthModal");
-
-    }
+    },
   },
   created() {
     this.manageList();
@@ -161,7 +168,6 @@ export default {
 }
 .unit-w {
   width: 136px;
-
 }
 .unit-g {
   font-size: 18px;
@@ -170,7 +176,7 @@ export default {
 }
 .maintenance {
   margin-top: 30px;
-  .unit-num{
+  .unit-num {
     width: 180px !important;
   }
 }

+ 0 - 2
app/src/views/Fire/components/UnitInfo.vue

@@ -202,8 +202,6 @@ export default {
     },
     // 跳转独栋(目前未加ID)
     ToUnitInfo(item) {
-      console.log(item);
-      return;
       this.$router.push(`/detail?id=${item.jzid}`);
     },
   },

+ 17 - 1
app/src/views/Fire/index.vue

@@ -89,7 +89,23 @@
 					pageNum: 1,
 					jzszqx: (this.qx === '重庆市' ? '' : this.qx),
 				}).then((res) => {
-					this.glztList = res.data.rows;
+					let data=res.data.rows
+					if(data.length<1){
+						this.glztList=[{
+							jzszqx:this.qx,
+							sfzddw:'重点单位',
+							sl:0
+						},
+						{
+							jzszqx:this.qx,
+							sfzddw:'一般单位',
+							sl:0
+						}]
+					}else{
+						this.glztList = res.data.rows;
+					}
+					
+
 				});
 			},
 			// 维保形式

+ 5 - 1
app/src/views/FireCondition/components/FireAddressType.vue

@@ -27,10 +27,14 @@
     </div>
     <div style="display: flex; justify-content: center">
       <div
+      v-show="data.length > 0"
         ref="fireAddressType"
         class="pie-chart"
-        style="width: 100%; height: 240px"
+        style="width: 443px; height: 240px"
       ></div>
+      <div style="margin-left: 20px" v-show="data.length == 0">
+      <img src="../../../assets/images/null2.png" alt="">
+    </div>
     </div>
   </div>
 </template>

+ 7 - 1
app/src/views/FireCondition/components/FireHistory.vue

@@ -9,7 +9,7 @@
       <span class="reason">起火原因</span>
     </div>
     <VueSeamlessScroll :data="list" :class-option="classOption" class="warp">
-      <ul class="item">
+      <ul class="item" v-show="list.length > 0">
         <li
           class="row"
           v-for="(item, index) in list"
@@ -24,6 +24,12 @@
           <span class="reason">{{ item.qhyy1 }}</span>
         </li>
       </ul>
+      <div
+        style="margin-top: 30px; margin-left: 70px"
+        v-show="list.length == 0"
+      >
+        <img src="../../../assets/images/null2.png" alt="" />
+      </div>
     </VueSeamlessScroll>
   </div>
 </template>

+ 14 - 3
app/src/views/FireCondition/components/FireReason.vue

@@ -1,6 +1,9 @@
 <template >
-  <div style="display: flex; justify-content: center">
-    <div ref="fireReason" style="width: 100%; height: 287px"></div>
+  <div style="display: flex; justify-content: center;width: 100%;" >
+     <div ref="fireReason" style="width: 443px; height: 287px"  v-show="data.length > 0"></div>
+    <div style="margin-top: 20px; margin-left: 20px" v-show="data.length == 0">
+      <img src="../../../assets/images/null2.png" alt="">
+    </div>
   </div>
 </template>
 
@@ -22,6 +25,7 @@ export default {
   mounted() {
     // 初始化起火原因
     this.init();
+    console.log(this.data);
   },
   computed: {
     legend() {
@@ -247,10 +251,17 @@ export default {
         qx: this.qx === "重庆市" ? "" : this.qx,
         qhsj: "2023",
       }).then((res) => {
-        this.data = res.data.rows.map((item) => ({
+       let list=res.data.rows
+       if(list.length >0){
+        console.log('----------33333',list);
+        this.data = list.map((item) => ({
           name: item.qhyy1,
           value: item.sl,
         }));
+       }else{
+        this.data=[]
+       }
+        
       });
     },
   },

+ 12 - 4
app/src/views/FireCondition/components/FireTime.vue

@@ -1,5 +1,10 @@
 <template>
-  <div style="height: 260px" ref="fireTime"></div>
+  <div>
+    <div style="height: 260px; width: 955px;" ref="fireTime" v-show="notEmpty"></div>
+  <div style="margin-top: 20px; margin-left: 320px" v-show="!notEmpty">
+    <img src="../../../assets/images/null2.png" alt="" />
+  </div>
+  </div>
 </template>
 
 <script>
@@ -44,7 +49,8 @@ export default {
         "22",
         "23",
       ],
-      option: []
+      option: [],
+      notEmpty: true
     };
   },
   mounted() {
@@ -75,8 +81,10 @@ export default {
       }).then((res) => {
         if (this.modeType === 1 || this.modeType === 2) {
           this.list = res.data.year;
+          this.notEmpty = this.list.length > 0
         } else if (this.modeType === 3) {
           this.list = res.data;
+          this.notEmpty = this.list.autum.length > 0 ||  this.list.winter.length > 0 || this.list.summer.length > 0 || this.list.spring.length > 0
         }
         this.reload();
       });
@@ -232,7 +240,7 @@ export default {
                 color: "#35709caa",
               },
             },
-            data: this.hours.map(item => `${item}:00`)
+            data: this.hours.map((item) => `${item}:00`),
           },
         ],
         yAxis: {
@@ -254,7 +262,7 @@ export default {
       };
       this.chart.setOption(this.option, true);
     },
-  }
+  },
 };
 </script>
 

+ 1 - 1
app/src/views/FireCondition/index.vue

@@ -5,7 +5,7 @@
 				<KeyIndex :qx="qx" />
 			</border-panel>
 			<border-panel height="337px" style="margin-bottom: 2px" title="起火原因">
-				<FireReason :qx="qx" />
+				<FireReason :qx="qx" />		
 			</border-panel>
 			<border-panel height="313px" title="起火场所(类型)">
 				<FireAddressType :qx="qx" />

+ 1 - 0
app/src/views/Home/components/AutonomousManagement.vue

@@ -40,6 +40,7 @@ export default {
     // 维保形式
     getMounList(){
       getWbxs({...this.params,qy:this.qy==="重庆市"?"":this.qy}).then(res=>{
+        console.log('=========形式',res.data.rows);
         this.wbxsList=res.data.rows.map(item=>{
           return{
             name:item.wbxs,

+ 14 - 5
app/src/views/Home/components/HiddenDangerDetection/index.vue

@@ -10,12 +10,18 @@
     <div class="hidden-danger-detection_bottom">
       <div class="item">
         <!-- <Rectification :ScheduletList="ScheduletList"/> -->
-        <pcNum :ScheduletList="ScheduletList" :list="list" :allNum="allNum" :pcdsNum="pcdsNum" />
+        <pcNum
+          :ScheduletList="ScheduletList"
+          :list="list"
+          :allNum="allNum"
+          :pcdsNum="pcdsNum"
+          :wzgsNum="wzgsNum"
+          :yzgsNum="yzgsNum"
+        />
       </div>
       <div class="item">
         <HiddenDangerType :yhType="yhType" />
       </div>
-    
     </div>
   </div>
 </template>
@@ -44,7 +50,9 @@ export default {
      yhType:[],
       ypclds:'',
       pcdsNum:'',
+      yzgsNum:'',
       allNum:'',
+      wzgsNum:'',
       list:{},
       ScheduletList:{},
            // 传参
@@ -72,13 +80,16 @@ export default {
         this.list=res.data.rows[0]
         this.allNum=this.list.yhds+'/'+this.list.yhgs
         this.pcdsNum=this.list.ypclds+'/'+this.list.ypcldcs
-        console.log('------list',this.list);
+        this.yzgsNum=this.list.yzgyhlds+'/'+this.list.yzgyhs
+        this.wzgsNum=this.list.wzgyhlds+'/'+this.list.wzgyhs
+        console.log('------list66666',this.list);
       })
     },
     // 隐患类型
     getType(){
       getYhlx({...this.params,qy:this.qy==='重庆市'?'':this.qy}).then(res=>{
         const data = res.data.rows[0];
+
         if (data) {
           this.yhType= [
              {
@@ -109,8 +120,6 @@ export default {
          this.ScheduletList.noUnm=data.djh+data.dzg
          this.ScheduletList=data
         }
-        
-        console.log('=======《《进度',this.ScheduletList);
     })
     }
   },

+ 6 - 4
app/src/views/Home/components/HiddenDangerDetection/pcNum.vue

@@ -14,11 +14,11 @@
         </div>
         <div class="hidden-danger-detection_top_inner">
           <span>已整改数</span>
-          <hidden-danger-total number="1000/100" label="" unit="栋/条" />
+          <hidden-danger-total :number="yzgsNum" label="" unit="栋/条" />
         </div>
         <div class="hidden-danger-detection_top_inner">
-          <span>未改数</span>
-          <hidden-danger-total number="1000/100" label="" unit="栋/条" />
+          <span>未改数</span>
+          <hidden-danger-total :number="wzgsNum" label="" unit="栋/条" />
         </div>
       </div>
     </div>
@@ -33,7 +33,9 @@ export default {
     ScheduletList:Object,
     list:Object,
     pcdsNum:String,
-    allNum:String
+    allNum:String,
+    yzgsNum:String,
+    wzgsNum:String
   },
   
 };

+ 1 - 1
app/src/views/Risk/components/RiskDanger.vue

@@ -80,7 +80,7 @@
         },
         // 跳转独栋(ID)
         open(item){
-          console.log(item);
+          window.location.href = `/detail?id=${item.jzid}`;
         }
       }
     };