@zgfe/modules-dm 1.0.29 → 1.0.30-heyh.2
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/modules/dataCollection/collectionAttributeList.js +2 -1
- package/es/modules/dataCollection/collectionEventList.js +2 -2
- package/es/modules/dataCollection/index.js +5 -5
- package/es/modules/dataCollection/tablePlus.js +12 -7
- package/es/modules/dataManage/index.js +4 -4
- package/es/modules/dataPlan/index.js +7 -6
- package/package.json +3 -3
|
@@ -22,7 +22,8 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
22
22
|
var classPrefix = 'attr-list';
|
|
23
23
|
var _useContext = useContext(BizGlobalDataContext),
|
|
24
24
|
currentApp = _useContext.currentApp,
|
|
25
|
-
isDemo = _useContext.isDemo
|
|
25
|
+
isDemo = _useContext.isDemo,
|
|
26
|
+
authority = _useContext.authority;
|
|
26
27
|
var isOpen = props.isOpen,
|
|
27
28
|
queryPlanData = props.queryPlanData,
|
|
28
29
|
source = props.source,
|
|
@@ -23,7 +23,7 @@ var CollectionEventList = function CollectionEventList(props) {
|
|
|
23
23
|
var classPrefix = 'event-list';
|
|
24
24
|
var _useContext = useContext(BizGlobalDataContext),
|
|
25
25
|
currentApp = _useContext.currentApp,
|
|
26
|
-
|
|
26
|
+
authority = _useContext.authority;
|
|
27
27
|
var _useContext2 = useContext(DmContext),
|
|
28
28
|
state = _useContext2.state;
|
|
29
29
|
// const { updateEventMetas } = props;
|
|
@@ -412,7 +412,7 @@ var CollectionEventList = function CollectionEventList(props) {
|
|
|
412
412
|
className: "top-button",
|
|
413
413
|
type: "primary",
|
|
414
414
|
shape: "round",
|
|
415
|
-
disabled:
|
|
415
|
+
disabled: !authority[1000002],
|
|
416
416
|
icon: /*#__PURE__*/React.createElement(IconFont, {
|
|
417
417
|
style: {
|
|
418
418
|
marginRight: '5px'
|
|
@@ -16,7 +16,7 @@ var DataCollection = function DataCollection(props) {
|
|
|
16
16
|
var _props$extraTabs, _props$extraTabs2;
|
|
17
17
|
var _useContext = useContext(BizGlobalDataContext),
|
|
18
18
|
currentApp = _useContext.currentApp,
|
|
19
|
-
|
|
19
|
+
authority = _useContext.authority;
|
|
20
20
|
var classPrefix = 'data-collection';
|
|
21
21
|
// const { updateEventMetas } = props;
|
|
22
22
|
// console.log('①埋点方案', currentApp?.appId, getAppID(currentApp));
|
|
@@ -71,9 +71,9 @@ var DataCollection = function DataCollection(props) {
|
|
|
71
71
|
style: {
|
|
72
72
|
marginBottom: 16
|
|
73
73
|
}
|
|
74
|
-
}, /*#__PURE__*/React.createElement(Radio.Button, {
|
|
74
|
+
}, authority[100020] && /*#__PURE__*/React.createElement(Radio.Button, {
|
|
75
75
|
value: 1
|
|
76
|
-
}, "\u4E8B\u4EF6\u5217\u8868"), /*#__PURE__*/React.createElement(Radio.Button, {
|
|
76
|
+
}, "\u4E8B\u4EF6\u5217\u8868"), authority[100021] && /*#__PURE__*/React.createElement(Radio.Button, {
|
|
77
77
|
value: 2
|
|
78
78
|
}, "\u7528\u6237\u5C5E\u6027\u5217\u8868"), (_props$extraTabs = props.extraTabs) === null || _props$extraTabs === void 0 ? void 0 : _props$extraTabs.map(function (item) {
|
|
79
79
|
return /*#__PURE__*/React.createElement(Radio.Button, {
|
|
@@ -81,10 +81,10 @@ var DataCollection = function DataCollection(props) {
|
|
|
81
81
|
value: item.key,
|
|
82
82
|
disabled: item.disabled
|
|
83
83
|
}, item.label);
|
|
84
|
-
})), listTab == 1 && /*#__PURE__*/React.createElement(EventList, {
|
|
84
|
+
})), listTab == 1 && authority[100020] && /*#__PURE__*/React.createElement(EventList, {
|
|
85
85
|
isOpen: isOpen,
|
|
86
86
|
queryPlanData: queryPlanData
|
|
87
|
-
}), listTab == 2 && /*#__PURE__*/React.createElement(CollectionAttributeList, {
|
|
87
|
+
}), listTab == 2 && authority[100021] && /*#__PURE__*/React.createElement(CollectionAttributeList, {
|
|
88
88
|
isOpen: isOpen,
|
|
89
89
|
queryPlanData: queryPlanData,
|
|
90
90
|
source: "user"
|
|
@@ -27,7 +27,8 @@ var TablePlus = function TablePlus(props) {
|
|
|
27
27
|
isOpen = props.isOpen;
|
|
28
28
|
var _useContext = useContext(BizGlobalDataContext),
|
|
29
29
|
currentApp = _useContext.currentApp,
|
|
30
|
-
isDemo = _useContext.isDemo
|
|
30
|
+
isDemo = _useContext.isDemo,
|
|
31
|
+
authority = _useContext.authority;
|
|
31
32
|
var _useContext2 = useContext(DmContext),
|
|
32
33
|
state = _useContext2.state;
|
|
33
34
|
// 别名foucs
|
|
@@ -528,6 +529,10 @@ var TablePlus = function TablePlus(props) {
|
|
|
528
529
|
}, record.event_attrs.length, /*#__PURE__*/React.createElement(IconFont, {
|
|
529
530
|
type: "bianji1",
|
|
530
531
|
onClick: function onClick() {
|
|
532
|
+
if (!authority[1000003]) {
|
|
533
|
+
message.error('无修改权限');
|
|
534
|
+
return;
|
|
535
|
+
}
|
|
531
536
|
props.eventAttrDataHandle(record);
|
|
532
537
|
}
|
|
533
538
|
}));
|
|
@@ -545,8 +550,8 @@ var TablePlus = function TablePlus(props) {
|
|
|
545
550
|
className: "edit-del"
|
|
546
551
|
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
547
552
|
onClick: function onClick() {
|
|
548
|
-
if (
|
|
549
|
-
message.error('
|
|
553
|
+
if (!authority[1000003]) {
|
|
554
|
+
message.error('无修改权限');
|
|
550
555
|
return;
|
|
551
556
|
}
|
|
552
557
|
setEventNameData({
|
|
@@ -559,8 +564,8 @@ var TablePlus = function TablePlus(props) {
|
|
|
559
564
|
type: "bianji"
|
|
560
565
|
}), /*#__PURE__*/React.createElement(IconFont, {
|
|
561
566
|
onClick: function onClick() {
|
|
562
|
-
if (
|
|
563
|
-
message.error('
|
|
567
|
+
if (!authority[1000004]) {
|
|
568
|
+
message.error('无修改权限');
|
|
564
569
|
return;
|
|
565
570
|
}
|
|
566
571
|
eventNameDel(record.groupId);
|
|
@@ -571,8 +576,8 @@ var TablePlus = function TablePlus(props) {
|
|
|
571
576
|
return /*#__PURE__*/React.createElement("div", {
|
|
572
577
|
className: "set ".concat(record.owner == 'zg_abp' ? 'set-error' : ''),
|
|
573
578
|
onClick: function onClick() {
|
|
574
|
-
if (
|
|
575
|
-
message.error('
|
|
579
|
+
if (!authority[1000005]) {
|
|
580
|
+
message.error('无修改权限');
|
|
576
581
|
return;
|
|
577
582
|
}
|
|
578
583
|
record.owner != 'zg_abp' ? eventItemDel(record.event_id) : message.error('内置事件无法删除');
|
|
@@ -18,7 +18,7 @@ import PlanList from '../dataPlan';
|
|
|
18
18
|
import DataCollection from '../dataCollection';
|
|
19
19
|
var DataManage = function DataManage(props) {
|
|
20
20
|
var _useContext = useContext(BizGlobalDataContext),
|
|
21
|
-
|
|
21
|
+
authority = _useContext.authority;
|
|
22
22
|
var classPrefix = 'data-manage';
|
|
23
23
|
var updateEventMetas = props.updateEventMetas,
|
|
24
24
|
showPlan = props.showPlan;
|
|
@@ -40,15 +40,15 @@ var DataManage = function DataManage(props) {
|
|
|
40
40
|
}, /*#__PURE__*/React.createElement("div", {
|
|
41
41
|
className: classPrefix
|
|
42
42
|
}, /*#__PURE__*/React.createElement(Tabs, {
|
|
43
|
-
className: "tabs
|
|
43
|
+
className: "tabs",
|
|
44
44
|
defaultActiveKey: "0",
|
|
45
|
-
items: [{
|
|
45
|
+
items: [authority[10018] && {
|
|
46
46
|
key: '0',
|
|
47
47
|
label: '埋点管理',
|
|
48
48
|
children: /*#__PURE__*/React.createElement(DataCollection, {
|
|
49
49
|
extraTabs: props.extraSubTabs
|
|
50
50
|
})
|
|
51
|
-
}, {
|
|
51
|
+
}, authority[10019] && {
|
|
52
52
|
key: '1',
|
|
53
53
|
label: '埋点方案管理',
|
|
54
54
|
disabled: !showPlan,
|
|
@@ -7,7 +7,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
7
7
|
import { BizGlobalDataContext, IconFont } from '@zgfe/business-lib';
|
|
8
8
|
import { Switch, Button, DatePicker, Table, Modal, message } from 'antd';
|
|
9
9
|
var RangePicker = DatePicker.RangePicker;
|
|
10
|
-
import React, { useEffect, useState, useContext } from 'react';
|
|
10
|
+
import React, { useEffect, useState, useContext, Fragment } from 'react';
|
|
11
11
|
import './styles/index.less';
|
|
12
12
|
import request from '../../utils/ajax';
|
|
13
13
|
import apis from '../../constants/api';
|
|
@@ -17,7 +17,8 @@ var PlanList = function PlanList(props) {
|
|
|
17
17
|
var classPrefix = 'plan-list';
|
|
18
18
|
var _useContext = useContext(BizGlobalDataContext),
|
|
19
19
|
currentApp = _useContext.currentApp,
|
|
20
|
-
isDemo = _useContext.isDemo
|
|
20
|
+
isDemo = _useContext.isDemo,
|
|
21
|
+
authority = _useContext.authority;
|
|
21
22
|
// console.log('②埋点方案管理', currentApp?.appId, getAppID(currentApp));
|
|
22
23
|
// 查看方案
|
|
23
24
|
var tableSee = function tableSee(data) {
|
|
@@ -85,17 +86,17 @@ var PlanList = function PlanList(props) {
|
|
|
85
86
|
title: '操作',
|
|
86
87
|
dataIndex: 'set',
|
|
87
88
|
render: function render(_text, _record) {
|
|
88
|
-
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
|
|
89
|
+
return /*#__PURE__*/React.createElement("div", null, authority[100024] && /*#__PURE__*/React.createElement(Fragment, null, authority[1000006] && /*#__PURE__*/React.createElement("span", {
|
|
89
90
|
className: "".concat(classPrefix, "-table-see"),
|
|
90
91
|
onClick: function onClick() {
|
|
91
92
|
return tableSee(_record);
|
|
92
93
|
}
|
|
93
|
-
}, "\u67E5\u770B"), /*#__PURE__*/React.createElement("span", {
|
|
94
|
+
}, "\u67E5\u770B"), authority[1000007] && /*#__PURE__*/React.createElement("span", {
|
|
94
95
|
className: "".concat(classPrefix, "-table-del"),
|
|
95
96
|
onClick: function onClick() {
|
|
96
97
|
return tableDel(_record.planName);
|
|
97
98
|
}
|
|
98
|
-
}, "\u5220\u9664"));
|
|
99
|
+
}, "\u5220\u9664")), !authority[100024] && /*#__PURE__*/React.createElement("span", null, " - "));
|
|
99
100
|
}
|
|
100
101
|
}];
|
|
101
102
|
// 方案列表
|
|
@@ -200,7 +201,7 @@ var PlanList = function PlanList(props) {
|
|
|
200
201
|
unCheckedChildren: "\u5173",
|
|
201
202
|
checked: isOpen
|
|
202
203
|
})), /*#__PURE__*/React.createElement(Button, {
|
|
203
|
-
disabled:
|
|
204
|
+
disabled: !authority[100023],
|
|
204
205
|
onClick: function onClick() {
|
|
205
206
|
if (listData.length >= 10) {
|
|
206
207
|
return message.error('最多创建10个埋点方案');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgfe/modules-dm",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.30-heyh.2",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"module": "es/index.js",
|
|
6
6
|
"typings": "es/index.d.ts",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@types/lodash": "^4.14.182",
|
|
38
38
|
"@umijs/fabric": "^2.8.1",
|
|
39
39
|
"@umijs/test": "^3.0.5",
|
|
40
|
-
"@zgfe/business-lib": "
|
|
40
|
+
"@zgfe/business-lib": "1.1.87-auth.7",
|
|
41
41
|
"antd": "4.24.10",
|
|
42
42
|
"dumi": "^1.1.0",
|
|
43
43
|
"father-build": "^1.17.2",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"umi-request": "^1.4.0",
|
|
50
50
|
"yorkie": "^2.0.0"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "9946c9d4ac13d31bfa3be622e1b5eae0a9447402",
|
|
53
53
|
"gitHooks": {
|
|
54
54
|
"pre-commit": "lint-staged"
|
|
55
55
|
}
|