From d7932d42a9c4a08376d542dbff8301e7d985b787 Mon Sep 17 00:00:00 2001 From: hcong <1050828145@qq.com> Date: 星期三, 20 十一月 2024 17:38:11 +0800 Subject: [PATCH] 问题新增与修改页面初始化逻辑修改 --- src/views/fysp/check/components/CompProblemAddOrUpd.vue | 45 +++++++++++++++++++++++++++++++++++---------- 1 files changed, 35 insertions(+), 10 deletions(-) diff --git a/src/views/fysp/check/components/CompProblemAddOrUpd.vue b/src/views/fysp/check/components/CompProblemAddOrUpd.vue index 067a428..940347a 100644 --- a/src/views/fysp/check/components/CompProblemAddOrUpd.vue +++ b/src/views/fysp/check/components/CompProblemAddOrUpd.vue @@ -80,12 +80,6 @@ </el-select> </el-form-item> <el-form-item - v-show=" - problem && - problem.guid && - deepCopyProblem.advice && - deepCopyProblem.advice != '' - " label="闂寤鸿淇" prop="_adviseEdit" :disabled="false" @@ -269,6 +263,7 @@ }, data() { return { + initPropsCount: 0, // 鍒濆棰勮鍥剧墖index initialIndex: -1, // 鍥剧墖閫夋嫨鏈�澶ф暟閲� @@ -332,6 +327,38 @@ this.pictureValidate(); }, deep: true + }, + initPropsCount: { + handler(nv, ov) { + if (nv >= 3) { + this.initOptions(); + } + }, + immediate: true + }, + problem: { + handler(nv, ov) { + if (nv != null && nv != undefined) { + this.initPropsCount++; + } + }, + immediate: true + }, + topTask: { + handler(nv, ov) { + if (nv != null && nv != undefined) { + this.initPropsCount++; + } + }, + immediate: true + }, + subtask: { + handler(nv, ov) { + if (nv != null && nv != undefined) { + this.initPropsCount++; + } + }, + immediate: true } }, computed: { @@ -363,15 +390,13 @@ return array; } }, - mounted() { - this.initOptions(); - }, + mounted() {}, methods: { onProAdviseChange(value) { this.deepCopyProblem._adviseEdit = this.deepCopyProblem.advice; }, handlePictureCardPreview(uploadFile) { - this.initialIndex = this.fileList.indexOf(uploadFile) + this.initialIndex = this.fileList.indexOf(uploadFile); this.previewDialogVisible = true; this.previewDialogImageUrl = uploadFile.url; }, -- Gitblit v1.9.3