riku
2023-05-09 0959c095ad9715633d6ccdf10eb3b3d52f0bede1
src/views/check/ProCheck.vue
@@ -21,7 +21,11 @@
      </SearchBar>
    </template>
    <template #aside>
      <SideList :items="subtasks" :loading="sideLoading" @item-click="chooseSubtask"></SideList>
      <SideList
        :items="subtasks"
        :loading="sideLoading"
        @item-click="chooseSubtask"
      ></SideList>
    </template>
    <template #main>
      <ToolBar
@@ -30,7 +34,11 @@
        :buttons="buttons"
        :loading="mainLoading"
      ></ToolBar>
      <el-scrollbar v-if="proPicsCard.length > 0" class="el-scrollbar" v-loading="mainLoading">
      <el-scrollbar
        v-if="proPicsCard.length > 0"
        class="el-scrollbar"
        v-loading="mainLoading"
      >
        <ProblemCard
          v-for="(p, i) in proPicsCard"
          :key="i"
@@ -38,14 +46,14 @@
          @button-click="onProButtonClick"
        ></ProblemCard>
      </el-scrollbar>
      <el-empty v-else description="暂无记录" v-loading="mainLoading"/>
      <el-empty v-else description="暂无记录" v-loading="mainLoading" />
    </template>
  </BaseContentLayout>
</template>
<script>
import taskApi from '@/api/taskApi';
import problemApi from '@/api/problemApi';
import taskApi from '@/api/fysp/taskApi';
import problemApi from '@/api/fysp/problemApi';
import ProCheckProxy from './ProCheckProxy';
import { ElMessageBox, ElNotification, ElMessage } from 'element-plus';
@@ -183,10 +191,10 @@
  methods: {
    //查询子任务统计信息
    onSubmit(formSearch) {
      this.sideLoading = true
      this.mainLoading = true
      this.curProList = []
      this.curSubtask = {}
      this.sideLoading = true;
      this.mainLoading = true;
      this.curProList = [];
      this.curSubtask = {};
      taskApi.getSubtaskSummary(formSearch).then((res) => {
        const list = [];
        res.forEach((s) => {
@@ -200,8 +208,8 @@
        });
        this.subtasks = list;
        if (list.length == 0) {
          this.sideLoading = false
          this.mainLoading = false
          this.sideLoading = false;
          this.mainLoading = false;
        }
      });
    },
@@ -221,15 +229,18 @@
    },
    //点击左侧菜单任务事件
    chooseSubtask(s) {
      this.sideLoading = false
      this.mainLoading = true
      this.curSubtask = s;
      this.sideLoading = false;
      this.mainLoading = true;
      // const controller = new AbortController();
      taskApi.getProBySubtask(s.data.stGuid).then((res) => {
        this.curProList = res;
      }).finally(() => {
        this.mainLoading = false
      });
      taskApi
        .getProBySubtask(s.data.stGuid)
        .then((res) => {
          this.curProList = res;
          this.curSubtask = s;
        })
        .finally(() => {
          this.mainLoading = false;
        });
    },
    // 问题卡片内部按钮点击事件
@@ -270,7 +281,7 @@
                title: '审核成功',
                message: `该问题已${doneMsg}`,
                type: 'success',
                offset: 170
                offset: 170,
              });
            })
            .catch(() => {