hcong
2024-11-20 0cac9e63c68558909f7f99154c17f16f9bfc47fd
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,8 @@
  },
  data() {
    return {
      // fixme 2024.11.20 子组件初始化时机问题
      initPropsCount: 0,
      // 初始预览图片index
      initialIndex: -1,
      // 图片选择最大数量
@@ -332,6 +328,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 +391,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;
    },