@newview/permission-service 1.2.6 → 1.2.7

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,3 @@
1
- 版本 1.2.6
1
+ 版本 1.2.7
2
2
 
3
- 1. subPlatform 功能新增菜单模块
3
+ 1. subPlatform 功能问题修复
@@ -24603,6 +24603,9 @@ class GeneralConfigurationInstance extends BaseInstance {
24603
24603
  if (res && res.length > 0) {
24604
24604
  Object.assign(this.nowRow, res[0]);
24605
24605
  let data = this.props.configType == "GC" ? this.utilities.deepCopy(JSON.parse(res[0].ProjectConfig)) : this.utilities.deepCopy(JSON.parse(res[0].ConstructConfig));
24606
+ if (data && data.length > 0) {
24607
+ data = data.sort((a, b) => a.orderNum - b.orderNum);
24608
+ }
24606
24609
  this.loadMainData(data);
24607
24610
  }
24608
24611
  }
@@ -24989,6 +24992,7 @@ class PlatformInstance2 extends BaseInstance {
24989
24992
  * @param data
24990
24993
  */
24991
24994
  doEditPlatform(data) {
24995
+ var _a;
24992
24996
  const user = this.storageInfo.getUser();
24993
24997
  this.platformFormModel.Id = data.Id;
24994
24998
  this.platformFormModel.SKey = data.SKey;
@@ -25003,6 +25007,14 @@ class PlatformInstance2 extends BaseInstance {
25003
25007
  this.platformFormModel.LastUpdateUserId = user.Id;
25004
25008
  this.platformFormModel.LastUpdateUserName = user.UserName;
25005
25009
  this.platformFormModel.LastUpdateDate = this.utilities.getCurrentDate();
25010
+ this.platformFormModel.PId = data.PId;
25011
+ const tableData = (_a = this.platformGrid.value) == null ? void 0 : _a.getDatas();
25012
+ this.platformFormItems[4].selectProp.datas = tableData.length > 0 ? tableData == null ? void 0 : tableData.map((item) => {
25013
+ return {
25014
+ value: item.Id,
25015
+ text: item.PlatformAbbreviation
25016
+ };
25017
+ }) : [];
25006
25018
  this.editPlatformModalTitle.value = `编辑 - ${data.PlatformName}`;
25007
25019
  this.showEditPlatform.value = true;
25008
25020
  }
@@ -25030,14 +25042,14 @@ class PlatformInstance2 extends BaseInstance {
25030
25042
  this.platformFormItems[4].selectProp.datas = data.length > 0 ? data == null ? void 0 : data.map((item) => {
25031
25043
  return {
25032
25044
  value: item.Id,
25033
- text: item.PlatformName
25045
+ text: item.PlatformAbbreviation
25034
25046
  };
25035
25047
  }) : [];
25036
25048
  this.showEditPlatform.value = true;
25037
25049
  }
25038
25050
  //#endregion 系统平台编辑 END
25039
25051
  }
25040
- const Platform_vue_vue_type_style_index_0_scoped_0cbccbdc_lang = "";
25052
+ const Platform_vue_vue_type_style_index_0_scoped_30a3712d_lang = "";
25041
25053
  const _hoisted_1$6 = { style: { "height": "500px", "overflow-y": "auto" } };
25042
25054
  function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
25043
25055
  const _component_NvGrid = resolveComponent("NvGrid");
@@ -25142,7 +25154,7 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
25142
25154
  _: 1
25143
25155
  });
25144
25156
  }
25145
- const subplatform = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$6], ["__scopeId", "data-v-0cbccbdc"]]);
25157
+ const subplatform = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$6], ["__scopeId", "data-v-30a3712d"]]);
25146
25158
  const propDefine$5 = {
25147
25159
  linkParam: {
25148
25160
  // 带入的参数
@@ -25778,7 +25790,6 @@ class RoleInstance2 extends BaseInstance {
25778
25790
  */
25779
25791
  __publicField(this, "doChangeOriginPlatform", () => {
25780
25792
  const values = this.originPlatform.list.filter((item) => item.Id == this.originPlatform.selectedId);
25781
- debugger;
25782
25793
  if (values.length > 0) {
25783
25794
  this.originPlatform.selectedItem = values[0];
25784
25795
  } else {
@@ -26273,9 +26284,7 @@ class EnterpriseInstance2 extends BaseInstance {
26273
26284
  var _a;
26274
26285
  this.spinPlatShow.value = true;
26275
26286
  const platId = (_a = this.storageInfo.getCurrentPlatform()) == null ? void 0 : _a.Id;
26276
- const apiResult = await this.platformApi.getEntities(QueryWrapper.create().eq("Id", platId).or((i) => i.allEq({
26277
- PId: platId
26278
- })).orderBy(["OrderNo"]));
26287
+ const apiResult = await this.platformApi.getEntities(QueryWrapper.create().eq("Id", platId).orderBy(["OrderNo"]));
26279
26288
  this.platData.value = this.utilities.parseApiResult(apiResult);
26280
26289
  this.spinPlatShow.value = false;
26281
26290
  if (this.platData.value.length > 0)
@@ -26821,6 +26830,7 @@ class InstitutionInstance2 extends BaseInstance {
26821
26830
  // 私有属性 | private
26822
26831
  // 响应属性 | ref、reactive、computed、watch
26823
26832
  __publicField(this, "platId", ref(0));
26833
+ __publicField(this, "selectPlat", ref({}));
26824
26834
  __publicField(this, "platData", ref([]));
26825
26835
  __publicField(this, "spinPlatShow", ref(false));
26826
26836
  // 私有方法 | private 方法名() {}
@@ -26837,11 +26847,12 @@ class InstitutionInstance2 extends BaseInstance {
26837
26847
  })).orderBy(["OrderNo"]));
26838
26848
  this.platData.value = this.utilities.parseApiResult(apiResult);
26839
26849
  this.spinPlatShow.value = false;
26840
- if (this.platData.value.length > 0)
26850
+ if (this.platData.value.length > 0) {
26841
26851
  this.platId.value = this.platData.value[0].Id;
26842
- nextTick(() => {
26843
- this.doPlatformListSelect();
26844
- });
26852
+ nextTick(() => {
26853
+ this.doPlatformListSelect(this.platId.value);
26854
+ });
26855
+ }
26845
26856
  });
26846
26857
  //#endregion 系统平台 END
26847
26858
  //#region 机构类别
@@ -27000,7 +27011,9 @@ class InstitutionInstance2 extends BaseInstance {
27000
27011
  * 系统平台List选中事件
27001
27012
  * @param data
27002
27013
  */
27003
- __publicField(this, "doPlatformListSelect", async () => {
27014
+ __publicField(this, "doPlatformListSelect", async (data) => {
27015
+ const res = this.platData.value.find((item) => item.Id == data);
27016
+ this.selectPlat.value = res;
27004
27017
  await this.loadEnterprises();
27005
27018
  this.loadInstitutionGridData(this.platId.value, "", "", "");
27006
27019
  this.loadInstitutionTree();
@@ -27521,7 +27534,14 @@ class InstitutionInstance2 extends BaseInstance {
27521
27534
  */
27522
27535
  setEnterpriseDatas() {
27523
27536
  const datas = [];
27524
- for (const item of this.enterprises.filter((item2) => item2.PlatformId == this.platId.value)) {
27537
+ let plat = [];
27538
+ if (this.selectPlat.PId !== 0) {
27539
+ plat = this.platData.value.filter((item) => item.Id == this.selectPlat.value.PId || this.selectPlat.value.Id == item.Id);
27540
+ } else {
27541
+ plat = this.platData.value.filter((item) => item.Id == this.selectPlat.value.Id);
27542
+ }
27543
+ const res = this.enterprises.filter((itemA) => plat.some((itemB) => itemB.Id == itemA.PlatformId));
27544
+ for (const item of res) {
27525
27545
  datas.push({ text: item.EnterpriseName, value: item.Id });
27526
27546
  }
27527
27547
  this.institutionFormItems[3].selectProp.datas = datas;