tx-sider 2.0.5 → 2.0.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/lib/TXUI.mjs +37 -109
- package/lib/TXUI.umd.js +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
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",
|
|
@@ -27654,10 +27647,10 @@ const _sfc_main = {
|
|
|
27654
27647
|
useRouter();
|
|
27655
27648
|
useRoute();
|
|
27656
27649
|
const changePWDref = ref();
|
|
27650
|
+
debugger;
|
|
27657
27651
|
const moduleTestS = ref();
|
|
27658
27652
|
const isSystems = ref(props.isSystems);
|
|
27659
|
-
const
|
|
27660
|
-
const modeuleType = ref(props.modeuleType);
|
|
27653
|
+
const modeuleType = computed(() => props.modeuleType);
|
|
27661
27654
|
const selectedSystems = ref();
|
|
27662
27655
|
const gjTest = ref();
|
|
27663
27656
|
const gjId = ref();
|
|
@@ -27680,8 +27673,8 @@ const _sfc_main = {
|
|
|
27680
27673
|
userInfo: {}
|
|
27681
27674
|
});
|
|
27682
27675
|
const refData = toRefs(data3);
|
|
27683
|
-
|
|
27684
|
-
|
|
27676
|
+
ref(JSON.parse(localStorage.getItem("AccessData")));
|
|
27677
|
+
process.env.NODE_ENV == "development" ? "https://localhost:7110" : "https://basis.nacho.cn";
|
|
27685
27678
|
const [ccflowData, onClickTodo] = useCcflowCall();
|
|
27686
27679
|
watch(
|
|
27687
27680
|
() => props.isSystems,
|
|
@@ -27701,26 +27694,6 @@ const _sfc_main = {
|
|
|
27701
27694
|
}
|
|
27702
27695
|
}
|
|
27703
27696
|
);
|
|
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
27697
|
const modeuleInfos = ref();
|
|
27725
27698
|
const getModeuleInfoData = async () => {
|
|
27726
27699
|
modeuleInfos.value = await getModeuleInfo();
|
|
@@ -27740,27 +27713,24 @@ const _sfc_main = {
|
|
|
27740
27713
|
permissionModuleList.value = await getPermissionModuleList();
|
|
27741
27714
|
};
|
|
27742
27715
|
onBeforeMount(async () => {
|
|
27743
|
-
var _a;
|
|
27716
|
+
var _a, _b;
|
|
27717
|
+
console.log(props);
|
|
27718
|
+
selectedSystems.value = isSystems.value;
|
|
27744
27719
|
await getPermissionModuleListData();
|
|
27745
27720
|
getModeuleInfoDataHandle = await getModeuleInfoData();
|
|
27746
27721
|
isShowAllProductionBases.value = (_a = getModeuleInfoDataHandle(
|
|
27747
27722
|
window.location.hostname.split(".")[0]
|
|
27748
27723
|
)) == null ? void 0 : _a.isAllProductionBases;
|
|
27749
|
-
|
|
27750
|
-
data3.
|
|
27751
|
-
|
|
27752
|
-
var width = document.documentElement.clientWidth;
|
|
27753
|
-
data3.contentHeight = height;
|
|
27754
|
-
data3.contentWidth = width;
|
|
27724
|
+
data3.userInfo = JSON.parse(localStorage.getItem("userInfos") || "{}");
|
|
27725
|
+
data3.contentHeight = document.documentElement.clientHeight;
|
|
27726
|
+
data3.contentWidth = document.documentElement.clientWidth;
|
|
27755
27727
|
window.onresize = function() {
|
|
27756
|
-
|
|
27757
|
-
|
|
27758
|
-
data3.contentHeight = height2;
|
|
27759
|
-
data3.contentWidth = width2;
|
|
27728
|
+
data3.contentHeight = document.documentElement.clientHeight;
|
|
27729
|
+
data3.contentWidth = document.documentElement.clientWidth;
|
|
27760
27730
|
};
|
|
27761
27731
|
data3.selectModule = JSON.parse(
|
|
27762
27732
|
localStorage.getItem("selectModule") || "{}"
|
|
27763
|
-
).key;
|
|
27733
|
+
).key ?? props.isModules;
|
|
27764
27734
|
gjId.value = localStorage.getItem("gjId");
|
|
27765
27735
|
if (data3.selectModule == "BussinessCenter.WDMModule") {
|
|
27766
27736
|
console.log("当前所选模块为储运,显示弹窗");
|
|
@@ -27770,22 +27740,21 @@ const _sfc_main = {
|
|
|
27770
27740
|
data3.dgVisible = true;
|
|
27771
27741
|
}
|
|
27772
27742
|
}
|
|
27743
|
+
if (isSystems.value) {
|
|
27744
|
+
moduleTestS.value = ((_b = permissionModuleList.value.find((_x) => _x.permissionModuleName === selectedSystems.value)) == null ? void 0 : _b.childGroups) ?? [];
|
|
27745
|
+
}
|
|
27773
27746
|
});
|
|
27774
|
-
const newSystemTest = ref();
|
|
27775
27747
|
const sysShow = ref(true);
|
|
27776
27748
|
const ModuleShow = ref(true);
|
|
27777
|
-
|
|
27778
|
-
const systems = ref();
|
|
27749
|
+
ref();
|
|
27779
27750
|
const menuList = ref();
|
|
27780
27751
|
const goUrl = ref();
|
|
27781
27752
|
onMounted(async () => {
|
|
27782
|
-
var _a, _b
|
|
27783
|
-
selectedSystems.value = isSystems.value;
|
|
27753
|
+
var _a, _b;
|
|
27784
27754
|
if (permissionModuleList.value.length == 1) {
|
|
27785
27755
|
sysShow.value = false;
|
|
27786
27756
|
}
|
|
27787
27757
|
if (isSystems.value) {
|
|
27788
|
-
moduleTestS.value = ((_a = permissionModuleList.value.find((_x) => _x.permissionModuleName === selectedSystems.value)) == null ? void 0 : _a.childGroups) ?? [];
|
|
27789
27758
|
if (moduleTestS.value.length == 1) {
|
|
27790
27759
|
ModuleShow.value = false;
|
|
27791
27760
|
}
|
|
@@ -27808,12 +27777,6 @@ const _sfc_main = {
|
|
|
27808
27777
|
shortName: item.shortName
|
|
27809
27778
|
};
|
|
27810
27779
|
});
|
|
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
27780
|
if (modeuleInfos.value.productionBases.includes(modeuleType.value)) {
|
|
27818
27781
|
const curSetofBook = await currentGet();
|
|
27819
27782
|
let baseRes = await baseOptions({ setOfBookId: curSetofBook });
|
|
@@ -27829,13 +27792,7 @@ const _sfc_main = {
|
|
|
27829
27792
|
};
|
|
27830
27793
|
});
|
|
27831
27794
|
}
|
|
27832
|
-
|
|
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)) {
|
|
27795
|
+
if ((_b = (_a = modeuleInfos.value) == null ? void 0 : _a.projects) == null ? void 0 : _b.includes(modeuleType.value)) {
|
|
27839
27796
|
let dgRes = await getdungouList();
|
|
27840
27797
|
if (!dgRes) {
|
|
27841
27798
|
gjTest.value = [];
|
|
@@ -27896,7 +27853,6 @@ const _sfc_main = {
|
|
|
27896
27853
|
const changeModule = async (i2) => {
|
|
27897
27854
|
var _a, _b;
|
|
27898
27855
|
let { permissionModuleName, routerUrl, location: location2, moduleName } = i2;
|
|
27899
|
-
console.log("🚀 ~ changeModule ~ location:", location2);
|
|
27900
27856
|
if (!getModeuleInfoDataHandle) {
|
|
27901
27857
|
getModeuleInfoDataHandle = await getModeuleInfoData();
|
|
27902
27858
|
}
|
|
@@ -27909,12 +27865,6 @@ const _sfc_main = {
|
|
|
27909
27865
|
ctx.emit("changeSystemOrModule", moduleName, name);
|
|
27910
27866
|
if (!location2) {
|
|
27911
27867
|
data3.moduleVisible = false;
|
|
27912
|
-
console.log(
|
|
27913
|
-
routerUrl,
|
|
27914
|
-
permissionModuleName,
|
|
27915
|
-
name,
|
|
27916
|
-
"routerUrl,key,name++++++++++++++++++++++++++++++++++"
|
|
27917
|
-
);
|
|
27918
27868
|
ctx.emit("routerReplace", routerUrl);
|
|
27919
27869
|
return;
|
|
27920
27870
|
}
|
|
@@ -27982,7 +27932,6 @@ const _sfc_main = {
|
|
|
27982
27932
|
const changesystem = (i2) => {
|
|
27983
27933
|
selectedSystems.value = i2.permissionModuleName;
|
|
27984
27934
|
data3.systemVisible = false;
|
|
27985
|
-
console.log(i2, "cw1");
|
|
27986
27935
|
moduleTestS.value = i2.childGroups ?? [];
|
|
27987
27936
|
if (i2.childGroups === 1) {
|
|
27988
27937
|
changeModule(moduleTestS.value[0]);
|
|
@@ -28222,38 +28171,6 @@ const _sfc_main = {
|
|
|
28222
28171
|
const routerPush = (url2) => {
|
|
28223
28172
|
ctx.emit("routerPush", url2);
|
|
28224
28173
|
};
|
|
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
28174
|
const fileList = ref([]);
|
|
28258
28175
|
const beforeUpload = (file) => {
|
|
28259
28176
|
const MINI_TYPE = ["image/png", "image/jpeg", "image/gif"];
|
|
@@ -28295,6 +28212,18 @@ const _sfc_main = {
|
|
|
28295
28212
|
onUnmounted(() => {
|
|
28296
28213
|
clearInterval(setOfBookIdTimer);
|
|
28297
28214
|
});
|
|
28215
|
+
const systemVisibleTrue = async () => {
|
|
28216
|
+
data3.systemVisible = true;
|
|
28217
|
+
};
|
|
28218
|
+
const onFunOpen = () => {
|
|
28219
|
+
if (permissionModuleList.value.length === 0) {
|
|
28220
|
+
message.info("你暂无权限,请联系管理员分配");
|
|
28221
|
+
} else if (permissionModuleList.value.length === 1) {
|
|
28222
|
+
oneModule(permissionModuleList.value[0].name);
|
|
28223
|
+
} else {
|
|
28224
|
+
systemVisibleTrue();
|
|
28225
|
+
}
|
|
28226
|
+
};
|
|
28298
28227
|
return {
|
|
28299
28228
|
...refData,
|
|
28300
28229
|
beforeUpload,
|
|
@@ -28305,7 +28234,6 @@ const _sfc_main = {
|
|
|
28305
28234
|
baseTest,
|
|
28306
28235
|
setofbooksTest,
|
|
28307
28236
|
gjTest,
|
|
28308
|
-
newSystemTest,
|
|
28309
28237
|
openChangePWDHandle,
|
|
28310
28238
|
changePWDOKHandle,
|
|
28311
28239
|
changePWDCancelHandle,
|
|
@@ -28324,9 +28252,7 @@ const _sfc_main = {
|
|
|
28324
28252
|
moduleTest3,
|
|
28325
28253
|
moduleHandle,
|
|
28326
28254
|
routerPush,
|
|
28327
|
-
systemVisibleTrue,
|
|
28328
28255
|
menuList,
|
|
28329
|
-
menuTitle,
|
|
28330
28256
|
modeuleType,
|
|
28331
28257
|
selectedSystems,
|
|
28332
28258
|
oneModule,
|
|
@@ -28340,13 +28266,15 @@ const _sfc_main = {
|
|
|
28340
28266
|
ccflowData,
|
|
28341
28267
|
onClickTodo,
|
|
28342
28268
|
modeuleInfos,
|
|
28269
|
+
systemVisibleTrue,
|
|
28343
28270
|
/*******start 2.0*****/
|
|
28344
|
-
permissionModuleList
|
|
28271
|
+
permissionModuleList,
|
|
28272
|
+
onFunOpen
|
|
28345
28273
|
/*******end*****/
|
|
28346
28274
|
};
|
|
28347
28275
|
}
|
|
28348
28276
|
};
|
|
28349
|
-
const _withScopeId = (n2) => (pushScopeId("data-v-
|
|
28277
|
+
const _withScopeId = (n2) => (pushScopeId("data-v-396b599a"), n2 = n2(), popScopeId(), n2);
|
|
28350
28278
|
const _hoisted_1 = {
|
|
28351
28279
|
class: "bg-white defaultTS funcTC relative",
|
|
28352
28280
|
style: { "padding-bottom": "10px", "margin-bottom": "10px" }
|
|
@@ -28847,7 +28775,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
28847
28775
|
onRouterPush: $setup.routerPush,
|
|
28848
28776
|
noBaseTwoMenu: $props.noBaseTwoMenu,
|
|
28849
28777
|
module: _ctx.selectModule,
|
|
28850
|
-
menuTitle: $
|
|
28778
|
+
menuTitle: $props.menuTitle,
|
|
28851
28779
|
ccflow: $props.ccflow,
|
|
28852
28780
|
ccflowData: $setup.ccflowData
|
|
28853
28781
|
}, null, 8, ["onRouterPush", "noBaseTwoMenu", "module", "menuTitle", "ccflow", "ccflowData"])
|
|
@@ -29295,7 +29223,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
29295
29223
|
}, 8, ["show"])
|
|
29296
29224
|
], 64);
|
|
29297
29225
|
}
|
|
29298
|
-
const TSider = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
29226
|
+
const TSider = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-396b599a"]]);
|
|
29299
29227
|
const components = [TSider];
|
|
29300
29228
|
installComponents();
|
|
29301
29229
|
function installComponents() {
|