@zgfe/modules-dm 1.0.2-dm.9 → 1.0.2-y.0

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.
@@ -21,9 +21,10 @@ import { Input, Table, Select, message, Modal, Popover, Checkbox } from 'antd';
21
21
  import request from '../../utils/ajax';
22
22
  import apis from '../../constants/api';
23
23
  var Option = Select.Option;
24
- import React, { useState, useContext } from 'react';
24
+ import React, { useEffect, useState, useContext } from 'react';
25
25
  import './styles/index.less';
26
26
  import _ from 'lodash';
27
+ import { getAppID, getTableScroll } from '../../utils';
27
28
  import { DmContext } from '../../store';
28
29
 
29
30
  var TablePlus = function TablePlus(props) {
@@ -51,20 +52,20 @@ var TablePlus = function TablePlus(props) {
51
52
 
52
53
 
53
54
  var aliasNameBlur = function aliasNameBlur(e, record) {
54
- if (aliasFocusData == e.currentTarget.value) return; // 失焦判断,内容无修改不请求接口
55
+ var value = e.currentTarget.value;
56
+ if (aliasFocusData == value) return; // 失焦判断,内容无修改不请求接口
55
57
 
56
58
  request(apis.updateEventInfo, {
57
59
  method: 'post',
58
60
  params: {
59
- app_id: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
60
- alias_name: e.currentTarget.value,
61
+ app_id: getAppID(currentApp),
62
+ alias_name: value,
61
63
  event_id: record.event_id
62
64
  }
63
65
  }).then(function (res) {
64
66
  if (res) {
65
67
  message.success('修改成功');
66
68
  props.Refresh();
67
- console.log(state.updateEventMetas);
68
69
  state.updateEventMetas && state.updateEventMetas(); // 更新store
69
70
  }
70
71
  }).catch(function (err) {
@@ -81,7 +82,7 @@ var TablePlus = function TablePlus(props) {
81
82
  } else {
82
83
  var _queryPlanData$unexpe;
83
84
 
84
- 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' : '';
85
+ 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 && record.owner != 'zg_abp' ? 'error-row' : '';
85
86
  }
86
87
  }; // 控制修改分组名弹框 显示隐藏
87
88
 
@@ -109,7 +110,7 @@ var TablePlus = function TablePlus(props) {
109
110
  data: {
110
111
  eventGroupName: eventNameInput,
111
112
  eventGroupId: eventNameData.groupId,
112
- appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
113
+ appId: getAppID(currentApp),
113
114
  platform: 0
114
115
  }
115
116
  }).then(function (res) {
@@ -140,7 +141,7 @@ var TablePlus = function TablePlus(props) {
140
141
  request(apis.deleteEventGroup, {
141
142
  method: 'post',
142
143
  data: {
143
- appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
144
+ appId: getAppID(currentApp),
144
145
  eventGroupId: eventGroupId
145
146
  }
146
147
  }).then(function (res) {
@@ -168,7 +169,7 @@ var TablePlus = function TablePlus(props) {
168
169
  request(apis.deleteEventMeta, {
169
170
  method: 'post',
170
171
  params: {
171
- app_id: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
172
+ app_id: getAppID(currentApp),
172
173
  event_id: event_id
173
174
  }
174
175
  }).then(function (res) {
@@ -184,11 +185,11 @@ var TablePlus = function TablePlus(props) {
184
185
  }; // 修改:显示状态 | 采集状态 | 收藏&取消收藏
185
186
 
186
187
 
187
- var eventHiddenChange = function eventHiddenChange(e, type, event_id) {
188
+ var eventHiddenChange = function eventHiddenChange(e, type, record) {
188
189
  var _temp;
189
190
 
190
191
  switch (type) {
191
- case 'event_hidden':
192
+ case 'hidden':
192
193
  _temp = {
193
194
  hidden: e
194
195
  };
@@ -210,14 +211,13 @@ var TablePlus = function TablePlus(props) {
210
211
  request(apis.updateEventInfo, {
211
212
  method: 'post',
212
213
  params: _objectSpread({
213
- app_id: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
214
- event_id: event_id
214
+ app_id: getAppID(currentApp),
215
+ event_id: record.event_id
215
216
  }, _temp)
216
217
  }).then(function (res) {
217
- if (res) {
218
- message.success('修改成功');
219
- props.Refresh();
220
- }
218
+ message.success('修改成功');
219
+ props.Refresh();
220
+ state.updateEventMetas && state.updateEventMetas(); // 更新store
221
221
  }).catch(function (err) {
222
222
  message.error('修改失败');
223
223
  }).finally(function () {});
@@ -284,18 +284,20 @@ var TablePlus = function TablePlus(props) {
284
284
  request(apis.operateGroupRelations, {
285
285
  method: 'post',
286
286
  data: _objectSpread({
287
- appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
287
+ appId: getAppID(currentApp),
288
288
  platform: 0,
289
289
  hasPublicAttrView: true,
290
290
  eventIds: groupCheckedData[data.groupId].join(',')
291
291
  }, _temp)
292
292
  }).then(function (res) {
293
- message.success('成功');
293
+ if (res.code == '00') {
294
+ message.success('成功');
294
295
 
295
- var _groupCheckedData = _.cloneDeep(groupCheckedData);
296
+ var _groupCheckedData = _.cloneDeep(groupCheckedData);
296
297
 
297
- delete _groupCheckedData[eventGroupId];
298
- setGroupCheckedData({});
298
+ delete _groupCheckedData[eventGroupId];
299
+ setGroupCheckedData({});
300
+ }
299
301
  }).catch(function (err) {
300
302
  message.error('失败');
301
303
  }).finally(function () {
@@ -304,9 +306,7 @@ var TablePlus = function TablePlus(props) {
304
306
  };
305
307
 
306
308
  var groupPopoverContent = function groupPopoverContent(data, type) {
307
- var count = 0;
308
- var element = tableHandleData.map(function (item, index) {
309
- item.groupId != undefined ? count++ : null;
309
+ var element = props.groupData.map(function (item, index) {
310
310
  if (type == 'copy' && item.groupId == -1) return null; // 复制到组,移出未分组
311
311
 
312
312
  return item.groupId != undefined && item.groupId != data.groupId ? /*#__PURE__*/React.createElement("div", {
@@ -319,10 +319,9 @@ var TablePlus = function TablePlus(props) {
319
319
  },
320
320
  key: index
321
321
  }, item.groupId == -1 ? '未分组' : item.groupName) : null;
322
- }); // console.log(element, count);
323
- // 复制分组时:除未分组外,如只有一个分组,则不展示复制分组
322
+ }); // 复制分组时:除未分组外,如只有一个分组,则不展示复制分组
324
323
 
325
- return count <= 2 && type == 'copy' ? null : element;
324
+ return props.groupData.length < 2 && type == 'copy' ? null : element;
326
325
  };
327
326
 
328
327
  var columns = [{
@@ -390,7 +389,7 @@ var TablePlus = function TablePlus(props) {
390
389
  }), /*#__PURE__*/React.createElement(IconFont, {
391
390
  className: record.mark_type == 1 ? 'collect-icon-active' : 'collect-icon',
392
391
  onClick: function onClick() {
393
- return eventHiddenChange(record.mark_type, 'mark_type', record.event_id);
392
+ return eventHiddenChange(record.mark_type, 'mark_type', record);
394
393
  },
395
394
  type: record.mark_type == 1 ? 'shoucang' : 'shoucang-kong'
396
395
  }), /*#__PURE__*/React.createElement(Popover, {
@@ -412,24 +411,37 @@ var TablePlus = function TablePlus(props) {
412
411
  key: 'alias_name',
413
412
  width: 167,
414
413
  render: function render(text, record, index) {
415
- return /*#__PURE__*/React.createElement(Popover, {
416
- content: /*#__PURE__*/React.createElement("div", {
417
- style: {
418
- width: '200px',
419
- wordBreak: 'break-all'
414
+ if (!record.alias_name) {
415
+ return /*#__PURE__*/React.createElement(Input, {
416
+ className: "alias_name",
417
+ placeholder: "\u7F16\u8F91\u522B\u540D",
418
+ defaultValue: record.alias_name,
419
+ onFocus: aliasFocus,
420
+ onBlur: function onBlur(e) {
421
+ aliasNameBlur(e, record);
420
422
  }
421
- }, record.alias_name),
422
- trigger: "hover",
423
- placement: "top"
424
- }, /*#__PURE__*/React.createElement(Input, {
425
- className: "alias_name",
426
- placeholder: "\u7F16\u8F91\u522B\u540D",
427
- defaultValue: record.alias_name,
428
- onFocus: aliasFocus,
429
- onBlur: function onBlur(e) {
430
- aliasNameBlur(e, record);
431
- }
432
- }));
423
+ });
424
+ } else {
425
+ return /*#__PURE__*/React.createElement(Popover, {
426
+ content: /*#__PURE__*/React.createElement("div", {
427
+ style: {
428
+ width: '200px',
429
+ wordBreak: 'break-all'
430
+ }
431
+ }, record.alias_name),
432
+ trigger: "hover",
433
+ placement: "top"
434
+ }, /*#__PURE__*/React.createElement(Input, {
435
+ className: "alias_name",
436
+ placeholder: "\u7F16\u8F91\u522B\u540D",
437
+ disabled: isDemo,
438
+ defaultValue: record.alias_name,
439
+ onFocus: aliasFocus,
440
+ onBlur: function onBlur(e) {
441
+ aliasNameBlur(e, record);
442
+ }
443
+ }));
444
+ }
433
445
  }
434
446
  }, {
435
447
  title: '首次上报时间',
@@ -453,9 +465,7 @@ var TablePlus = function TablePlus(props) {
453
465
  title: /*#__PURE__*/React.createElement(Select, {
454
466
  defaultValue: -1,
455
467
  bordered: false,
456
- style: {
457
- width: 150
458
- },
468
+ className: "select-style",
459
469
  suffixIcon: /*#__PURE__*/React.createElement(IconFont, {
460
470
  type: "paixu"
461
471
  }),
@@ -482,9 +492,10 @@ var TablePlus = function TablePlus(props) {
482
492
  style: {
483
493
  width: 150
484
494
  },
485
- disabled: rowClassNameHandle(record) == 'error-row' ? true : false,
495
+ value: record.event_hidden,
496
+ disabled: rowClassNameHandle(record) == 'error-row' || isDemo ? true : false,
486
497
  onChange: function onChange(e) {
487
- return eventHiddenChange(e, 'event_hidden', record.event_id);
498
+ return eventHiddenChange(e, 'hidden', record);
488
499
  },
489
500
  options: [{
490
501
  value: 1,
@@ -499,9 +510,7 @@ var TablePlus = function TablePlus(props) {
499
510
  title: /*#__PURE__*/React.createElement(Select, {
500
511
  defaultValue: -1,
501
512
  bordered: false,
502
- style: {
503
- width: 150
504
- },
513
+ className: "select-style",
505
514
  suffixIcon: /*#__PURE__*/React.createElement(IconFont, {
506
515
  type: "paixu"
507
516
  }),
@@ -528,9 +537,9 @@ var TablePlus = function TablePlus(props) {
528
537
  style: {
529
538
  width: 150
530
539
  },
531
- disabled: rowClassNameHandle(record) == 'error-row' ? true : false,
540
+ disabled: rowClassNameHandle(record) == 'error-row' || isDemo ? true : false,
532
541
  onChange: function onChange(e) {
533
- return eventHiddenChange(e, 'is_stop', record.event_id);
542
+ return eventHiddenChange(e, 'is_stop', record);
534
543
  },
535
544
  options: [{
536
545
  value: 1,
@@ -569,6 +578,11 @@ var TablePlus = function TablePlus(props) {
569
578
  className: "edit-del"
570
579
  }, /*#__PURE__*/React.createElement(IconFont, {
571
580
  onClick: function onClick() {
581
+ if (isDemo) {
582
+ message.error('demo环境无法修改');
583
+ return;
584
+ }
585
+
572
586
  setEventNameData({
573
587
  groupName: record.groupName,
574
588
  groupId: record.groupId
@@ -579,7 +593,12 @@ var TablePlus = function TablePlus(props) {
579
593
  type: "bianji"
580
594
  }), /*#__PURE__*/React.createElement(IconFont, {
581
595
  onClick: function onClick() {
582
- return eventNameDel(record.groupId);
596
+ if (isDemo) {
597
+ message.error('demo环境无法删除');
598
+ return;
599
+ }
600
+
601
+ eventNameDel(record.groupId);
583
602
  },
584
603
  type: "shanchu"
585
604
  }));
@@ -587,16 +606,54 @@ var TablePlus = function TablePlus(props) {
587
606
  return /*#__PURE__*/React.createElement("div", {
588
607
  className: "set ".concat(record.owner == 'zg_abp' ? 'set-error' : ''),
589
608
  onClick: function onClick() {
609
+ if (isDemo) {
610
+ message.error('demo环境无法删除');
611
+ return;
612
+ }
613
+
590
614
  record.owner != 'zg_abp' ? eventItemDel(record.event_id) : message.error('内置事件无法删除');
591
615
  }
592
616
  }, "\u5220\u9664");
593
617
  }
594
618
  }
595
- }];
619
+ }]; // const [isMore, setIsMore] = useState(true); // 是否还有数据
620
+ // const [pageNumber, setPageNumber] = useState(1); // 页码
621
+ // let scrollRef: any;
622
+ // const onScrollCapture = (e:any) => {
623
+ // // scrollTop会有小数点导致等式不成立,解决方案:四舍五入
624
+ // if (
625
+ // Math.round(scrollRef.scrollTop) + scrollRef.clientHeight == scrollRef.scrollHeight
626
+ // ) {
627
+ // if (Math.ceil(props.total / 10) == pageNumber) {
628
+ // setIsMore(false);
629
+ // return false;
630
+ // }
631
+ // // getList(page + 1);
632
+ // setPageNumber(pageNumber + 1);
633
+ // }
634
+ // };
635
+ // useEffect(() => {
636
+ // pageNumber != 1 && props.pageSizeChange(pageNumber);
637
+ // }, [pageNumber]);
638
+
639
+ var _useState13 = useState(''),
640
+ _useState14 = _slicedToArray(_useState13, 2),
641
+ scrollY = _useState14[0],
642
+ setScrollY = _useState14[1]; //页面加载完成后才能获取到对应的元素及其位置
643
+
644
+
645
+ useEffect(function () {
646
+ var _Y = getTableScroll(94); // console.log('_Y', _Y);
647
+
648
+
649
+ setScrollY(_Y);
650
+ }, []);
596
651
  return /*#__PURE__*/React.createElement("div", {
597
652
  className: classPrefix
598
653
  }, /*#__PURE__*/React.createElement(Table, {
599
654
  className: "".concat(classPrefix, "-table"),
655
+ id: "tablePlus",
656
+ // style={{ minHeight: '640px' }}
600
657
  columns: columns,
601
658
  rowKey: "key",
602
659
  loading: props.loading,
@@ -606,13 +663,18 @@ var TablePlus = function TablePlus(props) {
606
663
  },
607
664
  scroll: {
608
665
  x: 1300,
609
- y: 550
666
+ y: scrollY
610
667
  },
611
- pagination: false
668
+ pagination: false,
669
+ sticky: true
612
670
  }), /*#__PURE__*/React.createElement(Modal, {
613
671
  title: "\u4FEE\u6539\u5206\u7EC4\u540D",
672
+ bodyStyle: {
673
+ padding: '0 24px 24px 24px'
674
+ },
614
675
  destroyOnClose: true,
615
676
  visible: eventNameShow,
677
+ getContainer: false,
616
678
  onOk: eventNameEdit,
617
679
  onCancel: function onCancel() {
618
680
  return setEventNameShow(false);
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import './styles/index.less';
3
3
  interface DataManageProps {
4
4
  updateEventMetas: Function;
5
+ key: string | number | undefined;
5
6
  }
6
7
  declare const DataManage: React.FC<DataManageProps>;
7
8
  export default DataManage;
@@ -11,11 +11,9 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
11
11
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
12
12
 
13
13
  import { IconFont } from '@zgfe/business-lib';
14
- import { Menu } from 'antd';
14
+ import { Tabs, Popover } from 'antd';
15
15
  import React, { useState, useEffect } from 'react';
16
- import './styles/index.less'; // import EventList from './eventList';
17
- // import UserAttributeList from './userAttributeList';
18
-
16
+ import './styles/index.less';
19
17
  import { DmContext, upDatedDmFun } from '../../store';
20
18
  import { ActionType } from '../../store/action';
21
19
  import PlanList from '../dataPlan';
@@ -23,7 +21,7 @@ import DataCollection from '../dataCollection';
23
21
 
24
22
  var DataManage = function DataManage(props) {
25
23
  var classPrefix = 'data-manage';
26
- var updateEventMetas = props.updateEventMetas; // const { state, dispatch } = useContext(DmContext);
24
+ var updateEventMetas = props.updateEventMetas;
27
25
 
28
26
  var _upDatedDmFun = upDatedDmFun(),
29
27
  _upDatedDmFun2 = _slicedToArray(_upDatedDmFun, 2),
@@ -39,26 +37,18 @@ var DataManage = function DataManage(props) {
39
37
 
40
38
  var _useState = useState('0'),
41
39
  _useState2 = _slicedToArray(_useState, 2),
42
- menuTab = _useState2[0],
43
- setMenuTab = _useState2[1];
40
+ listTab = _useState2[0],
41
+ setListTab = _useState2[1];
44
42
 
45
- var onSelect = function onSelect(e) {
46
- setMenuTab(e.key);
43
+ var tabsChange = function tabsChange(activeKey) {
44
+ setListTab(activeKey);
47
45
  };
48
46
 
49
- var items = [{
50
- label: '埋点管理',
51
- key: '0',
52
- icon: /*#__PURE__*/React.createElement(IconFont, {
53
- type: "maidianguanli"
54
- })
55
- }, {
56
- label: '埋点方案管理',
57
- key: '1',
58
- icon: /*#__PURE__*/React.createElement(IconFont, {
59
- type: "maidianfanganguanli"
60
- })
61
- }];
47
+ var _useState3 = useState(false),
48
+ _useState4 = _slicedToArray(_useState3, 2),
49
+ collapsed = _useState4[0],
50
+ setCollapsed = _useState4[1];
51
+
62
52
  return /*#__PURE__*/React.createElement(DmContext.Provider, {
63
53
  value: {
64
54
  state: state,
@@ -67,16 +57,51 @@ var DataManage = function DataManage(props) {
67
57
  }, /*#__PURE__*/React.createElement("div", {
68
58
  className: classPrefix
69
59
  }, /*#__PURE__*/React.createElement("div", {
70
- className: "".concat(classPrefix, "-menu")
71
- }, /*#__PURE__*/React.createElement(Menu, {
72
- defaultSelectedKeys: ['0'],
73
- onSelect: onSelect,
74
- items: items
75
- })), menuTab == '0' && /*#__PURE__*/React.createElement(DataCollection, null), menuTab == '1' && /*#__PURE__*/React.createElement(PlanList, null)));
60
+ className: "tabs-box ".concat(collapsed && 'tabs-collapsed')
61
+ }, /*#__PURE__*/React.createElement(Tabs, {
62
+ className: "tabs",
63
+ defaultActiveKey: "0",
64
+ tabPosition: "left",
65
+ onChange: tabsChange
66
+ }, /*#__PURE__*/React.createElement(Tabs.TabPane, {
67
+ tab: /*#__PURE__*/React.createElement("div", {
68
+ className: "tab"
69
+ }, collapsed && /*#__PURE__*/React.createElement(Popover, {
70
+ content: "\u57CB\u70B9\u7BA1\u7406",
71
+ placement: "right"
72
+ }, /*#__PURE__*/React.createElement(IconFont, {
73
+ type: "maidianguanli"
74
+ })), !collapsed && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(IconFont, {
75
+ type: "maidianguanli"
76
+ }), "\u57CB\u70B9\u7BA1\u7406")),
77
+ key: "0"
78
+ }), /*#__PURE__*/React.createElement(Tabs.TabPane, {
79
+ tab: /*#__PURE__*/React.createElement("div", {
80
+ className: "tab"
81
+ }, collapsed && /*#__PURE__*/React.createElement(Popover, {
82
+ content: "\u57CB\u70B9\u65B9\u6848\u7BA1\u7406",
83
+ placement: "right"
84
+ }, /*#__PURE__*/React.createElement(IconFont, {
85
+ type: "maidianfanganguanli"
86
+ })), !collapsed && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(IconFont, {
87
+ type: "maidianfanganguanli"
88
+ }), "\u57CB\u70B9\u65B9\u6848\u7BA1\u7406")),
89
+ key: "1"
90
+ })), /*#__PURE__*/React.createElement("div", {
91
+ className: "zhidie-botton"
92
+ }, !collapsed && /*#__PURE__*/React.createElement(IconFont, {
93
+ type: "zhedie",
94
+ onClick: function onClick() {
95
+ setCollapsed(!collapsed);
96
+ }
97
+ }), collapsed && /*#__PURE__*/React.createElement(IconFont, {
98
+ type: "zhankai",
99
+ onClick: function onClick() {
100
+ setCollapsed(!collapsed);
101
+ }
102
+ }))), /*#__PURE__*/React.createElement("div", {
103
+ className: "dmcontent ".concat(collapsed && 'dmcontent-collapsed')
104
+ }, listTab == '0' && /*#__PURE__*/React.createElement(DataCollection, null), listTab == '1' && /*#__PURE__*/React.createElement(PlanList, null))));
76
105
  };
77
106
 
78
- export default DataManage; // export default forwardRef<{}, DataManageProps>((props, ref) => (
79
- // <DmProvider>
80
- // <DataManage {...props} />
81
- // </DmProvider>
82
- // ));
107
+ export default DataManage;
@@ -5,22 +5,89 @@
5
5
  top: 0;
6
6
  left: 0;
7
7
  width: 100%;
8
+ .tabs {
9
+ position: absolute !important;
10
+ top: 0 !important;
11
+ }
8
12
  }
9
13
  .__dumi-default-menu {
10
14
  width: 0;
11
15
  }
12
16
 
13
17
  .data-manage {
18
+ position: relative;
14
19
  display: flex;
15
- height: 100%;
20
+ min-height: 100%;
16
21
  background: #f5f5f5;
17
- &-menu {
18
- width: 240px;
22
+ .tabs-box {
23
+ position: relative;
24
+ min-width: 240px;
19
25
  margin-right: 24px;
20
- // height: 100%;
21
26
  background: #fff;
22
- .ant-menu-item {
23
- margin: 0;
27
+ .tabs {
28
+ position: fixed;
29
+ top: 48px;
30
+ left: 0;
31
+ min-width: 240px;
32
+ margin-right: 24px;
33
+ padding-top: 16px;
34
+ background: #fff;
35
+ .ant-tabs-nav {
36
+ width: 100%;
37
+ .ant-tabs-tab {
38
+ padding: 7px 0;
39
+ }
40
+ .ant-tabs-tab + .ant-tabs-tab {
41
+ margin: 0;
42
+ }
43
+ .ant-tabs-tab-active {
44
+ background: #e8efff;
45
+ }
46
+ .ant-tabs-tab-btn {
47
+ width: 100%;
48
+ font-size: 16px;
49
+ text-align: left;
50
+ .bsicon {
51
+ margin-right: 12px;
52
+ margin-left: 19px;
53
+ font-size: 20px !important;
54
+ }
55
+ }
56
+ }
57
+ .ant-tabs-content-holder {
58
+ display: none;
59
+ }
60
+ }
61
+ .zhidie-botton {
62
+ position: absolute;
63
+ bottom: 0;
64
+ left: -10px;
65
+ width: 100%;
66
+ height: 40px;
67
+ font-size: 24px !important;
68
+ border-top: 1px solid #e8efff;
69
+ .bsicon {
70
+ margin-left: 19px;
71
+ }
72
+ }
73
+ }
74
+ .tabs-collapsed {
75
+ min-width: 48px;
76
+ .tabs {
77
+ min-width: 48px;
78
+ .tab {
79
+ text-align: center;
80
+ .bsicon {
81
+ margin: 0 !important;
82
+ }
83
+ }
24
84
  }
25
85
  }
86
+ .dmcontent {
87
+ width: calc(100% - 264px);
88
+ padding: 16px 0 24px 0;
89
+ }
90
+ .dmcontent-collapsed {
91
+ width: calc(100% - 104px);
92
+ }
26
93
  }
@@ -21,7 +21,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
21
21
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
22
22
 
23
23
  import { IconFont } from '@zgfe/business-lib';
24
- import { Input, Button, Select, Table, Modal, Form, message } from 'antd';
24
+ import { Input, Button, Select, Table, Modal, Form, message, Popover } from 'antd';
25
25
  var Option = Select.Option;
26
26
  import React, { useEffect, useState } from 'react';
27
27
  import './styles/index.less';
@@ -152,15 +152,24 @@ var addEventOrUser = function addEventOrUser(props) {
152
152
 
153
153
  var tableColumnsPropsRender = function tableColumnsPropsRender(item) {
154
154
  var render = function render(text, record, index) {
155
- return /*#__PURE__*/React.createElement(React.Fragment, null, item.dataIndex == 'set' ? /*#__PURE__*/React.createElement(Button, {
156
- type: "text",
157
- className: "".concat(classPrefix, "-table-del"),
155
+ return /*#__PURE__*/React.createElement(React.Fragment, null, item.dataIndex == 'set' ? /*#__PURE__*/React.createElement(React.Fragment, null, tableRowData.length <= 1 ? /*#__PURE__*/React.createElement(IconFont, {
156
+ className: "set-del set-del-err",
157
+ disabled: true,
158
+ type: "shanchu1",
158
159
  onClick: function onClick() {
159
160
  handleRow('del', record);
160
161
  }
162
+ }) : /*#__PURE__*/React.createElement(Popover, {
163
+ content: "\u5220\u9664",
164
+ placement: "right"
161
165
  }, /*#__PURE__*/React.createElement(IconFont, {
162
- type: "shanchu1"
163
- })) : /*#__PURE__*/React.createElement(Form.Item, {
166
+ className: "set-del",
167
+ disabled: true,
168
+ type: "shanchu1",
169
+ onClick: function onClick() {
170
+ handleRow('del', record);
171
+ }
172
+ }))) : /*#__PURE__*/React.createElement(Form.Item, {
164
173
  name: "".concat(item.dataIndex, "-").concat(record.key),
165
174
  rules: rulesData(item)
166
175
  }, /*#__PURE__*/React.createElement(Input, null)));
@@ -187,12 +196,20 @@ var addEventOrUser = function addEventOrUser(props) {
187
196
 
188
197
 
189
198
  var _columns_event = [{
190
- title: '*事件名称',
199
+ title: /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
200
+ style: {
201
+ color: 'red'
202
+ }
203
+ }, "*"), " \u4E8B\u4EF6\u540D\u79F0"),
191
204
  dataIndex: 'eventName',
192
205
  key: 'eventName',
193
206
  align: 'center'
194
207
  }, {
195
- title: '*事件属性',
208
+ title: /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
209
+ style: {
210
+ color: 'red'
211
+ }
212
+ }, "*"), " \u4E8B\u4EF6\u5C5E\u6027"),
196
213
  dataIndex: 'attrName',
197
214
  key: 'attrName',
198
215
  align: 'center'
@@ -203,12 +220,20 @@ var addEventOrUser = function addEventOrUser(props) {
203
220
  }]; // 表格列 - user
204
221
 
205
222
  var _columns_user = [{
206
- title: '*唯一标识',
223
+ title: /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
224
+ style: {
225
+ color: 'red'
226
+ }
227
+ }, "*"), " \u552F\u4E00\u6807\u8BC6"),
207
228
  dataIndex: 'identify',
208
229
  key: 'identify',
209
230
  align: 'center'
210
231
  }, {
211
- title: '*属性名称',
232
+ title: /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
233
+ style: {
234
+ color: 'red'
235
+ }
236
+ }, "*"), " \u5C5E\u6027\u540D\u79F0"),
212
237
  dataIndex: 'propName',
213
238
  key: 'propName',
214
239
  align: 'center'