From c24a5a2a99515b365ebc343b04538bb862790de1 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期四, 21 十二月 2023 11:44:22 +0800
Subject: [PATCH] Merge branch 'feature-code-refactoring' and 'feature-002'

---
 src/views/exception/components/AnalysisCard.vue |   34 ++++++++++++++++++++++++++++------
 1 files changed, 28 insertions(+), 6 deletions(-)

diff --git a/src/views/exception/components/AnalysisCard.vue b/src/views/exception/components/AnalysisCard.vue
index 82e6b0d..7328b77 100644
--- a/src/views/exception/components/AnalysisCard.vue
+++ b/src/views/exception/components/AnalysisCard.vue
@@ -2,7 +2,7 @@
 <script>
 import DustExceptionText from './DustExceptionText.vue'
 import NoDataStatus from './NoDataStatus.vue'
-
+import dayjs from 'dayjs'
 export default {
   props: {
     // 寮傚父鐨勭珯鐐瑰悕绉�
@@ -33,7 +33,7 @@
       default: '寮傚父'
     },
     // 鍥炬爣鍦板潃
-    iconsrc: {
+    icon: {
       type: String,
       default: '111'
     },
@@ -57,11 +57,12 @@
       type:Number,
       default:100
     },
-    // 鏄惁鏄棤鏁版嵁
+    // 鏄惁鏃犳暟鎹�
     isNoDataStatus:{
         type:Boolean,
         default:false
     }
+
   },
   emits:['getAbnormalDataByClick'],
   components: {
@@ -69,13 +70,29 @@
     NoDataStatus
   },
   data() {
-    return {}
+    return {
+      // 瀹℃牳杈呭姪鎸夐挳鏄剧ず
+      // auditButton:false,
+    }
+  },
+
+  computed: {
+    auditButton_1() {
+      let today = dayjs().subtract(1,'day').format('YYYY-MM-DD 00:00:00')
+        if(this.beginTime >= today && this.isNoDataStatus == false) {
+          return  true
+      }
+      return false
+    }
   },
   mounted() {},
   methods: {
     getAbnormalDataByClick(val) {
     this.$emit('getAbnormalDataByClick',val)
     },
+    openDetail() {
+      this.$router.push(`/AuditDetail/${this.beginTime}/${this.endTime}/${this.exceptionType}`)
+    }
   }
 }
 </script>
@@ -84,9 +101,10 @@
   <el-card>
     <template #header>
     <div class="icon-text">
-      <!-- <img :src="iconsrc"  height="24" width="24"> -->
-      <slot/>
+      <!-- <slot/> -->
+      <img :src="icon" height="24" width="24" />
       <div class="exception-name">{{ exceptionName }}</div>
+      <el-button type="danger" size="small" class="audit-button" v-show="auditButton_1" @click="openDetail">瀹℃牳</el-button>
     </div>
 
       <div class="exception-num">
@@ -125,6 +143,10 @@
 .icon-text {
     display:flex;
     margin-bottom:10px;
+    
+}
+.audit-button {
+  margin-left:auto;
 }
 .exception-name {
     font-size:18px;

--
Gitblit v1.9.3