zhaowei
2025-03-17 18e90fabbf22da3f168d020989609c3de83e9670
DNC产品结构树页面新增点击设备类后展示设备类下挂载的设备列表
已添加1个文件
已修改1个文件
97 ■■■■■ 文件已修改
src/views/dnc/base/modules/ProductStructure/DeviceCustomType/UseDeviceCustomTypeEquipmentTableList.vue 83 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/dnc/base/modules/ProductStructure/ProductStructureMainBottom.vue 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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>
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 = []
    },