tx-sider 2.1.2 → 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
  }
@@ -27712,8 +27714,18 @@ const _sfc_main = {
27712
27714
  const isShowAllProductionBasesModel = ref(false);
27713
27715
  const permissionModuleList = ref([]);
27714
27716
  const getPermissionModuleListData = async () => {
27715
- permissionModuleList.value = await getPermissionModuleList();
27717
+ const res = await getPermissionModuleList();
27718
+ permissionModuleList.value = updateIconModuleList(res);
27716
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
+ }
27717
27729
  onBeforeMount(async () => {
27718
27730
  var _a, _b;
27719
27731
  console.log(props);
@@ -27730,9 +27742,7 @@ const _sfc_main = {
27730
27742
  data3.contentHeight = document.documentElement.clientHeight;
27731
27743
  data3.contentWidth = document.documentElement.clientWidth;
27732
27744
  };
27733
- data3.selectModule = JSON.parse(
27734
- localStorage.getItem("selectModule") || "{}"
27735
- ).key ?? props.isModules;
27745
+ data3.selectModule = JSON.parse(localStorage.getItem("selectModule") || "{}").key ?? props.isModules;
27736
27746
  gjId.value = localStorage.getItem("gjId");
27737
27747
  if (data3.selectModule == "BussinessCenter.WDMModule") {
27738
27748
  console.log("当前所选模块为储运,显示弹窗");
@@ -27743,7 +27753,9 @@ const _sfc_main = {
27743
27753
  }
27744
27754
  }
27745
27755
  if (isSystems.value) {
27746
- 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) ?? [];
27747
27759
  }
27748
27760
  });
27749
27761
  const sysShow = ref(true);
@@ -27861,7 +27873,12 @@ const _sfc_main = {
27861
27873
  const ModeuleInfo = getModeuleInfoDataHandle(location2);
27862
27874
  localStorage.setItem(
27863
27875
  "selectModule",
27864
- JSON.stringify({ key: permissionModuleName, routerUrl, title: moduleName, location: location2 })
27876
+ JSON.stringify({
27877
+ key: permissionModuleName,
27878
+ routerUrl,
27879
+ title: moduleName,
27880
+ location: location2
27881
+ })
27865
27882
  );
27866
27883
  data3.selectModule = permissionModuleName;
27867
27884
  ctx.emit("changeSystemOrModule", moduleName, name);
@@ -27914,7 +27931,9 @@ const _sfc_main = {
27914
27931
  const clickModuleVisible = (systemed) => {
27915
27932
  var _a;
27916
27933
  data3.moduleVisible = true;
27917
- 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) ?? [];
27918
27937
  if (moduleTestS.value.length == 1) {
27919
27938
  ModuleShow.value = false;
27920
27939
  }
@@ -27922,7 +27941,9 @@ const _sfc_main = {
27922
27941
  const oneModule = async (systemed) => {
27923
27942
  var _a;
27924
27943
  await getPermissionModuleListData();
27925
- 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) ?? [];
27926
27947
  if (moduleTestS.value.length == 0) {
27927
27948
  message.info("你暂无权限,请联系管理员分配");
27928
27949
  } else if (moduleTestS.value.length == 1) {
@@ -27946,7 +27967,9 @@ const _sfc_main = {
27946
27967
  const setOfBookId = ref();
27947
27968
  const baseId = ref();
27948
27969
  const refreshSystemHostname = window.location.hostname.split(".");
27949
- 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
+ );
27950
27973
  const isChangeTokenRefreshFlag = () => location.hash.includes("changeTokenRefreshFlag");
27951
27974
  const setCureentSetOfBookId = (res) => {
27952
27975
  setSetOfBookIdToLocalAndPage(res);
@@ -28277,7 +28300,7 @@ const _sfc_main = {
28277
28300
  };
28278
28301
  }
28279
28302
  };
28280
- const _withScopeId = (n2) => (pushScopeId("data-v-7a1f5131"), n2 = n2(), popScopeId(), n2);
28303
+ const _withScopeId = (n2) => (pushScopeId("data-v-77045c26"), n2 = n2(), popScopeId(), n2);
28281
28304
  const _hoisted_1 = {
28282
28305
  class: "bg-white defaultTS funcTC relative",
28283
28306
  style: { "padding-bottom": "10px", "margin-bottom": "10px" }
@@ -28666,7 +28689,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
28666
28689
  }, [
28667
28690
  createElementVNode("div", _hoisted_1, [
28668
28691
  createElementVNode("div", _hoisted_2, [
28669
- 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),
28670
28695
  $setup.sysShow ? (openBlock(), createElementBlock("span", {
28671
28696
  key: 0,
28672
28697
  class: "ml-[4px] cursor-pointer switchedSystems mediumTS funcTC",
@@ -28674,7 +28699,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
28674
28699
  }, "切换系统")) : createCommentVNode("", true)
28675
28700
  ]),
28676
28701
  createElementVNode("div", _hoisted_3, [
28677
- 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),
28678
28705
  $setup.ModuleShow ? (openBlock(), createElementBlock("span", {
28679
28706
  key: 0,
28680
28707
  class: "ml-[6px] cursor-pointer switchedSystems mediumTS funcTC",
@@ -29226,7 +29253,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
29226
29253
  }, 8, ["show"])
29227
29254
  ], 64);
29228
29255
  }
29229
- const TSider = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-7a1f5131"]]);
29256
+ const TSider = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-77045c26"]]);
29230
29257
  const components = [TSider];
29231
29258
  installComponents();
29232
29259
  function installComponents() {