@zgfe/business-lib 1.0.0-beta.1 → 1.0.0-beta.4
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/analysisLayout/demo/index.js +1 -1
- package/es/analysisLayout/index.d.ts +28 -0
- package/es/analysisLayout/index.js +4 -5
- package/es/analysisLayout/index.less +10 -4
- package/es/assets/iconfont/iconfont.css +123 -0
- package/es/assets/iconfont/iconfont.js +46 -0
- package/es/assets/iconfont/iconfont.json +198 -0
- package/es/assets/iconfont/iconfont.ttf +0 -0
- package/es/assets/iconfont/iconfont.woff +0 -0
- package/es/assets/iconfont/iconfont.woff2 +0 -0
- package/es/attributeSelector/demo/multi.js +1 -1
- package/es/attributeSelector/demo/multiForm.js +1 -1
- package/es/attributeSelector/demo/single.js +1 -1
- package/es/attributeSelector/demo/singleForm.js +1 -1
- package/es/attributeSelector/group.js +1 -1
- package/es/attributeSelector/index.js +2 -1
- package/es/attributeSelector/index.less +2 -2
- package/es/chart/demo/bar.js +7 -12
- package/es/chart/demo/data/data.d.ts +8 -0
- package/es/chart/demo/data/data.js +28 -0
- package/es/chart/demo/data/data2.d.ts +8 -0
- package/es/chart/demo/data/data2.js +7 -0
- package/es/chart/demo/data/data3.d.ts +10 -0
- package/es/chart/demo/data/data3.js +584 -0
- package/es/chart/demo/index.js +6 -5
- package/es/chart/demo/map.d.ts +2 -0
- package/es/chart/demo/map.js +11 -0
- package/es/chart/demo/pie.js +5 -22
- package/es/chart/index.d.ts +37 -17
- package/es/chart/index.js +45 -22
- package/es/chart/type.d.ts +22 -0
- package/es/chart/type.js +1 -0
- package/es/chart/util/chartConfig.d.ts +108 -0
- package/es/chart/util/chartConfig.js +379 -0
- package/es/chart/{color.d.ts → util/color.d.ts} +0 -0
- package/es/chart/{color.js → util/color.js} +0 -0
- package/es/chart/util/data/china.js +530 -0
- package/es/chart/util/data/cityGeoCoord.d.ts +22553 -0
- package/es/chart/util/data/cityGeoCoord.js +22552 -0
- package/es/chart/util/data/provinceGeoCoord.d.ts +343 -0
- package/es/chart/util/data/provinceGeoCoord.js +9258 -0
- package/es/chart/util/formatData.d.ts +13 -0
- package/es/chart/util/formatData.js +56 -0
- package/es/chart/util/formatOption.d.ts +5 -0
- package/es/chart/util/formatOption.js +91 -0
- package/es/chart/util/mapUtil.d.ts +8 -0
- package/es/chart/util/mapUtil.js +195 -0
- package/es/commonStyle/icon.less +32 -5
- package/es/commonStyle/index.less +3 -171
- package/es/commonStyle/select.less +3 -12
- package/es/commonStyle/theme.less +80 -39
- package/es/commonStyle/variable.less +5 -2
- package/es/components/iconFont.d.ts +5 -0
- package/es/components/iconFont.js +30 -0
- package/es/datePicker/demo/form.js +1 -1
- package/es/datePicker/demo/index.js +1 -1
- package/es/datePicker/index.js +8 -15
- package/es/datePicker/index.less +4 -28
- package/es/dialog/components/list.js +1 -1
- package/es/dialog/components/selectToInput.js +12 -1
- package/es/dialog/components/style/list.less +1 -1
- package/es/dialog/components/style/tab.less +2 -2
- package/es/dialog/components/tab.js +1 -1
- package/es/dialog/demo/index.js +1 -1
- package/es/dialog/demo/index2.js +20 -2
- package/es/dialog/demo/index3.js +1 -1
- package/es/dialog/style/index.less +7 -1
- package/es/eventSelector/demo/form.js +1 -1
- package/es/eventSelector/demo/index.js +1 -1
- package/es/eventSelector/demo/nodata.js +1 -1
- package/es/eventSelector/index.d.ts +1 -1
- package/es/eventSelector/index.js +3 -13
- package/es/eventSelector/{cascade.less → index.less} +2 -1
- package/es/globalAttributes/demo/index.js +1 -1
- package/es/globalAttributes/index.js +2 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -4
- package/es/multipleSelector/demo/index.js +1 -1
- package/es/multipleSelector/index.js +2 -8
- package/es/multipleSelector/index.less +23 -25
- package/es/select/demo/index.js +34 -5
- package/es/select/index.d.ts +2 -1
- package/es/select/index.js +32 -9
- package/es/select/index.less +1 -0
- package/es/table/demo/index.js +1 -1
- package/es/table/demo/index2.js +1 -1
- package/es/table/index.js +1 -1
- package/es/table/index.less +78 -41
- package/es/targetConditionGroup/components/conditionItem.js +3 -3
- package/es/targetConditionGroup/components/style/group.less +1 -1
- package/es/targetConditionGroup/components/style/index.less +1 -1
- package/es/targetConditionGroup/data/operates.js +5 -5
- package/es/targetConditionGroup/demo/form.js +1 -1
- package/es/targetConditionGroup/demo/index.js +1 -1
- package/es/targetConditionGroup/index.js +2 -1
- package/es/targetConditionGroup/index.less +1 -2
- package/es/targetSelector/components/BizCascadeBox.d.ts +1 -1
- package/es/targetSelector/components/BizCascadeBox.js +1 -1
- package/es/targetSelector/demo/form.js +1 -1
- package/es/targetSelector/demo/index.js +1 -1
- package/es/targetSelector/demo/nodata.js +1 -1
- package/es/targetSelector/index.js +1 -2
- package/es/targetSelector/index.less +1 -26
- package/es/userGroup/demo/cluster.js +1 -1
- package/es/userGroup/demo/index.js +1 -1
- package/es/userGroup/index.js +1 -2
- package/es/userGroup/index.less +1 -1
- package/es/userGroup/userCluster.js +2 -1
- package/package.json +1 -1
- package/es/chart/chartConfig.d.ts +0 -28
- package/es/chart/chartConfig.js +0 -256
- package/es/chart/demo/data.d.ts +0 -11
- package/es/chart/demo/data.js +0 -37
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { DataProps } from '../type';
|
|
2
|
+
export declare const formatPieData: (data: DataProps, showAll: boolean, showMap: {
|
|
3
|
+
[x: string]: any;
|
|
4
|
+
}, showList?: any[] | undefined) => {
|
|
5
|
+
name: string;
|
|
6
|
+
value: number;
|
|
7
|
+
}[];
|
|
8
|
+
export declare const formatChartData: (data: DataProps, reverseXAxis: boolean, showMap: {
|
|
9
|
+
[x: string]: any;
|
|
10
|
+
}, showList?: any[] | undefined) => {
|
|
11
|
+
x_axis: string[];
|
|
12
|
+
series: any;
|
|
13
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { chartColors } from './color';
|
|
2
|
+
export var formatPieData = function formatPieData(data, showAll, showMap, showList) {
|
|
3
|
+
var list = [];
|
|
4
|
+
var other = {
|
|
5
|
+
name: '其它',
|
|
6
|
+
value: 0
|
|
7
|
+
};
|
|
8
|
+
data.series.forEach(function (item) {
|
|
9
|
+
var series = {
|
|
10
|
+
name: item.names.join('-'),
|
|
11
|
+
value: item.values[0]
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
if (showAll) {
|
|
15
|
+
list.push(series);
|
|
16
|
+
} else {
|
|
17
|
+
if (showList && showMap[series.name] || !showList && list.length < 10) {
|
|
18
|
+
// 数据被showList命中,或者没定义showList,但位于前十的记录
|
|
19
|
+
list.push(series);
|
|
20
|
+
} else {
|
|
21
|
+
other.value += item.values[0];
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
if (!showAll && other.value > 0) list.push(other);
|
|
26
|
+
return list;
|
|
27
|
+
};
|
|
28
|
+
export var formatChartData = function formatChartData(data, reverseXAxis, showMap, showList) {
|
|
29
|
+
if (reverseXAxis) {
|
|
30
|
+
var x_axis = [];
|
|
31
|
+
var sData = [];
|
|
32
|
+
data.series.forEach(function (seriesItem, index) {
|
|
33
|
+
x_axis.push(seriesItem.names.join('-'));
|
|
34
|
+
|
|
35
|
+
if (reverseXAxis && showList && !showMap[data.series[index].names.join('-')]) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
sData.push({
|
|
40
|
+
name: x_axis[index],
|
|
41
|
+
value: seriesItem.values[0],
|
|
42
|
+
itemStyle: {
|
|
43
|
+
normal: {
|
|
44
|
+
color: chartColors[sData.length]
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
return {
|
|
50
|
+
x_axis: x_axis,
|
|
51
|
+
series: sData
|
|
52
|
+
};
|
|
53
|
+
} else {
|
|
54
|
+
return data;
|
|
55
|
+
}
|
|
56
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
declare const tooltipFormatterDefault: (params: any) => string;
|
|
2
|
+
declare const yAxisFormatterDefault: (value: number) => string;
|
|
3
|
+
declare const xAxisFormatterDefault: (value: string) => string;
|
|
4
|
+
declare const mapTooltipFormatter: (params: any) => string | undefined;
|
|
5
|
+
export { tooltipFormatterDefault, xAxisFormatterDefault, yAxisFormatterDefault, mapTooltipFormatter, };
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import util from '../../utils/util';
|
|
2
|
+
|
|
3
|
+
var tooltipFormatterDefault = function tooltipFormatterDefault(params) {
|
|
4
|
+
var xDate = params[0].name;
|
|
5
|
+
var xLabel = xDate;
|
|
6
|
+
|
|
7
|
+
if (/^\d{4}-\d{2}-\d{2}$/.test(xLabel)) {
|
|
8
|
+
// 处理日期
|
|
9
|
+
xLabel = xLabel.replace(/\d{4}-/, '');
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
var htmlArray = [];
|
|
13
|
+
|
|
14
|
+
if (params.length > 1) {
|
|
15
|
+
htmlArray.push("<span class=\"biz-chart-tooltip-title\">".concat(xLabel, "</span>"));
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
params.forEach(function (item) {
|
|
19
|
+
var lineLabel = item.value;
|
|
20
|
+
|
|
21
|
+
if (item.seriesName.indexOf('CTR') > -1) {
|
|
22
|
+
lineLabel += '%';
|
|
23
|
+
} else {
|
|
24
|
+
lineLabel = util.toThousands(lineLabel);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
htmlArray.push("<div class=\"biz-chart-tooltip-item\"><span class=\"biz-chart-tooltip-content\">".concat(item.marker).concat(params.length > 1 ? item.seriesName : item.name, ":</span> <span class=\"biz-chart-tooltip-value\">").concat(lineLabel, "</span></div>"));
|
|
28
|
+
});
|
|
29
|
+
return htmlArray.join('');
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
var yAxisFormatterDefault = function yAxisFormatterDefault(value) {
|
|
33
|
+
if (parseFloat(String(value)) >= 1000) {
|
|
34
|
+
return util.toThousands(parseFloat((value / 1000).toFixed(1))) + 'k';
|
|
35
|
+
} else {
|
|
36
|
+
return String(value);
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
var xAxisFormatterDefault = function xAxisFormatterDefault(value) {
|
|
41
|
+
if (/^\d{4}-\d{2}-\d{2}$/.test(value)) {
|
|
42
|
+
// 处理日期
|
|
43
|
+
return value.replace(/\d{4}-/, '');
|
|
44
|
+
} else if (/^\d{4}-\d{2}-\d{2}\|\d{4}-\d{2}-\d{2}$/.test(value)) {
|
|
45
|
+
// 周、月日期
|
|
46
|
+
var dates = value.match(/\d{4}-\d{2}-\d{2}/g);
|
|
47
|
+
return dates ? dates[0].replace(/\d{4}-/, '') + '~' + dates[1].replace(/\d{4}-/, '') : value;
|
|
48
|
+
} else {
|
|
49
|
+
value = util.strMiddleSplit(value);
|
|
50
|
+
|
|
51
|
+
if (/:/.test(value)) {
|
|
52
|
+
return value.replace(/\d{4}-\d{2}-\d{2}\s/, '');
|
|
53
|
+
} else if (/,/.test(value)) {
|
|
54
|
+
return value.replace(/,/g, '-');
|
|
55
|
+
} else {
|
|
56
|
+
return value;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
var mapTooltipFormatter = function mapTooltipFormatter(params) {
|
|
62
|
+
console.log('t00l>>', params);
|
|
63
|
+
if (params.data === null || params.data === undefined) return;
|
|
64
|
+
var data = params.data;
|
|
65
|
+
|
|
66
|
+
if (data.childrenOptions && data.childrenOptions.length) {
|
|
67
|
+
var series = [];
|
|
68
|
+
var childrenOptions = data.childrenOptions;
|
|
69
|
+
childrenOptions.forEach(function (option) {
|
|
70
|
+
var label = option.name || option.names.join('-');
|
|
71
|
+
var value = option.value || option.values;
|
|
72
|
+
|
|
73
|
+
if (util.isArray(value)) {
|
|
74
|
+
value = value[value.length - 1];
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
series.push("<div class=\"biz-chart-tooltip-item\"><span class=\"biz-chart-tooltip-content\">".concat(label, ": </span><span class=\"biz-chart-tooltip-value\" style=\"color:#66ccff;\">").concat(util.toThousands(value), "</span></div>"));
|
|
78
|
+
});
|
|
79
|
+
return "".concat(series.join('<br/>'));
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
var dataValue = data.value || data.values;
|
|
83
|
+
|
|
84
|
+
if (util.isArray(dataValue)) {
|
|
85
|
+
dataValue = dataValue[dataValue.length - 1];
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
return "<div class=\"biz-chart-tooltip-item\"><span class=\"biz-chart-tooltip-content\">".concat(data.name || data.names.join('-'), ": </span><span style=\"color:#66ccff;\">").concat(util.toThousands(dataValue), "</span></div>");
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
export { tooltipFormatterDefault, xAxisFormatterDefault, yAxisFormatterDefault, mapTooltipFormatter };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DataProps, ItemDataProps } from '../type';
|
|
2
|
+
declare const citySeries: (mapStore: DataProps, haveUserGroup: boolean) => ItemDataProps[];
|
|
3
|
+
declare const provinceSeries: (data: DataProps, haveUserGroup?: boolean | undefined) => any;
|
|
4
|
+
declare const maxMinValue: (series: ItemDataProps) => {
|
|
5
|
+
max: number;
|
|
6
|
+
min: number;
|
|
7
|
+
};
|
|
8
|
+
export { provinceSeries, citySeries, maxMinValue };
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
2
|
+
|
|
3
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
|
+
|
|
5
|
+
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); }
|
|
6
|
+
|
|
7
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
8
|
+
|
|
9
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
10
|
+
|
|
11
|
+
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; }
|
|
12
|
+
|
|
13
|
+
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); }
|
|
14
|
+
|
|
15
|
+
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; }
|
|
16
|
+
|
|
17
|
+
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; }
|
|
18
|
+
|
|
19
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
20
|
+
|
|
21
|
+
import util from '../../utils/util';
|
|
22
|
+
import cityGeoCoord from './data/cityGeoCoord';
|
|
23
|
+
import provinceGeoCoord from './data/provinceGeoCoord';
|
|
24
|
+
|
|
25
|
+
var citySeries = function citySeries(mapStore, haveUserGroup) {
|
|
26
|
+
var backGroundMapSeries = {
|
|
27
|
+
type: 'map',
|
|
28
|
+
map: 'china',
|
|
29
|
+
showLegendSymbol: false,
|
|
30
|
+
top: 20,
|
|
31
|
+
bottom: 20,
|
|
32
|
+
data: [] // 省份着色背景地图数据
|
|
33
|
+
|
|
34
|
+
};
|
|
35
|
+
var scatterSeries = {
|
|
36
|
+
name: '',
|
|
37
|
+
type: 'scatter',
|
|
38
|
+
coordinateSystem: 'geo',
|
|
39
|
+
symbolSize: 8,
|
|
40
|
+
data: [] // 城市散点图数据
|
|
41
|
+
|
|
42
|
+
};
|
|
43
|
+
var provinceMapData = {};
|
|
44
|
+
mapStore.x_axis.forEach(function (xItem, i) {
|
|
45
|
+
scatterSeries.name = xItem;
|
|
46
|
+
mapStore.series.forEach(function (cityItem) {
|
|
47
|
+
var cityName = cityItem.names[cityItem.names.length - 1];
|
|
48
|
+
cityName = cityName.replace(/(市|省|自治区)$/, '');
|
|
49
|
+
var cityCoordObj = cityGeoCoord[cityName]; // 城市坐标对象
|
|
50
|
+
|
|
51
|
+
if (cityCoordObj) {
|
|
52
|
+
var cityValue = cityItem.values[i];
|
|
53
|
+
var scatterItem = {
|
|
54
|
+
name: cityCoordObj.name,
|
|
55
|
+
isCity: true,
|
|
56
|
+
value: [cityCoordObj.log, cityCoordObj.lat, cityValue],
|
|
57
|
+
childrenOptions: cityItem.userGroupCompareData
|
|
58
|
+
};
|
|
59
|
+
scatterSeries.data.push(scatterItem); // 计算省份数据,注有用户群对比时,因无法去重,导致省份数据不准,目前省份数据只做颜色区分,不做数据展示,后续产品方案会修改
|
|
60
|
+
|
|
61
|
+
var provinceObj = cityCoordObj.province; // 省份坐标对象
|
|
62
|
+
|
|
63
|
+
var provinceName = provinceObj ? provinceObj.name.replace(/(省|市)$/, '') : '';
|
|
64
|
+
var currentMapData = provinceMapData[provinceName];
|
|
65
|
+
var currentMapOptions = currentMapData ? currentMapData.childrenOptions : [];
|
|
66
|
+
provinceMapData[provinceName] = {
|
|
67
|
+
name: provinceName,
|
|
68
|
+
isProvince: true,
|
|
69
|
+
value: currentMapData ? currentMapData.value + cityValue : cityValue,
|
|
70
|
+
childrenOptions: currentMapOptions.concat(haveUserGroup ? cityItem.userGroupCompareData : [cityItem])
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
for (var j in provinceMapData) {
|
|
77
|
+
backGroundMapSeries.data.push(_objectSpread({
|
|
78
|
+
itemStyle: {
|
|
79
|
+
color: '#ccccef',
|
|
80
|
+
opacity: 0.5
|
|
81
|
+
}
|
|
82
|
+
}, provinceMapData[j]));
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return [scatterSeries, backGroundMapSeries];
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
var provinceSeries = function provinceSeries(data, haveUserGroup) {
|
|
89
|
+
var series = [];
|
|
90
|
+
var mapStore = formatData(data, haveUserGroup);
|
|
91
|
+
mapStore.x_axis.forEach(function (xItem, i) {
|
|
92
|
+
var item = {
|
|
93
|
+
name: xItem,
|
|
94
|
+
type: 'map',
|
|
95
|
+
map: 'china',
|
|
96
|
+
roam: false,
|
|
97
|
+
top: 20,
|
|
98
|
+
bottom: 20,
|
|
99
|
+
label: {
|
|
100
|
+
show: true,
|
|
101
|
+
color: '#565656' // formatter: (params: { name: string }) => {
|
|
102
|
+
// return params.name.replace(/(市|省|自治区|维吾尔自治区|特别行政区|壮族自治区|回族自治区)$/, '')
|
|
103
|
+
// }
|
|
104
|
+
|
|
105
|
+
},
|
|
106
|
+
showLegendSymbol: false,
|
|
107
|
+
data: []
|
|
108
|
+
};
|
|
109
|
+
mapStore.series.forEach(function (provinceItem) {
|
|
110
|
+
var name = provinceItem.name || provinceItem.names;
|
|
111
|
+
var provinceName = _typeof(name) === 'object' ? name[name.length - 1] : name;
|
|
112
|
+
provinceName = provinceName.replace(/(市|省|自治区)$/, '');
|
|
113
|
+
var provinceCoordObj = provinceGeoCoord[provinceName];
|
|
114
|
+
name = _typeof(name) === 'object' ? name.join('-') : name;
|
|
115
|
+
name = name.replace(/(市|省|自治区)$/, '');
|
|
116
|
+
|
|
117
|
+
if (provinceCoordObj) {
|
|
118
|
+
// 过滤json库中不存在的省
|
|
119
|
+
item.data.push({
|
|
120
|
+
name: name,
|
|
121
|
+
isProvince: true,
|
|
122
|
+
value: provinceItem.values[i],
|
|
123
|
+
childrenOptions: provinceItem.userGroupCompareData
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
series.push(item);
|
|
128
|
+
});
|
|
129
|
+
return series;
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
var maxMinValue = function maxMinValue(series) {
|
|
133
|
+
var max = 100;
|
|
134
|
+
var min = 0;
|
|
135
|
+
var valueArr = [];
|
|
136
|
+
series.data.forEach(function (item) {
|
|
137
|
+
var value = item.hasOwnProperty('value') ? item.value : item.values;
|
|
138
|
+
|
|
139
|
+
if (util.isArray(value)) {
|
|
140
|
+
value = value[value.length - 1];
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
valueArr = valueArr.concat([value]);
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
if (valueArr.length) {
|
|
147
|
+
max = Math.max.apply(Math, _toConsumableArray(valueArr));
|
|
148
|
+
min = Math.min.apply(Math, _toConsumableArray(valueArr));
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
if (max <= min) {
|
|
152
|
+
max = min + 1;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
return {
|
|
156
|
+
max: max,
|
|
157
|
+
min: min
|
|
158
|
+
};
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
var formatData = function formatData(seriesData, haveUserGroup) {
|
|
162
|
+
if (haveUserGroup) {
|
|
163
|
+
// 有用户群时增加userGroupCompareData
|
|
164
|
+
var store = {
|
|
165
|
+
x_axis: seriesData.x_axis,
|
|
166
|
+
series: []
|
|
167
|
+
};
|
|
168
|
+
var areaObjMap = {};
|
|
169
|
+
seriesData.series.forEach(function (item) {
|
|
170
|
+
var areaName = item.names[item.names.length - 1];
|
|
171
|
+
|
|
172
|
+
if (!areaObjMap[areaName]) {
|
|
173
|
+
areaObjMap[areaName] = {
|
|
174
|
+
names: [areaName],
|
|
175
|
+
values: item.values,
|
|
176
|
+
userGroupCompareData: [item]
|
|
177
|
+
};
|
|
178
|
+
} else {
|
|
179
|
+
// 注:当有用户群对比时,此区域的values粗略计算为各用户群相加之和(此处未去重,因数据不准目前只做颜色展示,后续产品会修改)
|
|
180
|
+
areaObjMap[areaName].values = [areaObjMap[areaName].values[0] + item.values[0]];
|
|
181
|
+
areaObjMap[areaName].userGroupCompareData.push(item);
|
|
182
|
+
}
|
|
183
|
+
});
|
|
184
|
+
|
|
185
|
+
for (var area in areaObjMap) {
|
|
186
|
+
store.series.push(areaObjMap[area]);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
return store;
|
|
190
|
+
} else {
|
|
191
|
+
return seriesData;
|
|
192
|
+
}
|
|
193
|
+
};
|
|
194
|
+
|
|
195
|
+
export { provinceSeries, citySeries, maxMinValue };
|
package/es/commonStyle/icon.less
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
@import './
|
|
1
|
+
@import './variable.less';
|
|
2
2
|
|
|
3
3
|
.biz-icon-add {
|
|
4
4
|
width: fit-content;
|
|
5
5
|
padding: 2px;
|
|
6
|
-
color: @
|
|
6
|
+
color: @fontColor3;
|
|
7
7
|
font-weight: 400;
|
|
8
8
|
font-size: 14px;
|
|
9
9
|
line-height: 20px;
|
|
@@ -71,12 +71,16 @@
|
|
|
71
71
|
line-height: 20px;
|
|
72
72
|
border-radius: 4px;
|
|
73
73
|
cursor: pointer;
|
|
74
|
+
.anticon {
|
|
75
|
+
margin-right: 8px;
|
|
76
|
+
font-size: 24px;
|
|
77
|
+
}
|
|
74
78
|
}
|
|
75
79
|
|
|
76
80
|
.biz-btn-primary,
|
|
77
81
|
.ant-btn-primary {
|
|
78
82
|
color: #fff;
|
|
79
|
-
background:
|
|
83
|
+
background: @themeColor;
|
|
80
84
|
border: none;
|
|
81
85
|
|
|
82
86
|
&:hover,
|
|
@@ -88,8 +92,8 @@
|
|
|
88
92
|
}
|
|
89
93
|
|
|
90
94
|
&:disabled {
|
|
91
|
-
color:
|
|
92
|
-
background:
|
|
95
|
+
color: @disableColor;
|
|
96
|
+
background: @grayColor;
|
|
93
97
|
}
|
|
94
98
|
}
|
|
95
99
|
|
|
@@ -145,3 +149,26 @@
|
|
|
145
149
|
border-color: #165dff;
|
|
146
150
|
}
|
|
147
151
|
}
|
|
152
|
+
|
|
153
|
+
.ant-tooltip {
|
|
154
|
+
.ant-tooltip-inner {
|
|
155
|
+
border-radius: @boxRadius2;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
&.biz-tooltip {
|
|
159
|
+
width: auto;
|
|
160
|
+
|
|
161
|
+
.ant-tooltip-inner {
|
|
162
|
+
padding: 4px;
|
|
163
|
+
color: @fontColor;
|
|
164
|
+
background-color: #fff;
|
|
165
|
+
border-radius: 4px;
|
|
166
|
+
box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.ant-tooltip-arrow-content {
|
|
170
|
+
background-color: #fff;
|
|
171
|
+
--antd-arrow-background-color: #fff;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
@@ -1,171 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
@
|
|
3
|
-
|
|
4
|
-
@fontColor: #021429;
|
|
5
|
-
/* 中性色/次要-信息2 */
|
|
6
|
-
@fontColor2: #242541;
|
|
7
|
-
/* 中性色/次要-信息3 */
|
|
8
|
-
@fontColor3: #5f6085;
|
|
9
|
-
/* 图标颜色 */
|
|
10
|
-
@iconColor: #5f6085;
|
|
11
|
-
/* layout icon颜色 */
|
|
12
|
-
@layoutIconColor: #242541;
|
|
13
|
-
/* 标题颜色 */
|
|
14
|
-
@titleColor: #5f6085;
|
|
15
|
-
/* 灰色*/
|
|
16
|
-
@grayColor: #f6f6f6;
|
|
17
|
-
@disableColor: #cacdd4;
|
|
18
|
-
/* 边框圆角 */
|
|
19
|
-
@boxRadius: 4px;
|
|
20
|
-
/* 特殊圆角 */
|
|
21
|
-
@specialRadius: 10px;
|
|
22
|
-
/* icon圆角 */
|
|
23
|
-
@iconRadius: 3px;
|
|
24
|
-
/* hover背景色 */
|
|
25
|
-
@hoverBgColor: #e8efff;
|
|
26
|
-
/* 中性色/gray-8背景色 */
|
|
27
|
-
@grayBgColor: #fafafb;
|
|
28
|
-
/* hover字体颜色 */
|
|
29
|
-
@hoverColor: #165dff;
|
|
30
|
-
/* active背景色 */
|
|
31
|
-
@activeBgColor: #165dff;
|
|
32
|
-
/* active字体颜色 */
|
|
33
|
-
@activeColor: #ffffff;
|
|
34
|
-
/* 删除hover背景色 */
|
|
35
|
-
@deleteHoverBgColor: #fed5d1;
|
|
36
|
-
/* 删除hover字体色 */
|
|
37
|
-
@deleteHoverColor: #fb5547;
|
|
38
|
-
/* 按钮 */
|
|
39
|
-
@btnPrimaryBgColor: #165dff;
|
|
40
|
-
@btnPrimaryFontColor: #ffffff;
|
|
41
|
-
|
|
42
|
-
/* 字体大小 */
|
|
43
|
-
@fontSize: 14px;
|
|
44
|
-
/* 图标大小 */
|
|
45
|
-
@iconSize: 16px;
|
|
46
|
-
/* 字体weight */
|
|
47
|
-
@fontWeight: 400;
|
|
48
|
-
/* border */
|
|
49
|
-
@boxBorder: 1px solid #ecedf0;
|
|
50
|
-
@borderColor: #ecedf0;
|
|
51
|
-
/* padding */
|
|
52
|
-
@searchPadding: 24px;
|
|
53
|
-
@contentPadding: 32px;
|
|
54
|
-
/*下拉框宽度*/
|
|
55
|
-
@dropdownWidth: 284px;
|
|
56
|
-
/* 分析维度, 关系 */
|
|
57
|
-
@dropdownWidth2: 120px;
|
|
58
|
-
/*更多操作*/
|
|
59
|
-
@dropdownWidth3: 200px;
|
|
60
|
-
/* 指标下拉框= 200+284*/
|
|
61
|
-
@dropdownHeight: 400px;
|
|
62
|
-
|
|
63
|
-
/* 下拉框外框 */
|
|
64
|
-
@dropdownPadding: 8px;
|
|
65
|
-
/*下拉选项*/
|
|
66
|
-
@dropdownItemPadding: 14px 8px;
|
|
67
|
-
/**/
|
|
68
|
-
@selectItemHeight: 48px;
|
|
69
|
-
/*级联二级选择项*/
|
|
70
|
-
@selectItem2Height: 40px;
|
|
71
|
-
/*级联二级内边距*/
|
|
72
|
-
@selectItem2Padding: 8px 10px;
|
|
73
|
-
|
|
74
|
-
.boxBg {
|
|
75
|
-
color: @fontColor;
|
|
76
|
-
background-color: #fff;
|
|
77
|
-
&:hover:not(.box-active, .box-disabled) {
|
|
78
|
-
color: @hoverColor;
|
|
79
|
-
background-color: @hoverBgColor;
|
|
80
|
-
.biz-icon {
|
|
81
|
-
color: @hoverColor;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
.box-hover {
|
|
86
|
-
color: @hoverColor;
|
|
87
|
-
background-color: @hoverBgColor;
|
|
88
|
-
.biz-icon {
|
|
89
|
-
color: @hoverColor;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
.box-active {
|
|
93
|
-
color: @activeColor !important;
|
|
94
|
-
background-color: @activeBgColor;
|
|
95
|
-
.biz-icon {
|
|
96
|
-
color: @activeColor;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
.box-disabled {
|
|
100
|
-
color: @fontColor !important;
|
|
101
|
-
background-color: #f5f5f5;
|
|
102
|
-
cursor: not-allowed !important;
|
|
103
|
-
}
|
|
104
|
-
.biz-search {
|
|
105
|
-
box-sizing: border-box;
|
|
106
|
-
padding: 4px;
|
|
107
|
-
background: #f6f6f6;
|
|
108
|
-
border-radius: @specialRadius;
|
|
109
|
-
&:hover,
|
|
110
|
-
&.active {
|
|
111
|
-
background-color: @hoverBgColor;
|
|
112
|
-
.biz-search-box {
|
|
113
|
-
background-color: #fff;
|
|
114
|
-
border-color: #165dff;
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
.biz-search-box {
|
|
118
|
-
height: 40px;
|
|
119
|
-
background: #f6f6f6;
|
|
120
|
-
border-color: #f6f6f6;
|
|
121
|
-
border-radius: @specialRadius;
|
|
122
|
-
box-shadow: none;
|
|
123
|
-
|
|
124
|
-
input {
|
|
125
|
-
background: transparent;
|
|
126
|
-
}
|
|
127
|
-
.ant-input {
|
|
128
|
-
border: none;
|
|
129
|
-
}
|
|
130
|
-
&.small {
|
|
131
|
-
height: 32px;
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
.mb-12 {
|
|
137
|
-
margin-bottom: 12px;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
/*滚动条凹槽的颜色,还可以设置边框属性 */
|
|
141
|
-
::-webkit-scrollbar-track-piece {
|
|
142
|
-
background-color: #fff;
|
|
143
|
-
-webkit-border-radius: 10px;
|
|
144
|
-
-moz-border-radius: 10px;
|
|
145
|
-
border-radius: 10px;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
/*滚动条的宽度*/
|
|
149
|
-
::-webkit-scrollbar {
|
|
150
|
-
width: 10px;
|
|
151
|
-
height: 10px;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
/*滚动条的设置*/
|
|
155
|
-
::-webkit-scrollbar-thumb {
|
|
156
|
-
background-color: #cacdd4;
|
|
157
|
-
background-clip: padding-box;
|
|
158
|
-
border: 2px solid #fff;
|
|
159
|
-
-webkit-border-radius: 10px;
|
|
160
|
-
-moz-border-radius: 10px;
|
|
161
|
-
border-radius: 10px;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
/*滚动条鼠标移上去*/
|
|
165
|
-
::-webkit-scrollbar-thumb:hover {
|
|
166
|
-
// background-color: #bbb;
|
|
167
|
-
}
|
|
168
|
-
::-webkit-scrollbar-track-piece {
|
|
169
|
-
width: 6px;
|
|
170
|
-
height: 6px;
|
|
171
|
-
}
|
|
1
|
+
@import './theme.less';
|
|
2
|
+
@import './icon.less';
|
|
3
|
+
@import './select.less';
|
|
@@ -1,13 +1,4 @@
|
|
|
1
|
-
@import './
|
|
2
|
-
@import './theme.less';
|
|
3
|
-
|
|
4
|
-
/* 标题 */
|
|
5
|
-
|
|
6
|
-
/*下拉框样式重写*/
|
|
7
|
-
// .biz-select {
|
|
8
|
-
// width: 100%;
|
|
9
|
-
// color: @fontColor;
|
|
10
|
-
// }
|
|
1
|
+
@import './variable.less';
|
|
11
2
|
|
|
12
3
|
/*文本框样式*/
|
|
13
4
|
.biz-select-cotainer {
|
|
@@ -71,7 +62,7 @@
|
|
|
71
62
|
|
|
72
63
|
.biz-select-zhankai {
|
|
73
64
|
position: absolute;
|
|
74
|
-
top:
|
|
65
|
+
top: 5px;
|
|
75
66
|
right: 10px;
|
|
76
67
|
display: none;
|
|
77
68
|
color: @iconColor;
|
|
@@ -92,7 +83,7 @@
|
|
|
92
83
|
font-size: @fontSize;
|
|
93
84
|
line-height: 48px;
|
|
94
85
|
background: #ffffff;
|
|
95
|
-
border-radius: @
|
|
86
|
+
border-radius: @boxRadius2;
|
|
96
87
|
box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
|
|
97
88
|
}
|
|
98
89
|
|