From c2e8ebad0a7f8b505fe0f34a8e798c1978a4fd96 Mon Sep 17 00:00:00 2001
From: zhaowei <zhaowei>
Date: 星期二, 15 七月 2025 15:25:27 +0800
Subject: [PATCH] 调整代码

---
 src/views/flowable/workflow/TechnicalStatusEvaluation/TechnicalStatusEvaluationApprovalModal.vue |   71 +++++++++++++++++++++++++----------
 1 files changed, 50 insertions(+), 21 deletions(-)

diff --git a/src/views/flowable/workflow/TechnicalStatusEvaluation/TechnicalStatusEvaluationApprovalModal.vue b/src/views/flowable/workflow/TechnicalStatusEvaluation/TechnicalStatusEvaluationApprovalModal.vue
index 963c6bf..8fd1110 100644
--- a/src/views/flowable/workflow/TechnicalStatusEvaluation/TechnicalStatusEvaluationApprovalModal.vue
+++ b/src/views/flowable/workflow/TechnicalStatusEvaluation/TechnicalStatusEvaluationApprovalModal.vue
@@ -4,8 +4,8 @@
            @cancel="handleCancel" centered cancelText="鍏抽棴">
     <a-spin :spinning="spinning">
       <a-form-model ref="form" :model="model" :rules="validatorRules" :labelCol="labelCol" :wrapperCol="wrapperCol">
-        <a-row :gutter="24">
-          <a-col :span="8">
+        <a-row id="outer-row" :gutter="24">
+          <a-col :span="8" class="scroll-col">
             <a-tabs>
               <a-tab-pane tab="鍩虹淇℃伅">
                 <a-row>
@@ -44,17 +44,20 @@
             </a-tabs>
           </a-col>
 
-          <a-col :span="model.evaluationStatus&&model.evaluationStatus!='UNDER_EVALUATION'?10:16">
+          <a-col
+            :span="model.evaluationStatus&&model.evaluationStatus!='UNDER_EVALUATION'&&model.evaluationStatus!='WAIT_EVALUATION'?10:16"
+            class="scroll-col">
 
             <a-tabs :active-key="activeTabKey" @change="handleTabChange">
               <a-tab-pane :key="1" tab="瀹夊叏瑁呯疆妫�鏌�" forceRender
-                          v-if="selectShenpiData.taskDefKey&&selectShenpiData.taskDefKey=='safety_equipment_check'||!Boolean(selectShenpiData.taskDefKey)">
+                          v-if="selectShenpiData.taskDefKey&&selectShenpiData.taskDefKey=='safety_equipment_check'||selectShenpiData.taskDefKey&&selectShenpiData.taskDefKey=='safety_equipment_check_confirm'||!Boolean(selectShenpiData.taskDefKey)">
                 <j-vxe-table ref="editableDetailTable1" rowNumber bordered alwaysEdit keep-source :height="300"
                              :dataSource="detail.safetyEquipmentCheckList"
                              :columns="detail.safetyEquipmentCheckColumns">
                   <template v-slot:safetyEquipmentCheckResult="props">
-                    <j-dict-select-tag v-model="props.row.safetyEquipmentCheckResult" :disabled="disableSubmit"
+                    <j-dict-select-tag v-model="props.row.safetyEquipmentCheckResult"
                                        placeholder="璇烽�夋嫨妫�鏌ョ粨鏋�"
+                                       :disabled="disableSubmit||(model.evaluationStatus!='UNDER_EVALUATION'&&model.evaluationStatus!='WAIT_EVALUATION')||(model.evaluationStatus=='UNDER_EVALUATION'&&selectShenpiData.taskDefKey=='safety_equipment_check_confirm')"
                                        @change="$refs['editableDetailTable'+activeTabKey].validateTable()"
                                        dictCode="yes_no_none" style="width: 100%"/>
                   </template>
@@ -72,8 +75,7 @@
                         </a-form-model-item>
                       </a-col>
                       <a-col :span="24">
-                        <a-form-model-item prop="safetyCheckConfirmComment" :labelCol="labelColLong"
-                                           :wrapperCol="wrapperColLong" label="纭鎰忚">
+                        <a-form-model-item :labelCol="labelColLong" :wrapperCol="wrapperColLong" label="纭鎰忚">
                           <a-textarea placeholder="璇疯緭鍏ユ剰瑙�" v-model="model.safetyCheckConfirmComment"/>
                         </a-form-model-item>
                       </a-col>
@@ -83,12 +85,13 @@
               </a-tab-pane>
 
               <a-tab-pane :key="2" tab="璁惧绮惧害妫�鏌�" forceRender
-                          v-if="selectShenpiData.taskDefKey&&selectShenpiData.taskDefKey=='equipment_precision_check'||!Boolean(selectShenpiData.taskDefKey)">
+                          v-if="selectShenpiData.taskDefKey&&selectShenpiData.taskDefKey=='equipment_precision_check'||selectShenpiData.taskDefKey&&selectShenpiData.taskDefKey=='equipment_precision_check_confirm'||!Boolean(selectShenpiData.taskDefKey)">
                 <j-vxe-table ref="editableDetailTable2" rowNumber bordered
                              alwaysEdit keep-source :height="300"
                              :dataSource="detail.precisionCheckList" :columns="detail.precisionCheckColumns">
                   <template v-slot:precisionCheckResult="props">
-                    <a-input-number v-model="props.row.precisionCheckResult" :disabled="disableSubmit"
+                    <a-input-number v-model="props.row.precisionCheckResult"
+                                    :disabled="disableSubmit||(model.evaluationStatus!='UNDER_EVALUATION'&&model.evaluationStatus!='WAIT_EVALUATION')||(model.evaluationStatus=='UNDER_EVALUATION'&&selectShenpiData.taskDefKey=='equipment_precision_check_confirm')"
                                     @blur="$refs['editableDetailTable'+activeTabKey].validateTable()"
                                     placeholder="璇疯緭鍏ユ鏌ョ粨鏋�" style="width: 100%"/>
                   </template>
@@ -117,12 +120,13 @@
               </a-tab-pane>
 
               <a-tab-pane :key="3" tab="鍏朵粬妫�鏌�" forceRender
-                          v-if="selectShenpiData.taskDefKey&&selectShenpiData.taskDefKey=='other_check'||!Boolean(selectShenpiData.taskDefKey)">
+                          v-if="selectShenpiData.taskDefKey&&selectShenpiData.taskDefKey=='other_check'||selectShenpiData.taskDefKey&&selectShenpiData.taskDefKey=='other_check_confirm'||!Boolean(selectShenpiData.taskDefKey)">
                 <j-vxe-table ref="editableDetailTable3" rowNumber bordered
                              alwaysEdit keep-source :height="300"
                              :dataSource="detail.otherCheckList" :columns="detail.otherCheckColumns">
                   <template v-slot:otherCheckResult="props">
-                    <a-textarea v-model="props.row.otherCheckResult" :rows="1" :disabled="disableSubmit"
+                    <a-textarea v-model="props.row.otherCheckResult" :rows="1"
+                                :disabled="disableSubmit||(model.evaluationStatus!='UNDER_EVALUATION'&&model.evaluationStatus!='WAIT_EVALUATION')||(model.evaluationStatus=='UNDER_EVALUATION'&&selectShenpiData.taskDefKey=='other_check_confirm')"
                                 @blur="$refs['editableDetailTable'+activeTabKey].validateTable()"
                                 placeholder="璇疯緭鍏ユ鏌ョ粨鏋�"
                                 :autoSize="false"/>
@@ -159,7 +163,8 @@
             </a-tabs>
           </a-col>
 
-          <a-col :span="6" v-if="model.evaluationStatus&&model.evaluationStatus!='UNDER_EVALUATION'">
+          <a-col :span="6"
+                 v-if="model.evaluationStatus&&model.evaluationStatus!='UNDER_EVALUATION'&&model.evaluationStatus!='WAIT_EVALUATION'">
             <a-tabs>
               <a-tab-pane tab="缁翠慨宸ョ‘璁�">
                 <a-row>
@@ -349,8 +354,8 @@
         imageSrc: null,
         activeTabKey: 1,
         validatorRules: {
-          confirmDealType: [
-            { required: true, message: '璇烽�夋嫨閫氳繃鎴栭┏鍥�!' }
+          safetyCheckConfirmResult: [
+            { required: true, message: '璇烽�夋嫨纭绫诲瀷' }
           ],
           confirmComment: [
             { required: true, message: '璇疯緭鍏ョ‘璁ゆ剰瑙�!' }
@@ -541,7 +546,7 @@
           .catch(err => {
             this.$notification.error({
               message: '娑堟伅',
-              description: res.message
+              description: err.message
             })
           })
       },
@@ -577,13 +582,16 @@
         this.$refs.form.validate(valid => {
           if (valid) {
             that.confirmLoading = that.spinning = true
-            for (let index = 1; index <= 3; index++) {
-              if (that.$refs['editableDetailTable' + index]) {
-                this.model.tableDetailList = that.$refs['editableDetailTable' + index].getTableData()
-                break
+
+            // 浠呭湪閴村畾涓姸鎬佷紶閫掕〃鏍煎垪琛�
+            if (this.model.evaluationStatus == 'UNDER_EVALUATION') {
+              for (let index = 1; index <= 3; index++) {
+                if (that.$refs['editableDetailTable' + index]) {
+                  this.model.tableDetailList = that.$refs['editableDetailTable' + index].getTableData()
+                  break
+                }
               }
             }
-            console.log('model', this.model.tableDetailList)
 
             httpAction(this.url.approval, this.model, 'put')
               .then((res) => {
@@ -682,8 +690,29 @@
   }
 </script>
 
-<style scoped>
+<style scoped lang="less">
   /deep/ .ant-select-dropdown-menu {
     text-align: left;
   }
+
+  /deep/ .ant-spin-nested-loading {
+    height: 100%;
+
+    .ant-spin-container {
+      height: 100%;
+
+      .ant-form {
+        height: 100%;
+
+        #outer-row {
+          height: 100%;
+
+          .scroll-col {
+            height: 100%;
+            overflow: auto;
+          }
+        }
+      }
+    }
+  }
 </style>
\ No newline at end of file

--
Gitblit v1.9.3