@zgfe/modules-event 1.0.29-zhongyuanE.17 → 1.0.29-zhongyuanE.23
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/eventFilter/index.d.ts +5 -0
- package/es/components/eventFilter/index.js +315 -0
- package/es/components/eventFilter/setCascade.d.ts +3 -0
- package/es/components/eventFilter/setCascade.js +286 -0
- package/es/components/eventFilter/types.d.ts +21 -0
- package/es/components/eventFilter/types.js +1 -0
- package/es/components/index.d.ts +4 -0
- package/es/components/index.js +4 -0
- package/es/components/renderContent/index.d.ts +5 -0
- package/es/components/renderContent/index.js +46 -0
- package/es/components/renderContent/styles/index.less +19 -0
- package/es/components/renderContent/types.d.ts +8 -0
- package/es/components/renderContent/types.js +1 -0
- package/es/components/searchPanel/index.d.ts +5 -0
- package/es/components/searchPanel/index.js +134 -0
- package/es/components/searchPanel/styles/index.less +22 -0
- package/es/components/searchPanel/types.d.ts +28 -0
- package/es/components/searchPanel/types.js +1 -0
- package/es/components/table/index.d.ts +6 -0
- package/es/components/table/index.js +319 -0
- package/es/components/table/styles/index.css +236 -0
- package/es/components/table/styles/index.less +249 -0
- package/es/components/table/types.d.ts +10 -0
- package/es/components/table/types.js +1 -0
- package/es/components/topBar/index.d.ts +10 -0
- package/es/components/topBar/index.js +174 -0
- package/es/components/topBar/styles/index.less +58 -0
- package/es/components/topBar/types.d.ts +8 -0
- package/es/components/topBar/types.js +1 -0
- package/es/constants/apis.d.ts +10 -0
- package/es/constants/apis.js +10 -0
- package/es/constants/chart.d.ts +2 -0
- package/es/constants/chart.js +31 -0
- package/es/constants/color.d.ts +1 -0
- package/es/constants/color.js +1 -0
- package/es/constants/fields.d.ts +251 -0
- package/es/constants/fields.js +177 -0
- package/es/constants/index.d.ts +6 -0
- package/es/constants/index.js +6 -0
- package/es/constants/initData.d.ts +2 -0
- package/es/constants/initData.js +9 -0
- package/es/index.d.ts +6 -0
- package/es/index.js +5 -0
- package/es/modules/chart/demo/data.d.ts +73 -0
- package/es/modules/chart/demo/data.js +484 -0
- package/es/modules/chart/demo/index.d.ts +3 -0
- package/es/modules/chart/demo/index.js +51 -0
- package/es/modules/chart/demo/panel.d.ts +3 -0
- package/es/modules/chart/demo/panel.js +16 -0
- package/es/modules/chart/index.d.ts +4 -0
- package/es/modules/chart/index.js +253 -0
- package/es/modules/chart/types.d.ts +19 -0
- package/es/modules/chart/types.js +1 -0
- package/es/modules/content/index.d.ts +5 -0
- package/es/modules/content/index.js +302 -0
- package/es/modules/content/styles/index.less +19 -0
- package/es/modules/content/types.d.ts +11 -0
- package/es/modules/content/types.js +1 -0
- package/es/modules/content/utils.d.ts +18 -0
- package/es/modules/content/utils.js +134 -0
- package/es/modules/home/demo/create.d.ts +3 -0
- package/es/modules/home/demo/create.js +58 -0
- package/es/modules/home/demo/edit.d.ts +3 -0
- package/es/modules/home/demo/edit.js +73 -0
- package/es/modules/home/demo/index.d.ts +4 -0
- package/es/modules/home/demo/index.js +55 -0
- package/es/modules/home/demo/scene.d.ts +3 -0
- package/es/modules/home/demo/scene.js +89 -0
- package/es/modules/home/demo/styles/index.less +33 -0
- package/es/modules/home/index.d.ts +5 -0
- package/es/modules/home/index.js +184 -0
- package/es/modules/home/styles/index.less +49 -0
- package/es/modules/home/types.d.ts +34 -0
- package/es/modules/home/types.js +1 -0
- package/es/modules/topPanel/index.d.ts +5 -0
- package/es/modules/topPanel/index.js +246 -0
- package/es/modules/topPanel/styles/index.less +50 -0
- package/es/modules/topPanel/types.d.ts +46 -0
- package/es/modules/topPanel/types.js +1 -0
- package/es/style/theme.d.ts +15 -0
- package/es/style/theme.js +14 -0
- package/es/types.d.ts +86 -0
- package/es/types.js +6 -0
- package/es/utils/ajaxConfig.d.ts +8 -0
- package/es/utils/ajaxConfig.js +40 -0
- package/es/utils/base64.d.ts +23 -0
- package/es/utils/base64.js +125 -0
- package/es/utils/formData.d.ts +20 -0
- package/es/utils/formData.js +406 -0
- package/es/utils/util.d.ts +32 -0
- package/es/utils/util.js +139 -0
- package/package.json +2 -2
|
@@ -0,0 +1,253 @@
|
|
|
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, { useContext, useEffect, useMemo, useState } from 'react';
|
|
14
|
+
import { Tooltip, Empty } from 'antd';
|
|
15
|
+
import { BizChart, BizGlobalDataContext, ajax, BizLoading, BizEmpty } from '@zgfe/business-lib';
|
|
16
|
+
import { EventTable } from '../../components';
|
|
17
|
+
import { judgeIsCity } from '../content/utils';
|
|
18
|
+
import { getValue, getMapChartData } from '../../modules/content/utils';
|
|
19
|
+
import { getShowColor, getUserGroupsCompareData, getSortData, getChartDataEventAliasName, formTableData, sortOriginalData } from '../../utils/formData';
|
|
20
|
+
import _ from 'lodash';
|
|
21
|
+
import moment from 'moment';
|
|
22
|
+
import { Apis, chartColors } from '../../constants';
|
|
23
|
+
var classPrefix = 'event-mi-table';
|
|
24
|
+
var EventChart = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
25
|
+
var params = props.params;
|
|
26
|
+
var _useState = useState(props === null || props === void 0 ? void 0 : props.completedSearchData),
|
|
27
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
28
|
+
completedSearchData = _useState2[0],
|
|
29
|
+
setCompletedSearchData = _useState2[1];
|
|
30
|
+
var _useState3 = useState(false),
|
|
31
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
32
|
+
isCity = _useState4[0],
|
|
33
|
+
setIsCity = _useState4[1];
|
|
34
|
+
var _useState5 = useState(props.type || 'line'),
|
|
35
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
36
|
+
chartType = _useState6[0],
|
|
37
|
+
setChartType = _useState6[1];
|
|
38
|
+
var _useState7 = useState(props.showList || []),
|
|
39
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
40
|
+
showList = _useState8[0],
|
|
41
|
+
setShowList = _useState8[1];
|
|
42
|
+
var _useState9 = useState(props.dataSource),
|
|
43
|
+
_useState0 = _slicedToArray(_useState9, 2),
|
|
44
|
+
dataSource = _useState0[0],
|
|
45
|
+
setDataSource = _useState0[1];
|
|
46
|
+
var _useContext = useContext(BizGlobalDataContext),
|
|
47
|
+
eventGroupList = _useContext.eventGroupList,
|
|
48
|
+
eventEnvList = _useContext.eventEnvList,
|
|
49
|
+
userPropList = _useContext.userPropList,
|
|
50
|
+
currentApp = _useContext.currentApp;
|
|
51
|
+
var _useState1 = useState(false),
|
|
52
|
+
_useState10 = _slicedToArray(_useState1, 2),
|
|
53
|
+
loading = _useState10[0],
|
|
54
|
+
setLoading = _useState10[1];
|
|
55
|
+
var showColors = useMemo(function () {
|
|
56
|
+
if (!dataSource) return chartColors;
|
|
57
|
+
return getShowColor(dataSource, showList);
|
|
58
|
+
}, [showList]);
|
|
59
|
+
useEffect(function () {
|
|
60
|
+
if (!props.dataSource) {
|
|
61
|
+
fetchResult();
|
|
62
|
+
}
|
|
63
|
+
}, [params]);
|
|
64
|
+
useEffect(function () {
|
|
65
|
+
if (!dataSource || !dataSource.series.length) return;
|
|
66
|
+
if (!props.showList || !props.showList.length) {
|
|
67
|
+
var _dataSource$series$;
|
|
68
|
+
var gLen = (params === null || params === void 0 ? void 0 : params.dimension) ? 1 : 0;
|
|
69
|
+
var _data = formTableData(dataSource, (params === null || params === void 0 ? void 0 : params.userGroup) || [0], gLen);
|
|
70
|
+
var _sortData = sortOriginalData(_data, {
|
|
71
|
+
columnKey: "field".concat(((_dataSource$series$ = dataSource.series[0]) === null || _dataSource$series$ === void 0 ? void 0 : _dataSource$series$.values.length) - 1),
|
|
72
|
+
order: 'descend'
|
|
73
|
+
});
|
|
74
|
+
var _showlist = [];
|
|
75
|
+
_sortData.forEach(function (item, index) {
|
|
76
|
+
if (index < 10) {
|
|
77
|
+
_showlist.push(item.nameGroup);
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
setShowList(_showlist);
|
|
81
|
+
props.onChangeShow && props.onChangeShow(_showlist);
|
|
82
|
+
} else {
|
|
83
|
+
setShowList(props.showList);
|
|
84
|
+
}
|
|
85
|
+
}, [dataSource, props.showList]);
|
|
86
|
+
useEffect(function () {
|
|
87
|
+
var _completedSearchData$;
|
|
88
|
+
if (!completedSearchData) return;
|
|
89
|
+
var chartData = ((_completedSearchData$ = completedSearchData.chartType) === null || _completedSearchData$ === void 0 ? void 0 : _completedSearchData$.split(',')) || ['line'];
|
|
90
|
+
var type = chartData[0];
|
|
91
|
+
if (!props.dataSource) {
|
|
92
|
+
type = (chartData === null || chartData === void 0 ? void 0 : chartData.length) > 1 ? chartData[chartData.length - 1] : chartData[0];
|
|
93
|
+
}
|
|
94
|
+
setChartType(props.type || type);
|
|
95
|
+
if (completedSearchData.id) {
|
|
96
|
+
var dimensions = completedSearchData.dimension;
|
|
97
|
+
if (type === 'map' && dimensions) {
|
|
98
|
+
var _getValue;
|
|
99
|
+
setIsCity(judgeIsCity((_getValue = getValue(dimensions, eventGroupList, eventEnvList, userPropList)) === null || _getValue === void 0 ? void 0 : _getValue.name));
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}, [completedSearchData, props.type]);
|
|
103
|
+
var fetchResult = function fetchResult() {
|
|
104
|
+
var _params$chartType, _params$chartType2;
|
|
105
|
+
setLoading(true);
|
|
106
|
+
ajax(Apis.dataList, {
|
|
107
|
+
method: 'post',
|
|
108
|
+
data: _objectSpread(_objectSpread({
|
|
109
|
+
appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
|
|
110
|
+
platform: (params === null || params === void 0 ? void 0 : params.platform) || 0
|
|
111
|
+
}, params), {}, {
|
|
112
|
+
chartType: (params === null || params === void 0 ? void 0 : (_params$chartType = params.chartType) === null || _params$chartType === void 0 ? void 0 : _params$chartType.indexOf(',')) === -1 ? params === null || params === void 0 ? void 0 : params.chartType : params === null || params === void 0 ? void 0 : (_params$chartType2 = params.chartType) === null || _params$chartType2 === void 0 ? void 0 : _params$chartType2.split(',')[0]
|
|
113
|
+
})
|
|
114
|
+
}).then(function (res) {
|
|
115
|
+
var _params$userGroup;
|
|
116
|
+
setCompletedSearchData(params);
|
|
117
|
+
if (!res) {
|
|
118
|
+
setLoading(false);
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
var _data = params.dimension ? res.data : getChartDataEventAliasName(res.data, eventGroupList);
|
|
122
|
+
if (['bar', 'pie', 'map'].indexOf(params.chartType) !== -1) {
|
|
123
|
+
_data = getSortData(_data);
|
|
124
|
+
}
|
|
125
|
+
if ((params === null || params === void 0 ? void 0 : params.userGroup) && (params === null || params === void 0 ? void 0 : (_params$userGroup = params.userGroup) === null || _params$userGroup === void 0 ? void 0 : _params$userGroup.length) > 1) {
|
|
126
|
+
setDataSource(getUserGroupsCompareData(_data));
|
|
127
|
+
} else {
|
|
128
|
+
setDataSource(_data);
|
|
129
|
+
}
|
|
130
|
+
setLoading(false);
|
|
131
|
+
});
|
|
132
|
+
};
|
|
133
|
+
var onChangeShowByName = function onChangeShowByName(nameGroup) {
|
|
134
|
+
var list = _.cloneDeep(showList);
|
|
135
|
+
var index = list === null || list === void 0 ? void 0 : list.indexOf(nameGroup);
|
|
136
|
+
if (index < 0) {
|
|
137
|
+
list.push(nameGroup);
|
|
138
|
+
} else {
|
|
139
|
+
list.splice(index, 1);
|
|
140
|
+
}
|
|
141
|
+
setShowList(list);
|
|
142
|
+
if (props.onChangeShow) props.onChangeShow(list);
|
|
143
|
+
};
|
|
144
|
+
if (loading) {
|
|
145
|
+
return /*#__PURE__*/React.createElement(BizLoading, {
|
|
146
|
+
className: "".concat(classPrefix, "-loading")
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
if (dataSource && dataSource.delEvent) {
|
|
150
|
+
if (!props.isHideDel) {
|
|
151
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
152
|
+
style: {
|
|
153
|
+
display: 'flex',
|
|
154
|
+
minHeight: 345,
|
|
155
|
+
justifyContent: 'center',
|
|
156
|
+
alignItems: 'center'
|
|
157
|
+
}
|
|
158
|
+
}, /*#__PURE__*/React.createElement(BizEmpty, {
|
|
159
|
+
imageStyle: {
|
|
160
|
+
height: 58
|
|
161
|
+
},
|
|
162
|
+
description: /*#__PURE__*/React.createElement("span", {
|
|
163
|
+
style: {
|
|
164
|
+
color: '#9AA1A9'
|
|
165
|
+
}
|
|
166
|
+
}, "\u4E8B\u4EF6\u5DF2\u88AB\u5220\u9664\u65E0\u6CD5\u67E5\u770B\uFF0C\u8BF7\u91CD\u65B0\u8BBE\u7F6E")
|
|
167
|
+
}));
|
|
168
|
+
} else {
|
|
169
|
+
return null;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
if (!dataSource || !dataSource.xAxis.length || !dataSource.series.length) {
|
|
173
|
+
return /*#__PURE__*/React.createElement(Empty, {
|
|
174
|
+
image: Empty.PRESENTED_IMAGE_SIMPLE,
|
|
175
|
+
description: "\u6682\u65E0\u6570\u636E"
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
var dataUpdateTime = function dataUpdateTime() {
|
|
179
|
+
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
180
|
+
className: "".concat(classPrefix, "-chart-box-tooltip"),
|
|
181
|
+
title: '当前图表数据实时更新,约每分钟更新一次'
|
|
182
|
+
}, /*#__PURE__*/React.createElement("div", null, "\u6570\u636E\u66F4\u65B0\u65F6\u95F4\uFF1A", moment().format('YYYY-MM-DD HH:mm')));
|
|
183
|
+
};
|
|
184
|
+
var tooltipFormatter = function tooltipFormatter(data) {
|
|
185
|
+
var xLabel = '';
|
|
186
|
+
var params = data[0] ? data : [data];
|
|
187
|
+
var array = params[0].name.split('|');
|
|
188
|
+
if (array.length > 1) {
|
|
189
|
+
xLabel = moment(array[0]).format('MM-DD') + '~' + moment(array[1]).format('MM-DD');
|
|
190
|
+
} else {
|
|
191
|
+
var _props$params, _props$params$time, _props$params2, _props$params2$time;
|
|
192
|
+
if ((props === null || props === void 0 ? void 0 : (_props$params = props.params) === null || _props$params === void 0 ? void 0 : (_props$params$time = _props$params.time) === null || _props$params$time === void 0 ? void 0 : _props$params$time.unit) == 'hour') {
|
|
193
|
+
xLabel = moment(array[0]).isValid() ? moment(array[0]).format('MM-DD HH') : array[0];
|
|
194
|
+
} else if ((props === null || props === void 0 ? void 0 : (_props$params2 = props.params) === null || _props$params2 === void 0 ? void 0 : (_props$params2$time = _props$params2.time) === null || _props$params2$time === void 0 ? void 0 : _props$params2$time.unit) == 'minute') {
|
|
195
|
+
xLabel = moment(array[0]).isValid() ? moment(array[0]).format('MM-DD HH:mm') : array[0];
|
|
196
|
+
} else xLabel = moment(array[0]).isValid() ? moment(array[0]).format('MM-DD') : array[0];
|
|
197
|
+
}
|
|
198
|
+
var series = [];
|
|
199
|
+
var seriesMap = {};
|
|
200
|
+
params.forEach(function (item) {
|
|
201
|
+
if (item.value === null || item.value === undefined || seriesMap[item.seriesName] !== null && seriesMap[item.seriesName] !== undefined) return;
|
|
202
|
+
seriesMap[item.seriesName] = item.value;
|
|
203
|
+
var value = item.value;
|
|
204
|
+
var seriesName = item.seriesName || item.axisValueLabel;
|
|
205
|
+
seriesName = [seriesName].join('<br/>');
|
|
206
|
+
series.push({
|
|
207
|
+
text: "<div class='biz-chart-tooltip-item'>\n <div class='biz-chart-tooltip-content'>\n <span class=\"biz-tooltip-marker\" style=\"background:".concat(item.color, "\"></span>\n <div class=\"biz-tooltip-name\">").concat(seriesName, "</div>\n </div> \n <div class='biz-chart-tooltip-value'>\n ").concat(value, "\n </div>\n </div>"),
|
|
208
|
+
value: value
|
|
209
|
+
});
|
|
210
|
+
});
|
|
211
|
+
return "<div class='biz-chart-tooltip-title'>".concat(xLabel, "</div>").concat(series.sort(function (a, b) {
|
|
212
|
+
return parseInt(b.value) - parseInt(a.value);
|
|
213
|
+
}).map(function (item) {
|
|
214
|
+
return item.text;
|
|
215
|
+
}).join(''));
|
|
216
|
+
};
|
|
217
|
+
switch (chartType) {
|
|
218
|
+
case 'line':
|
|
219
|
+
case 'bar':
|
|
220
|
+
case 'pie':
|
|
221
|
+
case 'map':
|
|
222
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
223
|
+
className: "".concat(classPrefix, "-chart-box")
|
|
224
|
+
}, !!props.dataSource && dataUpdateTime(), /*#__PURE__*/React.createElement(BizChart, {
|
|
225
|
+
ref: ref,
|
|
226
|
+
key: chartType,
|
|
227
|
+
type: chartType,
|
|
228
|
+
data: chartType === 'map' ? getMapChartData(dataSource) : dataSource,
|
|
229
|
+
legendPosition: "bottom",
|
|
230
|
+
showList: showList,
|
|
231
|
+
colors: showColors,
|
|
232
|
+
xRotate: chartType === 'bar' && dataSource.series.length > 5 ? 40 : 0,
|
|
233
|
+
reverseXAxis: chartType === 'bar',
|
|
234
|
+
isCity: isCity,
|
|
235
|
+
tooltipFormatter: tooltipFormatter
|
|
236
|
+
}));
|
|
237
|
+
case 'grid':
|
|
238
|
+
return /*#__PURE__*/React.createElement(EventTable, {
|
|
239
|
+
dataSource: dataSource,
|
|
240
|
+
sourcePanel: !props.dataSource,
|
|
241
|
+
searchData: params,
|
|
242
|
+
showList: showList,
|
|
243
|
+
changeShowByName: onChangeShowByName,
|
|
244
|
+
onSelectEvent: props === null || props === void 0 ? void 0 : props.onSelectEvent
|
|
245
|
+
});
|
|
246
|
+
default:
|
|
247
|
+
return /*#__PURE__*/React.createElement("div", null, "\u6682\u4E0D\u652F\u6301\u8BE5\u56FE\u8868\u7C7B\u578B");
|
|
248
|
+
}
|
|
249
|
+
});
|
|
250
|
+
EventChart.defaultProps = {
|
|
251
|
+
showList: []
|
|
252
|
+
};
|
|
253
|
+
export default EventChart;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ChartTypes } from '@zgfe/business-lib/es/chart/types';
|
|
2
|
+
import { SearchValue } from '../../types';
|
|
3
|
+
export declare namespace eventChartProps {
|
|
4
|
+
interface ChartTypesProps extends ChartTypes.Value {
|
|
5
|
+
xAxis: [];
|
|
6
|
+
delEvent?: number;
|
|
7
|
+
}
|
|
8
|
+
interface Props {
|
|
9
|
+
dataSource?: ChartTypesProps;
|
|
10
|
+
params?: SearchValue;
|
|
11
|
+
completedSearchData?: SearchValue;
|
|
12
|
+
type?: string;
|
|
13
|
+
showList?: string[];
|
|
14
|
+
showColors?: string[];
|
|
15
|
+
onChangeShow?: (data: string[]) => void;
|
|
16
|
+
onSelectEvent?: (id: number, name: string) => void;
|
|
17
|
+
isHideDel?: boolean;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,302 @@
|
|
|
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 { ajax, BizGlobalDataContext, BizLayout, BizTargetFromPanelContext } from '@zgfe/business-lib';
|
|
14
|
+
import { message } from 'antd';
|
|
15
|
+
import React, { useContext, useEffect, useRef, useState, useImperativeHandle } from 'react';
|
|
16
|
+
import Request from 'umi-request';
|
|
17
|
+
import TopBar from '../../components/topBar';
|
|
18
|
+
import { EventContext } from '../../types';
|
|
19
|
+
import './styles/index.less';
|
|
20
|
+
import { Apis } from '../../constants';
|
|
21
|
+
import { ContentPanel, SearchPanel } from '../../components';
|
|
22
|
+
import { getUserGroupsCompareData, getSortData, getChartDataEventAliasName, sortOriginalData, formTableData } from '../../utils/formData';
|
|
23
|
+
import TopPanel from '../topPanel';
|
|
24
|
+
var timer = 0;
|
|
25
|
+
var ajaxFlag = true;
|
|
26
|
+
var refresh = false;
|
|
27
|
+
var CancelToken = Request.CancelToken;
|
|
28
|
+
var cancel;
|
|
29
|
+
var classPrefix = 'event-content';
|
|
30
|
+
var EventContent = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
31
|
+
var _props$value, _props$value2, _topPanelRef$current4;
|
|
32
|
+
var _useContext = useContext(BizGlobalDataContext),
|
|
33
|
+
authority = _useContext.authority;
|
|
34
|
+
var _useContext2 = useContext(EventContext),
|
|
35
|
+
currentApp = _useContext2.currentApp,
|
|
36
|
+
searchData = _useContext2.searchData,
|
|
37
|
+
setSearchData = _useContext2.setSearchData,
|
|
38
|
+
eventGroupList = _useContext2.eventGroupList,
|
|
39
|
+
loading = _useContext2.loading,
|
|
40
|
+
setLoading = _useContext2.setLoading,
|
|
41
|
+
afterEditTarget = _useContext2.afterEditTarget,
|
|
42
|
+
onChangeUrlParam = _useContext2.onChangeUrlParam,
|
|
43
|
+
panelId = _useContext2.panelId,
|
|
44
|
+
setShowListHome = _useContext2.setShowListHome,
|
|
45
|
+
setRefreshLoading = _useContext2.setRefreshLoading,
|
|
46
|
+
setCompletedSearchData = _useContext2.setCompletedSearchData;
|
|
47
|
+
var _useState = useState(),
|
|
48
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
49
|
+
eventData = _useState2[0],
|
|
50
|
+
setEventData = _useState2[1];
|
|
51
|
+
var _useState3 = useState(false),
|
|
52
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
53
|
+
enableSelectChart = _useState4[0],
|
|
54
|
+
setEnableSelectChart = _useState4[1];
|
|
55
|
+
var _useState5 = useState(false),
|
|
56
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
57
|
+
isCity = _useState6[0],
|
|
58
|
+
setIsCity = _useState6[1];
|
|
59
|
+
var _useState7 = useState(props.value.id),
|
|
60
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
61
|
+
eventId = _useState8[0],
|
|
62
|
+
setEventId = _useState8[1];
|
|
63
|
+
var _useState9 = useState(true),
|
|
64
|
+
_useState0 = _slicedToArray(_useState9, 2),
|
|
65
|
+
first = _useState0[0],
|
|
66
|
+
setFirst = _useState0[1];
|
|
67
|
+
var _useContext3 = useContext(BizTargetFromPanelContext),
|
|
68
|
+
handleSearch = _useContext3.handleSearch,
|
|
69
|
+
disabled = _useContext3.disabled;
|
|
70
|
+
var topPanelRef = useRef();
|
|
71
|
+
useImperativeHandle(ref, function () {
|
|
72
|
+
return {
|
|
73
|
+
onFormSetFieldsValue: function onFormSetFieldsValue(data) {
|
|
74
|
+
var _topPanelRef$current;
|
|
75
|
+
topPanelRef === null || topPanelRef === void 0 ? void 0 : (_topPanelRef$current = topPanelRef.current) === null || _topPanelRef$current === void 0 ? void 0 : _topPanelRef$current.onFormSetFieldsValue(data);
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
});
|
|
79
|
+
var chartRef = useRef();
|
|
80
|
+
var _useState1 = useState('user'),
|
|
81
|
+
_useState10 = _slicedToArray(_useState1, 2),
|
|
82
|
+
analysisSubjectType = _useState10[0],
|
|
83
|
+
setAnalysisSubjectType = _useState10[1];
|
|
84
|
+
var _useState11 = useState(false),
|
|
85
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
86
|
+
subDisplay = _useState12[0],
|
|
87
|
+
setSubDisplay = _useState12[1];
|
|
88
|
+
var _useState13 = useState({
|
|
89
|
+
analysisIndex: ((_props$value = props.value) === null || _props$value === void 0 ? void 0 : _props$value.analysisIndex) || 'number',
|
|
90
|
+
analysisAttr: (_props$value2 = props.value) === null || _props$value2 === void 0 ? void 0 : _props$value2.analysisAttr
|
|
91
|
+
}),
|
|
92
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
93
|
+
dimension = _useState14[0],
|
|
94
|
+
setDimension = _useState14[1];
|
|
95
|
+
useEffect(function () {
|
|
96
|
+
if (timer) clearTimeout(timer);
|
|
97
|
+
var flag = true;
|
|
98
|
+
timer = setTimeout(function () {
|
|
99
|
+
if (flag) {
|
|
100
|
+
fetchRequest();
|
|
101
|
+
}
|
|
102
|
+
}, 500);
|
|
103
|
+
return function () {
|
|
104
|
+
if (timer) clearTimeout(timer);
|
|
105
|
+
flag = false;
|
|
106
|
+
};
|
|
107
|
+
}, [searchData]);
|
|
108
|
+
useEffect(function () {
|
|
109
|
+
if (disabled) return;
|
|
110
|
+
handleSearch && handleSearch(loading);
|
|
111
|
+
}, [loading]);
|
|
112
|
+
useEffect(function () {
|
|
113
|
+
querySubDisplay();
|
|
114
|
+
}, []);
|
|
115
|
+
function querySubDisplay() {
|
|
116
|
+
ajax(Apis.querySubDisplayApi, {
|
|
117
|
+
method: 'post',
|
|
118
|
+
data: {
|
|
119
|
+
appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId
|
|
120
|
+
}
|
|
121
|
+
}).then(function (res) {
|
|
122
|
+
if (!res) return;
|
|
123
|
+
setSubDisplay(res.data);
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
var fetchRequest = function fetchRequest(flag) {
|
|
127
|
+
if (!authority[100047]) {
|
|
128
|
+
message.error('无查询权限');
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
if (flag !== undefined) ajaxFlag = flag;
|
|
132
|
+
if (analysisSubjectType === 'eventProp' && !searchData.analysisSubject) return;
|
|
133
|
+
if (!ajaxFlag) return;
|
|
134
|
+
if (!refresh) setLoading(true);
|
|
135
|
+
setEventData(undefined);
|
|
136
|
+
if (typeof cancel === 'function') {
|
|
137
|
+
cancel();
|
|
138
|
+
}
|
|
139
|
+
ajax(Apis.dataList, {
|
|
140
|
+
method: 'post',
|
|
141
|
+
data: _objectSpread(_objectSpread({
|
|
142
|
+
appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
|
|
143
|
+
platform: (searchData === null || searchData === void 0 ? void 0 : searchData.platform) || 0
|
|
144
|
+
}, searchData), {}, {
|
|
145
|
+
refresh: refresh
|
|
146
|
+
}),
|
|
147
|
+
cancelToken: new CancelToken(function executor(c) {
|
|
148
|
+
cancel = c;
|
|
149
|
+
})
|
|
150
|
+
}).then(function (res) {
|
|
151
|
+
var _searchData$userGroup;
|
|
152
|
+
setCompletedSearchData && setCompletedSearchData(searchData);
|
|
153
|
+
setRefreshLoading(false);
|
|
154
|
+
if (!res) {
|
|
155
|
+
setLoading(false);
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
158
|
+
var result = res.data;
|
|
159
|
+
if (!(result === null || result === void 0 ? void 0 : result.series.length)) {
|
|
160
|
+
setLoading(false);
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
var _data = searchData.dimension ? result : getChartDataEventAliasName(result, eventGroupList);
|
|
164
|
+
var gLen = (searchData === null || searchData === void 0 ? void 0 : searchData.dimension) ? 1 : 0;
|
|
165
|
+
var dataTemp = formTableData(_data, (searchData === null || searchData === void 0 ? void 0 : searchData.userGroup) || [0], gLen);
|
|
166
|
+
var _sortData = [];
|
|
167
|
+
if (['bar', 'pie', 'map'].indexOf(searchData.chartType) !== -1) {
|
|
168
|
+
_data = getSortData(_data);
|
|
169
|
+
} else {
|
|
170
|
+
var _data2, _data2$series$;
|
|
171
|
+
_sortData = sortOriginalData(dataTemp, {
|
|
172
|
+
columnKey: "field".concat(((_data2 = _data) === null || _data2 === void 0 ? void 0 : (_data2$series$ = _data2.series[0]) === null || _data2$series$ === void 0 ? void 0 : _data2$series$.values.length) - 1),
|
|
173
|
+
order: 'descend'
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
if (searchData && (searchData === null || searchData === void 0 ? void 0 : searchData.userGroup) && (searchData === null || searchData === void 0 ? void 0 : (_searchData$userGroup = searchData.userGroup) === null || _searchData$userGroup === void 0 ? void 0 : _searchData$userGroup.length) > 1) {
|
|
177
|
+
_data = getUserGroupsCompareData(_data);
|
|
178
|
+
}
|
|
179
|
+
if (first) {
|
|
180
|
+
setFirst(false);
|
|
181
|
+
} else {
|
|
182
|
+
var _showlist = [];
|
|
183
|
+
_sortData.forEach(function (item, index) {
|
|
184
|
+
if (index < 10) {
|
|
185
|
+
_showlist.push(item.nameGroup);
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
setShowListHome(_showlist);
|
|
189
|
+
}
|
|
190
|
+
setEventData(_data);
|
|
191
|
+
onChangeUrlParam(searchData);
|
|
192
|
+
setLoading(false);
|
|
193
|
+
});
|
|
194
|
+
};
|
|
195
|
+
var refreshHandle = function refreshHandle() {
|
|
196
|
+
refresh = true;
|
|
197
|
+
setRefreshLoading(true);
|
|
198
|
+
if (timer) clearTimeout(timer);
|
|
199
|
+
timer = setTimeout(function () {
|
|
200
|
+
fetchRequest();
|
|
201
|
+
refresh = false;
|
|
202
|
+
clearTimeout(timer);
|
|
203
|
+
}, 500);
|
|
204
|
+
};
|
|
205
|
+
var onChangeContent = function onChangeContent(data) {
|
|
206
|
+
var _topPanelRef$current2;
|
|
207
|
+
ajaxFlag = true;
|
|
208
|
+
(_topPanelRef$current2 = topPanelRef.current) === null || _topPanelRef$current2 === void 0 ? void 0 : _topPanelRef$current2.submit();
|
|
209
|
+
setSearchData(function (value) {
|
|
210
|
+
return _objectSpread(_objectSpread(_objectSpread({}, value), data), {}, {
|
|
211
|
+
analysisAttr: data.analysisAttr,
|
|
212
|
+
analysisIndex: data.analysisIndex
|
|
213
|
+
});
|
|
214
|
+
});
|
|
215
|
+
};
|
|
216
|
+
var platformChange = function platformChange(data) {
|
|
217
|
+
var _topPanelRef$current3;
|
|
218
|
+
ajaxFlag = true;
|
|
219
|
+
(_topPanelRef$current3 = topPanelRef.current) === null || _topPanelRef$current3 === void 0 ? void 0 : _topPanelRef$current3.submit();
|
|
220
|
+
setSearchData(function (_searchData) {
|
|
221
|
+
return _objectSpread(_objectSpread({}, _searchData), {}, {
|
|
222
|
+
platform: data
|
|
223
|
+
});
|
|
224
|
+
});
|
|
225
|
+
};
|
|
226
|
+
var onChangeSearch = function onChangeSearch(data, flag) {
|
|
227
|
+
ajaxFlag = flag;
|
|
228
|
+
data.id ? setEventId(data.id) : setEventId(-1);
|
|
229
|
+
setSearchData(_objectSpread(_objectSpread(_objectSpread({}, searchData), {}, {
|
|
230
|
+
dimension: data.dimension,
|
|
231
|
+
filters: data.filters,
|
|
232
|
+
id: data.id,
|
|
233
|
+
eventIds: data.eventIds,
|
|
234
|
+
name: data.name
|
|
235
|
+
}, data), {}, {
|
|
236
|
+
userGroup: data.analysisSubject ? [] : data.userGroup,
|
|
237
|
+
analysisSubject: data.analysisSubject ? data.analysisSubject : undefined,
|
|
238
|
+
analysisAttr: dimension.analysisAttr,
|
|
239
|
+
analysisIndex: dimension.analysisIndex
|
|
240
|
+
}));
|
|
241
|
+
};
|
|
242
|
+
var onChangeSubjectType = function onChangeSubjectType(type) {
|
|
243
|
+
setAnalysisSubjectType(type);
|
|
244
|
+
};
|
|
245
|
+
var onClickGenerateReport = function onClickGenerateReport() {
|
|
246
|
+
if (!chartRef.current) {
|
|
247
|
+
message.warning('未选择事件或查询失败!');
|
|
248
|
+
return;
|
|
249
|
+
}
|
|
250
|
+
var url = chartRef.current.instance.getDataURL();
|
|
251
|
+
var params = {
|
|
252
|
+
image: url,
|
|
253
|
+
context: {
|
|
254
|
+
api: '/web/sdk/v2/event/eventAnalytics',
|
|
255
|
+
queryParam: searchData
|
|
256
|
+
}
|
|
257
|
+
};
|
|
258
|
+
if (afterEditTarget) afterEditTarget('report', params);
|
|
259
|
+
};
|
|
260
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(BizLayout, {
|
|
261
|
+
showTitle: !panelId,
|
|
262
|
+
hasCollapse: true,
|
|
263
|
+
collapseRef: topPanelRef === null || topPanelRef === void 0 ? void 0 : (_topPanelRef$current4 = topPanelRef.current) === null || _topPanelRef$current4 === void 0 ? void 0 : _topPanelRef$current4.getCollapseRef(),
|
|
264
|
+
topPanel: /*#__PURE__*/React.createElement(TopPanel, {
|
|
265
|
+
ref: topPanelRef,
|
|
266
|
+
onChange: onChangeSearch,
|
|
267
|
+
loading: loading,
|
|
268
|
+
value: searchData,
|
|
269
|
+
subDisplay: subDisplay,
|
|
270
|
+
setIsCity: setIsCity,
|
|
271
|
+
setEnableSelectChart: setEnableSelectChart,
|
|
272
|
+
onChangeSubjectType: onChangeSubjectType
|
|
273
|
+
}),
|
|
274
|
+
toolbar: /*#__PURE__*/React.createElement(TopBar, {
|
|
275
|
+
eventData: eventData,
|
|
276
|
+
searchData: searchData,
|
|
277
|
+
platformChange: platformChange,
|
|
278
|
+
enableSelectChart: enableSelectChart,
|
|
279
|
+
onClickGenerateReport: onClickGenerateReport
|
|
280
|
+
})
|
|
281
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
282
|
+
className: classPrefix
|
|
283
|
+
}, /*#__PURE__*/React.createElement(SearchPanel, {
|
|
284
|
+
chartType: searchData === null || searchData === void 0 ? void 0 : searchData.chartType,
|
|
285
|
+
time: searchData === null || searchData === void 0 ? void 0 : searchData.time,
|
|
286
|
+
setIsCity: setIsCity,
|
|
287
|
+
setEnableSelectChart: setEnableSelectChart,
|
|
288
|
+
eventId: eventId,
|
|
289
|
+
enableSelectChart: enableSelectChart,
|
|
290
|
+
onChange: onChangeContent,
|
|
291
|
+
dimension: dimension,
|
|
292
|
+
setDimension: setDimension,
|
|
293
|
+
analysisSubjectType: analysisSubjectType,
|
|
294
|
+
refreshHandle: refreshHandle
|
|
295
|
+
}), /*#__PURE__*/React.createElement(ContentPanel, {
|
|
296
|
+
ref: chartRef,
|
|
297
|
+
isCity: isCity,
|
|
298
|
+
eventData: eventData,
|
|
299
|
+
searchData: searchData
|
|
300
|
+
}))));
|
|
301
|
+
});
|
|
302
|
+
export default EventContent;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
.event-content-topBar {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
justify-content: space-between;
|
|
5
|
+
> span {
|
|
6
|
+
color: #021429;
|
|
7
|
+
font-size: 16px;
|
|
8
|
+
}
|
|
9
|
+
.modules-event-topbar {
|
|
10
|
+
padding-right: 0;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
.event-content {
|
|
14
|
+
&-options {
|
|
15
|
+
display: flex;
|
|
16
|
+
justify-content: flex-end;
|
|
17
|
+
margin-bottom: 16px;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SearchValue } from '../../types';
|
|
2
|
+
export declare namespace EventContentProps {
|
|
3
|
+
interface Props {
|
|
4
|
+
elementId: number | undefined;
|
|
5
|
+
value: SearchValue;
|
|
6
|
+
show?: string[];
|
|
7
|
+
onSearching?: (flag: boolean) => void;
|
|
8
|
+
initSearch?: () => void;
|
|
9
|
+
onChangeShow?: (data: string[]) => void;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { AttributeSelect, AttrConditionTypes } from '@zgfe/business-lib';
|
|
2
|
+
import { bizAttributeSelectorValueProp } from '../../types';
|
|
3
|
+
import { EventGroup, UserProp, EnvProp } from '@zgfe/business-lib/es/attributeSelector/types';
|
|
4
|
+
import { SearchValue } from '../../types';
|
|
5
|
+
export declare const getMapChartData: (data: any) => any;
|
|
6
|
+
export declare const judgeFilterValue: (data: AttrConditionTypes.GroupValue | undefined, count: number) => boolean;
|
|
7
|
+
export declare const judgeIsCity: (name: string | undefined) => boolean;
|
|
8
|
+
export declare const judgeIsArea: (name: string | undefined) => boolean;
|
|
9
|
+
export declare const getValue: (param: bizAttributeSelectorValueProp, eventGroupList: EventGroup[] | undefined, eventEnvList: EnvProp[] | undefined, userPropList: UserProp[] | undefined, searchData?: SearchValue) => AttributeSelect.Value | undefined;
|
|
10
|
+
export declare const getNumberPanelData: (data: any) => Promise<unknown>;
|
|
11
|
+
export declare const normalOptions: (type: any) => {
|
|
12
|
+
label: string;
|
|
13
|
+
value: string;
|
|
14
|
+
}[];
|
|
15
|
+
export declare const normalEventOptions: {
|
|
16
|
+
label: string;
|
|
17
|
+
value: string;
|
|
18
|
+
}[];
|