From f37d45b8998ea08a42002579ecc103244bdac17b Mon Sep 17 00:00:00 2001 From: riku <risaku@163.com> Date: 星期四, 21 十一月 2024 11:06:56 +0800 Subject: [PATCH] Merge remote-tracking branch 'supervisionVue/hc-dataproduct-v1112' into lsf-dataproduct-1024 --- src/views/fysp/check/components/CompProblemCard.vue | 149 ++++++++++++++++++++----------------------------- 1 files changed, 62 insertions(+), 87 deletions(-) diff --git a/src/views/fysp/check/components/CompProblemCard.vue b/src/views/fysp/check/components/CompProblemCard.vue index 9ab31b5..d97b17b 100644 --- a/src/views/fysp/check/components/CompProblemCard.vue +++ b/src/views/fysp/check/components/CompProblemCard.vue @@ -93,13 +93,15 @@ >鍒犻櫎</el-button > <el-button + v-if="proStatus.name.indexOf('涓嶉�氳繃') != -1" type="danger" size="small" - @click="beforePro" + @click="revokePro" :disabled="proStatus.checkable" - >鎾ら攢</el-button + >鎾ら攢椹冲洖</el-button > <el-button + v-else type="warning" size="small" @click="rejectPro" @@ -107,6 +109,18 @@ >椹冲洖</el-button > <el-button + v-if=" + proStatus.name.indexOf('涓嶉�氳繃') == -1 && + proStatus.name.indexOf('閫氳繃') != -1 + " + type="danger" + size="small" + @click="revokePro" + :disabled="proStatus.checkable" + >鎾ら攢閫氳繃</el-button + > + <el-button + v-else type="success" size="small" @click="passPro" @@ -117,63 +131,39 @@ </el-col> </el-row> </el-card> - <div class="dialog-wrapper"> - <el-dialog - title="闂鏇存" - width="50%" - v-model="proAddOrUpdDialogVisible" - :before-close="proAddOrUpdDialogClose" - > - <CompProblemAddOrUpd - v-if="proAddOrUpdDialogVisible" - :problem="deepCopyPro" - :subtask="deepCopySubtask" - :topTask="deepCopyTopTask" - ref="compProblemAddOrUpdRef" - @submited="onProSubmited" - /> - </el-dialog> - </div> - <el-dialog width="80%" title="鏁存敼鎻愪氦" v-model="addChangeDialogVisible"> - <ComChangeEdit - :changeType="0" - v-if="addChangeDialogVisible" - :problemId="problem.guid" - :subtask="subtask" - :month="month" - @submited="onAddChangeSubmited" - /> - </el-dialog> - <el-dialog - width="50%" - title="鏁存敼妫�楠�" - v-model="changeEditDialogVisible" - :before-close="changeEditDialogClose" - > - <ComChangeEdit - :changeType="1" - v-if="changeEditDialogVisible" - :problemId="problem.guid" - :oldChangeFileList="problem.mediafileList" - :subtask="subtask" - :month="month" - @submited="onChangeSubmited" - /> - </el-dialog> + <CompProblemAddOrUpd + title="闂鏇存" + v-if="proAddOrUpdDialogVisible" + v-model:visible="proAddOrUpdDialogVisible" + :problem="deepCopyPro" + :subtask="subtask" + :topTask="topTask" + ref="compProblemAddOrUpdRef" + @cancel="onProCanceled" + @submit="onProSubmited" + /> + <!-- 鏁存敼 --> + <ComChangeEdit + :title="changeType == 1 ? '鏁存敼妫�楠�' : '鏁存敼鎻愪氦'" + v-if="changeDialogVisible" + v-model:visible="changeDialogVisible" + :changeType="changeType" + :problemId="problem.guid" + :subtask="subtask" + :month="month" + :oldChangeFileList="problem.mediafileList" + @cancel="onChangeCanceled" + @submit="onChangeSubmited" + /> <!-- 闂澶嶇幇 --> - <el-dialog - width="50%" + <CompProRecent title="闂澶嶇幇" - v-model="proRecentDialogVisible" - :before-close="proRecentDialogClose" - > - <CompProRecent - v-if="proRecentDialogVisible" - :subtask="subtask" - :topTask="topTask" - :problem="problem" - /> - </el-dialog> + v-if="proRecentDialogVisible" + v-model:visible="proRecentDialogVisible" + :subtask="subtask" + :topTask="topTask" + :problem="problem" + /> </template> <script> @@ -185,6 +175,7 @@ import CompProRecent from './CompProRecent.vue'; import { useCloned } from '@vueuse/core'; export default { + emits: ['submmit', 'cancel'], components: { CompProblemAddOrUpd, ComChangeEdit, @@ -221,9 +212,10 @@ default: 1 } }, - emits: ['submit'], data() { return { + changeDialogVisible: false, + changeType: -1, addChangeDialogVisible: false, // 杩戞湡鎯呭喌 proRecentDialogVisible: false, @@ -291,30 +283,19 @@ } }, methods: { - onAddChangeSubmited() { - this.$emit('updated', true); - this.addChangeDialogVisible = false; - }, - // 杩戞湡鎯呭喌寮圭獥鍏抽棴 - proRecentDialogClose() { - this.proRecentDialogVisible = false; - }, - newProblem() { - this.proAddOrUpdDialogVisible = true; + onProCanceled() { + this.proAddOrUpdDialogVisible = false; }, onProSubmited(isOk) { - this.$emit('updated', isOk); + this.$emit('submit', isOk); this.proAddOrUpdDialogVisible = false; + }, + onChangeCanceled() { + this.changeDialogVisible = false; }, onChangeSubmited(isOk) { - this.$emit('updated', isOk); - this.changeEditDialogVisible = false; - }, - proAddOrUpdDialogClose() { - this.proAddOrUpdDialogVisible = false; - }, - changeEditDialogClose() { - this.changeEditDialogVisible = false; + this.$emit('submit', isOk); + this.changeDialogVisible = false; }, deletePro() { useMessageBoxTip({ @@ -339,7 +320,7 @@ passPro() { this.checkPro(true); }, - beforePro() { + revokePro() { const pro = this.problem; let status = this.proStatus; let doneMsg; @@ -359,7 +340,6 @@ .checkProblem({ pId: pro.guid, action: action }) .then((res) => { if (res.success) { - pro.extension3 = status; this.$emit('submit', false); } }); @@ -381,20 +361,14 @@ .checkProblem({ pId: pro.guid, action: action }) .then((res) => { if (res.success) { - pro.extension3 = status; this.$emit('submit', false); } }); } }); }, - addChange() { - this.addChangeDialogVisible = true; - }, updatePro() { this.deepCopyPro = useCloned(this.problem).cloned.value; - this.deepCopySubtask = useCloned(this.subtask).cloned.value; - this.deepCopyTopTask = useCloned(this.topTask).cloned.value; this.$nextTick(() => { this.proAddOrUpdDialogVisible = true; }); @@ -414,10 +388,11 @@ updateChange() { this.getCurrentMouth(); if (!this.problem.ischanged) { - this.addChange(); + this.changeType = 0; } else { - this.changeEditDialogVisible = true; + this.changeType = 1; } + this.changeDialogVisible = true; }, currProRecent() { this.proRecentDialogVisible = true; -- Gitblit v1.9.3