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/views/exception/SiteAuditAssistance.vue | 1259 ++++++++++++++++++++++++++++++----------------------------- 1 files changed, 637 insertions(+), 622 deletions(-) diff --git a/src/views/exception/SiteAuditAssistance.vue b/src/views/exception/SiteAuditAssistance.vue index 6bc9746..333691e 100644 --- a/src/views/exception/SiteAuditAssistance.vue +++ b/src/views/exception/SiteAuditAssistance.vue @@ -1,25 +1,34 @@ <script> -import InputSearch from '@/sfc/InputSearch.vue'; -import ExceptionType from '@/sfc/ExceptionType.vue'; -import TimeSelectWithShortCuts from '@/sfc/TimeSelectWithShortCuts.vue'; -import { useCommonFunction } from '../../utils/common.js'; -import AreaAndmonitorType from '@/sfc/AreaAndmonitorType.vue'; +import InputSearch from '@/sfc/InputSearch.vue' +import ExceptionType from '@/sfc/ExceptionType.vue' +import TimeShortCuts from '@/sfc/TimeShortCuts.vue' +import { useCommonFunction } from '../../utils/common.js' +import AreaAndmonitorType from '@/sfc/AreaAndmonitorType.vue' +import { defineAsyncComponent } from 'vue' // 寮傚父鍥惧舰寮傛缁勪欢 -const DustLineChart = defineAsyncComponent(() => - import('./components/DustLineChart.vue') -); -import submitApi from '@/api/audit/submitApi.js'; -import dayjs from 'dayjs'; -import ButtonClick from '@/sfc/ButtonClick.vue'; -import index from '@/utils/exception_common_function/index.js'; +const DustLineChart = defineAsyncComponent(() => import('./components/DustLineChart.vue')) +import submitApi from '@/api/audit/submitApi.js' +import dayjs from 'dayjs' +import { ElMessage, ElMessageBox } from 'element-plus' +import ButtonClick from '@/sfc/ButtonClick.vue' +import index from '@/utils/exception_common_function/index.js' +import DaySelect from '@/sfc/DaySelect.vue'; +// import {useLoginUserStore} from '@/stores/user.js' +import { useLoginUserStore } from '@/stores/user' +import historyApi from '@/api/historyApi.js' +import time from '@/utils/time.js' +import lineChart from '@/utils/chartFunction/lineChart.js' +import exceptionOption from '@/utils/chartFunction/exceptionOption.js' + export default { components: { ExceptionType, InputSearch, - TimeSelectWithShortCuts, + TimeShortCuts, DustLineChart, AreaAndmonitorType, - ButtonClick + ButtonClick, + DaySelect }, data() { return { @@ -30,6 +39,9 @@ // 閫夋嫨鐨勫紓甯哥被鍨� exceptionName: [] }, + // 鏃ユ湡閫夋嫨 + day:'', + // 鏃ユ湡鏃堕棿閫夋嫨 beginTime: '', endTime: '', // 杩斿洖鐨勬暟鎹� @@ -100,91 +112,161 @@ checker: 'admin', checkDate: '', checkerNotes: '', - enterpriseNotes: '', - + enterpriseNotes: '' }, auditTableData: [], // 瀹℃牳鐘舵�佷笉涓�0 - auditData: [], - }; + auditData: [] + } }, setup() { - const { isExceedOneMonth } = useCommonFunction(); + const { isExceedOneMonth } = useCommonFunction() + const userName = useLoginUserStore() + return { - isExceedOneMonth - }; + isExceedOneMonth,userName + } }, // 鐩戝惉 鍒ゆ柇鎸夐挳鏄惁鍙偣鍑� watch: { selectedRowIndex(newVaue) { - // 澶勪簬琛ㄦ牸鐨勬渶鍚庝竴鏉℃暟鎹� 璁剧疆鈥樹笂涓�鏉♀�欐寜閽笉鍙偣 - if (newVaue === this.displayData.length - 1) { - this.dialog.isPreCantouch = true; + // 澶勪簬琛ㄦ牸鐨勬渶鍚庝竴鏉℃暟鎹� 璁剧疆鈥樹笂涓�鏉♀�欐寜閽笉鍙偣 + if (newVaue === 0) { + this.dialog.isPreCantouch = true //鐢ㄦ埛鍏堢偣浜嗙涓�鏉★紝pre涓簍rue,鐒跺悗鐐瑰嚮鏈�鍚庝竴鏉�,next涓簍rue銆傛鏃朵袱涓寜閽兘琚皝閿� if (this.dialog.isNextCantouch == true) { - this.dialog.isNextCantouch = false; + this.dialog.isNextCantouch = false } } - // 澶勪簬琛ㄦ牸绗竴鏉℃暟鎹� 璁剧疆鈥樹笅涓�鏉♀�欐寜閽笉鍙偣 - else if (newVaue === 0) { - this.dialog.isNextCantouch = true; + // 澶勪簬琛ㄦ牸绗竴鏉℃暟鎹� 璁剧疆鈥樹笂涓�鏉♀�欐寜閽笉鍙偣 + else if (newVaue === this.displayData.length - 1) { + this.dialog.isNextCantouch = true //鐢ㄦ埛鍏堢偣浜嗚〃鏍兼渶鍚庝竴鏉�,next涓簍rue,鐒跺悗鐐瑰嚮绗竴鏉★紝pre涓簍rue銆傛鏃朵袱涓寜閽兘琚皝閿� if (this.dialog.isPreCantouch == true) { - this.dialog.isPreCantouch = false; + this.dialog.isPreCantouch = false } } // 澶勪簬琛ㄦ牸鐨勪腑闂磋 灏嗘寜閽缃负鍙偣鍑荤姸鎬� else { - this.dialog.isPreCantouch = false; - this.dialog.isNextCantouch = false; + this.dialog.isPreCantouch = false + this.dialog.isNextCantouch = false } + }, dialogTableVisible() { - window.addEventListener('resize', this.updateChart); + window.addEventListener('resize', this.updateChart) } }, computed: { - // 瀹¤鎬绘暟锛堝寘鎷儴鍒嗗鏍革級 - auditTotal(){ + auditTotal() { return this.auditData.length }, // 瑙勮寖瀹¤鎬绘暟 - auditedRegular(){ + auditedRegular() { let count = 0 - this.auditData.forEach(item => { - if(item.auditStatus == 3){ - count ++ - } + this.auditData.forEach((item) => { + if (item.auditStatus == 3) { + count++ + } }) return count }, // 閮ㄥ垎瀹℃牳鏁伴噺 - auditPart(){ + auditPart() { let count = 0 - this.auditData.forEach(item => { - if(item.auditStatus == 1 || item.auditStatus == 2){ - count ++ - } + this.auditData.forEach((item) => { + if (item.auditStatus == 1 || item.auditStatus == 2) { + count++ + } }) return count - }, + }, // 寰呭鏍告暟 unCheckedNUm() { - return this.total - this.auditedRegular; + return this.total - this.auditedRegular }, - // 瀹℃牳姣斾緥 - checkedRate() { - return ((this.auditedRegular / this.total) * 100).toFixed(1); - }, + // 瀹℃牳姣斾緥 + checkedRate() { + if (this.total == 0) { + return 0 + } else { + return ((this.auditedRegular / this.total) * 100).toFixed(1) + } + } }, mounted() { - this.backExceptionDataAWeekAgo(); - this.calTableHeight(); + this.backExceptionDataAWeekAgo() + this.calTableHeight() + }, methods: { + /** + * 鏈夋晥鐜囧紓甯� 璁剧疆鎶樼嚎鍥鹃厤缃」 + * @param锛� + * @returns锛� + */ + validProcess() { + // x杞存暟鎹� + let xList = time.ascTime( + this.tableCurrentRowData.beginTime, + this.tableCurrentRowData.endTime, + 15 + ) + + // y杞存暟鎹� + let yList = [] + xList.forEach((item) => { + // 鏌ユ壘璇ユ椂闂寸殑鏁版嵁 + let r = lineChart.findDate(this.dialog.historyData, item) + if (r) { + yList.push(r.dustValue) + } else { + yList.push(null) + } + }) + // 棰滆壊鑳屾櫙鍖洪棿 + // 寰楀埌鏃犳暟鎹殑鏃堕棿鐐规垨flag涓嶇瓑浜嶯鐨勬椂闂寸偣 + let noDataTime = time.invalidTime(this.dialog.historyData, xList) + let rangeTime = time.seriesTime(noDataTime, 15) + // let rangeTime_1 = time.splitTime(rangeTime) + // 寰楀埌鑳屾櫙鍖洪棿鐨勯厤缃� + let areaObj = lineChart.getMarkArea(rangeTime, '寮傚父') + + // 浼犲叆鍙傛暟 + this.dialog.option = exceptionOption.setExceptionChartOption( + xList, + yList, + '', + '', + '', + '', + this.tableCurrentRowData.exception, + areaObj, + this.tableCurrentRowData.exceptionType + ) + }, + + giveDay(val){ + // 灏嗕腑鍥芥爣鍑嗘椂闂磋浆涓烘寚瀹氭牸寮�(璇ョ粍浠惰繑鍥炵殑鏍囧噯鏃堕棿鐨勬牸寮忥紝鎵�浠ュ繀椤荤殑鍔犺繖涓嚱鏁�) + + this.beginTime = dayjs(val).format('YYYY-MM-DD 00:00:00'); + this.endTime = dayjs(val).format('YYYY-MM-DD 23:59:59'); + }, + + /** + * 瀹¤鍐呭淇濆瓨涓鸿崏绋� + * @param锛� + * @returns锛� + */ + saveAudit() { + // 灏嗚緭鍏ユ鍊肩粰褰撳墠琛� + this.tableCurrentRowData.checkerContent = this.auditDialog.checkerNotes + this.tableCurrentRowData.enterpriseContent = this.auditDialog.enterpriseNotes + ElMessage.success('淇濆瓨鎴愬姛') + }, /** * 鏌ョ湅璇ユ鏃堕棿鍐呭凡瀹℃牳鐨勬暟鎹� * @param锛� @@ -192,17 +274,17 @@ */ gethasCheckedNumByTime() { submitApi.getAuditNumByTime(this.beginTime, this.endTime).then((res) => { - this.auditData = res.data.data; - }); + this.auditData = res.data.data + }) }, + /** * 澶氶�夊垪锛堝凡瀹℃牳鐨勮涓嶄細鍔犲叆鍏朵腑锛� * @param * @returns */ handleSelectionChange(val) { - console.log('閫変腑鐨勮涓猴細', val); - this.multipleSelection = val.filter((row) => row.auditStatus != 3); + this.multipleSelection = val.filter((row) => row.auditStatus != 3) }, /** * 瑙﹀彂鎵归噺瀹℃牳 @@ -217,14 +299,14 @@ type: 'warning', center: true }).then(() => { - this.noNoteCheck(this.multipleSelection); + this.noNoteCheck(this.multipleSelection) setTimeout(() => { - this.gethasCheckedNumByTime(); - ElMessage.success('鎵归噺瀹℃牳瀹屾垚'); - }, 1500); - }); + this.gethasCheckedNumByTime() + ElMessage.success('鎵归噺瀹℃牳瀹屾垚') + }, 1500) + }) } else { - ElMessage('鏈�変腑琛ㄦ牸鐨勮'); + ElMessage('鏈�変腑琛ㄦ牸鐨勮') } }, /** @@ -233,10 +315,10 @@ * @returns锛� */ clearSelected() { - this.$refs.table.clearSelection(); + this.$refs.table.clearSelection() }, toggleSelection() { - this.$refs.table.clearSelection(); + this.$refs.table.clearSelection() }, /** *鎻愪氦鎵归噺瀹℃牳銆傞粯璁ゅ鏍镐汉锛岀┖澶囨敞 @@ -245,40 +327,22 @@ */ noNoteCheck(rows) { rows.forEach((item) => { - submitApi.submitAudit('admin', '鏃�', '鏃�', item.id, 3); - item.auditStatus = 3; - }); + submitApi.submitAudit('admin', '鏃�', '鏃�', item.id, 3) + item.auditStatus = 3 + }) }, close() { - // if (this.auditDialog.checkerNotes || this.auditDialog.enterpriseNotes) { - // ElMessageBox.confirm('杩欏皢浼氾紝纭畾瑕佸叧闂悧', '鎻愮ず', - // { - // confirmButtonText: '纭畾', - // cancelButtonText: '鍙栨秷', - // type: 'warning', - // center :'true', - // icon: markRaw(Delete), - // draggable: true, - // }).then(() => { - // ElMessage({ - // type: 'success', - // message: '宸插叧闂�', - // }) - // this.auditDialog.visible = false - // }) - // }else{ - // this.auditDialog.visible = false - // } - this.auditDialog.visible = false; + + this.auditDialog.visible = false }, // 琛ㄦ牸琛岀殑棰滆壊 tableRowClassName({ row }) { if (row.auditStatus == 0) { - return 'black-row'; + return 'black-row' } else if (row.auditStatus == 1 || row.auditStatus == 2) { - return 'deep-gray-row'; + return 'deep-gray-row' } else { - return 'complete--gray-row'; + return 'complete--gray-row' } }, /** @@ -297,59 +361,53 @@ ) .then((res) => { if (res.data.code == 1) { - ElMessage.success('鎻愪氦鎴愬姛'); - this.tableCurrentRowData.auditStatus = status; - this.tableCurrentRowData.checker = user; + ElMessage.success('鎻愪氦鎴愬姛') + this.tableCurrentRowData.auditStatus = status + this.tableCurrentRowData.checker = user if (checker) { - this.tableCurrentRowData.checkerContent = checker; + this.tableCurrentRowData.checkerContent = checker } if (enterprise) { - this.tableCurrentRowData.enterpriseContent = enterprise; + this.tableCurrentRowData.enterpriseContent = enterprise } - + // 鏇存柊鍒嗘瀽鐨勬暟鎹� setTimeout(() => { - this.gethasCheckedNumByTime(); - }, 1500); - + this.gethasCheckedNumByTime() + }, 1500) } else { - ElMessage.warning('鎻愪氦澶辫触'); + ElMessage.warning('鎻愪氦澶辫触') } - this.loading.submitAudit = false; - this.auditDialog.visible = false; - }); + this.loading.submitAudit = false + this.auditDialog.visible = false + }) }, // 鏇存柊瀹℃牳鍐呭 updateAud(exceptionId, checkerContent, enterpriseContent, auditStatus) { submitApi - .updateAudit( - exceptionId, - checkerContent, - enterpriseContent, - auditStatus - ) + .updateAudit(exceptionId, checkerContent, enterpriseContent, auditStatus) .then((res) => { if (res.data.code == 1) { - ElMessage.success('鎻愪氦鎴愬姛'); - this.tableCurrentRowData.auditStatus = auditStatus; + ElMessage.success('鎻愪氦鎴愬姛') + this.tableCurrentRowData.auditStatus = auditStatus if (checkerContent) { - this.tableCurrentRowData.checkerContent = checkerContent; + this.tableCurrentRowData.checkerContent = checkerContent } if (enterpriseContent) { - this.tableCurrentRowData.enterpriseContent = enterpriseContent; + this.tableCurrentRowData.enterpriseContent = enterpriseContent } // 鏇存柊鍒嗘瀽鐨勬暟鎹� setTimeout(() => { - this.gethasCheckedNumByTime(); - }, 1500); + this.gethasCheckedNumByTime() + }, 1500) } else { - ElMessage.warning('鎻愪氦澶辫触'); + ElMessage.warning('鎻愪氦澶辫触') } - this.loading.submitAudit = false; - this.auditDialog.visible = false; - }); + this.loading.submitAudit = false + this.auditDialog.visible = false + }) }, /** * 鎻愪氦瀹℃牳 @@ -358,7 +416,11 @@ */ submitAudit() { // 鍚屾椂濉啓浜嗗鏍镐汉鍛樺拰浼佷笟鐨勫娉� - this.loading.submitAudit = true; + this.loading.submitAudit = true + // 鎶婄櫥闄嗙殑鐢ㄦ埛濮撳悕缁欏鏍镐汉 + if(this.userName.getUserName != '-1'){ + this.auditDialog.checker = this.userName.getUserName + } if (this.auditDialog.checkerNotes && this.auditDialog.enterpriseNotes) { this.sendAudit( this.auditDialog.checker, @@ -366,13 +428,10 @@ this.auditDialog.enterpriseNotes, this.tableCurrentRowData.id, 3 - ); + ) } // 鍙~浜嗗鏍镐汉鍛樺娉� - else if ( - this.auditDialog.checkerNotes && - !this.auditDialog.enterpriseNotes - ) { + else if (this.auditDialog.checkerNotes && !this.auditDialog.enterpriseNotes) { // 绗竴娆″垱寤� if (this.tableCurrentRowData.auditStatus == 0) { this.sendAudit( @@ -381,7 +440,7 @@ this.auditDialog.enterpriseNotes, this.tableCurrentRowData.id, 1 - ); + ) } // 鍙洿鏂� else { @@ -390,14 +449,11 @@ this.auditDialog.checkerNotes, this.auditDialog.enterpriseNotes, 3 - ); + ) } } // 鍙~浜嗕紒涓氬娉ㄥ娉� - else if ( - this.auditDialog.enterpriseNotes && - !this.auditDialog.checkerNotes - ) { + else if (this.auditDialog.enterpriseNotes && !this.auditDialog.checkerNotes) { // 绗竴娆″垱寤� if (this.tableCurrentRowData.auditStatus == 0) { this.sendAudit( @@ -406,7 +462,7 @@ this.auditDialog.enterpriseNotes, this.tableCurrentRowData.id, 2 - ); + ) } else { // 鍙洿鏂� this.updateAud( @@ -414,16 +470,16 @@ this.auditDialog.checkerNotes, this.auditDialog.enterpriseNotes, 3 - ); + ) } } else { - ElMessage.warning('璇峰~鍐欏畬鏁存墠鑳芥彁浜�'); + ElMessage.warning('璇峰~鍐欏畬鏁存墠鑳芥彁浜�') } - this.loading.submitAudit = false; + this.loading.submitAudit = false // 娓呴櫎 - this.auditDialog.checkerNotes = ''; - this.auditDialog.enterpriseNotes = ''; + this.auditDialog.checkerNotes = '' + this.auditDialog.enterpriseNotes = '' }, /** @@ -433,10 +489,23 @@ * @returns锛� */ openAuditDiag(row) { - this.auditDialog.visible = true; - this.tableCurrentRowData = row; - console.log(row); + this.auditDialog.visible = true + this.tableCurrentRowData = row + // 杩涘叆瀹℃牳椤垫椂锛屽皢琛ㄦ牸褰撳墠琛岀殑瀹℃牳淇℃伅缁欒緭鍏ユ + this.auditDialog.checkerNotes = this.tableCurrentRowData.checkerContent + this.auditDialog.enterpriseNotes = this.tableCurrentRowData.enterpriseContent + + // // 鏈鏍� 灏辨妸褰撳墠鐧婚檰鍚嶇粰瀹℃牳浜� + // if(this.tableCurrentRowData.uiRealName == null){ + // this.auditDialog.checker = this.userName.getUserName + // } + // // 宸插鏍� + // else{ + // this.auditDialog.checker = this.tableCurrentRowData.uiRealName + // } + }, + /** * description锛氱偣鍑诲紓甯哥珯鐐瑰悕瀛楁椂 杩斿洖鐨勬暟鎹� @@ -445,19 +514,17 @@ * @returns锛� */ getAbnormalDataByClick(val) { - this.flag.originClick = 1; + this.flag.originClick = 1 - this.tableData = val; - this.total = this.tableData.length; + this.tableData = val + this.total = this.tableData.length // 榛樿鏄剧ず绗竴椤� - this.handleCurrentChange(1); + this.handleCurrentChange(1) }, // 鐐瑰嚮琛ㄦ牸鐨勮鏃� selectTableRow() { // 鑾峰彇褰撳墠琛岀殑绱㈠紩 - this.selectedRowIndex = this.displayData.indexOf( - this.tableCurrentRowData - ); + this.selectedRowIndex = this.displayData.indexOf(this.tableCurrentRowData) }, /** @@ -468,9 +535,13 @@ const abnormalTimeTenMinute = index.descFiftyTime( this.tableCurrentRowData.beginTime, this.tableCurrentRowData.endTime - ); + ) + + // 淇濆瓨鏃犳暟鎹椂琛ㄦ牸鏉℃暟 + this.dialog.exceptionTotal = abnormalTimeTenMinute.length + // 鍘婚櫎渚涚數寮傚父鍜屾帀绾垮尯闂寸殑绗竴涓湁鍏冪礌鐨勫�� - this.dialog.historyData = []; + this.dialog.historyData = [] for (let i = 0; i < abnormalTimeTenMinute.length; i++) { this.dialog.historyData.push({ @@ -479,11 +550,8 @@ dutyCompany: this.tableCurrentRowData.dutyCompany, lst: abnormalTimeTenMinute[i], dustValue: '' - }); + }) } - - // 淇濆瓨鏃犳暟鎹椂琛ㄦ牸鏉℃暟 - this.exceptionTotal = abnormalTimeTenMinute.length; }, // 娈电數鎴栨柇缃戝尯闂存棤鏁版嵁锛岄渶瑕佽ˉ鍏呫�傚叾浠栫殑閮芥湁鏁版嵁锛岀洿鎺ヤ竴娆¤姹傚叏閮ㄦ椂娈靛氨濂� @@ -499,65 +567,57 @@ */ otherExceptionRequest(allTimeArgs, allTime, exceptionBT, exceptionET) { // 鎶樼嚎鍥惧姞杞戒腑鏁堟灉 - this.loading.lineChart = true; - this.$http - .get('/dust/history', { params: allTimeArgs }) - .then((result) => { - this.dialog.allExceptionTimeData = result.data.data; - // 鏂數鎴栨柇缃戞椂閲嶆柊璁剧疆琛ㄦ牸 - if (this.tableCurrentRowData.exceptionType == '0') { - this.setOfflineTbleData(); - } + this.loading.lineChart = true + this.$http.get('/dust/history', { params: allTimeArgs }).then((result) => { + this.dialog.allExceptionTimeData = result.data.data + // 鏂數鎴栨柇缃戞椂閲嶆柊璁剧疆琛ㄦ牸 + if (this.tableCurrentRowData.exceptionType == '0') { + this.setOfflineTbleData() + } - // x杞存棩鏈熸椂闂� - let dateList = []; - // y杞� 瓒呮爣娌圭儫娴撳害 - let dustValue = []; - let timeAndValue = {}; + // x杞存棩鏈熸椂闂� + let dateList = [] + // y杞� 瓒呮爣娌圭儫娴撳害 + let dustValue = [] + let timeAndValue = {} - // 浠庢坊鍔犱簡棣栦綅鍖洪棿鐨勫紑濮嬪拰缁撴潫鏃堕棿杩涜閬嶅巻 淇濊瘉鏃堕棿浠�10鍒嗛挓涓洪棿闅� - timeAndValue = index.keepContinuousByEachFiftyMinutes( - allTime[0], - allTime[3], - this.dialog.allExceptionTimeData - ); - dateList = timeAndValue['xAxis']; - dustValue = timeAndValue['yAxis']; + // 浠庢坊鍔犱簡棣栦綅鍖洪棿鐨勫紑濮嬪拰缁撴潫鏃堕棿杩涜閬嶅巻 淇濊瘉鏃堕棿浠�10鍒嗛挓涓洪棿闅� + timeAndValue = index.keepContinuousByEachFiftyMinutes( + allTime[0], + allTime[3], + this.dialog.allExceptionTimeData + ) + dateList = timeAndValue['xAxis'] + dustValue = timeAndValue['yAxis'] - // 鎻愬彇寮傚父璧峰鏃堕棿鐐瑰湪鏁翠釜鍖洪棿鍐呯殑鏁版嵁绱㈠紩 - let startIndex = dateList.findIndex((item) => item === exceptionBT); - let endIndex = dateList.findIndex((item) => item === exceptionET); + // 鎻愬彇寮傚父璧峰鏃堕棿鐐瑰湪鏁翠釜鍖洪棿鍐呯殑鏁版嵁绱㈠紩 + let startIndex = dateList.findIndex((item) => item === exceptionBT) + let endIndex = dateList.findIndex((item) => item === exceptionET) - // 璁剧疆鎶樼嚎鍥鹃厤缃」 - this.reSetChart( - dateList, - dustValue, - exceptionBT, - exceptionET, - startIndex, - endIndex - ); - this.loading.lineChart = false; - }); + // 璁剧疆鎶樼嚎鍥鹃厤缃」 + this.reSetChart(dateList, dustValue, exceptionBT, exceptionET, startIndex, endIndex) + this.loading.lineChart = false + }) }, /** * description锛氱粯鍒舵姌绾垮浘 * @param锛� x杞存椂闂达紝 y杞存补鐑熸祿搴︼紝 寮傚父寮�濮嬫椂闂达紝寮傚父缁撴潫鏃堕棿锛屽紓甯稿紑濮嬫椂闂村湪鏁翠釜鍖洪棿鐨勭储寮曚笅鏍囷紝寮傚父缁撴潫鏃堕棿鍦ㄦ暣涓尯闂寸殑绱㈠紩涓嬫爣 */ - reSetChart( - xData, - yData, - exceptionBeginTime, - exceptionEndTime, - beginIndex, - endIndex - ) { - this.dialog.option = {}; + reSetChart(xData, yData, exceptionBeginTime, exceptionEndTime, beginIndex, endIndex) { + this.dialog.option = {} switch (this.tableCurrentRowData.exceptionType) { // 鏂數鎴栨柇缃� 鏃堕棿娈� case '0': this.dialog.option = { + title: { + text: this.tableCurrentRowData.exception, + left: '1%', + textStyle:{ + fontSize:14 + } + }, + tooltip: {}, toolbox: { // 宸ュ叿鏍� @@ -576,7 +636,7 @@ name: '鏃堕棿', axisLabel: { formatter: function (value) { - return value.slice(11, -3); + return value.slice(11, -3) } } }, @@ -607,11 +667,20 @@ } } ] - }; - break; + } + break // 瓒呮爣 case '2': + case '5': + case '6': this.dialog.option = { + title: { + text: this.tableCurrentRowData.exception, + left: '1%', + textStyle:{ + fontSize:14 + } + }, tooltip: {}, toolbox: { // 宸ュ叿鏍� @@ -629,7 +698,7 @@ name: '鏃堕棿', axisLabel: { formatter: function (value) { - return value.slice(11, -3); + return value.slice(11, -3) } } }, @@ -648,9 +717,9 @@ itemStyle: { color: 'red' } - }; + } } - return item; + return item }), // 鍙樻崲鎸囧畾鏃堕棿鍖洪棿鐨勮儗鏅鑹� markArea: { @@ -719,11 +788,18 @@ } ] } - }; - break; + } + break // 鏁版嵁瓒呬綆 鍙湁鏃堕棿鐐� case '1': this.dialog.option = { + title: { + text: this.tableCurrentRowData.exception, + left: '1%', + textStyle:{ + fontSize:14 + } + }, tooltip: {}, toolbox: { // 宸ュ叿鏍� @@ -741,7 +817,7 @@ name: '鏃堕棿', axisLabel: { formatter: function (value) { - return value.slice(11, -3); + return value.slice(11, -3) } } }, @@ -760,9 +836,9 @@ itemStyle: { color: 'red' } - }; + } } - return item; + return item }), markLine: { @@ -815,10 +891,17 @@ } ] } - }; - break; + } + break case '3': this.dialog.option = { + title: { + text: this.tableCurrentRowData.exception, + left: '1%', + textStyle:{ + fontSize:14 + } + }, tooltip: {}, toolbox: { // 宸ュ叿鏍� @@ -836,7 +919,7 @@ name: '鏃堕棿', axisLabel: { formatter: function (value) { - return value.slice(11, -3); + return value.slice(11, -3) } } }, @@ -855,9 +938,9 @@ itemStyle: { color: 'red' } - }; + } } - return item; + return item }), // 鍙樻崲鎸囧畾鏃堕棿鍖洪棿鐨勮儗鏅鑹� markArea: { @@ -899,17 +982,23 @@ } ] } - }; - break; + } + break case '4': + case '7': this.dialog.option = { + title: { + text: this.tableCurrentRowData.exception, + left: '1%', + textStyle:{ + fontSize:14 + } + }, tooltip: {}, toolbox: { // 宸ュ叿鏍� feature: { - // dataZoom: { - // yAxisIndex: 'none' - // }, + // 淇濆瓨涓哄浘鐗� saveAsImage: {} } @@ -920,7 +1009,7 @@ name: '鏃堕棿', axisLabel: { formatter: function (value) { - return value.slice(11, -3); + return value.slice(11, -3) } } }, @@ -973,36 +1062,33 @@ } ] } - }; - break; + } + break default: - console.log('娌℃湁璁剧疆璇ュ紓甯哥被鍨嬶紒'); + console.log('娌℃湁璁剧疆璇ュ紓甯哥被鍨嬶紒') } - this.flag.banTouch = 0; + this.flag.banTouch = 0 }, /** * description锛氬垝鍒嗗嚭寮傚父璧峰鏃堕棿锛屾瀯閫犺姹傚墠涓悗鐨勫弬鏁� */ timeAndDataProcessed() { //寮傚父鐨勫紑濮嬫椂闂� 缁撴潫鏃堕棿 - let exceptionBeginTime = this.tableCurrentRowData.beginTime; - let exceptionEndTime = this.tableCurrentRowData.endTime; + let exceptionBeginTime = this.tableCurrentRowData.beginTime + let exceptionEndTime = this.tableCurrentRowData.endTime // beforeAndAfterTime[0]:鍓�45鍒嗛挓鐨勬椂闂寸偣 // beforeAndAfterTime[1]:鍓�15鍒嗛挓鐨勬椂闂寸偣 // beforeAndAfterTime[2]:鍚�15鍒嗛挓鐨勬椂闂寸偣 // beforeAndAfterTime[3]:鍚�45鍒嗛挓鐨勬椂闂寸偣 - let beforeAndAfterTime = index.before45AndAfter45( - exceptionBeginTime, - exceptionEndTime - ); + let beforeAndAfterTime = index.before45AndAfter45(exceptionBeginTime, exceptionEndTime) // 鏋勯�犲紓甯告椂闂村墠鍚庡尯闂存暟鎹姹傚弬鏁�(闄や簡鏂綉涓兘鐢ㄥ埌锛� let paramsAllTime = index.requestGetParms( this.tableCurrentRowData.name, beforeAndAfterTime[0], beforeAndAfterTime[3] - ); + ) // 灏嗗紓甯告暟鎹繘琛岄澶勭悊锛岄殢鍚庡皢缁撴灉浣滀负鎶樼嚎鍥剧殑閰嶇疆椤� this.otherExceptionRequest( @@ -1010,7 +1096,7 @@ beforeAndAfterTime, exceptionBeginTime, exceptionEndTime - ); + ) }, /** @@ -1020,30 +1106,52 @@ // // 涓嶆槸琛ㄦ牸鐨勬渶鍚庝竴琛� if (this.selectedRowIndex < this.displayData.length - 1) { // 鐐瑰嚮杩囩▼涓� 閿佷綇涓婁笅鏉℃寜閽� 鍦ㄨ缃畬鍥惧舰閰嶇疆椤瑰悗瑙i攣 - this.flag.banTouch = 1; + this.flag.banTouch = 1 //寰楀埌涓婁竴琛屾暟鎹储寮� - this.selectedRowIndex = this.selectedRowIndex + 1; + this.selectedRowIndex = this.selectedRowIndex + 1 //璇锋眰鏁版嵁 鏀瑰彉exceedingData // this.setinfo(this.selectedRowIndex); // 寰楀埌涓婁竴琛岀殑鏁版嵁 - this.tableCurrentRowData = this.displayData[this.selectedRowIndex]; - let params = index.requestGetParms( - this.tableCurrentRowData.name, - this.tableCurrentRowData.beginTime, - this.tableCurrentRowData.endTime - ); - this.loading.preButton = true; - this.$http.get('/dust/history', { params: params }).then((response) => { + this.tableCurrentRowData = this.displayData[this.selectedRowIndex] + this.loading.preButton = true + + historyApi.queryHistoryData({ + siteName:this.tableCurrentRowData.name, + beginTime:this.tableCurrentRowData.beginTime, + endTime:this.tableCurrentRowData.endTime + }).then(response => { // 淇濆瓨杩斿洖鐨勮秴鏍囨暟鎹� - this.dialog.historyData = response.data.data; - this.dialog.exceptionTotal = response.data.data.length; + this.dialog.historyData = response.data.data + this.dialog.exceptionTotal = response.data.data.length // 閫昏緫澶勭悊 - this.timeAndDataProcessed(); - this.loading.preButton = false; - }); + + if (this.tableCurrentRowData.exceptionType != '8') { + this.timeAndDataProcessed() + } else { + this.loading.lineChart = true + this.validProcess() + this.loading.lineChart = false + this.flag.banTouch = 0 + } + this.loading.preButton = false + }) + + // let params = index.requestGetParms( + // this.tableCurrentRowData.name, + // this.tableCurrentRowData.beginTime, + // this.tableCurrentRowData.endTime + // ) + // this.$http.get('/dust/history', { params: params }).then((response) => { + // // 淇濆瓨杩斿洖鐨勮秴鏍囨暟鎹� + // this.dialog.historyData = response.data.data + // this.dialog.exceptionTotal = response.data.data.length + // // 閫昏緫澶勭悊 + // this.timeAndDataProcessed() + // this.loading.preButton = false + // }) } }, /** @@ -1053,29 +1161,52 @@ // 涓嶆槸琛ㄦ牸鐨勭涓�琛� if (this.selectedRowIndex !== 0) { // 鐐瑰嚮杩囩▼涓� 閿佷綇涓婁笅鏉℃寜閽� 鍦ㄨ缃畬鍥惧舰閰嶇疆椤瑰悗瑙i攣 - this.flag.banTouch = 1; + this.flag.banTouch = 1 //寰楀埌涓婁竴琛屾暟鎹储寮� - this.selectedRowIndex = this.selectedRowIndex - 1; + this.selectedRowIndex = this.selectedRowIndex - 1 //璇锋眰鏁版嵁 鏀瑰彉exceedingData // 寰楀埌涓婁竴琛岀殑鏁版嵁 - this.tableCurrentRowData = this.displayData[this.selectedRowIndex]; + this.tableCurrentRowData = this.displayData[this.selectedRowIndex] + this.loading.afterButton = true - let params = index.requestGetParms( - this.tableCurrentRowData.name, - this.tableCurrentRowData.beginTime, - this.tableCurrentRowData.endTime - ); - this.loading.afterButton = true; - this.$http.get('/dust/history', { params: params }).then((response) => { + historyApi.queryHistoryData({ + siteName:this.tableCurrentRowData.name, + beginTime:this.tableCurrentRowData.beginTime, + endTime:this.tableCurrentRowData.endTime + }).then(response => { // 淇濆瓨杩斿洖鐨勮秴鏍囨暟鎹� - this.dialog.historyData = response.data.data; - this.dialog.exceptionTotal = response.data.data.length; + this.dialog.historyData = response.data.data + this.dialog.exceptionTotal = response.data.data.length // 閫昏緫澶勭悊 - this.timeAndDataProcessed(); - this.loading.afterButton = false; - }); + + if (this.tableCurrentRowData.exceptionType != '8') { + this.timeAndDataProcessed() + } else { + this.loading.lineChart = true + this.validProcess() + this.loading.lineChart = false + this.flag.banTouch = 0 + } + this.loading.afterButton = false + }) + + + // let params = index.requestGetParms( + // this.tableCurrentRowData.name, + // this.tableCurrentRowData.beginTime, + // this.tableCurrentRowData.endTime + // ) + + // this.$http.get('/dust/history', { params: params }).then((response) => { + // // 淇濆瓨杩斿洖鐨勮秴鏍囨暟鎹� + // this.dialog.historyData = response.data.data + // this.dialog.exceptionTotal = response.data.data.length + // // 閫昏緫澶勭悊 + // this.timeAndDataProcessed() + // this.loading.afterButton = false + // }) } }, @@ -1086,36 +1217,56 @@ */ showDialog(row) { // 鎵撳紑瀵硅瘽妗� - this.dialogTableVisible = true; + this.dialogTableVisible = true // 淇濆瓨褰撳墠琛屾暟鎹� - this.tableCurrentRowData = row; + this.tableCurrentRowData = row // 鑾峰彇褰撳墠琛岀殑绱㈠紩 - this.selectedRowIndex = this.displayData.indexOf(row); + this.selectedRowIndex = this.displayData.indexOf(row) //鏍规嵁褰撳墠琛岀殑缂栧彿锛岃捣濮嬫椂闂存潵 璇锋眰寮傚父鏁版嵁 // 瀵硅姹傚埌鐨勬暟鎹繘琛岄灏炬嫾鎺� // 寰楀埌鍓嶅悗瀹屾暣鏁版嵁杩涜缁樺埗鍥惧舰 - let params = {}; - if (row.name) { - params['siteName'] = row.name; - } - if (row.beginTime) { - params['beginTime'] = row.beginTime; - } - if (row.endTime) { - params['endTime'] = row.endTime; - } + historyApi.queryHistoryData({ + siteName:row.name, + beginTime:row.beginTime, + endTime:row.endTime + }).then(response => { + // 淇濆瓨杩斿洖鐨勮秴鏍囨暟鎹� + this.dialog.historyData = response.data.data + this.dialog.exceptionTotal = response.data.data.length + // 閫昏緫澶勭悊 - this.$http.get('/dust/history', { params: params }).then((response) => { - // 淇濆瓨杩斿洖鐨勮秴鏍囨暟鎹� - this.dialog.historyData = response.data.data; - this.dialog.exceptionTotal = response.data.data.length; - // 閫昏緫澶勭悊 - this.timeAndDataProcessed(); - }); + if (this.tableCurrentRowData.exceptionType != '8') { + this.timeAndDataProcessed() + } else { + this.loading.lineChart = true + this.validProcess() + this.loading.lineChart = false + this.flag.banTouch = 0 + } + }) + + // let params = {} + // if (row.name) { + // params['siteName'] = row.name + // } + // if (row.beginTime) { + // params['beginTime'] = row.beginTime + // } + // if (row.endTime) { + // params['endTime'] = row.endTime + // } + + // this.$http.get('/dust/history', { params: params }).then((response) => { + // // 淇濆瓨杩斿洖鐨勮秴鏍囨暟鎹� + // this.dialog.historyData = response.data.data + // this.dialog.exceptionTotal = response.data.data.length + // // 閫昏緫澶勭悊 + // this.timeAndDataProcessed() + // }) }, /** @@ -1124,44 +1275,45 @@ */ handleSubmit() { if (this.isExceedOneMonth(this.beginTime, this.endTime)) { - alert('鏃堕棿璺ㄥ害涓嶈兘瓒呰繃涓�涓湀'); - return; + alert('鏃堕棿璺ㄥ害涓嶈兘瓒呰繃涓�涓湀') + return } - - this.flag.originClick = 0; - - let params = {}; - params['page'] = this.currentPage; - params['pageSize'] = this.pageSize; + this.flag.originClick = 0 + + let params = {} + params['page'] = this.currentPage + params['pageSize'] = this.pageSize + if (this.form.name) { - params['siteName'] = this.form.name; + params['siteName'] = this.form.name } if (this.form.exceptionName.length != 0) { - params['exceptionType'] = this.form.exceptionName.join(); + params['exceptionType'] = this.form.exceptionName.join() } - params['beginTime'] = this.beginTime; - params['endTime'] = this.endTime; - this.loading.tableLoading = true; - this.loading.queryButton = true; - this.$http - .get('/dust/exceptiondata', { params: params }) - .then((response) => { - // 淇濆瓨杩斿洖鐨� - // this.tableData = response.data.data.rows; - this.displayData = response.data.data.rows; - this.loading.queryButton = false; + params['beginTime'] = this.beginTime + params['endTime'] = this.endTime + this.loading.tableLoading = true + this.loading.queryButton = true - if (response.data.data.total == 0) { - ElMessage('璇ユ椂娈垫棤鏁版嵁'); - this.isNoData = true; - return; - } - this.total = response.data.data.total; - this.loading.tableLoading = false; - // 绉婚櫎绌烘暟鎹姸鎬� - this.isNoData = false; - }); - this.gethasCheckedNumByTime(); + console.log('绔欑偣锛�',params['siteName']); + console.log('绫诲瀷',params['exceptionType']); + this.$http.get('/dust/exceptiondata', { params: params }).then((response) => { + // 淇濆瓨杩斿洖鐨� + // this.tableData = response.data.data.rows; + this.displayData = response.data.data.rows + this.loading.queryButton = false + + if (response.data.data.total == 0) { + ElMessage('璇ユ椂娈垫棤鏁版嵁') + this.isNoData = true + return + } + this.total = response.data.data.total + this.loading.tableLoading = false + // 绉婚櫎绌烘暟鎹姸鎬� + this.isNoData = false + }) + this.gethasCheckedNumByTime() }, /** @@ -1169,34 +1321,34 @@ * @createTime:2023-08-18 */ backExceptionDataAWeekAgo() { - this.loading.tableLoading = true; - let params = {}; + this.loading.tableLoading = true + let params = {} if (this.form.name) { - params['siteName'] = this.form.name; + params['siteName'] = this.form.name } + + if (this.form.exceptionName) { - params['exceptionType'] = this.form.exceptionName; + params['exceptionType'] = this.form.exceptionName } - params['beginTime'] = this.beginTime; - params['endTime'] = this.endTime; + params['beginTime'] = this.beginTime + params['endTime'] = this.endTime - this.$http - .get('/dust/exceptiondata', { params: params }) - .then((response) => { - // 淇濆瓨杩斿洖鐨� - // this.tableData = response.data.data.rows; - this.displayData = response.data.data.rows; + this.$http.get('/dust/exceptiondata', { params: params }).then((response) => { + // 淇濆瓨杩斿洖鐨� + // this.tableData = response.data.data.rows; + this.displayData = response.data.data.rows - if (response.data.data.total == 0) { - ElMessage('璇ユ椂娈垫棤鏁版嵁'); - this.loading.tableLoading = false; - this.isNoData = true; - return; - } - this.loading.tableLoading = false; - this.total = response.data.data.total; - }); - this.gethasCheckedNumByTime(); + if (response.data.data.total == 0) { + ElMessage('璇ユ椂娈垫棤鏁版嵁') + this.loading.tableLoading = false + this.isNoData = true + return + } + this.loading.tableLoading = false + this.total = response.data.data.total + }) + this.gethasCheckedNumByTime() }, /** @@ -1204,26 +1356,26 @@ * @createTime:2023-08-17 */ giveTime(val) { - this.beginTime = dayjs(val[0]).format('YYYY-MM-DD HH:mm:ss'); - this.endTime = dayjs(val[1]).format('YYYY-MM-DD HH:mm:ss'); + this.beginTime = dayjs(val[0]).format('YYYY-MM-DD HH:mm:ss') + this.endTime = dayjs(val[1]).format('YYYY-MM-DD HH:mm:ss') }, // 鍔熻兘锛氳〃鏍奸珮搴︽牴鎹唴瀹硅嚜閫傚簲 calTableHeight() { - const h1 = this.$refs.h1.$el.offsetHeight; - const h2 = this.$refs.h2.$el.offsetHeight; - const h4 = this.$refs.h4.$el.offsetHeight; + const h1 = this.$refs.h1.$el.offsetHeight + const h2 = this.$refs.h2.$el.offsetHeight + const h4 = this.$refs.h4.$el.offsetHeight // 鍏朵腑涓�涓�40鏄洅瀛愮殑鎬诲杈硅窛 - this.tableHeight = `calc(100vh - ${h1}px - ${h2}px - ${h4}px - 20px - 100px - var(--el-main-padding) * 2)`; + this.tableHeight = `calc(100vh - ${h1}px - ${h2}px - ${h4}px - 20px - 10px - var(--el-main-padding) * 2)` // this.tableHeight = `calc(100vh - ${h1}px - ${h4}px - 100px - var(--el-main-padding) * 2)`; }, // 椤靛ぇ灏忔敼鍙樻椂瑙﹀彂 handleSizeChange(val) { - this.pageSize = val; + this.pageSize = val // 鏀瑰彉姣忛〉鏄剧ず鏁扮洰鏃惰烦鍒板綋鍓嶉〉 - this.handleCurrentChange(1); + this.handleCurrentChange(1) }, // 椤靛彿鏀瑰彉鏃惰Е鍙� @@ -1234,128 +1386,107 @@ * @returns锛� */ handleCurrentChange(val) { - console.log('褰撳墠椤典负锛�', val); // 灏嗗綋鍓嶉〉鍙风粰currentPage - this.currentPage = val; + this.currentPage = val // 椤甸潰鍙樺寲鏃惰皟鐢� 鏌ヨ鏁版嵁鍑芥暟 if (this.flag.originClick == 0) { - this.handleSubmit(); + this.handleSubmit() } else if (this.flag.originClick == 1) { - const startIndex = (val - 1) * this.pageSize; - const endIndex = startIndex + this.pageSize; + const startIndex = (val - 1) * this.pageSize + const endIndex = startIndex + this.pageSize - this.displayData = this.tableData.slice(startIndex, endIndex); + this.displayData = this.tableData.slice(startIndex, endIndex) } }, // 琛ㄦ牸搴忓彿閫掑 indexMethod1(index) { - return index + 1 + (this.currentPage - 1) * this.pageSize; + return index + 1 + (this.currentPage - 1) * this.pageSize }, // 琛ㄦ牸搴忓彿閫掑 indexMethod2(index) { - return index + 1; + return index + 1 } } -}; +} </script> <template> <el-row ref="h1"> <el-col> - <el-form :inline="true"> - <div class="head-container-text"> - <el-form-item> - <AreaAndmonitorType></AreaAndmonitorType> - </el-form-item> - <el-form-item> - <InputSearch - isNeedDefaultSite="0" - @submit-value="(n) => (form.name = n)" + <el-card> + <el-form :inline="true"> + <div class="head-container-text"> + <el-form-item> + <AreaAndmonitorType :isHideArea="1"></AreaAndmonitorType> + </el-form-item> + + <el-form-item> + <InputSearch isNeedDefaultSite="0" isNeedRealTimeAdvice="1" :exceptionType="form.exceptionName" :beginTime="beginTime" :endTime="endTime" @submit-value="(n) => (form.name = n)"> + </InputSearch> + </el-form-item> + + <el-form-item> + <DaySelect + @submit-time="giveDay" + :day-begin="beginTime" + ></DaySelect> + </el-form-item> + + <el-form-item> + <TimeShortCuts + @submit-time="giveTime" + timeType="day" + :begin-and-end-time="[beginTime,endTime]" + ></TimeShortCuts> + </el-form-item> + + <el-form-item> + + <ButtonClick + content="鎼滅储" + type="warning" + :loading="loading.queryButton" + @do-search="handleSubmit" + ></ButtonClick> + </el-form-item> + <el-form-item> + <ExceptionType @submit-value="(n) => (form.exceptionName = n)"></ExceptionType> + </el-form-item> + </div> + + <div class="head-container-search"> + <span class="head-describtion-text"> + 閲戝北鍖� {{ beginTime }} 鈥斺�� {{ endTime }} 鎵皹鐩戞祴寮傚父淇℃伅姹囨��</span > - </InputSearch> - </el-form-item> - - <el-form-item> - <TimeSelectWithShortCuts - @submit-time="giveTime" - timeType="month" - ></TimeSelectWithShortCuts> - </el-form-item> - - <el-form-item> - <ExceptionType - @submit-value="(n) => (form.exceptionName = n)" - ></ExceptionType> - </el-form-item> - </div> - - <div class="head-container-search"> - <span class="head-describtion-text"> - 閲戝北鍖� {{ beginTime }} 鈥斺�� {{ endTime }} 鎵皹鐩戞祴寮傚父淇℃伅姹囨��</span - > - <el-form-item> - <!-- <el-button type="warning" :loading="loading.queryButton" @click="handleSubmit"><el-icon - style="margin-right: 6px;font-size: 1.2em;"><i-ep-Search /></el-icon>鏌ヨ</el-button> --> - <ButtonClick - content="鎼滅储" - type="warning" - :loading="loading.queryButton" - @do-search="handleSubmit" - ></ButtonClick> - </el-form-item> - </div> - </el-form> + </div> + </el-form> + </el-card> </el-col> </el-row> - <!-- <el-row class="anasysis" ref="h2"> - <el-col :span="6"> - <el-card> - <el-statistic title="鍏ㄩ儴瀹℃牳鏁�" :value="total" /> - </el-card> + <el-row ref="h2"> + <el-col> + <div class="checknum"> + <div class="checknum-text"> + <el-tag>搴斿鏍告暟</el-tag><span >{{ total }} ({{ checkedRate }}%)</span> + </div> + + <div class="checknum-text"> + <el-tag type="success">宸插鏍告暟</el-tag><span>{{ auditTotal }}</span> + </div> + <div class="checknum-text"> + <el-tag type="info">瑙勮寖瀹℃牳鏁�</el-tag><span>{{ auditedRegular }} </span> + </div> + <div class="checknum-text"> + <el-tag type="warning">閮ㄥ垎瀹℃牳鏁�</el-tag><span>{{ auditPart }}</span> + </div> + <div class="checknum-text"> + <el-tag type="danger">寰呭鏍告暟</el-tag><span>{{ unCheckedNUm }} </span> + </div> + </div> </el-col> - - <el-col :span="6"> - <el-card> - <el-statistic title="寰呭鏍告暟" :value="unCheckedNUm"> </el-statistic> - </el-card> - </el-col> - - <el-col :span="6"> - <el-card> - <el-statistic title="宸插鏍告暟" :value="auditNumByTime" /> - </el-card> - </el-col> - - <el-col :span="6"> - <el-card> - <el-statistic title="瀹℃牳姣斾緥" :value="checkedRate"> - <template #suffix> % </template> - </el-statistic> - </el-card> - </el-col> - </el-row> --> - - - <div class="checknum"> - <el-row class="anasysis" ref="h2"> - <el-col :span="8"> - <span class="checknum-blue">搴斿鏍告暟锛�</span> {{ total }}<span class="checknum-rate">({{ checkedRate }}%) </span> - </el-col> - - <el-col :span="8"> - <div><span class="checknum-green">宸插鏍告暟锛�</span>{{ auditTotal }}</div> - <div>瑙勮寖瀹℃牳鏁帮細{{ auditedRegular }}</div> - <div>閮ㄥ垎瀹℃牳鏁帮細{{ auditPart }}</div> - </el-col > - - <el-col :span="8"> - <span><span class="checknum-red">寰呭鏍告暟锛�</span>{{ unCheckedNUm }}</span> - </el-col> - </el-row> -</div> - + </el-row> <el-row> <el-col v-show="!isNoData"> @@ -1379,60 +1510,18 @@ fixed :index="indexMethod1" /> - <el-table-column prop="name" label="绔欑偣鍚嶇О" show-overflow-tooltip /> - <el-table-column - prop="mnCode" - label="璁惧缂栧彿" - align="center" - show-overflow-tooltip - /> - <el-table-column - prop="exception" - label="寮傚父绫诲瀷" - align="center" - show-overflow-tooltip - /> - <el-table-column - prop="region" - label="鍖哄煙" - align="center" - show-overflow-tooltip - /> - <el-table-column - prop="beginTime" - label="寮�濮嬫椂闂�" - align="center" - show-overflow-tooltip - /> - <el-table-column - prop="endTime" - label="缁撴潫鏃堕棿" - align="center" - show-overflow-tooltip - /> - <el-table-column - prop="typename" - label="鍦烘櫙" - align="center" - show-overflow-tooltip - /> - <el-table-column - prop="address" - label="鍦板潃" - align="center" - show-overflow-tooltip - /> - <el-table-column - prop="dutyCompany" - label="杩愮淮鍟�" - align="center" - show-overflow-tooltip - /> + <el-table-column prop="name" label="鐐逛綅鍚嶇О" show-overflow-tooltip /> + <el-table-column prop="mnCode" label="璁惧缂栫爜" align="center" show-overflow-tooltip /> + <el-table-column prop="exception" label="寮傚父绫诲瀷" align="center" show-overflow-tooltip /> + <el-table-column prop="region" label="鍖哄幙" align="center" show-overflow-tooltip /> + <el-table-column prop="beginTime" label="寮�濮嬫椂闂�" align="center" show-overflow-tooltip /> + <el-table-column prop="endTime" label="缁撴潫鏃堕棿" align="center" show-overflow-tooltip /> + <el-table-column prop="typename" label="鍦烘櫙" align="center" width="82" show-overflow-tooltip /> + <el-table-column prop="address" label="鍦板潃" align="center" show-overflow-tooltip /> + <el-table-column prop="dutyCompany" label="杩愮淮鍟�" align="center" show-overflow-tooltip /> <el-table-column label="鎿嶄綔" align="center" width="200" fixed="right"> <template #default="{ row }"> - <el-button type="primary" @click="showDialog(row)"> - 鏌ョ湅璇︽儏 - </el-button> + <el-button type="primary" @click="showDialog(row)"> 鏌ョ湅璇︽儏 </el-button> <el-button v-if="row.auditStatus == 3" size="default" @@ -1449,11 +1538,7 @@ >寰呭鏍�</el-button > - <el-button - v-else - size="default" - type="danger" - @click="openAuditDiag(row)" + <el-button v-else size="default" type="danger" @click="openAuditDiag(row)" >寰呭鏍�</el-button > <!-- <span v-if="row.auditStatus == 3">宸插鏍�</span @@ -1509,7 +1594,7 @@ <el-form label-position="top"> <el-form-item label="瀹℃牳浜�"> - <el-input v-model="auditDialog.checker"></el-input> + <el-input v-model="userName.getUserName"></el-input> </el-form-item> <el-form-item label="瀹℃牳鎯呭喌"> <el-input @@ -1531,24 +1616,19 @@ </el-form-item> </el-form> - <el-card v-show="tableCurrentRowData.auditStatus==3"> + <el-card v-show="tableCurrentRowData.auditStatus == 3"> <template #header>瀹℃牳璇︽儏</template> <el-form> - <el-form-item label="瀹℃牳浜�">{{ - tableCurrentRowData.checker - }}</el-form-item> - <el-form-item label="瀹℃牳鎯呭喌">{{ - tableCurrentRowData.checkerContent - }}</el-form-item> - <el-form-item label="瀹℃牳浜哄憳">{{ - tableCurrentRowData.enterpriseContent - }}</el-form-item> + <el-form-item label="瀹℃牳浜�">{{ tableCurrentRowData.checker }}</el-form-item> + <el-form-item label="瀹℃牳鎯呭喌">{{ tableCurrentRowData.checkerContent }}</el-form-item> + <el-form-item label="瀹℃牳浜哄憳">{{ tableCurrentRowData.enterpriseContent }}</el-form-item> </el-form> </el-card> <template #footer> <span class="dialog-footer"> <el-button @click="close">鍙栨秷</el-button> + <el-button color="#626aef" :dark="isDark" plain @click="saveAudit">淇濆瓨</el-button> <el-button type="primary" :loading="loading.submitAudit" @@ -1561,47 +1641,24 @@ </template> </el-dialog> - <el-dialog v-model="dialogTableVisible" draggable align-center height="300px"> + <el-dialog + claa="exception-dialog" + v-model="dialogTableVisible" + draggable + align-center + width="700px" + > <!-- 澶� --> <template #header> <div class="diag-head"> <div class="diag-head-text"> - <div> - <span class="diag-head-text1">绔欑偣鍚嶇О锛�</span - >{{ tableCurrentRowData.name }} - </div> + <div><span class="diag-head-text1">鐐逛綅鍚嶇О锛�</span>{{ tableCurrentRowData.name }}</div> + <div><span class="diag-head-text1">璁惧缂栧彿锛�</span>{{ tableCurrentRowData.mnCode }}</div> + <div><span class="diag-head-text1">杩愮淮鍟嗭細</span>{{ tableCurrentRowData.dutyCompany }}</div> + <div> - <span class="diag-head-text1">寮傚父绫诲瀷锛�</span> - <span v-if="tableCurrentRowData.exceptionType == '0'" - >鏂數鎴栨柇缃�</span - > - <span v-else-if="tableCurrentRowData.exceptionType == '1'" - >鏁版嵁瓒呬綆</span - > - <span v-else-if="tableCurrentRowData.exceptionType == '2'" - >瓒呮爣</span - > - <span v-else-if="tableCurrentRowData.exceptionType == '3'" - >鏁版嵁闀挎椂闂存棤娉㈠姩</span - > - <span v-else-if="tableCurrentRowData.exceptionType == '4'" - >閲忕骇绐佸彉寮傚父</span - > - <span v-else-if="tableCurrentRowData.exceptionType == '5'" - >涓磋繎瓒呮爣寮傚父</span - > - <span v-else-if="tableCurrentRowData.exceptionType == '6'" - >鍗曟棩瓒呮爣娆℃暟涓寸晫寮傚父</span - > - <span v-else-if="tableCurrentRowData.exceptionType == '7'" - >婊戝姩骞冲潎鍊煎紓甯�</span - > - </div> - - <div> - <span class="diag-head-text1">寮傚父鏃堕棿娈碉細</span - >{{ tableCurrentRowData.beginTime }} ~ + <span class="diag-head-text1">寮傚父鏃堕棿娈碉細</span>{{ tableCurrentRowData.beginTime }} ~ {{ tableCurrentRowData.endTime }} </div> </div> @@ -1611,14 +1668,14 @@ type="danger" :loading="loading.preButton" :disabled="dialog.isPreCantouch || flag.banTouch" - @click="getPreviousRowData" + @click="getNextRowData" >涓婃潯寮傚父</el-button > <el-button type="danger" :loading="loading.afterButton" :disabled="dialog.isNextCantouch || flag.banTouch" - @click="getNextRowData" + @click="getPreviousRowData" >涓嬫潯寮傚父</el-button > </div> @@ -1644,43 +1701,20 @@ fixed :index="indexMethod2" ></el-table-column> - <el-table-column - fixed - prop="name" - label="绔欑偣鍚嶇О" - show-overflow-tooltip - /> - <el-table-column - prop="mnCode" - label="璁惧缂栧彿" - align="center" - show-overflow-tooltip - /> - <el-table-column - prop="dutyCompany" - label="杩愮淮鍟�" - align="center" - show-overflow-tooltip - /> - <el-table-column - prop="lst" - label="閲囬泦鏃堕棿" - align="center" - show-overflow-tooltip - /> + + <el-table-column prop="lst" label="閲囬泦鏃堕棿" align="center" show-overflow-tooltip /> <el-table-column prop="dustValue" - label="棰楃矑鐗╂祿搴�(mg/m鲁)" + label="TSP(mg/m鲁)" align="center" show-overflow-tooltip /> + <el-table-column prop="flag" label="flag" align="center" show-overflow-tooltip /> </el-table> </div> <template #footer> <el-tag type="success" class="mx-1" effect="dark" round - ><span - class="table-line-lable" - v-show="tableCurrentRowData.exceptionType == '0'" + ><span class="table-line-lable" v-show="tableCurrentRowData.exceptionType == '0'" >缂哄け鏁版嵁锛� </span> <span @@ -1693,9 +1727,7 @@ >寮傚父鏁版嵁锛�</span > <span class="table-line-num">{{ dialog.exceptionTotal }}鏉�</span> - <span v-show="tableCurrentRowData.exceptionType === '0'"> - (閫昏緫璁$畻)</span - > + <span v-show="tableCurrentRowData.exceptionType === '0'"> (閫昏緫璁$畻)</span> </el-tag> </template> </el-dialog> @@ -1706,10 +1738,14 @@ margin-left: 20px; } /* 鏉′欢鏌ヨ妯″潡鐨勬牱寮� */ +.el-card { + margin-top: 10px; + margin-right: 10px; +} .head-container-search { display: flex; justify-content: space-between; - // float: right; + } .head-describtion-text { justify-content: flex-end; @@ -1719,42 +1755,25 @@ } /* 鏉′欢鏌ヨ妯″潡缁撴潫 */ - - /*鍒嗘瀽 */ -// .anasysis { -// margin-bottom: 20px; -// } -// :deep(.el-statistic__head) { -// font-weight: bold; -// font-size: 16px; -// } .checknum { - border: 1px solid orange; - margin-bottom: 10px; - margin-left: 20px; - margin: 0px 5px 10px 20px; + margin: 10px 5px 20px 20px; + display: flex; } -.checknum-rate{ - margin-left: 5px; - } -.checknum-blue { - font-weight: bold; - color: blue; +.checknum-text { + font-size: 14px; + margin-right: 50px; +} +.el-tag { + font-size: 14px; + vertical-align: baseline; } -.checknum-green { - font-weight: bold; - color: green; +.checknum-rate { + margin-left: 5px; } -.checknum-red { - font-weight: bold; - color: red; -} + /* 鍒嗘瀽缁撴潫 */ - - - /* 琛ㄦ牸妯″潡鐨勬牱寮� */ :global(.el-table .black-row) { @@ -1767,7 +1786,7 @@ :global(.el-table .deep-gray-row) { color: #7f9fcf; } -//瀵硅瘽妗嗘爣棰� +/* 瀵硅瘽妗嗘爣棰� */ .el-form-item__labe { font-weight: bold; } @@ -1776,28 +1795,25 @@ margin-right: 20px; } .check-button { - // justify-content: flex-end; float: right; margin-top: 10px; margin-right: 20px; } - +.el-table { + color: #333333; +} /* 琛ㄦ牸妯″潡缁撴潫 */ /* 鏌ョ湅璇︽儏瀵硅瘽妗嗘ā鍧楃殑鏍峰紡 */ -.diag-head { - // 瀵硅瘽妗嗗ご閮ㄥ尯鍩� - min-height: 200px; - // border: 1px solid #fdc2db; -} + .diag-head-text1 { - // 瀵硅瘽妗嗗ご閮ㄧ殑灞炴�у瓧娈靛姞绮� + /* 瀵硅瘽妗嗗ご閮ㄧ殑灞炴�у瓧娈靛姞绮� */ font-weight: bold; } .diag-head-text > div { - // 瀵硅瘽妗嗗紓甯告椂闂存 + /* 瀵硅瘽妗嗗紓甯告椂闂存 */ margin-top: 15px; } @@ -1809,14 +1825,13 @@ } .chart-jump-button { - // 鈥樹笂涓�鏉♀�欙紝鈥樹笅涓�鏉♀�� 鎸夐挳 - min-height: 30px; - width: 200px; - float: right; + + display: flex; + justify-content: right; } .line-chart { - // 寮傚父鎶樼嚎鍥� + /* 寮傚父鎶樼嚎鍥� */ width: 920px; height: 300px; margin-bottom: 20px; -- Gitblit v1.9.3