@zgfe/modules-dm 1.0.56-zhongyuan.14 → 1.0.56-zhongyuan.16

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.
@@ -40,6 +40,7 @@ var DrawerAdd = function DrawerAdd(props) {
40
40
  }, [props.open]);
41
41
  var closeDrawer = function closeDrawer() {
42
42
  setIsOpen(false);
43
+ setEvent({});
43
44
  form.resetFields(); // 表单重置
44
45
  conditionRef.current.deleteAll(); // 重置固定筛选数组
45
46
  props.handleClose();
@@ -183,6 +184,7 @@ var DrawerAdd = function DrawerAdd(props) {
183
184
  placement: "right",
184
185
  onClose: onClose,
185
186
  open: isOpen,
187
+ destroyOnClose: true,
186
188
  width: "800px",
187
189
  footer: /*#__PURE__*/React.createElement("div", {
188
190
  className: "".concat(pageClassName, "_footer")
@@ -194,7 +194,7 @@ var RightDetail = function RightDetail(props) {
194
194
  pageName: currentTreeData === null || currentTreeData === void 0 ? void 0 : currentTreeData.pageAttrName
195
195
  }
196
196
  }).then(function (res) {
197
- var _res$data, _res$data2, _res$data3, _res$data4, _res$data5;
197
+ var _res$data, _res$data2, _res$data3, _res$data4, _res$data5, _res$data6;
198
198
  setLoadingDetail(false);
199
199
  if (!res) return;
200
200
  setCurrentTreeDetail(res === null || res === void 0 ? void 0 : res.data);
@@ -204,11 +204,11 @@ var RightDetail = function RightDetail(props) {
204
204
  description: (res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.pageDescribe) || ''
205
205
  });
206
206
  setImagePath(res === null || res === void 0 ? void 0 : (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.pagePath);
207
- setImageUrl([{
207
+ (res === null || res === void 0 ? void 0 : (_res$data3 = res.data) === null || _res$data3 === void 0 ? void 0 : _res$data3.pageUrl) && setImageUrl([{
208
208
  status: 'done',
209
209
  name: '',
210
- url: (res === null || res === void 0 ? void 0 : (_res$data3 = res.data) === null || _res$data3 === void 0 ? void 0 : _res$data3.pageUrl) && getImgUrl(res === null || res === void 0 ? void 0 : (_res$data4 = res.data) === null || _res$data4 === void 0 ? void 0 : _res$data4.pageUrl, '-99'),
211
- uid: res === null || res === void 0 ? void 0 : (_res$data5 = res.data) === null || _res$data5 === void 0 ? void 0 : _res$data5.pagePath
210
+ url: (res === null || res === void 0 ? void 0 : (_res$data4 = res.data) === null || _res$data4 === void 0 ? void 0 : _res$data4.pageUrl) && getImgUrl(res === null || res === void 0 ? void 0 : (_res$data5 = res.data) === null || _res$data5 === void 0 ? void 0 : _res$data5.pageUrl, '-99'),
211
+ uid: res === null || res === void 0 ? void 0 : (_res$data6 = res.data) === null || _res$data6 === void 0 ? void 0 : _res$data6.pagePath
212
212
  }]);
213
213
  });
214
214
  }
@@ -493,59 +493,11 @@ var RightDetail = function RightDetail(props) {
493
493
  userGroup: [0]
494
494
  }
495
495
  }).then(function (res) {
496
- var _res$data6, _res$data6$series, _res$data6$series$, _res$data6$series$$va;
497
- resolve((res === null || res === void 0 ? void 0 : (_res$data6 = res.data) === null || _res$data6 === void 0 ? void 0 : (_res$data6$series = _res$data6.series) === null || _res$data6$series === void 0 ? void 0 : (_res$data6$series$ = _res$data6$series[0]) === null || _res$data6$series$ === void 0 ? void 0 : (_res$data6$series$$va = _res$data6$series$.values) === null || _res$data6$series$$va === void 0 ? void 0 : _res$data6$series$$va[0]) || 0);
496
+ var _res$data7, _res$data7$series, _res$data7$series$, _res$data7$series$$va;
497
+ resolve((res === null || res === void 0 ? void 0 : (_res$data7 = res.data) === null || _res$data7 === void 0 ? void 0 : (_res$data7$series = _res$data7.series) === null || _res$data7$series === void 0 ? void 0 : (_res$data7$series$ = _res$data7$series[0]) === null || _res$data7$series$ === void 0 ? void 0 : (_res$data7$series$$va = _res$data7$series$.values) === null || _res$data7$series$$va === void 0 ? void 0 : _res$data7$series$$va[0]) || 0);
498
498
  });
499
499
  });
500
500
  };
501
- var getPageView = function getPageView(params) {
502
- return new Promise(function (resolve, reject) {
503
- // console.log(eventNameMap);
504
- var haveEventName = eventNameMap === null || eventNameMap === void 0 ? void 0 : eventNameMap[params.name];
505
- if (haveEventName) {
506
- var haveFilter = haveEventName.attrList.filter(function (m) {
507
- var _params$attrs$filters;
508
- return (_params$attrs$filters = params.attrs.filters) === null || _params$attrs$filters === void 0 ? void 0 : _params$attrs$filters.includes(m.label);
509
- });
510
- var pinParams = [];
511
- haveFilter.forEach(function (o) {
512
- pinParams.push({
513
- propCategory: 'eventProp',
514
- type: 1,
515
- attrId: o.id,
516
- attrName: o.label
517
- });
518
- });
519
- // console.log(pinParams, 'pinParams');
520
- var pageId = haveEventName.attrList.filter(function (m) {
521
- return (m === null || m === void 0 ? void 0 : m.key) == params.attrs.page;
522
- });
523
- var resultParams = {
524
- data: {
525
- chartType: 'line',
526
- module: 'insight',
527
- userGroup: [0],
528
- globalDimensions: pinParams,
529
- targets: [{
530
- alias: haveEventName.name,
531
- filters: (currentMap === null || currentMap === void 0 ? void 0 : currentMap.filterJson) && JSON.parse(currentMap === null || currentMap === void 0 ? void 0 : currentMap.filterJson),
532
- analysisDimension: {
533
- analysisIndex: 'number'
534
- },
535
- eventGroupId: 0,
536
- eventId: haveEventName.id,
537
- eventName: haveEventName.name,
538
- type: 'event'
539
- }]
540
- }
541
- };
542
- resolve(resultParams);
543
- throw Error('用来终止循环的');
544
- } else {
545
- resolve(false);
546
- }
547
- });
548
- };
549
501
  return /*#__PURE__*/React.createElement(React.Fragment, null, loadingDetail ? (/*#__PURE__*/React.createElement(Spin, {
550
502
  tip: "\u52A0\u8F7D\u4E2D"
551
503
  })) : (currentTreeData === null || currentTreeData === void 0 ? void 0 : currentTreeData.pageAttrName) ? (/*#__PURE__*/React.createElement(Card, {
@@ -558,13 +510,13 @@ var RightDetail = function RightDetail(props) {
558
510
  bordered: false,
559
511
  extra: isEdit ? (/*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Button, {
560
512
  onClick: function onClick() {
561
- (currentTreeDetail === null || currentTreeDetail === void 0 ? void 0 : currentTreeDetail.pageUrl) && setImageUrl([{
513
+ (currentTreeDetail === null || currentTreeDetail === void 0 ? void 0 : currentTreeDetail.pageUrl) ? setImageUrl([{
562
514
  status: 'done',
563
515
  // name: currentTreeDetail?.pageUrl,
564
516
  name: '',
565
517
  url: (currentTreeDetail === null || currentTreeDetail === void 0 ? void 0 : currentTreeDetail.pageUrl) && getImgUrl(currentTreeDetail === null || currentTreeDetail === void 0 ? void 0 : currentTreeDetail.pageUrl, '-99'),
566
518
  uid: currentTreeDetail === null || currentTreeDetail === void 0 ? void 0 : currentTreeDetail.pagePath
567
- }]);
519
+ }]) : setImageUrl([]);
568
520
  setIsEdit(false);
569
521
  }
570
522
  }, "\u53D6\u6D88"), /*#__PURE__*/React.createElement(Button, {
@@ -178,16 +178,19 @@
178
178
  .mapSetting .ant-dropdown-trigger.biz-select-handle.biz-condition-item-single-select {
179
179
  position: relative;
180
180
  background-color: transparent;
181
+ pointer-events: none;
181
182
  }
182
183
  .mapSetting .ant-dropdown-trigger.biz-select-handle.biz-condition-item-single-select::after {
183
184
  position: absolute;
184
185
  top: 0px;
185
- left: 0;
186
+ left: -10px;
186
187
  display: inline-block;
187
- width: 100%;
188
+ width: 120%;
189
+ height: 112%;
188
190
  padding-top: 8px;
189
191
  text-align: center;
190
192
  vertical-align: middle;
191
193
  background-color: white;
192
194
  content: '是';
195
+ border-radius: 4px;
193
196
  }
@@ -1,210 +1,213 @@
1
- .maidianMapIndex {
2
- height: 100%;
3
- .info-upload-tip {
4
- color: var(--io-N4-, #9aa1a9);
5
- }
6
- }
7
- .mapSetting {
8
- .ant-input[disabled] {
9
- background-color: #fafafb !important;
10
- }
11
- &_search {
12
- display: grid;
13
- grid-template-columns: 1fr 100px;
14
- justify-content: space-between;
15
- margin-bottom: 16px;
16
- &_input {
17
- width: 320px;
18
- margin: 0px 10px 0px 0px;
19
- }
20
- }
21
- .ant-page-header {
22
- padding-top: 0px;
23
- padding-left: 0px;
24
- }
25
- &_addMap {
26
- &_tip {
27
- padding: 0px 0px 0px 16px;
28
- color: #67727f;
29
- line-height: 44px;
30
- background: #f2f3f4;
31
- }
32
- &_propTitle {
33
- padding: 0px 0px 0px 16px;
34
- color: #67727f;
35
- color: #354354;
36
- font-size: 14px;
37
- line-height: 32px;
38
- background: #f2f3f4;
39
- }
40
- &_propTitleLeft {
41
- display: inline-block;
42
- width: 58%;
43
- text-align: left;
44
- }
45
- &_propTitleRight {
46
- display: inline-block;
47
- width: 42%;
48
- text-align: left;
49
- }
50
- &_propContent {
51
- padding: 0px 0px 0px 0px;
52
- color: #67727f;
53
- color: #354354;
54
- font-size: 14px;
55
- line-height: 32px;
56
- }
57
- &_propContentLeft {
58
- display: inline-block;
59
- width: 50%;
60
- text-align: left;
61
- }
62
- &_propContentRight {
63
- display: inline-block;
64
- width: 40%;
65
- text-align: left;
66
- }
67
- &_propContentC {
68
- display: inline-block;
69
- width: 10%;
70
- text-align: center;
71
- }
72
- &_propValueList {
73
- display: flex;
74
- align-items: center;
75
- width: 100%;
76
- margin-top: 8px;
77
- .ant-form-item {
78
- margin: 0px;
79
- }
80
- }
81
- &_propValueflag {
82
- display: inline-block;
83
- margin: 0px 8px;
84
- }
85
- &_content {
86
- display: grid;
87
- grid-template-columns: 1fr 30px 1fr;
88
- }
89
- }
90
- &_footer {
91
- display: flex;
92
- align-items: center;
93
- justify-content: flex-end;
94
- }
95
- &_closeIco {
96
- margin: '0px 8px ';
97
- color: '#9aa1a9';
98
- vertical-align: 'middle';
99
- &:hover {
100
- color: red;
101
- }
102
- }
103
- }
104
-
105
- .leftTreePage {
106
- display: flex;
107
- flex-direction: column;
108
- background-color: white;
109
- &-top {
110
- flex: 1;
111
- }
112
- &-tree {
113
- // max-height: 100%;
114
- }
115
- &_selectMap {
116
- display: grid;
117
- grid-gap: 10px;
118
- grid-template-columns: 75px 1fr 60px;
119
- align-items: center;
120
- margin: 0px 0px 24px;
121
- }
122
- &_selectMap_setting {
123
- margin-left: 10px;
124
- color: #165dff;
125
- cursor: pointer;
126
- }
127
- &_searchBtn {
128
- width: 100%;
129
- padding: 6px 0px;
130
- background-color: transparent;
131
- border: 1px solid #ddd;
132
- cursor: pointer;
133
- }
134
- &_searchBtn:hover {
135
- color: #165dff;
136
- border: 1px solid #165dff;
137
- }
138
- }
139
-
140
- .dataMapDetail_echartDiv {
141
- display: grid;
142
- flex-wrap: wrap;
143
- grid-gap: 20px;
144
- grid-template-columns: repeat(2, 1fr);
145
- align-items: center;
146
- margin-top: 24px;
147
- &_item {
148
- display: grid;
149
- grid-template-columns: 1fr 60px;
150
- align-items: center;
151
- padding: 20px;
152
- background-color: #fafafb;
153
- border: 1px solid #eee;
154
- }
155
- &_leftText {
156
- display: inline-block;
157
- margin-left: 8px;
158
- color: #354354;
159
- }
160
- &_view {
161
- color: #165dff;
162
- }
163
- }
164
- .biz-attr-select-handle {
165
- width: 100%;
166
- max-width: 100%;
167
- margin-bottom: 2px;
168
- padding: 0;
169
- }
170
- .empty {
171
- height: 100%;
172
- color: #67727f;
173
- text-align: center;
174
- .empty-img {
175
- display: block;
176
- width: 200px;
177
- margin: 0px auto;
178
- }
179
- }
180
-
181
- .mapSetting_addMap_form {
182
- .biz-attr-condition-group-handle {
183
- display: none;
184
- }
185
- }
186
- .ziBackground {
187
- .ant-tree .ant-tree-node-content-wrapper.ant-tree-node-selected {
188
- padding: 2px 3px;
189
- background-color: #bad8ff7d;
190
- }
191
- }
192
-
193
- .mapSetting {
194
- .ant-dropdown-trigger.biz-select-handle.biz-condition-item-single-select {
195
- position: relative;
196
- background-color: transparent;
197
- &::after {
198
- position: absolute;
199
- top: 0px;
200
- left: 0;
201
- display: inline-block;
202
- width: 100%;
203
- padding-top: 8px;
204
- text-align: center;
205
- vertical-align: middle;
206
- background-color: white;
207
- content: '是';
208
- }
209
- }
210
- }
1
+ .maidianMapIndex {
2
+ height: 100%;
3
+ .info-upload-tip {
4
+ color: var(--io-N4-, #9aa1a9);
5
+ }
6
+ }
7
+ .mapSetting {
8
+ .ant-input[disabled] {
9
+ background-color: #fafafb !important;
10
+ }
11
+ &_search {
12
+ display: grid;
13
+ grid-template-columns: 1fr 100px;
14
+ justify-content: space-between;
15
+ margin-bottom: 16px;
16
+ &_input {
17
+ width: 320px;
18
+ margin: 0px 10px 0px 0px;
19
+ }
20
+ }
21
+ .ant-page-header {
22
+ padding-top: 0px;
23
+ padding-left: 0px;
24
+ }
25
+ &_addMap {
26
+ &_tip {
27
+ padding: 0px 0px 0px 16px;
28
+ color: #67727f;
29
+ line-height: 44px;
30
+ background: #f2f3f4;
31
+ }
32
+ &_propTitle {
33
+ padding: 0px 0px 0px 16px;
34
+ color: #67727f;
35
+ color: #354354;
36
+ font-size: 14px;
37
+ line-height: 32px;
38
+ background: #f2f3f4;
39
+ }
40
+ &_propTitleLeft {
41
+ display: inline-block;
42
+ width: 58%;
43
+ text-align: left;
44
+ }
45
+ &_propTitleRight {
46
+ display: inline-block;
47
+ width: 42%;
48
+ text-align: left;
49
+ }
50
+ &_propContent {
51
+ padding: 0px 0px 0px 0px;
52
+ color: #67727f;
53
+ color: #354354;
54
+ font-size: 14px;
55
+ line-height: 32px;
56
+ }
57
+ &_propContentLeft {
58
+ display: inline-block;
59
+ width: 50%;
60
+ text-align: left;
61
+ }
62
+ &_propContentRight {
63
+ display: inline-block;
64
+ width: 40%;
65
+ text-align: left;
66
+ }
67
+ &_propContentC {
68
+ display: inline-block;
69
+ width: 10%;
70
+ text-align: center;
71
+ }
72
+ &_propValueList {
73
+ display: flex;
74
+ align-items: center;
75
+ width: 100%;
76
+ margin-top: 8px;
77
+ .ant-form-item {
78
+ margin: 0px;
79
+ }
80
+ }
81
+ &_propValueflag {
82
+ display: inline-block;
83
+ margin: 0px 8px;
84
+ }
85
+ &_content {
86
+ display: grid;
87
+ grid-template-columns: 1fr 30px 1fr;
88
+ }
89
+ }
90
+ &_footer {
91
+ display: flex;
92
+ align-items: center;
93
+ justify-content: flex-end;
94
+ }
95
+ &_closeIco {
96
+ margin: '0px 8px ';
97
+ color: '#9aa1a9';
98
+ vertical-align: 'middle';
99
+ &:hover {
100
+ color: red;
101
+ }
102
+ }
103
+ }
104
+
105
+ .leftTreePage {
106
+ display: flex;
107
+ flex-direction: column;
108
+ background-color: white;
109
+ &-top {
110
+ flex: 1;
111
+ }
112
+ &-tree {
113
+ // max-height: 100%;
114
+ }
115
+ &_selectMap {
116
+ display: grid;
117
+ grid-gap: 10px;
118
+ grid-template-columns: 75px 1fr 60px;
119
+ align-items: center;
120
+ margin: 0px 0px 24px;
121
+ }
122
+ &_selectMap_setting {
123
+ margin-left: 10px;
124
+ color: #165dff;
125
+ cursor: pointer;
126
+ }
127
+ &_searchBtn {
128
+ width: 100%;
129
+ padding: 6px 0px;
130
+ background-color: transparent;
131
+ border: 1px solid #ddd;
132
+ cursor: pointer;
133
+ }
134
+ &_searchBtn:hover {
135
+ color: #165dff;
136
+ border: 1px solid #165dff;
137
+ }
138
+ }
139
+
140
+ .dataMapDetail_echartDiv {
141
+ display: grid;
142
+ flex-wrap: wrap;
143
+ grid-gap: 20px;
144
+ grid-template-columns: repeat(2, 1fr);
145
+ align-items: center;
146
+ margin-top: 24px;
147
+ &_item {
148
+ display: grid;
149
+ grid-template-columns: 1fr 60px;
150
+ align-items: center;
151
+ padding: 20px;
152
+ background-color: #fafafb;
153
+ border: 1px solid #eee;
154
+ }
155
+ &_leftText {
156
+ display: inline-block;
157
+ margin-left: 8px;
158
+ color: #354354;
159
+ }
160
+ &_view {
161
+ color: #165dff;
162
+ }
163
+ }
164
+ .biz-attr-select-handle {
165
+ width: 100%;
166
+ max-width: 100%;
167
+ margin-bottom: 2px;
168
+ padding: 0;
169
+ }
170
+ .empty {
171
+ height: 100%;
172
+ color: #67727f;
173
+ text-align: center;
174
+ .empty-img {
175
+ display: block;
176
+ width: 200px;
177
+ margin: 0px auto;
178
+ }
179
+ }
180
+
181
+ .mapSetting_addMap_form {
182
+ .biz-attr-condition-group-handle {
183
+ display: none;
184
+ }
185
+ }
186
+ .ziBackground {
187
+ .ant-tree .ant-tree-node-content-wrapper.ant-tree-node-selected {
188
+ padding: 2px 3px;
189
+ background-color: #bad8ff7d;
190
+ }
191
+ }
192
+
193
+ .mapSetting {
194
+ .ant-dropdown-trigger.biz-select-handle.biz-condition-item-single-select {
195
+ position: relative;
196
+ background-color: transparent;
197
+ pointer-events: none;
198
+ &::after {
199
+ position: absolute;
200
+ top: 0px;
201
+ left: -10px;
202
+ display: inline-block;
203
+ width: 120%;
204
+ height: 112%;
205
+ padding-top: 8px;
206
+ text-align: center;
207
+ vertical-align: middle;
208
+ background-color: white;
209
+ border-radius: 4px;
210
+ content: '是';
211
+ }
212
+ }
213
+ }
@@ -73,6 +73,11 @@ var MapSetting = function MapSetting(props) {
73
73
  return /*#__PURE__*/React.createElement(Space, {
74
74
  size: "middle"
75
75
  }, /*#__PURE__*/React.createElement("a", {
76
+ onClick: function onClick() {
77
+ currentMap.current = record;
78
+ setOpenMapView(true);
79
+ }
80
+ }, "\u67E5\u770B"), /*#__PURE__*/React.createElement("a", {
76
81
  onClick: function onClick() {
77
82
  currentMap.current = record;
78
83
  UseModal({
@@ -147,7 +152,7 @@ var MapSetting = function MapSetting(props) {
147
152
  value: searchName,
148
153
  allowClear: true,
149
154
  onChange: onChange
150
- }), "\u517120\u6761"), /*#__PURE__*/React.createElement(Button, {
155
+ }), "\u5171 ", mapData === null || mapData === void 0 ? void 0 : mapData.length, " \u6761"), /*#__PURE__*/React.createElement(Button, {
151
156
  type: "primary",
152
157
  onClick: function onClick() {
153
158
  return setOpenMapAdd(true);
@@ -16,10 +16,12 @@
16
16
  .dataReal_table_tip {
17
17
  margin: 0px 0px 16px;
18
18
  color: #021429;
19
+ font-weight: bold;
19
20
  }
20
21
  .dataReal_table_tip span {
21
22
  margin: 0px 0px 0px 6px;
22
23
  color: #67727f;
24
+ font-weight: 400;
23
25
  }
24
26
  .dataReal-infoData {
25
27
  display: flex;
@@ -15,9 +15,11 @@
15
15
  &_tip {
16
16
  margin: 0px 0px 16px;
17
17
  color: #021429;
18
+ font-weight: bold;
18
19
  span {
19
20
  margin: 0px 0px 0px 6px;
20
21
  color: #67727f;
22
+ font-weight: 400;
21
23
  }
22
24
  }
23
25
  }
@@ -15,7 +15,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
15
15
  function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
16
16
  import { BizGlobalDataContext, IconFont } from '@zgfe/business-lib';
17
17
  import { Button, Form, Input } from 'antd';
18
- import React, { useContext, useEffect, useMemo, useState } from 'react';
18
+ import React, { useContext, useEffect, useMemo, useRef, useState } from 'react';
19
19
  import moment from 'moment';
20
20
  import { getAppID } from '../../utils';
21
21
  import './css/index.less';
@@ -32,22 +32,16 @@ var DataRealView = function DataRealView() {
32
32
  var _useContext = useContext(BizGlobalDataContext),
33
33
  currentApp = _useContext.currentApp,
34
34
  currentUser = _useContext.currentUser;
35
- var _useState = useState(false),
35
+ var textStatus = useRef(false);
36
+ var _useState = useState([]),
36
37
  _useState2 = _slicedToArray(_useState, 2),
37
- textStatus = _useState2[0],
38
- setTextStatus = _useState2[1];
38
+ oldList = _useState2[0],
39
+ setOldList = _useState2[1]; // 未筛选的数据
39
40
  var _useState3 = useState([]),
40
41
  _useState4 = _slicedToArray(_useState3, 2),
41
- oldList = _useState4[0],
42
- setOldList = _useState4[1]; // 未筛选的数据
43
- var _useState5 = useState([]),
44
- _useState6 = _slicedToArray(_useState5, 2),
45
- list = _useState6[0],
46
- setList = _useState6[1]; // 表格筛选完成的数据
47
- var _useState7 = useState(null),
48
- _useState8 = _slicedToArray(_useState7, 2),
49
- ws = _useState8[0],
50
- setWs = _useState8[1];
42
+ list = _useState4[0],
43
+ setList = _useState4[1]; // 表格筛选完成的数据
44
+ var ws = useRef(null);
51
45
  var _Form$useForm = Form.useForm(),
52
46
  _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
53
47
  form = _Form$useForm2[0];
@@ -55,10 +49,10 @@ var DataRealView = function DataRealView() {
55
49
  var eventName = Form.useWatch('eventName', form);
56
50
  var searchUserId = Form.useWatch('searchUserId', form);
57
51
  var filterData = Form.useWatch('filterData', form);
58
- var _useState9 = useState(),
59
- _useState10 = _slicedToArray(_useState9, 2),
60
- currentMessageObj = _useState10[0],
61
- setCurrentMessageObj = _useState10[1];
52
+ var _useState5 = useState(),
53
+ _useState6 = _slicedToArray(_useState5, 2),
54
+ currentMessageObj = _useState6[0],
55
+ setCurrentMessageObj = _useState6[1];
62
56
  var initWebsocket = function initWebsocket(params) {
63
57
  // 创建 WebSocket 连接
64
58
  var socket = new WebSocket(webSocketUrl);
@@ -112,7 +106,7 @@ var DataRealView = function DataRealView() {
112
106
  console.log('WebSocket disconnected:', event.reason);
113
107
  };
114
108
  // 设置 WebSocket
115
- setWs(socket);
109
+ ws.current = socket;
116
110
  };
117
111
  var filterPro = function filterPro(str, event) {
118
112
  // 定义正则表达式,匹配"$eid":"具体值"这种格式中的具体值部分
@@ -148,17 +142,17 @@ var DataRealView = function DataRealView() {
148
142
  };
149
143
  var handleRefresh = /*#__PURE__*/function () {
150
144
  var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
151
- var params;
145
+ var _ws$current, params;
152
146
  return _regeneratorRuntime().wrap(function _callee$(_context) {
153
147
  while (1) switch (_context.prev = _context.next) {
154
148
  case 0:
155
- setTextStatus(!textStatus);
156
- if (!textStatus) {
149
+ textStatus.current = !textStatus.current;
150
+ if (textStatus.current) {
157
151
  _context.next = 5;
158
152
  break;
159
153
  }
160
- ws === null || ws === void 0 ? void 0 : ws.close(); // 停止刷新 关闭链接
161
- setWs(null);
154
+ (_ws$current = ws.current) === null || _ws$current === void 0 ? void 0 : _ws$current.close(); // 停止刷新 关闭链接
155
+ ws.current = null;
162
156
  return _context.abrupt("return");
163
157
  case 5:
164
158
  // const data = form.getFieldsValue(true); // 表单数据
@@ -181,15 +175,35 @@ var DataRealView = function DataRealView() {
181
175
  }();
182
176
  useEffect(function () {
183
177
  // 组件挂载时执行的操作
184
- console.log('组件挂载');
185
178
  // 返回一个清理函数,在组件卸载时执行
186
179
  return function () {
187
- if (textStatus) {
188
- setTextStatus(false);
189
- ws === null || ws === void 0 ? void 0 : ws.close(); // 停止刷新 关闭链接
190
- setWs(null);
191
- return;
192
- }
180
+ // 模拟异步保存数据到本地存储
181
+ var unloadWs = /*#__PURE__*/function () {
182
+ var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
183
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
184
+ while (1) switch (_context2.prev = _context2.next) {
185
+ case 0:
186
+ _context2.prev = 0;
187
+ _context2.next = 3;
188
+ return handleRefresh();
189
+ case 3:
190
+ _context2.next = 8;
191
+ break;
192
+ case 5:
193
+ _context2.prev = 5;
194
+ _context2.t0 = _context2["catch"](0);
195
+ console.error('websocket:', _context2.t0);
196
+ case 8:
197
+ case "end":
198
+ return _context2.stop();
199
+ }
200
+ }, _callee2, null, [[0, 5]]);
201
+ }));
202
+ return function unloadWs() {
203
+ return _ref2.apply(this, arguments);
204
+ };
205
+ }();
206
+ unloadWs();
193
207
  };
194
208
  }, []);
195
209
  useMemo(function () {
@@ -273,12 +287,12 @@ var DataRealView = function DataRealView() {
273
287
  }))), /*#__PURE__*/React.createElement(Button, {
274
288
  type: "primary",
275
289
  onClick: handleRefresh,
276
- icon: textStatus ? /*#__PURE__*/React.createElement(IconFont, {
290
+ icon: textStatus.current ? /*#__PURE__*/React.createElement(IconFont, {
277
291
  type: "zanting"
278
292
  }) : /*#__PURE__*/React.createElement(IconFont, {
279
293
  type: "bofang"
280
294
  })
281
- }, textStatus ? '停止刷新' : '开始刷新')), /*#__PURE__*/React.createElement("div", {
295
+ }, textStatus.current ? '停止刷新' : '开始刷新')), /*#__PURE__*/React.createElement("div", {
282
296
  className: "".concat(classNameBase, "_table")
283
297
  }, /*#__PURE__*/React.createElement("h4", {
284
298
  className: "".concat(classNameBase, "_table_tip")
@@ -13,15 +13,30 @@ var DataRealViewTable = function DataRealViewTable(_ref) {
13
13
  title: '触发时间',
14
14
  field: 'time',
15
15
  width: 160,
16
- sort: true
16
+ sort: true,
17
+ headerStyle: {
18
+ fontSize: 14,
19
+ color: '#021429',
20
+ fontWeight: 400
21
+ }
17
22
  }, {
18
23
  title: '事件名',
19
24
  field: 'eventName',
20
- width: 160
25
+ width: 160,
26
+ headerStyle: {
27
+ fontSize: 14,
28
+ color: '#021429',
29
+ fontWeight: 400
30
+ }
21
31
  }, {
22
32
  title: '用户ID',
23
33
  field: 'userId',
24
- width: 160
34
+ width: 160,
35
+ headerStyle: {
36
+ fontSize: 14,
37
+ color: '#021429',
38
+ fontWeight: 400
39
+ }
25
40
  }, {
26
41
  title: '数据',
27
42
  field: 'data',
@@ -29,6 +44,11 @@ var DataRealViewTable = function DataRealViewTable(_ref) {
29
44
  style: {
30
45
  autoWrapText: true,
31
46
  lineHeight: 30
47
+ },
48
+ headerStyle: {
49
+ fontSize: 14,
50
+ color: '#021429',
51
+ fontWeight: 400
32
52
  }
33
53
  // customRender(args: any) {
34
54
  // const { dataValue } = args;
@@ -139,11 +159,16 @@ var DataRealViewTable = function DataRealViewTable(_ref) {
139
159
  maxCharactersNumber: 1000000,
140
160
  autoWrapText: true,
141
161
  defaultHeaderRowHeight: 70,
142
- // defaultRowHeight: 'auto', // 默认单元格行高
143
- defaultRowHeight: 470,
162
+ defaultRowHeight: 'auto',
163
+ // defaultRowHeight: 470,
144
164
  enableLineBreak: true,
145
165
  rowSeriesNumber: {
146
- title: '序号'
166
+ title: '序号',
167
+ headerStyle: {
168
+ fontSize: 14,
169
+ color: '#021429',
170
+ fontWeight: 400
171
+ }
147
172
  },
148
173
  keyboardOptions: {
149
174
  // 快捷键配置
@@ -151,7 +176,15 @@ var DataRealViewTable = function DataRealViewTable(_ref) {
151
176
  copySelected: true,
152
177
  pasteValueToCell: true
153
178
  },
154
- editor: '',
179
+ editor: function editor(args) {
180
+ var tempInput = document.createElement('input');
181
+ tempInput.value = args.value;
182
+ document.body.appendChild(tempInput);
183
+ tempInput.select();
184
+ document.execCommand('copy');
185
+ document.body.removeChild(tempInput);
186
+ return args.value;
187
+ },
155
188
  autoFillWidth: true,
156
189
  emptyTip: {
157
190
  // 空数据提示
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zgfe/modules-dm",
3
- "version": "1.0.56-zhongyuan.14",
3
+ "version": "1.0.56-zhongyuan.16",
4
4
  "license": "ISC",
5
5
  "module": "es/index.js",
6
6
  "typings": "es/index.d.ts",
@@ -57,7 +57,7 @@
57
57
  "umi-request": "^1.4.0",
58
58
  "yorkie": "^2.0.0"
59
59
  },
60
- "gitHead": "e721bdffa17795e757afb2127814661d403da45a",
60
+ "gitHead": "cf1ddfc62eca28fb1a72b46209bb5778aede1b1c",
61
61
  "gitHooks": {
62
62
  "pre-commit": "lint-staged"
63
63
  }