@indfnd/common 1.0.97 → 1.0.100
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/CHANGELOG.md +16 -0
- package/dist/ind-common.es.js +68 -135
- package/dist/ind-common.umd.cjs +49 -49
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [1.0.100](http://git.inspur.com/imp-ec/ind-front/ind-common-front/compare/v1.0.99...v1.0.100) (2025-02-28)
|
|
6
|
+
|
|
7
|
+
### [1.0.99](http://git.inspur.com/imp-ec/ind-front/ind-common-front/compare/v1.0.98...v1.0.99) (2025-02-21)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* 回退版本 ([23b018a](http://git.inspur.com/imp-ec/ind-front/ind-common-front/commit/23b018a0b597133694fdfdb9b474a8f49ae8047c))
|
|
13
|
+
|
|
14
|
+
### [1.0.98](http://git.inspur.com/imp-ec/ind-front/ind-common-front/compare/v1.0.97...v1.0.98) (2025-02-21)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* 修改路由第一次跳转页面url参数丢失问题 ([3a8afce](http://git.inspur.com/imp-ec/ind-front/ind-common-front/commit/3a8afcea48de55e73ae43c9b78a4dcbb84c76d0e))
|
|
20
|
+
|
|
5
21
|
### [1.0.97](http://git.inspur.com/imp-ec/ind-front/ind-common-front/compare/v1.0.96...v1.0.97) (2025-02-18)
|
|
6
22
|
|
|
7
23
|
### [1.0.96](http://git.inspur.com/imp-ec/ind-front/ind-common-front/compare/v1.0.95...v1.0.96) (2025-02-08)
|
package/dist/ind-common.es.js
CHANGED
|
@@ -5460,7 +5460,7 @@ var lodash = { exports: {} };
|
|
|
5460
5460
|
})(lodash, lodash.exports);
|
|
5461
5461
|
var _ = lodash.exports;
|
|
5462
5462
|
const name$1 = "@indfnd/common";
|
|
5463
|
-
const version = "1.0.
|
|
5463
|
+
const version = "1.0.99";
|
|
5464
5464
|
const author = "huxuetong";
|
|
5465
5465
|
const publishConfig = {
|
|
5466
5466
|
registry: "https://registry.npmjs.org/"
|
|
@@ -55360,6 +55360,12 @@ const __vue2_script$11 = {
|
|
|
55360
55360
|
if (column.headerClass) {
|
|
55361
55361
|
agColumn.headerClass = column.headerClass;
|
|
55362
55362
|
}
|
|
55363
|
+
if (column.headerComponent) {
|
|
55364
|
+
agColumn.headerComponent = column.headerComponent;
|
|
55365
|
+
}
|
|
55366
|
+
if (column.headerComponentParams) {
|
|
55367
|
+
agColumn.headerComponentParams = column.headerComponentParams;
|
|
55368
|
+
}
|
|
55363
55369
|
if (column.filter) {
|
|
55364
55370
|
agColumn.filter = column.filter;
|
|
55365
55371
|
}
|
|
@@ -55921,6 +55927,37 @@ const __vue2_script$11 = {
|
|
|
55921
55927
|
}
|
|
55922
55928
|
}, 10);
|
|
55923
55929
|
}, 1),
|
|
55930
|
+
toggleRowUnitIfNeeded: _.debounce(async function toggleRowUnitIfNeeded(oldUnit, newUnit) {
|
|
55931
|
+
setTimeout(() => {
|
|
55932
|
+
let datasTmp = _.cloneDeep(this.tableData);
|
|
55933
|
+
let rowUnitColumns = [];
|
|
55934
|
+
this.columns.forEach((col) => {
|
|
55935
|
+
if (col.isRowSwitchUnit) {
|
|
55936
|
+
rowUnitColumns.push(col);
|
|
55937
|
+
}
|
|
55938
|
+
if (col.children && col.children.length > 0) {
|
|
55939
|
+
col.children.forEach((subCol) => {
|
|
55940
|
+
if (subCol.isRowSwitchUnit) {
|
|
55941
|
+
rowUnitColumns.push(subCol);
|
|
55942
|
+
}
|
|
55943
|
+
});
|
|
55944
|
+
}
|
|
55945
|
+
});
|
|
55946
|
+
datasTmp.forEach((d) => {
|
|
55947
|
+
rowUnitColumns.forEach((dd) => {
|
|
55948
|
+
if (dd.isRowSwitchUnit && oldUnit[dd["rowSwitchUnitType"]] != newUnit[dd["rowSwitchUnitType"]]) {
|
|
55949
|
+
changeCellUnit(
|
|
55950
|
+
oldUnit[dd["rowSwitchUnitType"]],
|
|
55951
|
+
newUnit[dd["rowSwitchUnitType"]],
|
|
55952
|
+
d,
|
|
55953
|
+
dd["key"]
|
|
55954
|
+
);
|
|
55955
|
+
}
|
|
55956
|
+
});
|
|
55957
|
+
});
|
|
55958
|
+
this.$emit("input", datasTmp);
|
|
55959
|
+
}, 10);
|
|
55960
|
+
}, 1),
|
|
55924
55961
|
getSelection() {
|
|
55925
55962
|
return this.gridApi.getSelectedRows();
|
|
55926
55963
|
},
|
|
@@ -59820,7 +59857,7 @@ var render$F = function() {
|
|
|
59820
59857
|
var _vm = this;
|
|
59821
59858
|
var _h = _vm.$createElement;
|
|
59822
59859
|
var _c = _vm._self._c || _h;
|
|
59823
|
-
return _c("KeepAlive", { attrs: { "exclude": _vm.notCacheName } }, [_c("RouterView", { ref: "child" })], 1);
|
|
59860
|
+
return _c("KeepAlive", { attrs: { "include": _vm.cacheList, "exclude": _vm.notCacheName } }, [_c("RouterView", { ref: "child" })], 1);
|
|
59824
59861
|
};
|
|
59825
59862
|
var staticRenderFns$F = [];
|
|
59826
59863
|
const __vue2_script$G = {
|
|
@@ -59884,7 +59921,7 @@ function __vue2_injectStyles$F(context) {
|
|
|
59884
59921
|
this[o] = __cssModules$F[o];
|
|
59885
59922
|
}
|
|
59886
59923
|
}
|
|
59887
|
-
var
|
|
59924
|
+
var pageLayout = /* @__PURE__ */ function() {
|
|
59888
59925
|
return __component__$F.exports;
|
|
59889
59926
|
}();
|
|
59890
59927
|
var render$D = function() {
|
|
@@ -67446,7 +67483,7 @@ var components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProp
|
|
|
67446
67483
|
User,
|
|
67447
67484
|
BasicLayout,
|
|
67448
67485
|
EmptyLayout,
|
|
67449
|
-
PageLayout,
|
|
67486
|
+
PageLayout: pageLayout,
|
|
67450
67487
|
DetailView: detailView,
|
|
67451
67488
|
PageView: pageView,
|
|
67452
67489
|
Login,
|
|
@@ -67607,40 +67644,9 @@ const PERMISSION_TYPE = {
|
|
|
67607
67644
|
function isMenuPermissionType(type) {
|
|
67608
67645
|
return [PERMISSION_TYPE.DIRECTORY, PERMISSION_TYPE.MENU].includes(type);
|
|
67609
67646
|
}
|
|
67610
|
-
function getPermissionType(type) {
|
|
67611
|
-
return Object.keys(PERMISSION_TYPE).find((key) => PERMISSION_TYPE[key] === type);
|
|
67612
|
-
}
|
|
67613
67647
|
function filterMicroPermissionList(microType, permissionList = []) {
|
|
67614
67648
|
return permissionList;
|
|
67615
67649
|
}
|
|
67616
|
-
function permission2Router(list, microType) {
|
|
67617
|
-
console.log("permission2Router params", list, microType);
|
|
67618
|
-
if (!list) {
|
|
67619
|
-
return [];
|
|
67620
|
-
}
|
|
67621
|
-
let tempList = [];
|
|
67622
|
-
for (const item2 of list) {
|
|
67623
|
-
tempList.push({
|
|
67624
|
-
path: dealRoutePath(item2.uri, microType),
|
|
67625
|
-
uri: item2.uri,
|
|
67626
|
-
name: item2.permissionValue,
|
|
67627
|
-
meta: {
|
|
67628
|
-
appId: item2.appId,
|
|
67629
|
-
permissionId: item2.permissionId,
|
|
67630
|
-
title: item2.label,
|
|
67631
|
-
icon: item2.icon,
|
|
67632
|
-
crumbs: [
|
|
67633
|
-
{ icon: item2.icon, name: item2.permissionValue, title: item2.label, type: item2.type }
|
|
67634
|
-
],
|
|
67635
|
-
activeName: item2.permissionValue,
|
|
67636
|
-
data: item2
|
|
67637
|
-
},
|
|
67638
|
-
component: item2.permissionValue
|
|
67639
|
-
});
|
|
67640
|
-
}
|
|
67641
|
-
console.log("permission2Router result", tempList);
|
|
67642
|
-
return tempList;
|
|
67643
|
-
}
|
|
67644
67650
|
function listToMenuTree({ list, menuTree, pageNode, parentId, crumbs, root, microType }) {
|
|
67645
67651
|
if (!list)
|
|
67646
67652
|
return;
|
|
@@ -67785,94 +67791,31 @@ function generator(menuData = []) {
|
|
|
67785
67791
|
}
|
|
67786
67792
|
return menuData;
|
|
67787
67793
|
}
|
|
67788
|
-
function
|
|
67789
|
-
|
|
67790
|
-
|
|
67791
|
-
|
|
67792
|
-
|
|
67793
|
-
|
|
67794
|
-
}
|
|
67795
|
-
return item2;
|
|
67796
|
-
}
|
|
67797
|
-
const isAdded = (router, route) => {
|
|
67798
|
-
var _a, _b;
|
|
67799
|
-
let rlt = router.resolve(route);
|
|
67800
|
-
return !!((_b = (_a = rlt == null ? void 0 : rlt.resolved) == null ? void 0 : _a.matched) == null ? void 0 : _b.length);
|
|
67801
|
-
};
|
|
67802
|
-
const pageRoute = {
|
|
67803
|
-
path: "/page",
|
|
67804
|
-
name: "page",
|
|
67805
|
-
meta: { hideInMenu: true, notCache: true },
|
|
67806
|
-
component: PageLayout,
|
|
67807
|
-
children: []
|
|
67808
|
-
};
|
|
67809
|
-
async function renderRoutes({
|
|
67810
|
-
router,
|
|
67811
|
-
store: store2,
|
|
67812
|
-
microType,
|
|
67813
|
-
allowPermissionList,
|
|
67814
|
-
routerOptionsBak,
|
|
67815
|
-
to
|
|
67816
|
-
}) {
|
|
67817
|
-
let isInitilaze = !store2.state.user.userName;
|
|
67818
|
-
if (isAdded(router, to) && !isInitilaze) {
|
|
67819
|
-
return;
|
|
67820
|
-
}
|
|
67821
|
-
if (isInitilaze) {
|
|
67822
|
-
store2.dispatch("getIndexInfo");
|
|
67823
|
-
await store2.dispatch("getUserInfo");
|
|
67824
|
-
await store2.dispatch("getAppListData");
|
|
67825
|
-
await store2.dispatch("getPermissionData");
|
|
67826
|
-
router.options = _.cloneDeep(routerOptionsBak);
|
|
67827
|
-
}
|
|
67828
|
-
const permissionData = getPermissionCache();
|
|
67794
|
+
async function renderRoutes({ router, store: store2, microType, allowPermissionList, routerOptionsBak }) {
|
|
67795
|
+
store2.dispatch("getIndexInfo");
|
|
67796
|
+
await store2.dispatch("getUserInfo");
|
|
67797
|
+
await store2.dispatch("getAppListData");
|
|
67798
|
+
const permissionData = await store2.dispatch("getPermissionData");
|
|
67799
|
+
router.options = _.cloneDeep(routerOptionsBak);
|
|
67829
67800
|
const microPermissionData = filterMicroPermissionList(microType, permissionData);
|
|
67830
|
-
|
|
67831
|
-
|
|
67832
|
-
|
|
67833
|
-
|
|
67834
|
-
|
|
67835
|
-
|
|
67836
|
-
}
|
|
67837
|
-
} else {
|
|
67838
|
-
const rootRoute2 = router.options.routes.find((item2) => item2.path === "/");
|
|
67839
|
-
if (isInitilaze) {
|
|
67840
|
-
router.addRoute(pageRoute);
|
|
67841
|
-
}
|
|
67842
|
-
if (!isAdded(router, to)) {
|
|
67843
|
-
let tempPer = microPermissionData.find((item2) => {
|
|
67844
|
-
return item2.permissionValue == to.name;
|
|
67845
|
-
});
|
|
67846
|
-
if (!tempPer) {
|
|
67847
|
-
tempPer = microPermissionData.find((item2) => {
|
|
67848
|
-
return item2.uri.endsWith(to.path);
|
|
67849
|
-
});
|
|
67850
|
-
}
|
|
67851
|
-
const perType = getPermissionType(tempPer.type || "");
|
|
67852
|
-
let tmpRoute = generatorRouteByPermission(permission2Router([tempPer], microType)[0]);
|
|
67853
|
-
if (perType == "PAGE") {
|
|
67854
|
-
router.addRoute(pageRoute.name, { ...tmpRoute, meta: { ...tmpRoute.meta, notCache: true } });
|
|
67855
|
-
pageRoute.children.push(tmpRoute);
|
|
67856
|
-
}
|
|
67857
|
-
if (perType == "MENU") {
|
|
67858
|
-
router.addRoute(rootRoute2.name, tmpRoute);
|
|
67859
|
-
rootRoute2.children.push(tmpRoute);
|
|
67860
|
-
}
|
|
67861
|
-
}
|
|
67801
|
+
const dynamicRouters = generatorDynamicRouter(microPermissionData, microType);
|
|
67802
|
+
console.log("dynamicROuters", dynamicRouters);
|
|
67803
|
+
const rootRoute2 = router.options.routes.find((item2) => item2.path === "/");
|
|
67804
|
+
for (const item2 of dynamicRouters) {
|
|
67805
|
+
router.addRoute(rootRoute2.name, item2);
|
|
67806
|
+
rootRoute2.children.push(item2);
|
|
67862
67807
|
}
|
|
67863
|
-
|
|
67864
|
-
|
|
67865
|
-
|
|
67866
|
-
|
|
67867
|
-
|
|
67868
|
-
|
|
67869
|
-
|
|
67870
|
-
|
|
67871
|
-
|
|
67872
|
-
|
|
67873
|
-
|
|
67874
|
-
router.addRoute(config.rootRouteName, item2);
|
|
67875
|
-
}
|
|
67808
|
+
const microAllowPermissionList = filterMicroPermissionList(microType, allowPermissionList);
|
|
67809
|
+
const needAddRoutes = microAllowPermissionList.filter((permission2) => {
|
|
67810
|
+
return router.options.routes.findIndex((route) => permission2.name === route.name) === -1;
|
|
67811
|
+
});
|
|
67812
|
+
needAddRoutes.forEach((item2) => {
|
|
67813
|
+
item2.component = item2.name;
|
|
67814
|
+
item2.meta = { hideInMenu: true, title: item2.label, activeName: item2.name };
|
|
67815
|
+
});
|
|
67816
|
+
const dynamicDetailRouters = generator(needAddRoutes);
|
|
67817
|
+
for (const item2 of dynamicDetailRouters) {
|
|
67818
|
+
router.addRoute(config.rootRouteName, item2);
|
|
67876
67819
|
}
|
|
67877
67820
|
}
|
|
67878
67821
|
function addRouterGuards({ router, store: store2, microType, allowPermissionList }) {
|
|
@@ -67939,12 +67882,11 @@ function addRouterGuards({ router, store: store2, microType, allowPermissionList
|
|
|
67939
67882
|
sessionStorage.setItem("sso_token", ssoToken);
|
|
67940
67883
|
}
|
|
67941
67884
|
}
|
|
67942
|
-
let isInitilaze = !store2.state.user.userName;
|
|
67943
67885
|
if (!token && to.name !== LOGIN_PAGE_NAME) {
|
|
67944
67886
|
next({ name: LOGIN_PAGE_NAME });
|
|
67945
67887
|
} else if (to.name === LOGIN_PAGE_NAME) {
|
|
67946
67888
|
next();
|
|
67947
|
-
} else if (
|
|
67889
|
+
} else if (!store2.state.user.userName) {
|
|
67948
67890
|
Spin.show();
|
|
67949
67891
|
try {
|
|
67950
67892
|
await renderRoutes({
|
|
@@ -67952,18 +67894,9 @@ function addRouterGuards({ router, store: store2, microType, allowPermissionList
|
|
|
67952
67894
|
store: store2,
|
|
67953
67895
|
microType,
|
|
67954
67896
|
allowPermissionList,
|
|
67955
|
-
routerOptionsBak
|
|
67956
|
-
to
|
|
67897
|
+
routerOptionsBak
|
|
67957
67898
|
});
|
|
67958
|
-
|
|
67959
|
-
if (to.name && to.path == "/") {
|
|
67960
|
-
next({ name: to.name, query: to.query });
|
|
67961
|
-
} else {
|
|
67962
|
-
next({ ...to });
|
|
67963
|
-
}
|
|
67964
|
-
} else {
|
|
67965
|
-
next();
|
|
67966
|
-
}
|
|
67899
|
+
next({ ...to, replace: true });
|
|
67967
67900
|
} catch (error) {
|
|
67968
67901
|
next({ name: LOGIN_PAGE_NAME });
|
|
67969
67902
|
}
|
|
@@ -68420,4 +68353,4 @@ const API = {
|
|
|
68420
68353
|
getDefaultTheme,
|
|
68421
68354
|
doChangeTheme
|
|
68422
68355
|
};
|
|
68423
|
-
export { AppMenu, auditLogModal as AuditLogModal, auditModal as AuditModal, BackTop, backTopPanel as BackTopPanel, BasicLayout, brandInputModal as BrandInputModal, Button, ButtonGroup, Collect, comInputModal as ComInputModal, ConditionPanel, datePicker as DatePicker, detailView as DetailView, Drawer, Dropdown, dropdownItem as DropdownItem, dropdownMenu as DropdownMenu, EmptyLayout, ErrorContent, errorStore as ErrorStore, index$4 as ExcelFlowModal, FormWrap, Fullscreen as FullScreen, helpTableModal as HelpTableModal, helpTreeModal as HelpTreeModal, Icons, imagePreview as ImagePreview, configPlugin as IndConfigPlugin, routerPlugin as IndRouterPlugin, index$2 as ItemCompInputModal, itemInputModal as ItemInputModal, itemTypeCombineSelect as ItemTypeCombineSelect, language as Language, LoadingPanel, Login, materialItemModal as MaterialItemModal, mobileindex as MobileTable, Modal, NotFound, IndOption as Option, optionGroup as OptionGroup, OtherMenu, PageLayout, pageView as PageView, Poptip, reportIndexModal as ReportIndexModal, reportOptionModal as ReportOptionModal, roleAuth as RoleAuth, index$1 as RowSumSettingInputModal, Select, SideMenu, SideMenuItem, SiderTrigger, Sign, signModal as SignModal, index as StepTrack, Table, TagsNav, Tooltip, Tree, index$3 as TreeModal, ImpTreeSelect as TreeSelect, unitRadio as UnitRadio, uploadFile as UploadFile, uploadImg as UploadImg, User, userAuth as UserAuth, zeroRadio as ZeroRadio, addRouterGuards, clickOutside, createMacroBasicRoutes, createMicroBasicRoutes, API as default, permission, print, routerOptions, store, transferDom };
|
|
68356
|
+
export { AppMenu, auditLogModal as AuditLogModal, auditModal as AuditModal, BackTop, backTopPanel as BackTopPanel, BasicLayout, brandInputModal as BrandInputModal, Button, ButtonGroup, Collect, comInputModal as ComInputModal, ConditionPanel, datePicker as DatePicker, detailView as DetailView, Drawer, Dropdown, dropdownItem as DropdownItem, dropdownMenu as DropdownMenu, EmptyLayout, ErrorContent, errorStore as ErrorStore, index$4 as ExcelFlowModal, FormWrap, Fullscreen as FullScreen, helpTableModal as HelpTableModal, helpTreeModal as HelpTreeModal, Icons, imagePreview as ImagePreview, configPlugin as IndConfigPlugin, routerPlugin as IndRouterPlugin, index$2 as ItemCompInputModal, itemInputModal as ItemInputModal, itemTypeCombineSelect as ItemTypeCombineSelect, language as Language, LoadingPanel, Login, materialItemModal as MaterialItemModal, mobileindex as MobileTable, Modal, NotFound, IndOption as Option, optionGroup as OptionGroup, OtherMenu, pageLayout as PageLayout, pageView as PageView, Poptip, reportIndexModal as ReportIndexModal, reportOptionModal as ReportOptionModal, roleAuth as RoleAuth, index$1 as RowSumSettingInputModal, Select, SideMenu, SideMenuItem, SiderTrigger, Sign, signModal as SignModal, index as StepTrack, Table, TagsNav, Tooltip, Tree, index$3 as TreeModal, ImpTreeSelect as TreeSelect, unitRadio as UnitRadio, uploadFile as UploadFile, uploadImg as UploadImg, User, userAuth as UserAuth, zeroRadio as ZeroRadio, addRouterGuards, clickOutside, createMacroBasicRoutes, createMicroBasicRoutes, API as default, permission, print, routerOptions, store, transferDom };
|