riku
2024-11-21 9b2b08c3b44de3d2f76069936dfe5ba0e0ece0aa
1. 修改审核后左侧列表状态和顶部统计数据的
已修改4个文件
36 ■■■■ 文件已修改
src/components.d.ts 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/fysp/check/ProCheck.vue 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/fysp/check/ProCheckProxy.js 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/fysp/check/components/CompProblemCard.vue 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components.d.ts
@@ -25,7 +25,6 @@
    ElCollapseItem: typeof import('element-plus/es')['ElCollapseItem']
    ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
    ElContainer: typeof import('element-plus/es')['ElContainer']
    ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
    ElDescriptions: typeof import('element-plus/es')['ElDescriptions']
    ElDescriptionsItem: typeof import('element-plus/es')['ElDescriptionsItem']
    ElDialog: typeof import('element-plus/es')['ElDialog']
@@ -44,8 +43,6 @@
    ElMenuItemGroup: typeof import('element-plus/es')['ElMenuItemGroup']
    ElOption: typeof import('element-plus/es')['ElOption']
    ElPopover: typeof import('element-plus/es')['ElPopover']
    ElRadio: typeof import('element-plus/es')['ElRadio']
    ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
    ElRow: typeof import('element-plus/es')['ElRow']
    ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
    ElSelect: typeof import('element-plus/es')['ElSelect']
src/views/fysp/check/ProCheck.vue
@@ -34,6 +34,7 @@
          :subtask="curSubtask.data"
          :topTask="topTask"
          @submit="updateSubtask"
          @check="handleProblemCheck"
        ></CompProblemCard>
      </el-scrollbar>
      <el-empty v-else description="暂无记录" v-loading="mainLoading" />
@@ -314,7 +315,7 @@
    // 刷新当前选中子任务
    refreshCurrSubtask(refresh) {
      this.sideLoading = false;
      this.mainLoading = true;
      // this.mainLoading = true;
      setTimeout(() => {
        taskApi
          .getProBySubtask(this.curSubtask.data.stGuid)
@@ -336,9 +337,18 @@
            // this.curSubtask = s;
          })
          .finally(() => {
            this.mainLoading = false;
            // this.mainLoading = false;
          });
      }, 150);
    },
    // 问题审核完成后,更新左侧列表对应子任务状态
    handleProblemCheck(){
      const status = ProCheckProxy.calProStatus(this.curProList)
      this.curSubtask.data.proNum = status.proNum
      this.curSubtask.data.proCheckedNum = status.proCheckedNum
      this.curSubtask.data.changeNum = status.changeNum
      this.curSubtask.data.changeCheckedNum = status.changeCheckedNum
      this.curSubtask.type = this.getSubtaskType(this.curSubtask.data)
    }
  },
  mounted() {}
src/views/fysp/check/ProCheckProxy.js
@@ -16,8 +16,12 @@
    const status = {
      //问题数量
      proNum: proList.length,
      // 问题审核数
      proCheckedNum: 0,
      //整改数量
      changeNum: 0,
      //整改审核数量
      changeCheckedNum: 0,
      //待审核数量
      uncheckNum: 0,
      //已审核通过数量
@@ -44,6 +48,13 @@
        status.uncheckNum++
      else status.passNum++
      if (p.extension3 == proStatus.pass) {
        status.proCheckedNum++
      }
      if (p.extension3 == proStatus.change_pass) {
        status.changeCheckedNum++
      }
      status.changePer =
        String(
          (status.changeNum / status.proNum) * 100
src/views/fysp/check/components/CompProblemCard.vue
@@ -175,7 +175,7 @@
import CompProRecent from './CompProRecent.vue';
import { useCloned } from '@vueuse/core';
export default {
  emits: ['submmit', 'cancel'],
  emits: ['check', 'submit', 'cancel'],
  components: {
    CompProblemAddOrUpd,
    ComChangeEdit,
@@ -340,7 +340,8 @@
            .checkProblem({ pId: pro.guid, action: action })
            .then((res) => {
              if (res.success) {
                this.$emit('submit', false);
                pro.extension3 = status
                this.$emit('check');
              }
            });
        }
@@ -361,7 +362,8 @@
            .checkProblem({ pId: pro.guid, action: action })
            .then((res) => {
              if (res.success) {
                this.$emit('submit', false);
                pro.extension3 = status
                this.$emit('check');
              }
            });
        }