@zgfe/modules-event 0.1.5 → 0.1.7-heyh.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.
@@ -113,7 +113,6 @@ var EventFilter = function EventFilter(props) {
113
113
  if (count <= 0) setFilter(undefined);
114
114
  }, [count, filter]);
115
115
  var onChangeEvent = function onChangeEvent(event) {
116
- console.log('onChangeEvent', event);
117
116
  if (event && event.event && event.event.id === -100) {
118
117
  setEventOverview(false);
119
118
  } else {
@@ -164,7 +163,7 @@ var EventFilter = function EventFilter(props) {
164
163
  delete _dimension.key;
165
164
  _event.dimension = _dimension;
166
165
  }
167
- _event.eventGroupId = group.id ? group.id : undefined;
166
+ _event.eventGroupId = group.id !== 0 ? group.id : undefined;
168
167
  props.onChange && props.onChange(_event);
169
168
  }, [bizAttributeSelectorValue, filter, event, group]);
170
169
  return /*#__PURE__*/React.createElement("div", {
@@ -34,7 +34,8 @@ var EventTable = function EventTable(props) {
34
34
  _useContext$eventGrou = _useContext.eventGroupList,
35
35
  eventGroupList = _useContext$eventGrou === void 0 ? [] : _useContext$eventGrou,
36
36
  eventEnvList = _useContext.eventEnvList,
37
- userPropList = _useContext.userPropList;
37
+ userPropList = _useContext.userPropList,
38
+ authority = _useContext.authority;
38
39
  var _useContext2 = useContext(EventContext),
39
40
  onUserDrill = _useContext2.onUserDrill,
40
41
  _useContext2$defaultS = _useContext2.defaultSearch,
@@ -179,9 +180,9 @@ var EventTable = function EventTable(props) {
179
180
  className: classPrefix
180
181
  }, /*#__PURE__*/React.createElement("div", {
181
182
  className: "".concat(classPrefix, "-table-header")
182
- }, /*#__PURE__*/React.createElement("span", null, "\u6307\u6807\u8BE6\u60C5"), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
183
+ }, /*#__PURE__*/React.createElement("span", null, "\u6307\u6807\u8BE6\u60C5"), /*#__PURE__*/React.createElement("div", null, authority[100051] && /*#__PURE__*/React.createElement("div", {
183
184
  onClick: seeSql
184
- }, "\u67E5\u770BSQL"), /*#__PURE__*/React.createElement("div", {
185
+ }, "\u67E5\u770BSQL"), authority[100050] && /*#__PURE__*/React.createElement("div", {
185
186
  onClick: download
186
187
  }, /*#__PURE__*/React.createElement(IconFont, {
187
188
  type: "xiazai1"
@@ -34,7 +34,8 @@ var TopBar = function TopBar(props) {
34
34
  setShowScene = _useState4[1];
35
35
  var _useContext2 = useContext(BizGlobalDataContext),
36
36
  currentApp = _useContext2.currentApp,
37
- eventGroupList = _useContext2.eventGroupList;
37
+ eventGroupList = _useContext2.eventGroupList,
38
+ authority = _useContext2.authority;
38
39
  var searchData = props.searchData,
39
40
  showList = props.showList,
40
41
  platformChange = props.platformChange,
@@ -89,6 +90,7 @@ var TopBar = function TopBar(props) {
89
90
  }, !panelId && /*#__PURE__*/React.createElement("div", {
90
91
  className: "".concat(classPrefix, "-panel")
91
92
  }, /*#__PURE__*/React.createElement(Button, {
93
+ disabled: !authority[100049],
92
94
  onClick: function onClick() {
93
95
  setShowPanel(true);
94
96
  }
@@ -110,6 +112,7 @@ var TopBar = function TopBar(props) {
110
112
  })), enableAddScene && /*#__PURE__*/React.createElement("div", {
111
113
  className: "".concat(classPrefix, "-scene")
112
114
  }, /*#__PURE__*/React.createElement(Button, {
115
+ disabled: !authority[100048],
113
116
  onClick: function onClick() {
114
117
  setShowScene(true);
115
118
  }
@@ -25,7 +25,8 @@ var cancel;
25
25
  var classPrefix = 'event-content';
26
26
  var EventContent = function EventContent(props) {
27
27
  var _useContext = useContext(BizGlobalDataContext),
28
- currentApp = _useContext.currentApp;
28
+ currentApp = _useContext.currentApp,
29
+ authority = _useContext.authority;
29
30
  var _useContext2 = useContext(EventContext),
30
31
  searchData = _useContext2.searchData,
31
32
  setSearchData = _useContext2.setSearchData,
@@ -77,6 +78,10 @@ var EventContent = function EventContent(props) {
77
78
  handleSearch && handleSearch(loading);
78
79
  }, [loading]);
79
80
  var fetchRequest = function fetchRequest(flag) {
81
+ if (!authority[100047]) {
82
+ message.error('无查询权限');
83
+ return;
84
+ }
80
85
  if (JSON.stringify(searchData) === JSON.stringify(finalSearchData)) {
81
86
  return;
82
87
  }
@@ -11,63 +11,44 @@ import { requestConfig } from '../../../utils/ajaxConfig';
11
11
  import { Button } from 'antd';
12
12
  var defaultValue = {
13
13
  enlarged: 0,
14
- id: 2526,
14
+ id: 247162,
15
15
  isPerfect: 1,
16
- name: '事件分析',
16
+ name: '008',
17
17
  reqParam: {
18
18
  data: {
19
- app_id: 251,
19
+ appId: 461,
20
+ platform: 0,
20
21
  module: 'event',
22
+ userGroup: [0],
21
23
  time: {
22
- begin: '2023-09-16',
23
- end: '2023-09-23',
24
+ begin: '2023-10-05',
25
+ end: '2023-10-12',
24
26
  relative: [7, 0],
25
27
  unit: 'day'
26
28
  },
27
- analysisIndex: 'number',
28
- chartType: 'map',
29
- id: 16818,
30
- name: 'click',
31
- dimension: {
32
- propCategory: 'envProp',
33
- category: 'fixed',
34
- value: 'area',
35
- id: 0
36
- },
37
- userGroup: [0],
38
- appId: 251
29
+ chartType: 'line',
30
+ eventGroupId: 4339,
31
+ analysisIndex: 'number'
39
32
  },
40
- chosen_data: []
33
+ chosen_data: ['首页-点击即刻体验demo', '首页-点击免费试用', '智能辅助API调用事件']
41
34
  },
42
- type: 0,
43
- unExistEvent: '',
44
- renderType: 'normal',
45
- source: 'PANEL',
46
- panelId: 286,
47
- panelType: 'edit',
48
35
  data: {
49
- app_id: 251,
36
+ appId: 461,
37
+ platform: 0,
50
38
  module: 'event',
39
+ userGroup: [0],
51
40
  time: {
52
- begin: '2023-09-16',
53
- end: '2023-09-23',
54
- relative: [7, 0],
41
+ begin: '2023-10-05',
42
+ end: '2023-10-12',
43
+ relative: [14, 0],
55
44
  unit: 'day'
56
45
  },
57
- analysisIndex: 'number',
58
- chartType: 'map',
59
- id: 16818,
60
- name: 'click',
61
- dimension: {
62
- propCategory: 'envProp',
63
- category: 'fixed',
64
- value: 'area',
65
- id: 0
66
- },
67
- userGroup: [0],
68
- appId: 251
46
+ chartType: 'line',
47
+ eventGroupId: 4339,
48
+ analysisIndex: 'number'
69
49
  },
70
- chosen_data: []
50
+ type: 0,
51
+ unExistEvent: ''
71
52
  };
72
53
  export default (function () {
73
54
  var _useState = useState(false),
@@ -99,7 +80,7 @@ export default (function () {
99
80
  };
100
81
  return /*#__PURE__*/React.createElement(DemoWrapper, {
101
82
  needMeta: true,
102
- defaultApp: 251
83
+ defaultApp: 461
103
84
  }, isDetail ? /*#__PURE__*/React.createElement("div", null, JSON.stringify(detailParams), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement(Button, {
104
85
  onClick: function onClick() {
105
86
  return setIsDetail(false);
@@ -33,7 +33,6 @@ var TopPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
33
33
  form = _Form$useForm2[0];
34
34
  var userGroup = value.userGroup;
35
35
  var onValuesChange = function onValuesChange(data, allData) {
36
- console.log('用户组和事件变更', data, allData);
37
36
  var _data = {};
38
37
  if (allData.filterConditions) {
39
38
  if (allData.filterConditions.id !== -100) {
@@ -83,7 +82,8 @@ var TopPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
83
82
  id: value === null || value === void 0 ? void 0 : value.id,
84
83
  name: value === null || value === void 0 ? void 0 : value.name,
85
84
  dimension: value === null || value === void 0 ? void 0 : value.dimension,
86
- filters: value === null || value === void 0 ? void 0 : value.filters
85
+ filters: value === null || value === void 0 ? void 0 : value.filters,
86
+ eventGroupId: value === null || value === void 0 ? void 0 : value.eventGroupId
87
87
  }
88
88
  },
89
89
  scrollToFirstError: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zgfe/modules-event",
3
- "version": "0.1.5",
3
+ "version": "0.1.7-heyh.0",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",
@@ -49,7 +49,7 @@
49
49
  "react": "^16.12.0 || ^17.0.0",
50
50
  "yorkie": "^2.0.0"
51
51
  },
52
- "gitHead": "c27edbb2b887a38448c5f1cc16132ecb737c18ec",
52
+ "gitHead": "dd115ac77948bf3c8ef6bad69e2680d8b5cb2434",
53
53
  "dependencies": {
54
54
  "react-copy-to-clipboard": "^5.1.0",
55
55
  "react-highlight": "^0.15.0"