|
|
@ -2337,6 +2337,24 @@ |
|
|
fixed: '', |
|
|
fixed: '', |
|
|
columnWidth: 100, |
|
|
columnWidth: 100, |
|
|
}, |
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
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, |
|
|
|
|
|
}, |
|
|
{ |
|
|
{ |
|
|
userId: this.$store.state.user.name, |
|
|
userId: this.$store.state.user.name, |
|
|
functionId: 101001008, |
|
|
functionId: 101001008, |
|
|
@ -4575,6 +4593,38 @@ |
|
|
switch (columnId) { |
|
|
switch (columnId) { |
|
|
case 1: |
|
|
case 1: |
|
|
this.columnList = data.rows |
|
|
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; |
|
|
break; |
|
|
// case 2: |
|
|
// case 2: |
|
|
// this.detailColumnList = data.rows |
|
|
// this.detailColumnList = data.rows |
|
|
|