tx-sider 2.1.1 → 2.1.3

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
@@ -27673,7 +27673,7 @@ const _sfc_main = {
27673
27673
  });
27674
27674
  const refData = toRefs(data3);
27675
27675
  ref(JSON.parse(localStorage.getItem("AccessData")));
27676
- process.env.NODE_ENV == "development" ? "https://localhost:7110" : "https://basis.nacho.cn";
27676
+ const iconUrl = process.env.NODE_ENV == "development" ? "https://localhost:7110" : "https://basis.nacho.cn";
27677
27677
  const [ccflowData, onClickTodo] = useCcflowCall();
27678
27678
  watch(
27679
27679
  () => props.isSystems,
@@ -27686,7 +27686,9 @@ const _sfc_main = {
27686
27686
  () => {
27687
27687
  var _a;
27688
27688
  if (isSystems.value) {
27689
- moduleTestS.value = ((_a = permissionModuleList.value.find((_x) => _x.permissionModuleName === selectedSystems.value)) == null ? void 0 : _a.childGroups) ?? [];
27689
+ moduleTestS.value = ((_a = permissionModuleList.value.find(
27690
+ (_x) => _x.permissionModuleName === selectedSystems.value
27691
+ )) == null ? void 0 : _a.childGroups) ?? [];
27690
27692
  if (moduleTestS.value.length == 1) {
27691
27693
  ModuleShow.value = false;
27692
27694
  }
@@ -27697,20 +27699,33 @@ const _sfc_main = {
27697
27699
  const getModeuleInfoData = async () => {
27698
27700
  modeuleInfos.value = await getModeuleInfo();
27699
27701
  console.log(modeuleInfos.value, "modeuleInfos.value");
27700
- return (moduleKey) => ({
27701
- isSetOfBooks: modeuleInfos.value.setOfBooks.includes(moduleKey),
27702
- isProductionBases: modeuleInfos.value.productionBases.includes(moduleKey),
27703
- isProjects: modeuleInfos.value.projects.includes(moduleKey),
27704
- isAllProductionBases: modeuleInfos.value.allProductionBases.includes(moduleKey)
27705
- });
27702
+ return (moduleKey) => {
27703
+ var _a, _b, _c, _d, _e, _f;
27704
+ return {
27705
+ isSetOfBooks: modeuleInfos.value.setOfBooks.includes(moduleKey),
27706
+ isProductionBases: (_b = (_a = modeuleInfos.value) == null ? void 0 : _a.productionBases) == null ? void 0 : _b.includes(moduleKey),
27707
+ isProjects: (_d = (_c = modeuleInfos.value) == null ? void 0 : _c.projects) == null ? void 0 : _d.includes(moduleKey),
27708
+ isAllProductionBases: (_f = (_e = modeuleInfos.value) == null ? void 0 : _e.allProductionBases) == null ? void 0 : _f.includes(moduleKey)
27709
+ };
27710
+ };
27706
27711
  };
27707
27712
  let getModeuleInfoDataHandle;
27708
27713
  const isShowAllProductionBases = ref(false);
27709
27714
  const isShowAllProductionBasesModel = ref(false);
27710
27715
  const permissionModuleList = ref([]);
27711
27716
  const getPermissionModuleListData = async () => {
27712
- permissionModuleList.value = await getPermissionModuleList();
27717
+ const res = await getPermissionModuleList();
27718
+ permissionModuleList.value = updateIconModuleList(res);
27713
27719
  };
27720
+ function updateIconModuleList(treeList) {
27721
+ for (let item of treeList) {
27722
+ item.icon = iconUrl + item.icon;
27723
+ if (item.childGroups && item.childGroups.length > 0) {
27724
+ updateIconModuleList(item.childGroups);
27725
+ }
27726
+ }
27727
+ return treeList;
27728
+ }
27714
27729
  onBeforeMount(async () => {
27715
27730
  var _a, _b;
27716
27731
  console.log(props);
@@ -27727,9 +27742,7 @@ const _sfc_main = {
27727
27742
  data3.contentHeight = document.documentElement.clientHeight;
27728
27743
  data3.contentWidth = document.documentElement.clientWidth;
27729
27744
  };
27730
- data3.selectModule = JSON.parse(
27731
- localStorage.getItem("selectModule") || "{}"
27732
- ).key ?? props.isModules;
27745
+ data3.selectModule = JSON.parse(localStorage.getItem("selectModule") || "{}").key ?? props.isModules;
27733
27746
  gjId.value = localStorage.getItem("gjId");
27734
27747
  if (data3.selectModule == "BussinessCenter.WDMModule") {
27735
27748
  console.log("当前所选模块为储运,显示弹窗");
@@ -27740,7 +27753,9 @@ const _sfc_main = {
27740
27753
  }
27741
27754
  }
27742
27755
  if (isSystems.value) {
27743
- moduleTestS.value = ((_b = permissionModuleList.value.find((_x) => _x.permissionModuleName === selectedSystems.value)) == null ? void 0 : _b.childGroups) ?? [];
27756
+ moduleTestS.value = ((_b = permissionModuleList.value.find(
27757
+ (_x) => _x.permissionModuleName === selectedSystems.value
27758
+ )) == null ? void 0 : _b.childGroups) ?? [];
27744
27759
  }
27745
27760
  });
27746
27761
  const sysShow = ref(true);
@@ -27749,7 +27764,7 @@ const _sfc_main = {
27749
27764
  const menuList = ref();
27750
27765
  const goUrl = ref();
27751
27766
  onMounted(async () => {
27752
- var _a, _b;
27767
+ var _a, _b, _c, _d;
27753
27768
  if (permissionModuleList.value.length == 1) {
27754
27769
  sysShow.value = false;
27755
27770
  }
@@ -27776,7 +27791,7 @@ const _sfc_main = {
27776
27791
  shortName: item.shortName
27777
27792
  };
27778
27793
  });
27779
- if (modeuleInfos.value.productionBases.includes(modeuleTypeValue.value)) {
27794
+ if ((_b = (_a = modeuleInfos.value) == null ? void 0 : _a.productionBases) == null ? void 0 : _b.includes(modeuleTypeValue.value)) {
27780
27795
  const curSetofBook = await currentGet();
27781
27796
  let baseRes = await baseOptions({ setOfBookId: curSetofBook });
27782
27797
  if (!baseRes) {
@@ -27791,7 +27806,7 @@ const _sfc_main = {
27791
27806
  };
27792
27807
  });
27793
27808
  }
27794
- if ((_b = (_a = modeuleInfos.value) == null ? void 0 : _a.projects) == null ? void 0 : _b.includes(modeuleTypeValue.value)) {
27809
+ if ((_d = (_c = modeuleInfos.value) == null ? void 0 : _c.projects) == null ? void 0 : _d.includes(modeuleTypeValue.value)) {
27795
27810
  let dgRes = await getdungouList();
27796
27811
  if (!dgRes) {
27797
27812
  gjTest.value = [];
@@ -27858,7 +27873,12 @@ const _sfc_main = {
27858
27873
  const ModeuleInfo = getModeuleInfoDataHandle(location2);
27859
27874
  localStorage.setItem(
27860
27875
  "selectModule",
27861
- JSON.stringify({ key: permissionModuleName, routerUrl, title: moduleName, location: location2 })
27876
+ JSON.stringify({
27877
+ key: permissionModuleName,
27878
+ routerUrl,
27879
+ title: moduleName,
27880
+ location: location2
27881
+ })
27862
27882
  );
27863
27883
  data3.selectModule = permissionModuleName;
27864
27884
  ctx.emit("changeSystemOrModule", moduleName, name);
@@ -27911,7 +27931,9 @@ const _sfc_main = {
27911
27931
  const clickModuleVisible = (systemed) => {
27912
27932
  var _a;
27913
27933
  data3.moduleVisible = true;
27914
- moduleTestS.value = ((_a = permissionModuleList.value.find((_x) => _x.permissionModuleName === selectedSystems.value)) == null ? void 0 : _a.childGroups) ?? [];
27934
+ moduleTestS.value = ((_a = permissionModuleList.value.find(
27935
+ (_x) => _x.permissionModuleName === selectedSystems.value
27936
+ )) == null ? void 0 : _a.childGroups) ?? [];
27915
27937
  if (moduleTestS.value.length == 1) {
27916
27938
  ModuleShow.value = false;
27917
27939
  }
@@ -27919,7 +27941,9 @@ const _sfc_main = {
27919
27941
  const oneModule = async (systemed) => {
27920
27942
  var _a;
27921
27943
  await getPermissionModuleListData();
27922
- moduleTestS.value = ((_a = permissionModuleList.value.find((_x) => _x.permissionModuleName === selectedSystems.value)) == null ? void 0 : _a.childGroups) ?? [];
27944
+ moduleTestS.value = ((_a = permissionModuleList.value.find(
27945
+ (_x) => _x.permissionModuleName === selectedSystems.value
27946
+ )) == null ? void 0 : _a.childGroups) ?? [];
27923
27947
  if (moduleTestS.value.length == 0) {
27924
27948
  message.info("你暂无权限,请联系管理员分配");
27925
27949
  } else if (moduleTestS.value.length == 1) {
@@ -27943,7 +27967,9 @@ const _sfc_main = {
27943
27967
  const setOfBookId = ref();
27944
27968
  const baseId = ref();
27945
27969
  const refreshSystemHostname = window.location.hostname.split(".");
27946
- const refreshSystemDomain = refreshSystemHostname.length === 1 ? "localhost" : "." + [refreshSystemHostname.at(-2), refreshSystemHostname.at(-1)].join(".");
27970
+ const refreshSystemDomain = refreshSystemHostname.length === 1 ? "localhost" : "." + [refreshSystemHostname.at(-2), refreshSystemHostname.at(-1)].join(
27971
+ "."
27972
+ );
27947
27973
  const isChangeTokenRefreshFlag = () => location.hash.includes("changeTokenRefreshFlag");
27948
27974
  const setCureentSetOfBookId = (res) => {
27949
27975
  setSetOfBookIdToLocalAndPage(res);
@@ -28274,7 +28300,7 @@ const _sfc_main = {
28274
28300
  };
28275
28301
  }
28276
28302
  };
28277
- const _withScopeId = (n2) => (pushScopeId("data-v-830aa27e"), n2 = n2(), popScopeId(), n2);
28303
+ const _withScopeId = (n2) => (pushScopeId("data-v-77045c26"), n2 = n2(), popScopeId(), n2);
28278
28304
  const _hoisted_1 = {
28279
28305
  class: "bg-white defaultTS funcTC relative",
28280
28306
  style: { "padding-bottom": "10px", "margin-bottom": "10px" }
@@ -28663,7 +28689,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
28663
28689
  }, [
28664
28690
  createElementVNode("div", _hoisted_1, [
28665
28691
  createElementVNode("div", _hoisted_2, [
28666
- createTextVNode(toDisplayString((_b = (_a = $setup.permissionModuleList) == null ? void 0 : _a.find((item) => item.permissionModuleName === $setup.selectedSystems)) == null ? void 0 : _b.moduleName) + " ", 1),
28692
+ createTextVNode(toDisplayString((_b = (_a = $setup.permissionModuleList) == null ? void 0 : _a.find(
28693
+ (item) => item.permissionModuleName === $setup.selectedSystems
28694
+ )) == null ? void 0 : _b.moduleName) + " ", 1),
28667
28695
  $setup.sysShow ? (openBlock(), createElementBlock("span", {
28668
28696
  key: 0,
28669
28697
  class: "ml-[4px] cursor-pointer switchedSystems mediumTS funcTC",
@@ -28671,7 +28699,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
28671
28699
  }, "切换系统")) : createCommentVNode("", true)
28672
28700
  ]),
28673
28701
  createElementVNode("div", _hoisted_3, [
28674
- createTextVNode(toDisplayString((_d = (_c = $setup.moduleTestS) == null ? void 0 : _c.find((item) => item.permissionModuleName === _ctx.selectModule)) == null ? void 0 : _d.moduleName) + " ", 1),
28702
+ createTextVNode(toDisplayString((_d = (_c = $setup.moduleTestS) == null ? void 0 : _c.find(
28703
+ (item) => item.permissionModuleName === _ctx.selectModule
28704
+ )) == null ? void 0 : _d.moduleName) + " ", 1),
28675
28705
  $setup.ModuleShow ? (openBlock(), createElementBlock("span", {
28676
28706
  key: 0,
28677
28707
  class: "ml-[6px] cursor-pointer switchedSystems mediumTS funcTC",
@@ -29223,7 +29253,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
29223
29253
  }, 8, ["show"])
29224
29254
  ], 64);
29225
29255
  }
29226
- const TSider = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-830aa27e"]]);
29256
+ const TSider = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-77045c26"]]);
29227
29257
  const components = [TSider];
29228
29258
  installComponents();
29229
29259
  function installComponents() {