Browse Source

refactor(eam): 移除设备列表中的分组编码列自动插入逻辑

- 删除了检查并自动插入 GroupID 列的相关代码
- 移除了分组编码列的默认配置逻辑
- 简化了列配置的处理流程
- 优化了设备列表页面的代码结构
master
qiankanghui 2 weeks ago
parent
commit
7c8e24efb8
  1. 33
      src/views/modules/eam/eam_device_list.vue

33
src/views/modules/eam/eam_device_list.vue

@ -4593,38 +4593,6 @@
switch (columnId) {
case 1:
this.columnList = data.rows
// GroupID GroupDesc
const hasGroupID = this.columnList.some(col => col.columnProp === 'groupID' || col.columnProp === 'GroupID')
if (!hasGroupID) {
const groupDescIndex = this.columnList.findIndex(col => col.columnProp === 'groupDesc' || col.columnProp === 'GroupDesc')
const groupIDColumn = {
userId: this.$store.state.user.name,
functionId: 101001008,
serialNumber: '101001008Table1GroupID',
tableId: "101001008Table1",
tableName: "设备清单表",
columnProp: 'groupID',
headerAlign: 'center',
align: 'center',
columnLabel: '分组编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120,
}
if (groupDescIndex !== -1) {
this.columnList.splice(groupDescIndex, 0, groupIDColumn)
} else {
// groupDesc seqNo
const seqNoIndex = this.columnList.findIndex(col => col.columnProp === 'seqNo' || col.columnProp === 'SeqNo')
if (seqNoIndex !== -1) {
this.columnList.splice(seqNoIndex + 1, 0, groupIDColumn)
}
}
}
break;
// case 2:
// this.detailColumnList = data.rows
@ -4636,7 +4604,6 @@
// this.columnList3 = data.rows
// break;
}
} else {
this.getColumnList(tableId, columnId)
}

Loading…
Cancel
Save