From 056ea576d820729878ffd62cd54cd7598e72d07e Mon Sep 17 00:00:00 2001 From: riku <risaku@163.com> Date: 星期二, 29 七月 2025 16:07:31 +0800 Subject: [PATCH] 新增图片超出限制,无法选中功能 --- src/views/overlay-clue/report/ClueReport.vue | 95 +++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 91 insertions(+), 4 deletions(-) diff --git a/src/views/overlay-clue/report/ClueReport.vue b/src/views/overlay-clue/report/ClueReport.vue index dabd554..b952e9b 100644 --- a/src/views/overlay-clue/report/ClueReport.vue +++ b/src/views/overlay-clue/report/ClueReport.vue @@ -2,6 +2,7 @@ <!-- 娓呭崟璇︽儏 --> <CloseButton v-show="show" @close="closeEdit"> <el-button + v-if="!isInternal" class="push-btn" :type="clueData.cuploaded ? 'success' : 'danger'" @click="pushCheck" @@ -20,6 +21,30 @@ <div>閫�</div> <div>鍙�</div> <div>棣�</div> + </template> + </div> + </el-button> + <el-button + v-else-if="clueTask" + class="push-btn" + :type="clueTask.finished ? 'success' : 'danger'" + @click="finishTask" + :disabled="clueTask.finished" + > + <div class="flex-col"> + <template v-if="clueTask.finished"> + <el-icon><Check /></el-icon> + <div>浠�</div> + <div>鍔�</div> + <div>瀹�</div> + <div>鎴�</div> + </template> + <template v-else> + <el-icon><Upload /></el-icon> + <div>缁�</div> + <div>鏉�</div> + <div>浠�</div> + <div>鍔�</div> </template> </div> </el-button> @@ -56,20 +81,37 @@ </el-scrollbar> </div> </CloseButton> + <ClueTaskEdit + v-model="clueTaskDialog" + :clue-task="clueTask" + :clue-data="clueData" + :create="isCreateMode" + @on-submit="handelClueTaskEdit" + ></ClueTaskEdit> </template> <script> import ClueReportClue from './components/ClueReportClue.vue'; import ClueReportConclusion from './components/ClueReportConclusion.vue'; import ClueReportQuestion from './components/ClueReportQuestion.vue'; +import ClueTaskEdit from '@/views/overlay-clue/task/ClueTaskEdit.vue'; + import { useMessageBoxTip } from '@/composables/messageBox'; import clueApi from '@/api/clue/clueApi'; +import clueTaskApi from '@/api/clue/clueTaskApi'; export default { + inject: { + // 鏄惁鏄唴閮ㄧ嚎绱㈢浉鍏虫搷浣� + isInternal: { + default: false + } + }, components: { ClueReportClue, ClueReportConclusion, - ClueReportQuestion + ClueReportQuestion, + ClueTaskEdit }, props: { clueData: { @@ -80,11 +122,20 @@ }, show: Boolean }, - emits: ['update:show', 'pushed'], + emits: ['update:show', 'pushed', 'onClueTaskChange'], data() { return { - clueTask: undefined + clueTask: undefined, + clueTaskDialog: false, + isCreateMode: true }; + }, + watch: { + clueData(nV, oV) { + if (nV && nV != oV) { + this.getClueTask(); + } + } }, methods: { closeEdit() { @@ -101,11 +152,47 @@ }, pushClue() { return clueApi.pushClue(this.clueData.cid).then((res) => { + this.finishTask(); this.$emit('pushed', res); }); }, - publishTask() { + getClueTask() { + clueTaskApi + .fetchClueTask({ + clueId: this.clueData.cid, + internalTask: this.isInternal + }) + .then((res) => { + this.isCreateMode = res.data.length == 0; + if (res.data.length > 0) { + this.clueTask = res.data[0]; + } else { + this.clueTask = undefined; + } + }); + }, + publishTask() { + this.clueTaskDialog = true; + }, + handelClueTaskEdit() { + this.getClueTask(); + this.$emit('onClueTaskChange'); + }, + finishTask() { + useMessageBoxTip({ + confirmMsg: '鏄惁缁撴潫绾跨储浠诲姟锛�', + confirmTitle: '缁撴潫绾跨储浠诲姟', + onConfirm: () => { + return clueTaskApi + .finishClueTask(this.clueTask.guid) + .then((res) => { + if (res.data == 1) { + this.clueTask.finished = true; + } + }); + } + }); } } }; -- Gitblit v1.9.3