| | |
| | | <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 |
| | |
| | | <!-- <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-tab-pane tab="设备油液" :key="9"> |
| | | <eam-equipment-fluid-list ref="tabPaneTableListRef9" :isDisplayOperation="false"/> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | |
| | |
| | | // 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' |
| | | import EamEquipmentFluidList from '@views/eam/equipment/modules/EamEquipmentFluidList.vue' |
| | | |
| | | export default { |
| | | name: 'EamEquipmentList', |
| | |
| | | EamEquipmentAttachmentList, |
| | | // EamWeekMaintenanceOrderList, |
| | | EamEquipmentProcessList, |
| | | EamEquipmentPrecisionList |
| | | EamEquipmentPrecisionList, |
| | | EamSecondMaintenanceOrderList, |
| | | EamThirdMaintenanceOrderList, |
| | | EamEquipmentFluidList |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | dataIndex: 'equipmentImportance_dictText', |
| | | }, |
| | | { |
| | | title: '资产状态', |
| | | title: '技术状态', |
| | | align: 'center', |
| | | width: 100, |
| | | dataIndex: 'technologyStatus_dictText' |
| | | }, |
| | | { |
| | | title: '资产使用状态', |
| | | align: 'center', |
| | | width: 100, |
| | | dataIndex: 'assetStatus_dictText' |
| | |
| | | align: 'center', |
| | | width: 100, |
| | | dataIndex: 'equipmentSpecification' |
| | | }, |
| | | { |
| | | title: '区号', |
| | | align: 'center', |
| | | width: 100, |
| | | dataIndex: 'areaCode' |
| | | }, |
| | | { |
| | | title: '电机台数', |
| | |
| | | currentTableRowRecord: {}, |
| | | isOpenProcess: false, |
| | | isOpenPrecision: false, |
| | | treeDataAlias: [], |
| | | } |
| | | }, |
| | | computed: { |
| | |
| | | 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) |
| | | } |
| | |
| | | } |
| | | }) |
| | | }, |
| | | 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> |