@zgfe/modules-event 0.0.2-event.25 → 0.0.2-event.27
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.
|
@@ -40,9 +40,15 @@ var SearchPanel = function SearchPanel(props) {
|
|
|
40
40
|
setDimension = _useState8[1];
|
|
41
41
|
useEffect(function () {
|
|
42
42
|
if (props.chartType && props.chartType !== chart.value) {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
if (props.chartType.indexOf(',') !== -1) {
|
|
44
|
+
setChart({
|
|
45
|
+
value: props.chartType.split(',')[0]
|
|
46
|
+
});
|
|
47
|
+
} else {
|
|
48
|
+
setChart({
|
|
49
|
+
value: props.chartType
|
|
50
|
+
});
|
|
51
|
+
}
|
|
46
52
|
}
|
|
47
53
|
var _dimension = {
|
|
48
54
|
analysisIndex: 'number'
|
|
@@ -57,6 +63,13 @@ var SearchPanel = function SearchPanel(props) {
|
|
|
57
63
|
}
|
|
58
64
|
setDimension(_objectSpread({}, _dimension));
|
|
59
65
|
}, [props.chartType]);
|
|
66
|
+
useEffect(function () {
|
|
67
|
+
if (!props.enableSelectChart && chart.value === 'map') {
|
|
68
|
+
setChart({
|
|
69
|
+
value: 'line'
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
}, [props.enableSelectChart]);
|
|
60
73
|
var onChangeTime = function onChangeTime(val) {
|
|
61
74
|
if (timer) clearTimeout(timer);
|
|
62
75
|
setTimer(setTimeout(function () {
|
|
@@ -19,6 +19,7 @@ import { formTableData, getColumns } from '../../utils/formData';
|
|
|
19
19
|
import './styles/index.less';
|
|
20
20
|
import { getValue } from '../../modules/content/utils';
|
|
21
21
|
import { EventContext } from '../../types';
|
|
22
|
+
import { getEventAliasName } from '../../utils/formData';
|
|
22
23
|
import emptyImg from '../../style/image/empty.png';
|
|
23
24
|
var classPrefix = 'event-mi-table';
|
|
24
25
|
var EventTable = function EventTable(props) {
|
|
@@ -144,13 +145,13 @@ var EventTable = function EventTable(props) {
|
|
|
144
145
|
if (searchData.id && !searchData.dimension || !searchData.id) {
|
|
145
146
|
seriesNames.push(base64.encode('事件'));
|
|
146
147
|
}
|
|
147
|
-
var fname =
|
|
148
|
+
var fname = "\u4E8B\u4EF6_".concat((searchData === null || searchData === void 0 ? void 0 : searchData.name) ? getEventAliasName(searchData === null || searchData === void 0 ? void 0 : searchData.name, eventGroupList) : '事件概览');
|
|
148
149
|
var params = _objectSpread(_objectSpread({
|
|
149
150
|
appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
|
|
150
151
|
platform: (currentApp === null || currentApp === void 0 ? void 0 : currentApp.platform) || 0
|
|
151
152
|
}, searchData), {}, {
|
|
152
153
|
down: {
|
|
153
|
-
fname: fname,
|
|
154
|
+
fname: base64.encode(fname),
|
|
154
155
|
titles: seriesNames
|
|
155
156
|
}
|
|
156
157
|
});
|
|
@@ -77,8 +77,7 @@ var EventChart = function EventChart(props) {
|
|
|
77
77
|
var _params$chartType;
|
|
78
78
|
if (!params) return;
|
|
79
79
|
var chartData = ((_params$chartType = params.chartType) === null || _params$chartType === void 0 ? void 0 : _params$chartType.split(',')) || ['line'];
|
|
80
|
-
var type =
|
|
81
|
-
if (type === 'grid') type = 'line';
|
|
80
|
+
var type = chartData[0];
|
|
82
81
|
console.log('更新图表-params', props.type, type, params);
|
|
83
82
|
setChartType(props.type || type);
|
|
84
83
|
if (params.id) {
|
|
@@ -40,7 +40,7 @@ export default (function () {
|
|
|
40
40
|
};
|
|
41
41
|
return /*#__PURE__*/React.createElement(DemoWrapper, {
|
|
42
42
|
needMeta: true,
|
|
43
|
-
defaultApp:
|
|
43
|
+
defaultApp: 215
|
|
44
44
|
}, isDetail ? /*#__PURE__*/React.createElement("div", null, JSON.stringify(detailParams), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement(Button, {
|
|
45
45
|
onClick: function onClick() {
|
|
46
46
|
return setIsDetail(false);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgfe/modules-event",
|
|
3
|
-
"version": "0.0.2-event.
|
|
3
|
+
"version": "0.0.2-event.27",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"start": "dumi dev",
|
|
6
6
|
"docs:build": "dumi build",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"react": "^16.12.0 || ^17.0.0",
|
|
50
50
|
"yorkie": "^2.0.0"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "65d06c5e383f1acc0aea0de510fdfb0fdcb26608",
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"react-copy-to-clipboard": "^5.1.0",
|
|
55
55
|
"react-highlight": "^0.15.0"
|