@zgfe/modules-dm 1.0.2-dm.2 → 1.0.2-dm.20

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.
@@ -15,6 +15,7 @@ interface PropsType {
15
15
  isOpen: number;
16
16
  queryPlanData: queryPlanType;
17
17
  setEventAttrListShow?: Function;
18
+ Refresh?: Function;
18
19
  }
19
20
  declare const CollectionAttributeList: React.FC<PropsType>;
20
21
  export default CollectionAttributeList;
@@ -22,6 +22,7 @@ import React, { useEffect, useState, useContext } from 'react';
22
22
  import './styles/index.less';
23
23
  import request from '../../utils/ajax';
24
24
  import apis from '../../constants/api';
25
+ import { DmContext } from '../../store';
25
26
 
26
27
  var CollectionAttributeList = function CollectionAttributeList(props) {
27
28
  var classPrefix = 'attr-list';
@@ -38,7 +39,10 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
38
39
  var _useState = useState(true),
39
40
  _useState2 = _slicedToArray(_useState, 2),
40
41
  loading = _useState2[0],
41
- setLoading = _useState2[1]; // 判断是否在方案中: 处理表格class添加异常样式 | 处理表格行异常信息展示,true异常
42
+ setLoading = _useState2[1];
43
+
44
+ var _useContext2 = useContext(DmContext),
45
+ state = _useContext2.state; // 判断是否在方案中: 处理表格class添加异常样式 | 处理表格行异常信息展示, true异常
42
46
 
43
47
 
44
48
  var rowRenderHandle = function rowRenderHandle(name) {
@@ -47,13 +51,17 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
47
51
 
48
52
  return (queryPlanData === null || queryPlanData === void 0 ? void 0 : (_queryPlanData$unexpe = queryPlanData.unexpectedPropList) === null || _queryPlanData$unexpe === void 0 ? void 0 : _queryPlanData$unexpe.indexOf(name)) != -1 && isOpen == 1 ? true : false;
49
53
  } else {
50
- var _temp2, _temp2$attrList;
51
-
52
- var _temp = {};
53
- queryPlanData.eventPlanAndRealDataDiff.map(function (item) {
54
- if (item.eventName == (eventAttrsData === null || eventAttrsData === void 0 ? void 0 : eventAttrsData.event_name)) _temp = item;
55
- });
56
- return Object.keys(_temp).length <= 0 ? true : ((_temp2 = _temp) === null || _temp2 === void 0 ? void 0 : (_temp2$attrList = _temp2.attrList) === null || _temp2$attrList === void 0 ? void 0 : _temp2$attrList.indexOf(name)) == -1 && isOpen == 1 ? true : false;
54
+ if (isOpen != 1) {
55
+ return false;
56
+ } else {
57
+ var _temp2, _temp2$attrList;
58
+
59
+ var _temp = {};
60
+ queryPlanData.eventPlanAndRealDataDiff.map(function (item) {
61
+ if (item.eventName == (eventAttrsData === null || eventAttrsData === void 0 ? void 0 : eventAttrsData.event_name)) _temp = item;
62
+ });
63
+ return Object.keys(_temp).length <= 0 ? true : ((_temp2 = _temp) === null || _temp2 === void 0 ? void 0 : (_temp2$attrList = _temp2.attrList) === null || _temp2$attrList === void 0 ? void 0 : _temp2$attrList.indexOf(name)) == -1 ? true : false;
64
+ }
57
65
  }
58
66
  }; // 用户属性列表
59
67
 
@@ -85,6 +93,7 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
85
93
  };
86
94
 
87
95
  useEffect(function () {
96
+ // console.log('eventAttrsData', eventAttrsData);
88
97
  if (source == 'user') {
89
98
  queryUserPropMeta();
90
99
  } else {
@@ -97,17 +106,7 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
97
106
  setUserAttrData(_temp);
98
107
  setLoading(false);
99
108
  }
100
- }, [source]); // 方案名称
101
-
102
- var _useState5 = useState(''),
103
- _useState6 = _slicedToArray(_useState5, 2),
104
- planName = _useState6[0],
105
- setPlanName = _useState6[1];
106
-
107
- var PlanNameChange = function PlanNameChange(e) {
108
- setPlanName(e.currentTarget.value);
109
- }; // 复制属性名称
110
-
109
+ }, [source, eventAttrsData]); // 复制属性名称
111
110
 
112
111
  var copyAttrName = function copyAttrName(name) {
113
112
  navigator.clipboard.writeText(name);
@@ -115,10 +114,10 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
115
114
  }; // 别名foucs
116
115
 
117
116
 
118
- var _useState7 = useState(''),
119
- _useState8 = _slicedToArray(_useState7, 2),
120
- aliasFocusData = _useState8[0],
121
- setAliasFocusData = _useState8[1];
117
+ var _useState5 = useState(''),
118
+ _useState6 = _slicedToArray(_useState5, 2),
119
+ aliasFocusData = _useState6[0],
120
+ setAliasFocusData = _useState6[1];
122
121
 
123
122
  var aliasFocus = function aliasFocus(e) {
124
123
  setAliasFocusData(e.currentTarget.value);
@@ -139,9 +138,15 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
139
138
  }).then(function (res) {
140
139
  if (res) {
141
140
  message.success('修改成功');
141
+
142
+ if (source == 'user') {
143
+ queryUserPropMeta();
144
+ }
145
+
146
+ state.updateEventMetas && state.updateEventMetas(); // 更新store
142
147
  }
143
148
  }).catch(function (err) {
144
- message.success('修改失败');
149
+ message.error('修改失败');
145
150
  }).finally(function () {});
146
151
  }; // 表格列
147
152
 
@@ -177,15 +182,38 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
177
182
  dataIndex: 'alias_name',
178
183
  width: 180,
179
184
  render: function render(text, record, index) {
180
- return /*#__PURE__*/React.createElement(Input, {
181
- className: "alias_name",
182
- placeholder: "\u7F16\u8F91\u522B\u540D",
183
- defaultValue: record.alias_name,
184
- onFocus: aliasFocus,
185
- onBlur: function onBlur(e) {
186
- attrChangeHandle(e.currentTarget.value, record, 'alias_name');
187
- }
188
- });
185
+ if (!record.alias_name) {
186
+ return /*#__PURE__*/React.createElement(Input, {
187
+ className: "alias_name",
188
+ placeholder: "\u7F16\u8F91\u522B\u540D",
189
+ disabled: isDemo,
190
+ defaultValue: record.alias_name,
191
+ onFocus: aliasFocus,
192
+ onBlur: function onBlur(e) {
193
+ attrChangeHandle(e.currentTarget.value, record, 'alias_name');
194
+ }
195
+ });
196
+ } else {
197
+ return /*#__PURE__*/React.createElement(Popover, {
198
+ content: /*#__PURE__*/React.createElement("div", {
199
+ style: {
200
+ width: '200px',
201
+ wordBreak: 'break-all'
202
+ }
203
+ }, record.alias_name),
204
+ trigger: "hover",
205
+ placement: "top"
206
+ }, /*#__PURE__*/React.createElement(Input, {
207
+ className: "alias_name",
208
+ placeholder: "\u7F16\u8F91\u522B\u540D",
209
+ disabled: isDemo,
210
+ defaultValue: record.alias_name,
211
+ onFocus: aliasFocus,
212
+ onBlur: function onBlur(e) {
213
+ attrChangeHandle(e.currentTarget.value, record, 'alias_name');
214
+ }
215
+ }));
216
+ }
189
217
  }
190
218
  }, {
191
219
  title: '属性值别名',
@@ -195,6 +223,11 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
195
223
  return /*#__PURE__*/React.createElement(React.Fragment, null, !rowRenderHandle(record.name) && /*#__PURE__*/React.createElement("span", {
196
224
  className: "attr_alias_name",
197
225
  onClick: function onClick() {
226
+ if (isDemo) {
227
+ message.error('demo环境,无法编辑');
228
+ return;
229
+ }
230
+
198
231
  setattrId(source == 'event' ? record.attr_id : record.id);
199
232
  setAttrAliasNameShow(true);
200
233
  }
@@ -215,6 +248,7 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
215
248
  style: {
216
249
  width: '100%'
217
250
  },
251
+ disabled: isDemo,
218
252
  onChange: function onChange(e) {
219
253
  return attrChangeHandle(e, record, 'type');
220
254
  },
@@ -240,6 +274,7 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
240
274
  style: {
241
275
  width: '100%'
242
276
  },
277
+ disabled: isDemo,
243
278
  onChange: function onChange(e) {
244
279
  return attrChangeHandle(e, record, 'hidden');
245
280
  },
@@ -267,6 +302,7 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
267
302
  style: {
268
303
  width: '100%'
269
304
  },
305
+ disabled: isDemo,
270
306
  onChange: function onChange(e) {
271
307
  return attrChangeHandle(e, record, 'encryption_type');
272
308
  },
@@ -292,25 +328,25 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
292
328
  dataIndex: 'mapping_value'
293
329
  }];
294
330
 
295
- var _useState9 = useState([]),
331
+ var _useState7 = useState([]),
332
+ _useState8 = _slicedToArray(_useState7, 2),
333
+ attrExcelData = _useState8[0],
334
+ setAttrExcelData = _useState8[1];
335
+
336
+ var _useState9 = useState(false),
296
337
  _useState10 = _slicedToArray(_useState9, 2),
297
- attrExcelData = _useState10[0],
298
- setAttrExcelData = _useState10[1];
338
+ attrAliasNameShow = _useState10[0],
339
+ setAttrAliasNameShow = _useState10[1];
299
340
 
300
- var _useState11 = useState(false),
341
+ var _useState11 = useState(0),
301
342
  _useState12 = _slicedToArray(_useState11, 2),
302
- attrAliasNameShow = _useState12[0],
303
- setAttrAliasNameShow = _useState12[1];
343
+ attrId = _useState12[0],
344
+ setattrId = _useState12[1];
304
345
 
305
346
  var _useState13 = useState(0),
306
347
  _useState14 = _slicedToArray(_useState13, 2),
307
- attrId = _useState14[0],
308
- setattrId = _useState14[1];
309
-
310
- var _useState15 = useState(0),
311
- _useState16 = _slicedToArray(_useState15, 2),
312
- batchId = _useState16[0],
313
- setBatchId = _useState16[1];
348
+ batchId = _useState14[0],
349
+ setBatchId = _useState14[1];
314
350
 
315
351
  var uploadProps = {
316
352
  maxCount: 1,
@@ -333,15 +369,16 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
333
369
  setAttrExcelData(res.values);
334
370
  }
335
371
  }).catch(function (err) {
336
- message.success('上传失败');
372
+ message.error('上传失败');
337
373
  });
374
+ return false;
338
375
  }
339
376
  }; // 清空属性值别名excel数据
340
377
 
341
- var _useState17 = useState(false),
342
- _useState18 = _slicedToArray(_useState17, 2),
343
- clearFlag = _useState18[0],
344
- setClearFlag = _useState18[1];
378
+ var _useState15 = useState(false),
379
+ _useState16 = _slicedToArray(_useState15, 2),
380
+ clearFlag = _useState16[0],
381
+ setClearFlag = _useState16[1];
345
382
 
346
383
  var clearData = function clearData() {
347
384
  setAttrExcelData([]);
@@ -366,7 +403,7 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
366
403
  setAttrAliasNameShow(false);
367
404
  }
368
405
  }).catch(function (err) {
369
- message.success('操作失败');
406
+ message.error('操作失败');
370
407
  });
371
408
  }; // 获取已设置的属性值别名列表
372
409
 
@@ -24,7 +24,8 @@ var CollectionEventList = function CollectionEventList(props) {
24
24
 
25
25
  var _useContext = useContext(BizGlobalDataContext),
26
26
  currentApp = _useContext.currentApp,
27
- isDemo = _useContext.isDemo;
27
+ isDemo = _useContext.isDemo; // const { updateEventMetas } = props;
28
+
28
29
 
29
30
  var _useState = useState(0),
30
31
  _useState2 = _slicedToArray(_useState, 2),
@@ -174,8 +175,10 @@ var CollectionEventList = function CollectionEventList(props) {
174
175
  queryList();
175
176
  }
176
177
  }).catch(function (err) {
177
- message.success('创建失败');
178
- }).finally(function () {});
178
+ message.error('创建失败');
179
+ }).finally(function () {
180
+ setEventNameInput('');
181
+ });
179
182
  }; // 筛选:显示状态 | 采集状态
180
183
 
181
184
 
@@ -285,6 +288,7 @@ var CollectionEventList = function CollectionEventList(props) {
285
288
  className: "top-button",
286
289
  type: "primary",
287
290
  shape: "round",
291
+ disabled: isDemo,
288
292
  icon: /*#__PURE__*/React.createElement(IconFont, {
289
293
  style: {
290
294
  marginRight: '5px'
@@ -307,17 +311,21 @@ var CollectionEventList = function CollectionEventList(props) {
307
311
  isOpen: props.isOpen,
308
312
  queryPlanData: props.queryPlanData,
309
313
  eventAttrsData: eventAttrsData,
314
+ Refresh: queryList,
310
315
  source: "event",
311
316
  setEventAttrListShow: setEventAttrListShow
312
317
  }), /*#__PURE__*/React.createElement(Modal, {
313
318
  title: "\u521B\u5EFA\u5206\u7EC4",
319
+ destroyOnClose: true,
314
320
  visible: eventNameShow,
315
321
  onOk: createEventGroup,
316
322
  onCancel: function onCancel() {
317
- return setEventNameShow(false);
323
+ setEventNameShow(false);
324
+ setEventNameInput('');
318
325
  }
319
326
  }, /*#__PURE__*/React.createElement(Input, {
320
327
  placeholder: "\u8BF7\u8F93\u5165\u5206\u7EC4\u540D",
328
+ value: eventNameInput,
321
329
  onChange: function onChange(e) {
322
330
  return setEventNameInput(e.currentTarget.value);
323
331
  }
@@ -1,3 +1,5 @@
1
1
  import React from 'react';
2
- declare const DataCollection: React.FC;
2
+ interface DataCollectionProps {
3
+ }
4
+ declare const DataCollection: React.FC<DataCollectionProps>;
3
5
  export default DataCollection;
@@ -23,7 +23,8 @@ var DataCollection = function DataCollection(props) {
23
23
 
24
24
  var _useContext = useContext(BizGlobalDataContext),
25
25
  currentApp = _useContext.currentApp,
26
- isDemo = _useContext.isDemo;
26
+ isDemo = _useContext.isDemo; // const { updateEventMetas } = props;
27
+
27
28
 
28
29
  var _useState = useState(1),
29
30
  _useState2 = _slicedToArray(_useState, 2),
@@ -81,9 +81,15 @@
81
81
  display: inline-block !important;
82
82
  }
83
83
  }
84
+ .alias_name_popover {
85
+ width: 200px;
86
+ word-break: break-all;
87
+ background: red;
88
+ }
84
89
  .alias_name {
85
90
  background: #fff !important;
86
91
  border: none;
92
+ cursor: pointer;
87
93
  }
88
94
  .ant-input:focus,
89
95
  .ant-input-focused {
@@ -94,6 +100,16 @@
94
100
  }
95
101
  .group-row {
96
102
  border-top: 12px solid #f5f5f5;
103
+ .ant-table-cell-fix-left {
104
+ left: 0px;
105
+ display: block;
106
+ width: 500px;
107
+ background: #fff;
108
+ }
109
+ .ant-table-cell-fix-left-first::after,
110
+ .ant-table-cell-fix-left-last::after {
111
+ box-shadow: none;
112
+ }
97
113
  td {
98
114
  padding: 6px 16px;
99
115
  }
@@ -106,7 +122,7 @@
106
122
  }
107
123
  .group-box {
108
124
  display: flex;
109
- width: 500px;
125
+ width: 800px;
110
126
  line-height: 30px;
111
127
  .ant-input {
112
128
  width: 150px;
@@ -116,13 +132,13 @@
116
132
  margin-right: 4px;
117
133
  font-size: 18px !important;
118
134
  }
119
- .group-text {
120
- display: -webkit-box;
121
- width: 120px;
122
- overflow: hidden;
123
- -webkit-box-orient: vertical;
124
- -webkit-line-clamp: 1;
125
- }
135
+ // .group-text {
136
+ // display: -webkit-box;
137
+ // width: 120px;
138
+ // overflow: hidden;
139
+ // -webkit-box-orient: vertical;
140
+ // -webkit-line-clamp: 1;
141
+ // }
126
142
  .group-handle {
127
143
  margin-left: 30px;
128
144
  cursor: pointer;
@@ -153,6 +169,7 @@
153
169
  }
154
170
  .event_name {
155
171
  display: flex;
172
+ cursor: pointer;
156
173
  .event_name-text {
157
174
  display: -webkit-box;
158
175
  width: 120px;
@@ -164,7 +181,6 @@
164
181
  display: none;
165
182
  margin-left: 10px;
166
183
  font-size: 16px !important;
167
- cursor: pointer;
168
184
  }
169
185
  .copy-text:hover {
170
186
  color: @primary-color;
@@ -173,7 +189,6 @@
173
189
  .collect-icon-active {
174
190
  margin: 0 4px;
175
191
  font-size: 16px !important;
176
- cursor: pointer;
177
192
  }
178
193
  .collect-icon {
179
194
  color: #999;
@@ -204,6 +219,9 @@
204
219
  cursor: pointer;
205
220
  user-select: none;
206
221
  }
222
+ .set-error {
223
+ color: #86909c;
224
+ }
207
225
  }
208
226
  }
209
227
  }
@@ -24,6 +24,7 @@ var Option = Select.Option;
24
24
  import React, { useState, useContext } from 'react';
25
25
  import './styles/index.less';
26
26
  import _ from 'lodash';
27
+ import { DmContext } from '../../store';
27
28
 
28
29
  var TablePlus = function TablePlus(props) {
29
30
  var classPrefix = 'table-plus';
@@ -33,7 +34,10 @@ var TablePlus = function TablePlus(props) {
33
34
 
34
35
  var _useContext = useContext(BizGlobalDataContext),
35
36
  currentApp = _useContext.currentApp,
36
- isDemo = _useContext.isDemo; // 别名foucs
37
+ isDemo = _useContext.isDemo;
38
+
39
+ var _useContext2 = useContext(DmContext),
40
+ state = _useContext2.state; // 别名foucs
37
41
 
38
42
 
39
43
  var _useState = useState(''),
@@ -58,11 +62,16 @@ var TablePlus = function TablePlus(props) {
58
62
  }
59
63
  }).then(function (res) {
60
64
  if (res) {
61
- message.success('修改成功');
65
+ message.success('修改成功'); // console.log(state.updateEventMetas);
66
+
67
+ props.Refresh();
68
+ state.updateEventMetas && state.updateEventMetas(); // 更新store
62
69
  }
63
70
  }).catch(function (err) {
64
- message.success('修改失败');
65
- }).finally(function () {});
71
+ message.error('修改失败');
72
+ }).finally(function () {
73
+ setAliasFocusData('');
74
+ });
66
75
  }; // 表格class处理
67
76
 
68
77
 
@@ -72,7 +81,7 @@ var TablePlus = function TablePlus(props) {
72
81
  } else {
73
82
  var _queryPlanData$unexpe;
74
83
 
75
- return (queryPlanData === null || queryPlanData === void 0 ? void 0 : (_queryPlanData$unexpe = queryPlanData.unexpectedEventList) === null || _queryPlanData$unexpe === void 0 ? void 0 : _queryPlanData$unexpe.indexOf(record.event_name)) != -1 && isOpen == 1 ? 'error-row' : '';
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 && record.owner != 'zg_abp' ? 'error-row' : '';
76
85
  }
77
86
  }; // 控制修改分组名弹框 显示隐藏
78
87
 
@@ -110,7 +119,7 @@ var TablePlus = function TablePlus(props) {
110
119
  props.Refresh();
111
120
  }
112
121
  }).catch(function (err) {
113
- message.success('修改失败');
122
+ message.error('修改失败');
114
123
  }).finally(function () {});
115
124
  }; // 删除分组
116
125
 
@@ -140,7 +149,7 @@ var TablePlus = function TablePlus(props) {
140
149
  props.Refresh();
141
150
  }
142
151
  }).catch(function (err) {
143
- message.success('删除失败');
152
+ message.error('删除失败');
144
153
  }).finally(function () {});
145
154
  }
146
155
  });
@@ -168,7 +177,7 @@ var TablePlus = function TablePlus(props) {
168
177
  props.Refresh();
169
178
  }
170
179
  }).catch(function (err) {
171
- message.success('删除失败');
180
+ message.error('删除失败');
172
181
  }).finally(function () {});
173
182
  }
174
183
  });
@@ -205,12 +214,11 @@ var TablePlus = function TablePlus(props) {
205
214
  event_id: event_id
206
215
  }, _temp)
207
216
  }).then(function (res) {
208
- if (res) {
209
- message.success('修改成功');
210
- props.Refresh();
211
- }
217
+ message.success('修改成功');
218
+ props.Refresh();
219
+ state.updateEventMetas && state.updateEventMetas(); // 更新store
212
220
  }).catch(function (err) {
213
- message.success('修改失败');
221
+ message.error('修改失败');
214
222
  }).finally(function () {});
215
223
  }; // 复制事件名称
216
224
 
@@ -269,24 +277,28 @@ var TablePlus = function TablePlus(props) {
269
277
  if (eventGroupId != undefined) _temp = {
270
278
  eventGroupId: eventGroupId
271
279
  };
280
+ if (type != 'copy') _temp = _objectSpread(_objectSpread({}, _temp), {}, {
281
+ oldEventGroupId: data.groupId
282
+ });
272
283
  request(apis.operateGroupRelations, {
273
284
  method: 'post',
274
285
  data: _objectSpread({
275
286
  appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
276
287
  platform: 0,
277
288
  hasPublicAttrView: true,
278
- eventIds: groupCheckedData[data.groupId].join(','),
279
- oldEventGroupId: data.groupId
289
+ eventIds: groupCheckedData[data.groupId].join(',')
280
290
  }, _temp)
281
291
  }).then(function (res) {
282
- message.success('成功');
292
+ if (res.code == '00') {
293
+ message.success('成功');
283
294
 
284
- var _groupCheckedData = _.cloneDeep(groupCheckedData);
295
+ var _groupCheckedData = _.cloneDeep(groupCheckedData);
285
296
 
286
- delete _groupCheckedData[eventGroupId];
287
- setGroupCheckedData({});
297
+ delete _groupCheckedData[eventGroupId];
298
+ setGroupCheckedData({});
299
+ }
288
300
  }).catch(function (err) {
289
- message.success('失败');
301
+ message.error('失败');
290
302
  }).finally(function () {
291
303
  props.Refresh();
292
304
  });
@@ -401,15 +413,37 @@ var TablePlus = function TablePlus(props) {
401
413
  key: 'alias_name',
402
414
  width: 167,
403
415
  render: function render(text, record, index) {
404
- return /*#__PURE__*/React.createElement(Input, {
405
- className: "alias_name",
406
- placeholder: "\u7F16\u8F91\u522B\u540D",
407
- defaultValue: record.alias_name,
408
- onFocus: aliasFocus,
409
- onBlur: function onBlur(e) {
410
- aliasNameBlur(e, record);
411
- }
412
- });
416
+ if (!record.alias_name) {
417
+ return /*#__PURE__*/React.createElement(Input, {
418
+ className: "alias_name",
419
+ placeholder: "\u7F16\u8F91\u522B\u540D",
420
+ defaultValue: record.alias_name,
421
+ onFocus: aliasFocus,
422
+ onBlur: function onBlur(e) {
423
+ aliasNameBlur(e, record);
424
+ }
425
+ });
426
+ } else {
427
+ return /*#__PURE__*/React.createElement(Popover, {
428
+ content: /*#__PURE__*/React.createElement("div", {
429
+ style: {
430
+ width: '200px',
431
+ wordBreak: 'break-all'
432
+ }
433
+ }, record.alias_name),
434
+ trigger: "hover",
435
+ placement: "top"
436
+ }, /*#__PURE__*/React.createElement(Input, {
437
+ className: "alias_name",
438
+ placeholder: "\u7F16\u8F91\u522B\u540D",
439
+ disabled: isDemo,
440
+ defaultValue: record.alias_name,
441
+ onFocus: aliasFocus,
442
+ onBlur: function onBlur(e) {
443
+ aliasNameBlur(e, record);
444
+ }
445
+ }));
446
+ }
413
447
  }
414
448
  }, {
415
449
  title: '首次上报时间',
@@ -462,7 +496,8 @@ var TablePlus = function TablePlus(props) {
462
496
  style: {
463
497
  width: 150
464
498
  },
465
- disabled: rowClassNameHandle(record) == 'error-row' ? true : false,
499
+ value: record.event_hidden,
500
+ disabled: rowClassNameHandle(record) == 'error-row' || isDemo ? true : false,
466
501
  onChange: function onChange(e) {
467
502
  return eventHiddenChange(e, 'event_hidden', record.event_id);
468
503
  },
@@ -508,7 +543,7 @@ var TablePlus = function TablePlus(props) {
508
543
  style: {
509
544
  width: 150
510
545
  },
511
- disabled: rowClassNameHandle(record) == 'error-row' ? true : false,
546
+ disabled: rowClassNameHandle(record) == 'error-row' || isDemo ? true : false,
512
547
  onChange: function onChange(e) {
513
548
  return eventHiddenChange(e, 'is_stop', record.event_id);
514
549
  },
@@ -549,24 +584,40 @@ var TablePlus = function TablePlus(props) {
549
584
  className: "edit-del"
550
585
  }, /*#__PURE__*/React.createElement(IconFont, {
551
586
  onClick: function onClick() {
587
+ if (isDemo) {
588
+ message.error('demo环境无法修改');
589
+ return;
590
+ }
591
+
552
592
  setEventNameData({
553
593
  groupName: record.groupName,
554
594
  groupId: record.groupId
555
595
  });
596
+ setEventNameInput(record.groupName);
556
597
  setEventNameShow(true);
557
598
  },
558
599
  type: "bianji"
559
600
  }), /*#__PURE__*/React.createElement(IconFont, {
560
601
  onClick: function onClick() {
561
- return eventNameDel(record.groupId);
602
+ if (isDemo) {
603
+ message.error('demo环境无法删除');
604
+ return;
605
+ }
606
+
607
+ eventNameDel(record.groupId);
562
608
  },
563
609
  type: "shanchu"
564
610
  }));
565
611
  } else {
566
612
  return /*#__PURE__*/React.createElement("div", {
567
- className: "set",
613
+ className: "set ".concat(record.owner == 'zg_abp' ? 'set-error' : ''),
568
614
  onClick: function onClick() {
569
- return eventItemDel(record.event_id);
615
+ if (isDemo) {
616
+ message.error('demo环境无法删除');
617
+ return;
618
+ }
619
+
620
+ record.owner != 'zg_abp' ? eventItemDel(record.event_id) : message.error('内置事件无法删除');
570
621
  }
571
622
  }, "\u5220\u9664");
572
623
  }
@@ -590,6 +641,7 @@ var TablePlus = function TablePlus(props) {
590
641
  pagination: false
591
642
  }), /*#__PURE__*/React.createElement(Modal, {
592
643
  title: "\u4FEE\u6539\u5206\u7EC4\u540D",
644
+ destroyOnClose: true,
593
645
  visible: eventNameShow,
594
646
  onOk: eventNameEdit,
595
647
  onCancel: function onCancel() {
@@ -597,6 +649,7 @@ var TablePlus = function TablePlus(props) {
597
649
  }
598
650
  }, /*#__PURE__*/React.createElement(Input, {
599
651
  placeholder: "\u8BF7\u8F93\u5165\u5206\u7EC4\u540D",
652
+ value: eventNameInput,
600
653
  onChange: function onChange(e) {
601
654
  return setEventNameInput(e.currentTarget.value);
602
655
  }