@zgfe/modules-dm 1.0.56-zhongyuan.36 → 1.0.56-zhongyuan.39
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/dataManage/components/panelList.d.ts +6 -0
- package/es/modules/dataManage/components/panelList.js +161 -0
- package/es/modules/dataManage/components/tablePlus.js +111 -5
- package/es/modules/dataManage/styles/index.less +1205 -1200
- package/es/modules/dataReal/index1.js +3 -25
- package/package.json +2 -2
package/es/constants/api.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ declare let apis: {
|
|
|
14
14
|
queryPropDict: string;
|
|
15
15
|
getAllPlan: string;
|
|
16
16
|
queryPlanDetail: string;
|
|
17
|
+
offlineEvent: string;
|
|
17
18
|
savePlan: string;
|
|
18
19
|
deletePlan: string;
|
|
19
20
|
deletePlanEvent: string;
|
|
@@ -62,6 +63,7 @@ declare let apis: {
|
|
|
62
63
|
exportData: string;
|
|
63
64
|
updateMaidian: string;
|
|
64
65
|
updateRemark: string;
|
|
66
|
+
eventCite: string;
|
|
65
67
|
dataMap: {
|
|
66
68
|
saveMap: string;
|
|
67
69
|
getList: string;
|
package/es/constants/api.js
CHANGED
|
@@ -29,6 +29,8 @@ var apis = {
|
|
|
29
29
|
getAllPlan: '/zg/web/v2/managementPlan/getAllPlan',
|
|
30
30
|
// 埋点方案管理-查询埋点方案详情
|
|
31
31
|
queryPlanDetail: '/zg/web/v2/managementPlan/queryPlan',
|
|
32
|
+
// 埋点方案管理-下线
|
|
33
|
+
offlineEvent: '/zg/web/v2/event/offlineEvent',
|
|
32
34
|
// 埋点方案管理-保存
|
|
33
35
|
savePlan: '/zg/web/v2/managementPlan/savePlan',
|
|
34
36
|
// 埋点方案管理-删除埋点方案
|
|
@@ -121,6 +123,8 @@ var apis = {
|
|
|
121
123
|
updateMaidian: '/zg/web/v2/event/update/platform',
|
|
122
124
|
// 原事件-修改备注
|
|
123
125
|
updateRemark: '/zg/web/v2/event/update/remark',
|
|
126
|
+
//看板引用列表
|
|
127
|
+
eventCite: '/zg/web/v2/event/eventCite',
|
|
124
128
|
// 全埋点地图
|
|
125
129
|
dataMap: {
|
|
126
130
|
saveMap: '/zg/web/v2/burying-point-map/save',
|
|
@@ -0,0 +1,161 @@
|
|
|
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
|
+
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
|
+
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 _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; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
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); }
|
|
7
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
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."); }
|
|
9
|
+
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; } }
|
|
10
|
+
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; }
|
|
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
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
13
|
+
import React, { useState, useEffect, useContext } from 'react';
|
|
14
|
+
import { BizGlobalDataContext } from '@zgfe/business-lib';
|
|
15
|
+
import { Table, Tooltip, Button } from 'antd';
|
|
16
|
+
import request from '../../../utils/ajax';
|
|
17
|
+
import apis from '../../../constants/api';
|
|
18
|
+
import { getAppID, getTableScroll } from '../../../utils';
|
|
19
|
+
import '../styles/index.less';
|
|
20
|
+
var classPrefix = 'data-manage';
|
|
21
|
+
var getPanel = function getPanel() {};
|
|
22
|
+
var panelList = function panelList(props) {
|
|
23
|
+
var _useContext = useContext(BizGlobalDataContext),
|
|
24
|
+
currentApp = _useContext.currentApp,
|
|
25
|
+
router = _useContext.router,
|
|
26
|
+
routes = _useContext.routes;
|
|
27
|
+
var _useState = useState(false),
|
|
28
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
29
|
+
loading = _useState2[0],
|
|
30
|
+
setLoading = _useState2[1];
|
|
31
|
+
var _useState3 = useState(props === null || props === void 0 ? void 0 : props.eventId),
|
|
32
|
+
_useState4 = _slicedToArray(_useState3, 1),
|
|
33
|
+
eventId = _useState4[0];
|
|
34
|
+
// 表格列
|
|
35
|
+
var columns = [{
|
|
36
|
+
title: '看板名称',
|
|
37
|
+
dataIndex: 'name',
|
|
38
|
+
fixed: 'left',
|
|
39
|
+
width: 200,
|
|
40
|
+
render: function render(text) {
|
|
41
|
+
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
42
|
+
title: text || '',
|
|
43
|
+
placement: "top"
|
|
44
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
45
|
+
className: "".concat(classPrefix, "-text")
|
|
46
|
+
}, text));
|
|
47
|
+
}
|
|
48
|
+
}, {
|
|
49
|
+
title: '创建人',
|
|
50
|
+
dataIndex: 'userName',
|
|
51
|
+
width: 150,
|
|
52
|
+
render: function render(text) {
|
|
53
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
54
|
+
type: "link",
|
|
55
|
+
style: {
|
|
56
|
+
padding: 0
|
|
57
|
+
}
|
|
58
|
+
}, text);
|
|
59
|
+
}
|
|
60
|
+
}, {
|
|
61
|
+
title: '引用时间',
|
|
62
|
+
dataIndex: 'createDateTime',
|
|
63
|
+
width: 180,
|
|
64
|
+
render: function render(text) {
|
|
65
|
+
return text;
|
|
66
|
+
}
|
|
67
|
+
}, {
|
|
68
|
+
title: '看板类型',
|
|
69
|
+
dataIndex: 'chartType',
|
|
70
|
+
width: 150,
|
|
71
|
+
render: function render(text) {
|
|
72
|
+
return text;
|
|
73
|
+
}
|
|
74
|
+
}, {
|
|
75
|
+
title: '看板链接',
|
|
76
|
+
dataIndex: 'id',
|
|
77
|
+
width: 150,
|
|
78
|
+
render: function render(text) {
|
|
79
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
80
|
+
type: "link",
|
|
81
|
+
style: {
|
|
82
|
+
padding: 0
|
|
83
|
+
},
|
|
84
|
+
onClick: function onClick() {
|
|
85
|
+
routerPanel(text);
|
|
86
|
+
}
|
|
87
|
+
}, ' ', "\u94FE\u63A5", ' ');
|
|
88
|
+
}
|
|
89
|
+
}];
|
|
90
|
+
// 用户属性列表
|
|
91
|
+
var _useState5 = useState([]),
|
|
92
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
93
|
+
userAttrData = _useState6[0],
|
|
94
|
+
setUserAttrData = _useState6[1];
|
|
95
|
+
var _useState7 = useState(''),
|
|
96
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
97
|
+
scrollY = _useState8[0],
|
|
98
|
+
setScrollY = _useState8[1];
|
|
99
|
+
//页面加载完成后才能获取到对应的元素及其位置
|
|
100
|
+
useEffect(function () {
|
|
101
|
+
var _Y = getTableScroll(60, 'dataManageAttrTable');
|
|
102
|
+
setScrollY(_Y);
|
|
103
|
+
}, []);
|
|
104
|
+
useEffect(function () {
|
|
105
|
+
//列表查询
|
|
106
|
+
eventCiteEvent();
|
|
107
|
+
}, [eventId]);
|
|
108
|
+
var chartTypeName = {
|
|
109
|
+
line: '折线图',
|
|
110
|
+
bar: '柱形图',
|
|
111
|
+
pie: '饼图',
|
|
112
|
+
number: '数值',
|
|
113
|
+
grid: '表格'
|
|
114
|
+
};
|
|
115
|
+
//查询看板列表
|
|
116
|
+
var eventCiteEvent = function eventCiteEvent() {
|
|
117
|
+
request(apis.eventCite, {
|
|
118
|
+
method: 'post',
|
|
119
|
+
data: {
|
|
120
|
+
eventId: eventId,
|
|
121
|
+
appId: getAppID(currentApp),
|
|
122
|
+
platform: (currentApp === null || currentApp === void 0 ? void 0 : currentApp.platform) || 0
|
|
123
|
+
}
|
|
124
|
+
}).then(function (res) {
|
|
125
|
+
if (res.code == '100000' && res.data) {
|
|
126
|
+
var data = res.data.map(function (res) {
|
|
127
|
+
var list = res.chartType.split(',');
|
|
128
|
+
var text = '';
|
|
129
|
+
list.map(function (item) {
|
|
130
|
+
text += chartTypeName[item] + ',';
|
|
131
|
+
});
|
|
132
|
+
return _objectSpread(_objectSpread({}, res), {}, {
|
|
133
|
+
chartType: text.slice(0, text.length - 1)
|
|
134
|
+
});
|
|
135
|
+
});
|
|
136
|
+
setUserAttrData(data || []);
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
};
|
|
140
|
+
var routerPanel = function routerPanel(id) {
|
|
141
|
+
router.push({
|
|
142
|
+
name: routes.panel,
|
|
143
|
+
params: {
|
|
144
|
+
panelId: id
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
};
|
|
148
|
+
return /*#__PURE__*/React.createElement(Table, {
|
|
149
|
+
className: "".concat(classPrefix, "-record-table"),
|
|
150
|
+
columns: columns,
|
|
151
|
+
id: 'dataManageAttrTable',
|
|
152
|
+
rowKey: "name",
|
|
153
|
+
loading: loading,
|
|
154
|
+
scroll: {
|
|
155
|
+
y: scrollY
|
|
156
|
+
},
|
|
157
|
+
dataSource: userAttrData,
|
|
158
|
+
pagination: false
|
|
159
|
+
});
|
|
160
|
+
};
|
|
161
|
+
export default panelList;
|
|
@@ -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 { BizGlobalDataContext, IconFont } from '@zgfe/business-lib';
|
|
21
|
-
import { Input, Table, Select, message, Modal, Popover, Space, Radio, Checkbox, Form, Button, notification, Typography, Tag } from 'antd';
|
|
21
|
+
import { Input, Table, Select, message, Modal, Popover, Space, Radio, Checkbox, Form, Button, notification, Typography, Tag, Drawer } from 'antd';
|
|
22
22
|
import request from '../../../utils/ajax';
|
|
23
23
|
import apis from '../../../constants/api';
|
|
24
24
|
import React, { useEffect, useState, useContext } from 'react';
|
|
@@ -26,6 +26,7 @@ import '../styles/index.less';
|
|
|
26
26
|
import _ from 'lodash';
|
|
27
27
|
import { getAppID, getTableScroll } from '../../../utils';
|
|
28
28
|
import { DmContext } from '../../../store';
|
|
29
|
+
import PanelList from './panelList';
|
|
29
30
|
var Text = Typography.Text;
|
|
30
31
|
var TablePlus = function TablePlus(props) {
|
|
31
32
|
var classPrefix = 'table-plus';
|
|
@@ -908,6 +909,22 @@ var TablePlus = function TablePlus(props) {
|
|
|
908
909
|
className: "insert_time"
|
|
909
910
|
}, text);
|
|
910
911
|
}
|
|
912
|
+
}, {
|
|
913
|
+
title: '看板引用次数',
|
|
914
|
+
dataIndex: 'panelCount',
|
|
915
|
+
width: 150,
|
|
916
|
+
render: function render(panelCount, record) {
|
|
917
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
918
|
+
type: "link",
|
|
919
|
+
style: {
|
|
920
|
+
padding: 0
|
|
921
|
+
},
|
|
922
|
+
onClick: function onClick() {
|
|
923
|
+
setPanelShow(true);
|
|
924
|
+
setCurrentRow(record);
|
|
925
|
+
}
|
|
926
|
+
}, ' ', panelCount || 0, ' ');
|
|
927
|
+
}
|
|
911
928
|
}, {
|
|
912
929
|
title: '创建时间',
|
|
913
930
|
dataIndex: 'create_date_time',
|
|
@@ -1000,14 +1017,67 @@ var TablePlus = function TablePlus(props) {
|
|
|
1000
1017
|
}
|
|
1001
1018
|
eventItemDel(record);
|
|
1002
1019
|
}
|
|
1003
|
-
}, ' ', "\u5220\u9664")
|
|
1020
|
+
}, ' ', "\u5220\u9664"), /*#__PURE__*/React.createElement(Button, {
|
|
1021
|
+
type: "link",
|
|
1022
|
+
style: {
|
|
1023
|
+
padding: 0
|
|
1024
|
+
},
|
|
1025
|
+
disabled: isDemo || !authority[1000004],
|
|
1026
|
+
// className={`set ${record.owner == 'zg_abp' ? 'set-error' : ''}`}
|
|
1027
|
+
onClick: function onClick() {
|
|
1028
|
+
if (isDemo || !authority[1000004]) {
|
|
1029
|
+
message.error('无修改权限');
|
|
1030
|
+
return;
|
|
1031
|
+
}
|
|
1032
|
+
setCurrentRow(record);
|
|
1033
|
+
setOfflineShow(true);
|
|
1034
|
+
}
|
|
1035
|
+
}, ' ', "\u4E0B\u7EBF")));
|
|
1004
1036
|
}
|
|
1005
1037
|
}
|
|
1006
1038
|
}];
|
|
1007
|
-
|
|
1039
|
+
//看板引用次数
|
|
1040
|
+
var _useState41 = useState(false),
|
|
1008
1041
|
_useState42 = _slicedToArray(_useState41, 2),
|
|
1009
|
-
|
|
1010
|
-
|
|
1042
|
+
panelShow = _useState42[0],
|
|
1043
|
+
setPanelShow = _useState42[1];
|
|
1044
|
+
//下线功能
|
|
1045
|
+
var _useState43 = useState(false),
|
|
1046
|
+
_useState44 = _slicedToArray(_useState43, 2),
|
|
1047
|
+
offlineShow = _useState44[0],
|
|
1048
|
+
setOfflineShow = _useState44[1];
|
|
1049
|
+
var _useState45 = useState(''),
|
|
1050
|
+
_useState46 = _slicedToArray(_useState45, 2),
|
|
1051
|
+
offlineText = _useState46[0],
|
|
1052
|
+
setOfflineText = _useState46[1];
|
|
1053
|
+
//功能下线
|
|
1054
|
+
var offlineEvent = function offlineEvent() {
|
|
1055
|
+
request(apis.offlineEvent, {
|
|
1056
|
+
method: 'post',
|
|
1057
|
+
data: {
|
|
1058
|
+
eventId: currentRow === null || currentRow === void 0 ? void 0 : currentRow.event_id,
|
|
1059
|
+
appId: getAppID(currentApp),
|
|
1060
|
+
reason: offlineText
|
|
1061
|
+
}
|
|
1062
|
+
}).then(function (res) {
|
|
1063
|
+
if (res.code == '100000') {
|
|
1064
|
+
notification.success({
|
|
1065
|
+
message: '下线成功'
|
|
1066
|
+
});
|
|
1067
|
+
setOfflineText('');
|
|
1068
|
+
setOfflineShow(false);
|
|
1069
|
+
props.Refresh();
|
|
1070
|
+
return;
|
|
1071
|
+
}
|
|
1072
|
+
notification.error({
|
|
1073
|
+
message: res === null || res === void 0 ? void 0 : res.msg
|
|
1074
|
+
});
|
|
1075
|
+
});
|
|
1076
|
+
};
|
|
1077
|
+
var _useState47 = useState(''),
|
|
1078
|
+
_useState48 = _slicedToArray(_useState47, 2),
|
|
1079
|
+
scrollY = _useState48[0],
|
|
1080
|
+
setScrollY = _useState48[1];
|
|
1011
1081
|
//页面加载完成后才能获取到对应的元素及其位置
|
|
1012
1082
|
useEffect(function () {
|
|
1013
1083
|
var _Y = getTableScroll(102, 'dataManageTablePlus');
|
|
@@ -1194,6 +1264,42 @@ var TablePlus = function TablePlus(props) {
|
|
|
1194
1264
|
onChange: function onChange(e) {
|
|
1195
1265
|
setTriggeringInput(e.target.value);
|
|
1196
1266
|
}
|
|
1267
|
+
})), /*#__PURE__*/React.createElement(Drawer, {
|
|
1268
|
+
className: "".concat(classPrefix, "-drawer"),
|
|
1269
|
+
width: '50%',
|
|
1270
|
+
title: /*#__PURE__*/React.createElement("div", null, "\u770B\u677F\u5F15\u7528\u6B21\u6570"),
|
|
1271
|
+
placement: "right",
|
|
1272
|
+
destroyOnClose: true,
|
|
1273
|
+
onClose: function onClose() {
|
|
1274
|
+
return setPanelShow(false);
|
|
1275
|
+
},
|
|
1276
|
+
open: panelShow
|
|
1277
|
+
}, /*#__PURE__*/React.createElement(PanelList, {
|
|
1278
|
+
eventId: currentRow === null || currentRow === void 0 ? void 0 : currentRow.event_id
|
|
1279
|
+
})), /*#__PURE__*/React.createElement(Modal, {
|
|
1280
|
+
title: "\u8BF7\u586B\u5199\u4E0B\u7EBF\u539F\u56E0",
|
|
1281
|
+
centered: true,
|
|
1282
|
+
okText: "\u786E\u5B9A",
|
|
1283
|
+
open: offlineShow,
|
|
1284
|
+
onOk: offlineEvent,
|
|
1285
|
+
onCancel: function onCancel() {
|
|
1286
|
+
setOfflineText('');
|
|
1287
|
+
setOfflineShow(false);
|
|
1288
|
+
},
|
|
1289
|
+
width: 520,
|
|
1290
|
+
destroyOnClose: true
|
|
1291
|
+
}, /*#__PURE__*/React.createElement(Input.TextArea, {
|
|
1292
|
+
value: offlineText,
|
|
1293
|
+
showCount: true,
|
|
1294
|
+
maxLength: 100,
|
|
1295
|
+
onChange: function onChange(val) {
|
|
1296
|
+
setOfflineText(val.currentTarget.value);
|
|
1297
|
+
},
|
|
1298
|
+
placeholder: "\u4E0B\u7EBF\u539F\u56E0.....",
|
|
1299
|
+
style: {
|
|
1300
|
+
height: 120,
|
|
1301
|
+
resize: 'none'
|
|
1302
|
+
}
|
|
1197
1303
|
})));
|
|
1198
1304
|
};
|
|
1199
1305
|
export default TablePlus;
|