From 8756117a473facf0bf64c9e28f821b52e46cce85 Mon Sep 17 00:00:00 2001 From: riku <risaku@163.com> Date: 星期一, 08 七月 2024 17:38:18 +0800 Subject: [PATCH] 完善问题整改跟踪模块 --- src/views/management/EvaluateSummary.vue | 84 ++++++++++++++++++++++++++++++++++++++++- 1 files changed, 81 insertions(+), 3 deletions(-) diff --git a/src/views/management/EvaluateSummary.vue b/src/views/management/EvaluateSummary.vue index 4c75e2d..45869f4 100644 --- a/src/views/management/EvaluateSummary.vue +++ b/src/views/management/EvaluateSummary.vue @@ -1,18 +1,96 @@ <template> <div class="border-r-small"> - <div class="font-large">椋庨櫓璇勪及</div> - <el-row justify="space-evenly"> + <div ref="titleRef" class="font-large">缁煎悎椋庨櫓璇勪及</div> + <el-row ref="statisticRef" justify="space-evenly"> <el-statistic title="楂橀闄�" :value="10"> </el-statistic> <el-statistic title="涓闄�" :value="10"> </el-statistic> <el-statistic title="浣庨闄�" :value="10"> </el-statistic> </el-row> + <el-table + :data="tableData" + v-loading="loading" + table-layout="fixed" + :row-class-name="tableRowClassName" + :height="tableHeight" + size="small" + > + <el-table-column + fixed="left" + prop="name" + :show-overflow-tooltip="true" + label="鍚嶇О" + width="200" + > + </el-table-column> + <el-table-column prop="planTime" :show-overflow-tooltip="true" label="鏃堕棿"> + </el-table-column> + <el-table-column prop="score" :show-overflow-tooltip="true" label="璇勫垎" width="60"> + </el-table-column> + <el-table-column prop="risk" :show-overflow-tooltip="true" label="椋庨櫓" width="60"> + </el-table-column> + <!-- <el-table-column prop="recheck" :show-overflow-tooltip="true" label="澶嶆牳" width="60"> + </el-table-column> --> + </el-table> </div> </template> -<script setup> +<script> +import { unCalc } from '@/utils/css-util' /** * 瀵瑰畬鎴愮殑浠诲姟杩涜璇勪及椋庨櫓锛屾樉绀洪珮椋庨櫓鍦烘櫙锛屾樉绀哄鏍哥殑鍦烘櫙鐨勬儏鍐� */ +export default { + props: { + height: { + type: String, + default: '200' + } + }, + data() { + return { + tableData: [], + tableHeight: '200' + } + }, + watch: { + height(nV, oV) { + if (nV != oV) { + this.tableHeight = this.calcTableHeight() + } + } + }, + methods: { + calcTableHeight() { + const h1 = this.$refs.titleRef.offsetHeight + const h2 = this.$refs.statisticRef.$el.offsetHeight + const h = h1 + h2 + const r = `calc(${unCalc(this.height)} - ${h}px)` + return r + } + }, + mounted() { + this.tableHeight = this.calcTableHeight() + let i = 0 + while (i < 20) { + this.tableData.push({ + guid: 'SMuheEkjswioSn7A', + name: '涓鐢熸�佹暟瀛楁腐椤圭洰宸℃煡涓鐢熸�佹暟瀛楁腐椤圭洰宸℃煡', + district: '閲戝北鍖�', + planTime: '2024-06-04', + startTime: '2024-06-04 13:31:26', + endTime: '2024-06-04 13:33:37', + userName: '鏈辨寮�', + status: '宸茬粨鏉�', + total: 4, + checked: 2, + score: 90, + risk: '楂�', + recheck: 1 + }) + i++ + } + } +} </script> <style scoped></style> -- Gitblit v1.9.3