From 18e90fabbf22da3f168d020989609c3de83e9670 Mon Sep 17 00:00:00 2001 From: zhaowei <zhaowei> Date: 星期一, 17 三月 2025 10:14:08 +0800 Subject: [PATCH] DNC产品结构树页面新增点击设备类后展示设备类下挂载的设备列表 --- src/views/dnc/base/modules/ProductStructure/DeviceCustomType/UseDeviceCustomTypeEquipmentTableList.vue | 83 +++++++++++++++++++++++++++++++++++++++++ src/views/dnc/base/modules/ProductStructure/ProductStructureMainBottom.vue | 14 ++++++- 2 files changed, 95 insertions(+), 2 deletions(-) diff --git a/src/views/dnc/base/modules/ProductStructure/DeviceCustomType/UseDeviceCustomTypeEquipmentTableList.vue b/src/views/dnc/base/modules/ProductStructure/DeviceCustomType/UseDeviceCustomTypeEquipmentTableList.vue new file mode 100644 index 0000000..76e9649 --- /dev/null +++ b/src/views/dnc/base/modules/ProductStructure/DeviceCustomType/UseDeviceCustomTypeEquipmentTableList.vue @@ -0,0 +1,83 @@ +<template> + <a-table :columns="columns" :data-source="dataSource" bordered :pagination="false" :size="size" rowKey="id" :scroll="{y:189}"> + + </a-table> +</template> + +<script> + import { JeecgListMixin } from '@/mixins/JeecgListMixin' + + export default { + name: 'UseDeviceCustomTypeEquipmentTableList', + components: {}, + mixins: [JeecgListMixin], + props: { + currentLevelDetails: { + type: Object + }, + size: { + type: String + } + }, + data() { + return { + disableMixinCreated: true, + columns: [ + { + title: '璁惧缂栧彿', + align: 'center', + dataIndex: 'equipmentId', + width:250 + }, + { + title: '璁惧鍚嶇О', + align: 'center', + dataIndex: 'equipmentName', + width:250 + }, + { + title: '璁惧鍨嬪彿', + align: 'center', + dataIndex: 'equipmentModel', + width:250 + }, + { + title: '鏈哄簥IP', + align: 'center', + dataIndex: 'equipmentIp', + width:200 + }, + { + title: '椹卞姩绫诲瀷', + align: 'center', + dataIndex: 'driveType' + }, + { + title: '绔彛', + align: 'center', + dataIndex: 'dataPort' + }, + { + title: '鏁版帶绯荤粺', + align: 'center', + dataIndex: 'controlSystem' + } + ], + url: { + list: '/nc/deviceManagement/getEquipmentListById' + } + } + }, + methods: { + setQueryParamAndLoadData() { + const { deviceManagementId } = this.currentLevelDetails + this.queryParam = Object.assign({}, { id: deviceManagementId }) + this.loadData() + }, + } + } +</script> + +<style scoped> + +</style> \ No newline at end of file diff --git a/src/views/dnc/base/modules/ProductStructure/ProductStructureMainBottom.vue b/src/views/dnc/base/modules/ProductStructure/ProductStructureMainBottom.vue index 899d586..518c220 100644 --- a/src/views/dnc/base/modules/ProductStructure/ProductStructureMainBottom.vue +++ b/src/views/dnc/base/modules/ProductStructure/ProductStructureMainBottom.vue @@ -23,8 +23,8 @@ </a-tab-pane> <a-tab-pane :key="1" tab="璁惧鍒楄〃" v-if="currentLevelInfo.hasOwnProperty('deviceManagementId')"> -<!-- <ProcessStepInfo :currentLevelDetails="currentLevelInfo" :size="containerSize"/>--> - 璁惧鍒楄〃 + <UseDeviceCustomTypeEquipmentTableList ref="useTypeEquipmentTableListRef" + :currentLevelDetails="currentLevelInfo" :size="containerSize"/> </a-tab-pane> <!--绯荤粺鍙傛暟閰嶇疆涓嫢鍙傛暟涓�1鏃舵墠灞曠ず瀵瑰簲灞傜骇鐨勫垁鍏峰垪琛�--> @@ -73,10 +73,13 @@ import FilePreview from '../../../common/FilePreview' import TableContextMenu from '../../../common/TableContextMenu' import { getAction } from '@/api/manage' +import UseDeviceCustomTypeEquipmentTableList + from '@views/dnc/base/modules/ProductStructure/DeviceCustomType/UseDeviceCustomTypeEquipmentTableList.vue' export default { name: 'ProductStructureMainBottom', components: { + UseDeviceCustomTypeEquipmentTableList, CutterTableList, TableContextMenu, FilePreview, @@ -129,6 +132,13 @@ receiveCurrentLevelInfo(levelInfo) { this.currentLevelInfo = levelInfo this.activeTabKey = 1 + this.$nextTick(() => { + if (this.$refs.useTypeEquipmentTableListRef) { + this.$refs.useTypeEquipmentTableListRef.setQueryParamAndLoadData() + this.hasLoadedDataTabKeyArray.push(this.activeTabKey) + return + } + }) this.hasLoadedDataTabKeyArray = [] }, -- Gitblit v1.9.3