@zgfe/modules-dm 1.0.31 → 1.0.34-heyh.10
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 +2 -1
- package/es/constants/api.d.ts +11 -0
- package/es/constants/api.js +27 -12
- package/es/modules/dataCollection/collectionAttributeList.js +51 -26
- package/es/modules/dataCollection/collectionEventList.js +54 -83
- package/es/modules/dataCollection/components/createVirtualDrawer.d.ts +4 -0
- package/es/modules/dataCollection/components/createVirtualDrawer.js +227 -0
- package/es/modules/dataCollection/components/eventFilter/index.d.ts +5 -0
- package/es/modules/dataCollection/components/eventFilter/index.js +145 -0
- package/es/modules/dataCollection/components/eventFilter/styles/index.less +64 -0
- package/es/modules/dataCollection/components/eventFilter/types.d.ts +51 -0
- package/es/modules/dataCollection/components/eventFilter/types.js +1 -0
- package/es/modules/dataCollection/components/eventGroupingDrawer.d.ts +4 -0
- package/es/modules/dataCollection/components/eventGroupingDrawer.js +385 -0
- package/es/modules/dataCollection/components/selectAttributes.d.ts +3 -0
- package/es/modules/dataCollection/components/selectAttributes.js +210 -0
- package/es/modules/dataCollection/components/sortableComponnet.d.ts +3 -0
- package/es/modules/dataCollection/components/sortableComponnet.js +109 -0
- package/es/modules/dataCollection/{tablePlus.d.ts → components/tablePlus.d.ts} +2 -1
- package/es/modules/dataCollection/{tablePlus.js → components/tablePlus.js} +162 -147
- package/es/modules/dataCollection/components/virtualTablePlus.d.ts +5 -0
- package/es/modules/dataCollection/components/virtualTablePlus.js +383 -0
- package/es/modules/dataCollection/index.js +10 -9
- package/es/modules/dataCollection/styles/index.less +381 -18
- package/es/modules/dataCollection/types.d.ts +76 -0
- package/es/modules/dataCollection/types.js +1 -0
- package/es/modules/dataCollection/virtualEventList.d.ts +4 -0
- package/es/modules/dataCollection/virtualEventList.js +337 -0
- package/es/modules/dataManage/demo/index.js +16 -12
- package/es/modules/dataManage/index.js +4 -4
- package/es/modules/dataPlan/addEventOrUser.js +1 -2
- package/es/modules/dataPlan/addPlan.js +3 -12
- package/es/modules/dataPlan/eventList.js +0 -1
- package/es/modules/dataPlan/index.js +15 -15
- package/es/modules/dataPlan/tablePlus.js +0 -1
- package/es/modules/dataPlan/userAttributeList.js +0 -1
- package/es/utils/index.d.ts +48 -0
- package/es/utils/index.js +247 -0
- package/package.json +7 -4
- package/es/modules/dataCollection/demo/index.d.ts +0 -2
- package/es/modules/dataCollection/demo/index.js +0 -7
- package/es/modules/dataPlan/demo/index.d.ts +0 -2
- package/es/modules/dataPlan/demo/index.js +0 -6
package/es/components/demo.js
CHANGED
package/es/constants/api.d.ts
CHANGED
|
@@ -24,5 +24,16 @@ declare let apis: {
|
|
|
24
24
|
queryControlSwitch: string;
|
|
25
25
|
updateControlSwitch: string;
|
|
26
26
|
exportPlanTmp: string;
|
|
27
|
+
exportAliasTmp: string;
|
|
28
|
+
addVirtualEvent: string;
|
|
29
|
+
delVirtualEvent: string;
|
|
30
|
+
updateVirtualEvent: string;
|
|
31
|
+
queryVirtualEvent: string;
|
|
32
|
+
queryVirtualEventList: string;
|
|
33
|
+
orderEventGroup: string;
|
|
34
|
+
orderEvent: string;
|
|
35
|
+
hiddenEvent: string;
|
|
36
|
+
checkEventStatus: string;
|
|
37
|
+
updateVirtualEventStatus: string;
|
|
27
38
|
};
|
|
28
39
|
export default apis;
|
package/es/constants/api.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
var apis = {
|
|
2
2
|
// 埋点管理 - 事件列表
|
|
3
3
|
queryCollectionEventList: '/zg/web/v2/data/queryEventMetasOfGroup',
|
|
4
|
-
// 埋点管理 - 事件列表 - 修改别名 | 修改显示状态 | 修改采集状态
|
|
5
|
-
updateEventInfo: '/
|
|
4
|
+
// 埋点管理 - 事件列表 - 修改别名 | 修改显示状态 | 修改采集状态 | 修改收藏状态
|
|
5
|
+
updateEventInfo: '/zg/web/v2/event/updateEventInfo',
|
|
6
6
|
// 埋点管理 - 事件列表 - 创建分组 | 修改分组
|
|
7
7
|
upsertEventGroup: '/zg/web/v2/event/eventGroup/upsertEventGroup',
|
|
8
8
|
// 埋点管理 - 事件列表 - 删除分组
|
|
9
9
|
deleteEventGroup: '/zg/web/v2/event/eventGroup/deleteEventGroup',
|
|
10
10
|
// 埋点管理 - 事件列表 - 删除事件
|
|
11
|
-
deleteEventMeta: '/
|
|
11
|
+
deleteEventMeta: '/zg/web/v2/event/deleteEventMeta',
|
|
12
12
|
// 埋点管理 - 修改事件属性值状态
|
|
13
|
-
updateEventAttr: '/
|
|
13
|
+
updateEventAttr: '/zg/web/v2/event/updateEventAttr',
|
|
14
14
|
// 埋点管理 - 移入到组、移出分组、复制到组
|
|
15
15
|
operateGroupRelations: '/zg/web/v2/event/eventGroup/operateGroupRelations',
|
|
16
16
|
// 用户属性列表 - 获取用户信息
|
|
@@ -48,13 +48,28 @@ var apis = {
|
|
|
48
48
|
// 更新 埋点方案控制开关状态
|
|
49
49
|
updateControlSwitch: '/zg/web/v2/managementPlan/updateControlSwitch',
|
|
50
50
|
// 导出方案模板
|
|
51
|
-
exportPlanTmp: '/zg/web/v2/managementPlan/downloadPlanTemplate'
|
|
51
|
+
exportPlanTmp: '/zg/web/v2/managementPlan/downloadPlanTemplate',
|
|
52
|
+
// 导出别名模板
|
|
53
|
+
exportAliasTmp: '/zg/web/v2/utm/template',
|
|
54
|
+
// 创建虚拟事件.
|
|
55
|
+
addVirtualEvent: '/zg/web/v2/event/virtual/addVirtualEvent',
|
|
56
|
+
// 删除虚拟事件.
|
|
57
|
+
delVirtualEvent: '/zg/web/v2/event/virtual/delVirtualEvent',
|
|
58
|
+
// 修改虚拟事件.
|
|
59
|
+
updateVirtualEvent: '/zg/web/v2/event/virtual/updateVirtualEvent',
|
|
60
|
+
// 查看虚拟事件详情
|
|
61
|
+
queryVirtualEvent: '/zg/web/v2/event/virtual/queryVirtualEvent',
|
|
62
|
+
// 查看虚拟事件列表.
|
|
63
|
+
queryVirtualEventList: '/zg/web/v2/event/virtual/queryVirtualEventList',
|
|
64
|
+
// 新增事件组排序.
|
|
65
|
+
orderEventGroup: '/zg/web/v2/event/eventGroup/orderEventGroup',
|
|
66
|
+
// 新增事件排序.
|
|
67
|
+
orderEvent: '/zg/web/v2/event/orderEvent',
|
|
68
|
+
// 新增批量隐藏事件.
|
|
69
|
+
hiddenEvent: '/zg/web/v2/event/hiddenEvent',
|
|
70
|
+
// 删除埋点事件返回是否在虚拟事件中使用.
|
|
71
|
+
checkEventStatus: '/zg/web/v2/event/checkEventStatus',
|
|
72
|
+
// 收藏虚拟事件.
|
|
73
|
+
updateVirtualEventStatus: '/zg/web/v2/event/virtual/updateVirtualEventStatus'
|
|
52
74
|
};
|
|
53
|
-
// for (const api in apis) {
|
|
54
|
-
// if (api != 'propUpload') {
|
|
55
|
-
// (apis as { [prop: string]: string })[api] = `/analysis/api/${
|
|
56
|
-
// (apis as { [prop: string]: string })[api]
|
|
57
|
-
// }`;
|
|
58
|
-
// }
|
|
59
|
-
// }
|
|
60
75
|
export default apis;
|
|
@@ -10,7 +10,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
10
10
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
11
11
|
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
12
12
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
|
-
import { BizGlobalDataContext, IconFont } from '@zgfe/business-lib';
|
|
13
|
+
import { BizGlobalDataContext, IconFont, ajax } from '@zgfe/business-lib';
|
|
14
14
|
import { Input, Button, Select, Table, message, Modal, Upload, Popover } from 'antd';
|
|
15
15
|
import React, { useEffect, useState, useContext } from 'react';
|
|
16
16
|
import './styles/index.less';
|
|
@@ -84,10 +84,9 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
84
84
|
});
|
|
85
85
|
setUserAttrData(afterData);
|
|
86
86
|
setLoading(false);
|
|
87
|
-
})
|
|
87
|
+
});
|
|
88
88
|
};
|
|
89
89
|
useEffect(function () {
|
|
90
|
-
// console.log('eventAttrsData', eventAttrsData);
|
|
91
90
|
if (source == 'user') {
|
|
92
91
|
queryUserPropMeta();
|
|
93
92
|
} else {
|
|
@@ -126,25 +125,38 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
126
125
|
};
|
|
127
126
|
// 修改属性
|
|
128
127
|
var attrChangeHandle = function attrChangeHandle(value, record, type) {
|
|
129
|
-
var _params;
|
|
130
128
|
if (aliasFocusData == value && type == 'alias_name') return; // 失焦判断,内容无修改不请求接口
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
if (
|
|
141
|
-
|
|
142
|
-
} else {
|
|
129
|
+
if (source == 'event') {
|
|
130
|
+
var _data;
|
|
131
|
+
request(apis.updateEventAttr, {
|
|
132
|
+
method: 'post',
|
|
133
|
+
data: (_data = {
|
|
134
|
+
appId: getAppID(currentApp),
|
|
135
|
+
attrId: record.attr_id
|
|
136
|
+
}, _defineProperty(_data, type, value), _defineProperty(_data, "eventId", eventAttrsData === null || eventAttrsData === void 0 ? void 0 : eventAttrsData.event_id), _data)
|
|
137
|
+
}).then(function (res) {
|
|
138
|
+
if (res) {
|
|
139
|
+
message.success('修改成功');
|
|
143
140
|
props.Refresh();
|
|
141
|
+
state.updateEventMetas && state.updateEventMetas(); // 更新store
|
|
144
142
|
}
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
143
|
+
});
|
|
144
|
+
} else {
|
|
145
|
+
var _params;
|
|
146
|
+
request(apis.updateUserAttr, {
|
|
147
|
+
method: 'post',
|
|
148
|
+
params: (_params = {
|
|
149
|
+
app_id: getAppID(currentApp),
|
|
150
|
+
attr_id: record.id
|
|
151
|
+
}, _defineProperty(_params, type, value), _defineProperty(_params, "event_id", null), _params)
|
|
152
|
+
}).then(function (res) {
|
|
153
|
+
if (res) {
|
|
154
|
+
message.success('修改成功');
|
|
155
|
+
queryUserPropMeta();
|
|
156
|
+
state.updateEventMetas && state.updateEventMetas(); // 更新store
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
}
|
|
148
160
|
};
|
|
149
161
|
// 表格列
|
|
150
162
|
var columns = [{
|
|
@@ -339,6 +351,10 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
339
351
|
_useState16 = _slicedToArray(_useState15, 2),
|
|
340
352
|
batchId = _useState16[0],
|
|
341
353
|
setBatchId = _useState16[1];
|
|
354
|
+
var _useState17 = useState(false),
|
|
355
|
+
_useState18 = _slicedToArray(_useState17, 2),
|
|
356
|
+
exportAliasTmp = _useState18[0],
|
|
357
|
+
setExportAliasTmp = _useState18[1];
|
|
342
358
|
var uploadProps = {
|
|
343
359
|
maxCount: 1,
|
|
344
360
|
showUploadList: false,
|
|
@@ -363,15 +379,15 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
363
379
|
} else {
|
|
364
380
|
message.error(res.msg);
|
|
365
381
|
}
|
|
366
|
-
})
|
|
382
|
+
});
|
|
367
383
|
return false;
|
|
368
384
|
}
|
|
369
385
|
};
|
|
370
386
|
// 清空属性值别名excel数据
|
|
371
|
-
var
|
|
372
|
-
|
|
373
|
-
clearFlag =
|
|
374
|
-
setClearFlag =
|
|
387
|
+
var _useState19 = useState(false),
|
|
388
|
+
_useState20 = _slicedToArray(_useState19, 2),
|
|
389
|
+
clearFlag = _useState20[0],
|
|
390
|
+
setClearFlag = _useState20[1];
|
|
375
391
|
var clearData = function clearData() {
|
|
376
392
|
setAttrExcelData([]);
|
|
377
393
|
setClearFlag(true);
|
|
@@ -394,7 +410,7 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
394
410
|
message.success('操作成功');
|
|
395
411
|
closeHandle();
|
|
396
412
|
}
|
|
397
|
-
})
|
|
413
|
+
});
|
|
398
414
|
};
|
|
399
415
|
// 获取已设置的属性值别名列表
|
|
400
416
|
var getAttrAliasList = function getAttrAliasList() {
|
|
@@ -454,12 +470,21 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
454
470
|
type: "daochu1"
|
|
455
471
|
})
|
|
456
472
|
}, "\u4E0A\u4F20 excel \u6587\u4EF6")), /*#__PURE__*/React.createElement(Button, {
|
|
473
|
+
loading: exportAliasTmp,
|
|
457
474
|
icon: /*#__PURE__*/React.createElement(IconFont, {
|
|
458
475
|
type: "xiazai1"
|
|
459
476
|
}),
|
|
460
477
|
size: "small",
|
|
461
478
|
onClick: function onClick() {
|
|
462
|
-
|
|
479
|
+
setExportAliasTmp(true);
|
|
480
|
+
ajax(apis.exportAliasTmp, {
|
|
481
|
+
method: 'get',
|
|
482
|
+
responseType: 'blob',
|
|
483
|
+
fileName: "".concat(source == 'user' ? '用户' : '事件', "\u5C5E\u6027\u503C\u6A21\u677F"),
|
|
484
|
+
getResponse: true
|
|
485
|
+
}).finally(function () {
|
|
486
|
+
setExportAliasTmp(false);
|
|
487
|
+
});
|
|
463
488
|
}
|
|
464
489
|
}, "\u6A21\u677F\u4E0B\u8F7D")), attrExcelData.length > 0 && /*#__PURE__*/React.createElement("div", {
|
|
465
490
|
className: "clearData",
|
|
@@ -14,47 +14,48 @@ import request from '../../utils/ajax';
|
|
|
14
14
|
import apis from '../../constants/api';
|
|
15
15
|
import React, { useEffect, useState, useContext } from 'react';
|
|
16
16
|
import './styles/index.less';
|
|
17
|
-
import TablePlus from './tablePlus';
|
|
17
|
+
import TablePlus from './components/tablePlus';
|
|
18
18
|
import _ from 'lodash';
|
|
19
19
|
import { getAppID } from '../../utils';
|
|
20
20
|
import CollectionAttributeList from './collectionAttributeList';
|
|
21
|
+
import EventGroupingDrawer from './components/eventGroupingDrawer';
|
|
21
22
|
import { DmContext } from '../../store';
|
|
22
23
|
var CollectionEventList = function CollectionEventList(props) {
|
|
23
24
|
var classPrefix = 'event-list';
|
|
24
25
|
var _useContext = useContext(BizGlobalDataContext),
|
|
25
26
|
currentApp = _useContext.currentApp,
|
|
26
|
-
|
|
27
|
+
authority = _useContext.authority;
|
|
27
28
|
var _useContext2 = useContext(DmContext),
|
|
28
29
|
state = _useContext2.state;
|
|
29
|
-
// const { updateEventMetas } = props;
|
|
30
30
|
var _useState = useState(0),
|
|
31
31
|
_useState2 = _slicedToArray(_useState, 2),
|
|
32
32
|
total = _useState2[0],
|
|
33
33
|
setTotal = _useState2[1];
|
|
34
|
-
var _useState3 = useState(0),
|
|
35
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
36
|
-
totalBasics = _useState4[0],
|
|
37
|
-
setTotalBasics = _useState4[1];
|
|
38
34
|
// 加载中
|
|
39
|
-
var
|
|
40
|
-
|
|
41
|
-
loading =
|
|
42
|
-
setLoading =
|
|
35
|
+
var _useState3 = useState(true),
|
|
36
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
37
|
+
loading = _useState4[0],
|
|
38
|
+
setLoading = _useState4[1];
|
|
43
39
|
// 渲染数据
|
|
40
|
+
var _useState5 = useState([]),
|
|
41
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
42
|
+
tableHandleData = _useState6[0],
|
|
43
|
+
setTableHandleData = _useState6[1];
|
|
44
|
+
// 原数据
|
|
44
45
|
var _useState7 = useState([]),
|
|
45
46
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
//
|
|
47
|
+
tableHandleDataBasics = _useState8[0],
|
|
48
|
+
setTableHandleDataBasics = _useState8[1];
|
|
49
|
+
// 分组select数据
|
|
49
50
|
var _useState9 = useState([]),
|
|
50
51
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
//
|
|
54
|
-
var _useState11 = useState(
|
|
52
|
+
groupOptions = _useState10[0],
|
|
53
|
+
setgroupOptions = _useState10[1];
|
|
54
|
+
// 事件分组管理
|
|
55
|
+
var _useState11 = useState(false),
|
|
55
56
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
56
|
-
|
|
57
|
-
|
|
57
|
+
eventGroupingShow = _useState12[0],
|
|
58
|
+
setEventGroupingShow = _useState12[1];
|
|
58
59
|
// 分组元素有任意一个收藏,筛选收藏时保留分组标题
|
|
59
60
|
var markTypeHandle = function markTypeHandle(item) {
|
|
60
61
|
var _markTypeFlag = 0;
|
|
@@ -84,6 +85,7 @@ var CollectionEventList = function CollectionEventList(props) {
|
|
|
84
85
|
event_attrs: [],
|
|
85
86
|
event_id: index,
|
|
86
87
|
is_delete: 0,
|
|
88
|
+
owner: '',
|
|
87
89
|
mark_type: markTypeHandle(item)
|
|
88
90
|
});
|
|
89
91
|
_tempGroupOptions.push({
|
|
@@ -91,16 +93,17 @@ var CollectionEventList = function CollectionEventList(props) {
|
|
|
91
93
|
label: item.groupName == null ? '未分组' : item.groupName
|
|
92
94
|
});
|
|
93
95
|
item.eventList.map(function (_item, _index) {
|
|
94
|
-
_item.
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
96
|
+
if (_item.owner !== 'zg_vtl') {
|
|
97
|
+
_item._groupId = item.groupId;
|
|
98
|
+
_item.key = index + '-' + _index;
|
|
99
|
+
if (_item.is_delete == 0) {
|
|
100
|
+
_tempArr.push(_item);
|
|
101
|
+
_tempTotal++;
|
|
102
|
+
}
|
|
99
103
|
}
|
|
100
104
|
});
|
|
101
105
|
});
|
|
102
106
|
setTotal(_tempTotal);
|
|
103
|
-
setTotalBasics(_tempTotal);
|
|
104
107
|
setgroupOptions(_tempGroupOptions);
|
|
105
108
|
if (!refreshFlag) {
|
|
106
109
|
setPageNumber(1);
|
|
@@ -124,7 +127,7 @@ var CollectionEventList = function CollectionEventList(props) {
|
|
|
124
127
|
}).then(function (res) {
|
|
125
128
|
if (!res) throw new Error();
|
|
126
129
|
dataFinish(res.data, refreshFlag);
|
|
127
|
-
})
|
|
130
|
+
});
|
|
128
131
|
};
|
|
129
132
|
// 初始化列表
|
|
130
133
|
useEffect(function () {
|
|
@@ -160,11 +163,10 @@ var CollectionEventList = function CollectionEventList(props) {
|
|
|
160
163
|
if (res.code == '00') {
|
|
161
164
|
message.success('创建成功');
|
|
162
165
|
queryList();
|
|
166
|
+
setEventNameInput('');
|
|
167
|
+
setEventNameShow(false);
|
|
163
168
|
state.updateEventMetas && state.updateEventMetas(); // 更新store
|
|
164
169
|
}
|
|
165
|
-
}).catch(function (err) {}).finally(function () {
|
|
166
|
-
setEventNameInput('');
|
|
167
|
-
setEventNameShow(false);
|
|
168
170
|
});
|
|
169
171
|
};
|
|
170
172
|
// 筛选:显示状态 | 采集状态
|
|
@@ -308,49 +310,14 @@ var CollectionEventList = function CollectionEventList(props) {
|
|
|
308
310
|
_useState26 = _slicedToArray(_useState25, 2),
|
|
309
311
|
pageNumber = _useState26[0],
|
|
310
312
|
setPageNumber = _useState26[1];
|
|
311
|
-
var _useState27 = useState(
|
|
313
|
+
var _useState27 = useState(10),
|
|
312
314
|
_useState28 = _slicedToArray(_useState27, 2),
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
var _useState29 = useState(
|
|
315
|
+
pageSize = _useState28[0],
|
|
316
|
+
setPageSize = _useState28[1];
|
|
317
|
+
var _useState29 = useState([]),
|
|
316
318
|
_useState30 = _slicedToArray(_useState29, 2),
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
var _useState31 = useState([]),
|
|
320
|
-
_useState32 = _slicedToArray(_useState31, 2),
|
|
321
|
-
tableRenderData = _useState32[0],
|
|
322
|
-
setTableRenderData = _useState32[1];
|
|
323
|
-
// useEffect(() => {
|
|
324
|
-
// console.log('tableHandleData', tableHandleData);
|
|
325
|
-
// if (tableHandleData.length <= 0) { //待完善,收藏为空会有显示问题
|
|
326
|
-
// return;
|
|
327
|
-
// }
|
|
328
|
-
// if (pageNumber == pageNumberIng) {
|
|
329
|
-
// return;
|
|
330
|
-
// }
|
|
331
|
-
// let paginationData: DataType[][] = [];
|
|
332
|
-
// let arr: DataType[] = [];
|
|
333
|
-
// let count = 0;
|
|
334
|
-
// tableHandleData.map((item) => {
|
|
335
|
-
// if (item._groupId != undefined) {
|
|
336
|
-
// count++;
|
|
337
|
-
// }
|
|
338
|
-
// arr.push(item);
|
|
339
|
-
// if (count == pageSize) {
|
|
340
|
-
// paginationData.push(arr);
|
|
341
|
-
// count = 0;
|
|
342
|
-
// arr = [];
|
|
343
|
-
// }
|
|
344
|
-
// });
|
|
345
|
-
// if (count != 0) {
|
|
346
|
-
// paginationData.push(arr);
|
|
347
|
-
// count = 0;
|
|
348
|
-
// arr = [];
|
|
349
|
-
// }
|
|
350
|
-
// console.log('paginationData', tableRenderData, paginationData[pageNumber - 1]);
|
|
351
|
-
// setTableRenderData([...tableRenderData, ...paginationData[pageNumber - 1]]);
|
|
352
|
-
// setpageNumberIng(pageNumber);
|
|
353
|
-
// }, [pageNumber, pageNumberIng, tableHandleData]);
|
|
319
|
+
tableRenderData = _useState30[0],
|
|
320
|
+
setTableRenderData = _useState30[1];
|
|
354
321
|
useEffect(function () {
|
|
355
322
|
setPageNumber(1);
|
|
356
323
|
}, [tableHandleData]);
|
|
@@ -408,21 +375,22 @@ var CollectionEventList = function CollectionEventList(props) {
|
|
|
408
375
|
})
|
|
409
376
|
}), /*#__PURE__*/React.createElement("div", {
|
|
410
377
|
className: "top-total"
|
|
411
|
-
}, "\u5171", /*#__PURE__*/React.createElement("span", null, total), "\u6761"), /*#__PURE__*/React.createElement(
|
|
412
|
-
className: "top-button"
|
|
378
|
+
}, "\u5171", /*#__PURE__*/React.createElement("span", null, total), "\u6761"), /*#__PURE__*/React.createElement("div", {
|
|
379
|
+
className: "top-button"
|
|
380
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
413
381
|
type: "primary",
|
|
414
382
|
shape: "round",
|
|
415
|
-
disabled:
|
|
416
|
-
icon: /*#__PURE__*/React.createElement(IconFont, {
|
|
417
|
-
style: {
|
|
418
|
-
marginRight: '5px'
|
|
419
|
-
},
|
|
420
|
-
type: "tianjia"
|
|
421
|
-
}),
|
|
383
|
+
disabled: !authority[1000002],
|
|
422
384
|
onClick: function onClick() {
|
|
423
385
|
return setEventNameShow(true);
|
|
424
386
|
}
|
|
425
|
-
}, "\u521B\u5EFA\u4E8B\u4EF6\u5206\u7EC4")
|
|
387
|
+
}, "\u521B\u5EFA\u4E8B\u4EF6\u5206\u7EC4"), /*#__PURE__*/React.createElement(Button, {
|
|
388
|
+
shape: "round",
|
|
389
|
+
// disabled={!authority[1000002]}
|
|
390
|
+
onClick: function onClick() {
|
|
391
|
+
return setEventGroupingShow(true);
|
|
392
|
+
}
|
|
393
|
+
}, "\u4E8B\u4EF6\u5206\u7EC4\u7BA1\u7406"))), /*#__PURE__*/React.createElement(TablePlus, {
|
|
426
394
|
loading: loading,
|
|
427
395
|
tableHandleData: tableRenderData,
|
|
428
396
|
Refresh: refreshHandle,
|
|
@@ -431,7 +399,6 @@ var CollectionEventList = function CollectionEventList(props) {
|
|
|
431
399
|
isOpen: props.isOpen,
|
|
432
400
|
queryPlanData: props.queryPlanData,
|
|
433
401
|
eventAttrDataHandle: eventAttrDataHandle,
|
|
434
|
-
// pageSizeChange={pageSizeChange}
|
|
435
402
|
total: total,
|
|
436
403
|
groupData: groupData
|
|
437
404
|
}), /*#__PURE__*/React.createElement(Pagination, {
|
|
@@ -459,7 +426,11 @@ var CollectionEventList = function CollectionEventList(props) {
|
|
|
459
426
|
eventAttrsData: eventAttrsData,
|
|
460
427
|
source: "event",
|
|
461
428
|
Refresh: refreshHandle
|
|
462
|
-
})), /*#__PURE__*/React.createElement(
|
|
429
|
+
})), /*#__PURE__*/React.createElement(EventGroupingDrawer, {
|
|
430
|
+
eventGroupingShow: eventGroupingShow,
|
|
431
|
+
setEventGroupingShow: setEventGroupingShow,
|
|
432
|
+
refresh: refreshHandle
|
|
433
|
+
}), /*#__PURE__*/React.createElement(Modal, {
|
|
463
434
|
title: "\u521B\u5EFA\u5206\u7EC4",
|
|
464
435
|
className: "creact-group",
|
|
465
436
|
destroyOnClose: true,
|