@zgfe/modules-settings 2.1.0-zhongyuan.3 → 2.1.0-zhongyuan.30
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.
- package/es/components/importMetaDialog/index.d.ts +2 -0
- package/es/components/importMetaDialog/index.js +18 -3
- package/es/constants/api.d.ts +6 -0
- package/es/constants/api.js +17 -8
- package/es/modules/appSettings/dataAccessFilter/index.js +2 -1
- package/es/modules/companySetting/application/applicationForm.d.ts +1 -0
- package/es/modules/companySetting/application/applicationForm.js +34 -4
- package/es/modules/companySetting/application/index.js +5 -6
- package/es/modules/companySetting/application/index.less +144 -144
- package/es/modules/companySetting/index.js +37 -33
- package/es/modules/companySetting/operationLog/index.js +22 -5
- package/es/modules/companySetting/user/index.js +29 -24
- package/es/modules/companySetting/user/invite.js +28 -100
- package/es/modules/createDemand/demo/selectPoint.js +1 -2
- package/es/modules/createDemand/index.js +7 -6
- package/es/modules/createDemand/styles/index.less +403 -403
- package/es/modules/createDemand_bf/demo/index.js +0 -1
- package/es/modules/createDemand_bf/index.js +0 -1
- package/es/modules/dealDemand/demo/index.js +0 -1
- package/es/modules/dealDemand/demo/selectPoint.js +1 -1
- package/es/modules/dealDemand/index.js +0 -2
- package/es/modules/demandManage/index.js +0 -1
- package/es/modules/demandManage/styles/index.less +155 -155
- package/es/modules/pointMap/createMetaDrawer.js +131 -69
- package/es/modules/pointMap/pageInfo.js +39 -16
- package/es/modules/pointMap/styles/index.less +8 -0
- package/es/modules/pointMap/styles/tree.css +164 -145
- package/es/modules/pointMap/styles/tree.less +174 -156
- package/es/modules/pointMap/tree.js +196 -118
- package/es/modules/systemSetting/dictionaryItem/dictionaryManagement/create.js +5 -4
- package/es/modules/systemSetting/dictionaryItem/dictionaryManagement/css/index.less +48 -48
- package/es/modules/systemSetting/dictionaryItem/dictionaryManagement/index.js +3 -2
- package/es/modules/systemSetting/dictionaryItem/eventTagManagement/create.js +7 -9
- package/es/modules/systemSetting/dictionaryItem/eventTagManagement/index.js +29 -16
- package/es/modules/systemSetting/dictionaryItem/eventTagManagement/type/index.d.ts +1 -1
- package/es/modules/systemSetting/document-setting/index.js +7 -6
- package/es/modules/systemSetting/index.js +13 -15
- package/package.json +3 -3
|
@@ -23,7 +23,10 @@ import React, { useContext, useEffect, useState } from 'react';
|
|
|
23
23
|
import _ from 'lodash';
|
|
24
24
|
import BizEditText from './editTxt';
|
|
25
25
|
import './styles/index.less';
|
|
26
|
+
import request from '../../utils/ajax';
|
|
27
|
+
import apis from '../../constants/api';
|
|
26
28
|
var CreateMeta = function CreateMeta(props) {
|
|
29
|
+
var _props$data;
|
|
27
30
|
var classPrefix = 'setting-create-meta-drawer';
|
|
28
31
|
var _useContext = useContext(BizGlobalDataContext),
|
|
29
32
|
currentApp = _useContext.currentApp,
|
|
@@ -74,8 +77,10 @@ var CreateMeta = function CreateMeta(props) {
|
|
|
74
77
|
form.setFieldsValue({
|
|
75
78
|
aliasName: data.aliasName,
|
|
76
79
|
eventName: data.eventName,
|
|
77
|
-
|
|
80
|
+
businessLabelId: data.businessLabelId
|
|
78
81
|
});
|
|
82
|
+
setTriTagInput(data.triggeringOccasion);
|
|
83
|
+
setTriTagId(data.triggerLabelId);
|
|
79
84
|
setInputText(data.eventName);
|
|
80
85
|
if (data.eventAttrList) {
|
|
81
86
|
setEventAttrList(_toConsumableArray(data.eventAttrList));
|
|
@@ -111,7 +116,7 @@ var CreateMeta = function CreateMeta(props) {
|
|
|
111
116
|
});
|
|
112
117
|
return _context.abrupt("return");
|
|
113
118
|
case 11:
|
|
114
|
-
|
|
119
|
+
//把参数传递给主页面
|
|
115
120
|
if (props.onSubmit) {
|
|
116
121
|
if (props.data) {
|
|
117
122
|
props.onSubmit(_objectSpread(_objectSpread({}, props.data), {}, {
|
|
@@ -121,33 +126,19 @@ var CreateMeta = function CreateMeta(props) {
|
|
|
121
126
|
props.onSubmit({
|
|
122
127
|
eventName: values.eventName,
|
|
123
128
|
aliasName: values.aliasName,
|
|
124
|
-
triggeringOccasion:
|
|
125
|
-
|
|
126
|
-
|
|
129
|
+
triggeringOccasion: triTagInput,
|
|
130
|
+
eventAttrList: eventAttrList,
|
|
131
|
+
businessLabelId: values.businessLabelId,
|
|
132
|
+
triggerLabelId: triTagId,
|
|
133
|
+
businessLabel: bizTag.filter(function (res) {
|
|
134
|
+
return res.id == values.businessLabelId;
|
|
135
|
+
})[0],
|
|
136
|
+
triggerLabel: triTag.filter(function (res) {
|
|
137
|
+
return res.id == values.businessLabelId;
|
|
138
|
+
})[0]
|
|
127
139
|
}, 'create');
|
|
128
140
|
}
|
|
129
141
|
}
|
|
130
|
-
// request<any>(apis.createEvent, {
|
|
131
|
-
// method: 'POST',
|
|
132
|
-
// data: {
|
|
133
|
-
// app_id: currentApp?.appId,
|
|
134
|
-
// eventName: values.eventName,
|
|
135
|
-
// aliasName: values.aliasName,
|
|
136
|
-
// triggeringOccasion: values.triggeringOccasion,
|
|
137
|
-
// eventAttrList,
|
|
138
|
-
// },
|
|
139
|
-
// }).then((res) => {
|
|
140
|
-
// if (res?.code === '100000') {
|
|
141
|
-
// notification.success({
|
|
142
|
-
// message: '保存成功',
|
|
143
|
-
// });
|
|
144
|
-
// props.onSubmit && props.onSubmit();
|
|
145
|
-
// } else {
|
|
146
|
-
// notification.error({
|
|
147
|
-
// message: '保存失败',
|
|
148
|
-
// });
|
|
149
|
-
// }
|
|
150
|
-
// });
|
|
151
142
|
_context.next = 17;
|
|
152
143
|
break;
|
|
153
144
|
case 14:
|
|
@@ -179,6 +170,10 @@ var CreateMeta = function CreateMeta(props) {
|
|
|
179
170
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
180
171
|
encryption_type = _useState14[0],
|
|
181
172
|
setEncryptionType = _useState14[1];
|
|
173
|
+
var _useState15 = useState(''),
|
|
174
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
175
|
+
hasEventName = _useState16[0],
|
|
176
|
+
setHasEventName = _useState16[1]; // input状态 error|""
|
|
182
177
|
var columns = [{
|
|
183
178
|
title: '序号',
|
|
184
179
|
dataIndex: 'event_name',
|
|
@@ -202,14 +197,24 @@ var CreateMeta = function CreateMeta(props) {
|
|
|
202
197
|
style: {
|
|
203
198
|
margin: '-10px 0'
|
|
204
199
|
}
|
|
205
|
-
}, /*#__PURE__*/React.createElement(
|
|
206
|
-
|
|
207
|
-
value: text,
|
|
208
|
-
max: 128,
|
|
200
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
201
|
+
disabled: homeType == 'get',
|
|
209
202
|
placeholder: '请输入事件属性名',
|
|
203
|
+
value: text,
|
|
204
|
+
showCount: true,
|
|
205
|
+
status: hasEventName,
|
|
206
|
+
maxLength: 128,
|
|
210
207
|
onChange: function onChange(e) {
|
|
211
208
|
setIsChange(true);
|
|
212
|
-
changeItemInfo(index, 'name', e);
|
|
209
|
+
changeItemInfo(index, 'name', e.target.value);
|
|
210
|
+
},
|
|
211
|
+
onBlur: function onBlur(e) {
|
|
212
|
+
var valueEventName = e.target.value;
|
|
213
|
+
var name = eventAttrList.find(function (o) {
|
|
214
|
+
return o.name == valueEventName;
|
|
215
|
+
});
|
|
216
|
+
setHasEventName(name ? 'error' : '');
|
|
217
|
+
name && message.error('事件名称不能重复');
|
|
213
218
|
}
|
|
214
219
|
}));
|
|
215
220
|
}
|
|
@@ -403,10 +408,10 @@ var CreateMeta = function CreateMeta(props) {
|
|
|
403
408
|
}, "\u5220\u9664");
|
|
404
409
|
}
|
|
405
410
|
});
|
|
406
|
-
var
|
|
407
|
-
|
|
408
|
-
scrollY =
|
|
409
|
-
setScrollY =
|
|
411
|
+
var _useState17 = useState(''),
|
|
412
|
+
_useState18 = _slicedToArray(_useState17, 2),
|
|
413
|
+
scrollY = _useState18[0],
|
|
414
|
+
setScrollY = _useState18[1];
|
|
410
415
|
var getTableScroll = function getTableScroll(extraHeight, id) {
|
|
411
416
|
if (typeof extraHeight == 'undefined') {
|
|
412
417
|
// 默认底部分页64 + 边距10
|
|
@@ -433,6 +438,8 @@ var CreateMeta = function CreateMeta(props) {
|
|
|
433
438
|
useEffect(function () {
|
|
434
439
|
var _Y = getTableScroll(545, 'dataManageCreateMetaTable');
|
|
435
440
|
setScrollY(_Y);
|
|
441
|
+
getTagList(2);
|
|
442
|
+
getTagList(3);
|
|
436
443
|
}, []);
|
|
437
444
|
var onClose = function onClose() {
|
|
438
445
|
if (isChange) {
|
|
@@ -445,6 +452,23 @@ var CreateMeta = function CreateMeta(props) {
|
|
|
445
452
|
var changeSwitch = function changeSwitch(event) {
|
|
446
453
|
setIsCopy(event);
|
|
447
454
|
};
|
|
455
|
+
// 根据事件id获取属性列表
|
|
456
|
+
function getEventIdAttrList(id) {
|
|
457
|
+
request(apis.getEventAttributes, {
|
|
458
|
+
method: 'post',
|
|
459
|
+
data: {
|
|
460
|
+
appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
|
|
461
|
+
eventId: id
|
|
462
|
+
}
|
|
463
|
+
}).then(function (res) {
|
|
464
|
+
setEventAttrList([res.data.map(function (res) {
|
|
465
|
+
return _objectSpread(_objectSpread({}, res), {}, {
|
|
466
|
+
aliasName: res.alias,
|
|
467
|
+
name: res.label
|
|
468
|
+
});
|
|
469
|
+
})]);
|
|
470
|
+
});
|
|
471
|
+
}
|
|
448
472
|
var onChangeEvent = function onChangeEvent(_ref2) {
|
|
449
473
|
var event = _ref2.event;
|
|
450
474
|
form.setFieldsValue({
|
|
@@ -452,20 +476,60 @@ var CreateMeta = function CreateMeta(props) {
|
|
|
452
476
|
eventName: event.name
|
|
453
477
|
});
|
|
454
478
|
setInputText(event.name);
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
479
|
+
getEventIdAttrList(event.id);
|
|
480
|
+
};
|
|
481
|
+
//标签列表数据 2:业务标签 3:触发标签
|
|
482
|
+
var _useState19 = useState([]),
|
|
483
|
+
_useState20 = _slicedToArray(_useState19, 2),
|
|
484
|
+
bizTag = _useState20[0],
|
|
485
|
+
setBizTag = _useState20[1];
|
|
486
|
+
var _useState21 = useState(),
|
|
487
|
+
_useState22 = _slicedToArray(_useState21, 2),
|
|
488
|
+
triTagInput = _useState22[0],
|
|
489
|
+
setTriTagInput = _useState22[1]; // 触发时机
|
|
490
|
+
var _useState23 = useState([]),
|
|
491
|
+
_useState24 = _slicedToArray(_useState23, 2),
|
|
492
|
+
triTag = _useState24[0],
|
|
493
|
+
setTriTag = _useState24[1];
|
|
494
|
+
var _useState25 = useState(),
|
|
495
|
+
_useState26 = _slicedToArray(_useState25, 2),
|
|
496
|
+
triTagId = _useState26[0],
|
|
497
|
+
setTriTagId = _useState26[1];
|
|
498
|
+
var getTagList = function getTagList(type) {
|
|
499
|
+
request(apis.dict.getTagList, {
|
|
500
|
+
method: 'post',
|
|
501
|
+
data: {
|
|
502
|
+
appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
|
|
503
|
+
labelType: type
|
|
504
|
+
}
|
|
505
|
+
}).then(function (res) {
|
|
506
|
+
if (res && res.code == '100000') {
|
|
507
|
+
switch (type) {
|
|
508
|
+
case 2:
|
|
509
|
+
setBizTag(res.data.map(function (res) {
|
|
510
|
+
return {
|
|
511
|
+
label: res.labelName,
|
|
512
|
+
value: res.id
|
|
513
|
+
};
|
|
514
|
+
}));
|
|
515
|
+
break;
|
|
516
|
+
case 3:
|
|
517
|
+
setTriTag(res.data.map(function (res) {
|
|
518
|
+
return {
|
|
519
|
+
label: res.labelName,
|
|
520
|
+
value: res.id
|
|
521
|
+
};
|
|
522
|
+
}));
|
|
523
|
+
break;
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
});
|
|
463
527
|
};
|
|
464
528
|
// 自定义验证规则
|
|
465
|
-
var
|
|
466
|
-
|
|
467
|
-
inputText =
|
|
468
|
-
setInputText =
|
|
529
|
+
var _useState27 = useState(''),
|
|
530
|
+
_useState28 = _slicedToArray(_useState27, 2),
|
|
531
|
+
inputText = _useState28[0],
|
|
532
|
+
setInputText = _useState28[1];
|
|
469
533
|
// true 验证通过
|
|
470
534
|
var validateContainsUnderscore = function validateContainsUnderscore(value) {
|
|
471
535
|
if (!isChange) {
|
|
@@ -502,7 +566,7 @@ var CreateMeta = function CreateMeta(props) {
|
|
|
502
566
|
initialValues: {
|
|
503
567
|
eventName: '',
|
|
504
568
|
aliasName: '',
|
|
505
|
-
|
|
569
|
+
businessLabelId: (props === null || props === void 0 ? void 0 : (_props$data = props.data) === null || _props$data === void 0 ? void 0 : _props$data.businessLabelId) || undefined,
|
|
506
570
|
maidianID: []
|
|
507
571
|
}
|
|
508
572
|
}, homeType == 'create' && (/*#__PURE__*/React.createElement(Form.Item, {
|
|
@@ -526,7 +590,11 @@ var CreateMeta = function CreateMeta(props) {
|
|
|
526
590
|
}],
|
|
527
591
|
validateStatus: validateContainsUnderscore(inputText) ? '' : 'error',
|
|
528
592
|
help: validateContainsUnderscore(inputText) ? '' : inputText == '' ? '请输入事件名称' : "\u8BF7\u6839\u636E\u9875\u9762\u5C42\u7EA7\u547D\u540D\uFF0C\u5982\uFF1A".concat(props.selectTreeName)
|
|
529
|
-
}, isCopy ? (/*#__PURE__*/React.createElement("div",
|
|
593
|
+
}, isCopy ? (/*#__PURE__*/React.createElement("div", {
|
|
594
|
+
style: {
|
|
595
|
+
width: '100%'
|
|
596
|
+
}
|
|
597
|
+
}, /*#__PURE__*/React.createElement(BizEventSelector, {
|
|
530
598
|
showAllEvent: true,
|
|
531
599
|
multiple: false,
|
|
532
600
|
key: "eventProp",
|
|
@@ -548,7 +616,7 @@ var CreateMeta = function CreateMeta(props) {
|
|
|
548
616
|
name: "aliasName",
|
|
549
617
|
label: "\u4E8B\u4EF6\u522B\u540D"
|
|
550
618
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
551
|
-
disabled: homeType == '
|
|
619
|
+
disabled: homeType == 'get',
|
|
552
620
|
placeholder: "\u8BF7\u8F93\u5165\u4E8B\u4EF6\u522B\u540D",
|
|
553
621
|
showCount: true,
|
|
554
622
|
maxLength: 128,
|
|
@@ -565,45 +633,39 @@ var CreateMeta = function CreateMeta(props) {
|
|
|
565
633
|
width: '160px',
|
|
566
634
|
marginRight: '10px'
|
|
567
635
|
},
|
|
568
|
-
disabled: homeType == '
|
|
636
|
+
disabled: homeType == 'get',
|
|
569
637
|
placeholder: "\u8BF7\u8F93\u5165\u89E6\u53D1\u6807\u7B7E",
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
value: 'tagJson'
|
|
576
|
-
}],
|
|
577
|
-
onChange: function onChange() {
|
|
638
|
+
// defaultValue={triTagId}
|
|
639
|
+
value: triTagId,
|
|
640
|
+
options: triTag,
|
|
641
|
+
onChange: function onChange(value) {
|
|
642
|
+
setTriTagId(value);
|
|
578
643
|
setIsChange(true);
|
|
579
644
|
}
|
|
580
645
|
}), "\u6216", /*#__PURE__*/React.createElement(Input, {
|
|
581
|
-
disabled: homeType == '
|
|
646
|
+
disabled: homeType == 'get',
|
|
582
647
|
style: {
|
|
583
648
|
border: 0,
|
|
584
649
|
width: 'calc(100% - 195px)',
|
|
585
650
|
marginLeft: '10px'
|
|
586
651
|
},
|
|
587
652
|
placeholder: "\u8BF7\u8F93\u5165\u89E6\u53D1\u65F6\u673A\uFF0C\u4F8B\u5982\uFF1A\u7528\u6237\u70B9\u51FB\u786E\u8BA4\u6309\u94AE",
|
|
653
|
+
// defaultValue={triTagInput}
|
|
654
|
+
value: triTagInput,
|
|
588
655
|
showCount: true,
|
|
589
656
|
maxLength: 128,
|
|
590
657
|
onChange: function onChange(e) {
|
|
658
|
+
setTriTagInput(e.target.value);
|
|
591
659
|
setIsChange(true);
|
|
592
660
|
}
|
|
593
661
|
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
594
|
-
name: "
|
|
662
|
+
name: "businessLabelId",
|
|
595
663
|
label: "\u4E1A\u52A1\u6807\u7B7E"
|
|
596
664
|
}, /*#__PURE__*/React.createElement(Select, {
|
|
597
665
|
allowClear: true,
|
|
598
|
-
disabled: homeType == '
|
|
666
|
+
disabled: homeType == 'get',
|
|
599
667
|
placeholder: "\u8BF7\u8F93\u5165\u4E1A\u52A1\u6807\u7B7E",
|
|
600
|
-
options:
|
|
601
|
-
label: '业务标签1',
|
|
602
|
-
value: '111'
|
|
603
|
-
}, {
|
|
604
|
-
label: '业务标签2',
|
|
605
|
-
value: 'tagJson'
|
|
606
|
-
}],
|
|
668
|
+
options: bizTag,
|
|
607
669
|
onChange: function onChange() {
|
|
608
670
|
setIsChange(true);
|
|
609
671
|
}
|
|
@@ -168,7 +168,6 @@ var PageInfo = function PageInfo(props) {
|
|
|
168
168
|
recordShow = _useState52[0],
|
|
169
169
|
setRecordShow = _useState52[1];
|
|
170
170
|
useEffect(function () {
|
|
171
|
-
// console.log('props.pageData', props.pageData);
|
|
172
171
|
if (!props.pageData) {
|
|
173
172
|
setIsEmpty(true);
|
|
174
173
|
} else {
|
|
@@ -176,7 +175,6 @@ var PageInfo = function PageInfo(props) {
|
|
|
176
175
|
}
|
|
177
176
|
}, [props.pageData, props.refreshKey]);
|
|
178
177
|
useEffect(function () {
|
|
179
|
-
// console.log('props.pageData', props.pageData);
|
|
180
178
|
props.onChangePageStatus && props.onChangePageStatus(isEdit);
|
|
181
179
|
}, [isEdit]);
|
|
182
180
|
var getPageConfig = function getPageConfig() {
|
|
@@ -217,7 +215,10 @@ var PageInfo = function PageInfo(props) {
|
|
|
217
215
|
index: index,
|
|
218
216
|
approvalStatus: item.approvalStatus,
|
|
219
217
|
operationType: item.operationType,
|
|
220
|
-
isOnline: item.isOnline || 0
|
|
218
|
+
isOnline: item.isOnline || 0,
|
|
219
|
+
businessLabel: item.businessLabel,
|
|
220
|
+
triggerLabel: item.triggerLabel,
|
|
221
|
+
labels: item.labels
|
|
221
222
|
};
|
|
222
223
|
}) : []);
|
|
223
224
|
//计算出当前上线和下线总合数量
|
|
@@ -249,6 +250,12 @@ var PageInfo = function PageInfo(props) {
|
|
|
249
250
|
});
|
|
250
251
|
return;
|
|
251
252
|
}
|
|
253
|
+
if (!imgUrl) {
|
|
254
|
+
notification.warning({
|
|
255
|
+
message: '请选择页面图示'
|
|
256
|
+
});
|
|
257
|
+
return;
|
|
258
|
+
}
|
|
252
259
|
if (eventAttrList.filter(function (item) {
|
|
253
260
|
return !item.eventId;
|
|
254
261
|
}).length) {
|
|
@@ -518,18 +525,18 @@ var PageInfo = function PageInfo(props) {
|
|
|
518
525
|
className: "".concat(classPrefix, "-content-popoverTag-item")
|
|
519
526
|
}, /*#__PURE__*/React.createElement("span", {
|
|
520
527
|
className: "".concat(classPrefix, "-content-popoverTag-label")
|
|
521
|
-
}, "\u4E1A\u52A1\u6807\u7B7E:"), /*#__PURE__*/React.createElement(Tag, {
|
|
528
|
+
}, "\u4E1A\u52A1\u6807\u7B7E:"), record.businessLabel && /*#__PURE__*/React.createElement(Tag, {
|
|
522
529
|
color: "blue"
|
|
523
|
-
},
|
|
530
|
+
}, record.businessLabel.labelName)), /*#__PURE__*/React.createElement("div", {
|
|
524
531
|
className: "".concat(classPrefix, "-content-popoverTag-item")
|
|
525
532
|
}, /*#__PURE__*/React.createElement("span", {
|
|
526
533
|
className: "".concat(classPrefix, "-content-popoverTag-label")
|
|
527
|
-
}, "\u89E6\u53D1\u6807\u7B7E:"), /*#__PURE__*/React.createElement(Tag, {
|
|
534
|
+
}, "\u89E6\u53D1\u6807\u7B7E:"), record.triggerLabel && /*#__PURE__*/React.createElement(Tag, {
|
|
528
535
|
color: "orange"
|
|
529
|
-
},
|
|
536
|
+
}, record.triggerLabel.labelName)));
|
|
530
537
|
return /*#__PURE__*/React.createElement(Popover, {
|
|
531
538
|
content: content,
|
|
532
|
-
title:
|
|
539
|
+
title: sliceName(record) || ''
|
|
533
540
|
}, /*#__PURE__*/React.createElement("a", {
|
|
534
541
|
onClick: function onClick() {
|
|
535
542
|
if (!isSelect) {
|
|
@@ -552,7 +559,7 @@ var PageInfo = function PageInfo(props) {
|
|
|
552
559
|
setMetaDataIndex(index);
|
|
553
560
|
}
|
|
554
561
|
}
|
|
555
|
-
}, eventName ?
|
|
562
|
+
}, eventName ? sliceName(record) : '选择元事件', !eventName && /*#__PURE__*/React.createElement(IconFont, {
|
|
556
563
|
type: "zhuanfa",
|
|
557
564
|
style: {
|
|
558
565
|
marginLeft: 8
|
|
@@ -883,20 +890,16 @@ var PageInfo = function PageInfo(props) {
|
|
|
883
890
|
//设置新添加的元事件
|
|
884
891
|
var onEventSet = function onEventSet(data, type) {
|
|
885
892
|
if (type == 'create') {
|
|
886
|
-
setEventAttrList([{
|
|
887
|
-
eventName: data.eventName,
|
|
888
|
-
triggeringOccasion: data.triggeringOccasion,
|
|
889
|
-
aliasName: data.aliasName,
|
|
893
|
+
setEventAttrList([_objectSpread(_objectSpread({}, data), {}, {
|
|
890
894
|
describe: '',
|
|
891
895
|
pointSelect: undefined,
|
|
892
896
|
imgPath: '',
|
|
893
897
|
index: eventAttrList.length,
|
|
894
898
|
key: new Date() * 1,
|
|
895
|
-
eventAttrList: data.eventAttrList,
|
|
896
899
|
pageName: pageName,
|
|
897
900
|
pageId: id,
|
|
898
901
|
pageImgUrl: imgPath
|
|
899
|
-
}].concat(_toConsumableArray(eventAttrList)));
|
|
902
|
+
})].concat(_toConsumableArray(eventAttrList)));
|
|
900
903
|
setShowIndex(eventAttrList.length);
|
|
901
904
|
setTimeout(function () {
|
|
902
905
|
setShowIndex(void 0);
|
|
@@ -914,6 +917,21 @@ var PageInfo = function PageInfo(props) {
|
|
|
914
917
|
setRecordShow(true);
|
|
915
918
|
setEventData(row);
|
|
916
919
|
};
|
|
920
|
+
//拼接名称
|
|
921
|
+
var sliceName = function sliceName(record) {
|
|
922
|
+
var _record$businessLabel, _record$triggerLabel;
|
|
923
|
+
var point = props.pageData && props.pageData.labels && props.pageData.labels.filter(function (res) {
|
|
924
|
+
return res.labelType == 1;
|
|
925
|
+
}).map(function (res) {
|
|
926
|
+
return res.labelName || res.label;
|
|
927
|
+
}).join('_') || '';
|
|
928
|
+
var biz = (record === null || record === void 0 ? void 0 : record.businessLabel) && ((_record$businessLabel = record.businessLabel) === null || _record$businessLabel === void 0 ? void 0 : _record$businessLabel.labelName) || '';
|
|
929
|
+
var trig = (record === null || record === void 0 ? void 0 : record.triggerLabel) && ((_record$triggerLabel = record.triggerLabel) === null || _record$triggerLabel === void 0 ? void 0 : _record$triggerLabel.labelName) || '' || '';
|
|
930
|
+
var arr = [biz, point, trig, record.eventName].filter(function (res) {
|
|
931
|
+
return res;
|
|
932
|
+
}).join('-');
|
|
933
|
+
return arr;
|
|
934
|
+
};
|
|
917
935
|
return /*#__PURE__*/React.createElement("div", {
|
|
918
936
|
className: "".concat(classPrefix)
|
|
919
937
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -994,7 +1012,11 @@ var PageInfo = function PageInfo(props) {
|
|
|
994
1012
|
}
|
|
995
1013
|
}, /*#__PURE__*/React.createElement("div", {
|
|
996
1014
|
className: "".concat(classPrefix, "-info-title")
|
|
997
|
-
},
|
|
1015
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
1016
|
+
style: {
|
|
1017
|
+
color: '#FB5547'
|
|
1018
|
+
}
|
|
1019
|
+
}, "*"), "\u9875\u9762\u56FE\u793A"), /*#__PURE__*/React.createElement("div", {
|
|
998
1020
|
className: "".concat(classPrefix, "-info-input")
|
|
999
1021
|
}, !imgPath ? (/*#__PURE__*/React.createElement(Upload, _objectSpread({}, uploadProps), /*#__PURE__*/React.createElement("div", {
|
|
1000
1022
|
className: "".concat(classPrefix, "-info-upload")
|
|
@@ -1173,6 +1195,7 @@ var PageInfo = function PageInfo(props) {
|
|
|
1173
1195
|
isEdit: true,
|
|
1174
1196
|
onSubmit: function onSubmit(event, type) {
|
|
1175
1197
|
setCreateMetaShow(false);
|
|
1198
|
+
// console.log(event, '事件内容');
|
|
1176
1199
|
onEventSet(event, type);
|
|
1177
1200
|
},
|
|
1178
1201
|
// selectTreeName={props.selectTreeName}
|
|
@@ -154,4 +154,12 @@
|
|
|
154
154
|
cursor: pointer;
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
|
+
.ant-form-item-control-input-content {
|
|
158
|
+
display: flex;
|
|
159
|
+
align-items: center;
|
|
160
|
+
}
|
|
161
|
+
.ant-select-disabled.ant-select:not(.ant-select-customize-input) .ant-select-selector {
|
|
162
|
+
color: #021429;
|
|
163
|
+
background-color: #f2f3f4;
|
|
164
|
+
}
|
|
157
165
|
}
|