@newview/permission-service 1.2.47 → 1.2.49

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,3 +1,11 @@
1
+ ### 版本 1.2.49
2
+ 1、图签转换
3
+
4
+ 1. 平台及子系统功能优化
5
+ ### 版本 1.2.48
6
+ 1. 平台及子系统功能优化
7
+
8
+
1
9
  ### 版本 1.2.47
2
10
  1.系统用户的签字可以通过上传签字图片代替CA签字
3
11
 
@@ -7701,6 +7701,9 @@ class GeneralConfigurationInstance extends BaseInstance {
7701
7701
  PlatformId: this.props.platformInfo.Id
7702
7702
  })));
7703
7703
  if (res && res.length > 0) {
7704
+ if (this.utilities.isNull(res[0].ProjectConfig)) {
7705
+ res[0].ProjectConfig = "[]";
7706
+ }
7704
7707
  Object.assign(this.nowRow, res[0]);
7705
7708
  let data = this.props.configType == "GC" ? this.utilities.deepCopy(JSON.parse(res[0].ProjectConfig)) : this.utilities.deepCopy(JSON.parse(res[0].ConstructConfig));
7706
7709
  if (data && data.length > 0) {
@@ -11659,6 +11662,13 @@ class UserinforInstance2 extends BaseInstance {
11659
11662
  onclick: () => {
11660
11663
  this.importCAData();
11661
11664
  }
11665
+ },
11666
+ {
11667
+ name: "imgChage",
11668
+ text: "图签转换",
11669
+ onclick: () => {
11670
+ this.CAToImgData();
11671
+ }
11662
11672
  }
11663
11673
  ],
11664
11674
  rightToolbars: [
@@ -12267,12 +12277,32 @@ class UserinforInstance2 extends BaseInstance {
12267
12277
  }));
12268
12278
  __publicField(this, "userSignFormItems", reactive([
12269
12279
  // { model: 'CAUserInfoKey', label: '用户KEY', type: 'Input', prop: 'CAUserInfoKey', span: 24 },
12270
- { model: "CAUserSealKey", label: "印章KEY", type: "Input", prop: "CAUserSealKey", span: 24, inputProp: { append: "选择", onTextClick: () => {
12271
- this.GetUserSealData(3);
12272
- } } },
12273
- { model: "CAUserYZKey", label: "圆章KEY", type: "Input", prop: "CAUserYZKey", span: 24, inputProp: { append: "选择", onTextClick: () => {
12274
- this.GetUserSealData(2);
12275
- } } }
12280
+ {
12281
+ model: "CAUserSealKey",
12282
+ label: "印章KEY",
12283
+ type: "Input",
12284
+ prop: "CAUserSealKey",
12285
+ span: 24,
12286
+ inputProp: {
12287
+ append: "选择",
12288
+ onTextClick: () => {
12289
+ this.GetUserSealData(3);
12290
+ }
12291
+ }
12292
+ },
12293
+ {
12294
+ model: "CAUserYZKey",
12295
+ label: "圆章KEY",
12296
+ type: "Input",
12297
+ prop: "CAUserYZKey",
12298
+ span: 24,
12299
+ inputProp: {
12300
+ append: "选择",
12301
+ onTextClick: () => {
12302
+ this.GetUserSealData(2);
12303
+ }
12304
+ }
12305
+ }
12276
12306
  ]));
12277
12307
  // 私有方法 | private 方法名() {}
12278
12308
  /** 当前所选人 */
@@ -12471,6 +12501,12 @@ class UserinforInstance2 extends BaseInstance {
12471
12501
  __publicField(this, "importCAData", () => {
12472
12502
  this.importCAModal.value = true;
12473
12503
  });
12504
+ __publicField(this, "CAToImgData", () => {
12505
+ var _a;
12506
+ const userDatas = (_a = this.insTreeUserGrid.value) == null ? void 0 : _a.getDatas();
12507
+ const users = userDatas == null ? void 0 : userDatas.filter((x) => !this.utilities.isNull(x["UserSignImgToken"]) == true);
12508
+ this.loadCAImgs(users, 0);
12509
+ });
12474
12510
  __publicField(this, "doExcelPointImport", async (datas) => {
12475
12511
  console.log(datas);
12476
12512
  if (datas.length == 0) {
@@ -12894,6 +12930,26 @@ class UserinforInstance2 extends BaseInstance {
12894
12930
  }
12895
12931
  });
12896
12932
  }
12933
+ async loadCAImgs(users, index2) {
12934
+ if (index2 == users.length) {
12935
+ this.message.success("转换成功!");
12936
+ } else {
12937
+ const token = users[index2].UserSignImgToken;
12938
+ let imgs = this.utilities.parseApiResult(await new FileApi().getFiles(token));
12939
+ let base64 = this.utilities.parseApiResult(await new FileApi().getBase64(token, imgs[0].Id));
12940
+ const apiResult = await this.userSignApi.getEntityByFilter(QueryWrapper.create().eq("UserId", users[index2].Id));
12941
+ const result = this.utilities.parseApiResult(apiResult);
12942
+ const CAUserSealImg = "data:image/png;base64," + base64;
12943
+ if (this.utilities.isNull(result)) {
12944
+ await this.userSignApi.save({ Id: 0, UserId: users[index2].Id, CAUserSealImg });
12945
+ } else {
12946
+ result.CAUserSealImg = CAUserSealImg;
12947
+ await this.userSignApi.save(result);
12948
+ }
12949
+ index2 += 1;
12950
+ this.loadCAImgs(users, index2);
12951
+ }
12952
+ }
12897
12953
  async GetUserSealData(type2) {
12898
12954
  this.userSealData.value = [];
12899
12955
  this.userSealListLoading.value = true;