hcong
2024-10-21 13272e92a6c98daad06aa166a6674bf4dac7cc4b
src/views/fysp/check/components/CompProblemCard.vue
@@ -60,14 +60,7 @@
      <el-col :span="12">
        <el-row justify="start" class="btn-group">
          <el-button type="success" size="small" @click="updatePro" plain>问题更正</el-button>
          <el-button
            type="primary"
            size="small"
            @click="updateChange"
            plain
            :disabled="!proStatus.changeable"
            >整改检验</el-button
          >
          <el-button type="primary" size="small" @click="updateChange" plain>整改检验</el-button>
          <el-button type="info" size="small" @click="currProRecent" plain>问题复现</el-button>
        </el-row>
      </el-col>
@@ -86,14 +79,31 @@
      </el-col>
    </el-row>
  </el-card>
  <el-dialog v-model="proAddOrUpdDialogVisible" :before-close="proAddOrUpdDialogClose" width="80%">
    <CompProblemAddOrUpd
      v-if="proAddOrUpdDialogVisible"
      :problem="deepCopyPro"
      :subtask="deepCopySubtask"
      :topTask="deepCopyTopTask"
      ref="compProblemAddOrUpdRef"
      @submited="onProSubmited"
  <div class="dialog-wrapper">
    <el-dialog
      title="问题更正"
      width="80%"
      v-model="proAddOrUpdDialogVisible"
      :before-close="proAddOrUpdDialogClose"
    >
      <CompProblemAddOrUpd
        v-if="proAddOrUpdDialogVisible"
        :problem="deepCopyPro"
        :subtask="deepCopySubtask"
        :topTask="deepCopyTopTask"
        ref="compProblemAddOrUpdRef"
        @submited="onProSubmited"
      />
    </el-dialog>
  </div>
  <el-dialog width="80%" title="整改提交" v-model="addChangeDialogVisible">
    <ComChangeEdit
      :changeType="0"
      v-if="addChangeDialogVisible"
      :problemId="problem.guid"
      :subtask="subtask"
      :month="month"
      @submited="onAddChangeSubmited"
    />
  </el-dialog>
  <el-dialog
@@ -103,6 +113,7 @@
    :before-close="changeEditDialogClose"
  >
    <ComChangeEdit
      :changeType="1"
      v-if="changeEditDialogVisible"
      :problemId="problem.guid"
      :oldChangeFileList="problem.mediafileList"
@@ -118,11 +129,12 @@
    v-model="proRecentDialogVisible"
    :before-close="proRecentDialogClose"
  >
    <CompProRecent
      v-if="proRecentDialogVisible"
    <CompProRecent
      v-if="proRecentDialogVisible"
      :subtask="subtask"
      :topTask="topTask"
      :problem="problem"/>
      :problem="problem"
    />
  </el-dialog>
</template>
@@ -174,6 +186,7 @@
  emits: ['submit'],
  data() {
    return {
      addChangeDialogVisible: false,
      // 近期情况
      proRecentDialogVisible: false,
      month: -1,
@@ -199,10 +212,7 @@
      ]
    };
  },
  mounted() {
    console.log(this.topTask);
  },
  mounted() {},
  computed: {
    // 问题名称
    title() {
@@ -243,6 +253,10 @@
    }
  },
  methods: {
    onAddChangeSubmited() {
      this.$emit('updated', true);
      this.addChangeDialogVisible = false;
    },
    // 近期情况弹窗关闭
    proRecentDialogClose() {
      this.proRecentDialogVisible = false;
@@ -255,8 +269,6 @@
      this.proAddOrUpdDialogVisible = false;
    },
    onChangeSubmited(isOk) {
      console.log("zhenggaisubmit");
      this.$emit('updated', isOk);
      this.changeEditDialogVisible = false;
    },
@@ -266,7 +278,23 @@
    changeEditDialogClose() {
      this.changeEditDialogVisible = false;
    },
    deletePro() {},
    deletePro() {
      useMessageBoxTip({
        confirmMsg: '是否删除问题',
        confirmTitle: '确定',
        onConfirm: () => {
          return problemApi
            .deleteProblem({
              pid: this.problem.guid
            })
            .then((res) => {
              if (res.success) {
                this.$emit('submit')
              }
            });
        }
      });
    },
    rejectPro() {
      this.checkPro(false);
    },
@@ -290,9 +318,10 @@
        }
      });
    },
    addChange() {
      this.addChangeDialogVisible = true;
    },
    updatePro() {
      console.log("clone", this.topTask);
      this.deepCopyPro = useCloned(this.problem).cloned.value;
      this.deepCopySubtask = useCloned(this.subtask).cloned.value;
      this.deepCopyTopTask = useCloned(this.topTask).cloned.value;
@@ -300,7 +329,7 @@
        this.proAddOrUpdDialogVisible = true;
      });
    },
    updateChange() {
    getCurrentMouth() {
      // 使用Date对象解析日期字符串
      var date = new Date(this.subtask.subtask.planstarttime);
      // 获取月份信息,月份是从0开始的,所以需要加1
@@ -311,7 +340,14 @@
      // 获取年份
      var year = date.getFullYear();
      this.month = `${year}-${this.month}`;
      this.changeEditDialogVisible = true;
    },
    updateChange() {
      this.getCurrentMouth();
      if (!this.problem.ischanged) {
        this.addChange();
      } else {
        this.changeEditDialogVisible = true;
      }
    },
    currProRecent() {
      this.proRecentDialogVisible = true;