@zgfe/modules-dm 1.0.57-zhongyuan.19 → 1.0.57-zhongyuan.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.
|
@@ -59,6 +59,8 @@ var CreateMeta = function CreateMeta(props) {
|
|
|
59
59
|
form.resetFields(); // 重置表单数据
|
|
60
60
|
setEventAttrList([]);
|
|
61
61
|
setIsChange(false);
|
|
62
|
+
getTagList(2);
|
|
63
|
+
getTagList(3);
|
|
62
64
|
}
|
|
63
65
|
}, [props.isShow]);
|
|
64
66
|
var submit = /*#__PURE__*/function () {
|
|
@@ -98,10 +100,13 @@ var CreateMeta = function CreateMeta(props) {
|
|
|
98
100
|
eventName: values.eventName,
|
|
99
101
|
aliasName: values.aliasName,
|
|
100
102
|
demandId: values.demandId,
|
|
101
|
-
triggeringOccasion: values.triggeringOccasion,
|
|
103
|
+
// triggeringOccasion: values.triggeringOccasion,
|
|
102
104
|
eventAttrList: eventAttrList,
|
|
103
105
|
platformStr: values === null || values === void 0 ? void 0 : values.maidianID.join(),
|
|
104
|
-
remark: values === null || values === void 0 ? void 0 : values.remark
|
|
106
|
+
remark: values === null || values === void 0 ? void 0 : values.remark,
|
|
107
|
+
businessLabelId: values.businessLabelId,
|
|
108
|
+
triggerLabelId: triTagId,
|
|
109
|
+
triggeringOccasion: triTagInput
|
|
105
110
|
}
|
|
106
111
|
}).then(function (res) {
|
|
107
112
|
if ((res === null || res === void 0 ? void 0 : res.code) === '100000') {
|
|
@@ -376,8 +381,6 @@ var CreateMeta = function CreateMeta(props) {
|
|
|
376
381
|
useEffect(function () {
|
|
377
382
|
var _Y = getTableScroll(376, 'dataManageCreateMetaTable');
|
|
378
383
|
setScrollY(_Y);
|
|
379
|
-
getTagList(2);
|
|
380
|
-
getTagList(3);
|
|
381
384
|
}, []);
|
|
382
385
|
var onClose = function onClose() {
|
|
383
386
|
if (isChange) {
|
|
@@ -426,18 +429,29 @@ var CreateMeta = function CreateMeta(props) {
|
|
|
426
429
|
_useState24 = _slicedToArray(_useState23, 2),
|
|
427
430
|
triTag = _useState24[0],
|
|
428
431
|
setTriTag = _useState24[1];
|
|
432
|
+
var _useState25 = useState(),
|
|
433
|
+
_useState26 = _slicedToArray(_useState25, 2),
|
|
434
|
+
triTagId = _useState26[0],
|
|
435
|
+
setTriTagId = _useState26[1];
|
|
436
|
+
var _useState27 = useState(),
|
|
437
|
+
_useState28 = _slicedToArray(_useState27, 2),
|
|
438
|
+
triTagInput = _useState28[0],
|
|
439
|
+
setTriTagInput = _useState28[1];
|
|
429
440
|
//标签列表数据 2:业务标签 3:触发标签
|
|
430
441
|
var getTagList = function getTagList(type) {
|
|
431
442
|
request(apis.dict.eventTag, {
|
|
432
|
-
|
|
433
|
-
|
|
443
|
+
method: 'post',
|
|
444
|
+
data: {
|
|
445
|
+
appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.id,
|
|
446
|
+
labelType: type
|
|
447
|
+
}
|
|
434
448
|
}).then(function (res) {
|
|
435
|
-
if (res.code == '100000') {
|
|
449
|
+
if ((res === null || res === void 0 ? void 0 : res.code) == '100000') {
|
|
436
450
|
switch (type) {
|
|
437
451
|
case 2:
|
|
438
452
|
setBizTag(res.data.map(function (res) {
|
|
439
453
|
return {
|
|
440
|
-
label: res.
|
|
454
|
+
label: res.labelName,
|
|
441
455
|
value: res.id
|
|
442
456
|
};
|
|
443
457
|
}));
|
|
@@ -445,7 +459,7 @@ var CreateMeta = function CreateMeta(props) {
|
|
|
445
459
|
case 3:
|
|
446
460
|
setTriTag(res.data.map(function (res) {
|
|
447
461
|
return {
|
|
448
|
-
label: res.
|
|
462
|
+
label: res.labelName,
|
|
449
463
|
value: res.id
|
|
450
464
|
};
|
|
451
465
|
}));
|
|
@@ -531,8 +545,10 @@ var CreateMeta = function CreateMeta(props) {
|
|
|
531
545
|
marginRight: '10px'
|
|
532
546
|
},
|
|
533
547
|
placeholder: "\u8BF7\u8F93\u5165\u89E6\u53D1\u6807\u7B7E",
|
|
548
|
+
defaultValue: triTagId,
|
|
534
549
|
options: triTag,
|
|
535
|
-
onChange: function onChange() {
|
|
550
|
+
onChange: function onChange(value) {
|
|
551
|
+
setTriTagId(value);
|
|
536
552
|
setIsChange(true);
|
|
537
553
|
}
|
|
538
554
|
}), "\u6216", /*#__PURE__*/React.createElement(Input, {
|
|
@@ -542,13 +558,15 @@ var CreateMeta = function CreateMeta(props) {
|
|
|
542
558
|
marginLeft: '10px'
|
|
543
559
|
},
|
|
544
560
|
placeholder: "\u8BF7\u8F93\u5165\u89E6\u53D1\u65F6\u673A\uFF0C\u4F8B\u5982\uFF1A\u7528\u6237\u70B9\u51FB\u786E\u8BA4\u6309\u94AE",
|
|
561
|
+
defaultValue: triTagInput,
|
|
545
562
|
showCount: true,
|
|
546
563
|
maxLength: 128,
|
|
547
564
|
onChange: function onChange(e) {
|
|
565
|
+
setTriTagInput(e.target.value);
|
|
548
566
|
setIsChange(true);
|
|
549
567
|
}
|
|
550
568
|
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
551
|
-
name: "
|
|
569
|
+
name: "businessLabelId",
|
|
552
570
|
label: "\u4E1A\u52A1\u6807\u7B7E"
|
|
553
571
|
}, /*#__PURE__*/React.createElement(Select, {
|
|
554
572
|
allowClear: true,
|
|
@@ -18,7 +18,14 @@ interface DataType {
|
|
|
18
18
|
owner: string;
|
|
19
19
|
triggeringOccasion: string;
|
|
20
20
|
canDel: boolean;
|
|
21
|
-
|
|
21
|
+
businessLabelId: string;
|
|
22
|
+
triggerLabelId: string;
|
|
23
|
+
triggerLabel: labelData;
|
|
24
|
+
businessLabel: labelData;
|
|
25
|
+
}
|
|
26
|
+
interface labelData {
|
|
27
|
+
labelName: string;
|
|
28
|
+
id: number;
|
|
22
29
|
}
|
|
23
30
|
interface queryPlanType {
|
|
24
31
|
unexpectedPropList: string[];
|
|
@@ -77,7 +77,7 @@ var TablePlus = function TablePlus(props) {
|
|
|
77
77
|
eventId: aliasNameId
|
|
78
78
|
}
|
|
79
79
|
}).then(function (res) {
|
|
80
|
-
if (res.data === 0) {
|
|
80
|
+
if ((res === null || res === void 0 ? void 0 : res.data) === 0) {
|
|
81
81
|
message.error(res.msg);
|
|
82
82
|
} else {
|
|
83
83
|
message.success('修改成功');
|
|
@@ -115,7 +115,7 @@ var TablePlus = function TablePlus(props) {
|
|
|
115
115
|
eventId: triggeringId
|
|
116
116
|
}
|
|
117
117
|
}).then(function (res) {
|
|
118
|
-
if (res.data === 0) {
|
|
118
|
+
if ((res === null || res === void 0 ? void 0 : res.data) === 0) {
|
|
119
119
|
message.error(res.msg);
|
|
120
120
|
} else {
|
|
121
121
|
message.success('修改成功');
|
|
@@ -554,7 +554,7 @@ var TablePlus = function TablePlus(props) {
|
|
|
554
554
|
platform: currentMaidian.join()
|
|
555
555
|
}
|
|
556
556
|
}).then(function (res) {
|
|
557
|
-
if (res.code == '100000') {
|
|
557
|
+
if ((res === null || res === void 0 ? void 0 : res.code) == '100000') {
|
|
558
558
|
notification.success({
|
|
559
559
|
message: '更新成功'
|
|
560
560
|
});
|
|
@@ -584,7 +584,7 @@ var TablePlus = function TablePlus(props) {
|
|
|
584
584
|
remark: currentRemark
|
|
585
585
|
}
|
|
586
586
|
}).then(function (res) {
|
|
587
|
-
if (res.code == '100000') {
|
|
587
|
+
if ((res === null || res === void 0 ? void 0 : res.code) == '100000') {
|
|
588
588
|
notification.success({
|
|
589
589
|
message: '更新成功'
|
|
590
590
|
});
|
|
@@ -622,13 +622,12 @@ var TablePlus = function TablePlus(props) {
|
|
|
622
622
|
_useState52 = _slicedToArray(_useState51, 2),
|
|
623
623
|
triTagId = _useState52[0],
|
|
624
624
|
setTriTagId = _useState52[1];
|
|
625
|
-
// const [triTagShow,setTriTagShow] = useState(false)
|
|
626
625
|
var getTagList = function getTagList(type) {
|
|
627
626
|
request(apis.dict.eventTag, {
|
|
628
|
-
appId: currentApp
|
|
629
|
-
|
|
627
|
+
appId: getAppID(currentApp),
|
|
628
|
+
labelType: type
|
|
630
629
|
}).then(function (res) {
|
|
631
|
-
if (res.code == '100000') {
|
|
630
|
+
if ((res === null || res === void 0 ? void 0 : res.code) == '100000') {
|
|
632
631
|
switch (type) {
|
|
633
632
|
case 2:
|
|
634
633
|
setBizTag(res.data.map(function (res) {
|
|
@@ -650,23 +649,30 @@ var TablePlus = function TablePlus(props) {
|
|
|
650
649
|
}
|
|
651
650
|
});
|
|
652
651
|
};
|
|
653
|
-
var
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
652
|
+
var updateEvent = function updateEvent(params) {
|
|
653
|
+
var fn = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {};
|
|
654
|
+
if (params.triggeringOccasion && params.triggeringOccasion.length > 128) {
|
|
655
|
+
message.error('名称不可超过128字符');
|
|
656
|
+
return;
|
|
657
|
+
}
|
|
658
|
+
request(apis.updateEventInfo, {
|
|
659
|
+
method: 'post',
|
|
660
|
+
data: _objectSpread({
|
|
661
|
+
appId: getAppID(currentApp),
|
|
662
|
+
eventId: eventId
|
|
663
|
+
}, params)
|
|
659
664
|
}).then(function (res) {
|
|
660
|
-
if (res.
|
|
661
|
-
message.
|
|
662
|
-
|
|
665
|
+
if ((res === null || res === void 0 ? void 0 : res.data) === 0) {
|
|
666
|
+
message.error(res.msg);
|
|
667
|
+
} else {
|
|
668
|
+
message.success('修改成功');
|
|
669
|
+
props.Refresh();
|
|
670
|
+
state.updateEventMetas && state.updateEventMetas(); // 更新store
|
|
663
671
|
}
|
|
672
|
+
}).finally(function () {
|
|
673
|
+
fn();
|
|
664
674
|
});
|
|
665
675
|
};
|
|
666
|
-
// useEffect(() => {
|
|
667
|
-
// getTagList(2)
|
|
668
|
-
// getTagList(3)
|
|
669
|
-
// },[])
|
|
670
676
|
var columns = [{
|
|
671
677
|
title: (/*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(IconFont, {
|
|
672
678
|
style: {
|
|
@@ -788,19 +794,19 @@ var TablePlus = function TablePlus(props) {
|
|
|
788
794
|
}
|
|
789
795
|
}, {
|
|
790
796
|
title: '业务标签',
|
|
791
|
-
dataIndex: '
|
|
797
|
+
dataIndex: 'businessLabelId',
|
|
792
798
|
key: 'alias_name',
|
|
793
799
|
width: 167,
|
|
794
800
|
render: function render(_, record) {
|
|
795
801
|
return /*#__PURE__*/React.createElement("div", {
|
|
796
802
|
className: "alias_name"
|
|
797
|
-
}, ' ', /*#__PURE__*/React.createElement(Tag, {
|
|
803
|
+
}, ' ', record.businessLabel ? /*#__PURE__*/React.createElement(Tag, {
|
|
798
804
|
color: "blue"
|
|
799
|
-
},
|
|
805
|
+
}, record.businessLabel.labelName) : '', /*#__PURE__*/React.createElement(IconFont, {
|
|
800
806
|
className: "edit-alias-name",
|
|
801
807
|
onClick: function onClick() {
|
|
802
808
|
getTagList(2);
|
|
803
|
-
setBizTagId(
|
|
809
|
+
setBizTagId(record.businessLabelId);
|
|
804
810
|
setBizTagShow(true);
|
|
805
811
|
setEventId(record.event_id);
|
|
806
812
|
},
|
|
@@ -821,24 +827,24 @@ var TablePlus = function TablePlus(props) {
|
|
|
821
827
|
width: '200px',
|
|
822
828
|
wordBreak: 'break-all'
|
|
823
829
|
}
|
|
824
|
-
}, (record === null || record === void 0 ? void 0 : record.
|
|
830
|
+
}, (record === null || record === void 0 ? void 0 : record.triggerLabel) ? (/*#__PURE__*/React.createElement(Tag, {
|
|
825
831
|
color: "orange"
|
|
826
|
-
}, record.
|
|
832
|
+
}, record.triggerLabel.labelName)) : record.triggeringOccasion),
|
|
827
833
|
trigger: "hover",
|
|
828
834
|
placement: "top"
|
|
829
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
835
|
+
}, record.triggerLabel ? record.triggerLabel.labelName : (/*#__PURE__*/React.createElement("div", {
|
|
830
836
|
className: "alias_name_text"
|
|
831
|
-
}, record.triggeringOccasion)),
|
|
837
|
+
}, record.triggeringOccasion))), /*#__PURE__*/React.createElement(IconFont, {
|
|
832
838
|
className: "edit-alias-name",
|
|
833
839
|
onClick: function onClick() {
|
|
834
840
|
getTagList(3);
|
|
835
|
-
setTriTagId(
|
|
841
|
+
setTriTagId(record.triggerLabelId);
|
|
836
842
|
setTriggeringInput(record.triggeringOccasion);
|
|
837
843
|
setTriggeringId(record.event_id);
|
|
838
844
|
setTriggeringShow(true);
|
|
839
845
|
},
|
|
840
846
|
type: "zhongmingming"
|
|
841
|
-
}))
|
|
847
|
+
}));
|
|
842
848
|
}
|
|
843
849
|
},
|
|
844
850
|
// {
|
|
@@ -1171,7 +1177,7 @@ var TablePlus = function TablePlus(props) {
|
|
|
1171
1177
|
reason: offlineText
|
|
1172
1178
|
}
|
|
1173
1179
|
}).then(function (res) {
|
|
1174
|
-
if (res.code == '100000') {
|
|
1180
|
+
if ((res === null || res === void 0 ? void 0 : res.code) == '100000') {
|
|
1175
1181
|
notification.success({
|
|
1176
1182
|
message: '下线成功'
|
|
1177
1183
|
});
|
|
@@ -1303,7 +1309,13 @@ var TablePlus = function TablePlus(props) {
|
|
|
1303
1309
|
centered: true,
|
|
1304
1310
|
okText: "\u786E\u5B9A",
|
|
1305
1311
|
open: bizTagShow,
|
|
1306
|
-
onOk:
|
|
1312
|
+
onOk: function onOk() {
|
|
1313
|
+
updateEvent({
|
|
1314
|
+
businessLabelId: bizTagId
|
|
1315
|
+
}, function () {
|
|
1316
|
+
setBizTagShow(false);
|
|
1317
|
+
});
|
|
1318
|
+
},
|
|
1307
1319
|
onCancel: function onCancel() {
|
|
1308
1320
|
setBizTagShow(false);
|
|
1309
1321
|
},
|
|
@@ -1387,7 +1399,14 @@ var TablePlus = function TablePlus(props) {
|
|
|
1387
1399
|
centered: true,
|
|
1388
1400
|
okText: "\u786E\u5B9A",
|
|
1389
1401
|
open: triggeringShow,
|
|
1390
|
-
onOk:
|
|
1402
|
+
onOk: function onOk() {
|
|
1403
|
+
updateEvent({
|
|
1404
|
+
triggeringOccasion: triggeringInput,
|
|
1405
|
+
triggerLabelId: triTagId
|
|
1406
|
+
}, function () {
|
|
1407
|
+
setTriggeringShow(false);
|
|
1408
|
+
});
|
|
1409
|
+
},
|
|
1391
1410
|
onCancel: function onCancel() {
|
|
1392
1411
|
setTriggeringInput('');
|
|
1393
1412
|
setTriggeringId(-1);
|
|
@@ -391,7 +391,7 @@ var FormulateRule = function FormulateRule() {
|
|
|
391
391
|
}, /*#__PURE__*/React.createElement(Switch, {
|
|
392
392
|
checked: allOpenRule,
|
|
393
393
|
onChange: handleAllOpenStatus
|
|
394
|
-
}))), /*#__PURE__*/React.createElement(Button, {
|
|
394
|
+
}))), authority[170928557426] && (/*#__PURE__*/React.createElement(Button, {
|
|
395
395
|
icon: /*#__PURE__*/React.createElement(DiffOutlined, {
|
|
396
396
|
onPointerEnterCapture: undefined,
|
|
397
397
|
onPointerLeaveCapture: undefined
|
|
@@ -399,7 +399,7 @@ var FormulateRule = function FormulateRule() {
|
|
|
399
399
|
onClick: function onClick() {
|
|
400
400
|
return setIsModalOpen(true);
|
|
401
401
|
}
|
|
402
|
-
}, "\u751F\u6210\u62A5\u544A"), /*#__PURE__*/React.createElement(Button, {
|
|
402
|
+
}, "\u751F\u6210\u62A5\u544A")), /*#__PURE__*/React.createElement(Button, {
|
|
403
403
|
icon: /*#__PURE__*/React.createElement(PlusOutlined, {
|
|
404
404
|
onPointerEnterCapture: undefined,
|
|
405
405
|
onPointerLeaveCapture: undefined
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgfe/modules-dm",
|
|
3
|
-
"version": "1.0.57-zhongyuan.
|
|
3
|
+
"version": "1.0.57-zhongyuan.20",
|
|
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": "
|
|
60
|
+
"gitHead": "0179498816e7c9f7930ef7d39470aba187beae4b",
|
|
61
61
|
"gitHooks": {
|
|
62
62
|
"pre-commit": "lint-staged"
|
|
63
63
|
}
|