From 72085226bc9f82a9129b8fbcd17fab1edf9ef270 Mon Sep 17 00:00:00 2001 From: riku <risaku@163.com> Date: 星期五, 05 一月 2024 15:08:19 +0800 Subject: [PATCH] 1. 修复飞行巡检模块中有效率异常详情弹出框无法正常显示的bug; 2.优化各异常类型的折线图配置项生成逻辑; --- 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