From ffe01cb9dac3782f6f5f766a60491c12f5e42f19 Mon Sep 17 00:00:00 2001
From: zhangherong <571457620@qq.com>
Date: 星期五, 18 四月 2025 09:58:59 +0800
Subject: [PATCH] art: 设备管理-点检工单-确认意见

---
 src/views/eam/maintenance/EamWeekMaintenanceOrderList.vue |   53 +++++++++++++++++++++++++++++++++++++++--------------
 1 files changed, 39 insertions(+), 14 deletions(-)

diff --git a/src/views/eam/maintenance/EamWeekMaintenanceOrderList.vue b/src/views/eam/maintenance/EamWeekMaintenanceOrderList.vue
index 7c91771..8693a78 100644
--- a/src/views/eam/maintenance/EamWeekMaintenanceOrderList.vue
+++ b/src/views/eam/maintenance/EamWeekMaintenanceOrderList.vue
@@ -2,7 +2,7 @@
   <a-card :bordered="false">
 
     <!-- 鏌ヨ鍖哄煙 -->
-    <div class="table-page-search-wrapper">
+    <div class="table-page-search-wrapper" v-if="isDisplayOperation">
       <a-form layout="inline" @keyup.enter.native="searchQuery">
         <a-row :gutter="24">
           <a-col :xl="4" :lg="7" :md="8" :sm="24">
@@ -37,7 +37,7 @@
     </div>
 
     <!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
-    <div class="table-operator">
+    <div class="table-operator" v-if="isDisplayOperation">
       <a-button @click="handleAdd" type="primary" icon="plus">鏂板</a-button>
       <a-dropdown v-if="selectedRowKeys.length > 0">
         <a-menu slot="overlay">
@@ -45,8 +45,8 @@
             <a-icon type="delete" />
             浣滃簾
           </a-menu-item>
-          <a-menu-item key="1" @click="handlerBatchCollect">
-            <a-icon type="delete" />
+          <a-menu-item key="2" @click="handlerBatchCollect">
+            <a-icon type="form" />
             棰嗗彇
           </a-menu-item>
         </a-menu>
@@ -58,7 +58,7 @@
 
     <!-- table鍖哄煙-begin -->
     <div>
-      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
+      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;" v-if="isDisplayOperation">
         <i class="anticon anticon-info-circle ant-alert-icon"></i> 宸查�夋嫨 <a
         style="font-weight: 600">{{ selectedRowKeys.length }}</a>椤�
         <a style="margin-left: 24px" @click="onClearSelected">娓呯┖</a>
@@ -74,6 +74,7 @@
         :pagination="ipagination"
         :loading="loading"
         class="j-table-force-nowrap"
+        :scroll="{x:'max-content'}"
         :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
         @change="handleTableChange">
 
@@ -106,7 +107,7 @@
 
     <!-- 琛ㄥ崟鍖哄煙 -->
     <eamWeekMaintenanceOrder-modal ref="modalForm" @ok="modalFormOk"></eamWeekMaintenanceOrder-modal>
-    <week-maintenance-approval-modal ref="weekMaintenanceApprovalModal"></week-maintenance-approval-modal>
+    <week-maintenance-approval-modal ref="weekMaintenanceApprovalModal" :selectShenpiData="selectWeekMaintenanceData"></week-maintenance-approval-modal>
   </a-card>
 </template>
 
@@ -126,9 +127,17 @@
     EamWeekMaintenanceOrderModal,
     WeekMaintenanceApprovalModal
   },
+  props: {
+    isDisplayOperation: {
+      type: Boolean,
+      default: true
+    }
+  },
   data() {
     return {
       description: '鍛ㄤ繚宸ュ崟绠$悊椤甸潰',
+      disableMixinCreated: true,
+      selectWeekMaintenanceData:{},
       // 琛ㄥご
       columns: [
         {
@@ -265,14 +274,14 @@
           dataIndex: 'remark',
           width: 60,
         },
-        {
-          title: '鎿嶄綔',
-          dataIndex: 'action',
-          align: 'center',
-          fixed: 'right',
-          width: 100,
-          scopedSlots: { customRender: 'action' }
-        }
+        // {
+        //   title: '鎿嶄綔',
+        //   dataIndex: 'action',
+        //   align: 'center',
+        //   fixed: 'right',
+        //   width: 100,
+        //   scopedSlots: { customRender: 'action' }
+        // }
       ],
       url: {
         list: '/eam/weekMaintenanceOrder/list',
@@ -281,6 +290,21 @@
         collect: '/eam/weekMaintenanceOrder/collect',
       }
     }
+  },
+  created() {
+    if (!this.isDisplayOperation) {
+      return
+    }
+    const operationColumn = {
+      title: '鎿嶄綔',
+      dataIndex: 'action',
+      align: 'center',
+      fixed: 'right',
+      width: 147,
+      scopedSlots: { customRender: 'action' }
+    }
+    this.columns = [...this.columns, operationColumn]
+    this.loadData(1)
   },
   computed: {},
   methods: {
@@ -392,6 +416,7 @@
 
     },
     handleDetail(record) {
+      this.selectWeekMaintenanceData = Object.assign({}, record)
       this.$refs.weekMaintenanceApprovalModal.recordDetail(record)
       this.$refs.weekMaintenanceApprovalModal.title = '璇︽儏';
       this.$refs.weekMaintenanceApprovalModal.disableSubmit = true

--
Gitblit v1.9.3