@zgfe/modules-settings 2.0.0-zhongyuan.34 → 2.0.0-zhongyuan.35
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 +2 -0
- package/es/constants/api.js +4 -0
- package/es/modules/pointMap/createMetaDrawer.d.ts +4 -0
- package/es/modules/pointMap/createMetaDrawer.js +674 -0
- package/es/modules/pointMap/pageInfo.js +194 -31
- package/es/modules/pointMap/record.d.ts +7 -0
- package/es/modules/pointMap/record.js +521 -0
- package/es/modules/pointMap/styles/pageInfo.less +421 -244
- package/es/modules/pointMap/types.d.ts +88 -0
- package/es/modules/pointMap/types.js +1 -0
- package/package.json +2 -2
|
@@ -18,7 +18,7 @@ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length)
|
|
|
18
18
|
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; } }
|
|
19
19
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
20
20
|
import { BizDialog, BizGlobalDataContext, IconFont } from '@zgfe/business-lib';
|
|
21
|
-
import { Input, message, Button, Table, notification, Upload, Image, Checkbox, Empty, Tooltip, Popover, Modal } from 'antd';
|
|
21
|
+
import { Input, message, Button, Table, notification, Upload, Image, Checkbox, Empty, Tooltip, Popover, Modal, Drawer } from 'antd';
|
|
22
22
|
import React, { useContext, useEffect, useState } from 'react';
|
|
23
23
|
import _ from 'lodash';
|
|
24
24
|
import './styles/pageInfo.less';
|
|
@@ -27,7 +27,9 @@ import util from '../../utils/util';
|
|
|
27
27
|
import request from '../../utils/ajax';
|
|
28
28
|
import apis from '../../constants/api';
|
|
29
29
|
import PicCircleSelect from '../../components/picCircleSelect';
|
|
30
|
+
import CreateMetaDrawer from './createMetaDrawer';
|
|
30
31
|
import { uuid } from '@antv/x6/lib/util/string/uuid';
|
|
32
|
+
import RecordDom from './record';
|
|
31
33
|
var getImgUrl = function getImgUrl(src, pageId) {
|
|
32
34
|
return src.indexOf('data:image') != -1 ? src : "".concat(window.location.origin, "/web/img/report/").concat(pageId, "/").concat(src);
|
|
33
35
|
// return constants.regExp.url.test(src)
|
|
@@ -129,12 +131,48 @@ var PageInfo = function PageInfo(props) {
|
|
|
129
131
|
_useState44 = _slicedToArray(_useState43, 2),
|
|
130
132
|
showIndex = _useState44[0],
|
|
131
133
|
setShowIndex = _useState44[1];
|
|
134
|
+
var _useState45 = useState({}),
|
|
135
|
+
_useState46 = _slicedToArray(_useState45, 2),
|
|
136
|
+
eventData = _useState46[0],
|
|
137
|
+
setEventData = _useState46[1];
|
|
132
138
|
var changeItemInfo = function changeItemInfo(i, key, v) {
|
|
133
139
|
var dealData = _.clone(eventAttrList);
|
|
134
140
|
dealData[i]['isEdit'] = true;
|
|
135
141
|
dealData[i][key] = v;
|
|
136
142
|
setEventAttrList(dealData);
|
|
137
143
|
};
|
|
144
|
+
//埋点筛选
|
|
145
|
+
var _useState47 = useState([{
|
|
146
|
+
label: '在线埋点',
|
|
147
|
+
sum: 0,
|
|
148
|
+
value: 0
|
|
149
|
+
}, {
|
|
150
|
+
label: '下线埋点',
|
|
151
|
+
sum: 0,
|
|
152
|
+
value: 1
|
|
153
|
+
}]),
|
|
154
|
+
_useState48 = _slicedToArray(_useState47, 2),
|
|
155
|
+
navList = _useState48[0],
|
|
156
|
+
setNavList = _useState48[1];
|
|
157
|
+
var _useState49 = useState(0),
|
|
158
|
+
_useState50 = _slicedToArray(_useState49, 2),
|
|
159
|
+
navIndex = _useState50[0],
|
|
160
|
+
setNavIndex = _useState50[1];
|
|
161
|
+
//创建元事件
|
|
162
|
+
var _useState51 = useState(false),
|
|
163
|
+
_useState52 = _slicedToArray(_useState51, 2),
|
|
164
|
+
createMetaShow = _useState52[0],
|
|
165
|
+
setCreateMetaShow = _useState52[1];
|
|
166
|
+
//元事件内容
|
|
167
|
+
var _useState53 = useState(),
|
|
168
|
+
_useState54 = _slicedToArray(_useState53, 2),
|
|
169
|
+
metaData = _useState54[0],
|
|
170
|
+
setMetaData = _useState54[1];
|
|
171
|
+
//日志管理
|
|
172
|
+
var _useState55 = useState(false),
|
|
173
|
+
_useState56 = _slicedToArray(_useState55, 2),
|
|
174
|
+
recordShow = _useState56[0],
|
|
175
|
+
setRecordShow = _useState56[1];
|
|
138
176
|
useEffect(function () {
|
|
139
177
|
// console.log('props.pageData', props.pageData);
|
|
140
178
|
if (!props.pageData) {
|
|
@@ -181,9 +219,26 @@ var PageInfo = function PageInfo(props) {
|
|
|
181
219
|
key: uuid(),
|
|
182
220
|
index: index,
|
|
183
221
|
approvalStatus: item.approvalStatus,
|
|
184
|
-
operationType: item.operationType
|
|
222
|
+
operationType: item.operationType,
|
|
223
|
+
del: item.del || 1
|
|
185
224
|
};
|
|
186
225
|
}) : []);
|
|
226
|
+
//计算出当前上线和下线总合数量
|
|
227
|
+
// setNavList(
|
|
228
|
+
// navList.map((nav) => {
|
|
229
|
+
// let sum = 0;
|
|
230
|
+
// res.data.eventInfos &&
|
|
231
|
+
// res.data.eventInfos.map((item: any, index: number) => {
|
|
232
|
+
// if (nav.value == item.del) {
|
|
233
|
+
// sum += 1;
|
|
234
|
+
// }
|
|
235
|
+
// });
|
|
236
|
+
// return {
|
|
237
|
+
// ...nav,
|
|
238
|
+
// sum,
|
|
239
|
+
// };
|
|
240
|
+
// }),
|
|
241
|
+
// );
|
|
187
242
|
}
|
|
188
243
|
}).catch(function (err) {
|
|
189
244
|
console.log(err);
|
|
@@ -408,14 +463,14 @@ var PageInfo = function PageInfo(props) {
|
|
|
408
463
|
props.onChangeSelectObj && props.onChangeSelectObj(_selectPoint);
|
|
409
464
|
};
|
|
410
465
|
// 表格列表筛选项
|
|
411
|
-
var
|
|
412
|
-
|
|
413
|
-
type =
|
|
414
|
-
setType =
|
|
415
|
-
var
|
|
416
|
-
|
|
417
|
-
encryption_type =
|
|
418
|
-
setEncryptionType =
|
|
466
|
+
var _useState57 = useState(0),
|
|
467
|
+
_useState58 = _slicedToArray(_useState57, 2),
|
|
468
|
+
type = _useState58[0],
|
|
469
|
+
setType = _useState58[1];
|
|
470
|
+
var _useState59 = useState(-1),
|
|
471
|
+
_useState60 = _slicedToArray(_useState59, 2),
|
|
472
|
+
encryption_type = _useState60[0],
|
|
473
|
+
setEncryptionType = _useState60[1];
|
|
419
474
|
var columns = [].concat(_toConsumableArray(props.isSelect && !isEdit ? [{
|
|
420
475
|
title: (/*#__PURE__*/React.createElement(Checkbox, {
|
|
421
476
|
checked: checkedAllHandle(),
|
|
@@ -475,6 +530,9 @@ var PageInfo = function PageInfo(props) {
|
|
|
475
530
|
} else {
|
|
476
531
|
window.open('/webapp/app/' + (currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId) + '/plat/0/analytics/dataCollectManage?key=' + eventName, '_blank');
|
|
477
532
|
}
|
|
533
|
+
//打开元事件
|
|
534
|
+
// setCreateMetaShow(true);
|
|
535
|
+
// setMetaData(record);
|
|
478
536
|
}
|
|
479
537
|
}, eventName ? eventName : '选择元事件', !eventName && /*#__PURE__*/React.createElement(IconFont, {
|
|
480
538
|
type: "zhuanfa",
|
|
@@ -565,16 +623,49 @@ var PageInfo = function PageInfo(props) {
|
|
|
565
623
|
size: 16
|
|
566
624
|
}), "\u5708\u9009")));
|
|
567
625
|
}
|
|
568
|
-
},
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
626
|
+
},
|
|
627
|
+
// {
|
|
628
|
+
// title: '访问量',
|
|
629
|
+
// dataIndex: 'pv',
|
|
630
|
+
// key: 'pv',
|
|
631
|
+
// width: 92,
|
|
632
|
+
// render: (pv) => {
|
|
633
|
+
// return <div className={`${classPrefix}-content-select`}>{pv || pv === 0 ? pv : '-'}</div>;
|
|
634
|
+
// },
|
|
635
|
+
// },
|
|
636
|
+
{
|
|
637
|
+
title: '数据量',
|
|
638
|
+
children: [{
|
|
639
|
+
title: '昨日',
|
|
640
|
+
dataIndex: 'time1',
|
|
641
|
+
key: 'time1',
|
|
642
|
+
width: 92,
|
|
643
|
+
render: function render(value) {
|
|
644
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
645
|
+
className: "".concat(classPrefix, "-content-select")
|
|
646
|
+
}, value || value === 0 ? value : '-');
|
|
647
|
+
}
|
|
648
|
+
}, {
|
|
649
|
+
title: '近7天',
|
|
650
|
+
dataIndex: 'time1',
|
|
651
|
+
key: 'time1',
|
|
652
|
+
width: 92,
|
|
653
|
+
render: function render(value) {
|
|
654
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
655
|
+
className: "".concat(classPrefix, "-content-select")
|
|
656
|
+
}, value || value === 0 ? value : '-');
|
|
657
|
+
}
|
|
658
|
+
}, {
|
|
659
|
+
title: '近30天',
|
|
660
|
+
dataIndex: 'time1',
|
|
661
|
+
key: 'time1',
|
|
662
|
+
width: 92,
|
|
663
|
+
render: function render(value) {
|
|
664
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
665
|
+
className: "".concat(classPrefix, "-content-select")
|
|
666
|
+
}, value || value === 0 ? value : '-');
|
|
667
|
+
}
|
|
668
|
+
}]
|
|
578
669
|
}], _toConsumableArray(isEdit ? [{
|
|
579
670
|
title: '操作',
|
|
580
671
|
dataIndex: 'set',
|
|
@@ -587,12 +678,26 @@ var PageInfo = function PageInfo(props) {
|
|
|
587
678
|
index: index
|
|
588
679
|
});
|
|
589
680
|
}
|
|
590
|
-
}] : [{
|
|
681
|
+
}] : [{
|
|
682
|
+
title: '操作',
|
|
683
|
+
dataIndex: 'record',
|
|
684
|
+
width: 72,
|
|
685
|
+
fixed: 'right',
|
|
686
|
+
render: function render(_, record, index) {
|
|
687
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
688
|
+
size: 'small',
|
|
689
|
+
type: "link",
|
|
690
|
+
onClick: function onClick() {
|
|
691
|
+
recordOpen(record);
|
|
692
|
+
}
|
|
693
|
+
}, ' ', "\u65E5\u5FD7", ' ');
|
|
694
|
+
}
|
|
695
|
+
}]));
|
|
591
696
|
var DealDom = function DealDom(props) {
|
|
592
|
-
var
|
|
593
|
-
|
|
594
|
-
open =
|
|
595
|
-
setOpen =
|
|
697
|
+
var _useState61 = useState(false),
|
|
698
|
+
_useState62 = _slicedToArray(_useState61, 2),
|
|
699
|
+
open = _useState62[0],
|
|
700
|
+
setOpen = _useState62[1];
|
|
596
701
|
var handleOpenChange = function handleOpenChange(newOpen) {
|
|
597
702
|
setOpen(newOpen);
|
|
598
703
|
};
|
|
@@ -639,10 +744,10 @@ var PageInfo = function PageInfo(props) {
|
|
|
639
744
|
}
|
|
640
745
|
}, "\u79FB\u9664"));
|
|
641
746
|
};
|
|
642
|
-
var
|
|
643
|
-
|
|
644
|
-
scrollY =
|
|
645
|
-
setScrollY =
|
|
747
|
+
var _useState63 = useState(''),
|
|
748
|
+
_useState64 = _slicedToArray(_useState63, 2),
|
|
749
|
+
scrollY = _useState64[0],
|
|
750
|
+
setScrollY = _useState64[1];
|
|
646
751
|
//页面加载完成后才能获取到对应的元素及其位置
|
|
647
752
|
var onClose = function onClose() {
|
|
648
753
|
if (isChange) {
|
|
@@ -745,6 +850,10 @@ var PageInfo = function PageInfo(props) {
|
|
|
745
850
|
setIsShowBack(false);
|
|
746
851
|
};
|
|
747
852
|
var addNewEvent = function addNewEvent() {
|
|
853
|
+
//新埋点管理
|
|
854
|
+
// setMetaData(undefined);
|
|
855
|
+
// setCreateMetaShow(true);
|
|
856
|
+
//老埋点
|
|
748
857
|
setEventAttrList([{
|
|
749
858
|
eventId: void 0,
|
|
750
859
|
eventName: '',
|
|
@@ -759,6 +868,36 @@ var PageInfo = function PageInfo(props) {
|
|
|
759
868
|
setShowIndex(void 0);
|
|
760
869
|
}, 3000);
|
|
761
870
|
};
|
|
871
|
+
//设置新添加的元事件
|
|
872
|
+
var onEventSet = function onEventSet(data, type) {
|
|
873
|
+
if (type == 'create') {
|
|
874
|
+
setEventAttrList([{
|
|
875
|
+
eventId: data.eventId,
|
|
876
|
+
eventName: data.eventName,
|
|
877
|
+
triggeringOccasion: data.triggeringOccasion,
|
|
878
|
+
aliasName: data.aliasName,
|
|
879
|
+
describe: '',
|
|
880
|
+
pointSelect: '',
|
|
881
|
+
imgPath: '',
|
|
882
|
+
index: eventAttrList.length,
|
|
883
|
+
key: new Date() * 1,
|
|
884
|
+
eventAttrList: data.eventAttrList
|
|
885
|
+
}].concat(_toConsumableArray(eventAttrList)));
|
|
886
|
+
setShowIndex(eventAttrList.length);
|
|
887
|
+
setTimeout(function () {
|
|
888
|
+
setShowIndex(void 0);
|
|
889
|
+
}, 3000);
|
|
890
|
+
} else {
|
|
891
|
+
setEventAttrList(eventAttrList.map(function (res) {
|
|
892
|
+
return res.eventId == data.eventId ? data : res;
|
|
893
|
+
}));
|
|
894
|
+
}
|
|
895
|
+
};
|
|
896
|
+
//打开日志
|
|
897
|
+
var recordOpen = function recordOpen(row) {
|
|
898
|
+
setRecordShow(true);
|
|
899
|
+
setEventData(row);
|
|
900
|
+
};
|
|
762
901
|
return /*#__PURE__*/React.createElement("div", {
|
|
763
902
|
className: "".concat(classPrefix)
|
|
764
903
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -930,7 +1069,6 @@ var PageInfo = function PageInfo(props) {
|
|
|
930
1069
|
}), "\u6DFB\u52A0\u9875\u9762\u57CB\u70B9")))), /*#__PURE__*/React.createElement(Table, {
|
|
931
1070
|
className: "".concat(classPrefix, "-table"),
|
|
932
1071
|
rowClassName: function rowClassName(record) {
|
|
933
|
-
console.log('rowClassName', record);
|
|
934
1072
|
return record.index === showIndex ? 'isShowF2F3F4' : '';
|
|
935
1073
|
},
|
|
936
1074
|
// id="dataManageCreateMetaTable"
|
|
@@ -980,6 +1118,31 @@ var PageInfo = function PageInfo(props) {
|
|
|
980
1118
|
imgPath: eventAttrList[selectIndex].imgPath || imgPath,
|
|
981
1119
|
bgImgPath: imgPath,
|
|
982
1120
|
onChange: setCircleImg
|
|
983
|
-
})))
|
|
1121
|
+
}))), /*#__PURE__*/React.createElement(Drawer, {
|
|
1122
|
+
className: "".concat(classPrefix, "-drawer"),
|
|
1123
|
+
width: '60%',
|
|
1124
|
+
title: /*#__PURE__*/React.createElement("div", null, "\u57CB\u70B9\u65E5\u5FD7"),
|
|
1125
|
+
placement: "right",
|
|
1126
|
+
destroyOnClose: true,
|
|
1127
|
+
onClose: function onClose() {
|
|
1128
|
+
return setRecordShow(false);
|
|
1129
|
+
},
|
|
1130
|
+
open: recordShow
|
|
1131
|
+
}, /*#__PURE__*/React.createElement(RecordDom, {
|
|
1132
|
+
eventId: eventData.eventId,
|
|
1133
|
+
eventName: eventData.eventName
|
|
1134
|
+
})), /*#__PURE__*/React.createElement(CreateMetaDrawer, {
|
|
1135
|
+
isShow: createMetaShow,
|
|
1136
|
+
data: metaData,
|
|
1137
|
+
isEdit: isEdit,
|
|
1138
|
+
onSubmit: function onSubmit(event, type) {
|
|
1139
|
+
setCreateMetaShow(false);
|
|
1140
|
+
onEventSet(event, type);
|
|
1141
|
+
},
|
|
1142
|
+
// selectTreeName={props.selectTreeName}
|
|
1143
|
+
onClose: function onClose() {
|
|
1144
|
+
return setCreateMetaShow(false);
|
|
1145
|
+
}
|
|
1146
|
+
}));
|
|
984
1147
|
};
|
|
985
1148
|
export default PageInfo;
|