@zgfe/modules-event 1.0.29-zhongyuan-event.1 → 1.0.29-zhongyuan-event.2
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.
|
@@ -25,7 +25,7 @@ import { Modal, message, Table, ConfigProvider, Empty, Tooltip, Typography } fro
|
|
|
25
25
|
import { ExclamationCircleOutlined } from '@ant-design/icons';
|
|
26
26
|
import { formTableData, getColumns } from '../../utils/formData';
|
|
27
27
|
import './styles/index.less';
|
|
28
|
-
import {
|
|
28
|
+
import { useGetValue } from '../../modules/content/utils';
|
|
29
29
|
import { EventContext } from '../../types';
|
|
30
30
|
import { getEventAliasName } from '../../utils/formData';
|
|
31
31
|
var classPrefix = 'event-mi-table';
|
|
@@ -190,7 +190,7 @@ var EventTable = function EventTable(props) {
|
|
|
190
190
|
seriesNames.push(base64.encode('用户群'));
|
|
191
191
|
}
|
|
192
192
|
if (searchData.dimension) {
|
|
193
|
-
seriesNames.push(base64.encode(
|
|
193
|
+
seriesNames.push(base64.encode(useGetValue(searchData.dimension, eventGroupList, eventEnvList, userPropList, searchData).label));
|
|
194
194
|
}
|
|
195
195
|
if (searchData.id && !searchData.dimension || !searchData.id) {
|
|
196
196
|
seriesNames.push(base64.encode('事件'));
|
|
@@ -15,7 +15,7 @@ import { Tooltip, Empty } from 'antd';
|
|
|
15
15
|
import { BizChart, BizGlobalDataContext, ajax, BizLoading, BizEmpty } from '@zgfe/business-lib';
|
|
16
16
|
import { EventTable } from '../../components';
|
|
17
17
|
import { judgeIsCity } from '../content/utils';
|
|
18
|
-
import {
|
|
18
|
+
import { useGetValue, getMapChartData } from '../../modules/content/utils';
|
|
19
19
|
import { getShowColor, getUserGroupsCompareData, getSortData, getChartDataEventAliasName, formTableData, sortOriginalData } from '../../utils/formData';
|
|
20
20
|
import _ from 'lodash';
|
|
21
21
|
import moment from 'moment';
|
|
@@ -95,8 +95,8 @@ var EventChart = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
95
95
|
if (completedSearchData.id) {
|
|
96
96
|
var dimensions = completedSearchData.dimension;
|
|
97
97
|
if (type === 'map' && dimensions) {
|
|
98
|
-
var
|
|
99
|
-
setIsCity(judgeIsCity((
|
|
98
|
+
var _useGetValue;
|
|
99
|
+
setIsCity(judgeIsCity((_useGetValue = useGetValue(dimensions, eventGroupList, eventEnvList, userPropList)) === null || _useGetValue === void 0 ? void 0 : _useGetValue.name));
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
102
|
}, [completedSearchData, props.type]);
|
|
@@ -6,7 +6,7 @@ export declare const getMapChartData: (data: any) => any;
|
|
|
6
6
|
export declare const judgeFilterValue: (data: AttrConditionTypes.GroupValue | undefined, count: number) => boolean;
|
|
7
7
|
export declare const judgeIsCity: (name: string | undefined) => boolean;
|
|
8
8
|
export declare const judgeIsArea: (name: string | undefined) => boolean;
|
|
9
|
-
export declare const
|
|
9
|
+
export declare const useGetValue: (param: bizAttributeSelectorValueProp, eventGroupList: EventGroup[] | undefined, eventEnvList: EnvProp[] | undefined, userPropList: UserProp[] | undefined, searchData?: SearchValue) => AttributeSelect.Value | undefined;
|
|
10
10
|
export declare const getNumberPanelData: (data: any) => Promise<unknown>;
|
|
11
11
|
export declare const normalOptions: (type: any) => {
|
|
12
12
|
label: string;
|
|
@@ -20,8 +20,6 @@ import { fetchEventAttrs } from '@zgfe/business-lib/es/utils/eventApi';
|
|
|
20
20
|
import { Apis } from '../../constants';
|
|
21
21
|
import _ from 'lodash';
|
|
22
22
|
import { useContext } from 'react';
|
|
23
|
-
var _useContext = useContext(BizGlobalDataContext),
|
|
24
|
-
currentApp = _useContext.currentApp;
|
|
25
23
|
export var getMapChartData = function getMapChartData(data) {
|
|
26
24
|
var _data$series;
|
|
27
25
|
var _data = _.cloneDeep(data);
|
|
@@ -62,7 +60,9 @@ export var judgeIsArea = function judgeIsArea(name) {
|
|
|
62
60
|
var areaData = ['current_area', 'current_city', 'area', 'city'];
|
|
63
61
|
return name && areaData.indexOf(name) !== -1 ? true : false;
|
|
64
62
|
};
|
|
65
|
-
export var
|
|
63
|
+
export var useGetValue = function useGetValue(param, eventGroupList, eventEnvList, userPropList, searchData) {
|
|
64
|
+
var _useContext = useContext(BizGlobalDataContext),
|
|
65
|
+
currentApp = _useContext.currentApp;
|
|
66
66
|
var res = undefined;
|
|
67
67
|
if ((param === null || param === void 0 ? void 0 : param.propCategory) === 'envProp') {
|
|
68
68
|
eventEnvList === null || eventEnvList === void 0 ? void 0 : eventEnvList.forEach(function (attr) {
|
package/es/utils/formData.js
CHANGED
|
@@ -13,7 +13,7 @@ import { chartColors } from '../constants/color';
|
|
|
13
13
|
import { PropCategory } from '@zgfe/business-lib/es/attributeSelector/types';
|
|
14
14
|
import { Tooltip } from 'antd';
|
|
15
15
|
import '../style/index.less';
|
|
16
|
-
import {
|
|
16
|
+
import { useGetValue } from '../modules/content/utils';
|
|
17
17
|
var classPrefix = 'event-form-data';
|
|
18
18
|
export function sortOriginalData(data, sorter) {
|
|
19
19
|
var columnKey = sorter.columnKey,
|
|
@@ -79,9 +79,9 @@ export function getColumns(eventGroupList, userPropList, eventEnvList, columnDat
|
|
|
79
79
|
});
|
|
80
80
|
}
|
|
81
81
|
if (searchData.dimension) {
|
|
82
|
-
var
|
|
82
|
+
var _useGetValue;
|
|
83
83
|
data.push({
|
|
84
|
-
title: (
|
|
84
|
+
title: (_useGetValue = useGetValue(searchData.dimension, eventGroupList, eventEnvList, userPropList)) === null || _useGetValue === void 0 ? void 0 : _useGetValue.label,
|
|
85
85
|
width: 180,
|
|
86
86
|
dataIndex: 'dimension',
|
|
87
87
|
key: 'dimension',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgfe/modules-event",
|
|
3
|
-
"version": "1.0.29-zhongyuan-event.
|
|
3
|
+
"version": "1.0.29-zhongyuan-event.2",
|
|
4
4
|
"module": "es/index.js",
|
|
5
5
|
"typings": "es/index.d.ts",
|
|
6
6
|
"private": false,
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"react": "^16.12.0 || ^17.0.0",
|
|
55
55
|
"yorkie": "^2.0.0"
|
|
56
56
|
},
|
|
57
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "da03822e4a1751cecd3170a4610be63151067cb6",
|
|
58
58
|
"gitHooks": {
|
|
59
59
|
"pre-commit": "lint-staged"
|
|
60
60
|
}
|