From 55d42cc7a2e6e21e1f8e06ca80089fe911914ac9 Mon Sep 17 00:00:00 2001 From: hcong <1050828145@qq.com> Date: 星期四, 21 十一月 2024 11:20:16 +0800 Subject: [PATCH] 弹窗,抽屉关闭的操作放在统一包裹组件中 --- src/views/fysp/check/components/CompProblemAddOrUpd.vue | 49 +++++++++++++++++++++++++++++++++++++------------ 1 files changed, 37 insertions(+), 12 deletions(-) diff --git a/src/views/fysp/check/components/CompProblemAddOrUpd.vue b/src/views/fysp/check/components/CompProblemAddOrUpd.vue index 067a428..2cf3bc9 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" @@ -220,7 +214,6 @@ </CompGenericWrapper> </template> <script> -import CompGenericWrapper from './CompGenericWrapper.vue'; import ArbitraryPhoto from './ArbitraryPhoto.vue'; import CompLedgerPhoto from './CompLedgerPhoto.vue'; import CompDevicePhoto from './CompDevicePhoto.vue'; @@ -238,7 +231,6 @@ ArbitraryPhoto, CompDevicePhoto, CompLedgerPhoto, - CompGenericWrapper }, props: { readonly: { @@ -269,6 +261,8 @@ }, data() { return { + // fixme 2024.11.20 瀛愮粍浠跺垵濮嬪寲鏃舵満闂 + initPropsCount: 0, // 鍒濆棰勮鍥剧墖index initialIndex: -1, // 鍥剧墖閫夋嫨鏈�澶ф暟閲� @@ -332,6 +326,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 +389,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; }, @@ -563,6 +587,7 @@ }, onCancel() { this.$emit("cancel") + this.$emit('update:visible', false) }, onSubmit() { this.$refs.formRef.validate((valid) => { -- Gitblit v1.9.3