@zgfe/modules-dm 1.0.33 → 1.0.34-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.
Files changed (42) hide show
  1. package/es/components/demo.js +2 -1
  2. package/es/constants/api.d.ts +11 -0
  3. package/es/constants/api.js +27 -12
  4. package/es/modules/dataCollection/collectionAttributeList.js +52 -28
  5. package/es/modules/dataCollection/collectionEventList.js +51 -81
  6. package/es/modules/dataCollection/components/createVirtualDrawer.d.ts +4 -0
  7. package/es/modules/dataCollection/components/createVirtualDrawer.js +222 -0
  8. package/es/modules/dataCollection/components/eventFilter/index.d.ts +5 -0
  9. package/es/modules/dataCollection/components/eventFilter/index.js +145 -0
  10. package/es/modules/dataCollection/components/eventFilter/styles/index.less +64 -0
  11. package/es/modules/dataCollection/components/eventFilter/types.d.ts +51 -0
  12. package/es/modules/dataCollection/components/eventFilter/types.js +1 -0
  13. package/es/modules/dataCollection/components/eventGroupingDrawer.d.ts +4 -0
  14. package/es/modules/dataCollection/components/eventGroupingDrawer.js +375 -0
  15. package/es/modules/dataCollection/components/selectAttributes.d.ts +3 -0
  16. package/es/modules/dataCollection/components/selectAttributes.js +207 -0
  17. package/es/modules/dataCollection/components/sortableComponnet.d.ts +3 -0
  18. package/es/modules/dataCollection/components/sortableComponnet.js +101 -0
  19. package/es/modules/dataCollection/{tablePlus.d.ts → components/tablePlus.d.ts} +2 -1
  20. package/es/modules/dataCollection/{tablePlus.js → components/tablePlus.js} +148 -140
  21. package/es/modules/dataCollection/components/virtualTablePlus.d.ts +5 -0
  22. package/es/modules/dataCollection/components/virtualTablePlus.js +351 -0
  23. package/es/modules/dataCollection/index.js +8 -7
  24. package/es/modules/dataCollection/styles/index.less +341 -14
  25. package/es/modules/dataCollection/types.d.ts +75 -0
  26. package/es/modules/dataCollection/types.js +1 -0
  27. package/es/modules/dataCollection/virtualEventList.d.ts +4 -0
  28. package/es/modules/dataCollection/virtualEventList.js +335 -0
  29. package/es/modules/dataManage/demo/index.js +16 -12
  30. package/es/modules/dataPlan/addEventOrUser.js +1 -2
  31. package/es/modules/dataPlan/addPlan.js +3 -12
  32. package/es/modules/dataPlan/eventList.js +0 -1
  33. package/es/modules/dataPlan/index.js +8 -9
  34. package/es/modules/dataPlan/tablePlus.js +0 -1
  35. package/es/modules/dataPlan/userAttributeList.js +0 -1
  36. package/es/utils/index.d.ts +48 -0
  37. package/es/utils/index.js +247 -0
  38. package/package.json +6 -3
  39. package/es/modules/dataCollection/demo/index.d.ts +0 -2
  40. package/es/modules/dataCollection/demo/index.js +0 -7
  41. package/es/modules/dataPlan/demo/index.d.ts +0 -2
  42. package/es/modules/dataPlan/demo/index.js +0 -6
@@ -0,0 +1,101 @@
1
+ import { BizGlobalDataContext } from '@zgfe/business-lib';
2
+ import { Checkbox } from 'antd';
3
+ import request from '../../../utils/ajax';
4
+ import apis from '../../../constants/api';
5
+ import React, { useContext } from 'react';
6
+ import { getAppID, eventChecked } from '../../../utils';
7
+ import { arrayMoveImmutable } from 'array-move';
8
+ import _ from 'lodash';
9
+ import { SortableContainer, SortableElement } from 'react-sortable-hoc';
10
+ var SortableComponnet = function SortableComponnet(props) {
11
+ var classPrefix = 'sortable-componnet';
12
+ var _useContext = useContext(BizGlobalDataContext),
13
+ currentApp = _useContext.currentApp;
14
+ var componnetData = props.componnetData,
15
+ componnetIndex = props.componnetIndex,
16
+ groupId = props.groupId,
17
+ groupingData = props.groupingData,
18
+ setGroupingData = props.setGroupingData;
19
+ // 需要拖动的元素的容器
20
+ var SortableItem = SortableElement(function (data) {
21
+ var _data$value = data.value,
22
+ item = _data$value.item,
23
+ index = _data$value.index;
24
+ return /*#__PURE__*/React.createElement(Checkbox, {
25
+ className: "checkbox-item ".concat(item.event_hidden ? 'event-hidden' : '', " column-").concat(groupId),
26
+ checked: item.checked,
27
+ key: index,
28
+ onChange: function onChange() {
29
+ return onChangeItem(groupId, item.event_id);
30
+ }
31
+ }, item.alias_name ? item.alias_name : item.event_name);
32
+ });
33
+ // 不可拖动的元素(未分组数据)
34
+ var SortableItemNotDrag = function SortableItemNotDrag(data) {
35
+ var item = data.item,
36
+ index = data.index;
37
+ return /*#__PURE__*/React.createElement(Checkbox, {
38
+ className: "checkbox-item ".concat(item.event_hidden ? 'event-hidden' : '', " column-").concat(groupId),
39
+ checked: item.checked,
40
+ key: index,
41
+ onChange: function onChange() {
42
+ return onChangeItem(groupId, item.event_id);
43
+ }
44
+ }, item.alias_name ? item.alias_name : item.event_name);
45
+ };
46
+ // 整个元素排序的容器
47
+ var SortableList = SortableContainer(function () {
48
+ return /*#__PURE__*/React.createElement("div", {
49
+ key: componnetIndex
50
+ }, componnetData.map(function (item, index) {
51
+ if (groupId !== -1) {
52
+ return /*#__PURE__*/React.createElement(SortableItem, {
53
+ key: "item-".concat(index),
54
+ index: index,
55
+ value: {
56
+ item: item,
57
+ index: index
58
+ }
59
+ });
60
+ } else {
61
+ return SortableItemNotDrag({
62
+ item: item,
63
+ index: index
64
+ });
65
+ }
66
+ }));
67
+ });
68
+ var onChangeItem = function onChangeItem(groupId, eventId) {
69
+ setGroupingData(_.cloneDeep(eventChecked(groupId, eventId, groupingData)));
70
+ };
71
+ var onSortEnd = function onSortEnd(data) {
72
+ var oldIndex = data.oldIndex,
73
+ newIndex = data.newIndex;
74
+ var eventList = arrayMoveImmutable(componnetData, oldIndex, newIndex);
75
+ var ids = [];
76
+ eventList.map(function (item) {
77
+ ids.push(item.event_id);
78
+ });
79
+ groupingData.map(function (item) {
80
+ if (item.groupId === groupId) {
81
+ item.eventList = eventList;
82
+ }
83
+ });
84
+ setGroupingData(_.cloneDeep(groupingData));
85
+ request(apis.orderEvent, {
86
+ method: 'post',
87
+ data: {
88
+ appId: getAppID(currentApp),
89
+ groupId: groupId,
90
+ ids: ids.join(',')
91
+ }
92
+ }).then(function () {});
93
+ };
94
+ return /*#__PURE__*/React.createElement(SortableList, {
95
+ distance: 5,
96
+ axis: 'xy',
97
+ helperClass: "".concat(classPrefix, "-sortableList"),
98
+ onSortEnd: onSortEnd
99
+ });
100
+ };
101
+ export default SortableComponnet;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import './styles/index.less';
2
+ import '../styles/index.less';
3
3
  interface DataType {
4
4
  key: React.Key;
5
5
  groupId?: number;
@@ -15,6 +15,7 @@ interface DataType {
15
15
  is_delete: number;
16
16
  _groupId?: number;
17
17
  mark_type: number;
18
+ owner: string;
18
19
  }
19
20
  interface queryPlanType {
20
21
  unexpectedPropList: string[];
@@ -12,14 +12,13 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
12
12
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
13
  import { BizGlobalDataContext, IconFont } from '@zgfe/business-lib';
14
14
  import { Input, Table, Select, message, Modal, Popover, Checkbox } from 'antd';
15
- import request from '../../utils/ajax';
16
- import apis from '../../constants/api';
17
- var Option = Select.Option;
15
+ import request from '../../../utils/ajax';
16
+ import apis from '../../../constants/api';
18
17
  import React, { useEffect, useState, useContext } from 'react';
19
- import './styles/index.less';
18
+ import '../styles/index.less';
20
19
  import _ from 'lodash';
21
- import { getAppID, getTableScroll } from '../../utils';
22
- import { DmContext } from '../../store';
20
+ import { getAppID, getTableScroll } from '../../../utils';
21
+ import { DmContext } from '../../../store';
23
22
  var TablePlus = function TablePlus(props) {
24
23
  var classPrefix = 'table-plus';
25
24
  var tableHandleData = props.tableHandleData,
@@ -31,58 +30,64 @@ var TablePlus = function TablePlus(props) {
31
30
  authority = _useContext.authority;
32
31
  var _useContext2 = useContext(DmContext),
33
32
  state = _useContext2.state;
34
- // 别名foucs
35
- var _useState = useState(''),
36
- _useState2 = _slicedToArray(_useState, 2),
37
- aliasFocusData = _useState2[0],
38
- setAliasFocusData = _useState2[1];
39
- var aliasFocus = function aliasFocus(e) {
40
- setAliasFocusData(e.currentTarget.value);
33
+ // 表格class处理
34
+ var rowClassNameHandle = function rowClassNameHandle(record) {
35
+ if (record.groupId != undefined) {
36
+ return 'group-row';
37
+ } else {
38
+ var _queryPlanData$unexpe;
39
+ return (queryPlanData === null || queryPlanData === void 0 ? void 0 : (_queryPlanData$unexpe = queryPlanData.unexpectedEventList) === null || _queryPlanData$unexpe === void 0 ? void 0 : _queryPlanData$unexpe.indexOf(record.event_name)) != -1 && isOpen == 1 && record.owner != 'zg_abp' ? 'error-row' : '';
40
+ }
41
41
  };
42
- // 修改别名
43
- var aliasNameBlur = function aliasNameBlur(e, record) {
44
- var value = e.currentTarget.value;
45
- if (aliasFocusData == value) return; // 失焦判断,内容无修改不请求接口
42
+ // 修改事件别名
43
+ var _useState = useState(false),
44
+ _useState2 = _slicedToArray(_useState, 2),
45
+ aliasNameShow = _useState2[0],
46
+ setaliasNameShow = _useState2[1];
47
+ var _useState3 = useState(''),
48
+ _useState4 = _slicedToArray(_useState3, 2),
49
+ aliasNameInput = _useState4[0],
50
+ setAliasNameInput = _useState4[1];
51
+ var _useState5 = useState(-1),
52
+ _useState6 = _slicedToArray(_useState5, 2),
53
+ aliasNameId = _useState6[0],
54
+ setAliasNameId = _useState6[1];
55
+ // 修改事件别名
56
+ var aliasNameEdit = function aliasNameEdit() {
57
+ if (eventNameInput.length > 20) {
58
+ message.error('名称不可超过20字符');
59
+ return;
60
+ }
46
61
  request(apis.updateEventInfo, {
47
62
  method: 'post',
48
- params: {
49
- app_id: getAppID(currentApp),
50
- alias_name: value,
51
- event_id: record.event_id
63
+ data: {
64
+ appId: getAppID(currentApp),
65
+ aliasName: aliasNameInput,
66
+ eventId: aliasNameId
52
67
  }
53
68
  }).then(function (res) {
54
69
  if (res) {
55
70
  message.success('修改成功');
56
71
  props.Refresh();
57
- state.updateEventMetas && state.updateEventMetas(); // 更新store
58
72
  }
59
- }).catch(function (err) {}).finally(function () {
60
- setAliasFocusData('');
73
+ }).finally(function () {
74
+ setaliasNameShow(false);
61
75
  });
62
76
  };
63
- // 表格class处理
64
- var rowClassNameHandle = function rowClassNameHandle(record) {
65
- if (record.groupId != undefined) {
66
- return 'group-row';
67
- } else {
68
- var _queryPlanData$unexpe;
69
- return (queryPlanData === null || queryPlanData === void 0 ? void 0 : (_queryPlanData$unexpe = queryPlanData.unexpectedEventList) === null || _queryPlanData$unexpe === void 0 ? void 0 : _queryPlanData$unexpe.indexOf(record.event_name)) != -1 && isOpen == 1 && record.owner != 'zg_abp' ? 'error-row' : '';
70
- }
71
- };
72
77
  // 控制修改分组名弹框 显示隐藏
73
- var _useState3 = useState(false),
74
- _useState4 = _slicedToArray(_useState3, 2),
75
- eventNameShow = _useState4[0],
76
- setEventNameShow = _useState4[1];
77
- // 修改分组名数据
78
- var _useState5 = useState(''),
79
- _useState6 = _slicedToArray(_useState5, 2),
80
- eventNameInput = _useState6[0],
81
- setEventNameInput = _useState6[1];
82
- var _useState7 = useState({}),
78
+ var _useState7 = useState(false),
83
79
  _useState8 = _slicedToArray(_useState7, 2),
84
- eventNameData = _useState8[0],
85
- setEventNameData = _useState8[1];
80
+ eventNameShow = _useState8[0],
81
+ setEventNameShow = _useState8[1];
82
+ // 修改分组名数据
83
+ var _useState9 = useState(''),
84
+ _useState10 = _slicedToArray(_useState9, 2),
85
+ eventNameInput = _useState10[0],
86
+ setEventNameInput = _useState10[1];
87
+ var _useState11 = useState({}),
88
+ _useState12 = _slicedToArray(_useState11, 2),
89
+ eventNameData = _useState12[0],
90
+ setEventNameData = _useState12[1];
86
91
  // 修改分组名
87
92
  var eventNameEdit = function eventNameEdit() {
88
93
  if (eventNameInput.length > 20) {
@@ -101,10 +106,9 @@ var TablePlus = function TablePlus(props) {
101
106
  if (res.code == '00') {
102
107
  message.success('修改成功');
103
108
  props.Refresh();
109
+ setEventNameShow(false);
104
110
  state.updateEventMetas && state.updateEventMetas(); // 更新store
105
111
  }
106
- }).catch(function (err) {}).finally(function () {
107
- setEventNameShow(false);
108
112
  });
109
113
  };
110
114
  // 删除分组
@@ -133,32 +137,56 @@ var TablePlus = function TablePlus(props) {
133
137
  props.Refresh();
134
138
  state.updateEventMetas && state.updateEventMetas(); // 更新store
135
139
  }
136
- }).catch(function (err) {}).finally(function () {});
140
+ });
137
141
  }
138
142
  });
139
143
  };
140
144
  // 删除事件
141
- var eventItemDel = function eventItemDel(event_id) {
145
+ var eventItemDel = function eventItemDel(record) {
146
+ if (record.owner !== 'zg_abp') {
147
+ if (record.owner === 'zg') {
148
+ request(apis.checkEventStatus, {
149
+ method: 'get',
150
+ params: {
151
+ appId: getAppID(currentApp),
152
+ eventId: record.event_id
153
+ }
154
+ }).then(function (res) {
155
+ // 该事件在虚拟事件中有使用
156
+ if (res.data === 1) {
157
+ eventDelModal(record.event_id, '检测到该事件在虚拟事件中使用');
158
+ } else {
159
+ eventDelModal(record.event_id, '删除后,将停止采集该事件数据,也将不在分析平台中显示!');
160
+ }
161
+ });
162
+ } else {
163
+ eventDelModal(record.event_id, '删除后,将停止采集该事件数据,也将不在分析平台中显示!');
164
+ }
165
+ } else {
166
+ message.error('内置事件无法删除');
167
+ }
168
+ };
169
+ var eventDelModal = function eventDelModal(eventId, text) {
142
170
  Modal.confirm({
143
171
  centered: true,
144
172
  title: '是否确认删除?',
145
- content: '删除后,将停止采集该事件数据,也将不在分析平台中显示!',
173
+ content: text,
146
174
  okText: '确认',
147
175
  cancelText: '取消',
148
176
  maskClosable: false,
149
177
  onOk: function onOk() {
150
178
  request(apis.deleteEventMeta, {
151
179
  method: 'post',
152
- params: {
153
- app_id: getAppID(currentApp),
154
- event_id: event_id
180
+ data: {
181
+ appId: getAppID(currentApp),
182
+ eventId: eventId
155
183
  }
156
184
  }).then(function (res) {
157
185
  if (res) {
158
186
  message.success('删除成功');
159
187
  props.Refresh();
160
188
  }
161
- }).catch(function (err) {}).finally(function () {});
189
+ });
162
190
  }
163
191
  });
164
192
  };
@@ -173,26 +201,26 @@ var TablePlus = function TablePlus(props) {
173
201
  break;
174
202
  case 'is_stop':
175
203
  _temp = {
176
- is_stop: e
204
+ isStop: e
177
205
  };
178
206
  break;
179
207
  case 'mark_type':
180
208
  _temp = {
181
- mark_type: e == null ? 1 : 0
209
+ markType: e == null ? 1 : 0
182
210
  };
183
211
  break;
184
212
  }
185
213
  request(apis.updateEventInfo, {
186
214
  method: 'post',
187
215
  params: _objectSpread({
188
- app_id: getAppID(currentApp),
189
- event_id: record.event_id
216
+ appId: getAppID(currentApp),
217
+ eventId: record.event_id
190
218
  }, _temp)
191
- }).then(function (res) {
219
+ }).then(function () {
192
220
  message.success('修改成功');
193
221
  props.Refresh();
194
222
  state.updateEventMetas && state.updateEventMetas(); // 更新store
195
- }).catch(function (err) {}).finally(function () {});
223
+ });
196
224
  };
197
225
  // 复制事件名称
198
226
  var copyEventName = function copyEventName(event_name) {
@@ -211,17 +239,16 @@ var TablePlus = function TablePlus(props) {
211
239
  }
212
240
  };
213
241
  // 手否筛选收藏
214
- var _useState9 = useState(false),
215
- _useState10 = _slicedToArray(_useState9, 2),
216
- markActive = _useState10[0],
217
- setMarkActive = _useState10[1];
242
+ var _useState13 = useState(false),
243
+ _useState14 = _slicedToArray(_useState13, 2),
244
+ markActive = _useState14[0],
245
+ setMarkActive = _useState14[1];
218
246
  // 分组操作-勾选数据
219
- var _useState11 = useState({}),
220
- _useState12 = _slicedToArray(_useState11, 2),
221
- groupCheckedData = _useState12[0],
222
- setGroupCheckedData = _useState12[1];
247
+ var _useState15 = useState({}),
248
+ _useState16 = _slicedToArray(_useState15, 2),
249
+ groupCheckedData = _useState16[0],
250
+ setGroupCheckedData = _useState16[1];
223
251
  var eventItemCheckbox = function eventItemCheckbox(e, data) {
224
- // console.log(e.target.checked, data._groupId, data.event_id);
225
252
  var _groupCheckedData = _.cloneDeep(groupCheckedData);
226
253
  if (e.target.checked) {
227
254
  _groupCheckedData[data._groupId] == undefined ? _groupCheckedData[data._groupId] = [] : null;
@@ -233,12 +260,8 @@ var TablePlus = function TablePlus(props) {
233
260
  }
234
261
  setGroupCheckedData(_groupCheckedData);
235
262
  };
236
- // useEffect(() => {
237
- // console.log('groupCheckedData', groupCheckedData);
238
- // }, [groupCheckedData]);
239
263
  // 判断每一行的选中
240
264
  var checkedItemHandle = function checkedItemHandle(record) {
241
- // console.log(record.event_id, record._groupId, groupCheckedData);
242
265
  if (Object.keys(groupCheckedData).length <= 0) {
243
266
  return false;
244
267
  } else {
@@ -247,7 +270,6 @@ var TablePlus = function TablePlus(props) {
247
270
  };
248
271
  // 移入到组、移出分组、复制到组
249
272
  var groupHandle = function groupHandle(type, data, eventGroupId) {
250
- // console.log('type', type, eventGroupId, data.groupId);
251
273
  var _temp = {};
252
274
  if (eventGroupId != undefined) _temp = {
253
275
  eventGroupId: eventGroupId
@@ -271,7 +293,7 @@ var TablePlus = function TablePlus(props) {
271
293
  setGroupCheckedData({});
272
294
  state.updateEventMetas && state.updateEventMetas(); // 更新store
273
295
  }
274
- }).catch(function (err) {}).finally(function () {
296
+ }).finally(function () {
275
297
  props.Refresh();
276
298
  });
277
299
  };
@@ -308,7 +330,7 @@ var TablePlus = function TablePlus(props) {
308
330
  key: 'event_name',
309
331
  fixed: 'left',
310
332
  width: 180,
311
- render: function render(text, record, index) {
333
+ render: function render(text, record) {
312
334
  if (record.groupId) {
313
335
  var _groupCheckedData$rec;
314
336
  return /*#__PURE__*/React.createElement("div", {
@@ -377,46 +399,34 @@ var TablePlus = function TablePlus(props) {
377
399
  dataIndex: 'alias_name',
378
400
  key: 'alias_name',
379
401
  width: 167,
380
- render: function render(text, record, index) {
381
- if (!record.alias_name) {
382
- return /*#__PURE__*/React.createElement(Input, {
383
- className: "alias_name",
384
- placeholder: "\u7F16\u8F91\u522B\u540D",
385
- disabled: isDemo,
386
- defaultValue: record.alias_name,
387
- onFocus: aliasFocus,
388
- onBlur: function onBlur(e) {
389
- aliasNameBlur(e, record);
390
- }
391
- });
392
- } else {
393
- return /*#__PURE__*/React.createElement(Popover, {
394
- content: /*#__PURE__*/React.createElement("div", {
395
- style: {
396
- width: '200px',
397
- wordBreak: 'break-all'
398
- }
399
- }, record.alias_name),
400
- trigger: "hover",
401
- placement: "top"
402
- }, /*#__PURE__*/React.createElement(Input, {
403
- className: "alias_name",
404
- placeholder: "\u7F16\u8F91\u522B\u540D",
405
- disabled: isDemo,
406
- defaultValue: record.alias_name,
407
- onFocus: aliasFocus,
408
- onBlur: function onBlur(e) {
409
- aliasNameBlur(e, record);
402
+ render: function render(_, record) {
403
+ return /*#__PURE__*/React.createElement("div", {
404
+ className: "alias_name"
405
+ }, /*#__PURE__*/React.createElement(Popover, {
406
+ content: /*#__PURE__*/React.createElement("div", {
407
+ style: {
408
+ width: '200px',
409
+ wordBreak: 'break-all'
410
410
  }
411
- }));
412
- }
411
+ }, record.alias_name),
412
+ trigger: "hover",
413
+ placement: "top"
414
+ }, /*#__PURE__*/React.createElement("div", null, record.alias_name)), /*#__PURE__*/React.createElement(IconFont, {
415
+ className: "edit-alias-name",
416
+ onClick: function onClick() {
417
+ setAliasNameInput(record.alias_name);
418
+ setAliasNameId(record.event_id);
419
+ setaliasNameShow(true);
420
+ },
421
+ type: "zhongmingming"
422
+ }));
413
423
  }
414
424
  }, {
415
425
  title: '首次上报时间',
416
426
  dataIndex: 'insert_time',
417
427
  key: 'insert_time',
418
428
  width: 187,
419
- render: function render(text, record, index) {
429
+ render: function render(text) {
420
430
  return /*#__PURE__*/React.createElement("div", {
421
431
  className: "insert_time"
422
432
  }, text);
@@ -426,7 +436,7 @@ var TablePlus = function TablePlus(props) {
426
436
  dataIndex: 'last_insert_time',
427
437
  key: 'last_insert_time',
428
438
  width: 187,
429
- render: function render(text, record, index) {
439
+ render: function render(_, record) {
430
440
  return /*#__PURE__*/React.createElement("div", null, record.last_insert_time);
431
441
  }
432
442
  }, {
@@ -454,7 +464,7 @@ var TablePlus = function TablePlus(props) {
454
464
  dataIndex: 'event_hidden',
455
465
  key: 'event_hidden',
456
466
  width: 167,
457
- render: function render(text, record, index) {
467
+ render: function render(_, record) {
458
468
  return /*#__PURE__*/React.createElement(Select, {
459
469
  defaultValue: record.event_hidden,
460
470
  style: {
@@ -499,7 +509,7 @@ var TablePlus = function TablePlus(props) {
499
509
  dataIndex: 'is_stop',
500
510
  key: 'is_stop',
501
511
  width: 167,
502
- render: function render(text, record, index) {
512
+ render: function render(_, record) {
503
513
  return /*#__PURE__*/React.createElement(Select, {
504
514
  defaultValue: record.is_stop,
505
515
  style: {
@@ -523,7 +533,7 @@ var TablePlus = function TablePlus(props) {
523
533
  dataIndex: 'event_attrs',
524
534
  key: 'event_attrs',
525
535
  width: 167,
526
- render: function render(text, record, index) {
536
+ render: function render(_, record) {
527
537
  return /*#__PURE__*/React.createElement("div", {
528
538
  className: "event_attrs"
529
539
  }, record.event_attrs.length, /*#__PURE__*/React.createElement(IconFont, {
@@ -541,9 +551,9 @@ var TablePlus = function TablePlus(props) {
541
551
  title: '操作',
542
552
  dataIndex: 'set',
543
553
  key: 'set',
544
- width: 80,
554
+ width: 110,
545
555
  fixed: 'right',
546
- render: function render(text, record, index) {
556
+ render: function render(_, record) {
547
557
  if (record.groupId) {
548
558
  if (record.groupId == -1) return '';
549
559
  return /*#__PURE__*/React.createElement("div", {
@@ -580,35 +590,16 @@ var TablePlus = function TablePlus(props) {
580
590
  message.error('无修改权限');
581
591
  return;
582
592
  }
583
- record.owner != 'zg_abp' ? eventItemDel(record.event_id) : message.error('内置事件无法删除');
593
+ eventItemDel(record);
584
594
  }
585
595
  }, "\u5220\u9664");
586
596
  }
587
597
  }
588
598
  }];
589
- // const [isMore, setIsMore] = useState(true); // 是否还有数据
590
- // const [pageNumber, setPageNumber] = useState(1); // 页码
591
- // let scrollRef: any;
592
- // const onScrollCapture = (e:any) => {
593
- // // scrollTop会有小数点导致等式不成立,解决方案:四舍五入
594
- // if (
595
- // Math.round(scrollRef.scrollTop) + scrollRef.clientHeight == scrollRef.scrollHeight
596
- // ) {
597
- // if (Math.ceil(props.total / 10) == pageNumber) {
598
- // setIsMore(false);
599
- // return false;
600
- // }
601
- // // getList(page + 1);
602
- // setPageNumber(pageNumber + 1);
603
- // }
604
- // };
605
- // useEffect(() => {
606
- // pageNumber != 1 && props.pageSizeChange(pageNumber);
607
- // }, [pageNumber]);
608
- var _useState13 = useState(''),
609
- _useState14 = _slicedToArray(_useState13, 2),
610
- scrollY = _useState14[0],
611
- setScrollY = _useState14[1];
599
+ var _useState17 = useState(''),
600
+ _useState18 = _slicedToArray(_useState17, 2),
601
+ scrollY = _useState18[0],
602
+ setScrollY = _useState18[1];
612
603
  //页面加载完成后才能获取到对应的元素及其位置
613
604
  useEffect(function () {
614
605
  var _Y = getTableScroll(102);
@@ -620,7 +611,6 @@ var TablePlus = function TablePlus(props) {
620
611
  }, /*#__PURE__*/React.createElement(Table, {
621
612
  className: "".concat(classPrefix, "-table"),
622
613
  id: "tablePlus",
623
- // style={{ minHeight: '640px' }}
624
614
  columns: columns,
625
615
  rowKey: "key",
626
616
  loading: props.loading,
@@ -652,6 +642,24 @@ var TablePlus = function TablePlus(props) {
652
642
  onChange: function onChange(e) {
653
643
  return setEventNameInput(e.currentTarget.value);
654
644
  }
645
+ })), /*#__PURE__*/React.createElement(Modal, {
646
+ title: "\u4FEE\u6539\u4E8B\u4EF6\u522B\u540D",
647
+ bodyStyle: {
648
+ padding: '0 24px 24px 24px'
649
+ },
650
+ destroyOnClose: true,
651
+ open: aliasNameShow,
652
+ getContainer: false,
653
+ onOk: aliasNameEdit,
654
+ onCancel: function onCancel() {
655
+ return setaliasNameShow(false);
656
+ }
657
+ }, /*#__PURE__*/React.createElement(Input, {
658
+ placeholder: "\u8BF7\u8F93\u5165\u4E8B\u4EF6\u522B\u540D",
659
+ value: aliasNameInput,
660
+ onChange: function onChange(e) {
661
+ return setAliasNameInput(e.currentTarget.value);
662
+ }
655
663
  })));
656
664
  };
657
665
  export default TablePlus;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import '../styles/index.less';
3
+ import { TablePlusType } from '../types';
4
+ declare const VirtualTablePlus: React.FC<TablePlusType>;
5
+ export default VirtualTablePlus;