@zgfe/modules-dm 1.0.34 → 1.0.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/components/demo.js +2 -1
- package/es/constants/api.d.ts +10 -0
- package/es/constants/api.js +25 -12
- package/es/modules/dataCollection/collectionAttributeList.js +32 -20
- package/es/modules/dataCollection/collectionEventList.js +62 -87
- package/es/modules/dataCollection/components/createVirtualDrawer.d.ts +4 -0
- package/es/modules/dataCollection/components/createVirtualDrawer.js +279 -0
- package/es/modules/dataCollection/components/eventFilter/index.d.ts +5 -0
- package/es/modules/dataCollection/components/eventFilter/index.js +154 -0
- package/es/modules/dataCollection/components/eventFilter/styles/index.less +72 -0
- package/es/modules/dataCollection/components/eventFilter/types.d.ts +52 -0
- package/es/modules/dataCollection/components/eventFilter/types.js +1 -0
- package/es/modules/dataCollection/components/eventGroupingDrawer.d.ts +4 -0
- package/es/modules/dataCollection/components/eventGroupingDrawer.js +452 -0
- package/es/modules/dataCollection/components/eventItem.d.ts +3 -0
- package/es/modules/dataCollection/components/eventItem.js +53 -0
- package/es/modules/dataCollection/components/selectAttributes.d.ts +3 -0
- package/es/modules/dataCollection/components/selectAttributes.js +219 -0
- package/es/modules/dataCollection/{tablePlus.d.ts → components/tablePlus.d.ts} +2 -1
- package/es/modules/dataCollection/{tablePlus.js → components/tablePlus.js} +162 -143
- package/es/modules/dataCollection/components/virtualTablePlus.d.ts +5 -0
- package/es/modules/dataCollection/components/virtualTablePlus.js +400 -0
- package/es/modules/dataCollection/index.js +7 -6
- package/es/modules/dataCollection/styles/index.less +535 -20
- package/es/modules/dataCollection/types.d.ts +78 -0
- package/es/modules/dataCollection/types.js +1 -0
- package/es/modules/dataCollection/virtualEventList.d.ts +4 -0
- package/es/modules/dataCollection/virtualEventList.js +343 -0
- package/es/modules/dataManage/demo/index.js +16 -12
- package/es/modules/dataPlan/addEventOrUser.js +1 -2
- package/es/modules/dataPlan/addPlan.js +3 -12
- package/es/modules/dataPlan/eventList.js +0 -1
- package/es/modules/dataPlan/index.js +8 -9
- package/es/modules/dataPlan/tablePlus.js +0 -1
- package/es/modules/dataPlan/userAttributeList.js +0 -1
- package/es/utils/index.d.ts +49 -0
- package/es/utils/index.js +314 -0
- package/package.json +6 -4
- package/es/modules/dataCollection/demo/index.d.ts +0 -2
- package/es/modules/dataCollection/demo/index.js +0 -7
- package/es/modules/dataPlan/demo/index.d.ts +0 -2
- package/es/modules/dataPlan/demo/index.js +0 -6
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/**
|
|
3
|
+
* 虚拟事件基础属性
|
|
4
|
+
*/
|
|
5
|
+
export interface VirtualEventBase {
|
|
6
|
+
aliasName: string;
|
|
7
|
+
bindEvent: string;
|
|
8
|
+
createUser: string;
|
|
9
|
+
description: string;
|
|
10
|
+
eventName: string;
|
|
11
|
+
insertTime: number;
|
|
12
|
+
updateTime: number;
|
|
13
|
+
lastInsertTime: number;
|
|
14
|
+
isStop: number;
|
|
15
|
+
markType: number;
|
|
16
|
+
owner: string;
|
|
17
|
+
}
|
|
18
|
+
export interface eventJsonProps {
|
|
19
|
+
eventId: number;
|
|
20
|
+
eventName: string;
|
|
21
|
+
owner: string;
|
|
22
|
+
}
|
|
23
|
+
export interface VirtualEventProps extends VirtualEventBase {
|
|
24
|
+
eventGroupId: number;
|
|
25
|
+
groupId?: number;
|
|
26
|
+
eventJson: eventJsonProps[];
|
|
27
|
+
id: number;
|
|
28
|
+
}
|
|
29
|
+
export interface DataType extends VirtualEventBase {
|
|
30
|
+
key: React.Key;
|
|
31
|
+
groupId?: number;
|
|
32
|
+
groupName?: string;
|
|
33
|
+
_groupId?: number;
|
|
34
|
+
}
|
|
35
|
+
export interface TableItemType {
|
|
36
|
+
groupId: number;
|
|
37
|
+
groupName: string;
|
|
38
|
+
eventList: [];
|
|
39
|
+
}
|
|
40
|
+
export interface GroupOptionsType {
|
|
41
|
+
value?: number;
|
|
42
|
+
label?: string;
|
|
43
|
+
}
|
|
44
|
+
export interface TablePlusType {
|
|
45
|
+
tableRenderData: DataType[];
|
|
46
|
+
editOrSeeVirtualEvent: Function;
|
|
47
|
+
refresh: Function;
|
|
48
|
+
markTypeFilter: Function;
|
|
49
|
+
loading: boolean;
|
|
50
|
+
}
|
|
51
|
+
export interface CreateVirtualDrawerProps {
|
|
52
|
+
createVirtualShow: boolean;
|
|
53
|
+
setCreateVirtualShow: Function;
|
|
54
|
+
editVirtualEventData: VirtualEventProps;
|
|
55
|
+
virtualDrawerType: 'create' | 'edit' | 'see';
|
|
56
|
+
groupOptions: GroupOptionsType[];
|
|
57
|
+
refresh: Function;
|
|
58
|
+
}
|
|
59
|
+
export interface DelectAttributesDataProps {
|
|
60
|
+
name: string;
|
|
61
|
+
id: number;
|
|
62
|
+
attrList: {
|
|
63
|
+
ofEventId: number[];
|
|
64
|
+
}[];
|
|
65
|
+
}
|
|
66
|
+
export interface SubmitDataProps {
|
|
67
|
+
aliasName: string;
|
|
68
|
+
desc: string;
|
|
69
|
+
eventGroupId: number;
|
|
70
|
+
eventName: string;
|
|
71
|
+
eventJson: eventJsonProps[];
|
|
72
|
+
}
|
|
73
|
+
export interface EventGroupingDrawerProps {
|
|
74
|
+
eventGroupingShow: boolean;
|
|
75
|
+
setEventGroupingShow: Function;
|
|
76
|
+
refresh: Function;
|
|
77
|
+
source: 'virtual' | 'collection';
|
|
78
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,343 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
7
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _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(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
10
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
11
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
12
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
|
+
import { BizGlobalDataContext, IconFont } from '@zgfe/business-lib';
|
|
14
|
+
import { Input, Button, Select, Modal, message, Pagination } from 'antd';
|
|
15
|
+
import request from '../../utils/ajax';
|
|
16
|
+
import apis from '../../constants/api';
|
|
17
|
+
import React, { useEffect, useState, useContext } from 'react';
|
|
18
|
+
import './styles/index.less';
|
|
19
|
+
import VirtualTablePlus from './components/virtualTablePlus';
|
|
20
|
+
import CreateVirtualDrawer from './components/createVirtualDrawer';
|
|
21
|
+
import EventGroupingDrawer from './components/eventGroupingDrawer';
|
|
22
|
+
import { getAppID } from '../../utils';
|
|
23
|
+
import { DmContext } from '../../store';
|
|
24
|
+
var VirtualEventList = function VirtualEventList() {
|
|
25
|
+
var classPrefix = 'virtual-event-list';
|
|
26
|
+
// 创建虚拟事件弹窗,true展示
|
|
27
|
+
var _useState = useState(false),
|
|
28
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
29
|
+
createVirtualShow = _useState2[0],
|
|
30
|
+
setCreateVirtualShow = _useState2[1];
|
|
31
|
+
// 虚拟事件抽屉类型
|
|
32
|
+
var _useState3 = useState('create'),
|
|
33
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
34
|
+
virtualDrawerType = _useState4[0],
|
|
35
|
+
setvirtualDrawerType = _useState4[1];
|
|
36
|
+
// 事件分组管理
|
|
37
|
+
var _useState5 = useState(false),
|
|
38
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
39
|
+
eventGroupingShow = _useState6[0],
|
|
40
|
+
setEventGroupingShow = _useState6[1];
|
|
41
|
+
var _useContext = useContext(BizGlobalDataContext),
|
|
42
|
+
currentApp = _useContext.currentApp,
|
|
43
|
+
authority = _useContext.authority;
|
|
44
|
+
var _useContext2 = useContext(DmContext),
|
|
45
|
+
state = _useContext2.state;
|
|
46
|
+
var _useState7 = useState([]),
|
|
47
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
48
|
+
tableRenderData = _useState8[0],
|
|
49
|
+
setTableRenderData = _useState8[1];
|
|
50
|
+
var _useState9 = useState(1),
|
|
51
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
52
|
+
pageNumber = _useState10[0],
|
|
53
|
+
setPageNumber = _useState10[1];
|
|
54
|
+
var _useState11 = useState(10),
|
|
55
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
56
|
+
pageSize = _useState12[0],
|
|
57
|
+
setPageSize = _useState12[1];
|
|
58
|
+
var _useState13 = useState(0),
|
|
59
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
60
|
+
total = _useState14[0],
|
|
61
|
+
setTotal = _useState14[1];
|
|
62
|
+
// 模糊搜索 - 事件名称
|
|
63
|
+
var _useState15 = useState(''),
|
|
64
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
65
|
+
eventNameChangeData = _useState16[0],
|
|
66
|
+
setEventNameChangeData = _useState16[1];
|
|
67
|
+
// 筛选条件 - 收藏 1收藏 0未收藏
|
|
68
|
+
var _useState17 = useState(0),
|
|
69
|
+
_useState18 = _slicedToArray(_useState17, 2),
|
|
70
|
+
markTypeData = _useState18[0],
|
|
71
|
+
setMarkTypeData = _useState18[1];
|
|
72
|
+
// 筛选条件 - 分组ID
|
|
73
|
+
var _useState19 = useState(-999),
|
|
74
|
+
_useState20 = _slicedToArray(_useState19, 2),
|
|
75
|
+
groupIdData = _useState20[0],
|
|
76
|
+
setGroupIdData = _useState20[1];
|
|
77
|
+
// 加载中
|
|
78
|
+
var _useState21 = useState(true),
|
|
79
|
+
_useState22 = _slicedToArray(_useState21, 2),
|
|
80
|
+
loading = _useState22[0],
|
|
81
|
+
setLoading = _useState22[1];
|
|
82
|
+
// 控制修改分组名弹框 显示隐藏
|
|
83
|
+
var _useState23 = useState(false),
|
|
84
|
+
_useState24 = _slicedToArray(_useState23, 2),
|
|
85
|
+
eventNameShow = _useState24[0],
|
|
86
|
+
setEventNameShow = _useState24[1];
|
|
87
|
+
var _useState25 = useState(''),
|
|
88
|
+
_useState26 = _slicedToArray(_useState25, 2),
|
|
89
|
+
eventNameInput = _useState26[0],
|
|
90
|
+
setEventNameInput = _useState26[1];
|
|
91
|
+
// 分组select数据
|
|
92
|
+
var _useState27 = useState([]),
|
|
93
|
+
_useState28 = _slicedToArray(_useState27, 2),
|
|
94
|
+
groupOptions = _useState28[0],
|
|
95
|
+
setGroupOptions = _useState28[1];
|
|
96
|
+
// 编辑或查看 虚拟事件
|
|
97
|
+
var _useState29 = useState({}),
|
|
98
|
+
_useState30 = _slicedToArray(_useState29, 2),
|
|
99
|
+
editVirtualEventData = _useState30[0],
|
|
100
|
+
setEditVirtualEventData = _useState30[1];
|
|
101
|
+
var editOrSeeVirtualEvent = function editOrSeeVirtualEvent(name, type) {
|
|
102
|
+
request(apis.queryVirtualEvent, {
|
|
103
|
+
method: 'get',
|
|
104
|
+
params: {
|
|
105
|
+
appId: getAppID(currentApp),
|
|
106
|
+
name: name
|
|
107
|
+
}
|
|
108
|
+
}).then(function (res) {
|
|
109
|
+
if (res && res.data) {
|
|
110
|
+
setEditVirtualEventData(res.data);
|
|
111
|
+
setvirtualDrawerType(type);
|
|
112
|
+
setCreateVirtualShow(true);
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
};
|
|
116
|
+
// 筛选分组
|
|
117
|
+
var handleSelectChange = function handleSelectChange(e) {
|
|
118
|
+
setPageNumber(1);
|
|
119
|
+
setGroupIdData(e);
|
|
120
|
+
};
|
|
121
|
+
// 筛选事件
|
|
122
|
+
var eventNameChange = function eventNameChange(e) {
|
|
123
|
+
setPageNumber(1);
|
|
124
|
+
setEventNameChangeData(e.currentTarget.value);
|
|
125
|
+
};
|
|
126
|
+
// 筛选收藏
|
|
127
|
+
var markTypeFilter = function markTypeFilter(markActive) {
|
|
128
|
+
setPageNumber(1);
|
|
129
|
+
setMarkTypeData(markActive ? 1 : 0);
|
|
130
|
+
};
|
|
131
|
+
// 获取虚拟事件列表
|
|
132
|
+
var queryList = function queryList() {
|
|
133
|
+
var _groupId = groupIdData !== -999 ? {
|
|
134
|
+
groupId: groupIdData
|
|
135
|
+
} : {};
|
|
136
|
+
var _markType = markTypeData === 1 ? {
|
|
137
|
+
markType: markTypeData
|
|
138
|
+
} : {};
|
|
139
|
+
request(apis.queryVirtualEventList, {
|
|
140
|
+
method: 'post',
|
|
141
|
+
data: _objectSpread(_objectSpread({
|
|
142
|
+
appId: getAppID(currentApp),
|
|
143
|
+
pageNo: pageNumber,
|
|
144
|
+
pageSize: pageSize,
|
|
145
|
+
eventName: eventNameChangeData
|
|
146
|
+
}, _markType), _groupId)
|
|
147
|
+
}).then(function (res) {
|
|
148
|
+
if (res && res.data && res.data.data) {
|
|
149
|
+
virtualEventListData(res.data.data);
|
|
150
|
+
setTotal(res.data.total);
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
request(apis.queryCollectionEventList, {
|
|
154
|
+
method: 'post',
|
|
155
|
+
data: {
|
|
156
|
+
appId: getAppID(currentApp),
|
|
157
|
+
platform: 0,
|
|
158
|
+
isAll: true
|
|
159
|
+
}
|
|
160
|
+
}).then(function (res) {
|
|
161
|
+
if (res && res.data) {
|
|
162
|
+
var _groupOptions = [{
|
|
163
|
+
value: -999,
|
|
164
|
+
label: '所有分组'
|
|
165
|
+
}];
|
|
166
|
+
res.data.map(function (item) {
|
|
167
|
+
_groupOptions.push({
|
|
168
|
+
value: item.groupId,
|
|
169
|
+
label: item.groupName == null ? '未分组' : item.groupName
|
|
170
|
+
});
|
|
171
|
+
});
|
|
172
|
+
setGroupOptions(_groupOptions);
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
};
|
|
176
|
+
// 获取最新列表数据
|
|
177
|
+
useEffect(function () {
|
|
178
|
+
queryList();
|
|
179
|
+
}, [eventNameChangeData, markTypeData, groupIdData, pageSize, pageNumber]);
|
|
180
|
+
// 处理表格数据
|
|
181
|
+
var virtualEventListData = function virtualEventListData(data) {
|
|
182
|
+
var _tempArr = [];
|
|
183
|
+
data.map(function (item, index) {
|
|
184
|
+
var _temp = {
|
|
185
|
+
key: index,
|
|
186
|
+
groupId: item.groupId,
|
|
187
|
+
groupName: item.groupName,
|
|
188
|
+
eventName: '',
|
|
189
|
+
aliasName: '',
|
|
190
|
+
insertTime: -1,
|
|
191
|
+
lastInsertTime: -1,
|
|
192
|
+
updateTime: -1,
|
|
193
|
+
markType: 0,
|
|
194
|
+
bindEvent: '',
|
|
195
|
+
description: '',
|
|
196
|
+
createUser: '',
|
|
197
|
+
isStop: -1,
|
|
198
|
+
owner: ''
|
|
199
|
+
};
|
|
200
|
+
// 有筛选条件时,空分组不展示
|
|
201
|
+
if (eventNameChangeData === '' && markTypeData === 0) {
|
|
202
|
+
_tempArr.push(_temp);
|
|
203
|
+
} else {
|
|
204
|
+
if (item.eventList.length > 0) {
|
|
205
|
+
_tempArr.push(_temp);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
item.eventList.map(function (_item, _index) {
|
|
209
|
+
_item._groupId = item.groupId;
|
|
210
|
+
_item.key = index + '-' + _index;
|
|
211
|
+
_tempArr.push(_item);
|
|
212
|
+
});
|
|
213
|
+
});
|
|
214
|
+
setTableRenderData(_tempArr);
|
|
215
|
+
setLoading(false);
|
|
216
|
+
};
|
|
217
|
+
// 创建事件分组
|
|
218
|
+
var createEventGroup = function createEventGroup() {
|
|
219
|
+
if (eventNameInput == '') {
|
|
220
|
+
message.error('请输入分组名称');
|
|
221
|
+
return;
|
|
222
|
+
}
|
|
223
|
+
request(apis.upsertEventGroup, {
|
|
224
|
+
method: 'post',
|
|
225
|
+
data: {
|
|
226
|
+
eventGroupName: eventNameInput,
|
|
227
|
+
appId: getAppID(currentApp),
|
|
228
|
+
platform: 0
|
|
229
|
+
}
|
|
230
|
+
}).then(function (res) {
|
|
231
|
+
if (res.code == '00') {
|
|
232
|
+
message.success('创建成功');
|
|
233
|
+
queryList();
|
|
234
|
+
setEventNameInput('');
|
|
235
|
+
setEventNameShow(false);
|
|
236
|
+
state.updateEventMetas && state.updateEventMetas(); // 更新store
|
|
237
|
+
}
|
|
238
|
+
});
|
|
239
|
+
};
|
|
240
|
+
// 分页处理
|
|
241
|
+
var onPaginationChange = function onPaginationChange(pageNumber, pageSize) {
|
|
242
|
+
setPageNumber(pageNumber);
|
|
243
|
+
setPageSize(pageSize);
|
|
244
|
+
};
|
|
245
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
246
|
+
className: classPrefix
|
|
247
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
248
|
+
className: "".concat(classPrefix, "-top-box")
|
|
249
|
+
}, groupOptions.length > 0 && /*#__PURE__*/React.createElement(Select, {
|
|
250
|
+
defaultValue: -999,
|
|
251
|
+
className: "top-select",
|
|
252
|
+
onChange: handleSelectChange,
|
|
253
|
+
options: groupOptions,
|
|
254
|
+
suffixIcon: /*#__PURE__*/React.createElement(IconFont, {
|
|
255
|
+
type: "xiangxia",
|
|
256
|
+
style: {
|
|
257
|
+
color: '#5f6085'
|
|
258
|
+
}
|
|
259
|
+
})
|
|
260
|
+
}), /*#__PURE__*/React.createElement(Input, {
|
|
261
|
+
className: "top-input",
|
|
262
|
+
onChange: eventNameChange,
|
|
263
|
+
placeholder: "\u8BF7\u8F93\u5165\u4E8B\u4EF6\u540D\u79F0\u6216\u522B\u540D",
|
|
264
|
+
prefix: /*#__PURE__*/React.createElement(IconFont, {
|
|
265
|
+
type: "sousuo"
|
|
266
|
+
})
|
|
267
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
268
|
+
className: "top-total"
|
|
269
|
+
}, "\u5171", /*#__PURE__*/React.createElement("span", null, total), "\u6761"), /*#__PURE__*/React.createElement("div", {
|
|
270
|
+
className: "top-button"
|
|
271
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
272
|
+
type: "primary",
|
|
273
|
+
shape: "round",
|
|
274
|
+
disabled: !authority[1700560606],
|
|
275
|
+
onClick: function onClick() {
|
|
276
|
+
setEditVirtualEventData({
|
|
277
|
+
eventJson: [{}]
|
|
278
|
+
});
|
|
279
|
+
setvirtualDrawerType('create');
|
|
280
|
+
setCreateVirtualShow(true);
|
|
281
|
+
}
|
|
282
|
+
}, "\u521B\u5EFA\u865A\u62DF\u4E8B\u4EF6"), /*#__PURE__*/React.createElement(Button, {
|
|
283
|
+
shape: "round",
|
|
284
|
+
disabled: !authority[1700636137],
|
|
285
|
+
onClick: function onClick() {
|
|
286
|
+
return setEventNameShow(true);
|
|
287
|
+
}
|
|
288
|
+
}, "\u521B\u5EFA\u4E8B\u4EF6\u5206\u7EC4"), /*#__PURE__*/React.createElement(Button, {
|
|
289
|
+
shape: "round",
|
|
290
|
+
disabled: !authority[1700636017],
|
|
291
|
+
onClick: function onClick() {
|
|
292
|
+
return setEventGroupingShow(true);
|
|
293
|
+
}
|
|
294
|
+
}, "\u4E8B\u4EF6\u5206\u7EC4\u7BA1\u7406"))), /*#__PURE__*/React.createElement(VirtualTablePlus, {
|
|
295
|
+
loading: loading,
|
|
296
|
+
tableRenderData: tableRenderData,
|
|
297
|
+
editOrSeeVirtualEvent: editOrSeeVirtualEvent,
|
|
298
|
+
refresh: queryList,
|
|
299
|
+
markTypeFilter: markTypeFilter
|
|
300
|
+
}), /*#__PURE__*/React.createElement(Pagination, {
|
|
301
|
+
style: {
|
|
302
|
+
textAlign: 'right'
|
|
303
|
+
},
|
|
304
|
+
showQuickJumper: true,
|
|
305
|
+
showSizeChanger: total > pageSize,
|
|
306
|
+
defaultCurrent: 1,
|
|
307
|
+
defaultPageSize: pageSize,
|
|
308
|
+
current: pageNumber,
|
|
309
|
+
total: total,
|
|
310
|
+
onChange: onPaginationChange
|
|
311
|
+
}), /*#__PURE__*/React.createElement(CreateVirtualDrawer, {
|
|
312
|
+
createVirtualShow: createVirtualShow,
|
|
313
|
+
setCreateVirtualShow: setCreateVirtualShow,
|
|
314
|
+
editVirtualEventData: editVirtualEventData,
|
|
315
|
+
virtualDrawerType: virtualDrawerType,
|
|
316
|
+
groupOptions: groupOptions,
|
|
317
|
+
refresh: queryList
|
|
318
|
+
}), /*#__PURE__*/React.createElement(EventGroupingDrawer, {
|
|
319
|
+
eventGroupingShow: eventGroupingShow,
|
|
320
|
+
setEventGroupingShow: setEventGroupingShow,
|
|
321
|
+
refresh: queryList,
|
|
322
|
+
source: 'virtual'
|
|
323
|
+
}), /*#__PURE__*/React.createElement(Modal, {
|
|
324
|
+
title: "\u521B\u5EFA\u5206\u7EC4",
|
|
325
|
+
className: "creact-group",
|
|
326
|
+
destroyOnClose: true,
|
|
327
|
+
getContainer: false,
|
|
328
|
+
open: eventNameShow,
|
|
329
|
+
onOk: createEventGroup,
|
|
330
|
+
onCancel: function onCancel() {
|
|
331
|
+
setEventNameShow(false);
|
|
332
|
+
setEventNameInput('');
|
|
333
|
+
}
|
|
334
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
335
|
+
placeholder: "\u8BF7\u8F93\u5165\u5206\u7EC4\u540D",
|
|
336
|
+
value: eventNameInput,
|
|
337
|
+
maxLength: 20,
|
|
338
|
+
onChange: function onChange(e) {
|
|
339
|
+
return setEventNameInput(e.currentTarget.value);
|
|
340
|
+
}
|
|
341
|
+
})));
|
|
342
|
+
};
|
|
343
|
+
export default VirtualEventList;
|
|
@@ -2,16 +2,20 @@ import React from 'react';
|
|
|
2
2
|
import { DataManage } from '@zgfe/modules-dm';
|
|
3
3
|
import DemoWrapper from '../../../components/demo';
|
|
4
4
|
export default (function () {
|
|
5
|
-
return /*#__PURE__*/React.createElement(DemoWrapper, null, /*#__PURE__*/React.createElement(DataManage
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
5
|
+
return /*#__PURE__*/React.createElement(DemoWrapper, null, /*#__PURE__*/React.createElement(DataManage
|
|
6
|
+
// extraTabs={[
|
|
7
|
+
// {
|
|
8
|
+
// key: 'aaa',
|
|
9
|
+
// label: '拓展菜单',
|
|
10
|
+
// children: <div>aaa</div>,
|
|
11
|
+
// },
|
|
12
|
+
// ]}
|
|
13
|
+
// extraSubTabs={[
|
|
14
|
+
// {
|
|
15
|
+
// key: 'bbb',
|
|
16
|
+
// label: '拓展二级菜单',
|
|
17
|
+
// children: <div>bbb</div>,
|
|
18
|
+
// },
|
|
19
|
+
// ]}
|
|
20
|
+
, null));
|
|
17
21
|
});
|
|
@@ -20,7 +20,6 @@ import './styles/index.less';
|
|
|
20
20
|
import _ from 'lodash';
|
|
21
21
|
var addEventOrUser = function addEventOrUser(props) {
|
|
22
22
|
var classPrefix = 'add-event';
|
|
23
|
-
// console.log('----', props.type, props.eventListData, props.userAttrData);
|
|
24
23
|
var _Form$useForm = Form.useForm(),
|
|
25
24
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
26
25
|
form = _Form$useForm2[0];
|
|
@@ -124,7 +123,7 @@ var addEventOrUser = function addEventOrUser(props) {
|
|
|
124
123
|
}
|
|
125
124
|
};
|
|
126
125
|
var tableColumnsPropsRender = function tableColumnsPropsRender(item) {
|
|
127
|
-
var render = function render(
|
|
126
|
+
var render = function render(_, record) {
|
|
128
127
|
return /*#__PURE__*/React.createElement(React.Fragment, null, item.dataIndex == 'set' ? /*#__PURE__*/React.createElement(React.Fragment, null, tableRowData.length <= 1 ? /*#__PURE__*/React.createElement(IconFont, {
|
|
129
128
|
className: "set-del set-del-err",
|
|
130
129
|
disabled: true,
|
|
@@ -23,18 +23,11 @@ import Search from './search';
|
|
|
23
23
|
import EventList from './eventList';
|
|
24
24
|
import UserAttributeList from './userAttributeList';
|
|
25
25
|
import AddEventOrUser from './addEventOrUser';
|
|
26
|
-
// interface addEventListType {
|
|
27
|
-
// key: string;
|
|
28
|
-
// eventName: string;
|
|
29
|
-
// attrName: string;
|
|
30
|
-
// sheetName: string | null;
|
|
31
|
-
// }
|
|
32
26
|
var AddPlan = function AddPlan(props) {
|
|
33
27
|
var classPrefix = 'add-plan';
|
|
34
28
|
var _useContext = useContext(BizGlobalDataContext),
|
|
35
29
|
currentApp = _useContext.currentApp,
|
|
36
30
|
isDemo = _useContext.isDemo;
|
|
37
|
-
// console.log('isDemo', isDemo);
|
|
38
31
|
var _useState = useState(false),
|
|
39
32
|
_useState2 = _slicedToArray(_useState, 2),
|
|
40
33
|
spinning = _useState2[0],
|
|
@@ -43,7 +36,6 @@ var AddPlan = function AddPlan(props) {
|
|
|
43
36
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
44
37
|
downloadingPlanTemp = _useState4[0],
|
|
45
38
|
setDownloadingPlanTemp = _useState4[1];
|
|
46
|
-
// console.log('detailId', props.detailId, props.detailName);
|
|
47
39
|
useEffect(function () {
|
|
48
40
|
setPlanName(props.detailName);
|
|
49
41
|
}, [props.detailName]);
|
|
@@ -57,9 +49,8 @@ var AddPlan = function AddPlan(props) {
|
|
|
57
49
|
id: props.detailId
|
|
58
50
|
}
|
|
59
51
|
}).then(function (res) {
|
|
60
|
-
// console.log('获取详情', res.data);
|
|
61
52
|
tableDataHandle(res.data, res.data.propPlanAndRealDataDiff, 'detail');
|
|
62
|
-
}).
|
|
53
|
+
}).finally(function () {
|
|
63
54
|
setSpinning(false);
|
|
64
55
|
});
|
|
65
56
|
}
|
|
@@ -178,7 +169,7 @@ var AddPlan = function AddPlan(props) {
|
|
|
178
169
|
tableDataHandle(res.data.eventPlanDataStatusList, res.data.userPropPlanList, 'add');
|
|
179
170
|
setEditOperate(true);
|
|
180
171
|
setListTab('1');
|
|
181
|
-
}).catch(function (
|
|
172
|
+
}).catch(function () {
|
|
182
173
|
message.error('上传失败');
|
|
183
174
|
}).finally(function () {
|
|
184
175
|
setSpinning(false);
|
|
@@ -422,7 +413,7 @@ var AddPlan = function AddPlan(props) {
|
|
|
422
413
|
message.success('保存成功');
|
|
423
414
|
closeDrawer('save');
|
|
424
415
|
}
|
|
425
|
-
})
|
|
416
|
+
});
|
|
426
417
|
};
|
|
427
418
|
// 存储选中的keys
|
|
428
419
|
var _useState29 = useState([]),
|
|
@@ -5,7 +5,6 @@ import './styles/index.less';
|
|
|
5
5
|
import TablePlus from './tablePlus';
|
|
6
6
|
var eventList = function eventList(props) {
|
|
7
7
|
var classPrefix = 'event-list';
|
|
8
|
-
// console.log('事件列表:', props.eventListData);
|
|
9
8
|
return /*#__PURE__*/React.createElement("div", {
|
|
10
9
|
className: classPrefix
|
|
11
10
|
}, Object.keys(props.eventListData).length > 0 && /*#__PURE__*/React.createElement(TablePlus, {
|
|
@@ -19,7 +19,6 @@ var PlanList = function PlanList(props) {
|
|
|
19
19
|
currentApp = _useContext.currentApp,
|
|
20
20
|
isDemo = _useContext.isDemo,
|
|
21
21
|
authority = _useContext.authority;
|
|
22
|
-
// console.log('②埋点方案管理', currentApp?.appId, getAppID(currentApp));
|
|
23
22
|
// 查看方案
|
|
24
23
|
var tableSee = function tableSee(data) {
|
|
25
24
|
setDetailId(data.id);
|
|
@@ -48,7 +47,7 @@ var PlanList = function PlanList(props) {
|
|
|
48
47
|
}).then(function (res) {
|
|
49
48
|
message.success('删除成功');
|
|
50
49
|
queryList();
|
|
51
|
-
})
|
|
50
|
+
});
|
|
52
51
|
}
|
|
53
52
|
});
|
|
54
53
|
};
|
|
@@ -75,8 +74,8 @@ var PlanList = function PlanList(props) {
|
|
|
75
74
|
title: '创建时间',
|
|
76
75
|
dataIndex: 'createOn',
|
|
77
76
|
key: 'createOn',
|
|
78
|
-
render: function render(
|
|
79
|
-
return /*#__PURE__*/React.createElement("div", null, getDateTime(
|
|
77
|
+
render: function render(text) {
|
|
78
|
+
return /*#__PURE__*/React.createElement("div", null, getDateTime(text));
|
|
80
79
|
}
|
|
81
80
|
}, {
|
|
82
81
|
title: '创建人',
|
|
@@ -85,16 +84,16 @@ var PlanList = function PlanList(props) {
|
|
|
85
84
|
}, {
|
|
86
85
|
title: '操作',
|
|
87
86
|
dataIndex: 'set',
|
|
88
|
-
render: function render(
|
|
87
|
+
render: function render(_, record) {
|
|
89
88
|
return /*#__PURE__*/React.createElement("div", null, authority[100024] && /*#__PURE__*/React.createElement(Fragment, null, authority[1000006] && /*#__PURE__*/React.createElement("span", {
|
|
90
89
|
className: "".concat(classPrefix, "-table-see"),
|
|
91
90
|
onClick: function onClick() {
|
|
92
|
-
return tableSee(
|
|
91
|
+
return tableSee(record);
|
|
93
92
|
}
|
|
94
93
|
}, "\u67E5\u770B"), authority[1000007] && /*#__PURE__*/React.createElement("span", {
|
|
95
94
|
className: "".concat(classPrefix, "-table-del"),
|
|
96
95
|
onClick: function onClick() {
|
|
97
|
-
return tableDel(
|
|
96
|
+
return tableDel(record.planName);
|
|
98
97
|
}
|
|
99
98
|
}, "\u5220\u9664")), !authority[100024] && /*#__PURE__*/React.createElement("span", null, " - "));
|
|
100
99
|
}
|
|
@@ -112,7 +111,7 @@ var PlanList = function PlanList(props) {
|
|
|
112
111
|
}
|
|
113
112
|
}).then(function (res) {
|
|
114
113
|
res.data && res.data.planList && setListData(res.data.planList);
|
|
115
|
-
})
|
|
114
|
+
});
|
|
116
115
|
};
|
|
117
116
|
useEffect(function () {
|
|
118
117
|
queryList();
|
|
@@ -171,7 +170,7 @@ var PlanList = function PlanList(props) {
|
|
|
171
170
|
appId: getAppID(currentApp),
|
|
172
171
|
isOpen: !isOpen ? '1' : '0'
|
|
173
172
|
}
|
|
174
|
-
}).then(function (
|
|
173
|
+
}).then(function () {
|
|
175
174
|
setIsOpen(!isOpen);
|
|
176
175
|
message.success("\u65B9\u6848\u63A7\u5236\u5DF2".concat(!isOpen ? '开始' : '关闭'));
|
|
177
176
|
});
|
|
@@ -4,7 +4,6 @@ import React from 'react';
|
|
|
4
4
|
import './styles/index.less';
|
|
5
5
|
var UserAttributeList = function UserAttributeList(props) {
|
|
6
6
|
var classPrefix = 'user-list';
|
|
7
|
-
// console.log('userAttrData', props.userAttrData);
|
|
8
7
|
// 表格列
|
|
9
8
|
var columns = [{
|
|
10
9
|
title: /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Checkbox, {
|
package/es/utils/index.d.ts
CHANGED
|
@@ -1,4 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 虚拟事件编辑 判断内容是否有改动;有改动返回true
|
|
3
|
+
*/
|
|
4
|
+
export declare const getVirtualContentChange: (oldData: any, newData: any) => boolean;
|
|
5
|
+
/**
|
|
6
|
+
* 虚拟事件属性超过100个,选择属性后的回调,处理提交数据
|
|
7
|
+
*/
|
|
8
|
+
export declare const getSubmitHandleData: (selectAttributes: any, submitData: any, data: any) => any;
|
|
9
|
+
/**
|
|
10
|
+
* 创建或编辑虚拟事件时,判断虚拟事件属性是否超过100
|
|
11
|
+
*/
|
|
12
|
+
export declare const getDelectAttributesData: (data: any, eventGroupList: any) => any;
|
|
13
|
+
/**
|
|
14
|
+
* 创建或编辑虚拟事件时,判断eventJson是否可以提交保存
|
|
15
|
+
*/
|
|
16
|
+
export declare const eventJsonHandle: (data: any) => boolean;
|
|
17
|
+
/**
|
|
18
|
+
* 指标分组管理:移动
|
|
19
|
+
*/
|
|
20
|
+
export declare const eventMoveData: (groupId: number, groupingData: any, setGroupingData: Function) => {
|
|
21
|
+
length: any;
|
|
22
|
+
ids: any;
|
|
23
|
+
groupingOption: any;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* 指标分组管理:显示或隐藏
|
|
27
|
+
*/
|
|
28
|
+
export declare const eventShowOrHiddenData: (type: number, groupId: number, groupingData: any, setGroupingData: Function) => any;
|
|
29
|
+
/**
|
|
30
|
+
* 指标分组管理:分组展开与关闭
|
|
31
|
+
*/
|
|
32
|
+
export declare const openChangeData: (groupId: number, groupingData: any) => any;
|
|
33
|
+
/**
|
|
34
|
+
* 指标分组管理:事件全选处理
|
|
35
|
+
*/
|
|
36
|
+
export declare const eventCheckedAll: (groupId: number, groupingData: any) => any;
|
|
37
|
+
/**
|
|
38
|
+
* 指标分组管理:分组中事件列表初始化
|
|
39
|
+
*/
|
|
40
|
+
export declare const eventListHandle: (data: any) => any;
|
|
41
|
+
/**
|
|
42
|
+
* 指标分组管理:搜索事件名称或别名,判断是否展示
|
|
43
|
+
*/
|
|
44
|
+
export declare const eventShow: (data: any, searchData: string) => any;
|
|
45
|
+
/**
|
|
46
|
+
* 指标分组管理:单个事件选中处理
|
|
47
|
+
*/
|
|
48
|
+
export declare const eventChecked: (groupId: number, eventId: number, groupingData: any) => any;
|
|
1
49
|
export declare const getAppID: (currentApp: any) => any;
|
|
50
|
+
export declare const nullToEmptyString: (data: any) => any;
|
|
2
51
|
/**
|
|
3
52
|
* 获取第一个表格的可视化高度
|
|
4
53
|
* @param {*} extraHeight 额外的高度(表格底部的内容高度 Number类型,默认为74)
|