hcong
2024-11-20 d7932d42a9c4a08376d542dbff8301e7d985b787
问题新增与修改页面初始化逻辑修改
已修改1个文件
36 ■■■■ 文件已修改
src/views/fysp/check/components/CompProblemAddOrUpd.vue 36 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/fysp/check/components/CompProblemAddOrUpd.vue
@@ -263,6 +263,7 @@
  },
  data() {
    return {
      initPropsCount: 0,
      // 初始预览图片index
      initialIndex: -1,
      // 图片选择最大数量
@@ -327,10 +328,37 @@
      },
      deep: true
    },
    problem: {
    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: {
@@ -362,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;
    },