😎修复获取字典错误
This commit is contained in:
parent
4f6fc8da4e
commit
755f7d4e78
@ -150,13 +150,16 @@ export const useUserInfo = defineStore('userInfo', {
|
|||||||
|
|
||||||
// 根据字典类型和值取描述
|
// 根据字典类型和值取描述
|
||||||
getDictLabelByVal(typePCode: string, val: string) {
|
getDictLabelByVal(typePCode: string, val: string) {
|
||||||
if (val) {
|
if (val != undefined) {
|
||||||
const _val = val.toString();
|
val = val.toString();
|
||||||
const ds = this.getDictDatasByCode(typePCode);
|
if (val) {
|
||||||
for (let index = 0; index < ds.length; index++) {
|
const _val = val.toString();
|
||||||
const element = ds[index];
|
const ds = this.getDictDatasByCode(typePCode);
|
||||||
if (element.value == _val) {
|
for (let index = 0; index < ds.length; index++) {
|
||||||
return element;
|
const element = ds[index];
|
||||||
|
if (element.value == _val) {
|
||||||
|
return element;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user