Browse Source

修复字典匹配错误

Signed-off-by: IMaster <logole@live.cn>
IMaster 1 year ago
parent
commit
e6b8ebd073
1 changed files with 2 additions and 2 deletions
  1. 2 2
      Web/src/stores/userInfo.ts

+ 2 - 2
Web/src/stores/userInfo.ts

@@ -136,7 +136,7 @@ export const useUserInfo = defineStore('userInfo', {
 				const _val = val.toString();
 				const _val = val.toString();
 				const ds = this.getDictDatasByCode(typePCode);
 				const ds = this.getDictDatasByCode(typePCode);
 				for (const element of ds) {
 				for (const element of ds) {
-					if (element.value === _val) {
+					if (element.code === _val) {
 						return element;
 						return element;
 					}
 					}
 				}
 				}
@@ -150,7 +150,7 @@ export const useUserInfo = defineStore('userInfo', {
 				const _val = val.toString();
 				const _val = val.toString();
 				const ds = this.getDictDatasByCode(typePCode);
 				const ds = this.getDictDatasByCode(typePCode);
 				for (const element of ds) {
 				for (const element of ds) {
-					if (element.code === _val) {
+					if (element.value === _val) {
 						return element;
 						return element;
 					}
 					}
 				}
 				}