@zgfe/business-lib 1.2.55-heyh.1 → 1.2.55-ljy-fix-sore.0
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/assets/iconfont/demo_index.html +3 -3
- package/es/assets/iconfont/iconfont.css +3 -3
- 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/chart/demo/data/data.d.ts +0 -2
- package/es/chart/demo/data/data.js +37 -5
- package/es/chart/demo/line_bar_stack.js +1 -0
- package/es/chart/index.js +0 -10
- package/es/chart/styles/index.less +0 -45
- package/es/chart/util/chartOptionConfig.js +0 -12
- package/es/chart/util/formatData.js +1 -3
- package/es/chart/util/formatOption.js +11 -21
- package/es/hooks/useBizStore.d.ts +2 -4
- package/es/hooks/useBizStore.js +15 -16
- package/package.json +2 -2
|
@@ -1398,9 +1398,9 @@
|
|
|
1398
1398
|
<pre><code class="language-css"
|
|
1399
1399
|
>@font-face {
|
|
1400
1400
|
font-family: 'bsicon';
|
|
1401
|
-
src: url('iconfont.woff2?t=
|
|
1402
|
-
url('iconfont.woff?t=
|
|
1403
|
-
url('iconfont.ttf?t=
|
|
1401
|
+
src: url('iconfont.woff2?t=1724237872032') format('woff2'),
|
|
1402
|
+
url('iconfont.woff?t=1724237872032') format('woff'),
|
|
1403
|
+
url('iconfont.ttf?t=1724237872032') format('truetype');
|
|
1404
1404
|
}
|
|
1405
1405
|
</code></pre>
|
|
1406
1406
|
<h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
@font-face {
|
|
2
2
|
font-family: "bsicon"; /* Project id 2545884 */
|
|
3
|
-
src: url('iconfont.woff2?t=
|
|
4
|
-
url('iconfont.woff?t=
|
|
5
|
-
url('iconfont.ttf?t=
|
|
3
|
+
src: url('iconfont.woff2?t=1724237872032') format('woff2'),
|
|
4
|
+
url('iconfont.woff?t=1724237872032') format('woff'),
|
|
5
|
+
url('iconfont.ttf?t=1724237872032') format('truetype');
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
.bsicon {
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,17 +1,49 @@
|
|
|
1
1
|
export default {
|
|
2
|
-
xAxis: ['2022-12-01', '2022-12-02', '2022-12-03', '2022-12-04', '2022-12-05', '2022-12-06', '2022-12-07', '2022-12-08', '2022-12-09', '2022-12-10', '2022-12-11', '
|
|
2
|
+
xAxis: ['2022-12-01', '2022-12-02', '2022-12-03', '2022-12-04', '2022-12-05', '2022-12-06', '2022-12-07', '2022-12-08', '2022-12-09', '2022-12-10', '2022-12-11', '2023-12-12', '2023-12-13', '2023-12-14'],
|
|
3
3
|
series: [{
|
|
4
|
+
names: ['付款成功付款成功付款成功付款成功付款成功付款成功付款成功付款成功付款成功付款成功付款成功付款成功付款成功付款成功'],
|
|
5
|
+
values: [26, 27, 43, 44, 40, 34, 33, 33, 34, 24, 30, 31, 31, 38],
|
|
6
|
+
orderNum: 1
|
|
7
|
+
}, {
|
|
8
|
+
names: ['注册-发送手机验证码'],
|
|
9
|
+
values: [11, 10, 7, 5, 13, 18, 14, 17, 11, 6, 10, 12, 15, 10],
|
|
10
|
+
orderNum: 1
|
|
11
|
+
}, {
|
|
12
|
+
names: ['搜索商品'],
|
|
13
|
+
values: [75, 68, 86, 80, 87, 71, 72, 81, 77, 74, 78, 76, 76, 79],
|
|
14
|
+
orderNum: 2
|
|
15
|
+
}, {
|
|
4
16
|
names: ['pv'],
|
|
5
17
|
values: [104, 89, 109, 103, 112, 93, 87, 101, 101, 97, 102, 110, 106, 98],
|
|
6
|
-
minValues: [null, null, null, null, null, null, null, null, null, null, null, 102, 0, 1, 2],
|
|
7
|
-
maxValues: [null, null, null, null, null, null, null, null, null, null, null, 666, 1111, 2222],
|
|
8
18
|
orderNum: 3
|
|
9
19
|
}, {
|
|
10
20
|
names: ['申请退货2'],
|
|
11
21
|
values: [5, 11, 14, 9, 8, 14, 9, 10, 12, 12, 14, 16, 12, 10],
|
|
12
|
-
minValues: [null, null, null, null, null, null, null, null, null, null, null, null, 44, 55, 66],
|
|
13
|
-
maxValues: [null, null, null, null, null, null, null, null, null, null, null, null, 888, 5555],
|
|
14
22
|
orderNum: 4
|
|
23
|
+
}, {
|
|
24
|
+
names: ['搜索商品'],
|
|
25
|
+
values: [75, 68, 86, 80, 87, 71, 72, 81, 77, 74, 78, 76, 76, 79],
|
|
26
|
+
orderNum: 5
|
|
27
|
+
}, {
|
|
28
|
+
names: ['付款成功11付款成功付款成功付款成功付款成功付款成功付款成功付款成功付款成功付款成功付款成功付款成功付款成功付款成功'],
|
|
29
|
+
values: [26, 27, 43, 44, 40, 34, 33, 33, 34, 24, 30, 31, 31, 38],
|
|
30
|
+
orderNum: 1
|
|
31
|
+
}, {
|
|
32
|
+
names: ['查看商品详情'],
|
|
33
|
+
values: [122, 107, 132, 113, 133, 115, 106, 127, 132, 117, 119, 123, 119, 117],
|
|
34
|
+
orderNum: 2
|
|
35
|
+
}, {
|
|
36
|
+
names: ['scroll'],
|
|
37
|
+
values: [98, 96, 106, 109, 113, 105, 91, 111, 99, 99, 104, 108, 116, 92],
|
|
38
|
+
orderNum: 3
|
|
39
|
+
}, {
|
|
40
|
+
names: ['click'],
|
|
41
|
+
values: [108, 102, 111, 90, 111, 105, 91, 129, 117, 101, 109, 109, 105, 96],
|
|
42
|
+
orderNum: 4
|
|
43
|
+
}, {
|
|
44
|
+
names: ['申请退货'],
|
|
45
|
+
values: [5, 11, 14, 9, 8, 14, 9, 10, 12, 12, 14, 16, 12, 10],
|
|
46
|
+
orderNum: 5
|
|
15
47
|
}]
|
|
16
48
|
};
|
|
17
49
|
export var barData = {
|
|
@@ -146,6 +146,7 @@ export default (function () {
|
|
|
146
146
|
htmlArray.push("<div class=\"biz-chart-tooltip-item\">\n <div class=\"biz-chart-tooltip-content\">\n <span class=\"biz-tooltip-order\" style=\"background:".concat(params.color, "\"></span>\n <div class=\"biz-tooltip-name\">").concat(params.seriesName, "</div>\n </div> \n <span class=\"biz-chart-tooltip-value\">").concat(params.value, "</span>\n </div>"));
|
|
147
147
|
return htmlArray.join('');
|
|
148
148
|
};
|
|
149
|
+
console.log('colorList', colorList);
|
|
149
150
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(BizChart, {
|
|
150
151
|
showList: showList,
|
|
151
152
|
data: data,
|
package/es/chart/index.js
CHANGED
|
@@ -71,16 +71,6 @@ var BizChart = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
71
71
|
option.series.forEach(function (series, seriesIndex) {
|
|
72
72
|
var dashedItem = addDashedSeries(series, index - 1);
|
|
73
73
|
dashedItem.itemStyle.normal.color = dashedItem.lineStyle.normal.color = option.color[seriesIndex];
|
|
74
|
-
dashedItem.markArea = {
|
|
75
|
-
itemStyle: {
|
|
76
|
-
color: 'rgba(22, 93, 255, 0.08)'
|
|
77
|
-
},
|
|
78
|
-
data: [[{
|
|
79
|
-
xAxis: option.xAxis.data[index]
|
|
80
|
-
}, {
|
|
81
|
-
xAxis: option.xAxis.data[option.xAxis.data.length - 1]
|
|
82
|
-
}]]
|
|
83
|
-
};
|
|
84
74
|
dashedSeries.push(dashedItem);
|
|
85
75
|
});
|
|
86
76
|
option.series = option.series.concat(dashedSeries);
|
|
@@ -65,49 +65,4 @@
|
|
|
65
65
|
font-weight: 500;
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
-
|
|
69
|
-
.biz-chart-tooltip-item-new {
|
|
70
|
-
min-height: @height-sm;
|
|
71
|
-
margin-bottom: 4px;
|
|
72
|
-
padding: 0px @padding-xs;
|
|
73
|
-
font-size: @font-size-sm;
|
|
74
|
-
background: @white;
|
|
75
|
-
border-radius: @border-radius-small;
|
|
76
|
-
box-shadow: @box-shadow-small;
|
|
77
|
-
.biz-chart-tooltip-content {
|
|
78
|
-
display: flex;
|
|
79
|
-
align-items: center;
|
|
80
|
-
color: @text-color-secondary;
|
|
81
|
-
|
|
82
|
-
.biz-tooltip-marker {
|
|
83
|
-
width: 8px;
|
|
84
|
-
height: 8px;
|
|
85
|
-
margin-right: @margin-xs;
|
|
86
|
-
border-radius: 50%;
|
|
87
|
-
}
|
|
88
|
-
.biz-tooltip-order {
|
|
89
|
-
display: flex;
|
|
90
|
-
align-items: center;
|
|
91
|
-
justify-content: center;
|
|
92
|
-
width: 12.8px;
|
|
93
|
-
height: 12.8px;
|
|
94
|
-
margin-right: @margin-xs;
|
|
95
|
-
color: #fff;
|
|
96
|
-
font-weight: 500;
|
|
97
|
-
font-size: 8.96px;
|
|
98
|
-
background: #457dff;
|
|
99
|
-
border-radius: 50%;
|
|
100
|
-
}
|
|
101
|
-
.biz-tooltip-name {
|
|
102
|
-
max-width: 300px;
|
|
103
|
-
white-space: pre-wrap;
|
|
104
|
-
word-wrap: break-word;
|
|
105
|
-
word-break: break-all;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
&-value {
|
|
109
|
-
font-weight: 700;
|
|
110
|
-
// font-size: 14px;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
68
|
}
|
|
@@ -161,7 +161,6 @@ export var getChartOption = function getChartOption(chartType, data) {
|
|
|
161
161
|
yAxis.minInterval = 1;
|
|
162
162
|
}
|
|
163
163
|
var series = [];
|
|
164
|
-
var seriesObject = {};
|
|
165
164
|
if (chartType === 'bar') {
|
|
166
165
|
seriesItem.barMaxWidth = 40;
|
|
167
166
|
}
|
|
@@ -175,9 +174,6 @@ export var getChartOption = function getChartOption(chartType, data) {
|
|
|
175
174
|
yAxisIndex: item.yAxisIndex
|
|
176
175
|
} : {});
|
|
177
176
|
});
|
|
178
|
-
series.map(function (item) {
|
|
179
|
-
seriesObject[item.name] = item;
|
|
180
|
-
});
|
|
181
177
|
} else {
|
|
182
178
|
series = [_objectSpread(_objectSpread(_objectSpread({
|
|
183
179
|
name: seriesName || '',
|
|
@@ -193,14 +189,6 @@ export var getChartOption = function getChartOption(chartType, data) {
|
|
|
193
189
|
tooltip.axisPointer = tooltip.axisPointer || {};
|
|
194
190
|
tooltip.axisPointer.type = chartType === 'bar' || chartType === 'line_bar' || chartType === 'muit_y' ? 'shadow' : 'line';
|
|
195
191
|
tooltip.formatter = function (params) {
|
|
196
|
-
if (Object.keys(seriesObject).length > 0) {
|
|
197
|
-
params.map(function (item) {
|
|
198
|
-
var _minValues = seriesObject[item.seriesName].minValues;
|
|
199
|
-
var _mixValues = seriesObject[item.seriesName].maxValues;
|
|
200
|
-
item.minValues = _minValues ? _minValues[item.dataIndex] : null;
|
|
201
|
-
item.maxValues = _mixValues ? _mixValues[item.dataIndex] : null;
|
|
202
|
-
});
|
|
203
|
-
}
|
|
204
192
|
return tooltipFormatter ? tooltipFormatter(params) : tooltip.trigger === 'item' ? tooltipFormatterItemDefault(params, data.resultFormatMap, unit) : tooltipFormatterDefault(params, data.resultFormatMap, unit);
|
|
205
193
|
};
|
|
206
194
|
if (legendPosition === 'top') {
|
|
@@ -66,9 +66,7 @@ export var formatChartData = function formatChartData(data, showAll, showList, r
|
|
|
66
66
|
} else {
|
|
67
67
|
sData.push(_objectSpread(_objectSpread({
|
|
68
68
|
name: showName,
|
|
69
|
-
data: seriesItem.values
|
|
70
|
-
minValues: seriesItem === null || seriesItem === void 0 ? void 0 : seriesItem.minValues,
|
|
71
|
-
maxValues: seriesItem === null || seriesItem === void 0 ? void 0 : seriesItem.maxValues
|
|
69
|
+
data: seriesItem.values
|
|
72
70
|
}, seriesItem.stack ? {
|
|
73
71
|
stack: seriesItem.stack
|
|
74
72
|
} : {}), {}, {
|
|
@@ -20,22 +20,16 @@ var tooltipFormatterDefault = function tooltipFormatterDefault(params, resultFor
|
|
|
20
20
|
return;
|
|
21
21
|
}
|
|
22
22
|
seriesMap[item.seriesName] = item.value;
|
|
23
|
-
var
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
return _data;
|
|
35
|
-
};
|
|
36
|
-
var lineLabel = unitHandle(item.value);
|
|
37
|
-
var minValues = (item.minValues || item.minValues === 0) && unitHandle(item.minValues);
|
|
38
|
-
var maxValues = (item.maxValues || item.maxValues === 0) && unitHandle(item.maxValues);
|
|
23
|
+
var lineLabel = item.value;
|
|
24
|
+
if (item.seriesName.indexOf('CTR') > -1) {
|
|
25
|
+
lineLabel += '%';
|
|
26
|
+
} else if (resultFormatMap && resultFormatMap[item.seriesName] && /percent/.test(resultFormatMap[item.seriesName])) {
|
|
27
|
+
lineLabel = util.toThousands(lineLabel) + '%';
|
|
28
|
+
} else if (unit && unit === 'time') {
|
|
29
|
+
lineLabel = util.timeFormat(lineLabel, 'hhhmmmsss', 1);
|
|
30
|
+
} else {
|
|
31
|
+
lineLabel = util.toThousands(lineLabel) + (unit || '');
|
|
32
|
+
}
|
|
39
33
|
var name = item.seriesName.trim();
|
|
40
34
|
if (item.seriesType === 'bar' && params.length === 1 && !name) {
|
|
41
35
|
name = (item.data && item.data.label ? item.data.label : item.name).trim();
|
|
@@ -43,11 +37,7 @@ var tooltipFormatterDefault = function tooltipFormatterDefault(params, resultFor
|
|
|
43
37
|
var nameArr = name.split('|:|');
|
|
44
38
|
name = nameArr[0];
|
|
45
39
|
var orderNum = nameArr[1];
|
|
46
|
-
|
|
47
|
-
htmlArray.push("<div class=\"biz-chart-tooltip-item\">\n <div class=\"biz-chart-tooltip-content\">\n <span class=\"".concat(orderNum ? 'biz-tooltip-order' : 'biz-tooltip-marker', "\" style=\"background:").concat(item.color, "\">").concat(orderNum || '', "</span>\n <div class=\"biz-tooltip-name\">").concat(name, "</div>\n </div> \n <span class=\"biz-chart-tooltip-value\">").concat(lineLabel, "</span>\n </div>"));
|
|
48
|
-
} else {
|
|
49
|
-
htmlArray.push("<div class=\"biz-chart-tooltip-item-new\">\n <div class=\"biz-chart-tooltip-content\">\n <span class=\"".concat(orderNum ? 'biz-tooltip-order' : 'biz-tooltip-marker', "\" style=\"background:").concat(item.color, "\">").concat(orderNum || '', "</span>\n <div class=\"biz-tooltip-name\">").concat(name, "</div>\n </div> \n <div>\n <div>\n <span>\u9884\u6D4B\u503C\uFF1A</span>\n <span class=\"biz-chart-tooltip-item-new-value\">").concat(lineLabel, "</span>\n </div>\n <div>\n <span>\u9884\u6D4B\u6700\u5927\u503C\uFF1A</span>\n <span class=\"biz-chart-tooltip-item-new-value\">").concat(maxValues, "</span>\n </div>\n <div>\n <span>\u9884\u6D4B\u6700\u5C0F\u503C\uFF1A</span>\n <span class=\"biz-chart-tooltip-item-new-value\">").concat(minValues, "</span>\n </div>\n </div>\n </div>"));
|
|
50
|
-
}
|
|
40
|
+
htmlArray.push("<div class=\"biz-chart-tooltip-item\">\n <div class=\"biz-chart-tooltip-content\">\n <span class=\"".concat(orderNum ? 'biz-tooltip-order' : 'biz-tooltip-marker', "\" style=\"background:").concat(item.color, "\">").concat(orderNum || '', "</span>\n <div class=\"biz-tooltip-name\">").concat(name, "</div>\n </div> \n <span class=\"biz-chart-tooltip-value\">").concat(lineLabel, "</span>\n </div>"));
|
|
51
41
|
});
|
|
52
42
|
return htmlArray.join('');
|
|
53
43
|
};
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import { UserTagsSelectorTypes } from '../userTagsSelector/types';
|
|
2
2
|
import { UserGroupTypes } from '../userGroup/types';
|
|
3
|
-
|
|
4
|
-
declare function useBizStore({ currentApp }: {
|
|
5
|
-
currentApp: AppInfoProps;
|
|
6
|
-
}): {
|
|
3
|
+
declare function useBizStore(appId: any): {
|
|
7
4
|
eventGroupList?: import("../attributeSelector/types").EventGroup[] | undefined;
|
|
8
5
|
userPropList?: import("../attributeSelector/types").UserProp[] | undefined;
|
|
9
6
|
envPropList?: import("../attributeSelector/types").EnvProp[] | undefined;
|
|
10
7
|
eventNameMap?: Record<string, import("../attributeSelector/types").AnalysisEvent> | undefined;
|
|
11
8
|
eventIdMap?: Record<number, import("../attributeSelector/types").AnalysisEvent> | undefined;
|
|
12
9
|
useBizStoreLoading: boolean;
|
|
10
|
+
setUseBizStoreLoading: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
13
11
|
groupLoading: boolean;
|
|
14
12
|
userGroupList: UserGroupTypes.Group[];
|
|
15
13
|
tagList: UserTagsSelectorTypes.Tag[];
|
package/es/hooks/useBizStore.js
CHANGED
|
@@ -14,8 +14,7 @@ import { useEffect, useState, useCallback } from 'react';
|
|
|
14
14
|
import { ajax } from '../utils';
|
|
15
15
|
import Apis from '../constants/apis';
|
|
16
16
|
import convertAttributeData from '../attributeSelector/util';
|
|
17
|
-
function useBizStore(
|
|
18
|
-
var currentApp = _ref.currentApp;
|
|
17
|
+
function useBizStore(appId) {
|
|
19
18
|
var _useState = useState([]),
|
|
20
19
|
_useState2 = _slicedToArray(_useState, 2),
|
|
21
20
|
userGroupList = _useState2[0],
|
|
@@ -63,7 +62,7 @@ function useBizStore(_ref) {
|
|
|
63
62
|
_useState24 = _slicedToArray(_useState23, 2),
|
|
64
63
|
store = _useState24[0],
|
|
65
64
|
setStore = _useState24[1];
|
|
66
|
-
var _useState25 = useState(
|
|
65
|
+
var _useState25 = useState(true),
|
|
67
66
|
_useState26 = _slicedToArray(_useState25, 2),
|
|
68
67
|
useBizStoreLoading = _useState26[0],
|
|
69
68
|
setUseBizStoreLoading = _useState26[1];
|
|
@@ -72,7 +71,7 @@ function useBizStore(_ref) {
|
|
|
72
71
|
ajax(Apis.queryUserGroup, {
|
|
73
72
|
method: 'post',
|
|
74
73
|
data: {
|
|
75
|
-
appId:
|
|
74
|
+
appId: appId,
|
|
76
75
|
platform: 0,
|
|
77
76
|
includeDefault: true,
|
|
78
77
|
includeToday: true
|
|
@@ -83,13 +82,13 @@ function useBizStore(_ref) {
|
|
|
83
82
|
}).finally(function () {
|
|
84
83
|
setGroupLoading(false);
|
|
85
84
|
});
|
|
86
|
-
}, [
|
|
85
|
+
}, [appId]);
|
|
87
86
|
var queryTags = useCallback(function () {
|
|
88
87
|
setTagLoading(true);
|
|
89
88
|
ajax(Apis.queryAllTags, {
|
|
90
89
|
method: 'post',
|
|
91
90
|
data: {
|
|
92
|
-
appId:
|
|
91
|
+
appId: appId,
|
|
93
92
|
platform: 0
|
|
94
93
|
}
|
|
95
94
|
}).then(function (res) {
|
|
@@ -98,13 +97,13 @@ function useBizStore(_ref) {
|
|
|
98
97
|
}).finally(function () {
|
|
99
98
|
setTagLoading(false);
|
|
100
99
|
});
|
|
101
|
-
}, [
|
|
100
|
+
}, [appId]);
|
|
102
101
|
var loadEvents = useCallback(function () {
|
|
103
102
|
setLoadEvent(true);
|
|
104
103
|
ajax('/zg/web/v2/data/queryEventMetasOfGroup', {
|
|
105
104
|
method: 'post',
|
|
106
105
|
data: {
|
|
107
|
-
appId:
|
|
106
|
+
appId: appId,
|
|
108
107
|
platform: 0,
|
|
109
108
|
isAll: true
|
|
110
109
|
}
|
|
@@ -112,33 +111,33 @@ function useBizStore(_ref) {
|
|
|
112
111
|
setEventGroups(res.data);
|
|
113
112
|
setLoadEvent(false);
|
|
114
113
|
});
|
|
115
|
-
}, [
|
|
114
|
+
}, [appId]);
|
|
116
115
|
var loadUserProps = useCallback(function () {
|
|
117
116
|
setLoadUsers(true);
|
|
118
117
|
ajax('/zg/web/v2/appusergroup/getUserPropMeta', {
|
|
119
118
|
method: 'post',
|
|
120
119
|
data: {
|
|
121
|
-
appId:
|
|
120
|
+
appId: appId,
|
|
122
121
|
platform: 0
|
|
123
122
|
}
|
|
124
123
|
}).then(function (res) {
|
|
125
124
|
setUserProps(res.data);
|
|
126
125
|
setLoadUsers(false);
|
|
127
126
|
});
|
|
128
|
-
}, [
|
|
127
|
+
}, [appId]);
|
|
129
128
|
var loadEnvList = useCallback(function () {
|
|
130
129
|
setLoadEnv(true);
|
|
131
130
|
ajax('/zg/web/v2/appusergroup/getEventEnvData', {
|
|
132
131
|
method: 'post',
|
|
133
132
|
data: {
|
|
134
|
-
appId:
|
|
133
|
+
appId: appId,
|
|
135
134
|
platform: 0
|
|
136
135
|
}
|
|
137
136
|
}).then(function (res) {
|
|
138
137
|
setEnvList(res.data.eventEnv);
|
|
139
138
|
setLoadEnv(false);
|
|
140
139
|
});
|
|
141
|
-
}, [
|
|
140
|
+
}, [appId]);
|
|
142
141
|
useEffect(function () {
|
|
143
142
|
if (loadEnv || loadEvent || loadUsers) return;
|
|
144
143
|
setStore(convertAttributeData({
|
|
@@ -152,13 +151,12 @@ function useBizStore(_ref) {
|
|
|
152
151
|
setUseBizStoreLoading(false);
|
|
153
152
|
}, [loadEvent, loadEnv, loadUsers, groupLoading, tagLoading]);
|
|
154
153
|
useEffect(function () {
|
|
155
|
-
if (!
|
|
154
|
+
if (!appId) return;
|
|
156
155
|
setTimer(function (pre) {
|
|
157
156
|
if (pre) {
|
|
158
157
|
clearTimeout(pre);
|
|
159
158
|
}
|
|
160
159
|
return setTimeout(function () {
|
|
161
|
-
setUseBizStoreLoading(true);
|
|
162
160
|
queryGroups();
|
|
163
161
|
queryTags();
|
|
164
162
|
loadUserProps();
|
|
@@ -166,9 +164,10 @@ function useBizStore(_ref) {
|
|
|
166
164
|
loadEnvList();
|
|
167
165
|
}, 300);
|
|
168
166
|
});
|
|
169
|
-
}, [
|
|
167
|
+
}, [appId]);
|
|
170
168
|
return _objectSpread({
|
|
171
169
|
useBizStoreLoading: useBizStoreLoading,
|
|
170
|
+
setUseBizStoreLoading: setUseBizStoreLoading,
|
|
172
171
|
groupLoading: groupLoading,
|
|
173
172
|
userGroupList: userGroupList,
|
|
174
173
|
tagList: tagList,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgfe/business-lib",
|
|
3
|
-
"version": "1.2.55-
|
|
3
|
+
"version": "1.2.55-ljy-fix-sore.0",
|
|
4
4
|
"module": "es/index.js",
|
|
5
5
|
"typings": "es/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"react": "^16.12.0 || ^17.0.0",
|
|
56
56
|
"yorkie": "^2.0.0"
|
|
57
57
|
},
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "53a78c16c2d93c8f3e4eb42b92e74e1aece1e786",
|
|
59
59
|
"gitHooks": {
|
|
60
60
|
"pre-commit": "lint-staged"
|
|
61
61
|
}
|