From 0959c095ad9715633d6ccdf10eb3b3d52f0bede1 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期二, 09 五月 2023 09:31:46 +0800
Subject: [PATCH] 2023.5.9前所有小改动版本记录

---
 src/views/check/ProCheck.vue |   51 +++++++++++++++++++++++++++++++--------------------
 1 files changed, 31 insertions(+), 20 deletions(-)

diff --git a/src/views/check/ProCheck.vue b/src/views/check/ProCheck.vue
index 66ad8d3..2bb34b1 100644
--- a/src/views/check/ProCheck.vue
+++ b/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(() => {

--
Gitblit v1.9.3