@zgfe/modules-dm 1.0.57-zhongyuan.7 → 1.0.57-zhongyuan.71
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 +11 -2
- package/es/modules/CutsModal.d.ts +8 -0
- package/es/modules/clearRule/addRule.d.ts +1 -0
- package/es/modules/clearRule/addRule.js +313 -171
- 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 +172 -89
- package/es/modules/dataManage/collectionAttributeList.d.ts +2 -0
- package/es/modules/dataManage/collectionAttributeList.js +51 -26
- package/es/modules/dataManage/collectionEventList.js +62 -19
- package/es/modules/dataManage/components/createMetaDrawer.js +88 -7
- package/es/modules/dataManage/components/developModal/index.js +5 -5
- 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 +303 -150
- package/es/modules/dataManage/detailedData/useColumns.js +1 -1
- 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 +7 -5
- package/es/modules/dataMap/component/rightDetail.js +94 -57
- 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 +3 -3
|
@@ -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
|
}
|
|
@@ -120,10 +136,19 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
120
136
|
if (source == 'user') {
|
|
121
137
|
queryUserPropMeta();
|
|
122
138
|
} else {
|
|
139
|
+
var ownerEventName = (eventAttrsData === null || eventAttrsData === void 0 ? void 0 : eventAttrsData.event_name) || '';
|
|
123
140
|
var _temp = eventAttrsData === null || eventAttrsData === void 0 ? void 0 : eventAttrsData.event_attrs.map(function (item) {
|
|
124
141
|
item.name = item.attr_name;
|
|
125
142
|
item.type = item.prop_type;
|
|
126
|
-
|
|
143
|
+
if (eventWhiteList.includes(ownerEventName) && ownerWhiteListDataList.includes(item === null || item === void 0 ? void 0 : item.attr_name)) {
|
|
144
|
+
return _objectSpread(_objectSpread({}, item), {}, {
|
|
145
|
+
newOwner: 'zg_abp'
|
|
146
|
+
});
|
|
147
|
+
} else {
|
|
148
|
+
return _objectSpread(_objectSpread({}, item), {}, {
|
|
149
|
+
newOwner: 'zg'
|
|
150
|
+
});
|
|
151
|
+
}
|
|
127
152
|
}) // 业务不展示
|
|
128
153
|
.filter(function (item) {
|
|
129
154
|
return item.attr_id != 31415926;
|
|
@@ -290,7 +315,7 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
290
315
|
// }
|
|
291
316
|
disabled: isDemo ||
|
|
292
317
|
// !authority[1000004] ||
|
|
293
|
-
record.
|
|
318
|
+
record.newOwner == 'zg_abp' || record.category === 'fixed',
|
|
294
319
|
defaultValue: record.alias_name,
|
|
295
320
|
onFocus: aliasFocus,
|
|
296
321
|
onBlur: function onBlur(e) {
|
|
@@ -318,7 +343,7 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
318
343
|
// }
|
|
319
344
|
disabled: isDemo ||
|
|
320
345
|
// !authority[1000004] ||
|
|
321
|
-
record.
|
|
346
|
+
record.newOwner == 'zg_abp' || record.category === 'fixed',
|
|
322
347
|
defaultValue: record.alias_name,
|
|
323
348
|
onFocus: aliasFocus,
|
|
324
349
|
onBlur: function onBlur(e) {
|
|
@@ -414,7 +439,7 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
414
439
|
width: 100
|
|
415
440
|
},
|
|
416
441
|
// disabled={isDemo || record.isIdMappingProp || record.category === 'fixed'}
|
|
417
|
-
disabled: isDemo || !authority[1000004] || record.category === 'fixed' || record.
|
|
442
|
+
disabled: isDemo || !authority[1000004] || !record.canUpdate || record.category === 'fixed' || record.newOwner == 'zg_abp',
|
|
418
443
|
onChange: function onChange(e) {
|
|
419
444
|
return attrChangeHandle(e, record, 'type');
|
|
420
445
|
},
|
|
@@ -471,7 +496,7 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
471
496
|
width: 100
|
|
472
497
|
},
|
|
473
498
|
// disabled={isDemo || record.isIdMappingProp || record.category === 'fixed'}
|
|
474
|
-
disabled: isDemo || !authority[1000004] || record.category === 'fixed' || record.
|
|
499
|
+
disabled: isDemo || !authority[1000004] || record.category === 'fixed' || record.newOwner == 'zg_abp',
|
|
475
500
|
onChange: function onChange(e) {
|
|
476
501
|
return attrChangeHandle(e, record, 'hidden');
|
|
477
502
|
},
|
|
@@ -533,7 +558,7 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
533
558
|
width: 100
|
|
534
559
|
},
|
|
535
560
|
// disabled={isDemo || record.isIdMappingProp}
|
|
536
|
-
disabled: isDemo || !authority[1000004] || record.category === 'fixed' || record.
|
|
561
|
+
disabled: isDemo || !authority[1000004] || record.category === 'fixed' || record.newOwner == 'zg_abp',
|
|
537
562
|
onChange: function onChange(e) {
|
|
538
563
|
return attrChangeHandle(e, record, 'encryption_type');
|
|
539
564
|
},
|
|
@@ -659,14 +684,14 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
659
684
|
}
|
|
660
685
|
})
|
|
661
686
|
})),
|
|
662
|
-
dataIndex: '
|
|
687
|
+
dataIndex: 'newOwner',
|
|
663
688
|
width: 120,
|
|
664
|
-
render: function render(
|
|
689
|
+
render: function render(record) {
|
|
665
690
|
var json = {
|
|
666
691
|
zg_abp: '内置',
|
|
667
692
|
zg: '自定义'
|
|
668
693
|
};
|
|
669
|
-
return /*#__PURE__*/React.createElement("div", null, json[
|
|
694
|
+
return /*#__PURE__*/React.createElement("div", null, json[record]);
|
|
670
695
|
}
|
|
671
696
|
}]), [{
|
|
672
697
|
title: '操作',
|
|
@@ -678,7 +703,7 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
678
703
|
style: {
|
|
679
704
|
padding: 0
|
|
680
705
|
},
|
|
681
|
-
disabled: source === 'event' ? record.
|
|
706
|
+
disabled: source === 'event' ? record.newOwner == 'zg_abp' || !authority[1000004] || !record.canUpdate : record.category == 'fixed' || isDemo || !authority[1000004],
|
|
682
707
|
onClick: function onClick() {
|
|
683
708
|
if (isDemo || !authority[1000004]) {
|
|
684
709
|
message.error('无删除权限');
|
|
@@ -912,7 +937,7 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
912
937
|
width: 64,
|
|
913
938
|
render: function render(_, record, index) {
|
|
914
939
|
return /*#__PURE__*/React.createElement("a", {
|
|
915
|
-
className: "set ".concat(record.
|
|
940
|
+
className: "set ".concat(eventWhiteList.includes(record.attr_name) ? 'set-error' : ''),
|
|
916
941
|
onClick: function onClick() {
|
|
917
942
|
return dealEventAttr(index);
|
|
918
943
|
}
|
|
@@ -968,8 +993,8 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
968
993
|
removeAttrData = _useState34[0],
|
|
969
994
|
setRemoveAttrData = _useState34[1];
|
|
970
995
|
var saveRemoveAttrData = function saveRemoveAttrData(record) {
|
|
971
|
-
// 新加逻辑--在数据清洗自定义规则中绑定有此原事件不可删除。canDel:false 不允许删除
|
|
972
|
-
if (!record.
|
|
996
|
+
// // 新加逻辑--在数据清洗自定义规则中绑定有此原事件不可删除。canDel:false 不允许删除
|
|
997
|
+
if (source == 'event' && !record.canUpdate) {
|
|
973
998
|
UseModal({
|
|
974
999
|
onOk: function onOk() {},
|
|
975
1000
|
okText: '确定',
|
|
@@ -1132,7 +1157,6 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
1132
1157
|
//页面加载完成后才能获取到对应的元素及其位置
|
|
1133
1158
|
useEffect(function () {
|
|
1134
1159
|
var _Y = getTableScroll(60, 'dataManageAttrTable');
|
|
1135
|
-
// console.log('_Y', _Y);
|
|
1136
1160
|
setScrollY(_Y);
|
|
1137
1161
|
}, []);
|
|
1138
1162
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -1171,14 +1195,14 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
1171
1195
|
onClick: function onClick() {
|
|
1172
1196
|
return setCreateAttrShow(true);
|
|
1173
1197
|
}
|
|
1174
|
-
}, "\u521B\u5EFA\u5C5E\u6027"), /*#__PURE__*/React.createElement(Button, {
|
|
1198
|
+
}, "\u521B\u5EFA\u5C5E\u6027"), showProdDownload && (/*#__PURE__*/React.createElement(Button, {
|
|
1175
1199
|
shape: "round",
|
|
1176
1200
|
className: "button",
|
|
1177
1201
|
disabled: isDemo || !authority[1722838544],
|
|
1178
1202
|
onClick: function onClick() {
|
|
1179
1203
|
return setOpenImportModal(true);
|
|
1180
1204
|
}
|
|
1181
|
-
}, "\u5BFC\u5165\u5C5E\u6027")))), /*#__PURE__*/React.createElement(Table, {
|
|
1205
|
+
}, "\u5BFC\u5165\u5C5E\u6027"))))), /*#__PURE__*/React.createElement(Table, {
|
|
1182
1206
|
className: "".concat(classPrefix, "-table"),
|
|
1183
1207
|
columns: columns,
|
|
1184
1208
|
id: 'dataManageAttrTable',
|
|
@@ -1201,7 +1225,7 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
1201
1225
|
}).filter(function (item) {
|
|
1202
1226
|
return category == '' || item.category === category;
|
|
1203
1227
|
}).filter(function (item) {
|
|
1204
|
-
return owner == '' || item.
|
|
1228
|
+
return owner == '' || item.newOwner === owner;
|
|
1205
1229
|
}),
|
|
1206
1230
|
pagination: false
|
|
1207
1231
|
}), source == 'event' && (/*#__PURE__*/React.createElement(Button, {
|
|
@@ -1233,7 +1257,8 @@ var CollectionAttributeList = function CollectionAttributeList(props) {
|
|
|
1233
1257
|
name: '',
|
|
1234
1258
|
aliasName: '',
|
|
1235
1259
|
type: 1,
|
|
1236
|
-
encryptionType: 0
|
|
1260
|
+
encryptionType: 0,
|
|
1261
|
+
newOwner: 'zg'
|
|
1237
1262
|
}]));
|
|
1238
1263
|
}
|
|
1239
1264
|
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
@@ -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),
|
|
@@ -106,19 +107,26 @@ var CollectionEventList = function CollectionEventList(props) {
|
|
|
106
107
|
value: -1
|
|
107
108
|
}, {
|
|
108
109
|
label: 'JS',
|
|
109
|
-
value:
|
|
110
|
+
value: 3
|
|
110
111
|
}, {
|
|
111
112
|
label: 'Android',
|
|
112
|
-
value:
|
|
113
|
+
value: 1
|
|
113
114
|
}, {
|
|
114
115
|
label: 'IOS',
|
|
115
|
-
value:
|
|
116
|
+
value: 2
|
|
116
117
|
}, {
|
|
117
118
|
label: '其他',
|
|
118
119
|
value: 99
|
|
119
120
|
}]),
|
|
120
121
|
_useState28 = _slicedToArray(_useState27, 1),
|
|
121
122
|
maidianList = _useState28[0];
|
|
123
|
+
// {"id":0,"name":"Unknown","keys":["none"]},
|
|
124
|
+
// {"id":1,"name":"Android","keys":["and"]},
|
|
125
|
+
// {"id":2,"name":"IOS","keys":["ios"]},
|
|
126
|
+
// {"id":3,"name":"Javascript","keys":["js"]},
|
|
127
|
+
// {"id":4,"name":"微信小程序","keys":["wxa"]},
|
|
128
|
+
// {"id":5,"name":"服务端","keys":["server"]},
|
|
129
|
+
// {"id":6,"name":"鸿蒙","keys":["harmonyos"]}
|
|
122
130
|
var _useState29 = useState([-1]),
|
|
123
131
|
_useState30 = _slicedToArray(_useState29, 2),
|
|
124
132
|
currentMaidian = _useState30[0],
|
|
@@ -459,7 +467,7 @@ var CollectionEventList = function CollectionEventList(props) {
|
|
|
459
467
|
fileName: "\u5143\u4E8B\u4EF6\u5217\u8868_".concat(moment().format('YYYYMMDD'))
|
|
460
468
|
}).then(function (res) {});
|
|
461
469
|
};
|
|
462
|
-
var items = [{
|
|
470
|
+
var items = showProdDownload ? [{
|
|
463
471
|
key: '2',
|
|
464
472
|
disabled: !authority[1700636282],
|
|
465
473
|
label: (/*#__PURE__*/React.createElement("a", {
|
|
@@ -484,7 +492,7 @@ var CollectionEventList = function CollectionEventList(props) {
|
|
|
484
492
|
type: "xiazai1",
|
|
485
493
|
size: 16,
|
|
486
494
|
className: "creditPopClickIcon"
|
|
487
|
-
}),
|
|
495
|
+
}), ' ', /*#__PURE__*/React.createElement("span", null, "\u5BFC\u5165\u4E8B\u4EF6")))
|
|
488
496
|
}, {
|
|
489
497
|
key: '4',
|
|
490
498
|
disabled: isDemo || !authority[1722837261],
|
|
@@ -495,7 +503,7 @@ var CollectionEventList = function CollectionEventList(props) {
|
|
|
495
503
|
type: "daochu1",
|
|
496
504
|
size: 16,
|
|
497
505
|
className: "creditPopClickIcon"
|
|
498
|
-
}),
|
|
506
|
+
}), ' ', /*#__PURE__*/React.createElement("span", null, "\u5BFC\u51FA\u4E8B\u4EF6")))
|
|
499
507
|
}, {
|
|
500
508
|
key: '5',
|
|
501
509
|
label: (/*#__PURE__*/React.createElement("a", {
|
|
@@ -532,6 +540,31 @@ var CollectionEventList = function CollectionEventList(props) {
|
|
|
532
540
|
size: 16,
|
|
533
541
|
className: "creditPopClickIcon"
|
|
534
542
|
}), /*#__PURE__*/React.createElement("span", null, "\u5BFC\u51FA\u6570\u636E\u5305")))
|
|
543
|
+
}] : [{
|
|
544
|
+
key: '2',
|
|
545
|
+
disabled: !authority[1700636282],
|
|
546
|
+
label: (/*#__PURE__*/React.createElement("a", {
|
|
547
|
+
className: "".concat(classPrefix, "-downItems"),
|
|
548
|
+
onClick: function onClick() {
|
|
549
|
+
return setEventGroupingShow(true);
|
|
550
|
+
}
|
|
551
|
+
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
552
|
+
type: "guanli",
|
|
553
|
+
size: 16,
|
|
554
|
+
className: "creditPopClickIcon"
|
|
555
|
+
}), /*#__PURE__*/React.createElement("span", null, "\u4E8B\u4EF6\u5206\u7EC4\u7BA1\u7406")))
|
|
556
|
+
}, {
|
|
557
|
+
key: '5',
|
|
558
|
+
label: (/*#__PURE__*/React.createElement("a", {
|
|
559
|
+
className: "".concat(classPrefix, "-downItems"),
|
|
560
|
+
onClick: function onClick() {
|
|
561
|
+
return setIsDevModalState(true);
|
|
562
|
+
}
|
|
563
|
+
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
564
|
+
type: "icon-shishigailan",
|
|
565
|
+
size: 16,
|
|
566
|
+
className: "creditPopClickIcon"
|
|
567
|
+
}), ' ', /*#__PURE__*/React.createElement("span", null, "\u5F00\u53D1\u7BA1\u7406")))
|
|
535
568
|
}];
|
|
536
569
|
// 提交测试报告
|
|
537
570
|
var _Form$useForm = Form.useForm(),
|
|
@@ -551,7 +584,8 @@ var CollectionEventList = function CollectionEventList(props) {
|
|
|
551
584
|
request(apis.createExport, {
|
|
552
585
|
method: 'get',
|
|
553
586
|
params: {
|
|
554
|
-
demandId: values === null || values === void 0 ? void 0 : values.demandId
|
|
587
|
+
demandId: values === null || values === void 0 ? void 0 : values.demandId,
|
|
588
|
+
appId: getAppID(currentApp)
|
|
555
589
|
},
|
|
556
590
|
responseType: 'blob',
|
|
557
591
|
fileName: "\u6D4B\u8BD5\u62A5\u544A_".concat(moment().format('YYYYMMDD'))
|
|
@@ -559,18 +593,22 @@ var CollectionEventList = function CollectionEventList(props) {
|
|
|
559
593
|
notification.success({
|
|
560
594
|
message: '生成测试报告成功!'
|
|
561
595
|
});
|
|
596
|
+
// 清空需求id
|
|
597
|
+
formReport.setFieldsValue({
|
|
598
|
+
demandId: ''
|
|
599
|
+
});
|
|
562
600
|
setIsTextReport(false);
|
|
563
|
-
_context.next =
|
|
601
|
+
_context.next = 13;
|
|
564
602
|
break;
|
|
565
|
-
case
|
|
566
|
-
_context.prev =
|
|
603
|
+
case 10:
|
|
604
|
+
_context.prev = 10;
|
|
567
605
|
_context.t0 = _context["catch"](0);
|
|
568
606
|
console.log(_context.t0, '测试报告验证失败');
|
|
569
|
-
case
|
|
607
|
+
case 13:
|
|
570
608
|
case "end":
|
|
571
609
|
return _context.stop();
|
|
572
610
|
}
|
|
573
|
-
}, _callee, null, [[0,
|
|
611
|
+
}, _callee, null, [[0, 10]]);
|
|
574
612
|
}));
|
|
575
613
|
return function submitReport() {
|
|
576
614
|
return _ref.apply(this, arguments);
|
|
@@ -594,7 +632,8 @@ var CollectionEventList = function CollectionEventList(props) {
|
|
|
594
632
|
request(apis.exportData, {
|
|
595
633
|
method: 'get',
|
|
596
634
|
params: {
|
|
597
|
-
demandId: values === null || values === void 0 ? void 0 : values.demandId
|
|
635
|
+
demandId: values === null || values === void 0 ? void 0 : values.demandId,
|
|
636
|
+
appId: getAppID(currentApp)
|
|
598
637
|
},
|
|
599
638
|
responseType: 'blob',
|
|
600
639
|
fileName: "\u6570\u636E\u5305_".concat(moment().format('YYYYMMDD'))
|
|
@@ -603,17 +642,21 @@ var CollectionEventList = function CollectionEventList(props) {
|
|
|
603
642
|
message: '生成数据包成功!'
|
|
604
643
|
});
|
|
605
644
|
setIsExportData(false);
|
|
606
|
-
|
|
645
|
+
// 清空需求id
|
|
646
|
+
formExport.setFieldsValue({
|
|
647
|
+
demandId: ''
|
|
648
|
+
});
|
|
649
|
+
_context2.next = 13;
|
|
607
650
|
break;
|
|
608
|
-
case
|
|
609
|
-
_context2.prev =
|
|
651
|
+
case 10:
|
|
652
|
+
_context2.prev = 10;
|
|
610
653
|
_context2.t0 = _context2["catch"](0);
|
|
611
654
|
console.log(_context2.t0, '测试数据包失败');
|
|
612
|
-
case
|
|
655
|
+
case 13:
|
|
613
656
|
case "end":
|
|
614
657
|
return _context2.stop();
|
|
615
658
|
}
|
|
616
|
-
}, _callee2, null, [[0,
|
|
659
|
+
}, _callee2, null, [[0, 10]]);
|
|
617
660
|
}));
|
|
618
661
|
return function submitExport() {
|
|
619
662
|
return _ref2.apply(this, arguments);
|
|
@@ -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') {
|
|
@@ -403,19 +409,66 @@ var CreateMeta = function CreateMeta(props) {
|
|
|
403
409
|
// 埋点平台列表
|
|
404
410
|
var _useState19 = useState([{
|
|
405
411
|
label: 'JS',
|
|
406
|
-
value:
|
|
412
|
+
value: 3
|
|
407
413
|
}, {
|
|
408
414
|
label: 'Android',
|
|
409
|
-
value:
|
|
415
|
+
value: 1
|
|
410
416
|
}, {
|
|
411
417
|
label: 'IOS',
|
|
412
|
-
value:
|
|
418
|
+
value: 2
|
|
413
419
|
}, {
|
|
414
420
|
label: '其他',
|
|
415
421
|
value: 99
|
|
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, {
|
|
@@ -18,15 +18,15 @@ var classNames = 'devModel';
|
|
|
18
18
|
export default (function (props) {
|
|
19
19
|
var _useState = useState([{
|
|
20
20
|
name: 'JS',
|
|
21
|
-
id: '
|
|
21
|
+
id: '3',
|
|
22
22
|
icon: 'a-js2'
|
|
23
23
|
}, {
|
|
24
|
-
name: '
|
|
25
|
-
id: '
|
|
24
|
+
name: 'Android',
|
|
25
|
+
id: '1',
|
|
26
26
|
icon: 'ios1'
|
|
27
27
|
}, {
|
|
28
|
-
name: '
|
|
29
|
-
id: '
|
|
28
|
+
name: 'IOS',
|
|
29
|
+
id: '2',
|
|
30
30
|
icon: 'android1'
|
|
31
31
|
}, {
|
|
32
32
|
name: '更多',
|
|
@@ -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[];
|