@newview/permission-service 1.2.48 → 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,7 @@
1
+ ### 版本 1.2.49
2
+ 1、图签转换
3
+
4
+ 1. 平台及子系统功能优化
1
5
  ### 版本 1.2.48
2
6
  1. 平台及子系统功能优化
3
7
 
@@ -11662,6 +11662,13 @@ class UserinforInstance2 extends BaseInstance {
11662
11662
  onclick: () => {
11663
11663
  this.importCAData();
11664
11664
  }
11665
+ },
11666
+ {
11667
+ name: "imgChage",
11668
+ text: "图签转换",
11669
+ onclick: () => {
11670
+ this.CAToImgData();
11671
+ }
11665
11672
  }
11666
11673
  ],
11667
11674
  rightToolbars: [
@@ -12270,12 +12277,32 @@ class UserinforInstance2 extends BaseInstance {
12270
12277
  }));
12271
12278
  __publicField(this, "userSignFormItems", reactive([
12272
12279
  // { model: 'CAUserInfoKey', label: '用户KEY', type: 'Input', prop: 'CAUserInfoKey', span: 24 },
12273
- { model: "CAUserSealKey", label: "印章KEY", type: "Input", prop: "CAUserSealKey", span: 24, inputProp: { append: "选择", onTextClick: () => {
12274
- this.GetUserSealData(3);
12275
- } } },
12276
- { model: "CAUserYZKey", label: "圆章KEY", type: "Input", prop: "CAUserYZKey", span: 24, inputProp: { append: "选择", onTextClick: () => {
12277
- this.GetUserSealData(2);
12278
- } } }
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
+ }
12279
12306
  ]));
12280
12307
  // 私有方法 | private 方法名() {}
12281
12308
  /** 当前所选人 */
@@ -12474,6 +12501,12 @@ class UserinforInstance2 extends BaseInstance {
12474
12501
  __publicField(this, "importCAData", () => {
12475
12502
  this.importCAModal.value = true;
12476
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
+ });
12477
12510
  __publicField(this, "doExcelPointImport", async (datas) => {
12478
12511
  console.log(datas);
12479
12512
  if (datas.length == 0) {
@@ -12897,6 +12930,26 @@ class UserinforInstance2 extends BaseInstance {
12897
12930
  }
12898
12931
  });
12899
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
+ }
12900
12953
  async GetUserSealData(type2) {
12901
12954
  this.userSealData.value = [];
12902
12955
  this.userSealListLoading.value = true;