@newview/permission-service 1.2.53 → 1.2.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -5
- package/dist/permission-service.js +15 -6
- package/dist/permission-service.umd.cjs +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4540,6 +4540,7 @@ let UserinforInstance$1 = class UserinforInstance extends BaseInstance {
|
|
|
4540
4540
|
__publicField(this, "institutionTree", ref([]));
|
|
4541
4541
|
__publicField(this, "loadingInstitutionTree", ref(false));
|
|
4542
4542
|
__publicField(this, "insTreeIds", ref(""));
|
|
4543
|
+
__publicField(this, "institutionList", []);
|
|
4543
4544
|
// 响应式方法 | xxx = () => {}
|
|
4544
4545
|
/**
|
|
4545
4546
|
* 平台切换
|
|
@@ -4941,8 +4942,9 @@ let UserinforInstance$1 = class UserinforInstance extends BaseInstance {
|
|
|
4941
4942
|
let res = this.utilities.parseApiResult(await this.userinforApi.getInstitutionTreeAllUsers(0, this.selectedPlatform.Id));
|
|
4942
4943
|
if (res && res.length > 0) {
|
|
4943
4944
|
let user = res.filter((x) => x.IsDel == 0 && x.Phone == this.userFormModel.Phone && x.Id !== this.userFormModel.Id);
|
|
4944
|
-
if (user
|
|
4945
|
-
this.
|
|
4945
|
+
if (user) {
|
|
4946
|
+
let ins = this.institutionList.find((e) => e["InstitutionId"] == user.InstitutionId);
|
|
4947
|
+
this.modal.info({ title: "系统提示", content: `手机号 ${this.userFormModel.Phone} 已在【${this.selectedPlatform.PlatformAbbreviation}】【${ins.InstitutionAbbreviation}】下关联其他账号, 请重新输入!` });
|
|
4946
4948
|
this.saveingUser.value = false;
|
|
4947
4949
|
return;
|
|
4948
4950
|
}
|
|
@@ -5482,6 +5484,7 @@ let UserinforInstance$1 = class UserinforInstance extends BaseInstance {
|
|
|
5482
5484
|
return childDatas;
|
|
5483
5485
|
};
|
|
5484
5486
|
this.institutionTree.value = whileChildData(0);
|
|
5487
|
+
this.institutionList = datas;
|
|
5485
5488
|
if (!hasSelected && this.institutionTree.value.length > 0) {
|
|
5486
5489
|
const data = this.institutionTree.value[0];
|
|
5487
5490
|
data.selected = true;
|
|
@@ -11568,6 +11571,7 @@ class UserinforInstance2 extends BaseInstance {
|
|
|
11568
11571
|
// 响应属性 | ref、reactive、computed
|
|
11569
11572
|
__publicField(this, "institutionTree", ref([]));
|
|
11570
11573
|
__publicField(this, "loadingInstitutionTree", ref(false));
|
|
11574
|
+
__publicField(this, "institutionList", []);
|
|
11571
11575
|
// 响应式方法 | xxx = () => {}
|
|
11572
11576
|
/**
|
|
11573
11577
|
* 平台切换
|
|
@@ -12000,9 +12004,10 @@ class UserinforInstance2 extends BaseInstance {
|
|
|
12000
12004
|
}
|
|
12001
12005
|
let res = this.utilities.parseApiResult(await this.userinforApi.getInstitutionTreeAllUsers(0, this.selectedPlatform.Id));
|
|
12002
12006
|
if (res && res.length > 0) {
|
|
12003
|
-
let user = res.
|
|
12004
|
-
if (user
|
|
12005
|
-
this.
|
|
12007
|
+
let user = res.find((x) => x.IsDel == 0 && x.Phone == this.userFormModel.Phone && x.Id !== this.userFormModel.Id);
|
|
12008
|
+
if (user) {
|
|
12009
|
+
let ins = this.institutionList.find((e) => e["InstitutionId"] == user.InstitutionId);
|
|
12010
|
+
this.modal.info({ title: "系统提示", content: `手机号 ${this.userFormModel.Phone} 已在【${this.selectedPlatform.PlatformAbbreviation}】【${ins.InstitutionAbbreviation}】下关联其他账号, 请重新输入!` });
|
|
12006
12011
|
this.saveingUser.value = false;
|
|
12007
12012
|
return;
|
|
12008
12013
|
}
|
|
@@ -12682,6 +12687,7 @@ class UserinforInstance2 extends BaseInstance {
|
|
|
12682
12687
|
return childDatas;
|
|
12683
12688
|
};
|
|
12684
12689
|
this.institutionTree.value = whileChildData(0);
|
|
12690
|
+
this.institutionList = datas;
|
|
12685
12691
|
if (!hasSelected && this.institutionTree.value.length > 0) {
|
|
12686
12692
|
const data = this.institutionTree.value[0];
|
|
12687
12693
|
data.selected = true;
|
|
@@ -30982,7 +30988,7 @@ class ProjectSummaryInstance extends BaseInstance {
|
|
|
30982
30988
|
if (res.length > 0) {
|
|
30983
30989
|
console.log("表单数据xxxx", res);
|
|
30984
30990
|
Object.assign(this.nowData, res[0]);
|
|
30985
|
-
let formData = JSON.parse(res[0].ConfigData);
|
|
30991
|
+
let formData = JSON.parse(this.fixJsonWithNewlines(res[0].ConfigData));
|
|
30986
30992
|
console.log("xxxxxxxxxx解析json", formData);
|
|
30987
30993
|
Object.assign(formData, {
|
|
30988
30994
|
Province: res[0].Province ? res[0].Province : "",
|
|
@@ -31012,6 +31018,9 @@ class ProjectSummaryInstance extends BaseInstance {
|
|
|
31012
31018
|
this.message.error("请求数据出错,请联系管理员");
|
|
31013
31019
|
}
|
|
31014
31020
|
}
|
|
31021
|
+
fixJsonWithNewlines(jsonString) {
|
|
31022
|
+
return jsonString.replace(/\n/g, "\\n").replace(/\r/g, "\\r");
|
|
31023
|
+
}
|
|
31015
31024
|
// 私有方法 | private 方法名() {}
|
|
31016
31025
|
// private test2() {}
|
|
31017
31026
|
/**
|