@zgfe/modules-dm 1.0.38-session.0 → 1.0.39-session.0
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/es/components/demo.js +11 -1
- package/es/modules/dataCollection/collectionEventList.js +3 -2
- package/es/modules/dataCollection/index.d.ts +5 -0
- package/es/modules/dataCollection/index.js +5 -7
- package/es/modules/dataCollection/styles/index.less +1 -2
- package/es/modules/dataCollection/virtualEventList.js +3 -1
- package/es/modules/dataManage/demo/index.js +16 -8
- package/es/modules/dataManage/index.d.ts +4 -0
- package/es/modules/dataManage/index.js +1 -0
- package/package.json +2 -3
package/es/components/demo.js
CHANGED
|
@@ -6,6 +6,13 @@ import { DemoWrapper } from '@zgfe/business-lib';
|
|
|
6
6
|
import { ConfigProvider } from 'antd';
|
|
7
7
|
import zhCN from 'antd/es/locale/zh_CN';
|
|
8
8
|
var DemoWrapper2 = function DemoWrapper2(props) {
|
|
9
|
+
var authority = {
|
|
10
|
+
10018: true,
|
|
11
|
+
10019: true,
|
|
12
|
+
100020: true,
|
|
13
|
+
1700559695: true,
|
|
14
|
+
100021: true
|
|
15
|
+
};
|
|
9
16
|
return /*#__PURE__*/React.createElement(ConfigProvider, {
|
|
10
17
|
locale: zhCN
|
|
11
18
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -16,7 +23,10 @@ var DemoWrapper2 = function DemoWrapper2(props) {
|
|
|
16
23
|
}
|
|
17
24
|
}, /*#__PURE__*/React.createElement(DemoWrapper, {
|
|
18
25
|
needMeta: true,
|
|
19
|
-
defaultApp:
|
|
26
|
+
defaultApp: 323,
|
|
27
|
+
contextProps: {
|
|
28
|
+
authority: authority
|
|
29
|
+
}
|
|
20
30
|
}, props.children)));
|
|
21
31
|
};
|
|
22
32
|
export default DemoWrapper2;
|
|
@@ -380,14 +380,15 @@ var CollectionEventList = function CollectionEventList(props) {
|
|
|
380
380
|
}, "\u5171", /*#__PURE__*/React.createElement("span", null, total), "\u6761"), /*#__PURE__*/React.createElement("div", {
|
|
381
381
|
className: "top-button"
|
|
382
382
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
383
|
-
type: "primary",
|
|
384
383
|
shape: "round",
|
|
384
|
+
className: "button ".concat(!authority[1000002] ? 'disabled' : ''),
|
|
385
385
|
disabled: !authority[1000002],
|
|
386
386
|
onClick: function onClick() {
|
|
387
387
|
return setEventNameShow(true);
|
|
388
388
|
}
|
|
389
389
|
}, "\u521B\u5EFA\u4E8B\u4EF6\u5206\u7EC4"), /*#__PURE__*/React.createElement(Button, {
|
|
390
390
|
shape: "round",
|
|
391
|
+
className: "button ".concat(!authority[1700636282] ? 'disabled' : ''),
|
|
391
392
|
disabled: !authority[1700636282],
|
|
392
393
|
onClick: function onClick() {
|
|
393
394
|
return setEventGroupingShow(true);
|
|
@@ -432,7 +433,7 @@ var CollectionEventList = function CollectionEventList(props) {
|
|
|
432
433
|
eventGroupingShow: eventGroupingShow,
|
|
433
434
|
setEventGroupingShow: setEventGroupingShow,
|
|
434
435
|
refresh: refreshHandle,
|
|
435
|
-
source:
|
|
436
|
+
source: "collection"
|
|
436
437
|
}), /*#__PURE__*/React.createElement(Modal, {
|
|
437
438
|
title: "\u521B\u5EFA\u5206\u7EC4",
|
|
438
439
|
className: "creact-group",
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
interface DataCollectionProps {
|
|
3
|
+
/**
|
|
4
|
+
* 默认选中菜单
|
|
5
|
+
*/
|
|
6
|
+
activeTab?: number | string;
|
|
3
7
|
/**
|
|
4
8
|
* 拓展的一级菜单
|
|
5
9
|
*/
|
|
6
10
|
extraTabs?: {
|
|
7
11
|
key: string;
|
|
8
12
|
label: string;
|
|
13
|
+
hidden?: boolean;
|
|
9
14
|
children: React.ReactNode;
|
|
10
15
|
[other: string]: any;
|
|
11
16
|
}[];
|
|
@@ -13,14 +13,13 @@ import { getAppID } from '../../utils';
|
|
|
13
13
|
import EventList from './collectionEventList';
|
|
14
14
|
import CollectionAttributeList from './collectionAttributeList';
|
|
15
15
|
import VirtualEventList from './virtualEventList';
|
|
16
|
-
import { SessionManage } from '@zgfe/modules-session';
|
|
17
16
|
var DataCollection = function DataCollection(props) {
|
|
18
17
|
var _props$extraTabs, _props$extraTabs2;
|
|
19
18
|
var classPrefix = 'data-collection';
|
|
20
19
|
var _useContext = useContext(BizGlobalDataContext),
|
|
21
20
|
currentApp = _useContext.currentApp,
|
|
22
21
|
authority = _useContext.authority;
|
|
23
|
-
var _useState = useState(1),
|
|
22
|
+
var _useState = useState(props.activeTab || 1),
|
|
24
23
|
_useState2 = _slicedToArray(_useState, 2),
|
|
25
24
|
listTab = _useState2[0],
|
|
26
25
|
setListTab = _useState2[1];
|
|
@@ -77,9 +76,8 @@ var DataCollection = function DataCollection(props) {
|
|
|
77
76
|
value: 3
|
|
78
77
|
}, "\u865A\u62DF\u4E8B\u4EF6"), authority[100021] && /*#__PURE__*/React.createElement(Radio.Button, {
|
|
79
78
|
value: 2
|
|
80
|
-
}, "\u7528\u6237\u5C5E\u6027\u7BA1\u7406"),
|
|
81
|
-
|
|
82
|
-
}, "Session\u7BA1\u7406"), (_props$extraTabs = props.extraTabs) === null || _props$extraTabs === void 0 ? void 0 : _props$extraTabs.map(function (item) {
|
|
79
|
+
}, "\u7528\u6237\u5C5E\u6027\u7BA1\u7406"), (_props$extraTabs = props.extraTabs) === null || _props$extraTabs === void 0 ? void 0 : _props$extraTabs.map(function (item) {
|
|
80
|
+
if (item.hidden) return null;
|
|
83
81
|
return /*#__PURE__*/React.createElement(Radio.Button, {
|
|
84
82
|
key: item.key,
|
|
85
83
|
value: item.key,
|
|
@@ -92,8 +90,8 @@ var DataCollection = function DataCollection(props) {
|
|
|
92
90
|
isOpen: isOpen,
|
|
93
91
|
queryPlanData: queryPlanData,
|
|
94
92
|
source: "user"
|
|
95
|
-
}),
|
|
96
|
-
return listTab === item.key ? /*#__PURE__*/React.createElement("div", {
|
|
93
|
+
}), (_props$extraTabs2 = props.extraTabs) === null || _props$extraTabs2 === void 0 ? void 0 : _props$extraTabs2.map(function (item) {
|
|
94
|
+
return listTab === item.key && !item.hidden ? /*#__PURE__*/React.createElement("div", {
|
|
97
95
|
key: item.key
|
|
98
96
|
}, item.children) : null;
|
|
99
97
|
}));
|
|
@@ -281,12 +281,14 @@ var VirtualEventList = function VirtualEventList() {
|
|
|
281
281
|
}
|
|
282
282
|
}, "\u521B\u5EFA\u865A\u62DF\u4E8B\u4EF6"), /*#__PURE__*/React.createElement(Button, {
|
|
283
283
|
shape: "round",
|
|
284
|
+
className: "button ".concat(!authority[1700636137] ? 'disabled' : ''),
|
|
284
285
|
disabled: !authority[1700636137],
|
|
285
286
|
onClick: function onClick() {
|
|
286
287
|
return setEventNameShow(true);
|
|
287
288
|
}
|
|
288
289
|
}, "\u521B\u5EFA\u4E8B\u4EF6\u5206\u7EC4"), /*#__PURE__*/React.createElement(Button, {
|
|
289
290
|
shape: "round",
|
|
291
|
+
className: "button ".concat(!authority[1700636017] ? 'disabled' : ''),
|
|
290
292
|
disabled: !authority[1700636017],
|
|
291
293
|
onClick: function onClick() {
|
|
292
294
|
return setEventGroupingShow(true);
|
|
@@ -319,7 +321,7 @@ var VirtualEventList = function VirtualEventList() {
|
|
|
319
321
|
eventGroupingShow: eventGroupingShow,
|
|
320
322
|
setEventGroupingShow: setEventGroupingShow,
|
|
321
323
|
refresh: queryList,
|
|
322
|
-
source:
|
|
324
|
+
source: "virtual"
|
|
323
325
|
}), /*#__PURE__*/React.createElement(Modal, {
|
|
324
326
|
title: "\u521B\u5EFA\u5206\u7EC4",
|
|
325
327
|
className: "creact-group",
|
|
@@ -2,6 +2,11 @@ import React from 'react';
|
|
|
2
2
|
import { DataManage } from '@zgfe/modules-dm';
|
|
3
3
|
import DemoWrapper from '../../../components/demo';
|
|
4
4
|
export default (function () {
|
|
5
|
+
var subTabs = [{
|
|
6
|
+
key: 'session',
|
|
7
|
+
label: 'Session管理',
|
|
8
|
+
children: /*#__PURE__*/React.createElement("div", null, "Session\u7BA1\u7406")
|
|
9
|
+
}];
|
|
5
10
|
return /*#__PURE__*/React.createElement(DemoWrapper, null, /*#__PURE__*/React.createElement(DataManage
|
|
6
11
|
// extraTabs={[
|
|
7
12
|
// {
|
|
@@ -10,12 +15,15 @@ export default (function () {
|
|
|
10
15
|
// children: <div>aaa</div>,
|
|
11
16
|
// },
|
|
12
17
|
// ]}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
, {
|
|
19
|
+
// extraTabs={[
|
|
20
|
+
// {
|
|
21
|
+
// key: 'aaa',
|
|
22
|
+
// label: '拓展菜单',
|
|
23
|
+
// children: <div>aaa</div>,
|
|
24
|
+
// },
|
|
25
|
+
// ]}
|
|
26
|
+
extraSubTabs: subTabs,
|
|
27
|
+
activeSubTab: "session"
|
|
28
|
+
}));
|
|
21
29
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgfe/modules-dm",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.39-session.0",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"module": "es/index.js",
|
|
6
6
|
"typings": "es/index.d.ts",
|
|
@@ -40,7 +40,6 @@
|
|
|
40
40
|
"@umijs/fabric": "^2.8.1",
|
|
41
41
|
"@umijs/test": "^3.0.5",
|
|
42
42
|
"@zgfe/business-lib": "1.2.3-heyh.1",
|
|
43
|
-
"@zgfe/modules-session": "1.0.1-alpha.1",
|
|
44
43
|
"antd": "4.24.10",
|
|
45
44
|
"dumi": "^1.1.0",
|
|
46
45
|
"father-build": "^1.17.2",
|
|
@@ -52,7 +51,7 @@
|
|
|
52
51
|
"umi-request": "^1.4.0",
|
|
53
52
|
"yorkie": "^2.0.0"
|
|
54
53
|
},
|
|
55
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "951170e644a46fd388269e91dea5d98e9f52bb2b",
|
|
56
55
|
"gitHooks": {
|
|
57
56
|
"pre-commit": "lint-staged"
|
|
58
57
|
}
|