用户管理

This commit is contained in:
sjl
2024-11-12 18:56:33 +08:00
parent 4b5498ad49
commit 44e7598b68
22 changed files with 808 additions and 548 deletions

View File

@@ -125,7 +125,7 @@
prop: 'statMethod',
label: '数据统计类型',
width: 250,
enum: dictStore.getDictData('stat_Method'),
enum: dictStore.getDictData('Stat_Method'),
fieldNames: { label: 'name', value: 'code' },
render: (scope) => {
// 假设 statMethod 是一个数组,包含多个 'code' 值
@@ -141,14 +141,14 @@
// 查找与每个 code 值匹配的 name然后拼接成逗号分割的字符串
//console.log('codeArray',codeArray)
const names = codeArray.map(code => {
const dictItem = dictStore.getDictData('Event_Type').find(item => item.code === code);
const dictItem = dictStore.getDictData('Stat_Method').find(item => item.code === code);
return dictItem ? dictItem.name : ''; // 如果找到匹配的项,返回对应的 name
});
//console.log('names',names)
return names.join(', '); // 用逗号连接所有的 name
}
// 查找单个 code 对应的 name
const dictItem = dictStore.getDictData('Event_Type').find(item => item.code === codeArray[0]);
const dictItem = dictStore.getDictData('Stat_Method').find(item => item.code === codeArray[0]);
return dictItem ? dictItem.name : ''; // 如果找到匹配的项,返回对应的 name
},
},