@zgfe/modules-dm 1.0.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.
Files changed (47) hide show
  1. package/README.md +37 -0
  2. package/es/components/demo.d.ts +8 -0
  3. package/es/components/demo.js +23 -0
  4. package/es/constants/api.d.ts +27 -0
  5. package/es/constants/api.js +58 -0
  6. package/es/index.d.ts +5 -0
  7. package/es/index.js +5 -0
  8. package/es/modules/dataCollection/collectionAttributeList.d.ts +20 -0
  9. package/es/modules/dataCollection/collectionAttributeList.js +458 -0
  10. package/es/modules/dataCollection/collectionEventList.d.ts +13 -0
  11. package/es/modules/dataCollection/collectionEventList.js +317 -0
  12. package/es/modules/dataCollection/demo/index.d.ts +2 -0
  13. package/es/modules/dataCollection/demo/index.js +6 -0
  14. package/es/modules/dataCollection/index.d.ts +3 -0
  15. package/es/modules/dataCollection/index.js +97 -0
  16. package/es/modules/dataCollection/styles/index.less +249 -0
  17. package/es/modules/dataCollection/tablePlus.d.ts +34 -0
  18. package/es/modules/dataCollection/tablePlus.js +598 -0
  19. package/es/modules/dataManage/demo/index.d.ts +2 -0
  20. package/es/modules/dataManage/demo/index.js +6 -0
  21. package/es/modules/dataManage/index.d.ts +4 -0
  22. package/es/modules/dataManage/index.js +58 -0
  23. package/es/modules/dataManage/styles/index.less +26 -0
  24. package/es/modules/dataPlan/addEventOrUser.d.ts +34 -0
  25. package/es/modules/dataPlan/addEventOrUser.js +280 -0
  26. package/es/modules/dataPlan/addPlan.d.ts +10 -0
  27. package/es/modules/dataPlan/addPlan.js +644 -0
  28. package/es/modules/dataPlan/demo/index.d.ts +2 -0
  29. package/es/modules/dataPlan/demo/index.js +6 -0
  30. package/es/modules/dataPlan/eventList.d.ts +23 -0
  31. package/es/modules/dataPlan/eventList.js +21 -0
  32. package/es/modules/dataPlan/index.d.ts +4 -0
  33. package/es/modules/dataPlan/index.js +233 -0
  34. package/es/modules/dataPlan/search.d.ts +11 -0
  35. package/es/modules/dataPlan/search.js +42 -0
  36. package/es/modules/dataPlan/styles/index.less +269 -0
  37. package/es/modules/dataPlan/tablePlus.d.ts +22 -0
  38. package/es/modules/dataPlan/tablePlus.js +106 -0
  39. package/es/modules/dataPlan/userAttributeList.d.ts +19 -0
  40. package/es/modules/dataPlan/userAttributeList.js +77 -0
  41. package/es/types/flow.d.ts +395 -0
  42. package/es/types/flow.js +77 -0
  43. package/es/types.d.ts +412 -0
  44. package/es/types.js +106 -0
  45. package/es/utils/ajax.d.ts +3 -0
  46. package/es/utils/ajax.js +7 -0
  47. package/package.json +60 -0
@@ -0,0 +1,34 @@
1
+ import React from 'react';
2
+ import './styles/index.less';
3
+ interface DataType {
4
+ key: React.Key;
5
+ groupId?: number;
6
+ groupName?: string;
7
+ event_name: string;
8
+ alias_name: string;
9
+ insert_time: string;
10
+ last_insert_time: string;
11
+ event_hidden: number;
12
+ is_stop: number;
13
+ event_attrs: [];
14
+ event_id: number;
15
+ is_delete: number;
16
+ _groupId?: number;
17
+ mark_type: number;
18
+ }
19
+ interface queryPlanType {
20
+ unexpectedPropList: string[];
21
+ unexpectedEventList: string[];
22
+ }
23
+ interface TablePlusType {
24
+ tableHandleData: DataType[];
25
+ Refresh: Function;
26
+ eventActiveFilter: Function;
27
+ markTypeFilter: Function;
28
+ isOpen: number;
29
+ queryPlanData: queryPlanType;
30
+ eventAttrDataHandle: Function;
31
+ loading: boolean;
32
+ }
33
+ declare const TablePlus: React.FC<TablePlusType>;
34
+ export default TablePlus;
@@ -0,0 +1,598 @@
1
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2
+
3
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
+
5
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
+
7
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
8
+
9
+ 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."); }
10
+
11
+ 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); }
12
+
13
+ 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; }
14
+
15
+ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
16
+
17
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
18
+
19
+ import { BizGlobalDataContext, IconFont } from '@zgfe/business-lib';
20
+ import { Input, Table, Select, message, Modal, Popover, Checkbox } from 'antd';
21
+ import request from '../../utils/ajax';
22
+ import apis from '../../constants/api';
23
+ var Option = Select.Option;
24
+ import React, { useState, useContext } from 'react';
25
+ import './styles/index.less';
26
+ import _ from 'lodash';
27
+
28
+ var TablePlus = function TablePlus(props) {
29
+ var classPrefix = 'table-plus';
30
+ var tableHandleData = props.tableHandleData,
31
+ queryPlanData = props.queryPlanData,
32
+ isOpen = props.isOpen;
33
+
34
+ var _useContext = useContext(BizGlobalDataContext),
35
+ currentApp = _useContext.currentApp,
36
+ isDemo = _useContext.isDemo; // 别名foucs
37
+
38
+
39
+ var _useState = useState(''),
40
+ _useState2 = _slicedToArray(_useState, 2),
41
+ aliasFocusData = _useState2[0],
42
+ setAliasFocusData = _useState2[1];
43
+
44
+ var aliasFocus = function aliasFocus(e) {
45
+ setAliasFocusData(e.currentTarget.value);
46
+ }; // 修改别名
47
+
48
+
49
+ var aliasNameBlur = function aliasNameBlur(e, record) {
50
+ if (aliasFocusData == e.currentTarget.value) return; // 失焦判断,内容无修改不请求接口
51
+
52
+ request(apis.updateEventInfo, {
53
+ method: 'post',
54
+ params: {
55
+ app_id: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
56
+ alias_name: e.currentTarget.value,
57
+ event_id: record.event_id
58
+ }
59
+ }).then(function (res) {
60
+ if (res) {
61
+ message.success('修改成功');
62
+ }
63
+ }).catch(function (err) {
64
+ message.success('修改失败');
65
+ }).finally(function () {});
66
+ }; // 表格class处理
67
+
68
+
69
+ var rowClassNameHandle = function rowClassNameHandle(record, index) {
70
+ if (record.groupId != undefined) {
71
+ return 'group-row';
72
+ } else {
73
+ var _queryPlanData$unexpe;
74
+
75
+ 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 ? 'error-row' : '';
76
+ }
77
+ }; // 控制修改分组名弹框 显示隐藏
78
+
79
+
80
+ var _useState3 = useState(false),
81
+ _useState4 = _slicedToArray(_useState3, 2),
82
+ eventNameShow = _useState4[0],
83
+ setEventNameShow = _useState4[1]; // 修改分组名数据
84
+
85
+
86
+ var _useState5 = useState(''),
87
+ _useState6 = _slicedToArray(_useState5, 2),
88
+ eventNameInput = _useState6[0],
89
+ setEventNameInput = _useState6[1];
90
+
91
+ var _useState7 = useState({}),
92
+ _useState8 = _slicedToArray(_useState7, 2),
93
+ eventNameData = _useState8[0],
94
+ setEventNameData = _useState8[1]; // 修改分组名
95
+
96
+
97
+ var eventNameEdit = function eventNameEdit() {
98
+ request(apis.upsertEventGroup, {
99
+ method: 'post',
100
+ data: {
101
+ eventGroupName: eventNameInput,
102
+ eventGroupId: eventNameData.groupId,
103
+ appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
104
+ platform: 0
105
+ }
106
+ }).then(function (res) {
107
+ if (res) {
108
+ message.success('修改成功');
109
+ setEventNameShow(false);
110
+ props.Refresh();
111
+ }
112
+ }).catch(function (err) {
113
+ message.success('修改失败');
114
+ }).finally(function () {});
115
+ }; // 删除分组
116
+
117
+
118
+ var eventNameDel = function eventNameDel(eventGroupId) {
119
+ var deteleFlag = true;
120
+ tableHandleData.map(function (item) {
121
+ item._groupId == eventGroupId ? deteleFlag = false : null;
122
+ });
123
+ if (!deteleFlag) return message.error('分组内存在事件,无法删除');
124
+ Modal.confirm({
125
+ centered: true,
126
+ title: '是否确认删除?',
127
+ okText: '确认',
128
+ cancelText: '取消',
129
+ maskClosable: false,
130
+ onOk: function onOk() {
131
+ request(apis.deleteEventGroup, {
132
+ method: 'post',
133
+ data: {
134
+ appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
135
+ eventGroupId: eventGroupId
136
+ }
137
+ }).then(function (res) {
138
+ if (res) {
139
+ message.success('删除成功');
140
+ props.Refresh();
141
+ }
142
+ }).catch(function (err) {
143
+ message.success('删除失败');
144
+ }).finally(function () {});
145
+ }
146
+ });
147
+ }; // 删除事件
148
+
149
+
150
+ var eventItemDel = function eventItemDel(event_id) {
151
+ Modal.confirm({
152
+ centered: true,
153
+ title: '是否确认删除?',
154
+ content: '删除后,将停止采集该事件数据,也将不在分析平台中显示!',
155
+ okText: '确认',
156
+ cancelText: '取消',
157
+ maskClosable: false,
158
+ onOk: function onOk() {
159
+ request(apis.deleteEventMeta, {
160
+ method: 'post',
161
+ params: {
162
+ app_id: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
163
+ event_id: event_id
164
+ }
165
+ }).then(function (res) {
166
+ if (res) {
167
+ message.success('删除成功');
168
+ props.Refresh();
169
+ }
170
+ }).catch(function (err) {
171
+ message.success('删除失败');
172
+ }).finally(function () {});
173
+ }
174
+ });
175
+ }; // 修改:显示状态 | 采集状态 | 收藏&取消收藏
176
+
177
+
178
+ var eventHiddenChange = function eventHiddenChange(e, type, event_id) {
179
+ var _temp;
180
+
181
+ switch (type) {
182
+ case 'event_hidden':
183
+ _temp = {
184
+ hidden: e
185
+ };
186
+ break;
187
+
188
+ case 'is_stop':
189
+ _temp = {
190
+ is_stop: e
191
+ };
192
+ break;
193
+
194
+ case 'mark_type':
195
+ _temp = {
196
+ mark_type: e == null ? 1 : 0
197
+ };
198
+ break;
199
+ }
200
+
201
+ request(apis.updateEventInfo, {
202
+ method: 'post',
203
+ params: _objectSpread({
204
+ app_id: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
205
+ event_id: event_id
206
+ }, _temp)
207
+ }).then(function (res) {
208
+ if (res) {
209
+ message.success('修改成功');
210
+ props.Refresh();
211
+ }
212
+ }).catch(function (err) {
213
+ message.success('修改失败');
214
+ }).finally(function () {});
215
+ }; // 复制事件名称
216
+
217
+
218
+ var copyEventName = function copyEventName(event_name) {
219
+ navigator.clipboard.writeText(event_name);
220
+ message.success('复制成功');
221
+ }; // 手否筛选收藏
222
+
223
+
224
+ var _useState9 = useState(false),
225
+ _useState10 = _slicedToArray(_useState9, 2),
226
+ markActive = _useState10[0],
227
+ setMarkActive = _useState10[1]; // 分组操作-勾选数据
228
+
229
+
230
+ var _useState11 = useState({}),
231
+ _useState12 = _slicedToArray(_useState11, 2),
232
+ groupCheckedData = _useState12[0],
233
+ setGroupCheckedData = _useState12[1];
234
+
235
+ var eventItemCheckbox = function eventItemCheckbox(e, data) {
236
+ // console.log(e.target.checked, data._groupId, data.event_id);
237
+ var _groupCheckedData = _.cloneDeep(groupCheckedData);
238
+
239
+ if (e.target.checked) {
240
+ _groupCheckedData[data._groupId] == undefined ? _groupCheckedData[data._groupId] = [] : null;
241
+
242
+ _groupCheckedData[data._groupId].push(data.event_id);
243
+ } else {
244
+ _.remove(_groupCheckedData[data._groupId], function (x) {
245
+ return x === data.event_id;
246
+ });
247
+ }
248
+
249
+ setGroupCheckedData(_groupCheckedData);
250
+ }; // useEffect(() => {
251
+ // console.log('groupCheckedData', groupCheckedData);
252
+ // }, [groupCheckedData]);
253
+ // 判断每一行的选中
254
+
255
+
256
+ var checkedItemHandle = function checkedItemHandle(record) {
257
+ // console.log(record.event_id, record._groupId, groupCheckedData);
258
+ if (Object.keys(groupCheckedData).length <= 0) {
259
+ return false;
260
+ } else {
261
+ return groupCheckedData[record._groupId] && groupCheckedData[record._groupId].indexOf(record.event_id) != -1;
262
+ }
263
+ }; // 移入到组、移出分组、复制到组
264
+
265
+
266
+ var groupHandle = function groupHandle(type, data, eventGroupId) {
267
+ // console.log('type', type, eventGroupId, data.groupId);
268
+ var _temp = {};
269
+ if (eventGroupId != undefined) _temp = {
270
+ eventGroupId: eventGroupId
271
+ };
272
+ request(apis.operateGroupRelations, {
273
+ method: 'post',
274
+ data: _objectSpread({
275
+ appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
276
+ platform: 0,
277
+ hasPublicAttrView: true,
278
+ eventIds: groupCheckedData[data.groupId].join(','),
279
+ oldEventGroupId: data.groupId
280
+ }, _temp)
281
+ }).then(function (res) {
282
+ message.success('成功');
283
+
284
+ var _groupCheckedData = _.cloneDeep(groupCheckedData);
285
+
286
+ delete _groupCheckedData[eventGroupId];
287
+ setGroupCheckedData({});
288
+ }).catch(function (err) {
289
+ message.success('失败');
290
+ }).finally(function () {
291
+ props.Refresh();
292
+ });
293
+ };
294
+
295
+ var groupPopoverContent = function groupPopoverContent(data, type) {
296
+ var count = 0;
297
+ var element = tableHandleData.map(function (item, index) {
298
+ item.groupId != undefined ? count++ : null;
299
+ if (type == 'copy' && item.groupId == -1) return null; // 复制到组,移出未分组
300
+
301
+ return item.groupId != undefined && item.groupId != data.groupId ? /*#__PURE__*/React.createElement("div", {
302
+ onClick: function onClick() {
303
+ return groupHandle(type, data, item.groupId);
304
+ },
305
+ style: {
306
+ lineHeight: '30px',
307
+ cursor: 'pointer'
308
+ },
309
+ key: index
310
+ }, item.groupId == -1 ? '未分组' : item.groupName) : null;
311
+ }); // console.log(element, count);
312
+ // 复制分组时:除未分组外,如只有一个分组,则不展示复制分组
313
+
314
+ return count <= 2 && type == 'copy' ? null : element;
315
+ };
316
+
317
+ var columns = [{
318
+ title: /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(IconFont, {
319
+ style: {
320
+ color: markActive ? '#fd9f41' : '#999',
321
+ marginRight: '4px'
322
+ },
323
+ onClick: function onClick() {
324
+ props.markTypeFilter(!markActive);
325
+ setMarkActive(!markActive);
326
+ },
327
+ type: markActive ? 'shoucang' : 'shoucang-kong'
328
+ }), "\u540D\u79F0"),
329
+ dataIndex: 'event_name',
330
+ key: 'event_name',
331
+ fixed: 'left',
332
+ width: 180,
333
+ render: function render(text, record, index) {
334
+ if (record.groupId) {
335
+ var _groupCheckedData$rec;
336
+
337
+ return /*#__PURE__*/React.createElement("div", {
338
+ className: "group-box"
339
+ }, /*#__PURE__*/React.createElement(IconFont, {
340
+ type: "left"
341
+ }), /*#__PURE__*/React.createElement("span", {
342
+ className: "group-text"
343
+ }, record.groupId == -1 ? '未分组' : record.groupName), ((_groupCheckedData$rec = groupCheckedData[record.groupId]) === null || _groupCheckedData$rec === void 0 ? void 0 : _groupCheckedData$rec.length) > 0 && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Popover, {
344
+ content: function content() {
345
+ return groupPopoverContent(record, 'move-in');
346
+ },
347
+ trigger: "click",
348
+ placement: "bottom"
349
+ }, /*#__PURE__*/React.createElement("span", {
350
+ className: "group-handle"
351
+ }, "\u79FB\u52A8\u5230\u7EC4")), record.groupId != -1 && /*#__PURE__*/React.createElement(React.Fragment, null, groupPopoverContent(record, 'copy') != null && /*#__PURE__*/React.createElement(Popover, {
352
+ content: function content() {
353
+ return groupPopoverContent(record, 'copy');
354
+ },
355
+ trigger: "click",
356
+ placement: "bottom"
357
+ }, /*#__PURE__*/React.createElement("span", {
358
+ className: "group-handle"
359
+ }, "\u590D\u5236\u5230\u7EC4")), /*#__PURE__*/React.createElement("span", {
360
+ className: "group-handle",
361
+ onClick: function onClick() {
362
+ return groupHandle('move-out', record);
363
+ }
364
+ }, "\u79FB\u51FA\u5206\u7EC4"))));
365
+ } else {
366
+ return /*#__PURE__*/React.createElement("div", {
367
+ className: "event_name"
368
+ }, /*#__PURE__*/React.createElement(Checkbox, {
369
+ checked: checkedItemHandle(record),
370
+ onChange: function onChange(e) {
371
+ return eventItemCheckbox(e, record);
372
+ }
373
+ }), /*#__PURE__*/React.createElement(IconFont, {
374
+ className: record.mark_type == 1 ? 'collect-icon-active' : 'collect-icon',
375
+ onClick: function onClick() {
376
+ return eventHiddenChange(record.mark_type, 'mark_type', record.event_id);
377
+ },
378
+ type: record.mark_type == 1 ? 'shoucang' : 'shoucang-kong'
379
+ }), /*#__PURE__*/React.createElement(Popover, {
380
+ content: text
381
+ }, /*#__PURE__*/React.createElement("span", {
382
+ className: "event_name-text"
383
+ }, text)), /*#__PURE__*/React.createElement(IconFont, {
384
+ className: "copy-text",
385
+ onClick: function onClick() {
386
+ return copyEventName(record.event_name);
387
+ },
388
+ type: "fuzhi"
389
+ }));
390
+ }
391
+ }
392
+ }, {
393
+ title: '别名',
394
+ dataIndex: 'alias_name',
395
+ key: 'alias_name',
396
+ width: 167,
397
+ render: function render(text, record, index) {
398
+ return /*#__PURE__*/React.createElement(Input, {
399
+ className: "alias_name",
400
+ placeholder: "\u7F16\u8F91\u522B\u540D",
401
+ defaultValue: record.alias_name,
402
+ onFocus: aliasFocus,
403
+ onBlur: function onBlur(e) {
404
+ aliasNameBlur(e, record);
405
+ }
406
+ });
407
+ }
408
+ }, {
409
+ title: '首次上报时间',
410
+ dataIndex: 'insert_time',
411
+ key: 'insert_time',
412
+ width: 187,
413
+ render: function render(text, record, index) {
414
+ return /*#__PURE__*/React.createElement("div", {
415
+ className: "insert_time"
416
+ }, text);
417
+ }
418
+ }, {
419
+ title: '末次上报时间',
420
+ dataIndex: 'last_insert_time',
421
+ key: 'last_insert_time',
422
+ width: 187,
423
+ render: function render(text, record, index) {
424
+ return /*#__PURE__*/React.createElement("div", null, record.insert_time);
425
+ }
426
+ }, {
427
+ title: /*#__PURE__*/React.createElement(Select, {
428
+ defaultValue: -1,
429
+ bordered: false,
430
+ style: {
431
+ width: 150
432
+ },
433
+ suffixIcon: /*#__PURE__*/React.createElement(IconFont, {
434
+ type: "paixu"
435
+ }),
436
+ onChange: function onChange(e) {
437
+ return props.eventActiveFilter(e, 'event_hidden');
438
+ },
439
+ options: [{
440
+ value: -1,
441
+ label: '所有显示状态'
442
+ }, {
443
+ value: 1,
444
+ label: '隐藏'
445
+ }, {
446
+ value: 0,
447
+ label: '显示'
448
+ }]
449
+ }),
450
+ dataIndex: 'event_hidden',
451
+ key: 'event_hidden',
452
+ width: 167,
453
+ render: function render(text, record, index) {
454
+ return /*#__PURE__*/React.createElement(Select, {
455
+ defaultValue: record.event_hidden,
456
+ style: {
457
+ width: 150
458
+ },
459
+ onChange: function onChange(e) {
460
+ return eventHiddenChange(e, 'event_hidden', record.event_id);
461
+ },
462
+ options: [{
463
+ value: 1,
464
+ label: '隐藏'
465
+ }, {
466
+ value: 0,
467
+ label: '显示'
468
+ }]
469
+ });
470
+ }
471
+ }, {
472
+ title: /*#__PURE__*/React.createElement(Select, {
473
+ defaultValue: -1,
474
+ bordered: false,
475
+ style: {
476
+ width: 150
477
+ },
478
+ suffixIcon: /*#__PURE__*/React.createElement(IconFont, {
479
+ type: "paixu"
480
+ }),
481
+ onChange: function onChange(e) {
482
+ return props.eventActiveFilter(e, 'is_stop');
483
+ },
484
+ options: [{
485
+ value: -1,
486
+ label: '所有采集状态'
487
+ }, {
488
+ value: 1,
489
+ label: '停止采集'
490
+ }, {
491
+ value: 0,
492
+ label: '采集中'
493
+ }]
494
+ }),
495
+ dataIndex: 'is_stop',
496
+ key: 'is_stop',
497
+ width: 167,
498
+ render: function render(text, record, index) {
499
+ return /*#__PURE__*/React.createElement(Select, {
500
+ defaultValue: record.is_stop,
501
+ style: {
502
+ width: 150
503
+ },
504
+ onChange: function onChange(e) {
505
+ return eventHiddenChange(e, 'is_stop', record.event_id);
506
+ },
507
+ options: [{
508
+ value: 1,
509
+ label: '停止采集'
510
+ }, {
511
+ value: 0,
512
+ label: '采集中'
513
+ }]
514
+ });
515
+ }
516
+ }, {
517
+ title: '事件属性',
518
+ dataIndex: 'event_attrs',
519
+ key: 'event_attrs',
520
+ width: 167,
521
+ render: function render(text, record, index) {
522
+ return /*#__PURE__*/React.createElement("div", {
523
+ className: "event_attrs"
524
+ }, record.event_attrs.length, /*#__PURE__*/React.createElement(IconFont, {
525
+ type: "bianji1",
526
+ onClick: function onClick() {
527
+ props.eventAttrDataHandle(record);
528
+ }
529
+ }));
530
+ }
531
+ }, {
532
+ title: '操作',
533
+ dataIndex: 'set',
534
+ key: 'set',
535
+ width: 80,
536
+ fixed: 'right',
537
+ render: function render(text, record, index) {
538
+ if (record.groupId) {
539
+ if (record.groupId == -1) return '';
540
+ return /*#__PURE__*/React.createElement("div", {
541
+ className: "edit-del"
542
+ }, /*#__PURE__*/React.createElement(IconFont, {
543
+ onClick: function onClick() {
544
+ setEventNameData({
545
+ groupName: record.groupName,
546
+ groupId: record.groupId
547
+ });
548
+ setEventNameShow(true);
549
+ },
550
+ type: "bianji"
551
+ }), /*#__PURE__*/React.createElement(IconFont, {
552
+ onClick: function onClick() {
553
+ return eventNameDel(record.groupId);
554
+ },
555
+ type: "shanchu"
556
+ }));
557
+ } else {
558
+ return /*#__PURE__*/React.createElement("div", {
559
+ className: "set",
560
+ onClick: function onClick() {
561
+ return eventItemDel(record.event_id);
562
+ }
563
+ }, "\u5220\u9664");
564
+ }
565
+ }
566
+ }];
567
+ return /*#__PURE__*/React.createElement("div", {
568
+ className: classPrefix
569
+ }, /*#__PURE__*/React.createElement(Table, {
570
+ className: "".concat(classPrefix, "-table"),
571
+ columns: columns,
572
+ rowKey: "key",
573
+ loading: props.loading,
574
+ dataSource: tableHandleData,
575
+ rowClassName: function rowClassName(record, index) {
576
+ return rowClassNameHandle(record, index);
577
+ },
578
+ scroll: {
579
+ x: 1300,
580
+ y: 550
581
+ },
582
+ pagination: false
583
+ }), /*#__PURE__*/React.createElement(Modal, {
584
+ title: "\u4FEE\u6539\u5206\u7EC4\u540D",
585
+ visible: eventNameShow,
586
+ onOk: eventNameEdit,
587
+ onCancel: function onCancel() {
588
+ return setEventNameShow(false);
589
+ }
590
+ }, /*#__PURE__*/React.createElement(Input, {
591
+ placeholder: "\u8BF7\u8F93\u5165\u5206\u7EC4\u540D",
592
+ onChange: function onChange(e) {
593
+ return setEventNameInput(e.currentTarget.value);
594
+ }
595
+ })));
596
+ };
597
+
598
+ export default TablePlus;
@@ -0,0 +1,2 @@
1
+ declare const _default: () => JSX.Element;
2
+ export default _default;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { DataManage } from '@zgfe/modules-dm';
3
+ import DemoWrapper from '../../../components/demo';
4
+ export default (function () {
5
+ return /*#__PURE__*/React.createElement(DemoWrapper, null, /*#__PURE__*/React.createElement(DataManage, null));
6
+ });
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import './styles/index.less';
3
+ declare const DataManage: React.FC;
4
+ export default DataManage;