From a261a43492fa9c4bdf054e1bdd503069dadac2d4 Mon Sep 17 00:00:00 2001
From: zhaowei <zhaowei>
Date: 星期四, 24 七月 2025 15:12:40 +0800
Subject: [PATCH] 设备台账详情增加各工单标签页以及跳转对应页面功能

---
 src/views/eam/equipment/modules/EamEquipmentModal.vue             |   82 ++++++++++++++++----
 src/mixins/JeecgListMixin.js                                      |    4 
 src/views/eam/equipment/EamEquipmentLedger.vue                    |   41 +++++-----
 src/views/eam/technical/EamTechnicalStatusEvaluationOrderList.vue |  106 +++++++++++++++-----------
 4 files changed, 148 insertions(+), 85 deletions(-)

diff --git a/src/mixins/JeecgListMixin.js b/src/mixins/JeecgListMixin.js
index 686383d..3ac2a01 100644
--- a/src/mixins/JeecgListMixin.js
+++ b/src/mixins/JeecgListMixin.js
@@ -299,7 +299,9 @@
       // 鎵撳紑璇︽儏鎶藉眽鏃剁鐢ㄨ澶囩紪鐮併�佽澶囧悕绉拌緭鍏ユ
       this.$refs.modalForm.disSeach = true;
       // 璋冪敤鎶藉眽琛ㄥ崟缁勪欢涓殑娓呴櫎琛ㄥ崟楠岃瘉鏂规硶
-      this.$refs.modalForm.removeValidate()
+      this.$nextTick(()=>{
+        if(this.$refs.modalForm.$refs.form)this.$refs.modalForm.$refs.form.clearValidate()
+      })
     },
     /* 瀵煎嚭 */
     handleExportXls2(){
diff --git a/src/views/eam/equipment/EamEquipmentLedger.vue b/src/views/eam/equipment/EamEquipmentLedger.vue
index 8958c11..f1a896f 100644
--- a/src/views/eam/equipment/EamEquipmentLedger.vue
+++ b/src/views/eam/equipment/EamEquipmentLedger.vue
@@ -66,12 +66,16 @@
     <!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
     <div class="table-operator">
       <a-button v-has="'eam:equipment:add'" @click="handleAdd" type="primary" icon="plus">鏂板</a-button>
-      <a-button v-has="'eam:equipment:export'" type="primary" icon="download" @click="handleExportXls('璁惧鍙拌处')">瀵煎嚭</a-button>
-      <a-upload v-has="'eam:equipment:import'" name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl"
+      <a-button v-has="'eam:equipment:export'" type="primary" icon="download" @click="handleExportXls('璁惧鍙拌处')">瀵煎嚭
+      </a-button>
+      <a-upload v-has="'eam:equipment:import'" name="file" :showUploadList="false" :multiple="false"
+                :headers="tokenHeader" :action="importExcelUrl"
                 @change="handleImportExcel">
         <a-button type="primary" icon="import">瀵煎叆</a-button>
       </a-upload>
-      <a-button v-has="'eam:equipment:download'" type="primary" icon="download" @click="handleTemplateXlsDownload">瀵煎叆妯℃澘涓嬭浇</a-button>
+      <a-button v-has="'eam:equipment:download'" type="primary" icon="download" @click="handleTemplateXlsDownload">
+        瀵煎叆妯℃澘涓嬭浇
+      </a-button>
       <a-dropdown v-if="selectedRowKeys.length > 0">
         <a-menu slot="overlay">
           <a-menu-item v-has="'eam:equipment:batchdel'" key="2" @click="batchDel">
@@ -131,26 +135,21 @@
         </template>
 
         <span slot="action" slot-scope="text, record">
-          <a v-has="'eam:equipment:edit'" key="2" @click.stop="handleEdit(record)">缂栬緫</a>
+          <a v-has="'eam:equipment:edit'" @click.stop="handleEdit(record)">缂栬緫</a>
 
           <a-divider v-has="'eam:equipment:edit'" type="vertical"/>
 
-          <a-dropdown>
-            <a class="ant-dropdown-link">鏇村 <a-icon type="down"/></a>
-            <a-menu slot="overlay">
-              <a-menu-item>
-                <a v-has="'eam:equipment:resume'" href="javascript:;" @click="handleOpenResumeDrawer(record)">灞ュ巻</a>
-              </a-menu-item>
-              <a-menu-item>
-                <a href="javascript:;" @click="handleDetail(record)">璇︽儏</a>
-              </a-menu-item>
-              <a-menu-item>
-                <a-popconfirm v-has="'eam:equipment:del'" title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record.id)">
-                  <a>鍒犻櫎</a>
-                </a-popconfirm>
-              </a-menu-item>
-            </a-menu>
-          </a-dropdown>
+          <a v-has="'eam:equipment:resume'" href="javascript:;" @click="handleOpenResumeDrawer(record)">灞ュ巻</a>
+
+          <a-divider v-has="'eam:equipment:resume'" type="vertical"/>
+
+          <a-popconfirm v-has="'eam:equipment:del'" title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record.id)">
+            <a>鍒犻櫎</a>
+          </a-popconfirm>
+
+          <a-divider v-has="'eam:equipment:del'" type="vertical"/>
+
+          <a href="javascript:;" @click="handleDetail(record)">璇︽儏</a>
         </span>
 
       </a-table>
@@ -417,7 +416,7 @@
             title: '鎿嶄綔',
             dataIndex: 'action',
             align: 'center',
-            width: 150,
+            width: 200,
             scopedSlots: { customRender: 'action' },
             fixed: 'right'
           }
diff --git a/src/views/eam/equipment/modules/EamEquipmentModal.vue b/src/views/eam/equipment/modules/EamEquipmentModal.vue
index 6609f5a..456c389 100644
--- a/src/views/eam/equipment/modules/EamEquipmentModal.vue
+++ b/src/views/eam/equipment/modules/EamEquipmentModal.vue
@@ -1,15 +1,8 @@
 <template>
-  <j-modal
-    :title="title"
-    fullscreen
-    :visible="visible"
-    centered
-    :confirmLoading="confirmLoading"
-    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
-    @ok="handleOk"
-    @cancel="handleCancel"
-    cancelText="鍏抽棴">
-    <a-tabs tab-position="left">
+  <j-modal :title="title" fullscreen :visible="visible" centered :confirmLoading="confirmLoading"
+           :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" @ok="handleOk" @cancel="handleCancel"
+           cancelText="鍏抽棴">
+    <a-tabs tab-position="left" @change="handleTabChange">
       <a-tab-pane tab="鍩虹淇℃伅" :key="1">
         <a-spin :spinning="confirmLoading">
           <j-form-container :disabled="disableSubmit">
@@ -277,22 +270,46 @@
       </a-tab-pane>
 
       <template v-if="disableSubmit">
-        <a-tab-pane tab="璁惧鏂囨。" :key="2">
+        <a-tab-pane tab="鐐规宸ュ崟" :key="2" forceRender>
+          <a-button type="primary" @click="navigateToPage('/eam/maintenance/EamInspectionOrderList')" icon="right"
+                    style="margin-left: 24px">璺宠浆鑷冲搴旈〉闈�
+          </a-button>
+          <eam-inspection-order-list ref="tabPane2" :isDisplayOperation="false"/>
         </a-tab-pane>
 
-        <a-tab-pane tab="鐐规宸ュ崟" :key="3">
+        <a-tab-pane tab="浜屼繚宸ュ崟" :key="3" forceRender>
+          <a-button type="primary" @click="navigateToPage('/eam/maintenance/EamSecondMaintenanceOrderList')" icon="right"
+                    style="margin-left: 24px">璺宠浆鑷冲搴旈〉闈�
+          </a-button>
+          <eam-second-maintenance-order-list ref="tabPane3" :isDisplayOperation="false"/>
         </a-tab-pane>
 
-        <a-tab-pane tab="浜屼繚宸ュ崟" :key="4">
+        <a-tab-pane tab="涓変繚宸ュ崟" :key="4" forceRender>
+          <a-button type="primary" @click="navigateToPage('/eam/maintenance/EamThirdMaintenanceOrderList')" icon="right"
+                    style="margin-left: 24px">璺宠浆鑷冲搴旈〉闈�
+          </a-button>
+          <eam-third-maintenance-order-list ref="tabPane4" :isDisplayOperation="false"/>
         </a-tab-pane>
 
-        <a-tab-pane tab="涓変繚宸ュ崟" :key="5">
+        <a-tab-pane tab="缁翠慨宸ュ崟" :key="5" forceRender>
+          <a-button type="primary" @click="navigateToPage('/eam/repair/EamRepairOrderList')" icon="right"
+                    style="margin-left: 24px">璺宠浆鑷冲搴旈〉闈�
+          </a-button>
+          <eam-repair-order-list ref="tabPane5" :isDisplayOperation="false"/>
         </a-tab-pane>
 
-        <a-tab-pane tab="缁翠慨宸ュ崟" :key="6">
+        <a-tab-pane tab="淇濆吇瑙勮寖" :key="6" forceRender>
+          <a-button type="primary" @click="navigateToPage('/eam/base/EamMaintenanceStandardList')" icon="right"
+                    style="margin-left: 24px">璺宠浆鑷冲搴旈〉闈�
+          </a-button>
+          <eam-maintenance-standard-list ref="tabPane6" :isDisplayOperation="false"/>
         </a-tab-pane>
 
-        <a-tab-pane tab="淇濆吇鏍囧噯" :key="7">
+        <a-tab-pane tab="鎶�鏈姸鎬侀壌瀹氬伐鍗�" :key="7" forceRender>
+          <a-button type="primary" @click="navigateToPage('/eam/technical/order')" icon="right"
+                    style="margin-left: 24px">璺宠浆鑷冲搴旈〉闈�
+          </a-button>
+          <eam-technical-status-evaluation-order-list ref="tabPane7" :isDisplayOperation="false"/>
         </a-tab-pane>
       </template>
     </a-tabs>
@@ -302,9 +319,23 @@
 <script>
   import { getAction, httpAction } from '@/api/manage'
   import { validateDuplicateValueInDelFlag } from '@/utils/util'
+  import EamInspectionOrderList from '../../maintenance/EamInspectionOrderList'
+  import EamSecondMaintenanceOrderList from '../../maintenance/EamSecondMaintenanceOrderList'
+  import EamThirdMaintenanceOrderList from '../../maintenance/EamThirdMaintenanceOrderList'
+  import EamRepairOrderList from '../../repair/EamRepairOrderList'
+  import EamMaintenanceStandardList from '../../base/EamMaintenanceStandardList'
+  import EamTechnicalStatusEvaluationOrderList from '../../technical/EamTechnicalStatusEvaluationOrderList'
 
   export default {
     name: 'EamEquipmentModal',
+    components: {
+      EamTechnicalStatusEvaluationOrderList,
+      EamMaintenanceStandardList,
+      EamRepairOrderList,
+      EamThirdMaintenanceOrderList,
+      EamSecondMaintenanceOrderList,
+      EamInspectionOrderList
+    },
     props: {
       productionTreeData: {
         type: Array
@@ -388,7 +419,18 @@
        * @param key 鍗曢�夋鍏宠仈瀛楁
        */
       handleRadioChange(value, key) {
-        if (value == '0') delete this.model[key]
+        if (value === '0') delete this.model[key]
+      },
+
+      /**
+       * 鏍囩鏍忓彂鐢熸敼鍙樻椂瑙﹀彂
+       * @param tabKey 鍒囨崲鍚庣殑tabKey
+       */
+      handleTabChange(tabKey) {
+        if (tabKey !== 1 && this.$refs['tabPane' + tabKey]) {
+          this.$refs['tabPane' + tabKey].queryParam.equipmentId = this.model.id
+          this.$refs['tabPane' + tabKey].loadData(1)
+        }
       },
 
       handleOk() {
@@ -431,6 +473,10 @@
         })
       },
 
+      navigateToPage(href) {
+        this.$router.push(href)
+      },
+
       handleCancel() {
         this.close()
       },
diff --git a/src/views/eam/technical/EamTechnicalStatusEvaluationOrderList.vue b/src/views/eam/technical/EamTechnicalStatusEvaluationOrderList.vue
index 21fbd44..92eb74e 100644
--- a/src/views/eam/technical/EamTechnicalStatusEvaluationOrderList.vue
+++ b/src/views/eam/technical/EamTechnicalStatusEvaluationOrderList.vue
@@ -1,44 +1,46 @@
 <template>
   <a-card :bordered="false">
-    <!-- 鏌ヨ鍖哄煙 -->
-    <div class="table-page-search-wrapper">
-      <a-form layout="inline" @keyup.enter.native="searchQuery">
-        <a-row :gutter="24">
-          <a-col :xl="5" :lg="6" :md="8" :sm="12">
-            <a-form-item label="缁熶竴缂栫爜">
-              <lx-search-equipment-select placeholder="璇疯緭鍏ョ粺涓�缂栫爜鎴栧悕绉版悳绱�" v-model="queryParam.equipmentId"/>
-            </a-form-item>
-          </a-col>
-          <a-col :xl="5" :lg="6" :md="8" :sm="12">
-            <a-form-item label="宸ュ崟鍙�">
-              <a-input placeholder="璇疯緭鍏ュ伐鍗曞彿" v-model="queryParam.orderNum"/>
-            </a-form-item>
-          </a-col>
-          <a-col :xl="5" :lg="6" :md="8" :sm="12">
-            <a-form-item label="璁″垝閴村畾鏃ユ湡">
-              <a-date-picker v-model="queryParam.evaluationDate" style="width: 100%"/>
-            </a-form-item>
-          </a-col>
-          <a-col :xl="5" :lg="6" :md="8" :sm="12">
-            <a-form-item label="閴村畾鐘舵��">
-              <j-dict-select-tag placeholder="璇烽�夋嫨閴村畾鐘舵��" dict-code="technical_status_evaluation_order_status"
-                                 v-model="queryParam.evaluationStatus"/>
-            </a-form-item>
-          </a-col>
-          <a-col :xl="4" :lg="6" :md="8" :sm="12">
+    <template v-if="isDisplayOperation">
+      <!-- 鏌ヨ鍖哄煙 -->
+      <div class="table-page-search-wrapper">
+        <a-form layout="inline" @keyup.enter.native="searchQuery">
+          <a-row :gutter="24">
+            <a-col :xl="5" :lg="6" :md="8" :sm="12">
+              <a-form-item label="缁熶竴缂栫爜">
+                <lx-search-equipment-select placeholder="璇疯緭鍏ョ粺涓�缂栫爜鎴栧悕绉版悳绱�" v-model="queryParam.equipmentId"/>
+              </a-form-item>
+            </a-col>
+            <a-col :xl="5" :lg="6" :md="8" :sm="12">
+              <a-form-item label="宸ュ崟鍙�">
+                <a-input placeholder="璇疯緭鍏ュ伐鍗曞彿" v-model="queryParam.orderNum"/>
+              </a-form-item>
+            </a-col>
+            <a-col :xl="5" :lg="6" :md="8" :sm="12">
+              <a-form-item label="璁″垝閴村畾鏃ユ湡">
+                <a-date-picker v-model="queryParam.evaluationDate" style="width: 100%"/>
+              </a-form-item>
+            </a-col>
+            <a-col :xl="5" :lg="6" :md="8" :sm="12">
+              <a-form-item label="閴村畾鐘舵��">
+                <j-dict-select-tag placeholder="璇烽�夋嫨閴村畾鐘舵��" dict-code="technical_status_evaluation_order_status"
+                                   v-model="queryParam.evaluationStatus"/>
+              </a-form-item>
+            </a-col>
+            <a-col :xl="4" :lg="6" :md="8" :sm="12">
             <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
               <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
               <a-button type="info" @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button>
             </span>
-          </a-col>
-        </a-row>
-      </a-form>
-    </div>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
 
-    <!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
-    <div class="table-operator">
-      <a-button @click="handleAdd" type="primary" icon="plus">鏂板</a-button>
-    </div>
+      <!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
+      <div class="table-operator">
+        <a-button @click="handleAdd" type="primary" icon="plus">鏂板</a-button>
+      </div>
+    </template>
 
     <!-- table鍖哄煙-begin -->
     <a-table bordered rowKey="id" :columns="columns" :dataSource="dataSource" :pagination="ipagination"
@@ -94,7 +96,7 @@
     <eamTechnicalStatusEvaluationOrder-modal ref="modalForm" @ok="modalFormOk"/>
 
     <technical-status-evaluation-approval-modal ref="technicalStatusEvaluationApprovalModal"
-                                                :selectShenpiData="selectedOrderData"/>
+                                                :selectShenpiData="selectedRowData"/>
 
     <!--宸ュ崟鍙樻洿寮圭獥-->
     <eamTechnicalStatusEvaluationOrderChange-modal ref="orderChangeModal" @ok="modalFormOk"/>
@@ -119,10 +121,17 @@
       EamTechnicalStatusEvaluationOrderModal,
       EamTechnicalStatusEvaluationOrderChangeModal
     },
+    props: {
+      isDisplayOperation: {
+        type: Boolean,
+        default: true
+      }
+    },
     data() {
       return {
         description: '鎶�鏈姸鎬侀壌瀹氬伐鍗曠鐞嗛〉闈�',
-        selectedOrderData: {},
+        disableMixinCreated: true,
+        selectedRowData: {},
         // 琛ㄥご
         columns: [
           {
@@ -289,14 +298,6 @@
             title: '闄勫綍D HF缂栫爜',
             align: 'center',
             dataIndex: 'hfCodeD'
-          },
-          {
-            title: '鎿嶄綔',
-            dataIndex: 'action',
-            align: 'center',
-            scopedSlots: { customRender: 'action' },
-            fixed: 'right',
-            width: 200
           }
         ],
         url: {
@@ -304,6 +305,21 @@
           receive: '/eam/eamTechnicalStatusEvaluationOrder/collect'
         }
       }
+    },
+    created() {
+      if (!this.isDisplayOperation) {
+        return
+      }
+      const operationColumn = {
+        title: '鎿嶄綔',
+        dataIndex: 'action',
+        align: 'center',
+        scopedSlots: { customRender: 'action' },
+        fixed: 'right',
+        width: 200
+      }
+      this.columns = [...this.columns, operationColumn]
+      this.loadData(1)
     },
     methods: {
       /**
@@ -345,7 +361,7 @@
        * @param record
        */
       handleDetail(record) {
-        this.selectedOrderData = Object.assign({}, record)
+        this.selectedRowData = Object.assign({}, record)
         this.$refs.technicalStatusEvaluationApprovalModal.title = '璇︽儏'
         this.$refs.technicalStatusEvaluationApprovalModal.visible = true
         this.$refs.technicalStatusEvaluationApprovalModal.disableSubmit = true

--
Gitblit v1.9.3