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/components/CompProblemCard.vue |  110 +++++++++++++++++++++++++++++++++++++++++++++----------
 1 files changed, 90 insertions(+), 20 deletions(-)

diff --git a/src/views/fysp/check/components/CompProblemCard.vue b/src/views/fysp/check/components/CompProblemCard.vue
index 3db8c37..9ab31b5 100644
--- a/src/views/fysp/check/components/CompProblemCard.vue
+++ b/src/views/fysp/check/components/CompProblemCard.vue
@@ -1,6 +1,11 @@
 <template>
   <el-card class="layout" shadow="hover">
-    <el-steps :active="proStatus.index" finish-status="success" style="" align-center>
+    <el-steps
+      :active="proStatus.index"
+      finish-status="success"
+      style=""
+      align-center
+    >
       <el-step v-for="(s, i) in getSteps" :key="i" :title="s" />
     </el-steps>
 
@@ -30,12 +35,20 @@
     </el-descriptions>
 
     <el-scrollbar>
-      <el-descriptions title=" " :column="2" direction="vertical" size="small" border>
+      <el-descriptions
+        title=" "
+        :column="2"
+        direction="vertical"
+        size="small"
+        border
+      >
         <template v-for="(pic, t) in pics" :key="t">
           <template v-if="pic.path.length > 0">
             <el-descriptions-item
               :label="pic.title"
-              :label-class-name="t == 0 ? 'descriptions-label-1' : 'descriptions-label-2'"
+              :label-class-name="
+                t == 0 ? 'descriptions-label-1' : 'descriptions-label-2'
+              "
             >
               <el-space>
                 <el-image
@@ -59,20 +72,45 @@
     <el-row v-if="true" style="margin-top: 16px">
       <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>鏁存敼妫�楠�</el-button>
-          <el-button type="info" size="small" @click="currProRecent" plain>闂澶嶇幇</el-button>
+          <el-button type="success" size="small" @click="updatePro" plain
+            >闂鏇存</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>
       <el-col :span="12">
         <el-row justify="end" class="btn-group">
-          <el-button type="danger" size="small" @click="deletePro" :disabled="!proStatus.deletable"
+          <el-button
+            type="danger"
+            size="small"
+            @click="deletePro"
+            :disabled="!proStatus.deletable"
             >鍒犻櫎</el-button
           >
-          <el-button type="warning" size="small" @click="rejectPro" :disabled="!proStatus.checkable"
+          <el-button
+            type="danger"
+            size="small"
+            @click="beforePro"
+            :disabled="proStatus.checkable"
+            >鎾ら攢</el-button
+          >
+          <el-button
+            type="warning"
+            size="small"
+            @click="rejectPro"
+            :disabled="!proStatus.checkable"
             >椹冲洖</el-button
           >
-          <el-button type="success" size="small" @click="passPro" :disabled="!proStatus.checkable"
+          <el-button
+            type="success"
+            size="small"
+            @click="passPro"
+            :disabled="!proStatus.checkable"
             >閫氳繃</el-button
           >
         </el-row>
@@ -82,7 +120,7 @@
   <div class="dialog-wrapper">
     <el-dialog
       title="闂鏇存"
-      width="80%"
+      width="50%"
       v-model="proAddOrUpdDialogVisible"
       :before-close="proAddOrUpdDialogClose"
     >
@@ -107,7 +145,7 @@
     />
   </el-dialog>
   <el-dialog
-    width="80%"
+    width="50%"
     title="鏁存敼妫�楠�"
     v-model="changeEditDialogVisible"
     :before-close="changeEditDialogClose"
@@ -124,7 +162,7 @@
   </el-dialog>
   <!-- 闂澶嶇幇 -->
   <el-dialog
-    width="80%"
+    width="50%"
     title="闂澶嶇幇"
     v-model="proRecentDialogVisible"
     :before-close="proRecentDialogClose"
@@ -289,7 +327,7 @@
             })
             .then((res) => {
               if (res.success) {
-                this.$emit('submit')
+                this.$emit('submit');
               }
             });
         }
@@ -301,6 +339,33 @@
     passPro() {
       this.checkPro(true);
     },
+    beforePro() {
+      const pro = this.problem;
+      let status = this.proStatus;
+      let doneMsg;
+      if (status.index <= 2) {
+        doneMsg = '闂鏈鏍�';
+      } else if (status.index <= 3) {
+        doneMsg = '鏁存敼鏈鏍�';
+      }
+      useMessageBoxTip({
+        confirmMsg: `纭鎾ゅ洖鍒�${doneMsg}锛焋,
+        confirmTitle: '瀹℃牳鎾ゅ洖',
+        onConfirm: () => {
+          const { status, action } = ProCheckProxy.proBeforeStatus(
+            pro.extension3
+          );
+          return problemApi
+            .checkProblem({ pId: pro.guid, action: action })
+            .then((res) => {
+              if (res.success) {
+                pro.extension3 = status;
+                this.$emit('submit', false);
+              }
+            });
+        }
+      });
+    },
     checkPro(pass) {
       const pro = this.problem;
       let doneMsg = pass ? '閫氳繃' : '椹冲洖';
@@ -308,13 +373,18 @@
         confirmMsg: `纭鏄惁${doneMsg}璇ラ棶棰橈紵`,
         confirmTitle: '闂瀹℃牳',
         onConfirm: () => {
-          const { status, action } = ProCheckProxy.proNextStatus(pro.extension3, pass);
-          return problemApi.checkProblem({ pId: pro.guid, action: action }).then((res) => {
-            if (res.success) {
-              pro.extension3 = status;
-              this.$emit('submit');
-            }
-          });
+          const { status, action } = ProCheckProxy.proNextStatus(
+            pro.extension3,
+            pass
+          );
+          return problemApi
+            .checkProblem({ pId: pro.guid, action: action })
+            .then((res) => {
+              if (res.success) {
+                pro.extension3 = status;
+                this.$emit('submit', false);
+              }
+            });
         }
       });
     },

--
Gitblit v1.9.3