riku
2024-11-21 af5a8d80bca9b8c08543238a370ea3c70c8c59b1
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;
    },