From 0825e9e96a6f2d4b71a51d32dae1302f2496c4d1 Mon Sep 17 00:00:00 2001 From: zmc <zmc_li@foxmail.com> Date: 星期四, 23 十一月 2023 16:58:27 +0800 Subject: [PATCH] 1.增加了风险模型的跳转逻辑 2.增加了风险模型的组件 --- src/views/exception/components/CompFlightInspection.vue | 80 ++++++++++++++++++++++++++++++--------- 1 files changed, 61 insertions(+), 19 deletions(-) diff --git a/src/views/exception/components/CompFlightInspection.vue b/src/views/exception/components/CompFlightInspection.vue index dbd2081..01b7aea 100644 --- a/src/views/exception/components/CompFlightInspection.vue +++ b/src/views/exception/components/CompFlightInspection.vue @@ -33,8 +33,8 @@ type: String, default: '' }, - // 鏈堜唤 - month:{ + // 鏃ユ椂闂存垨鑰呮湀鏃堕棿 + time:{ type:String, default:'' }, @@ -42,6 +42,12 @@ showAll: { type: Boolean, default: true + }, + + // 0浠h〃鏃ユ椂闂达紝1浠h〃鏈堟椂闂� + timeType:{ + type:Number, + default:-1 } }, components: { @@ -179,7 +185,6 @@ } }, setup() { - // provide('search',readonly(form)) const { isExceedOneMonth } = useCommonFunction() return { isExceedOneMonth @@ -221,17 +226,26 @@ this.backExceptionDataAWeekAgo() } }, - siteName(){ - this.beginTime = dayjs(this.month).startOf('month').format('YYYY-MM-DD HH:mm:ss') - this.endTime = dayjs(this.month).endOf('month').format('YYYY-MM-DD HH:mm:ss') - this.backExceptionDataAWeekAgo() - this.getShopNames() - }, - month(){ - this.beginTime = dayjs(this.month).startOf('month').format('YYYY-MM-DD HH:mm:ss') - this.endTime = dayjs(this.month).endOf('month').format('YYYY-MM-DD HH:mm:ss') - this.backExceptionDataAWeekAgo() - this.getShopNames() + // siteName(){ + // if(this.siteName!=''){ + // this.beginTime = dayjs(this.month).startOf('month').format('YYYY-MM-DD HH:mm:ss') + // this.endTime = dayjs(this.month).endOf('month').format('YYYY-MM-DD HH:mm:ss') + // this.backExceptionDataAWeekAgo() + // this.getShopNames() + // } + + // }, + + timeType(){ + if(this.timeType == '0'){ + this.beginTime = dayjs(this.time).format('YYYY-MM-DD 00:00:00') + this.endTime = dayjs(this.time).format('YYYY-MM-DD 23:59:59') + }else if(this.timeType == '1'){ + this.beginTime = dayjs(this.time).startOf('month').format('YYYY-MM-DD HH:mm:ss') + this.endTime = dayjs(this.time).endOf('month').format('YYYY-MM-DD HH:mm:ss') + } + this.backExceptionDataAWeekAgo() + this.getShopNames() } }, computed: { @@ -379,6 +393,12 @@ mounted() { this.getSiteNume() + + // 椋炶宸℃椤甸潰锛岃繘鍘诲姞杞� + if(this.showAll == true){ + this.backExceptionDataAWeekAgo() + this.getShopNames() + } }, methods: { @@ -413,7 +433,9 @@ // let rangeTime_1 = time.splitTime(rangeTime) // 寰楀埌鑳屾櫙鍖洪棿鐨勯厤缃� let areaObj = lineChart.getMarkArea(rangeTime, '寮傚父') - + // let lineColor = lineChart.getLineColor(rangeTime,xList) + let lineColor = [] + // console.log('绾挎',lineColor); // 浼犲叆鍙傛暟 this.dialog.option = exceptionOption.setExceptionChartOption( xList, @@ -424,6 +446,7 @@ '', this.tableCurrentRowData.exception, areaObj, + lineColor, this.tableCurrentRowData.exceptionType ) }, @@ -535,6 +558,7 @@ startIndex, endIndex, this.tableCurrentRowData.exception, + '', '', this.tableCurrentRowData.exceptionType ) @@ -1201,10 +1225,11 @@ align="center" show-overflow-tooltip /> - <el-table-column prop="flag" label="flag" align="center" show-overflow-tooltip /> + <el-table-column prop="flag" label="鏁版嵁鏍囪瘑" align="center" show-overflow-tooltip /> </el-table> </div> <template #footer> + <div class="dialog-footer"> <el-tag type="success" class="mx-1" effect="dark" round ><span class="table-line-lable" v-show="tableCurrentRowData.exceptionType == '0'" >缂哄け鏁版嵁锛� @@ -1214,13 +1239,20 @@ tableCurrentRowData.exceptionType == '1' || tableCurrentRowData.exceptionType == '2' || tableCurrentRowData.exceptionType == '3' || - tableCurrentRowData.exceptionType == '4' + tableCurrentRowData.exceptionType == '4' || + tableCurrentRowData.exceptionType == '5' || + tableCurrentRowData.exceptionType == '6' || + tableCurrentRowData.exceptionType == '7' || + tableCurrentRowData.exceptionType == '8' " >寮傚父鏁版嵁锛�</span > <span class="table-line-num">{{ dialog.exceptionTotal }}鏉�</span> <span v-show="tableCurrentRowData.exceptionType == '0'"> (閫昏緫璁$畻)</span> </el-tag> + <el-text v-show="tableCurrentRowData.exceptionType == '8'" type="warning" class="dialog-footer-text">鏁版嵁鏍囪瘑A涓烘暟鎹暱鏈熺己澶�,绯荤粺鑷姩琛ュ叏</el-text> + <!-- <el-text class="mx-1" type="warning">Warning</el-text> --> + </div> </template> </el-dialog> </div> @@ -1359,9 +1391,19 @@ } .mx-1 { - position: absolute; + /* position: absolute; left: 10px; - bottom: 10px; + bottom: 10px; */ + justify-content: flex-start; +} +.dialog-footer{ + display: flex; +} +.dialog-footer-text { + justify-content: flex-end; + margin-left: auto; + font-size: 14px; + /* color: #333333; */ } /* 鏌ョ湅璇︽儏瀵硅瘽妗嗘ā鍧楃粨鏉� */ </style> -- Gitblit v1.9.3