From 0bd8b4947527f0d1a3fe445d84fb776ce021507e Mon Sep 17 00:00:00 2001 From: riku <risaku@163.com> Date: 星期四, 21 十一月 2024 10:59:56 +0800 Subject: [PATCH] 1. 修改问题整改界面中左侧列表的状态图标 --- src/views/fysp/check/ProCheck.vue | 61 ++++++++++++++++++++---------- 1 files changed, 41 insertions(+), 20 deletions(-) diff --git a/src/views/fysp/check/ProCheck.vue b/src/views/fysp/check/ProCheck.vue index 8ca7913..68d5b0c 100644 --- a/src/views/fysp/check/ProCheck.vue +++ b/src/views/fysp/check/ProCheck.vue @@ -26,17 +26,18 @@ class="el-scrollbar" v-loading="mainLoading" > - <CompProblemCard - v-if="compProblemCardVisible" - :key="i" - v-for="(p, i) in curProList" - :index="i + 1" - :problem="p" - :subtask="curSubtask.data" - :topTask="topTask" - @updated="onProSubmited" - @submit="updateSubtask" - ></CompProblemCard> + <template v-if="compProblemCardVisible"> + <CompProblemCard + :key="i" + v-for="(p, i) in curProList" + :index="i + 1" + :problem="p" + :subtask="curSubtask.data" + :topTask="topTask" + @updated="onProSubmited" + @submit="updateSubtask" + ></CompProblemCard> + </template> </el-scrollbar> <el-empty v-else description="鏆傛棤璁板綍" v-loading="mainLoading" /> </template> @@ -44,7 +45,7 @@ <el-dialog v-model="proAddOrUpdDialogVisible" :before-close="proAddOrUpdDialogClose" - width="80%" + width="50%" title="鏂板闂" > <CompProblemAddOrUpd @@ -58,7 +59,6 @@ <ArbitraryPhoto v-if="anyPhotoDialog" v-model:dialog-visible="anyPhotoDialog" - title="鍦烘櫙鍥剧墖" :readonly="true" :subtask="curSubtask.data" ref="arbitraryPhotoRef" @@ -134,7 +134,7 @@ click: () => { this.openDeviceShowDialog(); } - }, + } // { // name: '鎵归噺瀹℃牳', // color: 'primary', @@ -279,14 +279,33 @@ //鑾峰彇浠诲姟闂鐨勫鏍告儏鍐� getSubtaskType(s) { let type = 0; + // 鏃犻棶棰� if (s.proNum == 0) { - type = 2; - } else if (s.proCheckedNum == 0) { type = 0; - } else if (s.proCheckedNum < s.proNum) { + } + // 闂鏈鏍� + else if (s.proCheckedNum == 0) { type = 1; - } else { + } + // 闂閮ㄥ垎瀹℃牳 + else if (s.proCheckedNum < s.proNum) { type = 2; + } + // 鏈暣鏀� + else if (s.changeNum < s.proNum) { + type = 3; + } + // 鏁存敼鏈鏍� + else if (s.changeCheckedNum == 0) { + type = 4; + } + // 鏁存敼閮ㄥ垎瀹℃牳 + else if (s.changeCheckedNum < s.changeNum) { + type = 5; + } + // 瀹屽叏瀹℃牳 + else { + type = 6; } return type; }, @@ -307,10 +326,12 @@ }); }, // 闂鍗$墖缁勪欢涓诲姩鍙戣捣鍒锋柊鐖剁粍浠舵暟鎹� - updateSubtask() { + updateSubtask(refresh = true) { this.curSubtask.data.proCheckedNum++; this.curSubtask.type = this.getSubtaskType(this.curSubtask.data); - this.refreshCurrSubtask(); + if (refresh) { + this.refreshCurrSubtask(); + } }, onProSubmited(isOk) { this.proAddOrUpdDialogClose(); -- Gitblit v1.9.3