From c2f95b0b9090a2394b5b068582b932a5e57b86aa Mon Sep 17 00:00:00 2001 From: zmc <zmc_li@foxmail.com> Date: 星期二, 05 九月 2023 18:19:37 +0800 Subject: [PATCH] 雷达图 新增综合风险排名 数据接入配置 --- src/views/exception/SiteAuditAssistance.vue | 131 ++++++++++++++++++++++++++++++++++++------- 1 files changed, 108 insertions(+), 23 deletions(-) diff --git a/src/views/exception/SiteAuditAssistance.vue b/src/views/exception/SiteAuditAssistance.vue index 49f083e..6bc9746 100644 --- a/src/views/exception/SiteAuditAssistance.vue +++ b/src/views/exception/SiteAuditAssistance.vue @@ -100,10 +100,12 @@ checker: 'admin', checkDate: '', checkerNotes: '', - enterpriseNotes: '' + enterpriseNotes: '', + }, auditTableData: [], - auditNumByTime: 0 + // 瀹℃牳鐘舵�佷笉涓�0 + auditData: [], }; }, setup() { @@ -143,13 +145,39 @@ } }, computed: { - unCheckedNUm() { - return this.total - this.auditNumByTime; + + // 瀹¤鎬绘暟锛堝寘鎷儴鍒嗗鏍革級 + auditTotal(){ + return this.auditData.length }, - // 瀹℃牳姣斾緥 - checkedRate() { - return (this.auditNumByTime / this.total) * 100; - } + // 瑙勮寖瀹¤鎬绘暟 + auditedRegular(){ + let count = 0 + this.auditData.forEach(item => { + if(item.auditStatus == 3){ + count ++ + } + }) + return count + }, + // 閮ㄥ垎瀹℃牳鏁伴噺 + auditPart(){ + let count = 0 + this.auditData.forEach(item => { + if(item.auditStatus == 1 || item.auditStatus == 2){ + count ++ + } + }) + return count + }, + // 寰呭鏍告暟 + unCheckedNUm() { + return this.total - this.auditedRegular; + }, + // 瀹℃牳姣斾緥 + checkedRate() { + return ((this.auditedRegular / this.total) * 100).toFixed(1); + }, }, mounted() { this.backExceptionDataAWeekAgo(); @@ -158,13 +186,13 @@ methods: { /** - * 鏌ョ湅璇ユ鏃堕棿鍐呭凡瀹℃牳鐨勬暟閲� + * 鏌ョ湅璇ユ鏃堕棿鍐呭凡瀹℃牳鐨勬暟鎹� * @param锛� * @returns锛� */ gethasCheckedNumByTime() { submitApi.getAuditNumByTime(this.beginTime, this.endTime).then((res) => { - this.auditNumByTime = res.data.data.length; + this.auditData = res.data.data; }); }, /** @@ -278,6 +306,12 @@ if (enterprise) { this.tableCurrentRowData.enterpriseContent = enterprise; } + + // 鏇存柊鍒嗘瀽鐨勬暟鎹� + setTimeout(() => { + this.gethasCheckedNumByTime(); + }, 1500); + } else { ElMessage.warning('鎻愪氦澶辫触'); } @@ -305,6 +339,11 @@ if (enterpriseContent) { this.tableCurrentRowData.enterpriseContent = enterpriseContent; } + + // 鏇存柊鍒嗘瀽鐨勬暟鎹� + setTimeout(() => { + this.gethasCheckedNumByTime(); + }, 1500); } else { ElMessage.warning('鎻愪氦澶辫触'); } @@ -1270,7 +1309,7 @@ </el-col> </el-row> - <el-row class="anasysis" ref="h2"> + <!-- <el-row class="anasysis" ref="h2"> <el-col :span="6"> <el-card> <el-statistic title="鍏ㄩ儴瀹℃牳鏁�" :value="total" /> @@ -1296,7 +1335,27 @@ </el-statistic> </el-card> </el-col> - </el-row> + </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-col v-show="!isNoData"> @@ -1387,7 +1446,7 @@ plain v-else-if="row.auditStatus == 1 || row.auditStatus == 2" @click="openAuditDiag(row)" - >瀹℃牳</el-button + >寰呭鏍�</el-button > <el-button @@ -1395,7 +1454,7 @@ size="default" type="danger" @click="openAuditDiag(row)" - >瀹℃牳</el-button + >寰呭鏍�</el-button > <!-- <span v-if="row.auditStatus == 3">宸插鏍�</span ><span v-else>瀹℃牳</span> --> @@ -1471,7 +1530,8 @@ /> </el-form-item> </el-form> - <el-card> + + <el-card v-show="tableCurrentRowData.auditStatus==3"> <template #header>瀹℃牳璇︽儏</template> <el-form> <el-form-item label="瀹℃牳浜�">{{ @@ -1485,6 +1545,7 @@ }}</el-form-item> </el-form> </el-card> + <template #footer> <span class="dialog-footer"> <el-button @click="close">鍙栨秷</el-button> @@ -1644,34 +1705,58 @@ .el-row { margin-left: 20px; } - /* 鏉′欢鏌ヨ妯″潡鐨勬牱寮� */ .head-container-search { display: flex; justify-content: space-between; // float: right; } - .head-describtion-text { justify-content: flex-end; margin-bottom: 10px; font-size: 14px; color: gray; } - /* 鏉′欢鏌ヨ妯″潡缁撴潫 */ + + + /*鍒嗘瀽 */ -.anasysis { - margin-bottom: 20px; +// .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; } -:deep(.el-statistic__head) { +.checknum-rate{ + margin-left: 5px; + } +.checknum-blue { font-weight: bold; - font-size: 16px; + color: blue; +} + +.checknum-green { + font-weight: bold; + color: green; +} +.checknum-red { + font-weight: bold; + color: red; } /* 鍒嗘瀽缁撴潫 */ -/* 琛ㄦ牸妯″潡鐨勬牱寮� */ + + +/* 琛ㄦ牸妯″潡鐨勬牱寮� */ :global(.el-table .black-row) { color: black; } -- Gitblit v1.9.3