This commit is contained in:
qsh
2023-05-11 00:46:52 +08:00
parent 9800001876
commit 155f9009fc
15 changed files with 726 additions and 528 deletions

View File

@@ -73,20 +73,10 @@ export function addDateRange(params, dateRange, propName) {
// 回显数据字典
export function selectDictLabel(datas, value) {
if (value === undefined) {
if (value == undefined) {
return '';
}
var actions = [];
Object.keys(datas).some((key) => {
if (datas[key].value === '' + value) {
actions.push(datas[key].label);
return true;
}
});
if (actions.length === 0) {
actions.push(value);
}
return actions.join('');
return datas.find((item) => item.dictValue == value).dictLabel;
}
// 回显数据字典(字符串数组)