@zgfe/modules-dm 1.0.42-alpha.8 → 1.0.56-zhongyuan.1
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 +1 -1
- package/es/constants/api.d.ts +37 -0
- package/es/constants/api.js +62 -1
- package/es/index.d.ts +4 -3
- package/es/index.js +4 -3
- package/es/modules/CutsModal.d.ts +66 -0
- package/es/modules/CutsModal.js +52 -0
- package/es/modules/{dataCollection → dataManage}/collectionAttributeList.d.ts +3 -0
- package/es/modules/dataManage/collectionAttributeList.js +943 -0
- package/es/modules/{dataCollection → dataManage}/collectionEventList.d.ts +6 -0
- package/es/modules/dataManage/collectionEventList.js +883 -0
- package/es/modules/dataManage/components/createAttrDrawer.d.ts +4 -0
- package/es/modules/dataManage/components/createAttrDrawer.js +264 -0
- package/es/modules/dataManage/components/createMetaDrawer.d.ts +4 -0
- package/es/modules/dataManage/components/createMetaDrawer.js +618 -0
- package/es/modules/{dataCollection → dataManage}/components/createVirtualDrawer.js +20 -20
- package/es/modules/dataManage/components/creditPop/imgs/link.png +0 -0
- package/es/modules/dataManage/components/creditPop/imgs/png01.png +0 -0
- package/es/modules/dataManage/components/creditPop/imgs/png02.png +0 -0
- package/es/modules/dataManage/components/creditPop/imgs/png03.png +0 -0
- package/es/modules/dataManage/components/creditPop/imgs/png04.png +0 -0
- package/es/modules/dataManage/components/creditPop/index.d.ts +5 -0
- package/es/modules/dataManage/components/creditPop/index.js +89 -0
- package/es/modules/dataManage/components/creditPop/index.less +121 -0
- package/es/modules/dataManage/components/deleteConfirm.d.ts +9 -0
- package/es/modules/dataManage/components/deleteConfirm.js +36 -0
- package/es/modules/dataManage/components/deleteUserAttrConfirm.d.ts +9 -0
- package/es/modules/dataManage/components/deleteUserAttrConfirm.js +57 -0
- package/es/modules/dataManage/components/depositPop/imgs/link.png +0 -0
- package/es/modules/dataManage/components/depositPop/imgs/png01.png +0 -0
- package/es/modules/dataManage/components/depositPop/imgs/png02.png +0 -0
- package/es/modules/dataManage/components/depositPop/index.d.ts +5 -0
- package/es/modules/dataManage/components/depositPop/index.js +89 -0
- package/es/modules/dataManage/components/depositPop/index.less +115 -0
- package/es/modules/dataManage/components/developModal/index.css +36 -0
- package/es/modules/dataManage/components/developModal/index.d.ts +5 -0
- package/es/modules/dataManage/components/developModal/index.js +224 -0
- package/es/modules/dataManage/components/developModal/index.less +36 -0
- package/es/modules/dataManage/components/editTxt/index.d.ts +5 -0
- package/es/modules/dataManage/components/editTxt/index.js +123 -0
- package/es/modules/dataManage/components/editTxt/index.less +44 -0
- package/es/modules/dataManage/components/editTxt/types.d.ts +48 -0
- package/es/modules/{dataCollection → dataManage}/components/eventFilter/index.js +13 -13
- package/es/modules/{dataCollection → dataManage}/components/eventFilter/styles/index.less +1 -1
- package/es/modules/{dataCollection → dataManage}/components/eventGroupingDrawer.js +44 -47
- package/es/modules/dataManage/components/importAttrDialog/demo/index.d.ts +2 -0
- package/es/modules/dataManage/components/importAttrDialog/demo/index.js +28 -0
- package/es/modules/dataManage/components/importAttrDialog/index.d.ts +7 -0
- package/es/modules/dataManage/components/importAttrDialog/index.js +157 -0
- package/es/modules/dataManage/components/importAttrDialog/styles/index.less +90 -0
- package/es/modules/dataManage/components/importMetaDialog/demo/index.d.ts +2 -0
- package/es/modules/dataManage/components/importMetaDialog/demo/index.js +28 -0
- package/es/modules/dataManage/components/importMetaDialog/index.d.ts +7 -0
- package/es/modules/dataManage/components/importMetaDialog/index.js +157 -0
- package/es/modules/dataManage/components/importMetaDialog/styles/index.less +91 -0
- package/es/modules/{dataCollection → dataManage}/components/selectAttributes.js +10 -10
- package/es/modules/{dataCollection → dataManage}/components/tablePlus.d.ts +4 -0
- package/es/modules/dataManage/components/tablePlus.js +1207 -0
- package/es/modules/{dataCollection → dataManage}/components/virtualTablePlus.js +10 -10
- package/es/modules/dataManage/demo/index.js +79 -16
- package/es/modules/dataManage/detailedData/DetailedDataForm.d.ts +5 -0
- package/es/modules/dataManage/detailedData/DetailedDataForm.js +216 -0
- package/es/modules/dataManage/detailedData/index.d.ts +24 -0
- package/es/modules/dataManage/detailedData/index.js +403 -0
- package/es/modules/dataManage/detailedData/useColumns.d.ts +34 -0
- package/es/modules/dataManage/detailedData/useColumns.js +135 -0
- package/es/modules/dataManage/index.d.ts +9 -19
- package/es/modules/dataManage/index.js +176 -17
- package/es/modules/dataManage/styles/detailed.less +74 -0
- package/es/modules/dataManage/styles/index.less +1177 -18
- package/es/modules/{dataCollection → dataManage}/types.d.ts +8 -0
- package/es/modules/dataManage/types.js +1 -0
- package/es/modules/{dataCollection → dataManage}/virtualEventList.js +13 -13
- package/es/modules/dataMap/component/data.d.ts +7 -0
- package/es/modules/dataMap/component/data.js +257 -0
- package/es/modules/dataMap/component/drawerAdd.d.ts +6 -0
- package/es/modules/dataMap/component/drawerAdd.js +376 -0
- package/es/modules/dataMap/component/leftTree.d.ts +6 -0
- package/es/modules/dataMap/component/leftTree.js +227 -0
- package/es/modules/dataMap/component/rightDetail.d.ts +7 -0
- package/es/modules/dataMap/component/rightDetail.js +680 -0
- package/es/modules/dataMap/component/selectAttr.d.ts +7 -0
- package/es/modules/dataMap/component/selectAttr.js +92 -0
- package/es/modules/dataMap/css/index.css +163 -0
- package/es/modules/dataMap/css/index.less +177 -0
- package/es/modules/dataMap/demo/index.d.ts +2 -0
- package/es/modules/dataMap/demo/index.js +6 -0
- package/es/modules/dataMap/img/empty-data.png +0 -0
- package/es/modules/dataMap/index.d.ts +2 -0
- package/es/modules/dataMap/index.js +80 -0
- package/es/modules/dataMap/mapDetail.d.ts +3 -0
- package/es/modules/dataMap/mapDetail.js +44 -0
- package/es/modules/dataMap/mapSetting.d.ts +6 -0
- package/es/modules/dataMap/mapSetting.js +148 -0
- package/es/modules/dataPlan/addEventOrUser.js +31 -30
- package/es/modules/dataPlan/addPlan.js +29 -27
- package/es/modules/dataPlan/eventList.js +2 -2
- package/es/modules/dataPlan/index.js +10 -10
- package/es/modules/dataPlan/search.js +6 -5
- package/es/modules/dataPlan/tablePlus.js +3 -3
- package/es/modules/dataPlan/userAttributeList.js +5 -5
- package/es/modules/dataReal/css/index.css +48 -0
- package/es/modules/dataReal/css/index.less +51 -0
- package/es/modules/dataReal/demo/index.d.ts +2 -0
- package/es/modules/dataReal/demo/index.js +6 -0
- package/es/modules/dataReal/index1.d.ts +28 -0
- package/es/modules/dataReal/index1.js +215 -0
- package/es/modules/dataReal/table.d.ts +5 -0
- package/es/modules/dataReal/table.js +258 -0
- package/es/store/index.js +11 -11
- package/es/utils/index.d.ts +1 -0
- package/es/utils/index.js +9 -1
- package/package.json +8 -4
- package/es/modules/dataCollection/collectionAttributeList.js +0 -508
- package/es/modules/dataCollection/collectionEventList.js +0 -466
- package/es/modules/dataCollection/components/tablePlus.js +0 -676
- package/es/modules/dataCollection/index.d.ts +0 -19
- package/es/modules/dataCollection/index.js +0 -93
- package/es/modules/dataCollection/styles/index.less +0 -842
- /package/es/modules/{dataCollection → dataManage}/components/createVirtualDrawer.d.ts +0 -0
- /package/es/modules/{dataCollection/components/eventFilter → dataManage/components/editTxt}/types.js +0 -0
- /package/es/modules/{dataCollection → dataManage}/components/eventFilter/index.d.ts +0 -0
- /package/es/modules/{dataCollection → dataManage}/components/eventFilter/types.d.ts +0 -0
- /package/es/modules/{dataCollection → dataManage/components/eventFilter}/types.js +0 -0
- /package/es/modules/{dataCollection → dataManage}/components/eventGroupingDrawer.d.ts +0 -0
- /package/es/modules/{dataCollection → dataManage}/components/eventItem.d.ts +0 -0
- /package/es/modules/{dataCollection → dataManage}/components/eventItem.js +0 -0
- /package/es/modules/{dataCollection → dataManage}/components/selectAttributes.d.ts +0 -0
- /package/es/modules/{dataCollection → dataManage}/components/virtualTablePlus.d.ts +0 -0
- /package/es/modules/{dataCollection → dataManage}/virtualEventList.d.ts +0 -0
|
@@ -1,466 +0,0 @@
|
|
|
1
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
2
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
4
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
5
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
6
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
7
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
8
|
-
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; }
|
|
9
|
-
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; } }
|
|
10
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
11
|
-
import { BizGlobalDataContext, IconFont } from '@zgfe/business-lib';
|
|
12
|
-
import { Input, Button, Select, Modal, message, Drawer, Pagination } from 'antd';
|
|
13
|
-
import request from '../../utils/ajax';
|
|
14
|
-
import apis from '../../constants/api';
|
|
15
|
-
import React, { useEffect, useState, useContext } from 'react';
|
|
16
|
-
import './styles/index.less';
|
|
17
|
-
import TablePlus from './components/tablePlus';
|
|
18
|
-
import _ from 'lodash';
|
|
19
|
-
import { getAppID } from '../../utils';
|
|
20
|
-
import CollectionAttributeList from './collectionAttributeList';
|
|
21
|
-
import EventGroupingDrawer from './components/eventGroupingDrawer';
|
|
22
|
-
import { DmContext } from '../../store';
|
|
23
|
-
var CollectionEventList = function CollectionEventList(props) {
|
|
24
|
-
var classPrefix = 'event-list';
|
|
25
|
-
var _useContext = useContext(BizGlobalDataContext),
|
|
26
|
-
currentApp = _useContext.currentApp,
|
|
27
|
-
authority = _useContext.authority;
|
|
28
|
-
var _useContext2 = useContext(DmContext),
|
|
29
|
-
state = _useContext2.state;
|
|
30
|
-
var _useState = useState(0),
|
|
31
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
32
|
-
total = _useState2[0],
|
|
33
|
-
setTotal = _useState2[1];
|
|
34
|
-
// 加载中
|
|
35
|
-
var _useState3 = useState(true),
|
|
36
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
37
|
-
loading = _useState4[0],
|
|
38
|
-
setLoading = _useState4[1];
|
|
39
|
-
// 渲染数据
|
|
40
|
-
var _useState5 = useState([]),
|
|
41
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
42
|
-
tableHandleData = _useState6[0],
|
|
43
|
-
setTableHandleData = _useState6[1];
|
|
44
|
-
// 原数据
|
|
45
|
-
var _useState7 = useState([]),
|
|
46
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
|
47
|
-
tableHandleDataBasics = _useState8[0],
|
|
48
|
-
setTableHandleDataBasics = _useState8[1];
|
|
49
|
-
// 分组select数据
|
|
50
|
-
var _useState9 = useState([]),
|
|
51
|
-
_useState10 = _slicedToArray(_useState9, 2),
|
|
52
|
-
groupOptions = _useState10[0],
|
|
53
|
-
setgroupOptions = _useState10[1];
|
|
54
|
-
// 事件分组管理
|
|
55
|
-
var _useState11 = useState(false),
|
|
56
|
-
_useState12 = _slicedToArray(_useState11, 2),
|
|
57
|
-
eventGroupingShow = _useState12[0],
|
|
58
|
-
setEventGroupingShow = _useState12[1];
|
|
59
|
-
// 分组元素有任意一个收藏,筛选收藏时保留分组标题
|
|
60
|
-
var markTypeHandle = function markTypeHandle(item) {
|
|
61
|
-
var _markTypeFlag = 0;
|
|
62
|
-
item.eventList.map(function (_item) {
|
|
63
|
-
_item.mark_type == 1 ? _markTypeFlag = 1 : null;
|
|
64
|
-
});
|
|
65
|
-
return _markTypeFlag;
|
|
66
|
-
};
|
|
67
|
-
var dataFinish = function dataFinish(data, refreshFlag) {
|
|
68
|
-
var _tempArr = [];
|
|
69
|
-
var _tempGroupOptions = [{
|
|
70
|
-
value: -999,
|
|
71
|
-
label: '所有分组'
|
|
72
|
-
}];
|
|
73
|
-
var _tempTotal = 0;
|
|
74
|
-
data.map(function (item, index) {
|
|
75
|
-
_tempArr.push({
|
|
76
|
-
key: index,
|
|
77
|
-
groupId: item.groupId,
|
|
78
|
-
groupName: item.groupName,
|
|
79
|
-
event_name: '',
|
|
80
|
-
alias_name: '',
|
|
81
|
-
insert_time: '',
|
|
82
|
-
last_insert_time: '',
|
|
83
|
-
event_hidden: 0,
|
|
84
|
-
is_stop: 0,
|
|
85
|
-
event_attrs: [],
|
|
86
|
-
event_id: index,
|
|
87
|
-
is_delete: 0,
|
|
88
|
-
owner: '',
|
|
89
|
-
mark_type: markTypeHandle(item)
|
|
90
|
-
});
|
|
91
|
-
_tempGroupOptions.push({
|
|
92
|
-
value: item.groupId,
|
|
93
|
-
label: item.groupName == null ? '未分组' : item.groupName
|
|
94
|
-
});
|
|
95
|
-
item.eventList.map(function (_item, _index) {
|
|
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
|
-
}
|
|
103
|
-
}
|
|
104
|
-
});
|
|
105
|
-
});
|
|
106
|
-
setTotal(_tempTotal);
|
|
107
|
-
setgroupOptions(_tempGroupOptions);
|
|
108
|
-
if (!refreshFlag) {
|
|
109
|
-
setPageNumber(1);
|
|
110
|
-
setTableHandleData(_tempArr);
|
|
111
|
-
}
|
|
112
|
-
setTableHandleDataBasics(_tempArr);
|
|
113
|
-
setLoading(false);
|
|
114
|
-
};
|
|
115
|
-
// 刷新数据
|
|
116
|
-
var refreshHandle = function refreshHandle() {
|
|
117
|
-
queryList(true);
|
|
118
|
-
};
|
|
119
|
-
var queryList = function queryList(refreshFlag) {
|
|
120
|
-
request(apis.queryCollectionEventList, {
|
|
121
|
-
method: 'post',
|
|
122
|
-
data: {
|
|
123
|
-
appId: getAppID(currentApp),
|
|
124
|
-
platform: 0,
|
|
125
|
-
isAll: true
|
|
126
|
-
}
|
|
127
|
-
}).then(function (res) {
|
|
128
|
-
if (!res) throw new Error();
|
|
129
|
-
dataFinish(res.data, refreshFlag);
|
|
130
|
-
});
|
|
131
|
-
};
|
|
132
|
-
// 初始化列表
|
|
133
|
-
useEffect(function () {
|
|
134
|
-
queryList();
|
|
135
|
-
}, []);
|
|
136
|
-
// 控制修改分组名弹框 显示隐藏
|
|
137
|
-
var _useState13 = useState(false),
|
|
138
|
-
_useState14 = _slicedToArray(_useState13, 2),
|
|
139
|
-
eventNameShow = _useState14[0],
|
|
140
|
-
setEventNameShow = _useState14[1];
|
|
141
|
-
var _useState15 = useState(''),
|
|
142
|
-
_useState16 = _slicedToArray(_useState15, 2),
|
|
143
|
-
eventNameInput = _useState16[0],
|
|
144
|
-
setEventNameInput = _useState16[1];
|
|
145
|
-
// 创建事件分组
|
|
146
|
-
var createEventGroup = function createEventGroup() {
|
|
147
|
-
if (eventNameInput == '') {
|
|
148
|
-
message.error('请输入分组名称');
|
|
149
|
-
return;
|
|
150
|
-
}
|
|
151
|
-
request(apis.upsertEventGroup, {
|
|
152
|
-
method: 'post',
|
|
153
|
-
data: {
|
|
154
|
-
eventGroupName: eventNameInput,
|
|
155
|
-
appId: getAppID(currentApp),
|
|
156
|
-
platform: 0
|
|
157
|
-
}
|
|
158
|
-
}).then(function (res) {
|
|
159
|
-
if (res.code == '00') {
|
|
160
|
-
message.success('创建成功');
|
|
161
|
-
queryList();
|
|
162
|
-
setEventNameInput('');
|
|
163
|
-
setEventNameShow(false);
|
|
164
|
-
state.updateEventMetas && state.updateEventMetas(); // 更新store
|
|
165
|
-
}
|
|
166
|
-
});
|
|
167
|
-
};
|
|
168
|
-
// 筛选:显示状态 | 采集状态
|
|
169
|
-
var eventActiveFilter = function eventActiveFilter(e, type) {
|
|
170
|
-
filterHandlePublic(e == -1, type, e);
|
|
171
|
-
};
|
|
172
|
-
// 筛选分组
|
|
173
|
-
var handleSelectChange = function handleSelectChange(e) {
|
|
174
|
-
filterHandlePublic(e == -999, 'groupId', e);
|
|
175
|
-
};
|
|
176
|
-
// 筛选事件
|
|
177
|
-
var eventNameChange = function eventNameChange(e) {
|
|
178
|
-
var _value = e.currentTarget.value;
|
|
179
|
-
filterHandlePublic(_value == '', 'event_name', _value);
|
|
180
|
-
};
|
|
181
|
-
// 筛选收藏
|
|
182
|
-
var markTypeFilter = function markTypeFilter(markActive) {
|
|
183
|
-
filterHandlePublic(!markActive, 'mark_type');
|
|
184
|
-
};
|
|
185
|
-
var _useState17 = useState([]),
|
|
186
|
-
_useState18 = _slicedToArray(_useState17, 2),
|
|
187
|
-
filterTypeData = _useState18[0],
|
|
188
|
-
setfilterTypeData = _useState18[1];
|
|
189
|
-
var _useState19 = useState([]),
|
|
190
|
-
_useState20 = _slicedToArray(_useState19, 2),
|
|
191
|
-
groupData = _useState20[0],
|
|
192
|
-
setGroupData = _useState20[1]; // 分组数据操作条
|
|
193
|
-
useEffect(function () {
|
|
194
|
-
// 判断不同type的筛选条件
|
|
195
|
-
var _judgeFun = function _judgeFun(item, filterItem) {
|
|
196
|
-
var _item$alias_name, _item$event_name;
|
|
197
|
-
switch (filterItem.type) {
|
|
198
|
-
case 'mark_type':
|
|
199
|
-
return item.mark_type == 1;
|
|
200
|
-
case 'event_name':
|
|
201
|
-
return item.alias_name !== undefined && item.alias_name !== null && ((_item$alias_name = item.alias_name) === null || _item$alias_name === void 0 ? void 0 : _item$alias_name.indexOf(filterItem.value)) !== -1 || item.event_name !== null && ((_item$event_name = item.event_name) === null || _item$event_name === void 0 ? void 0 : _item$event_name.indexOf(filterItem.value)) !== -1;
|
|
202
|
-
case 'groupId':
|
|
203
|
-
return item._groupId == filterItem.value || item.groupId == filterItem.value;
|
|
204
|
-
case 'event_hidden':
|
|
205
|
-
return item.event_hidden == filterItem.value || item.groupId != undefined;
|
|
206
|
-
case 'is_stop':
|
|
207
|
-
return item.is_stop == filterItem.value || item.groupId != undefined;
|
|
208
|
-
}
|
|
209
|
-
};
|
|
210
|
-
var _groupData = [];
|
|
211
|
-
var clearEmptyGroupFlag = false;
|
|
212
|
-
// 多条件同时筛选
|
|
213
|
-
var _tableHandleData = [];
|
|
214
|
-
tableHandleDataBasics.map(function (item) {
|
|
215
|
-
if (item.groupId != undefined) {
|
|
216
|
-
_groupData.push(item);
|
|
217
|
-
}
|
|
218
|
-
var falg = true;
|
|
219
|
-
filterTypeData.map(function (filterItem) {
|
|
220
|
-
if (!_judgeFun(item, filterItem)) {
|
|
221
|
-
falg = false;
|
|
222
|
-
if (filterItem.type == 'event_hidden' || filterItem.type == 'is_stop') clearEmptyGroupFlag = true;
|
|
223
|
-
}
|
|
224
|
-
});
|
|
225
|
-
falg && _tableHandleData.push(item);
|
|
226
|
-
});
|
|
227
|
-
setGroupData(_groupData);
|
|
228
|
-
var total = 0;
|
|
229
|
-
_tableHandleData.map(function (item) {
|
|
230
|
-
if (item._groupId != undefined) {
|
|
231
|
-
total++;
|
|
232
|
-
}
|
|
233
|
-
});
|
|
234
|
-
setTotal(total);
|
|
235
|
-
// 过滤空组 , event_hidden 和 is_stop,触发
|
|
236
|
-
var clearEmptyGroup = function clearEmptyGroup(data) {
|
|
237
|
-
var _data = _.cloneDeep(data);
|
|
238
|
-
_.remove(_data, function (item) {
|
|
239
|
-
var flag = false;
|
|
240
|
-
data.map(function (item2) {
|
|
241
|
-
if (item.groupId && item.groupId == item2._groupId) {
|
|
242
|
-
flag = true;
|
|
243
|
-
}
|
|
244
|
-
});
|
|
245
|
-
// console.log(item, flag);
|
|
246
|
-
return item.groupId != undefined && !flag;
|
|
247
|
-
});
|
|
248
|
-
return _data;
|
|
249
|
-
};
|
|
250
|
-
// console.log('_tableHandleData_tableHandleData', _tableHandleData);
|
|
251
|
-
setPageNumber(1);
|
|
252
|
-
if (!clearEmptyGroupFlag) {
|
|
253
|
-
setTableHandleData(_tableHandleData);
|
|
254
|
-
} else {
|
|
255
|
-
setTableHandleData(clearEmptyGroup(_tableHandleData));
|
|
256
|
-
}
|
|
257
|
-
}, [filterTypeData, tableHandleDataBasics]);
|
|
258
|
-
// 是否已包含筛选type
|
|
259
|
-
var filterHas = function filterHas(type) {
|
|
260
|
-
var flag = false;
|
|
261
|
-
filterTypeData.map(function (item) {
|
|
262
|
-
if (item.type == type) {
|
|
263
|
-
flag = true;
|
|
264
|
-
}
|
|
265
|
-
});
|
|
266
|
-
return flag;
|
|
267
|
-
};
|
|
268
|
-
// 处理各种筛选数据
|
|
269
|
-
var filterHandlePublic = function filterHandlePublic(filterFlag, type, value) {
|
|
270
|
-
if (filterFlag) {
|
|
271
|
-
// 取消筛选
|
|
272
|
-
var data = _.cloneDeep(filterTypeData);
|
|
273
|
-
_.remove(data, function (x) {
|
|
274
|
-
return x.type == type;
|
|
275
|
-
});
|
|
276
|
-
setfilterTypeData(data);
|
|
277
|
-
} else {
|
|
278
|
-
if (!filterHas(type)) {
|
|
279
|
-
setfilterTypeData([].concat(_toConsumableArray(filterTypeData), [{
|
|
280
|
-
type: type,
|
|
281
|
-
value: value
|
|
282
|
-
}]));
|
|
283
|
-
} else {
|
|
284
|
-
setfilterTypeData(filterTypeData.map(function (item) {
|
|
285
|
-
if (item.type == type) {
|
|
286
|
-
item.value = value;
|
|
287
|
-
}
|
|
288
|
-
return item;
|
|
289
|
-
}));
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
};
|
|
293
|
-
var _useState21 = useState(false),
|
|
294
|
-
_useState22 = _slicedToArray(_useState21, 2),
|
|
295
|
-
eventAttrListShow = _useState22[0],
|
|
296
|
-
setEventAttrListShow = _useState22[1];
|
|
297
|
-
var _useState23 = useState(),
|
|
298
|
-
_useState24 = _slicedToArray(_useState23, 2),
|
|
299
|
-
eventAttrsData = _useState24[0],
|
|
300
|
-
setEventAttrsData = _useState24[1];
|
|
301
|
-
var eventAttrDataHandle = function eventAttrDataHandle(data) {
|
|
302
|
-
setEventAttrsData(data);
|
|
303
|
-
setEventAttrListShow(true);
|
|
304
|
-
};
|
|
305
|
-
var _useState25 = useState(1),
|
|
306
|
-
_useState26 = _slicedToArray(_useState25, 2),
|
|
307
|
-
pageNumber = _useState26[0],
|
|
308
|
-
setPageNumber = _useState26[1];
|
|
309
|
-
var _useState27 = useState(10),
|
|
310
|
-
_useState28 = _slicedToArray(_useState27, 2),
|
|
311
|
-
pageSize = _useState28[0],
|
|
312
|
-
setPageSize = _useState28[1];
|
|
313
|
-
var _useState29 = useState([]),
|
|
314
|
-
_useState30 = _slicedToArray(_useState29, 2),
|
|
315
|
-
tableRenderData = _useState30[0],
|
|
316
|
-
setTableRenderData = _useState30[1];
|
|
317
|
-
useEffect(function () {
|
|
318
|
-
setPageNumber(1);
|
|
319
|
-
}, [tableHandleData]);
|
|
320
|
-
useEffect(function () {
|
|
321
|
-
var paginationData = [];
|
|
322
|
-
var arr = [];
|
|
323
|
-
var count = 0;
|
|
324
|
-
tableHandleData.map(function (item) {
|
|
325
|
-
if (item._groupId != undefined) {
|
|
326
|
-
count++;
|
|
327
|
-
}
|
|
328
|
-
arr.push(item);
|
|
329
|
-
if (count == pageSize) {
|
|
330
|
-
paginationData.push(arr);
|
|
331
|
-
count = 0;
|
|
332
|
-
arr = [];
|
|
333
|
-
}
|
|
334
|
-
});
|
|
335
|
-
if (arr.length > 0) {
|
|
336
|
-
paginationData.push(arr);
|
|
337
|
-
count = 0;
|
|
338
|
-
arr = [];
|
|
339
|
-
}
|
|
340
|
-
// 当前页需要展示的数据
|
|
341
|
-
var _renderData = paginationData[pageNumber - 1];
|
|
342
|
-
// 临时数组,搜索时使用,存储已添加的分组id
|
|
343
|
-
var _tempGroupIdList = [];
|
|
344
|
-
// 临时渲染数据,搜索时使用,存放处理后的数据(含分组信息)
|
|
345
|
-
var _tempRenderData = [];
|
|
346
|
-
// console.log('_renderData', tableHandleData, _renderData, groupData);
|
|
347
|
-
if (_renderData && _renderData.length > 0 && _renderData[0].groupId == undefined) {
|
|
348
|
-
_renderData.map(function (item) {
|
|
349
|
-
groupData.map(function (_item) {
|
|
350
|
-
if (_item.groupId === item._groupId && _tempGroupIdList.indexOf(item._groupId) === -1) {
|
|
351
|
-
_tempGroupIdList.push(item._groupId);
|
|
352
|
-
_tempRenderData.push(_item);
|
|
353
|
-
}
|
|
354
|
-
});
|
|
355
|
-
_tempRenderData.push(item);
|
|
356
|
-
});
|
|
357
|
-
}
|
|
358
|
-
setTableRenderData(_tempRenderData.length > 0 ? _tempRenderData : _renderData);
|
|
359
|
-
}, [pageNumber, pageSize, tableHandleData]);
|
|
360
|
-
// 分页处理
|
|
361
|
-
var onPaginationChange = function onPaginationChange(pageNumber, pageSize) {
|
|
362
|
-
setPageNumber(pageNumber);
|
|
363
|
-
setPageSize(pageSize);
|
|
364
|
-
};
|
|
365
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
366
|
-
className: classPrefix
|
|
367
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
368
|
-
className: "".concat(classPrefix, "-top-box")
|
|
369
|
-
}, groupOptions.length > 0 && /*#__PURE__*/React.createElement(Select, {
|
|
370
|
-
defaultValue: -999,
|
|
371
|
-
className: "top-select",
|
|
372
|
-
onChange: handleSelectChange,
|
|
373
|
-
options: groupOptions,
|
|
374
|
-
suffixIcon: /*#__PURE__*/React.createElement(IconFont, {
|
|
375
|
-
type: "xiangxia",
|
|
376
|
-
style: {
|
|
377
|
-
color: '#5f6085'
|
|
378
|
-
}
|
|
379
|
-
})
|
|
380
|
-
}), /*#__PURE__*/React.createElement(Input, {
|
|
381
|
-
className: "top-input",
|
|
382
|
-
onChange: eventNameChange,
|
|
383
|
-
placeholder: "\u8BF7\u8F93\u5165\u4E8B\u4EF6\u540D\u79F0\u6216\u522B\u540D",
|
|
384
|
-
prefix: /*#__PURE__*/React.createElement(IconFont, {
|
|
385
|
-
type: "sousuo"
|
|
386
|
-
})
|
|
387
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
388
|
-
className: "top-total"
|
|
389
|
-
}, "\u5171", /*#__PURE__*/React.createElement("span", null, total), "\u6761"), /*#__PURE__*/React.createElement("div", {
|
|
390
|
-
className: "top-button"
|
|
391
|
-
}, /*#__PURE__*/React.createElement(Button, {
|
|
392
|
-
shape: "round",
|
|
393
|
-
className: "button ".concat(!authority[1000002] ? 'disabled' : ''),
|
|
394
|
-
disabled: !authority[1000002],
|
|
395
|
-
onClick: function onClick() {
|
|
396
|
-
return setEventNameShow(true);
|
|
397
|
-
}
|
|
398
|
-
}, "\u521B\u5EFA\u4E8B\u4EF6\u5206\u7EC4"), /*#__PURE__*/React.createElement(Button, {
|
|
399
|
-
shape: "round",
|
|
400
|
-
className: "button ".concat(!authority[1700636282] ? 'disabled' : ''),
|
|
401
|
-
disabled: !authority[1700636282],
|
|
402
|
-
onClick: function onClick() {
|
|
403
|
-
return setEventGroupingShow(true);
|
|
404
|
-
}
|
|
405
|
-
}, "\u4E8B\u4EF6\u5206\u7EC4\u7BA1\u7406"))), /*#__PURE__*/React.createElement(TablePlus, {
|
|
406
|
-
loading: loading,
|
|
407
|
-
tableHandleData: tableRenderData,
|
|
408
|
-
Refresh: refreshHandle,
|
|
409
|
-
eventActiveFilter: eventActiveFilter,
|
|
410
|
-
markTypeFilter: markTypeFilter,
|
|
411
|
-
isOpen: props.isOpen,
|
|
412
|
-
queryPlanData: props.queryPlanData,
|
|
413
|
-
eventAttrDataHandle: eventAttrDataHandle,
|
|
414
|
-
total: total,
|
|
415
|
-
groupData: groupData
|
|
416
|
-
}), /*#__PURE__*/React.createElement(Pagination, {
|
|
417
|
-
style: {
|
|
418
|
-
textAlign: 'right'
|
|
419
|
-
},
|
|
420
|
-
showQuickJumper: true,
|
|
421
|
-
showSizeChanger: total > 10,
|
|
422
|
-
defaultCurrent: 1,
|
|
423
|
-
current: pageNumber,
|
|
424
|
-
total: total,
|
|
425
|
-
onChange: onPaginationChange
|
|
426
|
-
}), /*#__PURE__*/React.createElement(Drawer, {
|
|
427
|
-
className: "".concat(classPrefix, "-drawer"),
|
|
428
|
-
width: '70%',
|
|
429
|
-
placement: "right",
|
|
430
|
-
destroyOnClose: true,
|
|
431
|
-
onClose: function onClose() {
|
|
432
|
-
return setEventAttrListShow(false);
|
|
433
|
-
},
|
|
434
|
-
open: eventAttrListShow
|
|
435
|
-
}, /*#__PURE__*/React.createElement(CollectionAttributeList, {
|
|
436
|
-
isOpen: props.isOpen,
|
|
437
|
-
queryPlanData: props.queryPlanData,
|
|
438
|
-
eventAttrsData: eventAttrsData,
|
|
439
|
-
source: "event",
|
|
440
|
-
Refresh: refreshHandle
|
|
441
|
-
})), /*#__PURE__*/React.createElement(EventGroupingDrawer, {
|
|
442
|
-
eventGroupingShow: eventGroupingShow,
|
|
443
|
-
setEventGroupingShow: setEventGroupingShow,
|
|
444
|
-
refresh: refreshHandle,
|
|
445
|
-
source: "collection"
|
|
446
|
-
}), /*#__PURE__*/React.createElement(Modal, {
|
|
447
|
-
title: "\u521B\u5EFA\u5206\u7EC4",
|
|
448
|
-
className: "creact-group",
|
|
449
|
-
destroyOnClose: true,
|
|
450
|
-
getContainer: false,
|
|
451
|
-
open: eventNameShow,
|
|
452
|
-
onOk: createEventGroup,
|
|
453
|
-
onCancel: function onCancel() {
|
|
454
|
-
setEventNameShow(false);
|
|
455
|
-
setEventNameInput('');
|
|
456
|
-
}
|
|
457
|
-
}, /*#__PURE__*/React.createElement(Input, {
|
|
458
|
-
placeholder: "\u8BF7\u8F93\u5165\u5206\u7EC4\u540D",
|
|
459
|
-
value: eventNameInput,
|
|
460
|
-
maxLength: 20,
|
|
461
|
-
onChange: function onChange(e) {
|
|
462
|
-
return setEventNameInput(e.currentTarget.value);
|
|
463
|
-
}
|
|
464
|
-
})));
|
|
465
|
-
};
|
|
466
|
-
export default CollectionEventList;
|