@zgfe/business-lib 1.1.50-title.0 → 1.1.51-beta.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/addToPanel/components/styleList.js +1 -1
- package/es/addToPanel/demo/edit.js +32 -0
- package/es/addToPanel/demo/index.js +32 -1
- package/es/addToPanel/index.js +47 -62
- package/es/addToPanel/types.d.ts +1 -1
- package/es/constants/apis.d.ts +5 -2
- package/es/constants/apis.js +9 -6
- package/es/constants/common.d.ts +0 -29
- package/es/constants/common.js +1 -38
- package/es/index.d.ts +2 -2
- package/es/index.js +2 -2
- package/es/layout/optionTitle/demo/index.js +32 -0
- package/es/layout/optionTitle/demo/panelCreate.js +32 -0
- package/es/layout/optionTitle/index.js +14 -13
- package/es/layout/optionTitle/types.d.ts +2 -0
- package/es/userCondition/conditions/business/paramsCondition.js +6 -1
- package/es/userCondition/conditions/tagsCondition.js +5 -10
- package/es/userCondition/demo/business.js +6 -1
- package/es/userCondition/demo/index.js +4 -11
- package/es/userCondition/demo/mockData.d.ts +21 -53
- package/es/userCondition/demo/mockData.js +84 -430
- package/es/userCondition/orConditions.js +1 -0
- package/es/userTagsSelector/cascaderOverlay.js +180 -85
- package/es/userTagsSelector/components/tagList/index.d.ts +14 -0
- package/es/userTagsSelector/components/tagList/index.js +65 -0
- package/es/userTagsSelector/components/tagList/index.less +13 -0
- package/es/userTagsSelector/demo/index.js +45 -43
- package/es/userTagsSelector/groups/index.js +3 -7
- package/es/userTagsSelector/index.js +5 -8
- package/es/userTagsSelector/types.d.ts +39 -2
- package/package.json +2 -2
|
@@ -57,7 +57,7 @@ var StyleList = function StyleList(props) {
|
|
|
57
57
|
key: item.value,
|
|
58
58
|
placement: "top",
|
|
59
59
|
disabled: item.disabled || !item.children,
|
|
60
|
-
|
|
60
|
+
overlay: function overlay() {
|
|
61
61
|
return ChildList(item);
|
|
62
62
|
}
|
|
63
63
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -7,6 +7,37 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
7
7
|
import React, { useState } from 'react';
|
|
8
8
|
import { BizAddToPanel, DemoWrapper } from '@zgfe/business-lib';
|
|
9
9
|
import { Button } from 'antd';
|
|
10
|
+
var chartTypes = [{
|
|
11
|
+
label: '趋势图',
|
|
12
|
+
value: 'line',
|
|
13
|
+
icon: 'qushitu1'
|
|
14
|
+
}, {
|
|
15
|
+
label: '汇总图',
|
|
16
|
+
value: 'bar',
|
|
17
|
+
icon: 'huizongtu'
|
|
18
|
+
}, {
|
|
19
|
+
label: '地图',
|
|
20
|
+
value: 'map',
|
|
21
|
+
icon: 'ditu',
|
|
22
|
+
disabled: true
|
|
23
|
+
}, {
|
|
24
|
+
label: '表格',
|
|
25
|
+
value: 'table',
|
|
26
|
+
icon: 'biaoge',
|
|
27
|
+
children: [{
|
|
28
|
+
label: '趋势图',
|
|
29
|
+
value: 'line',
|
|
30
|
+
icon: 'qushitu1'
|
|
31
|
+
}, {
|
|
32
|
+
label: '汇总图',
|
|
33
|
+
value: 'bar',
|
|
34
|
+
icon: 'huizongtu'
|
|
35
|
+
}]
|
|
36
|
+
}, {
|
|
37
|
+
label: '分数',
|
|
38
|
+
value: 'fraction',
|
|
39
|
+
icon: 'fenshu'
|
|
40
|
+
}];
|
|
10
41
|
var defaultValue = {
|
|
11
42
|
panel: {
|
|
12
43
|
id: 52397,
|
|
@@ -33,6 +64,7 @@ export default (function () {
|
|
|
33
64
|
type: "edit",
|
|
34
65
|
params: {},
|
|
35
66
|
elementId: 1,
|
|
67
|
+
styleOptions: chartTypes,
|
|
36
68
|
onCancel: function onCancel() {
|
|
37
69
|
setShowDialog(false);
|
|
38
70
|
},
|
|
@@ -7,6 +7,37 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
7
7
|
import React, { useState } from 'react';
|
|
8
8
|
import { BizAddToPanel } from '@zgfe/business-lib';
|
|
9
9
|
import { Button } from 'antd';
|
|
10
|
+
var chartTypes = [{
|
|
11
|
+
label: '趋势图',
|
|
12
|
+
value: 'line',
|
|
13
|
+
icon: 'qushitu1'
|
|
14
|
+
}, {
|
|
15
|
+
label: '汇总图',
|
|
16
|
+
value: 'bar',
|
|
17
|
+
icon: 'huizongtu'
|
|
18
|
+
}, {
|
|
19
|
+
label: '地图',
|
|
20
|
+
value: 'map',
|
|
21
|
+
icon: 'ditu',
|
|
22
|
+
disabled: true
|
|
23
|
+
}, {
|
|
24
|
+
label: '表格',
|
|
25
|
+
value: 'table',
|
|
26
|
+
icon: 'biaoge',
|
|
27
|
+
children: [{
|
|
28
|
+
label: '趋势图',
|
|
29
|
+
value: 'line',
|
|
30
|
+
icon: 'qushitu1'
|
|
31
|
+
}, {
|
|
32
|
+
label: '汇总图',
|
|
33
|
+
value: 'bar',
|
|
34
|
+
icon: 'huizongtu'
|
|
35
|
+
}]
|
|
36
|
+
}, {
|
|
37
|
+
label: '分数',
|
|
38
|
+
value: 'fraction',
|
|
39
|
+
icon: 'fenshu'
|
|
40
|
+
}];
|
|
10
41
|
var defaultValue = {
|
|
11
42
|
panel: {
|
|
12
43
|
id: 52397,
|
|
@@ -29,7 +60,7 @@ export default (function () {
|
|
|
29
60
|
}, "\u6DFB\u52A0\u5230\u770B\u677F"), showDialog && /*#__PURE__*/React.createElement(BizAddToPanel, {
|
|
30
61
|
defaultValue: defaultValue,
|
|
31
62
|
params: {},
|
|
32
|
-
|
|
63
|
+
styleOptions: chartTypes,
|
|
33
64
|
onCancel: function onCancel() {
|
|
34
65
|
setShowDialog(false);
|
|
35
66
|
},
|
package/es/addToPanel/index.js
CHANGED
|
@@ -23,7 +23,6 @@ import request from '../utils/ajax';
|
|
|
23
23
|
import Apis from '../constants/apis';
|
|
24
24
|
import BizGlobalDataContext from '../context';
|
|
25
25
|
import _ from 'lodash';
|
|
26
|
-
import { chartTypes } from '../constants/common';
|
|
27
26
|
export var classPrefix = 'biz-addtopanel';
|
|
28
27
|
var BizAddToPanel = function BizAddToPanel(props) {
|
|
29
28
|
var refForm = useRef();
|
|
@@ -44,28 +43,16 @@ var BizAddToPanel = function BizAddToPanel(props) {
|
|
|
44
43
|
router = _useContext.router,
|
|
45
44
|
routes = _useContext.routes,
|
|
46
45
|
isDemo = _useContext.isDemo;
|
|
47
|
-
var _useState7 = useState(chartTypes),
|
|
48
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
|
49
|
-
styleOptions = _useState8[0],
|
|
50
|
-
setStyleOptions = _useState8[1];
|
|
51
46
|
useEffect(function () {
|
|
52
47
|
queryGroups();
|
|
53
|
-
if (props.showMap) {
|
|
54
|
-
setStyleOptions(function () {
|
|
55
|
-
var styleData = _.cloneDeep(chartTypes);
|
|
56
|
-
styleData[2].children[2].disabled = false;
|
|
57
|
-
styleData[3].disabled = false;
|
|
58
|
-
return styleData;
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
48
|
}, []);
|
|
62
49
|
function queryGroups() {
|
|
63
50
|
request(Apis.queryPanelGroup, {
|
|
64
51
|
method: 'post',
|
|
65
52
|
data: {
|
|
66
|
-
|
|
53
|
+
appId: currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId,
|
|
67
54
|
platform: (currentApp === null || currentApp === void 0 ? void 0 : currentApp.platform) || 0,
|
|
68
|
-
|
|
55
|
+
roleType: 3
|
|
69
56
|
}
|
|
70
57
|
}).then(function (res) {
|
|
71
58
|
if (!res) {
|
|
@@ -74,7 +61,7 @@ var BizAddToPanel = function BizAddToPanel(props) {
|
|
|
74
61
|
});
|
|
75
62
|
return;
|
|
76
63
|
}
|
|
77
|
-
setGroupList(res.
|
|
64
|
+
setGroupList(res.data || []);
|
|
78
65
|
}).catch(function () {
|
|
79
66
|
notification.error({
|
|
80
67
|
message: '获取看板列表失败'
|
|
@@ -103,22 +90,28 @@ var BizAddToPanel = function BizAddToPanel(props) {
|
|
|
103
90
|
data: searchParam,
|
|
104
91
|
chosen_data: form.showList && form.showList === 'dynamic' ? [] : props.showList
|
|
105
92
|
};
|
|
106
|
-
var data = {
|
|
107
|
-
|
|
108
|
-
panel_id: form.panel.id,
|
|
109
|
-
web_data: JSON.stringify(resData)
|
|
110
|
-
};
|
|
111
|
-
var url = Apis.updatePanelTarget,
|
|
93
|
+
var data = {},
|
|
94
|
+
url = Apis.updatePanelTarget,
|
|
112
95
|
msgType = '保存';
|
|
113
96
|
if (props.type === 'edit') {
|
|
114
|
-
data
|
|
97
|
+
data = {
|
|
98
|
+
name: form.name,
|
|
99
|
+
panelId: form.panel.id,
|
|
100
|
+
elementId: props.elementId,
|
|
101
|
+
webData: JSON.stringify(resData)
|
|
102
|
+
};
|
|
115
103
|
} else {
|
|
116
|
-
data
|
|
104
|
+
data = {
|
|
105
|
+
name: form.name,
|
|
106
|
+
panelId: form.panel.id,
|
|
107
|
+
webData: JSON.stringify(resData),
|
|
108
|
+
mobileData: JSON.stringify(resData)
|
|
109
|
+
};
|
|
117
110
|
if (form.panel.id === 0) {
|
|
118
|
-
data.
|
|
111
|
+
data.appId = currentApp === null || currentApp === void 0 ? void 0 : currentApp.appId;
|
|
119
112
|
data.platform = (currentApp === null || currentApp === void 0 ? void 0 : currentApp.platform) || 0;
|
|
120
|
-
data.
|
|
121
|
-
data.
|
|
113
|
+
data.panelName = form.panel.name;
|
|
114
|
+
data.openType = form.panel.open_type;
|
|
122
115
|
}
|
|
123
116
|
url = Apis.addPanel;
|
|
124
117
|
msgType = '添加';
|
|
@@ -129,43 +122,35 @@ var BizAddToPanel = function BizAddToPanel(props) {
|
|
|
129
122
|
}).then(function (res) {
|
|
130
123
|
setLoading(false);
|
|
131
124
|
var result = res;
|
|
132
|
-
if (
|
|
133
|
-
var _result$panel2;
|
|
134
|
-
notification.success({
|
|
135
|
-
message: /*#__PURE__*/React.createElement(React.Fragment, null, msgType, "\u81F3", /*#__PURE__*/React.createElement("a", {
|
|
136
|
-
onClick: function onClick() {
|
|
137
|
-
var _result$panel;
|
|
138
|
-
if (router && routes) router.push({
|
|
139
|
-
name: routes.panel,
|
|
140
|
-
params: {
|
|
141
|
-
panelId: ((_result$panel = result.panel) === null || _result$panel === void 0 ? void 0 : _result$panel.id) || form.panel.id
|
|
142
|
-
}
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
|
-
}, form.panel.name || ((_result$panel2 = result.panel) === null || _result$panel2 === void 0 ? void 0 : _result$panel2.name)), "\u6210\u529F")
|
|
146
|
-
});
|
|
147
|
-
if (props.onOk) {
|
|
148
|
-
var responseData = data;
|
|
149
|
-
if (props.type !== 'edit') {
|
|
150
|
-
var _result$panel3;
|
|
151
|
-
responseData = _objectSpread({
|
|
152
|
-
panelId: ((_result$panel3 = result.panel) === null || _result$panel3 === void 0 ? void 0 : _result$panel3.id) || form.panel.id
|
|
153
|
-
}, result.panel_element);
|
|
154
|
-
if (form.panel.id === 0) {
|
|
155
|
-
responseData.panel = _objectSpread({}, result.panel);
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
props.onOk(responseData);
|
|
159
|
-
}
|
|
160
|
-
} else if (result.flag === -101) {
|
|
161
|
-
notification.error({
|
|
162
|
-
message: '添加失败',
|
|
163
|
-
description: data.panel_id === 0 ? '看板已存在' : '看板名称已存在'
|
|
164
|
-
});
|
|
165
|
-
} else {
|
|
125
|
+
if (!res) {
|
|
166
126
|
notification.error({
|
|
167
127
|
message: "".concat(msgType, "\u5931\u8D25")
|
|
168
128
|
});
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
notification.success({
|
|
132
|
+
message: /*#__PURE__*/React.createElement(React.Fragment, null, msgType, "\u81F3", /*#__PURE__*/React.createElement("a", {
|
|
133
|
+
onClick: function onClick() {
|
|
134
|
+
if (router && routes) router.push({
|
|
135
|
+
name: routes.panel,
|
|
136
|
+
params: {
|
|
137
|
+
panelId: result.data.panel && result.data.panel.id || form.panel.id
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
}, form.panel.name || result.data.panel && result.data.panel.name), "\u6210\u529F")
|
|
142
|
+
});
|
|
143
|
+
if (props.onOk) {
|
|
144
|
+
var responseData = data;
|
|
145
|
+
if (props.type !== 'edit') {
|
|
146
|
+
responseData = _objectSpread({
|
|
147
|
+
panelId: result.data.panel && result.data.panel.id || form.panel.id
|
|
148
|
+
}, result.data.panelElement);
|
|
149
|
+
if (form.panel.id === 0) {
|
|
150
|
+
responseData.panel = _objectSpread({}, result.data.panel);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
props.onOk(responseData);
|
|
169
154
|
}
|
|
170
155
|
}).catch(function () {
|
|
171
156
|
setLoading(false);
|
|
@@ -246,7 +231,7 @@ var BizAddToPanel = function BizAddToPanel(props) {
|
|
|
246
231
|
message: '请选择样式'
|
|
247
232
|
}]
|
|
248
233
|
}, /*#__PURE__*/React.createElement(StyleList, {
|
|
249
|
-
options: styleOptions
|
|
234
|
+
options: props.styleOptions
|
|
250
235
|
})), /*#__PURE__*/React.createElement(Form.Item, {
|
|
251
236
|
noStyle: true,
|
|
252
237
|
shouldUpdate: true
|
package/es/addToPanel/types.d.ts
CHANGED
|
@@ -12,10 +12,10 @@ declare namespace AddToPanel {
|
|
|
12
12
|
defaultValue?: Value;
|
|
13
13
|
params: Record<string, any>;
|
|
14
14
|
type?: string;
|
|
15
|
+
styleOptions: TabItem[];
|
|
15
16
|
showOptions?: Option[];
|
|
16
17
|
showList?: string[];
|
|
17
18
|
elementId?: number;
|
|
18
|
-
showMap?: boolean;
|
|
19
19
|
onOk?: (responseData: any) => void;
|
|
20
20
|
onCancel?: () => void;
|
|
21
21
|
}
|
package/es/constants/apis.d.ts
CHANGED
|
@@ -5,15 +5,18 @@ declare const Apis: {
|
|
|
5
5
|
addPanel: string;
|
|
6
6
|
updatePanelTarget: string;
|
|
7
7
|
queryPanelGroup: string;
|
|
8
|
+
delPanelElement: string;
|
|
9
|
+
updateElementName: string;
|
|
8
10
|
queryDatasetList: string;
|
|
9
11
|
queryDatasetDetail: string;
|
|
10
12
|
getSocketToken: string;
|
|
11
|
-
delPanelElement: string;
|
|
12
|
-
updateElementName: string;
|
|
13
13
|
bizDataTypeList: string;
|
|
14
14
|
orderAttributeMaster: string;
|
|
15
15
|
orderAttributeSon: string;
|
|
16
16
|
bizDataAttrList: string;
|
|
17
17
|
dataAttrValue: string;
|
|
18
|
+
queryTagsByGroup: string;
|
|
19
|
+
queryTagGroups: string;
|
|
20
|
+
getTagDetail: string;
|
|
18
21
|
};
|
|
19
22
|
export default Apis;
|
package/es/constants/apis.js
CHANGED
|
@@ -2,18 +2,21 @@ var Apis = {
|
|
|
2
2
|
querySceneGroup: '/scene/queryScenesOfGroup.jsp',
|
|
3
3
|
addScene: '/scene/addScene.jsp',
|
|
4
4
|
esQuery: '/data/queryEsData.jsp',
|
|
5
|
-
addPanel: '/apppanel/addPanelElement
|
|
6
|
-
updatePanelTarget: '/apppanel/
|
|
7
|
-
queryPanelGroup: '/apppanel/panels
|
|
5
|
+
addPanel: '/zg/web/v2/apppanel/addPanelElement',
|
|
6
|
+
updatePanelTarget: '/zg/web/v2/apppanel/updateElement',
|
|
7
|
+
queryPanelGroup: '/zg/web/v2/apppanel/panels',
|
|
8
|
+
delPanelElement: '/zg/web/v2/apppanel/delPanelElement',
|
|
9
|
+
updateElementName: '/zg/web/v2/apppanel/updateElementName',
|
|
8
10
|
queryDatasetList: '/zg/web/cdp/inner/dataset/list',
|
|
9
11
|
queryDatasetDetail: '/zg/web/cdp/inner/dataset/detail',
|
|
10
12
|
getSocketToken: '/zg/web/v2/tracking/view/websocket/token',
|
|
11
|
-
delPanelElement: '/apppanel/delPanelElement.jsp',
|
|
12
|
-
updateElementName: '/apppanel/updateElementName.jsp',
|
|
13
13
|
bizDataTypeList: '/cep-console/api/v1/bizdata/type/list',
|
|
14
14
|
orderAttributeMaster: '/cep-console/api/v1/cdp/orderAttribute/master',
|
|
15
15
|
orderAttributeSon: '/cep-console/api/v1/cdp/orderAttribute/son',
|
|
16
16
|
bizDataAttrList: '/cep-console/api/v1/bizdata/attr/list',
|
|
17
|
-
dataAttrValue: '/cep-console/api/v1/es/data/attr/value'
|
|
17
|
+
dataAttrValue: '/cep-console/api/v1/es/data/attr/value',
|
|
18
|
+
queryTagsByGroup: '/zg/web/v2/v4/labelGroup/label/list',
|
|
19
|
+
queryTagGroups: '/zg/web/v2/label/group/list',
|
|
20
|
+
getTagDetail: '/zg/web/v2/labelGroup/label/labelLayer'
|
|
18
21
|
};
|
|
19
22
|
export default Apis;
|
package/es/constants/common.d.ts
CHANGED
|
@@ -9,32 +9,3 @@ export declare const BuiltinIndicators: {
|
|
|
9
9
|
attrList: never[];
|
|
10
10
|
}[];
|
|
11
11
|
};
|
|
12
|
-
export declare const chartTypes: ({
|
|
13
|
-
label: string;
|
|
14
|
-
value: string;
|
|
15
|
-
icon: string;
|
|
16
|
-
children?: undefined;
|
|
17
|
-
disabled?: undefined;
|
|
18
|
-
} | {
|
|
19
|
-
label: string;
|
|
20
|
-
icon: string;
|
|
21
|
-
value: string;
|
|
22
|
-
children: ({
|
|
23
|
-
label: string;
|
|
24
|
-
value: string;
|
|
25
|
-
icon: string;
|
|
26
|
-
disabled?: undefined;
|
|
27
|
-
} | {
|
|
28
|
-
label: string;
|
|
29
|
-
value: string;
|
|
30
|
-
icon: string;
|
|
31
|
-
disabled: boolean;
|
|
32
|
-
})[];
|
|
33
|
-
disabled?: undefined;
|
|
34
|
-
} | {
|
|
35
|
-
label: string;
|
|
36
|
-
value: string;
|
|
37
|
-
icon: string;
|
|
38
|
-
disabled: boolean;
|
|
39
|
-
children?: undefined;
|
|
40
|
-
})[];
|
package/es/constants/common.js
CHANGED
|
@@ -32,41 +32,4 @@ export var BuiltinIndicators = {
|
|
|
32
32
|
isBuiltIn: true,
|
|
33
33
|
attrList: []
|
|
34
34
|
}]
|
|
35
|
-
};
|
|
36
|
-
export var chartTypes = [{
|
|
37
|
-
label: '趋势图',
|
|
38
|
-
value: 'line',
|
|
39
|
-
icon: 'qushitu1'
|
|
40
|
-
}, {
|
|
41
|
-
label: '汇总图',
|
|
42
|
-
value: 'bar',
|
|
43
|
-
icon: 'huizongtu'
|
|
44
|
-
}, {
|
|
45
|
-
label: '表格',
|
|
46
|
-
icon: 'biaoge',
|
|
47
|
-
value: 'grid',
|
|
48
|
-
children: [{
|
|
49
|
-
label: '',
|
|
50
|
-
value: 'line',
|
|
51
|
-
icon: 'qushitu1'
|
|
52
|
-
}, {
|
|
53
|
-
label: '',
|
|
54
|
-
value: 'bar',
|
|
55
|
-
icon: 'huizongtu'
|
|
56
|
-
}, {
|
|
57
|
-
label: '',
|
|
58
|
-
value: 'map',
|
|
59
|
-
icon: 'ditu',
|
|
60
|
-
disabled: true
|
|
61
|
-
}]
|
|
62
|
-
}, {
|
|
63
|
-
label: '地图',
|
|
64
|
-
value: 'map',
|
|
65
|
-
icon: 'ditu',
|
|
66
|
-
disabled: true
|
|
67
|
-
}, {
|
|
68
|
-
label: '数值',
|
|
69
|
-
value: 'number',
|
|
70
|
-
icon: 'fenshu',
|
|
71
|
-
disabled: true
|
|
72
|
-
}];
|
|
35
|
+
};
|
package/es/index.d.ts
CHANGED
|
@@ -18,7 +18,6 @@ import { util, ajax } from './utils';
|
|
|
18
18
|
import theme from './assets/theme.js';
|
|
19
19
|
import convertAttributeData from './attributeSelector/util';
|
|
20
20
|
import BizGlobalDataContext from './context';
|
|
21
|
-
import { BizTargetFromPanelContext } from './layout/optionTitle/types';
|
|
22
21
|
import BizUserCondition from './userCondition';
|
|
23
22
|
import BizSearchInput from './searchInput';
|
|
24
23
|
import BizUserTagsSelect from './userTagsSelector';
|
|
@@ -32,7 +31,8 @@ import BizLoginForm from './loginForm';
|
|
|
32
31
|
import DemoWrapper from './demoWrapper';
|
|
33
32
|
import SocketClient from './socket';
|
|
34
33
|
import BizTargetFromPanel from './layout/optionTitle';
|
|
35
|
-
|
|
34
|
+
import { BizTargetFromPanelContext } from './layout/optionTitle/types';
|
|
35
|
+
export { BizTargetFromPanel, BizSearchInput, BizSelect, BizDialog, BizChart, BizTable, BizAnalysisLayout, BizDetailLayout, BizUserGroup, IconFont, ColorIcon, BizTargetSelector, BizEventSelector, BizAttributeSelector, BizGlobalDataContext, BizTargetFromPanelContext, BizTargetCondition, BizDatePicker, BizConditionItem, BizConditionGroup, BizUserCondition, BizAddToScene, BizAddToPanel, BizCycleTime, BizDnd, BizLoginForm, DemoWrapper, SocketClient, ajax, util, theme, convertAttributeData, BizUserTagsSelect, setGlobalConfig, };
|
|
36
36
|
export type { UserGroupTypes } from './userGroup/types';
|
|
37
37
|
export type { BizSelectTypes } from './select/types';
|
|
38
38
|
export type { AttributeSelect } from './attributeSelector/types';
|
package/es/index.js
CHANGED
|
@@ -17,7 +17,6 @@ import { util, ajax } from './utils';
|
|
|
17
17
|
import theme from './assets/theme.js';
|
|
18
18
|
import convertAttributeData from './attributeSelector/util';
|
|
19
19
|
import BizGlobalDataContext from './context';
|
|
20
|
-
import { BizTargetFromPanelContext } from './layout/optionTitle/types';
|
|
21
20
|
import BizUserCondition from './userCondition';
|
|
22
21
|
import BizSearchInput from './searchInput';
|
|
23
22
|
import BizUserTagsSelect from './userTagsSelector';
|
|
@@ -31,4 +30,5 @@ import BizLoginForm from './loginForm';
|
|
|
31
30
|
import DemoWrapper from './demoWrapper';
|
|
32
31
|
import SocketClient from './socket';
|
|
33
32
|
import BizTargetFromPanel from './layout/optionTitle';
|
|
34
|
-
|
|
33
|
+
import { BizTargetFromPanelContext } from './layout/optionTitle/types';
|
|
34
|
+
export { BizTargetFromPanel, BizSearchInput, BizSelect, BizDialog, BizChart, BizTable, BizAnalysisLayout, BizDetailLayout, BizUserGroup, IconFont, ColorIcon, BizTargetSelector, BizEventSelector, BizAttributeSelector, BizGlobalDataContext, BizTargetFromPanelContext, BizTargetCondition, BizDatePicker, BizConditionItem, BizConditionGroup, BizUserCondition, BizAddToScene, BizAddToPanel, BizCycleTime, BizDnd, BizLoginForm, DemoWrapper, SocketClient, ajax, util, theme, convertAttributeData, BizUserTagsSelect, setGlobalConfig };
|
|
@@ -29,6 +29,37 @@ var params = {
|
|
|
29
29
|
},
|
|
30
30
|
chartType: 'line'
|
|
31
31
|
};
|
|
32
|
+
var chartTypes = [{
|
|
33
|
+
label: '趋势图',
|
|
34
|
+
value: 'line',
|
|
35
|
+
icon: 'qushitu1'
|
|
36
|
+
}, {
|
|
37
|
+
label: '汇总图',
|
|
38
|
+
value: 'bar',
|
|
39
|
+
icon: 'huizongtu'
|
|
40
|
+
}, {
|
|
41
|
+
label: '地图',
|
|
42
|
+
value: 'map',
|
|
43
|
+
icon: 'ditu',
|
|
44
|
+
disabled: true
|
|
45
|
+
}, {
|
|
46
|
+
label: '表格',
|
|
47
|
+
value: 'table',
|
|
48
|
+
icon: 'biaoge',
|
|
49
|
+
children: [{
|
|
50
|
+
label: '趋势图',
|
|
51
|
+
value: 'line',
|
|
52
|
+
icon: 'qushitu1'
|
|
53
|
+
}, {
|
|
54
|
+
label: '汇总图',
|
|
55
|
+
value: 'bar',
|
|
56
|
+
icon: 'huizongtu'
|
|
57
|
+
}]
|
|
58
|
+
}, {
|
|
59
|
+
label: '分数',
|
|
60
|
+
value: 'fraction',
|
|
61
|
+
icon: 'fenshu'
|
|
62
|
+
}];
|
|
32
63
|
var InsightContent = function InsightContent() {
|
|
33
64
|
var _useContext = useContext(BizTargetFromPanelContext),
|
|
34
65
|
handleSearch = _useContext.handleSearch;
|
|
@@ -79,6 +110,7 @@ export default (function () {
|
|
|
79
110
|
params: params
|
|
80
111
|
}
|
|
81
112
|
},
|
|
113
|
+
styleOptions: chartTypes,
|
|
82
114
|
afterEditTarget: afterEditTarget
|
|
83
115
|
}, /*#__PURE__*/React.createElement(InsightContent, null))));
|
|
84
116
|
});
|
|
@@ -29,6 +29,37 @@ var params = {
|
|
|
29
29
|
},
|
|
30
30
|
chartType: 'line'
|
|
31
31
|
};
|
|
32
|
+
var chartTypes = [{
|
|
33
|
+
label: '趋势图',
|
|
34
|
+
value: 'line',
|
|
35
|
+
icon: 'qushitu1'
|
|
36
|
+
}, {
|
|
37
|
+
label: '汇总图',
|
|
38
|
+
value: 'bar',
|
|
39
|
+
icon: 'huizongtu'
|
|
40
|
+
}, {
|
|
41
|
+
label: '地图',
|
|
42
|
+
value: 'map',
|
|
43
|
+
icon: 'ditu',
|
|
44
|
+
disabled: true
|
|
45
|
+
}, {
|
|
46
|
+
label: '表格',
|
|
47
|
+
value: 'table',
|
|
48
|
+
icon: 'biaoge',
|
|
49
|
+
children: [{
|
|
50
|
+
label: '趋势图',
|
|
51
|
+
value: 'line',
|
|
52
|
+
icon: 'qushitu1'
|
|
53
|
+
}, {
|
|
54
|
+
label: '汇总图',
|
|
55
|
+
value: 'bar',
|
|
56
|
+
icon: 'huizongtu'
|
|
57
|
+
}]
|
|
58
|
+
}, {
|
|
59
|
+
label: '分数',
|
|
60
|
+
value: 'fraction',
|
|
61
|
+
icon: 'fenshu'
|
|
62
|
+
}];
|
|
32
63
|
var InsightContent = function InsightContent() {
|
|
33
64
|
var _useContext = useContext(BizTargetFromPanelContext),
|
|
34
65
|
handleSearch = _useContext.handleSearch;
|
|
@@ -77,6 +108,7 @@ export default (function () {
|
|
|
77
108
|
params: params
|
|
78
109
|
}
|
|
79
110
|
},
|
|
111
|
+
styleOptions: chartTypes,
|
|
80
112
|
afterEditTarget: afterEditTarget
|
|
81
113
|
}, /*#__PURE__*/React.createElement(InsightContent, null))));
|
|
82
114
|
});
|
|
@@ -66,17 +66,15 @@ var BizTargetFromPanel = function BizTargetFromPanel(props) {
|
|
|
66
66
|
ajax(Apis.delPanelElement, {
|
|
67
67
|
method: 'post',
|
|
68
68
|
data: {
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
panelId: props.value.panelId,
|
|
70
|
+
elementId: props.value.target.id
|
|
71
71
|
}
|
|
72
72
|
}).then(function (res) {
|
|
73
73
|
if (!res) return;
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
message.error('删除失败');
|
|
79
|
-
}
|
|
74
|
+
message.success('删除成功');
|
|
75
|
+
props.afterEditTarget && props.afterEditTarget(BizOptionTitleProps.OptionTypes.DELETE);
|
|
76
|
+
}).catch(function () {
|
|
77
|
+
message.error('删除失败');
|
|
80
78
|
}).finally(function () {
|
|
81
79
|
setLoading(false);
|
|
82
80
|
});
|
|
@@ -89,15 +87,17 @@ var BizTargetFromPanel = function BizTargetFromPanel(props) {
|
|
|
89
87
|
ajax(Apis.updateElementName, {
|
|
90
88
|
method: 'post',
|
|
91
89
|
data: {
|
|
92
|
-
|
|
93
|
-
|
|
90
|
+
panelId: props.value.panelId,
|
|
91
|
+
elementId: props.value.target.id,
|
|
94
92
|
name: value
|
|
95
93
|
}
|
|
96
94
|
}).then(function (res) {
|
|
97
|
-
if (!res)
|
|
98
|
-
|
|
95
|
+
if (!res) {
|
|
96
|
+
callback(true, '');
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
callback();
|
|
99
100
|
}).finally(function () {
|
|
100
|
-
callback(true, '');
|
|
101
101
|
setLoading(false);
|
|
102
102
|
});
|
|
103
103
|
};
|
|
@@ -144,6 +144,7 @@ var BizTargetFromPanel = function BizTargetFromPanel(props) {
|
|
|
144
144
|
showList: 'fix'
|
|
145
145
|
},
|
|
146
146
|
type: props.value.target.id && saveType === BizOptionTitleProps.OptionTypes.SAVE ? BizOptionTitleProps.OptionTypes.EDIT : BizOptionTitleProps.OptionTypes.CREATE,
|
|
147
|
+
styleOptions: props.styleOptions,
|
|
147
148
|
params: props.value.target.params,
|
|
148
149
|
elementId: props.value.target.id,
|
|
149
150
|
showList: props.value.target.showList,
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import AddToPanel from '../../addToPanel/types';
|
|
2
3
|
export declare namespace BizOptionTitleProps {
|
|
3
4
|
export interface Props {
|
|
4
5
|
value: Value;
|
|
6
|
+
styleOptions: AddToPanel.TabItem[];
|
|
5
7
|
children: React.ReactNode;
|
|
6
8
|
afterEditTarget?: (type: string, value?: any) => void;
|
|
7
9
|
}
|
|
@@ -9,6 +9,7 @@ import '../styles/runTimesCondition.less';
|
|
|
9
9
|
import { classPrefix } from '../..';
|
|
10
10
|
import moment from 'moment';
|
|
11
11
|
import { DatePicker, Input } from 'antd';
|
|
12
|
+
import { PropType } from '../../types';
|
|
12
13
|
var RangePicker = DatePicker.RangePicker;
|
|
13
14
|
var ParamsCondition = function ParamsCondition(props) {
|
|
14
15
|
var condition = props.condition,
|
|
@@ -16,7 +17,11 @@ var ParamsCondition = function ParamsCondition(props) {
|
|
|
16
17
|
onChange = props.onChange;
|
|
17
18
|
var onValue0Change = function onValue0Change(e) {
|
|
18
19
|
var value = e.target.value;
|
|
19
|
-
condition.attrs[index].
|
|
20
|
+
if (condition.attrs[index].attrType === PropType.DATE) {
|
|
21
|
+
condition.attrs[index].params = [value, '0'];
|
|
22
|
+
} else {
|
|
23
|
+
condition.attrs[index].params[0] = value;
|
|
24
|
+
}
|
|
20
25
|
onChange(_objectSpread({}, condition));
|
|
21
26
|
};
|
|
22
27
|
var onValue1Change = function onValue1Change(e) {
|
|
@@ -10,14 +10,14 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
10
10
|
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; }
|
|
11
11
|
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
12
12
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
|
-
import React, { useContext,
|
|
13
|
+
import React, { useContext, useState } from 'react';
|
|
14
14
|
import { BizUserConditionContext, classPrefix } from '..';
|
|
15
15
|
import BizSelect from '../../select';
|
|
16
16
|
import { operatorMap } from './constants';
|
|
17
17
|
import BizUserTagsSelect from '../../userTagsSelector';
|
|
18
18
|
import './styles/tagsCondition.less';
|
|
19
|
-
import { buildSelectLayer, buildTagsGroup } from '../util';
|
|
20
19
|
import _ from 'lodash';
|
|
20
|
+
import { buildSelectLayer } from '../util';
|
|
21
21
|
var options = [{
|
|
22
22
|
value: 'equal',
|
|
23
23
|
text: '是'
|
|
@@ -35,10 +35,7 @@ var TagsCondition = function TagsCondition(props) {
|
|
|
35
35
|
return buildDefaultValues();
|
|
36
36
|
}),
|
|
37
37
|
_useState2 = _slicedToArray(_useState, 1),
|
|
38
|
-
|
|
39
|
-
var tagGroupList = useMemo(function () {
|
|
40
|
-
return buildTagsGroup(userTagsData || []);
|
|
41
|
-
}, [userTagsData]);
|
|
38
|
+
defaultValue = _useState2[0];
|
|
42
39
|
function onOperatorChange(operator) {
|
|
43
40
|
onChange(dataId, _objectSpread(_objectSpread({}, labels), {}, {
|
|
44
41
|
operator: operator.value
|
|
@@ -87,14 +84,12 @@ var TagsCondition = function TagsCondition(props) {
|
|
|
87
84
|
})), /*#__PURE__*/React.createElement("div", {
|
|
88
85
|
className: "".concat(classPrefix, "-tags-condition-value")
|
|
89
86
|
}, /*#__PURE__*/React.createElement(BizUserTagsSelect, {
|
|
90
|
-
defaultValue:
|
|
91
|
-
data: tagGroupList,
|
|
87
|
+
defaultValue: defaultValue,
|
|
92
88
|
childFields: ['children', 'layers'],
|
|
93
89
|
keyFields: ['labelGroup', 'id', 'layerLabelId'],
|
|
94
90
|
labelFields: ['labelGroup', 'labelName', 'layerLabelName'],
|
|
95
91
|
valueFields: ['labelGroup', 'id', 'layerLabelId'],
|
|
96
|
-
onChange: onTagsChange
|
|
97
|
-
destroyPopupOnHide: true
|
|
92
|
+
onChange: onTagsChange
|
|
98
93
|
})), /*#__PURE__*/React.createElement("div", {
|
|
99
94
|
className: "".concat(classPrefix, "-tags-condition-unit")
|
|
100
95
|
}));
|