@newview/permission-service 1.2.52 → 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 CHANGED
@@ -1,7 +1,11 @@
1
+ ### 版本 1.2.54
2
+ 1、子平台用户管理优化
1
3
 
2
- ### 版本 1.2.52
3
- 1、添加角色默认选中
4
+ 1、图签转换
5
+ ### 版本 1.2.49
6
+ 1、图签转换
4
7
 
8
+ 1. 平台及子系统功能优化
5
9
  ### 版本 1.2.48
6
10
  1. 平台及子系统功能优化
7
11
 
@@ -1911,7 +1911,8 @@ let RoleInstance$1 = class RoleInstance extends BaseInstance {
1911
1911
  isButtonGroup: false
1912
1912
  },
1913
1913
  rowConfig: {
1914
- isHover: true
1914
+ isHover: true,
1915
+ isCurrent: true
1915
1916
  },
1916
1917
  isPagination: true,
1917
1918
  pageSize: 15
@@ -4539,6 +4540,7 @@ let UserinforInstance$1 = class UserinforInstance extends BaseInstance {
4539
4540
  __publicField(this, "institutionTree", ref([]));
4540
4541
  __publicField(this, "loadingInstitutionTree", ref(false));
4541
4542
  __publicField(this, "insTreeIds", ref(""));
4543
+ __publicField(this, "institutionList", []);
4542
4544
  // 响应式方法 | xxx = () => {}
4543
4545
  /**
4544
4546
  * 平台切换
@@ -4940,8 +4942,9 @@ let UserinforInstance$1 = class UserinforInstance extends BaseInstance {
4940
4942
  let res = this.utilities.parseApiResult(await this.userinforApi.getInstitutionTreeAllUsers(0, this.selectedPlatform.Id));
4941
4943
  if (res && res.length > 0) {
4942
4944
  let user = res.filter((x) => x.IsDel == 0 && x.Phone == this.userFormModel.Phone && x.Id !== this.userFormModel.Id);
4943
- if (user.length > 0) {
4944
- this.message.warning(`手机号 ${this.userFormModel.Phone} 已在当前平台下关联其他账号, 请重新输入!`);
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}】下关联其他账号, 请重新输入!` });
4945
4948
  this.saveingUser.value = false;
4946
4949
  return;
4947
4950
  }
@@ -5481,6 +5484,7 @@ let UserinforInstance$1 = class UserinforInstance extends BaseInstance {
5481
5484
  return childDatas;
5482
5485
  };
5483
5486
  this.institutionTree.value = whileChildData(0);
5487
+ this.institutionList = datas;
5484
5488
  if (!hasSelected && this.institutionTree.value.length > 0) {
5485
5489
  const data = this.institutionTree.value[0];
5486
5490
  data.selected = true;
@@ -11567,6 +11571,7 @@ class UserinforInstance2 extends BaseInstance {
11567
11571
  // 响应属性 | ref、reactive、computed
11568
11572
  __publicField(this, "institutionTree", ref([]));
11569
11573
  __publicField(this, "loadingInstitutionTree", ref(false));
11574
+ __publicField(this, "institutionList", []);
11570
11575
  // 响应式方法 | xxx = () => {}
11571
11576
  /**
11572
11577
  * 平台切换
@@ -11999,9 +12004,10 @@ class UserinforInstance2 extends BaseInstance {
11999
12004
  }
12000
12005
  let res = this.utilities.parseApiResult(await this.userinforApi.getInstitutionTreeAllUsers(0, this.selectedPlatform.Id));
12001
12006
  if (res && res.length > 0) {
12002
- let user = res.filter((x) => x.IsDel == 0 && x.Phone == this.userFormModel.Phone && x.Id !== this.userFormModel.Id);
12003
- if (user.length > 0) {
12004
- this.message.warning(`手机号 ${this.userFormModel.Phone} 已在当前平台下关联其他账号, 请重新输入!`);
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}】下关联其他账号, 请重新输入!` });
12005
12011
  this.saveingUser.value = false;
12006
12012
  return;
12007
12013
  }
@@ -12681,6 +12687,7 @@ class UserinforInstance2 extends BaseInstance {
12681
12687
  return childDatas;
12682
12688
  };
12683
12689
  this.institutionTree.value = whileChildData(0);
12690
+ this.institutionList = datas;
12684
12691
  if (!hasSelected && this.institutionTree.value.length > 0) {
12685
12692
  const data = this.institutionTree.value[0];
12686
12693
  data.selected = true;
@@ -30981,7 +30988,7 @@ class ProjectSummaryInstance extends BaseInstance {
30981
30988
  if (res.length > 0) {
30982
30989
  console.log("表单数据xxxx", res);
30983
30990
  Object.assign(this.nowData, res[0]);
30984
- let formData = JSON.parse(res[0].ConfigData);
30991
+ let formData = JSON.parse(this.fixJsonWithNewlines(res[0].ConfigData));
30985
30992
  console.log("xxxxxxxxxx解析json", formData);
30986
30993
  Object.assign(formData, {
30987
30994
  Province: res[0].Province ? res[0].Province : "",
@@ -31011,6 +31018,9 @@ class ProjectSummaryInstance extends BaseInstance {
31011
31018
  this.message.error("请求数据出错,请联系管理员");
31012
31019
  }
31013
31020
  }
31021
+ fixJsonWithNewlines(jsonString) {
31022
+ return jsonString.replace(/\n/g, "\\n").replace(/\r/g, "\\r");
31023
+ }
31014
31024
  // 私有方法 | private 方法名() {}
31015
31025
  // private test2() {}
31016
31026
  /**