Преглед на файлове

!1336 修复字典匹配错误
Merge pull request !1336 from IMaster/next

zuohuaijun преди 1 година
родител
ревизия
b7ecc5229d
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  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 ds = this.getDictDatasByCode(typePCode);
 				for (const element of ds) {
-					if (element.value === _val) {
+					if (element.code === _val) {
 						return element;
 					}
 				}
@@ -150,7 +150,7 @@ export const useUserInfo = defineStore('userInfo', {
 				const _val = val.toString();
 				const ds = this.getDictDatasByCode(typePCode);
 				for (const element of ds) {
-					if (element.code === _val) {
+					if (element.value === _val) {
 						return element;
 					}
 				}