@zgfe/modules-settings 2.0.0-zhongyuan.39 → 2.0.0-zhongyuan.40
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.
|
@@ -349,7 +349,9 @@ var CreateDemand = function CreateDemand(props) {
|
|
|
349
349
|
id: props.data.demand.id
|
|
350
350
|
} : {}), {}, {
|
|
351
351
|
completionTime: completionTime * 1,
|
|
352
|
-
pointEventIds: pointEventInfo === null || pointEventInfo === void 0 ? void 0 : pointEventInfo.
|
|
352
|
+
pointEventIds: pointEventInfo === null || pointEventInfo === void 0 ? void 0 : pointEventInfo.filter(function (res) {
|
|
353
|
+
return res.id;
|
|
354
|
+
}).map(function (item) {
|
|
353
355
|
return item.id;
|
|
354
356
|
}),
|
|
355
357
|
pointEventStatus: type != 'flow' ? pointEventInfo === null || pointEventInfo === void 0 ? void 0 : pointEventInfo.map(function (item) {
|
|
@@ -881,7 +883,7 @@ var CreateDemand = function CreateDemand(props) {
|
|
|
881
883
|
};
|
|
882
884
|
//埋点地图列表
|
|
883
885
|
var getPointEventInfo = function getPointEventInfo() {
|
|
884
|
-
return
|
|
886
|
+
return pointEventInfo.filter(function (item) {
|
|
885
887
|
return new RegExp(_.escapeRegExp(eventKey), 'i').test((item.eventName || '') + (item.pageName || ''));
|
|
886
888
|
});
|
|
887
889
|
};
|
|
@@ -1087,13 +1089,15 @@ var CreateDemand = function CreateDemand(props) {
|
|
|
1087
1089
|
className: "button",
|
|
1088
1090
|
onClick: function onClick() {
|
|
1089
1091
|
props.setIsShowSelectList && props.setIsShowSelectList(function (val) {
|
|
1090
|
-
setPointEventInfo(_toConsumableArray(val.map(function (val) {
|
|
1092
|
+
setPointEventInfo([].concat(_toConsumableArray(pointEventInfo || []), _toConsumableArray(val.map(function (val) {
|
|
1091
1093
|
return _objectSpread(_objectSpread({}, val), {}, {
|
|
1092
1094
|
status: 0
|
|
1093
1095
|
});
|
|
1094
|
-
})));
|
|
1096
|
+
}))));
|
|
1095
1097
|
onCreate('save', {
|
|
1096
|
-
pointEventIds: val.
|
|
1098
|
+
pointEventIds: val.filter(function (res) {
|
|
1099
|
+
return res.id;
|
|
1100
|
+
}).map(function (res) {
|
|
1097
1101
|
return res.id;
|
|
1098
1102
|
}),
|
|
1099
1103
|
pointEventStatus: val.map(function (res) {
|
|
@@ -1120,7 +1124,9 @@ var CreateDemand = function CreateDemand(props) {
|
|
|
1120
1124
|
});
|
|
1121
1125
|
setPointEventInfo(list);
|
|
1122
1126
|
onCreate('save', {
|
|
1123
|
-
pointEventIds: list.
|
|
1127
|
+
pointEventIds: list.filter(function (res) {
|
|
1128
|
+
return res.id;
|
|
1129
|
+
}).map(function (res) {
|
|
1124
1130
|
return res.id;
|
|
1125
1131
|
}),
|
|
1126
1132
|
pointEventStatus: list.map(function (res) {
|
|
@@ -144,11 +144,11 @@ var PageInfo = function PageInfo(props) {
|
|
|
144
144
|
var _useState45 = useState([{
|
|
145
145
|
label: '在线埋点',
|
|
146
146
|
sum: 0,
|
|
147
|
-
value:
|
|
147
|
+
value: 1
|
|
148
148
|
}, {
|
|
149
149
|
label: '下线埋点',
|
|
150
150
|
sum: 0,
|
|
151
|
-
value:
|
|
151
|
+
value: 0
|
|
152
152
|
}]),
|
|
153
153
|
_useState46 = _slicedToArray(_useState45, 2),
|
|
154
154
|
navList = _useState46[0],
|
|
@@ -205,38 +205,38 @@ var PageInfo = function PageInfo(props) {
|
|
|
205
205
|
uuid: res.data.detail.uuid,
|
|
206
206
|
zosFileKey: res.data.detail.zosFileKey
|
|
207
207
|
} : undefined);
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
208
|
+
if (!isSelect) {
|
|
209
|
+
// getPointTree()
|
|
210
|
+
setEventAttrList(res.data.eventInfos ? res.data.eventInfos.map(function (item, index) {
|
|
211
|
+
return {
|
|
212
|
+
id: item.id,
|
|
213
|
+
eventId: item.eventId,
|
|
214
|
+
eventName: item.eventName,
|
|
215
|
+
describe: item.pointDescribe,
|
|
216
|
+
pointSelect: item.pointSelect,
|
|
217
|
+
pv: item.pv,
|
|
218
|
+
imgPath: item.zosImgUrl ? getImgUrl(item.zosImgUrl, props.pageData.id) : '',
|
|
219
|
+
key: uuid(),
|
|
220
|
+
index: index,
|
|
221
|
+
approvalStatus: item.approvalStatus,
|
|
222
|
+
operationType: item.operationType,
|
|
223
|
+
isOnline: item.isOnline || 0
|
|
224
|
+
};
|
|
225
|
+
}) : []);
|
|
226
|
+
//计算出当前上线和下线总合数量
|
|
227
|
+
setNavList(navList.map(function (nav) {
|
|
228
|
+
var sum = 0;
|
|
229
|
+
res.data.eventInfos && res.data.eventInfos.map(function (item, index) {
|
|
230
|
+
if (nav.value == item.isOnline) {
|
|
231
|
+
sum += 1;
|
|
232
|
+
}
|
|
233
|
+
});
|
|
234
|
+
return _objectSpread(_objectSpread({}, nav), {}, {
|
|
235
|
+
sum: sum
|
|
236
|
+
});
|
|
237
|
+
}));
|
|
238
|
+
}
|
|
238
239
|
}
|
|
239
|
-
// }
|
|
240
240
|
}).catch(function (err) {
|
|
241
241
|
console.log(err);
|
|
242
242
|
});
|
|
@@ -459,16 +459,23 @@ var PageInfo = function PageInfo(props) {
|
|
|
459
459
|
setSelectPoint(_selectPoint);
|
|
460
460
|
props.onChangeSelectObj && props.onChangeSelectObj(_selectPoint);
|
|
461
461
|
};
|
|
462
|
+
//监听埋点列表修改自动选择
|
|
463
|
+
if (isSelect) {
|
|
464
|
+
useEffect(function () {
|
|
465
|
+
var _selectPoint = [];
|
|
466
|
+
eventAttrList.map(function (v) {
|
|
467
|
+
_selectPoint.push(_objectSpread(_objectSpread({}, v), {}, {
|
|
468
|
+
pageName: pageName,
|
|
469
|
+
pageId: id,
|
|
470
|
+
pageImgUrl: imgPath
|
|
471
|
+
}));
|
|
472
|
+
});
|
|
473
|
+
setSelectPoint(_selectPoint);
|
|
474
|
+
props.onChangeSelectObj && props.onChangeSelectObj(_selectPoint);
|
|
475
|
+
}, [eventAttrList]);
|
|
476
|
+
}
|
|
462
477
|
// 表格列表筛选项
|
|
463
|
-
var
|
|
464
|
-
_useState56 = _slicedToArray(_useState55, 2),
|
|
465
|
-
type = _useState56[0],
|
|
466
|
-
setType = _useState56[1];
|
|
467
|
-
var _useState57 = useState(-1),
|
|
468
|
-
_useState58 = _slicedToArray(_useState57, 2),
|
|
469
|
-
encryption_type = _useState58[0],
|
|
470
|
-
setEncryptionType = _useState58[1];
|
|
471
|
-
var columns = [].concat(_toConsumableArray(!isEdit ? [{
|
|
478
|
+
var columns = [].concat(_toConsumableArray(!isEdit && !isSelect ? [{
|
|
472
479
|
title: (/*#__PURE__*/React.createElement(Checkbox, {
|
|
473
480
|
checked: checkedAllHandle(),
|
|
474
481
|
onChange: function onChange(e) {
|
|
@@ -495,8 +502,8 @@ var PageInfo = function PageInfo(props) {
|
|
|
495
502
|
sorter: function sorter(a, b) {
|
|
496
503
|
return a.index - b.index;
|
|
497
504
|
},
|
|
498
|
-
render: function render(text) {
|
|
499
|
-
return /*#__PURE__*/React.createElement("span", null,
|
|
505
|
+
render: function render(text, record, index) {
|
|
506
|
+
return /*#__PURE__*/React.createElement("span", null, index + 1);
|
|
500
507
|
}
|
|
501
508
|
}, {
|
|
502
509
|
title: (/*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
|
|
@@ -623,16 +630,50 @@ var PageInfo = function PageInfo(props) {
|
|
|
623
630
|
size: 16
|
|
624
631
|
}), "\u5708\u9009")));
|
|
625
632
|
}
|
|
626
|
-
},
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
633
|
+
},
|
|
634
|
+
// {
|
|
635
|
+
// title: '访问量',
|
|
636
|
+
// dataIndex: 'pv',
|
|
637
|
+
// key: 'pv',
|
|
638
|
+
// width: 92,
|
|
639
|
+
// render: (pv) => {
|
|
640
|
+
// return <div className={`${classPrefix}-content-select`}>{pv || pv === 0 ? pv : '-'}</div>;
|
|
641
|
+
// },
|
|
642
|
+
// },
|
|
643
|
+
// 新
|
|
644
|
+
{
|
|
645
|
+
title: '数据量',
|
|
646
|
+
children: [{
|
|
647
|
+
title: '昨日',
|
|
648
|
+
dataIndex: 'yesterdayEvent',
|
|
649
|
+
key: 'yesterdayEvent',
|
|
650
|
+
width: 80,
|
|
651
|
+
render: function render(value) {
|
|
652
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
653
|
+
className: "".concat(classPrefix, "-content-select")
|
|
654
|
+
}, value || value === 0 ? value : '-');
|
|
655
|
+
}
|
|
656
|
+
}, {
|
|
657
|
+
title: '近7天',
|
|
658
|
+
dataIndex: 'pre7Event',
|
|
659
|
+
key: 'pre7Event',
|
|
660
|
+
width: 80,
|
|
661
|
+
render: function render(value) {
|
|
662
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
663
|
+
className: "".concat(classPrefix, "-content-select")
|
|
664
|
+
}, value || value === 0 ? value : '-');
|
|
665
|
+
}
|
|
666
|
+
}, {
|
|
667
|
+
title: '近30天',
|
|
668
|
+
dataIndex: 'pre30Event',
|
|
669
|
+
key: 'pre30Event',
|
|
670
|
+
width: 80,
|
|
671
|
+
render: function render(value) {
|
|
672
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
673
|
+
className: "".concat(classPrefix, "-content-select")
|
|
674
|
+
}, value || value === 0 ? value : '-');
|
|
675
|
+
}
|
|
676
|
+
}]
|
|
636
677
|
}], _toConsumableArray(isEdit || isSelect ? [{
|
|
637
678
|
title: '操作',
|
|
638
679
|
dataIndex: 'set',
|
|
@@ -661,10 +702,10 @@ var PageInfo = function PageInfo(props) {
|
|
|
661
702
|
}
|
|
662
703
|
}]));
|
|
663
704
|
var DealDom = function DealDom(props) {
|
|
664
|
-
var
|
|
665
|
-
|
|
666
|
-
open =
|
|
667
|
-
setOpen =
|
|
705
|
+
var _useState55 = useState(false),
|
|
706
|
+
_useState56 = _slicedToArray(_useState55, 2),
|
|
707
|
+
open = _useState56[0],
|
|
708
|
+
setOpen = _useState56[1];
|
|
668
709
|
var handleOpenChange = function handleOpenChange(newOpen) {
|
|
669
710
|
setOpen(newOpen);
|
|
670
711
|
};
|
|
@@ -711,10 +752,10 @@ var PageInfo = function PageInfo(props) {
|
|
|
711
752
|
}
|
|
712
753
|
}, "\u79FB\u9664"));
|
|
713
754
|
};
|
|
714
|
-
var
|
|
715
|
-
|
|
716
|
-
scrollY =
|
|
717
|
-
setScrollY =
|
|
755
|
+
var _useState57 = useState(''),
|
|
756
|
+
_useState58 = _slicedToArray(_useState57, 2),
|
|
757
|
+
scrollY = _useState58[0],
|
|
758
|
+
setScrollY = _useState58[1];
|
|
718
759
|
//页面加载完成后才能获取到对应的元素及其位置
|
|
719
760
|
var onClose = function onClose() {
|
|
720
761
|
if (isChange) {
|
|
@@ -846,7 +887,7 @@ var PageInfo = function PageInfo(props) {
|
|
|
846
887
|
triggeringOccasion: data.triggeringOccasion,
|
|
847
888
|
aliasName: data.aliasName,
|
|
848
889
|
describe: '',
|
|
849
|
-
pointSelect:
|
|
890
|
+
pointSelect: undefined,
|
|
850
891
|
imgPath: '',
|
|
851
892
|
index: eventAttrList.length,
|
|
852
893
|
key: new Date() * 1,
|
|
@@ -1059,8 +1100,10 @@ var PageInfo = function PageInfo(props) {
|
|
|
1059
1100
|
if (isEdit || isSelect) {
|
|
1060
1101
|
return true;
|
|
1061
1102
|
} else {
|
|
1062
|
-
return res.
|
|
1103
|
+
return res.isOnline == navIndex;
|
|
1063
1104
|
}
|
|
1105
|
+
}).filter(function (res) {
|
|
1106
|
+
return res.pageName == pageName;
|
|
1064
1107
|
}),
|
|
1065
1108
|
scroll: {
|
|
1066
1109
|
y: window.innerHeight - 380
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgfe/modules-settings",
|
|
3
|
-
"version": "2.0.0-zhongyuan.
|
|
3
|
+
"version": "2.0.0-zhongyuan.40",
|
|
4
4
|
"private": false,
|
|
5
5
|
"module": "es/index.js",
|
|
6
6
|
"typings": "es/index.d.ts",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"publishConfig": {
|
|
68
68
|
"access": "public"
|
|
69
69
|
},
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "ed2ddab815c391cba7365f83e20a8cd1987d63b7",
|
|
71
71
|
"gitHooks": {
|
|
72
72
|
"pre-commit": "lint-staged"
|
|
73
73
|
}
|