@zgfe/modules-dm 1.0.57-zhongyuan.6 → 1.0.57-zhongyuan.60
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/constants/api.d.ts +9 -1
- package/es/constants/api.js +10 -2
- package/es/modules/CutsModal.d.ts +8 -0
- package/es/modules/clearRule/addRule.d.ts +1 -0
- package/es/modules/clearRule/addRule.js +318 -180
- package/es/modules/clearRule/css/index.css +265 -256
- package/es/modules/clearRule/css/index.less +10 -1
- package/es/modules/clearRule/importMetaDialog/styles/index.less +91 -91
- package/es/modules/clearRule/index.js +175 -89
- package/es/modules/dataManage/collectionAttributeList.d.ts +1 -0
- package/es/modules/dataManage/collectionAttributeList.js +38 -20
- package/es/modules/dataManage/collectionEventList.js +6 -3
- package/es/modules/dataManage/components/createMetaDrawer.js +85 -4
- package/es/modules/dataManage/components/eventFilter/index.js +7 -5
- package/es/modules/dataManage/components/eventGroupingDrawer.js +1 -4
- package/es/modules/dataManage/components/panelList.js +1 -1
- package/es/modules/dataManage/components/tablePlus.d.ts +8 -0
- package/es/modules/dataManage/components/tablePlus.js +296 -145
- package/es/modules/dataManage/styles/index.less +1210 -1205
- package/es/modules/dataManage/types.d.ts +4 -0
- package/es/modules/dataMap/component/drawerAdd.js +3 -2
- package/es/modules/dataMap/component/leftTree.js +1 -1
- package/es/modules/dataPlan/addPlan.js +5 -4
- package/es/modules/formulateRule/addFormulate.d.ts +1 -0
- package/es/modules/formulateRule/addFormulate.js +141 -36
- package/es/modules/formulateRule/addRule.d.ts +2 -0
- package/es/modules/formulateRule/addRule.js +201 -27
- package/es/modules/formulateRule/index.js +108 -64
- package/es/utils/index.d.ts +2 -0
- package/es/utils/index.js +9 -0
- package/package.json +64 -64
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
-
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
5
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
6
|
-
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
7
|
-
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
8
4
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
9
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
10
6
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
11
7
|
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
12
8
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
13
|
-
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
14
|
-
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
15
9
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
16
10
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
11
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
12
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
13
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
14
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
15
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
16
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
17
17
|
import { BizGlobalDataContext, IconFont, ajax } from '@zgfe/business-lib';
|
|
18
18
|
import { Input, Button, Select, Table, message, Modal, Upload, Popover, Checkbox, notification } from 'antd';
|
|
19
19
|
import React, { useEffect, useState, useContext } from 'react';
|
|
@@ -29,12 +29,26 @@ import BizEditText from './components/editTxt';
|
|
|
29
29
|
import _ from 'lodash';
|
|
30
30
|
import moment from 'moment';
|
|
31
31
|
import UseModal from '../CutsModal';
|
|
32
|
+
// 内置属性白名单
|
|
33
|
+
var ownerWhiteList = [{
|
|
34
|
+
dt: 'evt',
|
|
35
|
+
pr: ['ct', 'tz', 'an', 'vn', 'cr', 'cn', 'os', 'ov', 'mnet', 'net', 'dru', 'cuid', 'sid', 'ref', 'eid', 'referrer_domain', 'utm_source', 'utm_medium', 'utm_campaign', 'utm_content', 'utm_term']
|
|
36
|
+
}, {
|
|
37
|
+
dt: 'abp',
|
|
38
|
+
pr: ['ct', 'tz', 'sid', 'vn', 'cuid', 'url', 'ref', 'referrer_domain', 'cr', 'net', 'vn', 'ov', 'os', 'an', 'cn', 'mnet', 'scroll', 'dr', 'page_url', 'page_title', 'landing_page', 'title', 'share_level', 'uid', 'share_id', 'path', 'productID', 'revenueType', 'price', 'total', 'productQuantity', 'element_id', 'element_content', 'element_type', 'element_style', 'element_selector', 'eid']
|
|
39
|
+
}];
|
|
40
|
+
//事件名称(包含:pv(⻚⾯访问)、click(⻚⾯点击)、scroll(滚动)、dr(⻚⾯停留时⻓)、wxsopen(分享打开)、wxshare(微信分享)、revenue(收⼊))
|
|
41
|
+
var eventWhiteList = ['pv', 'click', 'scroll', 'dr', 'wxsopen', 'wxshare', 'revenue'];
|
|
42
|
+
var ownerWhiteListDataList = ownerWhiteList.map(function (item) {
|
|
43
|
+
return _toConsumableArray(item.pr);
|
|
44
|
+
}).flat();
|
|
32
45
|
var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
33
46
|
var classPrefix = 'attr-list';
|
|
34
47
|
var _useContext = useContext(BizGlobalDataContext),
|
|
35
48
|
currentApp = _useContext.currentApp,
|
|
36
49
|
isDemo = _useContext.isDemo,
|
|
37
|
-
authority = _useContext.authority
|
|
50
|
+
authority = _useContext.authority,
|
|
51
|
+
showProdDownload = _useContext.showProdDownload;
|
|
38
52
|
var isOpen = props.isOpen,
|
|
39
53
|
queryPlanData = props.queryPlanData,
|
|
40
54
|
source = props.source,
|
|
@@ -70,7 +84,9 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
70
84
|
var uniqueAttrs = ['name', 'app_user_id'];
|
|
71
85
|
// 判断是否在方案中: 处理表格class添加异常样式 | 处理表格行异常信息展示, true异常
|
|
72
86
|
var rowRenderHandle = function rowRenderHandle(name) {
|
|
73
|
-
if (source == 'event' &&
|
|
87
|
+
if (source == 'event' && ownerWhiteListDataList.find(function (o) {
|
|
88
|
+
return o == eventAttrsData.attr_name;
|
|
89
|
+
})) {
|
|
74
90
|
// 内置事件属性
|
|
75
91
|
return false;
|
|
76
92
|
}
|
|
@@ -290,7 +306,7 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
290
306
|
// }
|
|
291
307
|
disabled: isDemo ||
|
|
292
308
|
// !authority[1000004] ||
|
|
293
|
-
record.
|
|
309
|
+
eventWhiteList.includes(record.attr_name) || record.category === 'fixed',
|
|
294
310
|
defaultValue: record.alias_name,
|
|
295
311
|
onFocus: aliasFocus,
|
|
296
312
|
onBlur: function onBlur(e) {
|
|
@@ -318,7 +334,9 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
318
334
|
// }
|
|
319
335
|
disabled: isDemo ||
|
|
320
336
|
// !authority[1000004] ||
|
|
321
|
-
|
|
337
|
+
//
|
|
338
|
+
// record.owner == 'zg_abp'
|
|
339
|
+
eventWhiteList.includes(record.attr_name) || record.category === 'fixed',
|
|
322
340
|
defaultValue: record.alias_name,
|
|
323
341
|
onFocus: aliasFocus,
|
|
324
342
|
onBlur: function onBlur(e) {
|
|
@@ -414,7 +432,7 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
414
432
|
width: 100
|
|
415
433
|
},
|
|
416
434
|
// disabled={isDemo || record.isIdMappingProp || record.category === 'fixed'}
|
|
417
|
-
disabled: isDemo || !authority[1000004] || record.category === 'fixed' || record.
|
|
435
|
+
disabled: isDemo || !authority[1000004] || !record.canUpdate || record.category === 'fixed' || eventWhiteList.includes(record.attr_name),
|
|
418
436
|
onChange: function onChange(e) {
|
|
419
437
|
return attrChangeHandle(e, record, 'type');
|
|
420
438
|
},
|
|
@@ -471,7 +489,7 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
471
489
|
width: 100
|
|
472
490
|
},
|
|
473
491
|
// disabled={isDemo || record.isIdMappingProp || record.category === 'fixed'}
|
|
474
|
-
disabled: isDemo || !authority[1000004] || record.category === 'fixed' || record.
|
|
492
|
+
disabled: isDemo || !authority[1000004] || record.category === 'fixed' || eventWhiteList.includes(record.attr_name),
|
|
475
493
|
onChange: function onChange(e) {
|
|
476
494
|
return attrChangeHandle(e, record, 'hidden');
|
|
477
495
|
},
|
|
@@ -533,7 +551,7 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
533
551
|
width: 100
|
|
534
552
|
},
|
|
535
553
|
// disabled={isDemo || record.isIdMappingProp}
|
|
536
|
-
disabled: isDemo || !authority[1000004] || record.category === 'fixed' || record.
|
|
554
|
+
disabled: isDemo || !authority[1000004] || record.category === 'fixed' || eventWhiteList.includes(record.attr_name),
|
|
537
555
|
onChange: function onChange(e) {
|
|
538
556
|
return attrChangeHandle(e, record, 'encryption_type');
|
|
539
557
|
},
|
|
@@ -659,14 +677,14 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
659
677
|
}
|
|
660
678
|
})
|
|
661
679
|
})),
|
|
662
|
-
dataIndex: '
|
|
680
|
+
dataIndex: 'attr_name',
|
|
663
681
|
width: 120,
|
|
664
|
-
render: function render(
|
|
682
|
+
render: function render(record) {
|
|
665
683
|
var json = {
|
|
666
684
|
zg_abp: '内置',
|
|
667
685
|
zg: '自定义'
|
|
668
686
|
};
|
|
669
|
-
return /*#__PURE__*/React.createElement("div", null,
|
|
687
|
+
return /*#__PURE__*/React.createElement("div", null, ownerWhiteListDataList.includes(record) ? '内置' : '自定义');
|
|
670
688
|
}
|
|
671
689
|
}]), [{
|
|
672
690
|
title: '操作',
|
|
@@ -678,7 +696,7 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
678
696
|
style: {
|
|
679
697
|
padding: 0
|
|
680
698
|
},
|
|
681
|
-
disabled: source === 'event' ? record.
|
|
699
|
+
disabled: source === 'event' ? eventWhiteList.includes(record.attr_name) || !authority[1000004] || !record.canUpdate : record.category == 'fixed' || isDemo || !authority[1000004],
|
|
682
700
|
onClick: function onClick() {
|
|
683
701
|
if (isDemo || !authority[1000004]) {
|
|
684
702
|
message.error('无删除权限');
|
|
@@ -912,7 +930,7 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
912
930
|
width: 64,
|
|
913
931
|
render: function render(_, record, index) {
|
|
914
932
|
return /*#__PURE__*/React.createElement("a", {
|
|
915
|
-
className: "set ".concat(record.
|
|
933
|
+
className: "set ".concat(eventWhiteList.includes(record.attr_name) ? 'set-error' : ''),
|
|
916
934
|
onClick: function onClick() {
|
|
917
935
|
return dealEventAttr(index);
|
|
918
936
|
}
|
|
@@ -1171,14 +1189,14 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
1171
1189
|
onClick: function onClick() {
|
|
1172
1190
|
return setCreateAttrShow(true);
|
|
1173
1191
|
}
|
|
1174
|
-
}, "\u521B\u5EFA\u5C5E\u6027"), /*#__PURE__*/React.createElement(Button, {
|
|
1192
|
+
}, "\u521B\u5EFA\u5C5E\u6027"), showProdDownload && (/*#__PURE__*/React.createElement(Button, {
|
|
1175
1193
|
shape: "round",
|
|
1176
1194
|
className: "button",
|
|
1177
1195
|
disabled: isDemo || !authority[1722838544],
|
|
1178
1196
|
onClick: function onClick() {
|
|
1179
1197
|
return setOpenImportModal(true);
|
|
1180
1198
|
}
|
|
1181
|
-
}, "\u5BFC\u5165\u5C5E\u6027")))), /*#__PURE__*/React.createElement(Table, {
|
|
1199
|
+
}, "\u5BFC\u5165\u5C5E\u6027"))))), /*#__PURE__*/React.createElement(Table, {
|
|
1182
1200
|
className: "".concat(classPrefix, "-table"),
|
|
1183
1201
|
columns: columns,
|
|
1184
1202
|
id: 'dataManageAttrTable',
|
|
@@ -37,7 +37,8 @@ var CollectionEventList = function CollectionEventList(props) {
|
|
|
37
37
|
currentApp = _useContext.currentApp,
|
|
38
38
|
authority = _useContext.authority,
|
|
39
39
|
route = _useContext.route,
|
|
40
|
-
isDemo = _useContext.isDemo
|
|
40
|
+
isDemo = _useContext.isDemo,
|
|
41
|
+
showProdDownload = _useContext.showProdDownload;
|
|
41
42
|
var _useContext2 = useContext(DmContext),
|
|
42
43
|
state = _useContext2.state;
|
|
43
44
|
var _useState = useState(0),
|
|
@@ -474,7 +475,7 @@ var CollectionEventList = function CollectionEventList(props) {
|
|
|
474
475
|
}), /*#__PURE__*/React.createElement("span", null, "\u4E8B\u4EF6\u5206\u7EC4\u7BA1\u7406")))
|
|
475
476
|
}, {
|
|
476
477
|
key: '3',
|
|
477
|
-
disabled: isDemo || !authority[1722837260],
|
|
478
|
+
disabled: isDemo || !authority[1722837260] || !showProdDownload,
|
|
478
479
|
label: (/*#__PURE__*/React.createElement("a", {
|
|
479
480
|
className: "".concat(classPrefix, "-downItems"),
|
|
480
481
|
onClick: function onClick() {
|
|
@@ -487,7 +488,7 @@ var CollectionEventList = function CollectionEventList(props) {
|
|
|
487
488
|
}), " ", /*#__PURE__*/React.createElement("span", null, "\u5BFC\u5165\u4E8B\u4EF6")))
|
|
488
489
|
}, {
|
|
489
490
|
key: '4',
|
|
490
|
-
disabled: isDemo || !authority[1722837261],
|
|
491
|
+
disabled: isDemo || !authority[1722837261] || !showProdDownload,
|
|
491
492
|
label: (/*#__PURE__*/React.createElement("a", {
|
|
492
493
|
className: "".concat(classPrefix, "-downItems"),
|
|
493
494
|
onClick: exportEvent
|
|
@@ -510,6 +511,7 @@ var CollectionEventList = function CollectionEventList(props) {
|
|
|
510
511
|
}), ' ', /*#__PURE__*/React.createElement("span", null, "\u5F00\u53D1\u7BA1\u7406")))
|
|
511
512
|
}, {
|
|
512
513
|
key: '6',
|
|
514
|
+
disabled: !showProdDownload,
|
|
513
515
|
label: (/*#__PURE__*/React.createElement("a", {
|
|
514
516
|
className: "".concat(classPrefix, "-downItems"),
|
|
515
517
|
onClick: function onClick() {
|
|
@@ -522,6 +524,7 @@ var CollectionEventList = function CollectionEventList(props) {
|
|
|
522
524
|
}), ' ', /*#__PURE__*/React.createElement("span", null, "\u751F\u6210\u6D4B\u8BD5\u62A5\u544A")))
|
|
523
525
|
}, {
|
|
524
526
|
key: '7',
|
|
527
|
+
disabled: !showProdDownload,
|
|
525
528
|
label: (/*#__PURE__*/React.createElement("a", {
|
|
526
529
|
className: "".concat(classPrefix, "-downItems"),
|
|
527
530
|
onClick: function onClick() {
|
|
@@ -58,7 +58,10 @@ var CreateMeta = function CreateMeta(props) {
|
|
|
58
58
|
if (props.isShow) {
|
|
59
59
|
form.resetFields(); // 重置表单数据
|
|
60
60
|
setEventAttrList([]);
|
|
61
|
+
setTriTagId(undefined);
|
|
61
62
|
setIsChange(false);
|
|
63
|
+
getTagList(2);
|
|
64
|
+
getTagList(3);
|
|
62
65
|
}
|
|
63
66
|
}, [props.isShow]);
|
|
64
67
|
var submit = /*#__PURE__*/function () {
|
|
@@ -98,10 +101,13 @@ var CreateMeta = function CreateMeta(props) {
|
|
|
98
101
|
eventName: values.eventName,
|
|
99
102
|
aliasName: values.aliasName,
|
|
100
103
|
demandId: values.demandId,
|
|
101
|
-
triggeringOccasion: values.triggeringOccasion,
|
|
104
|
+
// triggeringOccasion: values.triggeringOccasion,
|
|
102
105
|
eventAttrList: eventAttrList,
|
|
103
106
|
platformStr: values === null || values === void 0 ? void 0 : values.maidianID.join(),
|
|
104
|
-
remark: values === null || values === void 0 ? void 0 : values.remark
|
|
107
|
+
remark: values === null || values === void 0 ? void 0 : values.remark,
|
|
108
|
+
businessLabelId: values.businessLabelId,
|
|
109
|
+
triggerLabelId: triTagId,
|
|
110
|
+
triggeringOccasion: triTagInput
|
|
105
111
|
}
|
|
106
112
|
}).then(function (res) {
|
|
107
113
|
if ((res === null || res === void 0 ? void 0 : res.code) === '100000') {
|
|
@@ -416,6 +422,53 @@ var CreateMeta = function CreateMeta(props) {
|
|
|
416
422
|
}]),
|
|
417
423
|
_useState20 = _slicedToArray(_useState19, 1),
|
|
418
424
|
maidianList = _useState20[0];
|
|
425
|
+
var _useState21 = useState([]),
|
|
426
|
+
_useState22 = _slicedToArray(_useState21, 2),
|
|
427
|
+
bizTag = _useState22[0],
|
|
428
|
+
setBizTag = _useState22[1];
|
|
429
|
+
var _useState23 = useState([]),
|
|
430
|
+
_useState24 = _slicedToArray(_useState23, 2),
|
|
431
|
+
triTag = _useState24[0],
|
|
432
|
+
setTriTag = _useState24[1];
|
|
433
|
+
var _useState25 = useState(),
|
|
434
|
+
_useState26 = _slicedToArray(_useState25, 2),
|
|
435
|
+
triTagId = _useState26[0],
|
|
436
|
+
setTriTagId = _useState26[1];
|
|
437
|
+
var _useState27 = useState(),
|
|
438
|
+
_useState28 = _slicedToArray(_useState27, 2),
|
|
439
|
+
triTagInput = _useState28[0],
|
|
440
|
+
setTriTagInput = _useState28[1];
|
|
441
|
+
//标签列表数据 2:业务标签 3:触发标签
|
|
442
|
+
var getTagList = function getTagList(type) {
|
|
443
|
+
request(apis.dict.eventTag, {
|
|
444
|
+
method: 'post',
|
|
445
|
+
data: {
|
|
446
|
+
appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.id,
|
|
447
|
+
labelType: type
|
|
448
|
+
}
|
|
449
|
+
}).then(function (res) {
|
|
450
|
+
if ((res === null || res === void 0 ? void 0 : res.code) == '100000') {
|
|
451
|
+
switch (type) {
|
|
452
|
+
case 2:
|
|
453
|
+
setBizTag(res.data.map(function (res) {
|
|
454
|
+
return {
|
|
455
|
+
label: res.labelName,
|
|
456
|
+
value: res.id
|
|
457
|
+
};
|
|
458
|
+
}));
|
|
459
|
+
break;
|
|
460
|
+
case 3:
|
|
461
|
+
setTriTag(res.data.map(function (res) {
|
|
462
|
+
return {
|
|
463
|
+
label: res.labelName,
|
|
464
|
+
value: res.id
|
|
465
|
+
};
|
|
466
|
+
}));
|
|
467
|
+
break;
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
});
|
|
471
|
+
};
|
|
419
472
|
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(Drawer, {
|
|
420
473
|
className: classPrefix,
|
|
421
474
|
width: 1000,
|
|
@@ -485,14 +538,42 @@ var CreateMeta = function CreateMeta(props) {
|
|
|
485
538
|
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
486
539
|
name: "triggeringOccasion",
|
|
487
540
|
label: "\u89E6\u53D1\u65F6\u673A"
|
|
488
|
-
}, /*#__PURE__*/React.createElement(
|
|
541
|
+
}, /*#__PURE__*/React.createElement(Select, {
|
|
542
|
+
allowClear: true,
|
|
489
543
|
style: {
|
|
490
|
-
border: 0
|
|
544
|
+
border: 0,
|
|
545
|
+
width: '160px',
|
|
546
|
+
marginRight: '10px'
|
|
547
|
+
},
|
|
548
|
+
placeholder: "\u8BF7\u8F93\u5165\u89E6\u53D1\u6807\u7B7E",
|
|
549
|
+
defaultValue: triTagId,
|
|
550
|
+
options: triTag,
|
|
551
|
+
onChange: function onChange(value) {
|
|
552
|
+
setTriTagId(value);
|
|
553
|
+
setIsChange(true);
|
|
554
|
+
}
|
|
555
|
+
}), "\u6216", /*#__PURE__*/React.createElement(Input, {
|
|
556
|
+
style: {
|
|
557
|
+
border: 0,
|
|
558
|
+
width: 'calc(100% - 195px)',
|
|
559
|
+
marginLeft: '10px'
|
|
491
560
|
},
|
|
492
561
|
placeholder: "\u8BF7\u8F93\u5165\u89E6\u53D1\u65F6\u673A\uFF0C\u4F8B\u5982\uFF1A\u7528\u6237\u70B9\u51FB\u786E\u8BA4\u6309\u94AE",
|
|
562
|
+
defaultValue: triTagInput,
|
|
493
563
|
showCount: true,
|
|
494
564
|
maxLength: 128,
|
|
495
565
|
onChange: function onChange(e) {
|
|
566
|
+
setTriTagInput(e.target.value);
|
|
567
|
+
setIsChange(true);
|
|
568
|
+
}
|
|
569
|
+
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
570
|
+
name: "businessLabelId",
|
|
571
|
+
label: "\u4E1A\u52A1\u6807\u7B7E"
|
|
572
|
+
}, /*#__PURE__*/React.createElement(Select, {
|
|
573
|
+
allowClear: true,
|
|
574
|
+
placeholder: "\u8BF7\u8F93\u5165\u4E1A\u52A1\u6807\u7B7E",
|
|
575
|
+
options: bizTag,
|
|
576
|
+
onChange: function onChange() {
|
|
496
577
|
setIsChange(true);
|
|
497
578
|
}
|
|
498
579
|
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
@@ -11,8 +11,8 @@ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length)
|
|
|
11
11
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
12
12
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
13
13
|
import { Tooltip, message } from 'antd';
|
|
14
|
-
import React, { useEffect, useRef, useState } from 'react';
|
|
15
|
-
import { BizEventSelector, BizAttrConditionGroup, IconFont } from '@zgfe/business-lib';
|
|
14
|
+
import React, { useEffect, useRef, useState, useContext } from 'react';
|
|
15
|
+
import { BizEventSelector, BizAttrConditionGroup, IconFont, BizGlobalDataContext } from '@zgfe/business-lib';
|
|
16
16
|
import './styles/index.less';
|
|
17
17
|
var classPrefix = 'virtual-event-eventfilter-box';
|
|
18
18
|
var EventFilter = function EventFilter(props) {
|
|
@@ -20,6 +20,8 @@ var EventFilter = function EventFilter(props) {
|
|
|
20
20
|
index = props.index,
|
|
21
21
|
virtualDrawerType = props.virtualDrawerType,
|
|
22
22
|
selectList = props.selectList;
|
|
23
|
+
var _useContext = useContext(BizGlobalDataContext),
|
|
24
|
+
envs = _useContext.envs;
|
|
23
25
|
// 筛选条件个数
|
|
24
26
|
var _useState = useState(props.value && props.value.filters && props.value.filters.conditions ? props.value.filters.conditions.length : 0),
|
|
25
27
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -56,8 +58,8 @@ var EventFilter = function EventFilter(props) {
|
|
|
56
58
|
// 添加筛选
|
|
57
59
|
var onAdd = function onAdd() {
|
|
58
60
|
// 最多可添加5条属性筛选
|
|
59
|
-
if (count >= 5) {
|
|
60
|
-
message.error(
|
|
61
|
+
if (count >= ((envs === null || envs === void 0 ? void 0 : envs.propertyNum) || 5)) {
|
|
62
|
+
message.error("\u6700\u591A\u53EF\u6DFB\u52A0".concat((envs === null || envs === void 0 ? void 0 : envs.propertyNum) || 5, "\u6761\u5C5E\u6027\u7B5B\u9009"));
|
|
61
63
|
return;
|
|
62
64
|
}
|
|
63
65
|
if (selectList.length <= 0) {
|
|
@@ -122,7 +124,7 @@ var EventFilter = function EventFilter(props) {
|
|
|
122
124
|
placement: "top",
|
|
123
125
|
title: '添加属性筛选'
|
|
124
126
|
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
125
|
-
className: "".concat(count < 5 && selectList.length > 0 ? '' : 'disable'),
|
|
127
|
+
className: "".concat(count < ((envs === null || envs === void 0 ? void 0 : envs.propertyNum) || 5) && selectList.length > 0 ? '' : 'disable'),
|
|
126
128
|
type: "shaixuan",
|
|
127
129
|
onClick: function onClick() {
|
|
128
130
|
return onAdd();
|
|
@@ -139,7 +139,6 @@ var EventGroupingDrawer = function EventGroupingDrawer(props) {
|
|
|
139
139
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
140
140
|
eventMoveShow = _useState8[0],
|
|
141
141
|
setEventMoveShow = _useState8[1];
|
|
142
|
-
var eventMoveChangeId = -1;
|
|
143
142
|
var _useState9 = useState([]),
|
|
144
143
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
145
144
|
eventMoveOption = _useState10[0],
|
|
@@ -160,7 +159,6 @@ var EventGroupingDrawer = function EventGroupingDrawer(props) {
|
|
|
160
159
|
if (data.length > 0) {
|
|
161
160
|
setEventMoveShow(groupId);
|
|
162
161
|
dmEventGroupId = groupId;
|
|
163
|
-
eventMoveChangeId = data.groupingOption[0].value;
|
|
164
162
|
dmEventMoveChangeId = data.groupingOption[0].value;
|
|
165
163
|
} else {
|
|
166
164
|
setEventMoveShow(undefined);
|
|
@@ -197,7 +195,6 @@ var EventGroupingDrawer = function EventGroupingDrawer(props) {
|
|
|
197
195
|
});
|
|
198
196
|
};
|
|
199
197
|
var moveContent = function moveContent() {
|
|
200
|
-
eventMoveChangeId = eventMoveOption[0].value || -1;
|
|
201
198
|
return /*#__PURE__*/React.createElement("div", {
|
|
202
199
|
className: "move-content"
|
|
203
200
|
}, /*#__PURE__*/React.createElement("div", null, "\u5C06", eventMoveLength, "\u4E2A\u6307\u6807\u79FB\u52A8\u5230\u4EE5\u4E0B\u5206\u7EC4"), /*#__PURE__*/React.createElement("div", null, "\u9009\u62E9\u5206\u7EC4", ' ', /*#__PURE__*/React.createElement(Select, {
|
|
@@ -206,7 +203,7 @@ var EventGroupingDrawer = function EventGroupingDrawer(props) {
|
|
|
206
203
|
width: 120
|
|
207
204
|
},
|
|
208
205
|
onChange: function onChange(id) {
|
|
209
|
-
|
|
206
|
+
dmEventMoveChangeId = id;
|
|
210
207
|
},
|
|
211
208
|
options: eventMoveOption
|
|
212
209
|
})), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Button, {
|
|
@@ -18,6 +18,14 @@ interface DataType {
|
|
|
18
18
|
owner: string;
|
|
19
19
|
triggeringOccasion: string;
|
|
20
20
|
canDel: boolean;
|
|
21
|
+
businessLabelId: number;
|
|
22
|
+
triggerLabelId: number;
|
|
23
|
+
triggerLabel: labelData;
|
|
24
|
+
businessLabel: labelData;
|
|
25
|
+
}
|
|
26
|
+
interface labelData {
|
|
27
|
+
labelName: string;
|
|
28
|
+
id: number;
|
|
21
29
|
}
|
|
22
30
|
interface queryPlanType {
|
|
23
31
|
unexpectedPropList: string[];
|