From 441700673a26144cfcf93b87e0bdcdb06958dabe Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期一, 25 十一月 2024 16:06:23 +0800
Subject: [PATCH] 1. 修复问题新增对话框中,无法正确上传图片的问题 2. 工地施工阶段可选项更新

---
 src/views/fysp/check/components/CompProblemCard.vue |  256 ++++++++++++++++++++++++++++++---------------------
 1 files changed, 150 insertions(+), 106 deletions(-)

diff --git a/src/views/fysp/check/components/CompProblemCard.vue b/src/views/fysp/check/components/CompProblemCard.vue
index 9ab31b5..534d6fb 100644
--- a/src/views/fysp/check/components/CompProblemCard.vue
+++ b/src/views/fysp/check/components/CompProblemCard.vue
@@ -1,13 +1,17 @@
 <template>
-  <el-card class="layout" shadow="hover">
-    <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>
+  <el-card class="layout" shadow="never">
+    <!-- <el-row justify="space-between"> -->
+    <div >
+      <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>
+    </div>
+    <!-- </el-row> -->
 
     <el-descriptions :column="3" size="small">
       <template #title>
@@ -85,95 +89,92 @@
       </el-col>
       <el-col :span="12">
         <el-row justify="end" class="btn-group">
-          <el-button
+          <el-button type="danger" size="small" @click="deletePro" :disabled="false"
+            >鍒犻櫎</el-button
+          >
+          <!-- <el-button
             type="danger"
             size="small"
             @click="deletePro"
             :disabled="!proStatus.deletable"
             >鍒犻櫎</el-button
-          >
+          > -->
+          <!-- 瀹℃牳椹冲洖鎿嶄綔 -->
           <el-button
+            v-if="
+              this.problem.extension3 == 'fail' ||
+              this.problem.extension3 == 'change_fail'
+            "
             type="danger"
             size="small"
-            @click="beforePro"
+            @click="revokePro"
             :disabled="proStatus.checkable"
-            >鎾ら攢</el-button
+            >鎾ら攢椹冲洖</el-button
           >
           <el-button
+            v-else
             type="warning"
             size="small"
             @click="rejectPro"
             :disabled="!proStatus.checkable"
-            >椹冲洖</el-button
+            >瀹℃牳椹冲洖</el-button
           >
           <el-button
+            v-if="
+              this.problem.extension3 == 'pass' ||
+              this.problem.extension3 == 'change_pass'
+            "
+            type="danger"
+            size="small"
+            @click="revokePro"
+            :disabled="proStatus.checkable"
+            >鎾ら攢閫氳繃</el-button
+          >
+          <el-button
+            v-else
             type="success"
             size="small"
             @click="passPro"
             :disabled="!proStatus.checkable"
-            >閫氳繃</el-button
+            >瀹℃牳閫氳繃</el-button
           >
         </el-row>
       </el-col>
     </el-row>
   </el-card>
-  <div class="dialog-wrapper">
-    <el-dialog
-      title="闂鏇存"
-      width="50%"
-      v-model="proAddOrUpdDialogVisible"
-      :before-close="proAddOrUpdDialogClose"
-    >
-      <CompProblemAddOrUpd
-        v-if="proAddOrUpdDialogVisible"
-        :problem="deepCopyPro"
-        :subtask="deepCopySubtask"
-        :topTask="deepCopyTopTask"
-        ref="compProblemAddOrUpdRef"
-        @submited="onProSubmited"
-      />
-    </el-dialog>
-  </div>
-  <el-dialog width="80%" title="鏁存敼鎻愪氦" v-model="addChangeDialogVisible">
-    <ComChangeEdit
-      :changeType="0"
-      v-if="addChangeDialogVisible"
-      :problemId="problem.guid"
-      :subtask="subtask"
-      :month="month"
-      @submited="onAddChangeSubmited"
-    />
-  </el-dialog>
-  <el-dialog
-    width="50%"
-    title="鏁存敼妫�楠�"
-    v-model="changeEditDialogVisible"
-    :before-close="changeEditDialogClose"
-  >
-    <ComChangeEdit
-      :changeType="1"
-      v-if="changeEditDialogVisible"
-      :problemId="problem.guid"
-      :oldChangeFileList="problem.mediafileList"
-      :subtask="subtask"
-      :month="month"
-      @submited="onChangeSubmited"
-    />
-  </el-dialog>
+  <CompProblemAddOrUpd
+    title="闂鏇存"
+    v-if="proAddOrUpdDialogVisible"
+    v-model:visible="proAddOrUpdDialogVisible"
+    :problem="deepCopyPro"
+    :subtask="subtask"
+    :topTask="topTask"
+    ref="compProblemAddOrUpdRef"
+    @cancel="onProCanceled"
+    @submit="onProSubmited"
+  />
+  <!-- 鏁存敼 -->
+  <ComChangeEdit
+    :title="changeType == 1 ? '鏁存敼妫�楠�' : '鏁存敼鎻愪氦'"
+    v-if="changeDialogVisible"
+    v-model:visible="changeDialogVisible"
+    :changeType="changeType"
+    :problemId="problem.guid"
+    :subtask="subtask"
+    :month="month"
+    :oldChangeFileList="problem.mediafileList"
+    @cancel="onChangeCanceled"
+    @submit="onChangeSubmited"
+  />
   <!-- 闂澶嶇幇 -->
-  <el-dialog
-    width="50%"
+  <CompProRecent
     title="闂澶嶇幇"
-    v-model="proRecentDialogVisible"
-    :before-close="proRecentDialogClose"
-  >
-    <CompProRecent
-      v-if="proRecentDialogVisible"
-      :subtask="subtask"
-      :topTask="topTask"
-      :problem="problem"
-    />
-  </el-dialog>
+    v-if="proRecentDialogVisible"
+    v-model:visible="proRecentDialogVisible"
+    :subtask="subtask"
+    :topTask="topTask"
+    :problem="problem"
+  />
 </template>
 
 <script>
@@ -185,6 +186,7 @@
 import CompProRecent from './CompProRecent.vue';
 import { useCloned } from '@vueuse/core';
 export default {
+  emits: ['check', 'submit', 'cancel'],
   components: {
     CompProblemAddOrUpd,
     ComChangeEdit,
@@ -221,9 +223,10 @@
       default: 1
     }
   },
-  emits: ['submit'],
   data() {
     return {
+      changeDialogVisible: false,
+      changeType: -1,
       addChangeDialogVisible: false,
       // 杩戞湡鎯呭喌
       proRecentDialogVisible: false,
@@ -241,11 +244,11 @@
         },
         {
           bef: '闂寰呮暣鏀�',
-          aft: '闂宸叉暣鏀�'
+          aft: '鏁存敼宸蹭笂浼�'
         },
         {
           bef: '鏁存敼寰呭鏍�',
-          aft: '鏁存敼宸插鏍�'
+          aft: '闂宸叉暣鏀�'
         }
       ]
     };
@@ -291,30 +294,17 @@
     }
   },
   methods: {
-    onAddChangeSubmited() {
-      this.$emit('updated', true);
-      this.addChangeDialogVisible = false;
-    },
-    // 杩戞湡鎯呭喌寮圭獥鍏抽棴
-    proRecentDialogClose() {
-      this.proRecentDialogVisible = false;
-    },
-    newProblem() {
-      this.proAddOrUpdDialogVisible = true;
+    onProCanceled() {
+      this.proAddOrUpdDialogVisible = false;
     },
     onProSubmited(isOk) {
-      this.$emit('updated', isOk);
+      this.$emit('submit', isOk);
       this.proAddOrUpdDialogVisible = false;
     },
+    onChangeCanceled() {},
     onChangeSubmited(isOk) {
-      this.$emit('updated', isOk);
-      this.changeEditDialogVisible = false;
-    },
-    proAddOrUpdDialogClose() {
-      this.proAddOrUpdDialogVisible = false;
-    },
-    changeEditDialogClose() {
-      this.changeEditDialogVisible = false;
+      this.$emit('submit', isOk);
+      this.changeDialogVisible = false;
     },
     deletePro() {
       useMessageBoxTip({
@@ -339,7 +329,7 @@
     passPro() {
       this.checkPro(true);
     },
-    beforePro() {
+    revokePro() {
       const pro = this.problem;
       let status = this.proStatus;
       let doneMsg;
@@ -360,7 +350,7 @@
             .then((res) => {
               if (res.success) {
                 pro.extension3 = status;
-                this.$emit('submit', false);
+                this.$emit('check');
               }
             });
         }
@@ -382,19 +372,14 @@
             .then((res) => {
               if (res.success) {
                 pro.extension3 = status;
-                this.$emit('submit', false);
+                this.$emit('check');
               }
             });
         }
       });
     },
-    addChange() {
-      this.addChangeDialogVisible = true;
-    },
     updatePro() {
       this.deepCopyPro = useCloned(this.problem).cloned.value;
-      this.deepCopySubtask = useCloned(this.subtask).cloned.value;
-      this.deepCopyTopTask = useCloned(this.topTask).cloned.value;
       this.$nextTick(() => {
         this.proAddOrUpdDialogVisible = true;
       });
@@ -414,10 +399,11 @@
     updateChange() {
       this.getCurrentMouth();
       if (!this.problem.ischanged) {
-        this.addChange();
+        this.changeType = 0;
       } else {
-        this.changeEditDialogVisible = true;
+        this.changeType = 1;
       }
+      this.changeDialogVisible = true;
     },
     currProRecent() {
       this.proRecentDialogVisible = true;
@@ -428,14 +414,14 @@
 <style scoped>
 .layout {
   background-color: transparent;
-  margin-top: 20px;
+  margin-bottom: 20px;
   /* border: none; */
-  border-color: rgba(0, 0, 0, 0.308);
+  /* border-color: rgba(0, 0, 0, 0.308); */
 }
 
 .image {
-  width: 200px;
-  height: 210px;
+  width: 240px;
+  height: 250px;
   border-radius: 4px;
 }
 
@@ -470,3 +456,61 @@
   background-color: var(--el-color-success-light-3);
 }
 </style>
+
+<!-- 姝ラ鏉¤嚜瀹氫箟鏍峰紡 -->
+<style scoped>
+:deep(.el-steps--simple){
+  background: #fffbf731;
+}
+
+:deep(.is-wait .el-step__icon){
+  height: 17px;
+  width: 17px;
+  margin-top: 3px;
+}
+
+:deep(.is-wait .is-text .el-step__icon-inner) {
+  font-size: var(--el-font-size-small);
+}
+
+:deep(.is-success .el-step__icon){
+  height: 17px;
+  width: 17px;
+  margin-top: 3px;
+}
+
+:deep(.is-success .is-text .el-step__icon-inner) {
+  font-size: var(--el-font-size-small);
+}
+
+:deep(.el-step__head.is-process) {
+  border-color: var(--el-color-danger);
+  color: var(--el-color-danger)
+}
+
+:deep(.el-step__head.is-wait) {
+  border-color: var(--el-text-color-placeholder);
+  color: var(--el-text-color-placeholder)
+}
+
+:deep(.el-step__head.is-success) {
+  border-color: var(--el-color-success-light-3);
+  color: var(--el-color-success-light-3)
+}
+
+:deep(.el-step__title.is-process) {
+  color: var(--el-color-danger);
+  font-weight: bolder;
+  font-size: var(--el-font-size-large);
+}
+
+:deep(.el-step__title.is-wait) {
+  color: var(--el-text-color-placeholder);
+  font-size: var(--el-font-size-small);
+}
+
+:deep(.el-step__title.is-success) {
+  color: var(--el-color-success-light-3);
+  font-size: var(--el-font-size-small);
+}
+</style>

--
Gitblit v1.9.3