@zgfe/modules-dm 1.0.34-heyh.8 → 1.0.34-heyh.9

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.
@@ -152,7 +152,8 @@ var CreateVirtualDrawer = function CreateVirtualDrawer(props) {
152
152
  message: '仅能输入英文、符号、数字'
153
153
  }]
154
154
  }, /*#__PURE__*/React.createElement(Input, {
155
- maxLength: 50
155
+ maxLength: 20,
156
+ disabled: virtualDrawerType === 'edit'
156
157
  })), /*#__PURE__*/React.createElement(Form.Item, {
157
158
  label: "\u522B\u540D",
158
159
  name: "aliasName",
@@ -161,7 +162,7 @@ var CreateVirtualDrawer = function CreateVirtualDrawer(props) {
161
162
  message: '请输入虚拟事件名称'
162
163
  }]
163
164
  }, /*#__PURE__*/React.createElement(Input, {
164
- maxLength: 50
165
+ maxLength: 20
165
166
  })), /*#__PURE__*/React.createElement(Form.Item, {
166
167
  label: "\u5206\u7EC4",
167
168
  name: "eventGroupId"
@@ -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, BizLoading } from '@zgfe/business-lib';
14
14
  import { Input, Modal, message, Drawer, Popover, Checkbox, Select, Button } from 'antd';
15
15
  import { DragDropContext, Droppable, Draggable } from 'react-beautiful-dnd';
16
16
  import request from '../../../utils/ajax';
@@ -33,7 +33,12 @@ var EventGroupingDrawer = function EventGroupingDrawer(props) {
33
33
  _useState4 = _slicedToArray(_useState3, 2),
34
34
  isDragDisabled = _useState4[0],
35
35
  setIsDragDisabled = _useState4[1];
36
+ var _useState5 = useState(false),
37
+ _useState6 = _slicedToArray(_useState5, 2),
38
+ loading = _useState6[0],
39
+ setLoading = _useState6[1];
36
40
  var queryList = function queryList() {
41
+ setLoading(true);
37
42
  request(apis.queryCollectionEventList, {
38
43
  method: 'post',
39
44
  data: {
@@ -46,6 +51,7 @@ var EventGroupingDrawer = function EventGroupingDrawer(props) {
46
51
  eventListHandle(res.data);
47
52
  setGroupingData(res.data);
48
53
  }
54
+ setLoading(false);
49
55
  });
50
56
  };
51
57
  useEffect(function () {
@@ -117,26 +123,26 @@ var EventGroupingDrawer = function EventGroupingDrawer(props) {
117
123
  }
118
124
  };
119
125
  // 移动
120
- var _useState5 = useState(undefined),
121
- _useState6 = _slicedToArray(_useState5, 2),
122
- eventMoveShow = _useState6[0],
123
- setEventMoveShow = _useState6[1];
124
- var _useState7 = useState(-1),
126
+ var _useState7 = useState(undefined),
125
127
  _useState8 = _slicedToArray(_useState7, 2),
126
- eventMoveChangeId = _useState8[0],
127
- setEventMoveChangeId = _useState8[1];
128
- var _useState9 = useState([]),
128
+ eventMoveShow = _useState8[0],
129
+ setEventMoveShow = _useState8[1];
130
+ var _useState9 = useState(-1),
129
131
  _useState10 = _slicedToArray(_useState9, 2),
130
- eventMoveOption = _useState10[0],
131
- setEventMoveOption = _useState10[1];
132
- var _useState11 = useState(0),
132
+ eventMoveChangeId = _useState10[0],
133
+ setEventMoveChangeId = _useState10[1];
134
+ var _useState11 = useState([]),
133
135
  _useState12 = _slicedToArray(_useState11, 2),
134
- eventMoveLength = _useState12[0],
135
- setEventMoveLength = _useState12[1];
136
- var _useState13 = useState(''),
136
+ eventMoveOption = _useState12[0],
137
+ setEventMoveOption = _useState12[1];
138
+ var _useState13 = useState(0),
137
139
  _useState14 = _slicedToArray(_useState13, 2),
138
- eventMoveIds = _useState14[0],
139
- setEventMoveIds = _useState14[1];
140
+ eventMoveLength = _useState14[0],
141
+ setEventMoveLength = _useState14[1];
142
+ var _useState15 = useState(''),
143
+ _useState16 = _slicedToArray(_useState15, 2),
144
+ eventMoveIds = _useState16[0],
145
+ setEventMoveIds = _useState16[1];
140
146
  var eventMove = function eventMove(groupId) {
141
147
  var data = eventMoveData(groupId, groupingData, setGroupingData);
142
148
  setEventMoveOption(data.groupingOption);
@@ -193,18 +199,18 @@ var EventGroupingDrawer = function EventGroupingDrawer(props) {
193
199
  }, "\u786E\u5B9A")));
194
200
  };
195
201
  // 创建分组 & 修改分组名
196
- var _useState15 = useState(null),
197
- _useState16 = _slicedToArray(_useState15, 2),
198
- createOrEditGrpup = _useState16[0],
199
- setCreateOrEditGrpup = _useState16[1];
200
- var _useState17 = useState(-1),
202
+ var _useState17 = useState(null),
201
203
  _useState18 = _slicedToArray(_useState17, 2),
202
- grpupModalSelectGrpupId = _useState18[0],
203
- setGrpupModalSelectGrpupId = _useState18[1];
204
- var _useState19 = useState(''),
204
+ createOrEditGrpup = _useState18[0],
205
+ setCreateOrEditGrpup = _useState18[1];
206
+ var _useState19 = useState(-1),
205
207
  _useState20 = _slicedToArray(_useState19, 2),
206
- grpupNameInput = _useState20[0],
207
- setGrpupNameInput = _useState20[1];
208
+ grpupModalSelectGrpupId = _useState20[0],
209
+ setGrpupModalSelectGrpupId = _useState20[1];
210
+ var _useState21 = useState(''),
211
+ _useState22 = _slicedToArray(_useState21, 2),
212
+ grpupNameInput = _useState22[0],
213
+ setGrpupNameInput = _useState22[1];
208
214
  var GrpupModalHandle = function GrpupModalHandle() {
209
215
  if (grpupNameInput === '') {
210
216
  message.error('请填写分组名');
@@ -262,6 +268,8 @@ var EventGroupingDrawer = function EventGroupingDrawer(props) {
262
268
  setEventMoveShow(undefined);
263
269
  }
264
270
  }))
271
+ }, /*#__PURE__*/React.createElement(BizLoading, {
272
+ spinning: loading
265
273
  }, /*#__PURE__*/React.createElement(DragDropContext, {
266
274
  onDragEnd: onDragEnd
267
275
  }, groupingData.map(function (item, index) {
@@ -350,7 +358,7 @@ var EventGroupingDrawer = function EventGroupingDrawer(props) {
350
358
  }))));
351
359
  }));
352
360
  });
353
- }))), /*#__PURE__*/React.createElement(Modal, {
361
+ })))), /*#__PURE__*/React.createElement(Modal, {
354
362
  wrapClassName: "create-or-edit-grpup-modal",
355
363
  title: "".concat(createOrEditGrpup === 'create' ? '创建分组' : '修改分组名'),
356
364
  bodyStyle: {
@@ -411,7 +411,9 @@ var TablePlus = function TablePlus(props) {
411
411
  }, record.alias_name),
412
412
  trigger: "hover",
413
413
  placement: "top"
414
- }, /*#__PURE__*/React.createElement("div", null, record.alias_name)), /*#__PURE__*/React.createElement(IconFont, {
414
+ }, /*#__PURE__*/React.createElement("div", {
415
+ className: 'alias_name_text'
416
+ }, record.alias_name)), /*#__PURE__*/React.createElement(IconFont, {
415
417
  className: "edit-alias-name",
416
418
  onClick: function onClick() {
417
419
  setAliasNameInput(record.alias_name);
@@ -192,7 +192,9 @@ var VirtualTablePlus = function VirtualTablePlus(props) {
192
192
  key: 'aliasName',
193
193
  width: 167,
194
194
  render: function render(_, record) {
195
- return /*#__PURE__*/React.createElement(Popover, {
195
+ return /*#__PURE__*/React.createElement("div", {
196
+ className: "alias_name"
197
+ }, /*#__PURE__*/React.createElement(Popover, {
196
198
  content: /*#__PURE__*/React.createElement("div", {
197
199
  style: {
198
200
  width: '200px',
@@ -201,7 +203,9 @@ var VirtualTablePlus = function VirtualTablePlus(props) {
201
203
  }, record.aliasName),
202
204
  trigger: "hover",
203
205
  placement: "top"
204
- }, /*#__PURE__*/React.createElement("div", null, record.aliasName));
206
+ }, /*#__PURE__*/React.createElement("div", {
207
+ className: 'alias_name_text'
208
+ }, record.aliasName)));
205
209
  }
206
210
  }, {
207
211
  title: '首次上报时间',
@@ -223,12 +227,40 @@ var VirtualTablePlus = function VirtualTablePlus(props) {
223
227
  title: '描述',
224
228
  dataIndex: 'description',
225
229
  key: 'description',
226
- width: 187
230
+ width: 187,
231
+ render: function render(text) {
232
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Popover, {
233
+ content: /*#__PURE__*/React.createElement("div", {
234
+ style: {
235
+ width: '200px',
236
+ wordBreak: 'break-all'
237
+ }
238
+ }, text),
239
+ trigger: "hover",
240
+ placement: "top"
241
+ }, /*#__PURE__*/React.createElement("div", {
242
+ className: 'description'
243
+ }, text)));
244
+ }
227
245
  }, {
228
246
  title: '包含埋点事件',
229
247
  dataIndex: 'bindEvent',
230
248
  key: 'bindEvent',
231
- width: 187
249
+ width: 187,
250
+ render: function render(text) {
251
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Popover, {
252
+ content: /*#__PURE__*/React.createElement("div", {
253
+ style: {
254
+ width: '200px',
255
+ wordBreak: 'break-all'
256
+ }
257
+ }, text),
258
+ trigger: "hover",
259
+ placement: "top"
260
+ }, /*#__PURE__*/React.createElement("div", {
261
+ className: 'bind-event'
262
+ }, text)));
263
+ }
232
264
  }, {
233
265
  title: '创建人',
234
266
  dataIndex: 'createUser',
@@ -115,10 +115,6 @@
115
115
  word-break: break-all;
116
116
  background: red;
117
117
  }
118
- .alias_name {
119
- border: none;
120
- cursor: pointer;
121
- }
122
118
  .ant-input:focus,
123
119
  .ant-input-focused {
124
120
  background-color: #fff !important;
@@ -260,6 +256,16 @@
260
256
  }
261
257
  .alias_name {
262
258
  display: flex;
259
+ border: none;
260
+ cursor: pointer;
261
+ .alias_name_text {
262
+ display: -webkit-box;
263
+ max-width: 167px;
264
+ overflow: hidden;
265
+ cursor: pointer;
266
+ -webkit-box-orient: vertical;
267
+ -webkit-line-clamp: 1;
268
+ }
263
269
  .edit-alias-name {
264
270
  display: none;
265
271
  margin-left: 10px;
@@ -269,6 +275,15 @@
269
275
  color: @primary-color;
270
276
  }
271
277
  }
278
+ .bind-event,
279
+ .description {
280
+ display: -webkit-box;
281
+ max-width: 180px;
282
+ overflow: hidden;
283
+ cursor: pointer;
284
+ -webkit-box-orient: vertical;
285
+ -webkit-line-clamp: 1;
286
+ }
272
287
  .ant-table-row:hover {
273
288
  .collect-icon {
274
289
  opacity: 1;
@@ -488,6 +503,12 @@
488
503
  width: 25%;
489
504
  .ant-checkbox + span {
490
505
  user-select: none;
506
+ display: -webkit-box;
507
+ max-width: 100%;
508
+ overflow: hidden;
509
+ cursor: pointer;
510
+ -webkit-box-orient: vertical;
511
+ -webkit-line-clamp: 1;
491
512
  }
492
513
  }
493
514
  }
@@ -578,6 +599,65 @@
578
599
  }
579
600
 
580
601
  .select-attributes {
602
+ &-box {
603
+ display: flex;
604
+ width: 616px;
605
+ height: 380px;
606
+ background: #fff;
607
+ border-radius: 10px;
608
+ box-shadow: 0px 4px 10px 0px rgba(0, 0, 0, 0.1);
609
+ &-left {
610
+ display: flex;
611
+ flex-direction: column;
612
+ width: 205px;
613
+ height: 380px;
614
+ padding: 8px;
615
+ overflow-y: auto;
616
+ box-shadow: 0px 4px 10px 0px rgba(0, 0, 0, 0.1);
617
+ > div {
618
+ display: flex;
619
+ justify-content: space-between;
620
+ padding: 6px 12px;
621
+ }
622
+ .active {
623
+ color: #fff;
624
+ background: #165dff;
625
+ border-radius: 4px;
626
+ > :nth-child(2) {
627
+ padding: 0px 4px;
628
+ border: 1px solid #fff;
629
+ border-radius: 10px;
630
+ }
631
+ }
632
+ }
633
+ &-right {
634
+ width: 100%;
635
+ height: 380px;
636
+ padding: 8px;
637
+ > :nth-child(2) {
638
+ display: flex;
639
+ flex-direction: column;
640
+ gap: 8px;
641
+ align-items: flex-start;
642
+ width: 100%;
643
+ height: 320px;
644
+ margin-top: 8px;
645
+ overflow-y: auto;
646
+ > div {
647
+ display: flex;
648
+ flex-shrink: 0;
649
+ gap: 10px;
650
+ align-items: center;
651
+ align-self: stretch;
652
+ height: 32px;
653
+ padding: 0px 16px;
654
+ }
655
+ .active {
656
+ background: #e8efff;
657
+ }
658
+ }
659
+ }
660
+ }
581
661
  &-select {
582
662
  .ant-select-dropdown {
583
663
  display: none !important;
@@ -602,66 +682,6 @@
602
682
  }
603
683
  }
604
684
 
605
- .select-attributes-box {
606
- display: flex;
607
- width: 616px;
608
- height: 380px;
609
- background: #fff;
610
- border-radius: 10px;
611
- box-shadow: 0px 4px 10px 0px rgba(0, 0, 0, 0.1);
612
- &-left {
613
- display: flex;
614
- flex-direction: column;
615
- width: 205px;
616
- height: 380px;
617
- padding: 8px;
618
- overflow-y: auto;
619
- box-shadow: 0px 4px 10px 0px rgba(0, 0, 0, 0.1);
620
- > div {
621
- display: flex;
622
- justify-content: space-between;
623
- padding: 6px 12px;
624
- }
625
- .active {
626
- color: #fff;
627
- background: #165dff;
628
- border-radius: 4px;
629
- > :nth-child(2) {
630
- padding: 0px 4px;
631
- border: 1px solid #fff;
632
- border-radius: 10px;
633
- }
634
- }
635
- }
636
- &-right {
637
- width: 100%;
638
- height: 380px;
639
- padding: 8px;
640
- > :nth-child(2) {
641
- display: flex;
642
- flex-direction: column;
643
- gap: 8px;
644
- align-items: flex-start;
645
- width: 100%;
646
- height: 320px;
647
- margin-top: 8px;
648
- overflow-y: auto;
649
- > div {
650
- display: flex;
651
- flex-shrink: 0;
652
- gap: 10px;
653
- align-items: center;
654
- align-self: stretch;
655
- height: 32px;
656
- padding: 0px 16px;
657
- }
658
- .active {
659
- background: #e8efff;
660
- }
661
- }
662
- }
663
- }
664
-
665
685
  .sortable-componnet-sortableList {
666
686
  z-index: 9999;
667
687
  }
@@ -51,7 +51,7 @@ var VirtualEventList = function VirtualEventList() {
51
51
  _useState10 = _slicedToArray(_useState9, 2),
52
52
  pageNumber = _useState10[0],
53
53
  setPageNumber = _useState10[1];
54
- var _useState11 = useState(10),
54
+ var _useState11 = useState(20),
55
55
  _useState12 = _slicedToArray(_useState11, 2),
56
56
  pageSize = _useState12[0],
57
57
  setPageSize = _useState12[1];
@@ -298,8 +298,9 @@ var VirtualEventList = function VirtualEventList() {
298
298
  textAlign: 'right'
299
299
  },
300
300
  showQuickJumper: true,
301
- showSizeChanger: total > 10,
301
+ showSizeChanger: total > pageSize,
302
302
  defaultCurrent: 1,
303
+ defaultPageSize: pageSize,
303
304
  current: pageNumber,
304
305
  total: total,
305
306
  onChange: onPaginationChange
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zgfe/modules-dm",
3
- "version": "1.0.34-heyh.8",
3
+ "version": "1.0.34-heyh.9",
4
4
  "license": "ISC",
5
5
  "module": "es/index.js",
6
6
  "typings": "es/index.d.ts",
@@ -52,7 +52,7 @@
52
52
  "umi-request": "^1.4.0",
53
53
  "yorkie": "^2.0.0"
54
54
  },
55
- "gitHead": "4ca76aeae40292e76792d097506126970af21364",
55
+ "gitHead": "8794a4cab7a3ae235aa723c9c0ea99e812bd9157",
56
56
  "gitHooks": {
57
57
  "pre-commit": "lint-staged"
58
58
  }