From 87958d6d33603fa673cb7c8f5caf2394689959bf Mon Sep 17 00:00:00 2001 From: hcong <1050828145@qq.com> Date: 星期四, 21 十一月 2024 11:00:43 +0800 Subject: [PATCH] 1. 图片选择组件移动到全局组件文件夹 2. 涉及到使用图片选择组件添加图片区域loading 3. 无用页面删除 --- src/views/fysp/check/components/CompProblemAddOrUpd.vue | 55 +++++++++++++++++++++++++++++++++++++++++-------------- 1 files changed, 41 insertions(+), 14 deletions(-) diff --git a/src/views/fysp/check/components/CompProblemAddOrUpd.vue b/src/views/fysp/check/components/CompProblemAddOrUpd.vue index 6fe60eb..1200e69 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" @@ -173,7 +167,7 @@ <el-button type="primary" @click="onSubmit" v-show="!readonly" >淇濆瓨</el-button > - <el-button @click="$emit('submit', false)" v-show="!readonly" + <el-button @click="onCancel" v-show="!readonly" >鍙栨秷</el-button > </el-form-item> @@ -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'; @@ -233,12 +226,11 @@ import deviceApi from '@/api/fysp/deviceApi'; import { useFormConfirm } from '@/composables/formConfirm'; export default { - emits: ['submit'], + emits: ['submit', 'cancel'], components: { 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; }, @@ -561,6 +585,9 @@ } return true; }, + onCancel() { + this.$emit("cancel") + }, onSubmit() { this.$refs.formRef.validate((valid) => { if (valid && this.pictureValidate()) { -- Gitblit v1.9.3