@newview/permission-service 1.2.48 → 1.2.50

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
 
@@ -5247,12 +5247,32 @@ let UserinforInstance$1 = class UserinforInstance extends BaseInstance {
5247
5247
  }));
5248
5248
  __publicField(this, "userSignFormItems", reactive([
5249
5249
  // { model: 'CAUserInfoKey', label: '用户KEY', type: 'Input', prop: 'CAUserInfoKey', span: 24 },
5250
- { model: "CAUserSealKey", label: "印章KEY", type: "Input", prop: "CAUserSealKey", span: 24, inputProp: { append: "选择", onTextClick: () => {
5251
- this.GetUserSealData(3);
5252
- } } },
5253
- { model: "CAUserYZKey", label: "圆章KEY", type: "Input", prop: "CAUserYZKey", span: 24, inputProp: { append: "选择", onTextClick: () => {
5254
- this.GetUserSealData(2);
5255
- } } }
5250
+ {
5251
+ model: "CAUserSealKey",
5252
+ label: "印章KEY",
5253
+ type: "Input",
5254
+ prop: "CAUserSealKey",
5255
+ span: 24,
5256
+ inputProp: {
5257
+ append: "选择",
5258
+ onTextClick: () => {
5259
+ this.GetUserSealData(3);
5260
+ }
5261
+ }
5262
+ },
5263
+ {
5264
+ model: "CAUserYZKey",
5265
+ label: "圆章KEY",
5266
+ type: "Input",
5267
+ prop: "CAUserYZKey",
5268
+ span: 24,
5269
+ inputProp: {
5270
+ append: "选择",
5271
+ onTextClick: () => {
5272
+ this.GetUserSealData(2);
5273
+ }
5274
+ }
5275
+ }
5256
5276
  ]));
5257
5277
  // 私有方法 | private 方法名() {}
5258
5278
  /** 当前所选人 */
@@ -11662,6 +11682,13 @@ class UserinforInstance2 extends BaseInstance {
11662
11682
  onclick: () => {
11663
11683
  this.importCAData();
11664
11684
  }
11685
+ },
11686
+ {
11687
+ name: "imgChage",
11688
+ text: "图签转换",
11689
+ onclick: () => {
11690
+ this.CAToImgData();
11691
+ }
11665
11692
  }
11666
11693
  ],
11667
11694
  rightToolbars: [
@@ -11818,6 +11845,7 @@ class UserinforInstance2 extends BaseInstance {
11818
11845
  CIdNo: "",
11819
11846
  UserIconToken: "",
11820
11847
  UserSignImgToken: "",
11848
+ UserSignatureImgToken: "",
11821
11849
  Account: "",
11822
11850
  AccountType: 0,
11823
11851
  AccountStatus: 1,
@@ -11919,7 +11947,17 @@ class UserinforInstance2 extends BaseInstance {
11919
11947
  model: "UserSignImgToken",
11920
11948
  prop: "UserSignImgToken",
11921
11949
  type: "UploadFile",
11922
- span: 24,
11950
+ span: 12,
11951
+ uploadFileProp: {
11952
+ uploadQuantity: 1
11953
+ }
11954
+ },
11955
+ {
11956
+ label: "签章图片",
11957
+ model: "UserSignatureImgToken",
11958
+ prop: "UserSignatureImgToken",
11959
+ type: "UploadFile",
11960
+ span: 12,
11923
11961
  uploadFileProp: {
11924
11962
  uploadQuantity: 1
11925
11963
  }
@@ -12270,12 +12308,32 @@ class UserinforInstance2 extends BaseInstance {
12270
12308
  }));
12271
12309
  __publicField(this, "userSignFormItems", reactive([
12272
12310
  // { 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
- } } }
12311
+ {
12312
+ model: "CAUserSealKey",
12313
+ label: "印章KEY",
12314
+ type: "Input",
12315
+ prop: "CAUserSealKey",
12316
+ span: 24,
12317
+ inputProp: {
12318
+ append: "选择",
12319
+ onTextClick: () => {
12320
+ this.GetUserSealData(3);
12321
+ }
12322
+ }
12323
+ },
12324
+ {
12325
+ model: "CAUserYZKey",
12326
+ label: "圆章KEY",
12327
+ type: "Input",
12328
+ prop: "CAUserYZKey",
12329
+ span: 24,
12330
+ inputProp: {
12331
+ append: "选择",
12332
+ onTextClick: () => {
12333
+ this.GetUserSealData(2);
12334
+ }
12335
+ }
12336
+ }
12279
12337
  ]));
12280
12338
  // 私有方法 | private 方法名() {}
12281
12339
  /** 当前所选人 */
@@ -12474,6 +12532,12 @@ class UserinforInstance2 extends BaseInstance {
12474
12532
  __publicField(this, "importCAData", () => {
12475
12533
  this.importCAModal.value = true;
12476
12534
  });
12535
+ __publicField(this, "CAToImgData", () => {
12536
+ var _a;
12537
+ const userDatas = (_a = this.insTreeUserGrid.value) == null ? void 0 : _a.getDatas();
12538
+ const users = userDatas == null ? void 0 : userDatas.filter((x) => !this.utilities.isNull(x["UserSignImgToken"]) == true);
12539
+ this.loadCAImgs(users, 0);
12540
+ });
12477
12541
  __publicField(this, "doExcelPointImport", async (datas) => {
12478
12542
  console.log(datas);
12479
12543
  if (datas.length == 0) {
@@ -12661,6 +12725,7 @@ class UserinforInstance2 extends BaseInstance {
12661
12725
  this.userFormModel.CIdNo = data.CIdNo;
12662
12726
  this.userFormModel.UserIconToken = data.UserIconToken;
12663
12727
  this.userFormModel.UserSignImgToken = data.UserSignImgToken;
12728
+ this.userFormModel.UserSignatureImgToken = data.UserSignatureImgToken;
12664
12729
  this.userFormModel.Account = data.Account;
12665
12730
  this.userFormModel.AccountStatus = data.AccountStatus;
12666
12731
  this.userFormModel.AccountType = data.AccountType;
@@ -12687,6 +12752,7 @@ class UserinforInstance2 extends BaseInstance {
12687
12752
  this.userFormModel.CIdNo = "";
12688
12753
  this.userFormModel.UserIconToken = "";
12689
12754
  this.userFormModel.UserSignImgToken = "";
12755
+ this.userFormModel.UserSignatureImgToken = "";
12690
12756
  this.userFormModel.Account = "";
12691
12757
  this.userFormModel.AccountType = 1;
12692
12758
  this.userFormModel.AccountStatus = 1;
@@ -12897,6 +12963,41 @@ class UserinforInstance2 extends BaseInstance {
12897
12963
  }
12898
12964
  });
12899
12965
  }
12966
+ async loadCAImgs(users, index2) {
12967
+ if (index2 == users.length) {
12968
+ this.message.success("转换成功!");
12969
+ } else {
12970
+ const apiResult = await this.userSignApi.getEntityByFilter(QueryWrapper.create().eq("UserId", users[index2].Id));
12971
+ const result = this.utilities.parseApiResult(apiResult);
12972
+ let CAUserSealImg = "";
12973
+ let SAUserSealImg = "";
12974
+ const token = users[index2].UserSignImgToken;
12975
+ if (!this.utilities.isNull(token)) {
12976
+ let imgs = this.utilities.parseApiResult(await new FileApi().getFiles(token));
12977
+ if (imgs.length > 0) {
12978
+ let base64 = this.utilities.parseApiResult(await new FileApi().getBase64(token, imgs[0].Id));
12979
+ CAUserSealImg = "data:image/png;base64," + base64;
12980
+ }
12981
+ }
12982
+ const SAtoken = users[index2].UserSignatureImgToken;
12983
+ if (!this.utilities.isNull(SAtoken)) {
12984
+ let SAimgs = this.utilities.parseApiResult(await new FileApi().getFiles(SAtoken));
12985
+ if (SAimgs.length > 0) {
12986
+ let SAbase64 = this.utilities.parseApiResult(await new FileApi().getBase64(token, SAimgs[0].Id));
12987
+ SAUserSealImg = "data:image/png;base64," + SAbase64;
12988
+ }
12989
+ }
12990
+ if (this.utilities.isNull(result)) {
12991
+ await this.userSignApi.save({ Id: 0, UserId: users[index2].Id, CAUserSealImg, CAUserYZImg: SAUserSealImg });
12992
+ } else {
12993
+ result.CAUserSealImg = CAUserSealImg;
12994
+ result.CAUserYZImg = SAUserSealImg;
12995
+ await this.userSignApi.save(result);
12996
+ }
12997
+ index2 += 1;
12998
+ this.loadCAImgs(users, index2);
12999
+ }
13000
+ }
12900
13001
  async GetUserSealData(type2) {
12901
13002
  this.userSealData.value = [];
12902
13003
  this.userSealListLoading.value = true;
@@ -12932,8 +13033,8 @@ class UserinforInstance2 extends BaseInstance {
12932
13033
  };
12933
13034
  }
12934
13035
  }
12935
- const Userinfor_vue_vue_type_style_index_0_scoped_bed8ccac_lang = "";
12936
- const _withScopeId$2 = (n) => (pushScopeId("data-v-bed8ccac"), n = n(), popScopeId(), n);
13036
+ const Userinfor_vue_vue_type_style_index_0_scoped_5dc738b2_lang = "";
13037
+ const _withScopeId$2 = (n) => (pushScopeId("data-v-5dc738b2"), n = n(), popScopeId(), n);
12937
13038
  const _hoisted_1$5 = { class: "instree-search" };
12938
13039
  const _hoisted_2$3 = { class: "instree-list" };
12939
13040
  const _hoisted_3$3 = { style: { "height": "750px", "overflow-y": "auto" } };
@@ -12992,7 +13093,7 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
12992
13093
  default: withCtx(() => [
12993
13094
  createVNode(_component_NvBox, {
12994
13095
  width: "300px",
12995
- title: "组织机构树",
13096
+ title: "组织机构树1",
12996
13097
  showArrow: true,
12997
13098
  onChange: _ctx.doChangeUserBoxWidth
12998
13099
  }, {
@@ -13491,7 +13592,7 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
13491
13592
  _: 1
13492
13593
  });
13493
13594
  }
13494
- const subuserinfor = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$6], ["__scopeId", "data-v-bed8ccac"]]);
13595
+ const subuserinfor = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$6], ["__scopeId", "data-v-5dc738b2"]]);
13495
13596
  const propDefine$5 = {
13496
13597
  linkParam: {
13497
13598
  // 带入的参数