From c4bcc6e78ecaec6e9ea68802be7c1d3a7b063512 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期四, 21 十一月 2024 13:08:07 +0800
Subject: [PATCH] Merge remote-tracking branch 'supervisionVue/hc-dataproduct-v1112' into lsf-dataproduct-1024

---
 src/views/fysp/check/components/CompProblemAddOrUpd.vue |   42 ++++++++++++++++++++++++++++++++++--------
 1 files changed, 34 insertions(+), 8 deletions(-)

diff --git a/src/views/fysp/check/components/CompProblemAddOrUpd.vue b/src/views/fysp/check/components/CompProblemAddOrUpd.vue
index 2f58db3..2cf3bc9 100644
--- a/src/views/fysp/check/components/CompProblemAddOrUpd.vue
+++ b/src/views/fysp/check/components/CompProblemAddOrUpd.vue
@@ -214,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';
@@ -232,7 +231,6 @@
     ArbitraryPhoto,
     CompDevicePhoto,
     CompLedgerPhoto,
-    CompGenericWrapper
   },
   props: {
     readonly: {
@@ -263,6 +261,8 @@
   },
   data() {
     return {
+      // fixme 2024.11.20 瀛愮粍浠跺垵濮嬪寲鏃舵満闂
+      initPropsCount: 0,
       // 鍒濆棰勮鍥剧墖index
       initialIndex: -1,
       // 鍥剧墖閫夋嫨鏈�澶ф暟閲�
@@ -327,10 +327,37 @@
       },
       deep: true
     },
+    initPropsCount: {
+      handler(nv, ov) {
+        if (nv >= 3) {
+          this.initOptions();
+        }
+      },
+      immediate: true
+    },
     problem: {
       handler(nv, ov) {
-        this.initOptions();
-      }
+        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: {
@@ -362,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;
     },
@@ -562,6 +587,7 @@
     },
     onCancel() {
       this.$emit("cancel")
+      this.$emit('update:visible', false)
     },
     onSubmit() {
       this.$refs.formRef.validate((valid) => {

--
Gitblit v1.9.3