From 34feb4908ec7b7e5b51adf6355603978c67bd3a4 Mon Sep 17 00:00:00 2001 From: cuijian <cuijian@xalxzn.com> Date: 星期四, 05 六月 2025 09:53:14 +0800 Subject: [PATCH] 申请单入库 --- src/views/eam/equipment/EamEquipmentList.vue | 77 ++++++++++++++++++++++++++++++-------- 1 files changed, 60 insertions(+), 17 deletions(-) diff --git a/src/views/eam/equipment/EamEquipmentList.vue b/src/views/eam/equipment/EamEquipmentList.vue index 43af2a1..517d4c7 100644 --- a/src/views/eam/equipment/EamEquipmentList.vue +++ b/src/views/eam/equipment/EamEquipmentList.vue @@ -38,7 +38,7 @@ <a-form-item label="浣跨敤杞﹂棿"> <a-tree-select v-model="queryParam.orgId" style="width: 100%" - :tree-data="treeData" + :tree-data="treeDataAlias" :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" placeholder="璇烽�夋嫨浣跨敤杞﹂棿" allow-clear @@ -156,17 +156,23 @@ <!-- <a-tab-pane tab="鍛ㄤ繚宸ュ崟" :key="3"> <eam-week-maintenance-order-list ref="tabPaneTableListRef3" :isDisplayOperation="false"/> </a-tab-pane>--> - <a-tab-pane tab="缁翠慨宸ュ崟" :key="4"> - <eam-repair-order-list ref="tabPaneTableListRef4" :isDisplayOperation="false"/> + <a-tab-pane tab="浜屼繚宸ュ崟" :key="3"> + <eam-second-maintenance-order-list ref="tabPaneTableListRef3" :isDisplayOperation="false" /> </a-tab-pane> - <a-tab-pane tab="淇濆吇鏍囧噯" :key="5"> - <eam-maintenance-standard-list ref="tabPaneTableListRef5" :isDisplayOperation="false"/> + <a-tab-pane tab="涓変繚宸ュ崟" :key="4"> + <eam-third-maintenance-order-list ref="tabPaneTableListRef4" :isDisplayOperation="false" /> </a-tab-pane> - <a-tab-pane tab="宸ヨ壓鍙傛暟" :key="6" v-if="isOpenProcess"> - <eam-equipment-process-list ref="tabPaneTableListRef6" :isDisplayOperation="false"/> + <a-tab-pane tab="缁翠慨宸ュ崟" :key="5"> + <eam-repair-order-list ref="tabPaneTableListRef5" :isDisplayOperation="false"/> </a-tab-pane> - <a-tab-pane tab="璁惧绮惧害" :key="7" v-if="isOpenPrecision"> - <eam-equipment-precision-list ref="tabPaneTableListRef7" :isDisplayOperation="false"/> + <a-tab-pane tab="淇濆吇鏍囧噯" :key="6"> + <eam-maintenance-standard-list ref="tabPaneTableListRef6" :isDisplayOperation="false"/> + </a-tab-pane> + <a-tab-pane tab="宸ヨ壓鍙傛暟" :key="7" v-if="isOpenProcess"> + <eam-equipment-process-list ref="tabPaneTableListRef7" :isDisplayOperation="false"/> + </a-tab-pane> + <a-tab-pane tab="璁惧绮惧害" :key="8" v-if="isOpenPrecision"> + <eam-equipment-precision-list ref="tabPaneTableListRef8" :isDisplayOperation="false"/> </a-tab-pane> </a-tabs> @@ -194,6 +200,8 @@ // import EamWeekMaintenanceOrderList from '@views/eam/maintenance/EamWeekMaintenanceOrderList.vue' import EamEquipmentProcessList from '@views/eam/equipment/modules/EamEquipmentProcessList.vue' import EamEquipmentPrecisionList from '@views/eam/equipment/modules/EamEquipmentPrecisionList.vue' + import EamSecondMaintenanceOrderList from '@views/eam/maintenance/EamSecondMaintenanceOrderList.vue' + import EamThirdMaintenanceOrderList from '@views/eam/maintenance/EamThirdMaintenanceOrderList.vue' export default { name: 'EamEquipmentList', @@ -208,7 +216,9 @@ EamEquipmentAttachmentList, // EamWeekMaintenanceOrderList, EamEquipmentProcessList, - EamEquipmentPrecisionList + EamEquipmentPrecisionList, + EamSecondMaintenanceOrderList, + EamThirdMaintenanceOrderList }, data() { return { @@ -250,7 +260,13 @@ dataIndex: 'equipmentImportance_dictText', }, { - title: '璧勪骇鐘舵��', + title: '鎶�鏈姸鎬�', + align: 'center', + width: 100, + dataIndex: 'technologyStatus_dictText' + }, + { + title: '璧勪骇浣跨敤鐘舵��', align: 'center', width: 100, dataIndex: 'assetStatus_dictText' @@ -300,12 +316,6 @@ align: 'center', width: 100, dataIndex: 'equipmentSpecification' - }, - { - title: '鍖哄彿', - align: 'center', - width: 100, - dataIndex: 'areaCode' }, { title: '鐢垫満鍙版暟', @@ -463,6 +473,7 @@ currentTableRowRecord: {}, isOpenProcess: false, isOpenPrecision: false, + treeDataAlias: [], } }, computed: { @@ -480,6 +491,8 @@ getAction(this.url.loadProductionOptions).then(res => { if (res.success) { this.treeData = [...res.result] + this.treeDataAlias = this.deepCopyAndModify(res.result) + console.info('treeDataAlias====', this.treeDataAlias) } else { that.$message.warning(res.message) } @@ -590,7 +603,37 @@ } }) }, + deepCopyAndModify(arr) { + // 濡傛灉褰撳墠鍏冪礌涓嶆槸鏁扮粍鎴栧璞★紝鐩存帴杩斿洖 + if (!Array.isArray(arr) && typeof arr !== 'object' || arr === null || arr.length === 0) { + return arr; + } + // 濡傛灉鏄暟缁勶紝鍒涘缓涓�涓柊鏁扮粍骞堕�掑綊澶勭悊姣忎釜鍏冪礌 + if (Array.isArray(arr)) { + const newArray = []; + for (let i = 0; i < arr.length; i++) { + newArray.push(this.deepCopyAndModify(arr[i])); + } + return newArray; + } + + // 濡傛灉鏄璞★紝鍒涘缓涓�涓柊瀵硅薄骞堕�掑綊澶勭悊姣忎釜灞炴�� + const newObj = {}; + for (const key in arr) { + if (arr.hasOwnProperty(key)) { + if(key === 'selectable') { + newObj[key] = true; + } else if(key === 'children') { + newObj[key] = this.deepCopyAndModify(arr[key]); + }else { + newObj[key] = arr[key]; + } + + } + } + return newObj; + }, } } </script> -- Gitblit v1.9.3