@zgfe/modules-dm 1.0.34-heyh.29 → 1.0.34-heyh.32

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.
@@ -190,6 +190,7 @@ var CreateVirtualDrawer = function CreateVirtualDrawer(props) {
190
190
  message: '仅能输入英文、符号、数字'
191
191
  }]
192
192
  }, /*#__PURE__*/React.createElement(Input, {
193
+ placeholder: "\u8BF7\u8F93\u5165\u865A\u62DF\u4E8B\u4EF6\u540D\u79F0",
193
194
  maxLength: 20,
194
195
  disabled: virtualDrawerType === 'edit'
195
196
  })), /*#__PURE__*/React.createElement(Form.Item, {
@@ -200,6 +201,7 @@ var CreateVirtualDrawer = function CreateVirtualDrawer(props) {
200
201
  message: '请输入虚拟事件别名'
201
202
  }]
202
203
  }, /*#__PURE__*/React.createElement(Input, {
204
+ placeholder: "\u8BF7\u8F93\u5165\u865A\u62DF\u4E8B\u4EF6\u522B\u540D",
203
205
  maxLength: 20
204
206
  })), /*#__PURE__*/React.createElement(Form.Item, {
205
207
  label: "\u5206\u7EC4",
@@ -12,15 +12,16 @@ 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, BizLoading } from '@zgfe/business-lib';
14
14
  import { Input, Modal, message, Drawer, Popover, Checkbox, Select, Button } from 'antd';
15
- import { DragDropContext, Droppable, Draggable } from 'react-beautiful-dnd';
16
15
  import request from '../../../utils/ajax';
17
16
  import apis from '../../../constants/api';
18
- import { eventListHandle, groupListSort, eventCheckedAll, openChangeData, eventShowOrHiddenData, eventMoveData, getAppID, eventShow } from '../../../utils/index';
17
+ import { eventListHandle, eventCheckedAll, openChangeData, eventShowOrHiddenData, eventMoveData, getAppID, eventShow } from '../../../utils/index';
19
18
  import React, { Fragment, useContext, useEffect, useState } from 'react';
20
19
  import _ from 'lodash';
21
- import SortableComponnet from './sortableComponnet';
20
+ import EventItem from './eventItem';
22
21
  var requestMove = false;
23
22
  import { DmContext } from '../../../store';
23
+ import { SortableContainer, SortableElement, SortableHandle } from 'react-sortable-hoc';
24
+ import { arrayMoveImmutable } from 'array-move';
24
25
  var EventGroupingDrawer = function EventGroupingDrawer(props) {
25
26
  var classPrefix = 'event-grouping-drawer';
26
27
  var eventGroupingShow = props.eventGroupingShow,
@@ -36,18 +37,14 @@ var EventGroupingDrawer = function EventGroupingDrawer(props) {
36
37
  setGroupingData = _useState2[1];
37
38
  var _useContext2 = useContext(DmContext),
38
39
  state = _useContext2.state;
39
- var _useState3 = useState(false),
40
+ var _useState3 = useState(''),
40
41
  _useState4 = _slicedToArray(_useState3, 2),
41
- isDragDisabled = _useState4[0],
42
- setIsDragDisabled = _useState4[1];
43
- var _useState5 = useState(''),
42
+ searchData = _useState4[0],
43
+ setSearchData = _useState4[1];
44
+ var _useState5 = useState(false),
44
45
  _useState6 = _slicedToArray(_useState5, 2),
45
- searchData = _useState6[0],
46
- setSearchData = _useState6[1];
47
- var _useState7 = useState(false),
48
- _useState8 = _slicedToArray(_useState7, 2),
49
- loading = _useState8[0],
50
- setLoading = _useState8[1];
46
+ loading = _useState6[0],
47
+ setLoading = _useState6[1];
51
48
  var queryList = function queryList() {
52
49
  setLoading(true);
53
50
  request(apis.queryCollectionEventList, {
@@ -60,8 +57,6 @@ var EventGroupingDrawer = function EventGroupingDrawer(props) {
60
57
  }).then(function (res) {
61
58
  if (res && res.data) {
62
59
  var _data = eventListHandle(res.data);
63
- // setInitialData(_data);
64
- // setGroupingData(eventShow(_.cloneDeep(_data), searchData));
65
60
  setGroupingData(_data);
66
61
  }
67
62
  setLoading(false);
@@ -84,32 +79,14 @@ var EventGroupingDrawer = function EventGroupingDrawer(props) {
84
79
  var openChange = function openChange(groupId) {
85
80
  setGroupingData(_.cloneDeep(openChangeData(groupId, groupingData)));
86
81
  };
87
- // 拖拽之后改变对应数据
88
- var onDragEnd = function onDragEnd(result) {
89
- // console.log('拖拽之后改变对应数据: ', result);
90
- // 分组移动
91
- if (result.source.droppableId.indexOf('item') === -1) {
92
- var ids = groupListSort(result, groupingData, setGroupingData);
93
- request(apis.orderEventGroup, {
94
- method: 'post',
95
- data: {
96
- appId: getAppID(currentApp),
97
- ids: ids
98
- }
99
- }).then(function () {
100
- // queryList();
101
- refresh();
102
- });
103
- }
104
- setIsDragDisabled(false);
105
- };
106
82
  // 删除事件分组
107
83
  var groupDelete = function groupDelete(groupId) {
108
- if (!authority[source === "virtual" ? 1700636179 : 1700636359]) {
84
+ if (!authority[source === 'virtual' ? 1700636179 : 1700636359]) {
109
85
  message.error('无操作权限');
110
86
  return;
111
87
  }
112
88
  Modal.confirm({
89
+ wrapClassName: 'dm-modal-confirm',
113
90
  centered: true,
114
91
  title: '提示',
115
92
  content: '是否确认删除?',
@@ -156,26 +133,26 @@ var EventGroupingDrawer = function EventGroupingDrawer(props) {
156
133
  }
157
134
  };
158
135
  // 移动
159
- var _useState9 = useState(undefined),
136
+ var _useState7 = useState(undefined),
137
+ _useState8 = _slicedToArray(_useState7, 2),
138
+ eventMoveShow = _useState8[0],
139
+ setEventMoveShow = _useState8[1];
140
+ var _useState9 = useState(-1),
160
141
  _useState10 = _slicedToArray(_useState9, 2),
161
- eventMoveShow = _useState10[0],
162
- setEventMoveShow = _useState10[1];
163
- var _useState11 = useState(-1),
142
+ eventMoveChangeId = _useState10[0],
143
+ setEventMoveChangeId = _useState10[1];
144
+ var _useState11 = useState([]),
164
145
  _useState12 = _slicedToArray(_useState11, 2),
165
- eventMoveChangeId = _useState12[0],
166
- setEventMoveChangeId = _useState12[1];
167
- var _useState13 = useState([]),
146
+ eventMoveOption = _useState12[0],
147
+ setEventMoveOption = _useState12[1];
148
+ var _useState13 = useState(0),
168
149
  _useState14 = _slicedToArray(_useState13, 2),
169
- eventMoveOption = _useState14[0],
170
- setEventMoveOption = _useState14[1];
171
- var _useState15 = useState(0),
150
+ eventMoveLength = _useState14[0],
151
+ setEventMoveLength = _useState14[1];
152
+ var _useState15 = useState(''),
172
153
  _useState16 = _slicedToArray(_useState15, 2),
173
- eventMoveLength = _useState16[0],
174
- setEventMoveLength = _useState16[1];
175
- var _useState17 = useState(''),
176
- _useState18 = _slicedToArray(_useState17, 2),
177
- eventMoveIds = _useState18[0],
178
- setEventMoveIds = _useState18[1];
154
+ eventMoveIds = _useState16[0],
155
+ setEventMoveIds = _useState16[1];
179
156
  var eventMove = function eventMove(groupId) {
180
157
  var data = eventMoveData(groupId, groupingData, setGroupingData);
181
158
  setEventMoveOption(data.groupingOption);
@@ -241,18 +218,18 @@ var EventGroupingDrawer = function EventGroupingDrawer(props) {
241
218
  }, "\u786E\u5B9A")));
242
219
  };
243
220
  // 创建分组 & 修改分组名
244
- var _useState19 = useState(null),
221
+ var _useState17 = useState(null),
222
+ _useState18 = _slicedToArray(_useState17, 2),
223
+ createOrEditGrpup = _useState18[0],
224
+ setCreateOrEditGrpup = _useState18[1];
225
+ var _useState19 = useState(-1),
245
226
  _useState20 = _slicedToArray(_useState19, 2),
246
- createOrEditGrpup = _useState20[0],
247
- setCreateOrEditGrpup = _useState20[1];
248
- var _useState21 = useState(-1),
227
+ grpupModalSelectGrpupId = _useState20[0],
228
+ setGrpupModalSelectGrpupId = _useState20[1];
229
+ var _useState21 = useState(''),
249
230
  _useState22 = _slicedToArray(_useState21, 2),
250
- grpupModalSelectGrpupId = _useState22[0],
251
- setGrpupModalSelectGrpupId = _useState22[1];
252
- var _useState23 = useState(''),
253
- _useState24 = _slicedToArray(_useState23, 2),
254
- grpupNameInput = _useState24[0],
255
- setGrpupNameInput = _useState24[1];
231
+ grpupNameInput = _useState22[0],
232
+ setGrpupNameInput = _useState22[1];
256
233
  var GrpupModalHandle = function GrpupModalHandle() {
257
234
  if (grpupNameInput === '') {
258
235
  message.error('请填写分组名');
@@ -289,6 +266,122 @@ var EventGroupingDrawer = function EventGroupingDrawer(props) {
289
266
  setGrpupModalSelectGrpupId(-1);
290
267
  setGrpupNameInput('');
291
268
  };
269
+ // 拖动手柄
270
+ var DragHandle = SortableHandle(function () {
271
+ return /*#__PURE__*/React.createElement(IconFont, {
272
+ type: "tuozhuai1"
273
+ });
274
+ });
275
+ // 需要拖动的元素的容器
276
+ var SortableItem = SortableElement(function (data) {
277
+ var _data$value = data.value,
278
+ item = _data$value.item,
279
+ index = _data$value.index;
280
+ return /*#__PURE__*/React.createElement("div", {
281
+ className: "".concat(classPrefix, "-box"),
282
+ key: index
283
+ }, /*#__PURE__*/React.createElement("div", {
284
+ className: "".concat(classPrefix, "-box-header")
285
+ }, /*#__PURE__*/React.createElement("div", {
286
+ className: "operate-left"
287
+ }, /*#__PURE__*/React.createElement("div", {
288
+ id: "create-or-edit-grpup-modal"
289
+ }, item.open && /*#__PURE__*/React.createElement(IconFont, {
290
+ type: "fangxiangxia",
291
+ onClick: function onClick() {
292
+ return openChange(item.groupId);
293
+ }
294
+ }), !item.open && /*#__PURE__*/React.createElement(IconFont, {
295
+ type: "fangxiangshang",
296
+ onClick: function onClick() {
297
+ return openChange(item.groupId);
298
+ }
299
+ }), /*#__PURE__*/React.createElement("div", null, item.groupName ? item.groupName : '未分组'), item.groupName && /*#__PURE__*/React.createElement(IconFont, {
300
+ type: "zhongmingming",
301
+ onClick: function onClick() {
302
+ if (!authority[source === 'virtual' ? 1700636172 : 1700636344]) {
303
+ message.error('无操作权限');
304
+ return;
305
+ }
306
+ setCreateOrEditGrpup('edit');
307
+ setGrpupNameInput(item.groupName ? item.groupName : '未分组');
308
+ setGrpupModalSelectGrpupId(item.groupId);
309
+ }
310
+ })), /*#__PURE__*/React.createElement("div", null, item.count, "\u4E2A\u6307\u6807")), /*#__PURE__*/React.createElement("div", {
311
+ className: "operate-right"
312
+ }, item.count > 0 && /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(Checkbox, {
313
+ checked: item.checked,
314
+ onChange: function onChange() {
315
+ return onChangeAll(item.groupId);
316
+ }
317
+ }, "\u5168\u9009"), /*#__PURE__*/React.createElement(Popover, {
318
+ overlayClassName: "move-popover ".concat(eventMoveLength ? 'show' : 'hidden'),
319
+ placement: "bottomRight",
320
+ open: eventMoveShow === item.groupId,
321
+ title: null,
322
+ content: moveContent
323
+ }, /*#__PURE__*/React.createElement("span", {
324
+ className: "".concat(groupingData.length > 1 ? '' : 'not-operable'),
325
+ onClick: function onClick() {
326
+ if (groupingData.length > 1) {
327
+ eventMove(item.groupId);
328
+ }
329
+ }
330
+ }, "\u79FB\u52A8")), /*#__PURE__*/React.createElement("span", {
331
+ onClick: function onClick() {
332
+ return eventShowOrHidden(0, item.groupId);
333
+ }
334
+ }, "\u663E\u793A"), /*#__PURE__*/React.createElement("span", {
335
+ onClick: function onClick() {
336
+ return eventShowOrHidden(1, item.groupId);
337
+ }
338
+ }, "\u9690\u85CF")), item.groupName && /*#__PURE__*/React.createElement("span", {
339
+ onClick: function onClick() {
340
+ return groupDelete(item.groupId);
341
+ }
342
+ }, "\u5220\u9664"), /*#__PURE__*/React.createElement(DragHandle, null))), /*#__PURE__*/React.createElement("div", {
343
+ className: "".concat(classPrefix, "-box-content ").concat(item.open ? 'open' : 'close')
344
+ }, /*#__PURE__*/React.createElement(EventItem, {
345
+ componnetData: item.eventList,
346
+ componnetIndex: index,
347
+ groupId: item.groupId,
348
+ groupingData: groupingData,
349
+ setGroupingData: setGroupingData,
350
+ searchData: searchData
351
+ })));
352
+ });
353
+ // 拖拽盒子容器
354
+ var SortableList = SortableContainer(function () {
355
+ return /*#__PURE__*/React.createElement("div", null, groupingData.map(function (item, index) {
356
+ return /*#__PURE__*/React.createElement(SortableItem, {
357
+ key: "item-".concat(index),
358
+ index: index,
359
+ value: {
360
+ item: item,
361
+ index: index
362
+ }
363
+ });
364
+ }));
365
+ });
366
+ var onSortEnd = function onSortEnd(data) {
367
+ var oldIndex = data.oldIndex,
368
+ newIndex = data.newIndex;
369
+ var _groupingData = arrayMoveImmutable(groupingData, oldIndex, newIndex);
370
+ setGroupingData(_.cloneDeep(_groupingData));
371
+ var ids = [];
372
+ _groupingData.map(function (item) {
373
+ ids.push(item.groupId);
374
+ });
375
+ request(apis.orderEventGroup, {
376
+ method: 'post',
377
+ data: {
378
+ appId: getAppID(currentApp),
379
+ ids: ids.join(',')
380
+ }
381
+ }).then(function () {
382
+ refresh();
383
+ });
384
+ };
292
385
  return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(Drawer, {
293
386
  className: classPrefix,
294
387
  width: 700,
@@ -314,112 +407,24 @@ var EventGroupingDrawer = function EventGroupingDrawer(props) {
314
407
  className: "".concat(classPrefix, "-top-box")
315
408
  }, /*#__PURE__*/React.createElement(Input, {
316
409
  placeholder: "\u8BF7\u8F93\u5165\u4E8B\u4EF6\u540D\u79F0\u6216\u522B\u540D",
317
- onChange: onSearchChange
410
+ onChange: onSearchChange,
411
+ prefix: /*#__PURE__*/React.createElement(IconFont, {
412
+ type: "sousuo"
413
+ })
318
414
  }), /*#__PURE__*/React.createElement(Button, {
319
415
  type: "primary",
320
416
  size: "small",
321
- disabled: !authority[source === "virtual" ? 1700636137 : 1000002],
417
+ disabled: !authority[source === 'virtual' ? 1700636137 : 1000002],
322
418
  onClick: function onClick() {
323
419
  setCreateOrEditGrpup('create');
324
420
  }
325
- }, "\u521B\u5EFA\u5206\u7EC4")), /*#__PURE__*/React.createElement(DragDropContext, {
326
- onDragEnd: onDragEnd
327
- }, groupingData.map(function (item, index) {
328
- return /*#__PURE__*/React.createElement(Droppable, {
329
- droppableId: index.toString(),
330
- key: index,
331
- type: "person",
332
- isDragDisabled: false,
333
- direction: "vertical"
334
- }, function (provided) {
335
- return /*#__PURE__*/React.createElement("div", _objectSpread({
336
- key: index,
337
- ref: provided.innerRef
338
- }, provided.droppableProps), /*#__PURE__*/React.createElement(Draggable, {
339
- isDragDisabled: isDragDisabled,
340
- key: item.groupId.toString(),
341
- draggableId: item.groupId.toString(),
342
- index: index
343
- }, function (provided) {
344
- return /*#__PURE__*/React.createElement("div", _objectSpread({
345
- ref: provided.innerRef
346
- }, provided.draggableProps), /*#__PURE__*/React.createElement("div", {
347
- className: "".concat(classPrefix, "-box")
348
- }, /*#__PURE__*/React.createElement("div", {
349
- className: "".concat(classPrefix, "-box-header")
350
- }, /*#__PURE__*/React.createElement("div", {
351
- className: "operate-left"
352
- }, /*#__PURE__*/React.createElement("div", {
353
- id: "create-or-edit-grpup-modal"
354
- }, item.open && /*#__PURE__*/React.createElement(IconFont, {
355
- type: "fangxiangxia",
356
- onClick: function onClick() {
357
- return openChange(item.groupId);
358
- }
359
- }), !item.open && /*#__PURE__*/React.createElement(IconFont, {
360
- type: "fangxiangshang",
361
- onClick: function onClick() {
362
- return openChange(item.groupId);
363
- }
364
- }), /*#__PURE__*/React.createElement("div", null, item.groupName ? item.groupName : '未分组'), item.groupName && /*#__PURE__*/React.createElement(IconFont, {
365
- type: "zhongmingming",
366
- onClick: function onClick() {
367
- if (!authority[source === "virtual" ? 1700636172 : 1700636344]) {
368
- message.error('无操作权限');
369
- return;
370
- }
371
- setCreateOrEditGrpup('edit');
372
- setGrpupNameInput(item.groupName ? item.groupName : '未分组');
373
- setGrpupModalSelectGrpupId(item.groupId);
374
- }
375
- })), /*#__PURE__*/React.createElement("div", null, item.count, "\u4E2A\u6307\u6807")), /*#__PURE__*/React.createElement("div", {
376
- className: "operate-right"
377
- }, item.count > 0 && /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(Checkbox, {
378
- checked: item.checked,
379
- onChange: function onChange() {
380
- return onChangeAll(item.groupId);
381
- }
382
- }, "\u5168\u9009"), /*#__PURE__*/React.createElement(Popover, {
383
- overlayClassName: "move-popover ".concat(eventMoveLength ? 'show' : 'hidden'),
384
- placement: "bottomRight",
385
- open: eventMoveShow === item.groupId,
386
- title: null,
387
- content: moveContent
388
- }, /*#__PURE__*/React.createElement("span", {
389
- className: "".concat(groupingData.length > 1 ? '' : 'not-operable'),
390
- onClick: function onClick() {
391
- if (groupingData.length > 1) {
392
- eventMove(item.groupId);
393
- }
394
- }
395
- }, "\u79FB\u52A8")), /*#__PURE__*/React.createElement("span", {
396
- onClick: function onClick() {
397
- return eventShowOrHidden(0, item.groupId);
398
- }
399
- }, "\u663E\u793A"), /*#__PURE__*/React.createElement("span", {
400
- onClick: function onClick() {
401
- return eventShowOrHidden(1, item.groupId);
402
- }
403
- }, "\u9690\u85CF")), item.groupName && /*#__PURE__*/React.createElement("span", {
404
- onClick: function onClick() {
405
- return groupDelete(item.groupId);
406
- }
407
- }, "\u5220\u9664"), /*#__PURE__*/React.createElement(IconFont, _objectSpread(_objectSpread({}, provided.dragHandleProps), {}, {
408
- type: "tuozhuai1"
409
- })))), /*#__PURE__*/React.createElement("div", {
410
- className: "".concat(classPrefix, "-box-content ").concat(item.open ? 'open' : 'close')
411
- }, /*#__PURE__*/React.createElement(SortableComponnet, {
412
- componnetData: item.eventList,
413
- componnetIndex: index,
414
- groupId: item.groupId,
415
- groupingData: groupingData,
416
- setGroupingData: setGroupingData,
417
- refresh: refresh,
418
- searchData: searchData
419
- }))));
420
- }));
421
- });
422
- })))), /*#__PURE__*/React.createElement(Modal, {
421
+ }, "\u521B\u5EFA\u5206\u7EC4")), /*#__PURE__*/React.createElement(SortableList, {
422
+ distance: 5,
423
+ axis: 'xy',
424
+ helperClass: "".concat(classPrefix, "-sortablelist"),
425
+ onSortEnd: onSortEnd,
426
+ useDragHandle: true
427
+ }))), /*#__PURE__*/React.createElement(Modal, {
423
428
  wrapClassName: "create-or-edit-grpup-modal",
424
429
  title: "".concat(createOrEditGrpup === 'create' ? '创建分组' : '修改分组名'),
425
430
  bodyStyle: {
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const EventItem: React.FC<any>;
3
+ export default EventItem;
@@ -0,0 +1,49 @@
1
+ import { Checkbox, Tooltip } from 'antd';
2
+ import React from 'react';
3
+ import { eventChecked } from '../../../utils';
4
+ import _ from 'lodash';
5
+ var EventItem = function EventItem(props) {
6
+ var componnetData = props.componnetData,
7
+ componnetIndex = props.componnetIndex,
8
+ groupId = props.groupId,
9
+ groupingData = props.groupingData,
10
+ setGroupingData = props.setGroupingData,
11
+ searchData = props.searchData;
12
+ var SortableItem = function SortableItem(data) {
13
+ var item = data.item,
14
+ index = data.index;
15
+ var name = '';
16
+ if (searchData === '') {
17
+ name = item.alias_name ? item.alias_name : item.event_name;
18
+ } else {
19
+ name = item.alias_name ? "".concat(item.alias_name, "(").concat(item.event_name, ")") : item.event_name;
20
+ }
21
+ return /*#__PURE__*/React.createElement(Tooltip, {
22
+ title: "".concat(item.owner === 'zg_vtl' ? '虚拟事件' : '元事件', " | ").concat(name),
23
+ key: index
24
+ }, /*#__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
+ }, name));
32
+ };
33
+ var onChangeItem = function onChangeItem(groupId, eventId) {
34
+ setGroupingData(_.cloneDeep(eventChecked(groupId, eventId, groupingData)));
35
+ };
36
+ return /*#__PURE__*/React.createElement("div", {
37
+ key: componnetIndex
38
+ }, componnetData.map(function (item, index) {
39
+ if (item.searchShow === 1) {
40
+ return SortableItem({
41
+ item: item,
42
+ index: index
43
+ });
44
+ } else {
45
+ return null;
46
+ }
47
+ }));
48
+ };
49
+ export default EventItem;
@@ -63,7 +63,7 @@ var SortableComponnet = function SortableComponnet(props) {
63
63
  key: componnetIndex
64
64
  }, componnetData.map(function (item, index) {
65
65
  if (item.searchShow === 1) {
66
- if (groupId !== -1 && searchData === "") {
66
+ if (groupId !== -1 && searchData === '') {
67
67
  return /*#__PURE__*/React.createElement(SortableItem, {
68
68
  key: "item-".concat(index),
69
69
  index: index,
@@ -122,6 +122,7 @@ var TablePlus = function TablePlus(props) {
122
122
  });
123
123
  if (!deteleFlag) return message.error('分组内存在事件,无法删除');
124
124
  Modal.confirm({
125
+ wrapClassName: 'dm-modal-confirm',
125
126
  centered: true,
126
127
  title: '是否确认删除?',
127
128
  okText: '确认',
@@ -171,6 +172,7 @@ var TablePlus = function TablePlus(props) {
171
172
  };
172
173
  var eventDelModal = function eventDelModal(eventId, text) {
173
174
  Modal.confirm({
175
+ wrapClassName: 'dm-modal-confirm',
174
176
  centered: true,
175
177
  title: '是否确认删除?',
176
178
  content: text,
@@ -62,6 +62,7 @@ var VirtualTablePlus = function VirtualTablePlus(props) {
62
62
  // 删除分组
63
63
  var eventNameDel = function eventNameDel(eventGroupId) {
64
64
  Modal.confirm({
65
+ wrapClassName: 'dm-modal-confirm',
65
66
  centered: true,
66
67
  title: '是否确认删除?',
67
68
  okText: '确认',
@@ -87,6 +88,7 @@ var VirtualTablePlus = function VirtualTablePlus(props) {
87
88
  // 删除事件
88
89
  var eventItemDel = function eventItemDel(name) {
89
90
  Modal.confirm({
91
+ wrapClassName: 'dm-modal-confirm',
90
92
  centered: true,
91
93
  title: '是否确认删除?',
92
94
  content: '删除后,将停止采集该事件数据,也将不在分析平台中显示!',
@@ -404,6 +404,7 @@
404
404
  }
405
405
  &-add {
406
406
  color: #165dff;
407
+ cursor: pointer;
407
408
  &-icon {
408
409
  margin-right: 8px;
409
410
  font-weight: 900;
@@ -435,8 +436,8 @@
435
436
  &-eventDataBox {
436
437
  margin-top: 24px;
437
438
  padding-bottom: 24px;
438
- > :nth-child(2) {
439
- margin-top: 8px;
439
+ > :nth-child(1) {
440
+ color: #5f6085;
440
441
  }
441
442
  > :nth-child(1)::before {
442
443
  display: inline-block;
@@ -447,6 +448,10 @@
447
448
  line-height: 1;
448
449
  content: '*';
449
450
  }
451
+ > :nth-child(2) {
452
+ margin-top: 8px;
453
+ color: #67727f;
454
+ }
450
455
  }
451
456
  &-eventDataBox.see {
452
457
  > :nth-child(1) {
@@ -457,10 +462,11 @@
457
462
  }
458
463
  }
459
464
  &-formList {
460
- margin-top: 24px;
465
+ margin-top: 16px;
461
466
  .ant-form-item {
462
467
  width: 100%;
463
468
  max-width: 100%;
469
+ margin-bottom: 16px !important;
464
470
  .ant-col {
465
471
  width: 100%;
466
472
  max-width: 100%;
@@ -509,6 +515,9 @@
509
515
  gap: 8px;
510
516
  align-items: center;
511
517
  justify-content: start;
518
+ > :nth-child(1) {
519
+ color: #9aa1a9;
520
+ }
512
521
  > :nth-child(2) {
513
522
  font-weight: 500;
514
523
  }
@@ -527,6 +536,7 @@
527
536
  }
528
537
  .tuozhuai1 {
529
538
  font-size: 18px !important;
539
+ cursor: pointer;
530
540
  }
531
541
  }
532
542
  }
@@ -574,10 +584,16 @@
574
584
  display: flex;
575
585
  align-items: center;
576
586
  justify-content: space-between;
577
- .ant-input {
587
+ .ant-btn {
588
+ height: 32px;
589
+ }
590
+ .ant-input-affix-wrapper {
578
591
  width: 374px;
579
592
  border: none;
580
593
  }
594
+ .ant-input-prefix {
595
+ margin-right: 10px;
596
+ }
581
597
  }
582
598
  .ant-drawer-content,
583
599
  .ant-drawer-wrapper-body {
@@ -601,6 +617,10 @@
601
617
  }
602
618
  }
603
619
 
620
+ .event-grouping-drawer-sortablelist {
621
+ z-index: 99999;
622
+ }
623
+
604
624
  .group-delete-modal {
605
625
  .ant-modal-body {
606
626
  padding: 24px;
@@ -752,12 +772,18 @@
752
772
  }
753
773
  }
754
774
 
755
- .sortable-componnet-sortableList {
756
- z-index: 9999;
757
- }
758
-
759
775
  .not-operable {
760
776
  color: #ccd0d4;
761
777
  cursor: not-allowed !important;
762
778
  user-select: none;
763
779
  }
780
+
781
+ // dm项目中modal-confirm公用的样式
782
+ .dm-modal-confirm {
783
+ .ant-modal-confirm-btns {
784
+ .ant-btn-primary {
785
+ margin-left: 16px !important;
786
+ background: #165dff;
787
+ }
788
+ }
789
+ }
@@ -46,10 +46,6 @@ export declare const eventShow: (data: any, searchData: string) => any;
46
46
  * 指标分组管理:单个事件选中处理
47
47
  */
48
48
  export declare const eventChecked: (groupId: number, eventId: number, groupingData: any) => any;
49
- /**
50
- * 指标分组管理:分组排序
51
- */
52
- export declare const groupListSort: (result: any, groupingData: any, setGroupingData: Function) => any;
53
49
  export declare const getAppID: (currentApp: any) => any;
54
50
  export declare const nullToEmptyString: (data: any) => any;
55
51
  /**
package/es/utils/index.js CHANGED
@@ -304,27 +304,6 @@ export var eventChecked = function eventChecked(groupId, eventId, groupingData)
304
304
  });
305
305
  return groupingData;
306
306
  };
307
- /**
308
- * 指标分组管理:分组排序
309
- */
310
- export var groupListSort = function groupListSort(result, groupingData, setGroupingData) {
311
- var _result$destination, _result$destination2;
312
- var sourceIndex = result.source.index;
313
- var targetIndex = ((_result$destination = result.destination) === null || _result$destination === void 0 ? void 0 : _result$destination.index) ? (_result$destination2 = result.destination) === null || _result$destination2 === void 0 ? void 0 : _result$destination2.index : 0;
314
- var ids = [];
315
- var sourceItem = groupingData[sourceIndex];
316
- delete groupingData[sourceIndex];
317
- groupingData.splice(targetIndex, 0, sourceItem);
318
- groupingData.map(function (item) {
319
- ids.push(item.groupId);
320
- });
321
- var _groupingData = [];
322
- groupingData.map(function (item) {
323
- _groupingData.push(item);
324
- });
325
- setGroupingData(_groupingData);
326
- return ids.join(',');
327
- };
328
307
  // 获取appId,为了解决之前遇到切换应用但是currentApp里面的appId不更新的问题
329
308
  export var getAppID = function getAppID(currentApp) {
330
309
  var href = window.location.href;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zgfe/modules-dm",
3
- "version": "1.0.34-heyh.29",
3
+ "version": "1.0.34-heyh.32",
4
4
  "license": "ISC",
5
5
  "module": "es/index.js",
6
6
  "typings": "es/index.d.ts",
@@ -30,7 +30,6 @@
30
30
  "dependencies": {
31
31
  "array-move": "^4.0.0",
32
32
  "react": "^16.12.0 || ^17.0.0",
33
- "react-beautiful-dnd": "^13.1.1",
34
33
  "react-sortable-hoc": "^2.0.0"
35
34
  },
36
35
  "devDependencies": {
@@ -52,7 +51,7 @@
52
51
  "umi-request": "^1.4.0",
53
52
  "yorkie": "^2.0.0"
54
53
  },
55
- "gitHead": "92ccee8db67720a41f91b7c726641500990f6269",
54
+ "gitHead": "cfe4a63f7e2d58c69febec65e2573d99e0af49a7",
56
55
  "gitHooks": {
57
56
  "pre-commit": "lint-staged"
58
57
  }