From 0ecf7b3bc6d6a008a804d55c859833bf2cf6473a Mon Sep 17 00:00:00 2001
From: zmc <zmc_li@foxmail.com>
Date: 星期三, 22 十一月 2023 10:06:29 +0800
Subject: [PATCH] 1.增加了有效率异常展示页面 2.风险模型的所属场景和运维商的详细信息,以及1个跳转页面链接 3.飞行巡检页面增加增加地址和运维商的筛选条件 4.飞行巡检页面是最新当日日期时,每类异常右上角增加一个“辅助审核” 5.历史数据管理增加 站点总数

---
 src/sfc/ExceptionType.vue |  157 +++++++++++++++++++++++++++++----------------------
 1 files changed, 89 insertions(+), 68 deletions(-)

diff --git a/src/sfc/ExceptionType.vue b/src/sfc/ExceptionType.vue
index 43b8b90..0e14d3d 100644
--- a/src/sfc/ExceptionType.vue
+++ b/src/sfc/ExceptionType.vue
@@ -1,4 +1,3 @@
-
 <!-- 寮傚父绫诲瀷澶嶉�夋缁勪欢  
     鑷姩鑾峰彇鎵皹鍘嗗彶琛ㄤ腑涓嶅悓寮傚父绫诲瀷
     灏嗛�変腑鐨勫涓紓甯镐互鏁扮粍褰㈠紡杩斿洖缁欑埗缁勪欢 
@@ -9,86 +8,108 @@
 -->
 
 <script>
-  export default {
-    emits:['submitValue'],
-    data() {
-      return{
-        // 杩斿洖鐨勬墍鏈夊紓甯哥被鍨�
-        exceptionType:[],
-        //宸插嬀閫夌殑寮傚父
-        checkedList: [],
-        // 鍏ㄩ��
-        checkAll:false,
-        isIndeterminate:false,
+export default {
+  props: {
+    // 绂佺敤
+    isDisabled: {
+      type: Boolean,
+      default: false
+    },
+    // 寮傚父绫诲瀷
+    exception: {
+      type: Number,
+      default:-1
+    }
+  },
+  emits: ['submitValue'],
+  data() {
+    return {
+      // 杩斿洖鐨勬墍鏈夊紓甯哥被鍨�
+      exceptionType: [],
+      //宸插嬀閫夌殑寮傚父
+      checkedList: [],
+      // 鍏ㄩ��
+      checkAll: false,
+      isIndeterminate: false
+    }
+  },
+
+  mounted() {
+    this.$watch(() => [this.exception], () => {
+      if (this.exception != -1) {
+        console.log('寮傚父绫诲瀷锛�',this.exception)
+        this.checkedList.push(this.exception) 
       }
+      
+    });
+    this.getExceptionType()
+  },
+  methods: {
+    // 鑾峰彇涓嶅悓鐨勫紓甯稿悕绉�
+    getExceptionType() {
+      this.$http.get('/dust/exceptiontype').then((response) => {
+        // this.exceptionType = response.data.data
+        response.data.data.forEach((item) => {
+          this.exceptionType.push(item.exceptionType)
+        })
+        // console.log('鑾峰彇鍒扮殑寮傚父绫诲瀷锛�',this.exceptionType);
+        let a = ['0', '1', '2', '3', '4', '5', '6', '7','8']
+        a.forEach((item) => {
+          if (this.exceptionType.indexOf(item) == -1) {
+            this.exceptionType.push(item)
+          }
+        })
+      })
     },
-    mounted() {
-        this.getExceptionType()
+    handleCheckAllChange(val) {
+      this.checkedList = val ? this.exceptionType : []
+      this.isIndeterminate = false
+      this.$emit('submitValue', this.checkedList)
     },
-    methods: {
-        // 鑾峰彇涓嶅悓鐨勫紓甯稿悕绉�
-        getExceptionType(){
-            this.$http.get('/dust/exceptiontype').then(response=>{   
-                // this.exceptionType = response.data.data
-                response.data.data.forEach(item => {
-                    this.exceptionType.push(item.exceptionType)
-                });
-                // console.log('鑾峰彇鍒扮殑寮傚父绫诲瀷锛�',this.exceptionType);
-                let a = ['0','1','2','3','4','5','6','7']
-                a.forEach(item=>{
-                  if(this.exceptionType.indexOf(item) == -1){
-                    this.exceptionType.push(item)
-                  }
-                })
-            })
-        },
-        handleCheckAllChange (val) {
-          this.checkedList = val ? this.exceptionType : []
-          this.isIndeterminate = false
-          this.$emit('submitValue',this.checkedList)
-        },
-        handleCheckedExceptionChange  (value)  {
-  const checkedCount = value.length
-  this.checkAll = checkedCount === this.exceptionType.length
-  this.isIndeterminate = checkedCount > 0 && checkedCount < this.exceptionType.length
-  this.$emit('submitValue',this.checkedList)
-}
-     }
+    handleCheckedExceptionChange(value) {
+      const checkedCount = value.length
+      this.checkAll = checkedCount === this.exceptionType.length
+      this.isIndeterminate = checkedCount > 0 && checkedCount < this.exceptionType.length
+      this.$emit('submitValue', this.checkedList)
+    }
+  }
 }
 </script>
 
 <template>
   <div class="excption">
     <h1 class="exception-text">寮傚父绫诲瀷锛�</h1>
-     <el-checkbox
-    v-model="checkAll"
-    :indeterminate="isIndeterminate"
-    @change="handleCheckAllChange"
-    class="select-text"
-    >鍏ㄩ��</el-checkbox
-  >
-    <el-checkbox-group  v-model="checkedList"  @change="handleCheckedExceptionChange">
-    <el-checkbox :label="item"  v-for="item in exceptionType" :key="item">
-      <template #default>
-        <!-- <div style="display: flex; flex-flow: row wrap;">  -->
-        <span v-if="item == '0'">鏂數鎴栨柇缃�</span>
-        <span v-else-if="item == '1'">鏁版嵁瓒呬綆</span>
-        <span v-else-if="item == '2'">瓒呮爣</span>
-        <span v-else-if="item == '3'">鏁版嵁闀挎椂娈垫棤娉㈠姩</span>
-        <span v-else-if="item == '4'">閲忕骇绐佸彉寮傚父</span>
-        <span v-else-if="item == '5'">涓磋繎瓒呮爣寮傚父</span>
-        <span v-else-if="item == '6'">鍗曟棩瓒呮爣娆℃暟涓寸晫寮傚父</span>
-        <span v-else-if="item == '7'">婊戝姩骞冲潎鍊肩獊鍙�</span>
-      <!-- </div> -->
-      </template>
-    </el-checkbox>
-  </el-checkbox-group>
+    <el-checkbox
+      v-model="checkAll"
+      :indeterminate="isIndeterminate"
+      @change="handleCheckAllChange"
+      class="select-text"
+     :disabled="isDisabled"
+      >鍏ㄩ��</el-checkbox
+    >
+    <el-checkbox-group v-model="checkedList" @change="handleCheckedExceptionChange" :disabled="isDisabled">
+      <el-checkbox :label="item" v-for="item in exceptionType" :key="item"  >
+        <template #default>
+          <!-- <div style="display: flex; flex-flow: row wrap;">  -->
+          <span v-if="item == '0'">鏁版嵁缂哄け</span>
+          <span v-else-if="item == '1'">鏁版嵁瓒呬綆</span>
+          <span v-else-if="item == '2'">瓒呮爣</span>
+          <span v-else-if="item == '3'">鏁版嵁闀挎椂娈垫棤娉㈠姩</span>
+          <span v-else-if="item == '4'">閲忕骇绐佸彉寮傚父</span>
+          <span v-else-if="item == '5'">涓磋繎瓒呮爣寮傚父</span>
+          <span v-else-if="item == '6'">鍗曟棩瓒呮爣娆℃暟涓寸晫寮傚父</span>
+          <span v-else-if="item == '7'">鍙樺寲瓒嬪娍寮傚父</span>
+          <span v-else-if="item == '8'">鏈夋晥鐜囧紓甯�</span>
+          <!-- </div> -->
+        </template>
+      </el-checkbox>
+    </el-checkbox-group>
   </div>
 </template>
 
 <style lang="scss" scoped>
 .excption {
-    display: flex; 
+  display: flex;
 }
 .exception-text {
   font-size: 14px;
@@ -103,4 +124,4 @@
   margin-top: 5px;
   margin-right: 5px;
 }
-</style>
\ No newline at end of file
+</style>

--
Gitblit v1.9.3