@newview/permission-service 1.2.45 → 1.2.47

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,13 @@
1
+ ### 版本 1.2.47
2
+ 1.系统用户的签字可以通过上传签字图片代替CA签字
3
+
4
+
5
+
6
+ ### 版本 1.2.46
7
+ 1、修改系统平台,增加路段字段
8
+
9
+
10
+
1
11
  ### 版本 1.2.45
2
12
  1、判断同一平台下手机号是否唯一
3
13
 
@@ -285,7 +285,8 @@ let PlatformInstance$1 = class PlatformInstance extends BaseInstance {
285
285
  LastUpdateUserId: 0,
286
286
  LastUpdateUserName: "",
287
287
  LastUpdateDate: "",
288
- DefaultPwd: ""
288
+ DefaultPwd: "",
289
+ RoadSection: ""
289
290
  }));
290
291
  __publicField(this, "platformFormItems", reactive([
291
292
  { model: "PlatformName", label: "系统名称", prop: "PlatformName", type: "Input", span: 24, rules: [{ required: true, message: "系统名称不能为空", trigger: "blur" }] },
@@ -308,7 +309,8 @@ let PlatformInstance$1 = class PlatformInstance extends BaseInstance {
308
309
  { model: "PlatformUrl", label: "系统URL", prop: "PlatformUrl", type: "Input", span: 24 },
309
310
  { model: "CABusinessKey", label: "CAKey", prop: "CABusinessKey", type: "Input", span: 24 },
310
311
  { model: "DefaultPwd", label: "用户默认密码", prop: "DefaultPwd", type: "Input", span: 24 },
311
- { model: "OrderNo", label: "排序号", prop: "OrderNo", type: "InputNumber", span: 24 }
312
+ { model: "OrderNo", label: "排序号", prop: "OrderNo", type: "InputNumber", span: 24 },
313
+ { model: "RoadSection", label: "路段", prop: "RoadSection", type: "Input", span: 24 }
312
314
  ]));
313
315
  // 响应式方法 | xxx = () => {}
314
316
  /**
@@ -475,6 +477,7 @@ let PlatformInstance$1 = class PlatformInstance extends BaseInstance {
475
477
  this.platformFormModel.PId = data.PId;
476
478
  this.platformFormModel.LastUpdateDate = this.utilities.getCurrentDate();
477
479
  this.platformFormModel.DefaultPwd = data.DefaultPwd;
480
+ this.platformFormModel.RoadSection = data.RoadSection;
478
481
  this.editPlatformModalTitle.value = `编辑 - ${data.PlatformName}`;
479
482
  const tableData = (_a = this.platformGrid.value) == null ? void 0 : _a.getDatas();
480
483
  this.platformFormItems[4].selectProp.datas = tableData.length > 0 ? tableData == null ? void 0 : tableData.map((item) => {
@@ -11583,6 +11586,7 @@ class UserinforInstance2 extends BaseInstance {
11583
11586
  __publicField(this, "doChangeInsTree", (datas) => {
11584
11587
  if (datas.length > 0) {
11585
11588
  this.selectedInsTree = datas[0];
11589
+ this.insTreeUserGrid.value.setPageIndex(1);
11586
11590
  this.loadInstitutionTreeUsers({});
11587
11591
  }
11588
11592
  });
@@ -11951,17 +11955,14 @@ class UserinforInstance2 extends BaseInstance {
11951
11955
  this.saveingUser.value = false;
11952
11956
  return;
11953
11957
  }
11954
- const queryWrapper2 = QueryWrapper.create();
11955
- queryWrapper2.eq("Phone", this.userFormModel.Phone).eq("IsDel", 0);
11956
- if (this.userFormModel.Id > 0) {
11957
- queryWrapper2.ne("Id", this.userFormModel.Id);
11958
- }
11959
- const apiResult2 = await this.userinforApi.isExist(queryWrapper2);
11960
- result = this.utilities.parseApiResult(apiResult2);
11961
- if (result) {
11962
- this.message.warning(`手机号 ${this.userFormModel.Phone} 已关联其他账号, 请重新输入!`);
11963
- this.saveingUser.value = false;
11964
- return;
11958
+ let res = this.utilities.parseApiResult(await this.userinforApi.getInstitutionTreeAllUsers(0, this.selectedPlatform.Id));
11959
+ if (res && res.length > 0) {
11960
+ let user = res.filter((x) => x.IsDel == 0 && x.Phone == this.userFormModel.Phone && x.Id !== this.userFormModel.Id);
11961
+ if (user.length > 0) {
11962
+ this.message.warning(`手机号 ${this.userFormModel.Phone} 已在当前平台下关联其他账号, 请重新输入!`);
11963
+ this.saveingUser.value = false;
11964
+ return;
11965
+ }
11965
11966
  }
11966
11967
  }
11967
11968
  const queryWrapper = QueryWrapper.create();
@@ -12332,6 +12333,98 @@ class UserinforInstance2 extends BaseInstance {
12332
12333
  }
12333
12334
  });
12334
12335
  });
12336
+ /**
12337
+ * 上传用户印章图片
12338
+ */
12339
+ __publicField(this, "doUploadUserSealImg", async () => {
12340
+ if (this.utilities.isNull(this.userSignFormModel.CAUserSealImg)) {
12341
+ this.proceedWithUpload();
12342
+ } else {
12343
+ this.modal.confirm({
12344
+ title: "提示",
12345
+ content: "确定要覆盖当前已存在的印章图片吗?",
12346
+ onOk: async () => {
12347
+ this.proceedWithUpload();
12348
+ }
12349
+ });
12350
+ }
12351
+ });
12352
+ /**
12353
+ * 继续选择印章上传
12354
+ */
12355
+ __publicField(this, "proceedWithUpload", async () => {
12356
+ let inputObj = document.createElement("input");
12357
+ inputObj.setAttribute("id", "UserSeal");
12358
+ inputObj.setAttribute("type", "file");
12359
+ inputObj.setAttribute("style", "visibility:hidden");
12360
+ inputObj.setAttribute("accept", "image/*");
12361
+ document.body.appendChild(inputObj);
12362
+ inputObj.addEventListener("change", (event) => {
12363
+ const files = event.target.files;
12364
+ if (files && files.length > 0) {
12365
+ const file = files[0];
12366
+ if (file.size > 50 * 1024) {
12367
+ this.message.warning("图片大小不能超过50KB!");
12368
+ return;
12369
+ }
12370
+ const reader = new FileReader();
12371
+ reader.onloadend = () => {
12372
+ const base64String = reader.result;
12373
+ this.userSignFormModel.CAUserSealImg = base64String;
12374
+ this.userSignFormModel.CAUserSealToken = this.userSignFormModel.CAUserSealToken ? this.userSignFormModel.CAUserSealToken : this.utilities.getUniqueCode();
12375
+ this.uploadUserSignImg(this.userSignFormModel.UserId, this.userSignFormModel.CAUserSealToken, this.userSignFormModel.CAUserSealImg);
12376
+ };
12377
+ reader.readAsDataURL(file);
12378
+ }
12379
+ });
12380
+ inputObj.click();
12381
+ });
12382
+ /**
12383
+ * 上传用户圆章图片
12384
+ */
12385
+ __publicField(this, "doUploadUserYZImg", async () => {
12386
+ if (this.utilities.isNull(this.userSignFormModel.CAUserYZImg)) {
12387
+ this.proceedWithUploadYZImg();
12388
+ } else {
12389
+ this.modal.confirm({
12390
+ title: "提示",
12391
+ content: "确定要覆盖当前已存在的圆章图片吗?",
12392
+ onOk: async () => {
12393
+ this.proceedWithUploadYZImg();
12394
+ }
12395
+ });
12396
+ }
12397
+ });
12398
+ /**
12399
+ * 继续选择圆章上传
12400
+ */
12401
+ __publicField(this, "proceedWithUploadYZImg", async () => {
12402
+ let inputObj = document.createElement("input");
12403
+ inputObj.setAttribute("id", "YZImg");
12404
+ inputObj.setAttribute("type", "file");
12405
+ inputObj.setAttribute("style", "visibility:hidden");
12406
+ inputObj.setAttribute("accept", "image/*");
12407
+ document.body.appendChild(inputObj);
12408
+ inputObj.addEventListener("change", (event) => {
12409
+ const files = event.target.files;
12410
+ if (files && files.length > 0) {
12411
+ const file = files[0];
12412
+ if (file.size > 50 * 1024) {
12413
+ this.message.warning("图片大小不能超过50KB!");
12414
+ return;
12415
+ }
12416
+ const reader = new FileReader();
12417
+ reader.onloadend = () => {
12418
+ const base64String = reader.result;
12419
+ this.userSignFormModel.CAUserYZImg = base64String;
12420
+ this.userSignFormModel.CAUserYZToken = this.userSignFormModel.CAUserYZToken ? this.userSignFormModel.CAUserYZToken : this.utilities.getUniqueCode();
12421
+ this.uploadUserSignImg(this.userSignFormModel.UserId, this.userSignFormModel.CAUserYZToken, this.userSignFormModel.CAUserYZImg);
12422
+ };
12423
+ reader.readAsDataURL(file);
12424
+ }
12425
+ });
12426
+ inputObj.click();
12427
+ });
12335
12428
  /**
12336
12429
  * 加载圆章KEY
12337
12430
  */
@@ -12836,8 +12929,8 @@ class UserinforInstance2 extends BaseInstance {
12836
12929
  };
12837
12930
  }
12838
12931
  }
12839
- const Userinfor_vue_vue_type_style_index_0_scoped_38293ad4_lang = "";
12840
- const _withScopeId$2 = (n) => (pushScopeId("data-v-38293ad4"), n = n(), popScopeId(), n);
12932
+ const Userinfor_vue_vue_type_style_index_0_scoped_bed8ccac_lang = "";
12933
+ const _withScopeId$2 = (n) => (pushScopeId("data-v-bed8ccac"), n = n(), popScopeId(), n);
12841
12934
  const _hoisted_1$5 = { class: "instree-search" };
12842
12935
  const _hoisted_2$3 = { class: "instree-list" };
12843
12936
  const _hoisted_3$3 = { style: { "height": "750px", "overflow-y": "auto" } };
@@ -13235,10 +13328,19 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
13235
13328
  type: "primary",
13236
13329
  size: "small",
13237
13330
  ghost: "",
13238
- style: { "float": "right" },
13331
+ style: { "float": "right", "margin-left": "3px" },
13239
13332
  icon: "md-refresh",
13240
13333
  onClick: _ctx.doLoadUserSealImg,
13241
13334
  title: "加载印章图片"
13335
+ }, null, 8, ["onClick"]),
13336
+ createVNode(_component_Button, {
13337
+ type: "primary",
13338
+ size: "small",
13339
+ ghost: "",
13340
+ style: { "float": "right" },
13341
+ icon: "md-arrow-round-up",
13342
+ onClick: _ctx.doUploadUserSealImg,
13343
+ title: "上传印章图片"
13242
13344
  }, null, 8, ["onClick"])
13243
13345
  ]),
13244
13346
  _: 1
@@ -13264,10 +13366,19 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
13264
13366
  type: "primary",
13265
13367
  size: "small",
13266
13368
  ghost: "",
13267
- style: { "float": "right" },
13369
+ style: { "float": "right", "margin-left": "3px" },
13268
13370
  icon: "md-refresh",
13269
13371
  onClick: _ctx.doLoadUserYZImg,
13270
13372
  title: "加载圆章图片"
13373
+ }, null, 8, ["onClick"]),
13374
+ createVNode(_component_Button, {
13375
+ type: "primary",
13376
+ size: "small",
13377
+ ghost: "",
13378
+ style: { "float": "right" },
13379
+ icon: "md-arrow-round-up",
13380
+ onClick: _ctx.doUploadUserYZImg,
13381
+ title: "上传圆章图片"
13271
13382
  }, null, 8, ["onClick"])
13272
13383
  ]),
13273
13384
  _: 1
@@ -13377,7 +13488,7 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
13377
13488
  _: 1
13378
13489
  });
13379
13490
  }
13380
- const subuserinfor = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$6], ["__scopeId", "data-v-38293ad4"]]);
13491
+ const subuserinfor = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$6], ["__scopeId", "data-v-bed8ccac"]]);
13381
13492
  const propDefine$5 = {
13382
13493
  linkParam: {
13383
13494
  // 带入的参数