@zgfe/business-lib 1.0.30-user.2 → 1.0.30-user.3
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.
|
@@ -62,7 +62,7 @@ var ConditionTypeList = function ConditionTypeList(props) {
|
|
|
62
62
|
onClick: function onClick() {
|
|
63
63
|
return onAdd('tag');
|
|
64
64
|
}
|
|
65
|
-
}, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(PlusOutlined, null), /*#__PURE__*/React.createElement("span", null, "\u7528\u6237\u6807\u7B7E"))) : null, openCdpCondition && (!menuNameMap || menuNameMap['
|
|
65
|
+
}, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(PlusOutlined, null), /*#__PURE__*/React.createElement("span", null, "\u7528\u6237\u6807\u7B7E"))) : null, openCdpCondition && (!menuNameMap || menuNameMap['dataset']) ? /*#__PURE__*/React.createElement("li", {
|
|
66
66
|
className: "condition-type",
|
|
67
67
|
onClick: function onClick() {
|
|
68
68
|
return onAdd('cdp');
|
|
@@ -52,30 +52,35 @@ var CdpConditionItem = function CdpConditionItem(props) {
|
|
|
52
52
|
dataset = _useState2[0],
|
|
53
53
|
setDataset = _useState2[1];
|
|
54
54
|
|
|
55
|
-
var _useState3 = useState(),
|
|
55
|
+
var _useState3 = useState(false),
|
|
56
56
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
loading = _useState4[0],
|
|
58
|
+
setLoading = _useState4[1];
|
|
59
59
|
|
|
60
60
|
var _useState5 = useState(),
|
|
61
61
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
field = _useState6[0],
|
|
63
|
+
setField = _useState6[1];
|
|
64
64
|
|
|
65
65
|
var _useState7 = useState(),
|
|
66
66
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
operator = _useState8[0],
|
|
68
|
+
setOperator = _useState8[1];
|
|
69
69
|
|
|
70
|
-
var _useState9 = useState(
|
|
70
|
+
var _useState9 = useState(),
|
|
71
71
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
fieldValue = _useState10[0],
|
|
73
|
+
setFieldValue = _useState10[1];
|
|
74
74
|
|
|
75
|
-
var _useState11 = useState(
|
|
75
|
+
var _useState11 = useState([]),
|
|
76
76
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
fieldList = _useState12[0],
|
|
78
|
+
setFieldList = _useState12[1];
|
|
79
|
+
|
|
80
|
+
var _useState13 = useState(true),
|
|
81
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
82
|
+
isFirst = _useState14[0],
|
|
83
|
+
setIsFirst = _useState14[1];
|
|
79
84
|
|
|
80
85
|
useEffect(function () {
|
|
81
86
|
if (!props.value) {
|
|
@@ -154,6 +159,7 @@ var CdpConditionItem = function CdpConditionItem(props) {
|
|
|
154
159
|
return;
|
|
155
160
|
}
|
|
156
161
|
|
|
162
|
+
setLoading(true);
|
|
157
163
|
request(Apis.queryDatasetDetail, {
|
|
158
164
|
method: 'post',
|
|
159
165
|
data: {
|
|
@@ -162,9 +168,11 @@ var CdpConditionItem = function CdpConditionItem(props) {
|
|
|
162
168
|
datasetId: datasetId
|
|
163
169
|
}
|
|
164
170
|
}).then(function (result) {
|
|
171
|
+
setLoading(false);
|
|
165
172
|
setFieldList(result.data || []);
|
|
166
173
|
}).catch(function (e) {
|
|
167
174
|
console.error(e);
|
|
175
|
+
setLoading(false);
|
|
168
176
|
setFieldList([]);
|
|
169
177
|
});
|
|
170
178
|
};
|
|
@@ -297,6 +305,7 @@ var CdpConditionItem = function CdpConditionItem(props) {
|
|
|
297
305
|
labelField: "name",
|
|
298
306
|
keyField: "name",
|
|
299
307
|
value: field,
|
|
308
|
+
loading: loading,
|
|
300
309
|
onChange: onFieldChange
|
|
301
310
|
}), renderByType()) : null);
|
|
302
311
|
};
|
|
@@ -306,10 +315,10 @@ var CdpCondition = function CdpCondition(props) {
|
|
|
306
315
|
defaultValue = props.defaultValue,
|
|
307
316
|
onChange = props.onChange;
|
|
308
317
|
|
|
309
|
-
var
|
|
310
|
-
|
|
311
|
-
cdpConditions =
|
|
312
|
-
setCdpConditions =
|
|
318
|
+
var _useState15 = useState([undefined]),
|
|
319
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
320
|
+
cdpConditions = _useState16[0],
|
|
321
|
+
setCdpConditions = _useState16[1];
|
|
313
322
|
|
|
314
323
|
useEffect(function () {
|
|
315
324
|
if (defaultValue && defaultValue.dataset) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgfe/business-lib",
|
|
3
|
-
"version": "1.0.30-user.
|
|
3
|
+
"version": "1.0.30-user.3",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"start": "dumi dev",
|
|
6
6
|
"docs:build": "dumi build",
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"react": "^16.12.0 || ^17.0.0",
|
|
59
59
|
"yorkie": "^2.0.0"
|
|
60
60
|
},
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "eaa12ea299f24b2fbb4f33437c89e28c2df32903"
|
|
62
62
|
}
|