From a7ed137d53ebcaaf8f9429a53a34ece9351cc05c Mon Sep 17 00:00:00 2001 From: zhangherong <571457620@qq.com> Date: 星期四, 22 五月 2025 10:26:11 +0800 Subject: [PATCH] art: 设备管理-三保-列表、新增修改,增加精度参数明细项 --- src/views/eam/equipment/EamEquipmentList.vue | 71 +++++++++++++++++++++++------------ 1 files changed, 47 insertions(+), 24 deletions(-) diff --git a/src/views/eam/equipment/EamEquipmentList.vue b/src/views/eam/equipment/EamEquipmentList.vue index 8c6b24c..c5b9af1 100644 --- a/src/views/eam/equipment/EamEquipmentList.vue +++ b/src/views/eam/equipment/EamEquipmentList.vue @@ -16,8 +16,8 @@ </a-form-item> </a-col> <a-col :xl="6" :lg="7" :md="8" :sm="24"> - <a-form-item label="鍏抽敭璁惧鏍囪瘑"> - <j-dict-select-tag dict-code="yn" placeholder="璇烽�夋嫨鍏抽敭璁惧鏍囪瘑" + <a-form-item label="绠$悊鍒嗙被"> + <j-dict-select-tag dict-code="equipment_abc_flag" placeholder="璇烽�夋嫨绠$悊鍒嗙被" v-model="queryParam.equipmentImportance"></j-dict-select-tag> </a-form-item> </a-col> @@ -29,21 +29,16 @@ </a-form-item> </a-col> <a-col :xl="6" :lg="7" :md="8" :sm="24"> - <a-form-item label="鎶�鏈姸鎬�"> - <j-dict-select-tag dict-code="technology_status" placeholder="璇烽�夋嫨鎶�鏈姸鎬�" - v-model="queryParam.technologyStatus"></j-dict-select-tag> - </a-form-item> - </a-col> - <a-col :xl="6" :lg="7" :md="8" :sm="24"> - <a-form-item label="鎿嶄綔绯荤粺"> - <a-input placeholder="璇疯緭鍏ユ搷浣滅郴缁�" v-model="queryParam.operationSystem"></a-input> + <a-form-item label="璁惧绫诲埆"> + <j-dict-select-tag dict-code="equipment_category" placeholder="璇烽�夋嫨璁惧绫诲埆" + v-model="queryParam.equipmentCategory"></j-dict-select-tag> </a-form-item> </a-col> <a-col :xl="6" :lg="7" :md="8" :sm="24"> <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 @@ -52,12 +47,7 @@ </a-tree-select> </a-form-item> </a-col> - <a-col :xl="6" :lg="7" :md="8" :sm="24"> - <a-form-item label="璁惧鍒嗙被"> - <j-dict-select-tag dict-code="equipment_category" placeholder="璇烽�夋嫨璁惧鍒嗙被" - v-model="queryParam.equipmentCategory"></j-dict-select-tag> - </a-form-item> - </a-col> + </template> <a-col :xl="6" :lg="7" :md="8" :sm="24"> <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> @@ -260,7 +250,13 @@ dataIndex: 'equipmentImportance_dictText', }, { - title: '璧勪骇鐘舵��', + title: '鎶�鏈姸鎬�', + align: 'center', + width: 100, + dataIndex: 'technologyStatus_dictText' + }, + { + title: '璧勪骇浣跨敤鐘舵��', align: 'center', width: 100, dataIndex: 'assetStatus_dictText' @@ -310,12 +306,6 @@ align: 'center', width: 100, dataIndex: 'equipmentSpecification' - }, - { - title: '鍖哄彿', - align: 'center', - width: 100, - dataIndex: 'areaCode' }, { title: '鐢垫満鍙版暟', @@ -473,6 +463,7 @@ currentTableRowRecord: {}, isOpenProcess: false, isOpenPrecision: false, + treeDataAlias: [], } }, computed: { @@ -490,6 +481,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) } @@ -600,7 +593,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