From 18eee6f8818b864d1f8d8fb56298620921f909e4 Mon Sep 17 00:00:00 2001
From: hcong <1050828145@qq.com>
Date: 星期五, 15 十一月 2024 15:49:24 +0800
Subject: [PATCH] bug修改,图片选择组件使用,撤回审核功能

---
 src/views/fysp/check/ProCheck.vue |   97 +++++++++++++++++++++++-------------------------
 1 files changed, 47 insertions(+), 50 deletions(-)

diff --git a/src/views/fysp/check/ProCheck.vue b/src/views/fysp/check/ProCheck.vue
index d5e6803..7dc97a6 100644
--- a/src/views/fysp/check/ProCheck.vue
+++ b/src/views/fysp/check/ProCheck.vue
@@ -8,7 +8,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
@@ -17,18 +21,23 @@
         :buttons="buttons"
         :loading="mainLoading"
       ></ToolBar>
-      <el-scrollbar v-if="curProList.length > 0" class="el-scrollbar" v-loading="mainLoading">
-        <CompProblemCard
-          v-if="compProblemCardVisible"
-          :key="i"
-          v-for="(p, i) in curProList"
-          :index="i + 1"
-          :problem="p"
-          :subtask="curSubtask.data"
-          :topTask="topTask"
-          @updated="onProSubmited"
-          @submit="updateSubtask"
-        ></CompProblemCard>
+      <el-scrollbar
+        v-if="curProList.length > 0"
+        class="el-scrollbar"
+        v-loading="mainLoading"
+      >
+        <template v-if="compProblemCardVisible">
+          <CompProblemCard
+            :key="i"
+            v-for="(p, i) in curProList"
+            :index="i + 1"
+            :problem="p"
+            :subtask="curSubtask.data"
+            :topTask="topTask"
+            @updated="onProSubmited"
+            @submit="updateSubtask"
+          ></CompProblemCard>
+        </template>
       </el-scrollbar>
       <el-empty v-else description="鏆傛棤璁板綍" v-loading="mainLoading" />
     </template>
@@ -36,7 +45,7 @@
   <el-dialog
     v-model="proAddOrUpdDialogVisible"
     :before-close="proAddOrUpdDialogClose"
-    width="80%"
+    width="50%"
     title="鏂板闂"
   >
     <CompProblemAddOrUpd
@@ -47,21 +56,13 @@
       @submited="newProSubmit"
     />
   </el-dialog>
-  <el-dialog
-    v-model="anyPhotoDialog"
-    :before-close="beforeAnyPhotoDialogclose"
-    width="80%"
-    title="浠绘剰鍥剧墖"
-  >
-    <ArbitraryPhoto
-      v-if="anyPhotoDialog"
-      :readonly="true"
-      :subtask="curSubtask.data"
-      ref="arbitraryPhotoRef"
-      @selectByAnyPhonoEvent="handleCloseCheckAnyPhono"
-    >
-    </ArbitraryPhoto>
-  </el-dialog>
+  <ArbitraryPhoto
+    v-if="anyPhotoDialog"
+    v-model:dialog-visible="anyPhotoDialog"
+    :readonly="true"
+    :subtask="curSubtask.data"
+    ref="arbitraryPhotoRef"
+  ></ArbitraryPhoto>
   <el-drawer
     direction="ltr"
     v-model="deviceShowDialog"
@@ -69,7 +70,8 @@
     title="璁炬柦璁惧"
     size="45%"
   >
-    <CompDeviceShowTest v-if="deviceShowDialog" ref="deviceShowRef"> </CompDeviceShowTest>
+    <CompDeviceShowTest v-if="deviceShowDialog" ref="deviceShowRef">
+    </CompDeviceShowTest>
   </el-drawer>
 </template>
 
@@ -77,14 +79,9 @@
 import ArbitraryPhoto from './components/ArbitraryPhoto.vue';
 import taskApi from '@/api/fysp/taskApi';
 import ProCheckProxy from './ProCheckProxy';
-
-import { ElMessageBox, ElNotification, ElMessage } from 'element-plus';
 import CompProblemAddOrUpd from './components/CompProblemAddOrUpd.vue';
-import CompDeviceShow from './components/CompDeviceShow.vue';
-
 import CompProblemCard from './components/CompProblemCard.vue';
 import CompSubTaskStatistic from './components/CompSubTaskStatistic.vue';
-import CompProRecent from './components/CompProRecent.vue';
 import CompDeviceShowTest from './components/CompDeviceShowTest.vue';
 export default {
   components: {
@@ -92,8 +89,7 @@
     CompSubTaskStatistic,
     CompProblemAddOrUpd,
     ArbitraryPhoto,
-    CompDeviceShowTest,
-    CompProRecent
+    CompDeviceShowTest
   },
   data() {
     return {
@@ -126,7 +122,7 @@
           }
         },
         {
-          name: '浠绘剰鍥剧墖',
+          name: '鍦烘櫙鍥剧墖',
           color: 'warning',
           click: () => {
             this.anyPhotoDialog = true;
@@ -138,12 +134,12 @@
           click: () => {
             this.openDeviceShowDialog();
           }
-        },
-        {
-          name: '鎵归噺瀹℃牳',
-          color: 'primary',
-          click: () => {}
         }
+        // {
+        //   name: '鎵归噺瀹℃牳',
+        //   color: 'primary',
+        //   click: () => {}
+        // }
       ]
     };
   },
@@ -239,7 +235,7 @@
     // 鍏抽棴璁惧鍥惧脊绐�
     beforeDeviceShowDialogclose(done) {
       // this.deviceShowDialog = false;
-      done()
+      done();
     },
     // 鍏抽棴浠绘剰鍥剧墖寮圭獥
     beforeAnyPhotoDialogclose() {
@@ -259,9 +255,9 @@
       this.curProList = [];
       this.curSubtask = {};
       const param = {
-        topTaskId: formSearch.topTask.tguid, 
-        sceneTypeId :formSearch.sceneTypeId
-      }
+        topTaskId: formSearch.topTask.tguid,
+        sceneTypeId: formSearch.sceneTypeId
+      };
       taskApi.getSubtaskSummary(param).then((res) => {
         const list = [];
         res.forEach((s) => {
@@ -311,11 +307,12 @@
         });
     },
     // 闂鍗$墖缁勪欢涓诲姩鍙戣捣鍒锋柊鐖剁粍浠舵暟鎹�
-    updateSubtask() {
-      
+    updateSubtask(refresh = true) {
       this.curSubtask.data.proCheckedNum++;
       this.curSubtask.type = this.getSubtaskType(this.curSubtask.data);
-      this.refreshCurrSubtask();
+      if (refresh) {
+        this.refreshCurrSubtask();
+      }
     },
     onProSubmited(isOk) {
       this.proAddOrUpdDialogClose();

--
Gitblit v1.9.3