@zgfe/business-lib 1.0.27-adanalysis.0 → 1.0.27-adanalysis.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.
- package/es/addToPanel/index.js +33 -16
- package/es/assets/iconfont/demo_index.html +647 -3
- package/es/assets/iconfont/iconfont.css +115 -3
- package/es/assets/iconfont/iconfont.js +37 -33
- package/es/assets/iconfont/iconfont.json +196 -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/assets/styles/resetAntd.less +7 -2
- package/es/attrConditions/components/stringList.js +1 -1
- package/es/attrConditions/components/valuesList.js +7 -5
- package/es/attrConditions/group.js +4 -4
- package/es/attrConditions/types.d.ts +1 -0
- package/es/attributeSelector/styles/index.less +31 -2
- package/es/attributeSelector/util.js +9 -1
- package/es/chart/demo/bar.js +3 -4
- package/es/chart/demo/data/data.d.ts +7 -0
- package/es/chart/demo/data/data.js +10 -0
- package/es/chart/demo/data/data3.d.ts +0 -2
- package/es/chart/demo/data/data3.js +15 -574
- package/es/chart/demo/map.js +1 -2
- package/es/chart/index.js +2 -2
- package/es/chart/util/chartOptionConfig.d.ts +1 -54
- package/es/chart/util/chartOptionConfig.js +13 -7
- package/es/chart/util/formatData.js +2 -1
- package/es/chart/util/formatOption.js +7 -23
- package/es/chart/util/mapUtil.d.ts +2 -2
- package/es/chart/util/mapUtil.js +59 -75
- package/es/cycleTime/demo/disable.d.ts +2 -0
- package/es/cycleTime/demo/disable.js +17 -0
- package/es/cycleTime/index.d.ts +1 -0
- package/es/cycleTime/index.js +12 -5
- package/es/cycleTime/month.d.ts +1 -0
- package/es/cycleTime/month.js +6 -3
- package/es/cycleTime/styles/month.less +12 -0
- package/es/datePicker/utils.js +3 -0
- package/es/eventSelector/index.js +2 -2
- package/es/eventSelector/listPanel.js +20 -5
- package/es/eventSelector/types.d.ts +1 -1
- package/es/layout/analysisLayout/demo/index.js +5 -1
- package/es/layout/analysisLayout/index.js +5 -5
- package/es/layout/analysisLayout/index.less +0 -6
- package/es/select/demo/multiple.js +3 -2
- package/es/select/handle.js +50 -12
- package/es/select/index.js +44 -9
- package/es/select/overlay.d.ts +1 -1
- package/es/select/overlay.js +4 -5
- package/es/select/styles/handle.less +50 -28
- package/es/select/types.d.ts +6 -0
- package/es/targetConditionGroup/index.js +3 -1
- package/es/targetConditionGroup/types.d.ts +1 -0
- package/es/targetSelector/index.js +13 -0
- package/es/targetSelector/styles/index.less +1 -0
- package/es/userCondition/conditions/styles/eventCondition.less +1 -1
- package/es/userCondition/conditions/styles/tagsCondition.less +1 -1
- package/es/userCondition/conditions/tagsCondition.js +26 -13
- package/es/userCondition/conditions/textDesc.js +29 -8
- package/es/userCondition/demo/index.js +5 -228
- package/es/userCondition/demo/mockData.d.ts +85 -0
- package/es/userCondition/demo/mockData.js +546 -0
- package/es/userCondition/types.d.ts +21 -3
- package/es/userCondition/util.d.ts +23 -1
- package/es/userCondition/util.js +39 -5
- package/es/userTagsSelector/cascaderOverlay.js +132 -42
- package/es/userTagsSelector/demo/index.js +12 -5
- package/es/userTagsSelector/groups/groupOption.js +3 -2
- package/es/userTagsSelector/groups/index.js +18 -11
- package/es/userTagsSelector/groups/styles/option.less +6 -1
- package/es/userTagsSelector/index.js +17 -3
- package/es/userTagsSelector/multipleCheckPanel/checkOption.js +2 -1
- package/es/userTagsSelector/multipleCheckPanel/index.js +7 -16
- package/es/userTagsSelector/styles/cascaderOverlay.less +9 -4
- package/es/userTagsSelector/types.d.ts +1 -10
- package/es/userTagsSelector/util.d.ts +1 -1
- package/es/userTagsSelector/util.js +6 -2
- package/es/utils/ajax.js +5 -1
- package/package.json +3 -3
|
@@ -38,8 +38,9 @@ export var formatChartData = function formatChartData(data, showAll, showList, r
|
|
|
38
38
|
if (reverseXAxis) {
|
|
39
39
|
x_axis.push(name);
|
|
40
40
|
sData.push({
|
|
41
|
-
name:
|
|
41
|
+
name: data.x_axis[0],
|
|
42
42
|
value: seriesItem.values[0],
|
|
43
|
+
label: name,
|
|
43
44
|
itemStyle: {
|
|
44
45
|
normal: {
|
|
45
46
|
color: colorData[sData.length]
|
|
@@ -16,11 +16,7 @@ var tooltipFormatterDefault = function tooltipFormatterDefault(params) {
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
var htmlArray = [];
|
|
19
|
-
|
|
20
|
-
if (params.length > 1) {
|
|
21
|
-
htmlArray.push("<div class=\"biz-chart-tooltip-title\">".concat(xLabel, "</div>"));
|
|
22
|
-
}
|
|
23
|
-
|
|
19
|
+
htmlArray.push("<div class=\"biz-chart-tooltip-title\">".concat(xLabel, "</div>"));
|
|
24
20
|
params.forEach(function (item) {
|
|
25
21
|
var lineLabel = item.value;
|
|
26
22
|
|
|
@@ -30,7 +26,7 @@ var tooltipFormatterDefault = function tooltipFormatterDefault(params) {
|
|
|
30
26
|
lineLabel = util.toThousands(lineLabel);
|
|
31
27
|
}
|
|
32
28
|
|
|
33
|
-
var name = (params.length > 1 ? item.seriesName : item.name).trim();
|
|
29
|
+
var name = (params.length > 1 ? item.seriesName : item.data && item.data.label ? item.data.label : item.name).trim();
|
|
34
30
|
htmlArray.push("<div class=\"biz-chart-tooltip-item\">\n <span class=\"biz-chart-tooltip-content\">\n <span class=\"biz-tooltip-marker\" style=\"background:".concat(item.color, "\"></span>").concat(name, "\n </span> \n <span class=\"biz-chart-tooltip-value\">").concat(lineLabel, "</span>\n </div>"));
|
|
35
31
|
});
|
|
36
32
|
return htmlArray.join('');
|
|
@@ -68,28 +64,16 @@ var mapTooltipFormatter = function mapTooltipFormatter(params) {
|
|
|
68
64
|
var data = params.data;
|
|
69
65
|
|
|
70
66
|
if (data.childrenOptions && data.childrenOptions.length) {
|
|
71
|
-
var
|
|
67
|
+
var htmlArray = [];
|
|
68
|
+
htmlArray.push("<div class=\"biz-chart-tooltip-title\">".concat(params.name, "</div>"));
|
|
72
69
|
var childrenOptions = data.childrenOptions;
|
|
73
70
|
childrenOptions.forEach(function (option) {
|
|
74
|
-
|
|
75
|
-
var value = option.value || option.values;
|
|
76
|
-
|
|
77
|
-
if (util.isArray(value)) {
|
|
78
|
-
value = value[value.length - 1];
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
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>"));
|
|
71
|
+
htmlArray.push("<div class=\"biz-chart-tooltip-item\">\n <span class=\"biz-chart-tooltip-content\">\n ".concat(option.name, "\n </span> \n <span class=\"biz-chart-tooltip-value\">").concat(util.toThousands(option.value), "</span>\n </div>"));
|
|
82
72
|
});
|
|
83
|
-
return
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
var dataValue = data.value || data.values;
|
|
87
|
-
|
|
88
|
-
if (util.isArray(dataValue)) {
|
|
89
|
-
dataValue = dataValue[dataValue.length - 1];
|
|
73
|
+
return htmlArray.join('');
|
|
90
74
|
}
|
|
91
75
|
|
|
92
|
-
return "<div class=\"biz-chart-tooltip-item\"><span class=\"biz-chart-tooltip-content\">".concat(data.name
|
|
76
|
+
return "<div class=\"biz-chart-tooltip-item\"><span class=\"biz-chart-tooltip-content\">".concat(data.name, ": </span><span>").concat(util.toThousands(data.value), "</span></div>");
|
|
93
77
|
};
|
|
94
78
|
|
|
95
79
|
var legendFormatterDefault = function legendFormatterDefault(label) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ChartTypes, ItemDataProps } from '../types';
|
|
2
|
-
declare const citySeries: (data: ChartTypes.Value
|
|
3
|
-
declare const provinceSeries: (data: ChartTypes.Value
|
|
2
|
+
declare const citySeries: (data: ChartTypes.Value) => ItemDataProps[];
|
|
3
|
+
declare const provinceSeries: (data: ChartTypes.Value) => any;
|
|
4
4
|
declare const maxMinValue: (series: ItemDataProps) => {
|
|
5
5
|
max: number;
|
|
6
6
|
min: number;
|
package/es/chart/util/mapUtil.js
CHANGED
|
@@ -10,8 +10,6 @@ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToAr
|
|
|
10
10
|
|
|
11
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
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
13
|
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
14
|
|
|
17
15
|
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; }
|
|
@@ -22,13 +20,13 @@ import util from '../../utils/util';
|
|
|
22
20
|
import cityGeoCoord from './data/cityGeoCoord';
|
|
23
21
|
import provinceGeoCoord from './data/provinceGeoCoord';
|
|
24
22
|
|
|
25
|
-
var citySeries = function citySeries(data
|
|
23
|
+
var citySeries = function citySeries(data) {
|
|
26
24
|
var backGroundMapSeries = {
|
|
27
25
|
type: 'map',
|
|
28
26
|
map: 'china',
|
|
29
27
|
showLegendSymbol: false,
|
|
30
|
-
top:
|
|
31
|
-
bottom:
|
|
28
|
+
top: 0,
|
|
29
|
+
bottom: 0,
|
|
32
30
|
data: []
|
|
33
31
|
};
|
|
34
32
|
var scatterSeries = {
|
|
@@ -39,33 +37,29 @@ var citySeries = function citySeries(data, haveUserGroup) {
|
|
|
39
37
|
data: []
|
|
40
38
|
};
|
|
41
39
|
var provinceMapData = {};
|
|
42
|
-
|
|
40
|
+
var mapStore = formatMapData(data, 'city');
|
|
41
|
+
mapStore.x_axis.forEach(function (xItem) {
|
|
43
42
|
scatterSeries.name = xItem;
|
|
44
|
-
|
|
45
|
-
var cityName = cityItem.
|
|
46
|
-
cityName = cityName.replace(/(市|省|自治区)$/, '');
|
|
43
|
+
mapStore.series.forEach(function (cityItem) {
|
|
44
|
+
var cityName = cityItem.name;
|
|
47
45
|
var cityCoordObj = cityGeoCoord[cityName];
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
value: currentMapData ? currentMapData.value + cityValue : cityValue,
|
|
66
|
-
childrenOptions: currentMapOptions.concat(haveUserGroup ? cityItem.userGroupCompareData : [cityItem])
|
|
67
|
-
};
|
|
68
|
-
}
|
|
46
|
+
var cityValue = cityItem.value;
|
|
47
|
+
var scatterItem = {
|
|
48
|
+
name: cityItem.name,
|
|
49
|
+
isCity: true,
|
|
50
|
+
value: [cityCoordObj.log, cityCoordObj.lat, cityValue],
|
|
51
|
+
childrenOptions: cityItem.childrenOptions
|
|
52
|
+
};
|
|
53
|
+
scatterSeries.data.push(scatterItem);
|
|
54
|
+
var provinceObj = cityCoordObj.province;
|
|
55
|
+
var provinceName = provinceObj ? provinceObj.name.replace(/(省|市)$/, '') : '';
|
|
56
|
+
var currentMapData = provinceMapData[provinceName];
|
|
57
|
+
var currentMapOptions = currentMapData ? currentMapData.childrenOptions : [];
|
|
58
|
+
provinceMapData[provinceName] = {
|
|
59
|
+
name: provinceName,
|
|
60
|
+
value: currentMapData ? currentMapData.value + cityValue : cityValue,
|
|
61
|
+
childrenOptions: currentMapOptions.concat([cityItem])
|
|
62
|
+
};
|
|
69
63
|
});
|
|
70
64
|
});
|
|
71
65
|
|
|
@@ -81,17 +75,17 @@ var citySeries = function citySeries(data, haveUserGroup) {
|
|
|
81
75
|
return [scatterSeries, backGroundMapSeries];
|
|
82
76
|
};
|
|
83
77
|
|
|
84
|
-
var provinceSeries = function provinceSeries(data
|
|
78
|
+
var provinceSeries = function provinceSeries(data) {
|
|
85
79
|
var series = [];
|
|
86
|
-
var mapStore =
|
|
87
|
-
mapStore.x_axis.forEach(function (xItem
|
|
80
|
+
var mapStore = formatMapData(data, 'province');
|
|
81
|
+
mapStore.x_axis.forEach(function (xItem) {
|
|
88
82
|
var item = {
|
|
89
83
|
name: xItem,
|
|
90
84
|
type: 'map',
|
|
91
85
|
map: 'china',
|
|
92
86
|
roam: false,
|
|
93
|
-
top:
|
|
94
|
-
bottom:
|
|
87
|
+
top: 0,
|
|
88
|
+
bottom: 0,
|
|
95
89
|
label: {
|
|
96
90
|
show: true,
|
|
97
91
|
color: '#565656'
|
|
@@ -100,21 +94,7 @@ var provinceSeries = function provinceSeries(data, haveUserGroup) {
|
|
|
100
94
|
data: []
|
|
101
95
|
};
|
|
102
96
|
mapStore.series.forEach(function (provinceItem) {
|
|
103
|
-
|
|
104
|
-
var provinceName = _typeof(name) === 'object' ? name[name.length - 1] : name;
|
|
105
|
-
provinceName = provinceName.replace(/(市|省|自治区)$/, '');
|
|
106
|
-
var provinceCoordObj = provinceGeoCoord[provinceName];
|
|
107
|
-
name = _typeof(name) === 'object' ? name.join('-') : name;
|
|
108
|
-
name = name.replace(/(市|省|自治区)$/, '');
|
|
109
|
-
|
|
110
|
-
if (provinceCoordObj) {
|
|
111
|
-
item.data.push({
|
|
112
|
-
name: name,
|
|
113
|
-
isProvince: true,
|
|
114
|
-
value: provinceItem.values[i],
|
|
115
|
-
childrenOptions: provinceItem.userGroupCompareData
|
|
116
|
-
});
|
|
117
|
-
}
|
|
97
|
+
item.data.push(provinceItem);
|
|
118
98
|
});
|
|
119
99
|
series.push(item);
|
|
120
100
|
});
|
|
@@ -150,36 +130,40 @@ var maxMinValue = function maxMinValue(series) {
|
|
|
150
130
|
};
|
|
151
131
|
};
|
|
152
132
|
|
|
153
|
-
var
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
133
|
+
var formatMapData = function formatMapData(seriesData, type) {
|
|
134
|
+
var store = {
|
|
135
|
+
x_axis: seriesData.x_axis,
|
|
136
|
+
series: []
|
|
137
|
+
};
|
|
138
|
+
var areaObjMap = {};
|
|
139
|
+
seriesData.series.forEach(function (item) {
|
|
140
|
+
var areaName = item.names[0].replace(/(市|省|自治区)$/, '');
|
|
141
|
+
var targetName = item.names.slice(1).join(',');
|
|
142
|
+
var targeItem = {
|
|
143
|
+
name: targetName || areaName,
|
|
144
|
+
value: item.values[0]
|
|
158
145
|
};
|
|
159
|
-
var areaObjMap = {};
|
|
160
|
-
seriesData.series.forEach(function (item) {
|
|
161
|
-
var areaName = item.names[item.names.length - 1];
|
|
162
|
-
|
|
163
|
-
if (!areaObjMap[areaName]) {
|
|
164
|
-
areaObjMap[areaName] = {
|
|
165
|
-
names: [areaName],
|
|
166
|
-
values: item.values,
|
|
167
|
-
userGroupCompareData: [item]
|
|
168
|
-
};
|
|
169
|
-
} else {
|
|
170
|
-
areaObjMap[areaName].values = [areaObjMap[areaName].values[0] + item.values[0]];
|
|
171
|
-
areaObjMap[areaName].userGroupCompareData.push(item);
|
|
172
|
-
}
|
|
173
|
-
});
|
|
174
146
|
|
|
175
|
-
|
|
176
|
-
|
|
147
|
+
if (!areaObjMap[areaName]) {
|
|
148
|
+
areaObjMap[areaName] = {
|
|
149
|
+
name: areaName,
|
|
150
|
+
value: item.values[0],
|
|
151
|
+
childrenOptions: [targeItem]
|
|
152
|
+
};
|
|
153
|
+
} else {
|
|
154
|
+
areaObjMap[areaName].value += item.values[0];
|
|
155
|
+
areaObjMap[areaName].childrenOptions.push(targeItem);
|
|
177
156
|
}
|
|
157
|
+
});
|
|
158
|
+
var areaMap = type === 'province' ? provinceGeoCoord : cityGeoCoord;
|
|
178
159
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
160
|
+
for (var area in areaObjMap) {
|
|
161
|
+
if (areaMap[area]) {
|
|
162
|
+
store.series.push(areaObjMap[area]);
|
|
163
|
+
}
|
|
182
164
|
}
|
|
165
|
+
|
|
166
|
+
return store;
|
|
183
167
|
};
|
|
184
168
|
|
|
185
169
|
export { provinceSeries, citySeries, maxMinValue };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BizCycleTime } from '@zgfe/business-lib';
|
|
3
|
+
export default (function () {
|
|
4
|
+
function onChange(val) {
|
|
5
|
+
console.log(JSON.stringify(val));
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(BizCycleTime, {
|
|
9
|
+
value: {
|
|
10
|
+
unit: 3,
|
|
11
|
+
day: [17, 18, 20]
|
|
12
|
+
},
|
|
13
|
+
onChange: onChange,
|
|
14
|
+
disable: true,
|
|
15
|
+
multiple: true
|
|
16
|
+
}));
|
|
17
|
+
});
|
package/es/cycleTime/index.d.ts
CHANGED
package/es/cycleTime/index.js
CHANGED
|
@@ -26,7 +26,8 @@ export var CycleTimeUnit;
|
|
|
26
26
|
|
|
27
27
|
var BizCycleTime = function BizCycleTime(props) {
|
|
28
28
|
var multiple = props.multiple,
|
|
29
|
-
size = props.size
|
|
29
|
+
size = props.size,
|
|
30
|
+
disable = props.disable;
|
|
30
31
|
var classPrefix = 'biz-cycle-time';
|
|
31
32
|
var unitList = [{
|
|
32
33
|
label: '每日',
|
|
@@ -157,6 +158,7 @@ var BizCycleTime = function BizCycleTime(props) {
|
|
|
157
158
|
className: "".concat(classPrefix, "-unit"),
|
|
158
159
|
defaultValue: unit,
|
|
159
160
|
size: size,
|
|
161
|
+
disable: disable,
|
|
160
162
|
onChange: function onChange(v) {
|
|
161
163
|
setDay([]);
|
|
162
164
|
setTime(undefined);
|
|
@@ -169,7 +171,8 @@ var BizCycleTime = function BizCycleTime(props) {
|
|
|
169
171
|
defaultValue: time ? moment(time, 'hh:mm:ss') : undefined,
|
|
170
172
|
onChange: function onChange(time) {
|
|
171
173
|
setTime(time === null || time === void 0 ? void 0 : time.format('hh:mm:ss'));
|
|
172
|
-
}
|
|
174
|
+
},
|
|
175
|
+
disabled: disable
|
|
173
176
|
}), unit.value === CycleTimeUnit.week && /*#__PURE__*/React.createElement(BizSelect, {
|
|
174
177
|
options: days,
|
|
175
178
|
labelField: "label",
|
|
@@ -181,16 +184,20 @@ var BizCycleTime = function BizCycleTime(props) {
|
|
|
181
184
|
placeholder: props.placeholder,
|
|
182
185
|
onChange: function onChange(v) {
|
|
183
186
|
setDay(v);
|
|
184
|
-
}
|
|
187
|
+
},
|
|
188
|
+
disable: disable,
|
|
189
|
+
enableCreate: false
|
|
185
190
|
}), unit.value === CycleTimeUnit.month && /*#__PURE__*/React.createElement(MonthDay, {
|
|
186
191
|
placeholder: props.placeholder,
|
|
187
192
|
defaultValue: day,
|
|
188
|
-
onChange: setDayList
|
|
193
|
+
onChange: setDayList,
|
|
194
|
+
disable: disable
|
|
189
195
|
}));
|
|
190
196
|
};
|
|
191
197
|
|
|
192
198
|
BizCycleTime.defaultProps = {
|
|
193
199
|
multiple: false,
|
|
194
|
-
size: 'middle'
|
|
200
|
+
size: 'middle',
|
|
201
|
+
disable: false
|
|
195
202
|
};
|
|
196
203
|
export default BizCycleTime;
|
package/es/cycleTime/month.d.ts
CHANGED
package/es/cycleTime/month.js
CHANGED
|
@@ -18,6 +18,7 @@ import _ from 'lodash';
|
|
|
18
18
|
|
|
19
19
|
var MonthDay = function MonthDay(props) {
|
|
20
20
|
var classPrefix = 'biz-month-day';
|
|
21
|
+
var disable = props.disable;
|
|
21
22
|
|
|
22
23
|
var _useState = useState([]),
|
|
23
24
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -85,6 +86,7 @@ var MonthDay = function MonthDay(props) {
|
|
|
85
86
|
}
|
|
86
87
|
|
|
87
88
|
return /*#__PURE__*/React.createElement(Dropdown, {
|
|
89
|
+
disabled: disable,
|
|
88
90
|
overlay: /*#__PURE__*/React.createElement("div", {
|
|
89
91
|
className: "".concat(classPrefix, "-overlay")
|
|
90
92
|
}, dayList.map(function (item) {
|
|
@@ -104,7 +106,7 @@ var MonthDay = function MonthDay(props) {
|
|
|
104
106
|
}, /*#__PURE__*/React.createElement("div", {
|
|
105
107
|
className: "".concat(classPrefix, "-wrapper")
|
|
106
108
|
}, /*#__PURE__*/React.createElement("div", {
|
|
107
|
-
className: "".concat(classPrefix, "-handle ").concat(props.size, " ").concat(!chosenDayList.length ? "holder" : '')
|
|
109
|
+
className: "".concat(classPrefix, "-handle ").concat(props.size, " ").concat(!chosenDayList.length ? "holder" : '', " ").concat(disable ? 'disable' : '')
|
|
108
110
|
}, /*#__PURE__*/React.createElement("div", {
|
|
109
111
|
className: "".concat(classPrefix, "-val")
|
|
110
112
|
}, chosenDayList.map(function (item) {
|
|
@@ -112,7 +114,7 @@ var MonthDay = function MonthDay(props) {
|
|
|
112
114
|
closable: true,
|
|
113
115
|
key: item.value,
|
|
114
116
|
onClose: function onClose() {
|
|
115
|
-
onDelMonthDay(item);
|
|
117
|
+
!disable && onDelMonthDay(item);
|
|
116
118
|
}
|
|
117
119
|
}, item.label);
|
|
118
120
|
}), !chosenDayList.length && /*#__PURE__*/React.createElement("span", {
|
|
@@ -123,6 +125,7 @@ var MonthDay = function MonthDay(props) {
|
|
|
123
125
|
};
|
|
124
126
|
|
|
125
127
|
MonthDay.defaultProps = {
|
|
126
|
-
size: 'middle'
|
|
128
|
+
size: 'middle',
|
|
129
|
+
disable: false
|
|
127
130
|
};
|
|
128
131
|
export default MonthDay;
|
|
@@ -47,6 +47,18 @@
|
|
|
47
47
|
&.ant-dropdown-open > .biz-month-day-handle {
|
|
48
48
|
.__default-focused();
|
|
49
49
|
}
|
|
50
|
+
.biz-month-day-handle {
|
|
51
|
+
&.disable {
|
|
52
|
+
cursor: not-allowed !important;
|
|
53
|
+
.ant-tag {
|
|
54
|
+
color: @disabled-color;
|
|
55
|
+
.anticon-close {
|
|
56
|
+
color: @disabled-color;
|
|
57
|
+
cursor: not-allowed;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
50
62
|
}
|
|
51
63
|
&-overlay {
|
|
52
64
|
.__select-panel();
|
package/es/datePicker/utils.js
CHANGED
|
@@ -95,10 +95,13 @@ export var getDateRange = function getDateRange(type, count, includeToday) {
|
|
|
95
95
|
startDate = moment().subtract(count, 'weeks').format('YYYY-MM-DD');
|
|
96
96
|
} else if (type === 'day') {
|
|
97
97
|
startDate = moment().subtract(count, 'days').format('YYYY-MM-DD');
|
|
98
|
+
if (count === 1) endDate = moment().subtract(count, 'days').format('YYYY-MM-DD');
|
|
98
99
|
} else {
|
|
100
|
+
console.log(1111);
|
|
99
101
|
startDate = endDate = moment().subtract(count, 'days').format('YYYY-MM-DD');
|
|
100
102
|
}
|
|
101
103
|
|
|
104
|
+
console.log(endDate, includeToday, count);
|
|
102
105
|
return {
|
|
103
106
|
begin: startDate,
|
|
104
107
|
end: endDate
|
|
@@ -111,8 +111,8 @@ var BizEventSelector = function BizEventSelector(props) {
|
|
|
111
111
|
return label;
|
|
112
112
|
};
|
|
113
113
|
|
|
114
|
-
var onChange = function onChange(value) {
|
|
115
|
-
if (!defaultSelectAble) {
|
|
114
|
+
var onChange = function onChange(value, isOverview) {
|
|
115
|
+
if (!defaultSelectAble && !isOverview) {
|
|
116
116
|
setVisible(false);
|
|
117
117
|
}
|
|
118
118
|
|
|
@@ -72,14 +72,21 @@ var EventListPanel = function EventListPanel(props) {
|
|
|
72
72
|
eventList: function () {
|
|
73
73
|
var list = [];
|
|
74
74
|
var listObj = {};
|
|
75
|
+
var markList = [];
|
|
75
76
|
eventGroupList === null || eventGroupList === void 0 ? void 0 : eventGroupList.forEach(function (group) {
|
|
76
77
|
group.eventList.forEach(function (item) {
|
|
77
78
|
if (!listObj[item.id]) {
|
|
78
|
-
|
|
79
|
+
if (item.marked) {
|
|
80
|
+
markList.push(item);
|
|
81
|
+
} else {
|
|
82
|
+
list.push(item);
|
|
83
|
+
}
|
|
84
|
+
|
|
79
85
|
listObj[item.id] = 1;
|
|
80
86
|
}
|
|
81
87
|
});
|
|
82
88
|
});
|
|
89
|
+
list = [].concat(markList, _toConsumableArray(list));
|
|
83
90
|
return list;
|
|
84
91
|
}(),
|
|
85
92
|
name: '所有分组'
|
|
@@ -107,19 +114,27 @@ var EventListPanel = function EventListPanel(props) {
|
|
|
107
114
|
function onClickEvent(e) {
|
|
108
115
|
var resVal = _.cloneDeep(currentValue) || {};
|
|
109
116
|
resVal.event = e;
|
|
117
|
+
|
|
118
|
+
if (e.id === -100) {
|
|
119
|
+
resVal.group = currentGroup;
|
|
120
|
+
}
|
|
121
|
+
|
|
110
122
|
setCurrentValue(resVal);
|
|
111
123
|
if (props.onChange) props.onChange(resVal);
|
|
112
124
|
}
|
|
113
125
|
|
|
114
126
|
function onClickGroup(g) {
|
|
127
|
+
var _currentValue$event;
|
|
128
|
+
|
|
115
129
|
setCurrentGroup(g);
|
|
130
|
+
var isOverview = (currentValue === null || currentValue === void 0 ? void 0 : (_currentValue$event = currentValue.event) === null || _currentValue$event === void 0 ? void 0 : _currentValue$event.id) === -100;
|
|
116
131
|
|
|
117
|
-
if (defaultSelectAble) {
|
|
132
|
+
if (defaultSelectAble || isOverview) {
|
|
118
133
|
var resVal = _.cloneDeep(currentValue) || {};
|
|
119
134
|
resVal.group = g;
|
|
120
135
|
resVal.event = searchEventList[0];
|
|
121
136
|
setCurrentValue(resVal);
|
|
122
|
-
if (props.onChange) props.onChange(resVal);
|
|
137
|
+
if (props.onChange) props.onChange(resVal, isOverview);
|
|
123
138
|
}
|
|
124
139
|
}
|
|
125
140
|
|
|
@@ -202,13 +217,13 @@ var InfiniteScrollList = function InfiniteScrollList(_ref) {
|
|
|
202
217
|
scrollableTarget: "scrollableDiv",
|
|
203
218
|
key: Math.random()
|
|
204
219
|
}, showList.map(function (e) {
|
|
205
|
-
var _currentValue$
|
|
220
|
+
var _currentValue$event2;
|
|
206
221
|
|
|
207
222
|
if (e.eventHidden === ShowStatus.hidden) return null;
|
|
208
223
|
return /*#__PURE__*/React.createElement(EventListOption, {
|
|
209
224
|
label: e.alias || e.name,
|
|
210
225
|
key: "".concat(currentGroup === null || currentGroup === void 0 ? void 0 : currentGroup.id, "-").concat(e.id),
|
|
211
|
-
checked: (currentValue === null || currentValue === void 0 ? void 0 : (_currentValue$
|
|
226
|
+
checked: (currentValue === null || currentValue === void 0 ? void 0 : (_currentValue$event2 = currentValue.event) === null || _currentValue$event2 === void 0 ? void 0 : _currentValue$event2.id) === e.id,
|
|
212
227
|
highlight: {
|
|
213
228
|
enable: true,
|
|
214
229
|
text: searchValue
|
|
@@ -17,7 +17,11 @@ var Footer = function Footer() {
|
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
var RightContent = function RightContent() {
|
|
20
|
-
return /*#__PURE__*/React.createElement("div",
|
|
20
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
21
|
+
style: {
|
|
22
|
+
height: '600px'
|
|
23
|
+
}
|
|
24
|
+
}, /*#__PURE__*/React.createElement("h1", null, "right"));
|
|
21
25
|
};
|
|
22
26
|
|
|
23
27
|
var onCollapse = function onCollapse(flag) {
|
|
@@ -111,7 +111,8 @@ var BizAnalysisLayout = function BizAnalysisLayout(props) {
|
|
|
111
111
|
onClick: onCollapse
|
|
112
112
|
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
113
113
|
className: "biz-layout-pickup-icon",
|
|
114
|
-
type: 'zhedie'
|
|
114
|
+
type: 'zhedie',
|
|
115
|
+
size: 24
|
|
115
116
|
}))) : /*#__PURE__*/React.createElement(Tooltip, {
|
|
116
117
|
title: "\u5C55\u5F00\u7B5B\u9009\u9762\u677F",
|
|
117
118
|
placement: "right",
|
|
@@ -120,7 +121,8 @@ var BizAnalysisLayout = function BizAnalysisLayout(props) {
|
|
|
120
121
|
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
121
122
|
className: "biz-layout-open",
|
|
122
123
|
onClick: onCollapse,
|
|
123
|
-
type: "zhankai"
|
|
124
|
+
type: "zhankai",
|
|
125
|
+
size: 24
|
|
124
126
|
})), /*#__PURE__*/React.createElement("div", {
|
|
125
127
|
className: "biz-layout-handler",
|
|
126
128
|
style: {
|
|
@@ -132,9 +134,7 @@ var BizAnalysisLayout = function BizAnalysisLayout(props) {
|
|
|
132
134
|
style: {
|
|
133
135
|
width: "calc(100% - ".concat(width + 6, "px)")
|
|
134
136
|
}
|
|
135
|
-
},
|
|
136
|
-
className: "biz-right-content"
|
|
137
|
-
}, children)));
|
|
137
|
+
}, children));
|
|
138
138
|
};
|
|
139
139
|
|
|
140
140
|
BizAnalysisLayout.defaultProps = {
|
|
@@ -40,7 +40,7 @@ var stringOperate = [{
|
|
|
40
40
|
name: '是空值',
|
|
41
41
|
value: 'is null'
|
|
42
42
|
}, {
|
|
43
|
-
name: '不是空值
|
|
43
|
+
name: '不是空值',
|
|
44
44
|
value: 'is not null'
|
|
45
45
|
}];
|
|
46
46
|
var disabledList = [{
|
|
@@ -80,6 +80,7 @@ export default (function () {
|
|
|
80
80
|
disableItemList: disabledList,
|
|
81
81
|
multiple: true,
|
|
82
82
|
enableCreate: true,
|
|
83
|
-
value: data
|
|
83
|
+
value: data,
|
|
84
|
+
disable: true
|
|
84
85
|
}), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("p", null, "\u5F53\u524D\u9009\u62E9\u7684\u503C\u662F\uFF1A", JSON.stringify(data)));
|
|
85
86
|
});
|