tx-sider 2.0.5 → 2.0.6

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/lib/TXUI.mjs CHANGED
@@ -24414,13 +24414,6 @@ const baseOptions = (data3) => {
24414
24414
  data: data3
24415
24415
  });
24416
24416
  };
24417
- const systemmenus = () => {
24418
- return cwRequest({
24419
- url: "/api/permission-management/permissions/systemmenus",
24420
- method: "get",
24421
- requestBase: "ROOT_BASE_URL"
24422
- });
24423
- };
24424
24417
  const setHeadImg = (data3) => {
24425
24418
  return cwRequest({
24426
24419
  url: "/api/identity/users/setHeadImg",
@@ -27656,8 +27649,7 @@ const _sfc_main = {
27656
27649
  const changePWDref = ref();
27657
27650
  const moduleTestS = ref();
27658
27651
  const isSystems = ref(props.isSystems);
27659
- const menuTitle = ref(props.menuTitle);
27660
- const modeuleType = ref(props.modeuleType);
27652
+ const modeuleType = computed(() => props.modeuleType);
27661
27653
  const selectedSystems = ref();
27662
27654
  const gjTest = ref();
27663
27655
  const gjId = ref();
@@ -27680,8 +27672,8 @@ const _sfc_main = {
27680
27672
  userInfo: {}
27681
27673
  });
27682
27674
  const refData = toRefs(data3);
27683
- const AccessData = ref(JSON.parse(localStorage.getItem("AccessData")));
27684
- const iconUrl = process.env.NODE_ENV == "development" ? "https://localhost:7110" : "https://basis.nacho.cn";
27675
+ ref(JSON.parse(localStorage.getItem("AccessData")));
27676
+ process.env.NODE_ENV == "development" ? "https://localhost:7110" : "https://basis.nacho.cn";
27685
27677
  const [ccflowData, onClickTodo] = useCcflowCall();
27686
27678
  watch(
27687
27679
  () => props.isSystems,
@@ -27701,26 +27693,6 @@ const _sfc_main = {
27701
27693
  }
27702
27694
  }
27703
27695
  );
27704
- watch(
27705
- () => props.menuTitle,
27706
- () => {
27707
- menuTitle.value = props.menuTitle;
27708
- }
27709
- );
27710
- watch(
27711
- () => props.modeuleType,
27712
- () => {
27713
- var _a, _b;
27714
- modeuleType.value = props.modeuleType;
27715
- console.log(modeuleType.value, "props.modeuleType");
27716
- console.log(
27717
- modeuleInfos.value,
27718
- modeuleType.value,
27719
- (_b = (_a = modeuleInfos.value) == null ? void 0 : _a.productionBases) == null ? void 0 : _b.includes(modeuleType.value),
27720
- "modeuleInfos.value.productionBases.includes(modeuleType.value)"
27721
- );
27722
- }
27723
- );
27724
27696
  const modeuleInfos = ref();
27725
27697
  const getModeuleInfoData = async () => {
27726
27698
  modeuleInfos.value = await getModeuleInfo();
@@ -27740,27 +27712,24 @@ const _sfc_main = {
27740
27712
  permissionModuleList.value = await getPermissionModuleList();
27741
27713
  };
27742
27714
  onBeforeMount(async () => {
27743
- var _a;
27715
+ var _a, _b;
27716
+ console.log(props);
27717
+ selectedSystems.value = isSystems.value;
27744
27718
  await getPermissionModuleListData();
27745
27719
  getModeuleInfoDataHandle = await getModeuleInfoData();
27746
27720
  isShowAllProductionBases.value = (_a = getModeuleInfoDataHandle(
27747
27721
  window.location.hostname.split(".")[0]
27748
27722
  )) == null ? void 0 : _a.isAllProductionBases;
27749
- const userInfos = JSON.parse(localStorage.getItem("userInfos") || "{}");
27750
- data3.userInfo = userInfos;
27751
- var height = document.documentElement.clientHeight;
27752
- var width = document.documentElement.clientWidth;
27753
- data3.contentHeight = height;
27754
- data3.contentWidth = width;
27723
+ data3.userInfo = JSON.parse(localStorage.getItem("userInfos") || "{}");
27724
+ data3.contentHeight = document.documentElement.clientHeight;
27725
+ data3.contentWidth = document.documentElement.clientWidth;
27755
27726
  window.onresize = function() {
27756
- var height2 = document.documentElement.clientHeight;
27757
- var width2 = document.documentElement.clientWidth;
27758
- data3.contentHeight = height2;
27759
- data3.contentWidth = width2;
27727
+ data3.contentHeight = document.documentElement.clientHeight;
27728
+ data3.contentWidth = document.documentElement.clientWidth;
27760
27729
  };
27761
27730
  data3.selectModule = JSON.parse(
27762
27731
  localStorage.getItem("selectModule") || "{}"
27763
- ).key;
27732
+ ).key ?? props.isModules;
27764
27733
  gjId.value = localStorage.getItem("gjId");
27765
27734
  if (data3.selectModule == "BussinessCenter.WDMModule") {
27766
27735
  console.log("当前所选模块为储运,显示弹窗");
@@ -27770,22 +27739,21 @@ const _sfc_main = {
27770
27739
  data3.dgVisible = true;
27771
27740
  }
27772
27741
  }
27742
+ if (isSystems.value) {
27743
+ moduleTestS.value = ((_b = permissionModuleList.value.find((_x) => _x.permissionModuleName === selectedSystems.value)) == null ? void 0 : _b.childGroups) ?? [];
27744
+ }
27773
27745
  });
27774
- const newSystemTest = ref();
27775
27746
  const sysShow = ref(true);
27776
27747
  const ModuleShow = ref(true);
27777
- const systemsList = ref();
27778
- const systems = ref();
27748
+ ref();
27779
27749
  const menuList = ref();
27780
27750
  const goUrl = ref();
27781
27751
  onMounted(async () => {
27782
- var _a, _b, _c, _d, _e, _f, _g;
27783
- selectedSystems.value = isSystems.value;
27752
+ var _a, _b;
27784
27753
  if (permissionModuleList.value.length == 1) {
27785
27754
  sysShow.value = false;
27786
27755
  }
27787
27756
  if (isSystems.value) {
27788
- moduleTestS.value = ((_a = permissionModuleList.value.find((_x) => _x.permissionModuleName === selectedSystems.value)) == null ? void 0 : _a.childGroups) ?? [];
27789
27757
  if (moduleTestS.value.length == 1) {
27790
27758
  ModuleShow.value = false;
27791
27759
  }
@@ -27808,12 +27776,6 @@ const _sfc_main = {
27808
27776
  shortName: item.shortName
27809
27777
  };
27810
27778
  });
27811
- console.log(
27812
- modeuleInfos.value,
27813
- modeuleType.value,
27814
- (_c = (_b = modeuleInfos.value) == null ? void 0 : _b.productionBases) == null ? void 0 : _c.includes(modeuleType.value),
27815
- "modeuleInfos.value.productionBases.includes(modeuleType.value)"
27816
- );
27817
27779
  if (modeuleInfos.value.productionBases.includes(modeuleType.value)) {
27818
27780
  const curSetofBook = await currentGet();
27819
27781
  let baseRes = await baseOptions({ setOfBookId: curSetofBook });
@@ -27829,13 +27791,7 @@ const _sfc_main = {
27829
27791
  };
27830
27792
  });
27831
27793
  }
27832
- console.log(
27833
- modeuleInfos.value,
27834
- modeuleType.value,
27835
- (_e = (_d = modeuleInfos.value) == null ? void 0 : _d.projects) == null ? void 0 : _e.includes(modeuleType.value),
27836
- "modeuleInfos.value.projects.includes(modeuleType.value)"
27837
- );
27838
- if ((_g = (_f = modeuleInfos.value) == null ? void 0 : _f.projects) == null ? void 0 : _g.includes(modeuleType.value)) {
27794
+ if ((_b = (_a = modeuleInfos.value) == null ? void 0 : _a.projects) == null ? void 0 : _b.includes(modeuleType.value)) {
27839
27795
  let dgRes = await getdungouList();
27840
27796
  if (!dgRes) {
27841
27797
  gjTest.value = [];
@@ -27896,7 +27852,6 @@ const _sfc_main = {
27896
27852
  const changeModule = async (i2) => {
27897
27853
  var _a, _b;
27898
27854
  let { permissionModuleName, routerUrl, location: location2, moduleName } = i2;
27899
- console.log("🚀 ~ changeModule ~ location:", location2);
27900
27855
  if (!getModeuleInfoDataHandle) {
27901
27856
  getModeuleInfoDataHandle = await getModeuleInfoData();
27902
27857
  }
@@ -27909,12 +27864,6 @@ const _sfc_main = {
27909
27864
  ctx.emit("changeSystemOrModule", moduleName, name);
27910
27865
  if (!location2) {
27911
27866
  data3.moduleVisible = false;
27912
- console.log(
27913
- routerUrl,
27914
- permissionModuleName,
27915
- name,
27916
- "routerUrl,key,name++++++++++++++++++++++++++++++++++"
27917
- );
27918
27867
  ctx.emit("routerReplace", routerUrl);
27919
27868
  return;
27920
27869
  }
@@ -27982,7 +27931,6 @@ const _sfc_main = {
27982
27931
  const changesystem = (i2) => {
27983
27932
  selectedSystems.value = i2.permissionModuleName;
27984
27933
  data3.systemVisible = false;
27985
- console.log(i2, "cw1");
27986
27934
  moduleTestS.value = i2.childGroups ?? [];
27987
27935
  if (i2.childGroups === 1) {
27988
27936
  changeModule(moduleTestS.value[0]);
@@ -28222,38 +28170,6 @@ const _sfc_main = {
28222
28170
  const routerPush = (url2) => {
28223
28171
  ctx.emit("routerPush", url2);
28224
28172
  };
28225
- const systemVisibleTrue = async () => {
28226
- AccessData.value = JSON.parse(localStorage.getItem("AccessData"));
28227
- let systemmenusList = await systemmenus();
28228
- systems.value = systemmenusList.systems;
28229
- systemsList.value = systemmenusList.systems;
28230
- newSystemTest.value = systems.value.map((itemV) => {
28231
- const AccessSys = AccessData.value.find(
28232
- (item) => item.name == itemV.id
28233
- );
28234
- return {
28235
- title: AccessSys == null ? void 0 : AccessSys.displayName,
28236
- id: itemV.id,
28237
- icon: iconUrl + itemV.icon,
28238
- isSelect: itemV.id == isSystems.value ? true : false,
28239
- children: itemV.modules.map((childrenItem) => {
28240
- var _a, _b;
28241
- return {
28242
- icon: iconUrl + childrenItem.icon,
28243
- id: childrenItem.id,
28244
- title: (_a = AccessSys == null ? void 0 : AccessSys.permissions.find(
28245
- (item) => item.name == childrenItem.id
28246
- )) == null ? void 0 : _a.displayName,
28247
- isGranted: (_b = AccessSys == null ? void 0 : AccessSys.permissions.find(
28248
- (item) => item.name == childrenItem.id
28249
- )) == null ? void 0 : _b.isGranted
28250
- };
28251
- }),
28252
- isGranted: AccessSys == null ? void 0 : AccessSys.isGranted
28253
- };
28254
- });
28255
- data3.systemVisible = true;
28256
- };
28257
28173
  const fileList = ref([]);
28258
28174
  const beforeUpload = (file) => {
28259
28175
  const MINI_TYPE = ["image/png", "image/jpeg", "image/gif"];
@@ -28305,7 +28221,6 @@ const _sfc_main = {
28305
28221
  baseTest,
28306
28222
  setofbooksTest,
28307
28223
  gjTest,
28308
- newSystemTest,
28309
28224
  openChangePWDHandle,
28310
28225
  changePWDOKHandle,
28311
28226
  changePWDCancelHandle,
@@ -28324,9 +28239,7 @@ const _sfc_main = {
28324
28239
  moduleTest3,
28325
28240
  moduleHandle,
28326
28241
  routerPush,
28327
- systemVisibleTrue,
28328
28242
  menuList,
28329
- menuTitle,
28330
28243
  modeuleType,
28331
28244
  selectedSystems,
28332
28245
  oneModule,
@@ -28346,7 +28259,7 @@ const _sfc_main = {
28346
28259
  };
28347
28260
  }
28348
28261
  };
28349
- const _withScopeId = (n2) => (pushScopeId("data-v-08fe511b"), n2 = n2(), popScopeId(), n2);
28262
+ const _withScopeId = (n2) => (pushScopeId("data-v-3112d17e"), n2 = n2(), popScopeId(), n2);
28350
28263
  const _hoisted_1 = {
28351
28264
  class: "bg-white defaultTS funcTC relative",
28352
28265
  style: { "padding-bottom": "10px", "margin-bottom": "10px" }
@@ -28847,7 +28760,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
28847
28760
  onRouterPush: $setup.routerPush,
28848
28761
  noBaseTwoMenu: $props.noBaseTwoMenu,
28849
28762
  module: _ctx.selectModule,
28850
- menuTitle: $setup.menuTitle,
28763
+ menuTitle: $props.menuTitle,
28851
28764
  ccflow: $props.ccflow,
28852
28765
  ccflowData: $setup.ccflowData
28853
28766
  }, null, 8, ["onRouterPush", "noBaseTwoMenu", "module", "menuTitle", "ccflow", "ccflowData"])
@@ -29295,7 +29208,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
29295
29208
  }, 8, ["show"])
29296
29209
  ], 64);
29297
29210
  }
29298
- const TSider = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-08fe511b"]]);
29211
+ const TSider = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-3112d17e"]]);
29299
29212
  const components = [TSider];
29300
29213
  installComponents();
29301
29214
  function installComponents() {