|
|
@@ -257,6 +257,14 @@
|
|
|
min-width="140"
|
|
|
show-overflow-tooltip
|
|
|
/>
|
|
|
+ <el-table-column
|
|
|
+ v-if="isDispatchColumnVisible('userNames')"
|
|
|
+ prop="userNames"
|
|
|
+ label="人员"
|
|
|
+ align="center"
|
|
|
+ min-width="140"
|
|
|
+ show-overflow-tooltip
|
|
|
+ />
|
|
|
<el-table-column
|
|
|
v-if="isDispatchColumnVisible('assetModelType')"
|
|
|
prop="assetModelType"
|
|
|
@@ -815,6 +823,7 @@
|
|
|
{ key: 'code', label: '编码' },
|
|
|
{ key: 'assetCode', label: '设备编码' },
|
|
|
{ key: 'assetName', label: '设备名称' },
|
|
|
+ { key: 'userNames', label: '人员' },
|
|
|
{ key: 'assetModelType', label: '设备型号' },
|
|
|
{ key: 'assetCategoryLevelPath', label: '设备类型' },
|
|
|
{ key: 'status', label: '状态' },
|
|
|
@@ -828,6 +837,7 @@
|
|
|
code: true,
|
|
|
assetCode: true,
|
|
|
assetName: true,
|
|
|
+ userNames: true,
|
|
|
assetModelType: true,
|
|
|
assetCategoryLevelPath: true,
|
|
|
status: true,
|
|
|
@@ -998,6 +1008,16 @@
|
|
|
keys: ['assetName', 'deviceName']
|
|
|
}
|
|
|
]),
|
|
|
+ userNames: this.pickDispatchTextValue([
|
|
|
+ {
|
|
|
+ source: item,
|
|
|
+ keys: ['userNames']
|
|
|
+ },
|
|
|
+ {
|
|
|
+ source: item.extInfo,
|
|
|
+ keys: ['userNames']
|
|
|
+ }
|
|
|
+ ]),
|
|
|
assetModelType: item.assetModelType || item.deviceModel || '',
|
|
|
assetCategoryLevelPath:
|
|
|
item.assetCategoryLevelPath || item.deviceType || ''
|
|
|
@@ -1406,6 +1426,35 @@
|
|
|
}
|
|
|
return text.includes(',') ? text.split(',')[0].trim() : text;
|
|
|
},
|
|
|
+ normalizeDispatchTextValue(value) {
|
|
|
+ if (Array.isArray(value)) {
|
|
|
+ return value
|
|
|
+ .map((item) => this.normalizeDispatchTextValue(item))
|
|
|
+ .filter(Boolean)
|
|
|
+ .join(',');
|
|
|
+ }
|
|
|
+ if (value === null || value === undefined) {
|
|
|
+ return '';
|
|
|
+ }
|
|
|
+ const text = String(value).trim();
|
|
|
+ if (!text) {
|
|
|
+ return '';
|
|
|
+ }
|
|
|
+ return ['undefined', 'null'].includes(text.toLowerCase()) ? '' : text;
|
|
|
+ },
|
|
|
+ pickDispatchTextValue(groups = []) {
|
|
|
+ for (const group of groups) {
|
|
|
+ const source = group?.source || {};
|
|
|
+ const keys = Array.isArray(group?.keys) ? group.keys : [];
|
|
|
+ for (const key of keys) {
|
|
|
+ const value = this.normalizeDispatchTextValue(source[key]);
|
|
|
+ if (value) {
|
|
|
+ return value;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return '';
|
|
|
+ },
|
|
|
pickDispatchSingleValue(groups = []) {
|
|
|
for (const group of groups) {
|
|
|
const source = group?.source || {};
|