wargerm 0.7.70 → 0.7.72
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/dist/index.esm.js +44 -5
- package/dist/index.js +44 -5
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
@@ -3960,6 +3960,19 @@ var WForm = function WForm(props, ref) {
|
|
3960
3960
|
var handleSearch = function handleSearch(isfirst) {
|
3961
3961
|
var searchForm = form.getFieldsValue();
|
3962
3962
|
filterFormColumns.forEach(function (c) {
|
3963
|
+
if (c.type == 'group') {
|
3964
|
+
var _c$children3;
|
3965
|
+
c.children = (_c$children3 = c.children) === null || _c$children3 === void 0 ? void 0 : _c$children3.forEach(function (itm) {
|
3966
|
+
if (itm.search && itm.search.transform) {
|
3967
|
+
var transformObj = itm.search.transform(searchForm[itm.dataIndex]);
|
3968
|
+
if (transformObj[itm.dataIndex] == undefined) {
|
3969
|
+
delete searchForm[itm.dataIndex];
|
3970
|
+
}
|
3971
|
+
searchForm = _objectSpread2(_objectSpread2({}, searchForm), transformObj);
|
3972
|
+
return false;
|
3973
|
+
}
|
3974
|
+
});
|
3975
|
+
}
|
3963
3976
|
if (c.search && c.search.transform) {
|
3964
3977
|
var transformObj = c.search.transform(searchForm[c.dataIndex]);
|
3965
3978
|
if (transformObj[c.dataIndex] == undefined) {
|
@@ -4005,6 +4018,19 @@ var WForm = function WForm(props, ref) {
|
|
4005
4018
|
var getFormValues = function getFormValues() {
|
4006
4019
|
var searchForm = form.getFieldsValue();
|
4007
4020
|
filterFormColumns.forEach(function (c) {
|
4021
|
+
if (c.type == 'group') {
|
4022
|
+
var _c$children4;
|
4023
|
+
c.children = (_c$children4 = c.children) === null || _c$children4 === void 0 ? void 0 : _c$children4.forEach(function (itm) {
|
4024
|
+
if (itm.search && itm.search.transform) {
|
4025
|
+
var transformObj = itm.search.transform(searchForm[itm.dataIndex]);
|
4026
|
+
searchForm = _objectSpread2(_objectSpread2({}, searchForm), transformObj);
|
4027
|
+
if (!transformObj[itm.dataIndex]) {
|
4028
|
+
delete searchForm[itm.dataIndex];
|
4029
|
+
}
|
4030
|
+
return false;
|
4031
|
+
}
|
4032
|
+
});
|
4033
|
+
}
|
4008
4034
|
if (c.search && c.search.transform) {
|
4009
4035
|
var transformObj = c.search.transform(searchForm[c.dataIndex]);
|
4010
4036
|
searchForm = _objectSpread2(_objectSpread2({}, searchForm), transformObj);
|
@@ -4062,6 +4088,19 @@ var WForm = function WForm(props, ref) {
|
|
4062
4088
|
var _form$setFieldsValue4;
|
4063
4089
|
var setFieldsValues = _objectSpread2({}, record);
|
4064
4090
|
filterFormColumns.forEach(function (c) {
|
4091
|
+
if (c.type == 'group') {
|
4092
|
+
var _c$children5;
|
4093
|
+
c.children = (_c$children5 = c.children) === null || _c$children5 === void 0 ? void 0 : _c$children5.forEach(function (itm) {
|
4094
|
+
if (itm.search && itm.search.transformSetForm) {
|
4095
|
+
var transformObj = itm.search.transformSetForm(setFieldsValues[itm.dataIndex], setFieldsValues);
|
4096
|
+
setFieldsValues = _objectSpread2(_objectSpread2({}, setFieldsValues), transformObj);
|
4097
|
+
if (!transformObj[itm.dataIndex]) {
|
4098
|
+
delete setFieldsValues[itm.dataIndex];
|
4099
|
+
}
|
4100
|
+
return false;
|
4101
|
+
}
|
4102
|
+
});
|
4103
|
+
}
|
4065
4104
|
if (c.search && c.search.transformSetForm) {
|
4066
4105
|
var transformObj = c.search.transformSetForm(setFieldsValues[c.dataIndex], setFieldsValues);
|
4067
4106
|
setFieldsValues = _objectSpread2(_objectSpread2({}, setFieldsValues), transformObj);
|
@@ -4096,10 +4135,10 @@ var WForm = function WForm(props, ref) {
|
|
4096
4135
|
};
|
4097
4136
|
}, []);
|
4098
4137
|
return /*#__PURE__*/React.createElement(Form, _objectSpread2({
|
4099
|
-
style: {
|
4138
|
+
style: _objectSpread2({
|
4100
4139
|
width: '100%'
|
4101
|
-
},
|
4102
|
-
className: "mt10",
|
4140
|
+
}, style || {}),
|
4141
|
+
className: "mt10 ".concat(className || ''),
|
4103
4142
|
onFinish: function onFinish(value) {
|
4104
4143
|
return handleSearch();
|
4105
4144
|
},
|
@@ -6817,7 +6856,7 @@ var TabelCard = function TabelCard(props, ref) {
|
|
6817
6856
|
}, record);
|
6818
6857
|
case 3:
|
6819
6858
|
res = _context2.sent;
|
6820
|
-
if (res.code == 200) {
|
6859
|
+
if ((res === null || res === void 0 ? void 0 : res.code) == 200) {
|
6821
6860
|
loading();
|
6822
6861
|
actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current2 = actionRef.current) === null || _actionRef$current2 === void 0 ? void 0 : _actionRef$current2.reload();
|
6823
6862
|
}
|
@@ -7109,7 +7148,7 @@ var TabelCard = function TabelCard(props, ref) {
|
|
7109
7148
|
});
|
7110
7149
|
case 3:
|
7111
7150
|
res = _context8.sent;
|
7112
|
-
if (res.code == 200) {
|
7151
|
+
if ((res === null || res === void 0 ? void 0 : res.code) == 200) {
|
7113
7152
|
loading(); // 关闭弹窗
|
7114
7153
|
actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current7 = actionRef.current) === null || _actionRef$current7 === void 0 ? void 0 : _actionRef$current7.reload();
|
7115
7154
|
}
|
package/dist/index.js
CHANGED
@@ -4004,6 +4004,19 @@ var WForm = function WForm(props, ref) {
|
|
4004
4004
|
var handleSearch = function handleSearch(isfirst) {
|
4005
4005
|
var searchForm = form.getFieldsValue();
|
4006
4006
|
filterFormColumns.forEach(function (c) {
|
4007
|
+
if (c.type == 'group') {
|
4008
|
+
var _c$children3;
|
4009
|
+
c.children = (_c$children3 = c.children) === null || _c$children3 === void 0 ? void 0 : _c$children3.forEach(function (itm) {
|
4010
|
+
if (itm.search && itm.search.transform) {
|
4011
|
+
var transformObj = itm.search.transform(searchForm[itm.dataIndex]);
|
4012
|
+
if (transformObj[itm.dataIndex] == undefined) {
|
4013
|
+
delete searchForm[itm.dataIndex];
|
4014
|
+
}
|
4015
|
+
searchForm = _objectSpread2(_objectSpread2({}, searchForm), transformObj);
|
4016
|
+
return false;
|
4017
|
+
}
|
4018
|
+
});
|
4019
|
+
}
|
4007
4020
|
if (c.search && c.search.transform) {
|
4008
4021
|
var transformObj = c.search.transform(searchForm[c.dataIndex]);
|
4009
4022
|
if (transformObj[c.dataIndex] == undefined) {
|
@@ -4049,6 +4062,19 @@ var WForm = function WForm(props, ref) {
|
|
4049
4062
|
var getFormValues = function getFormValues() {
|
4050
4063
|
var searchForm = form.getFieldsValue();
|
4051
4064
|
filterFormColumns.forEach(function (c) {
|
4065
|
+
if (c.type == 'group') {
|
4066
|
+
var _c$children4;
|
4067
|
+
c.children = (_c$children4 = c.children) === null || _c$children4 === void 0 ? void 0 : _c$children4.forEach(function (itm) {
|
4068
|
+
if (itm.search && itm.search.transform) {
|
4069
|
+
var transformObj = itm.search.transform(searchForm[itm.dataIndex]);
|
4070
|
+
searchForm = _objectSpread2(_objectSpread2({}, searchForm), transformObj);
|
4071
|
+
if (!transformObj[itm.dataIndex]) {
|
4072
|
+
delete searchForm[itm.dataIndex];
|
4073
|
+
}
|
4074
|
+
return false;
|
4075
|
+
}
|
4076
|
+
});
|
4077
|
+
}
|
4052
4078
|
if (c.search && c.search.transform) {
|
4053
4079
|
var transformObj = c.search.transform(searchForm[c.dataIndex]);
|
4054
4080
|
searchForm = _objectSpread2(_objectSpread2({}, searchForm), transformObj);
|
@@ -4106,6 +4132,19 @@ var WForm = function WForm(props, ref) {
|
|
4106
4132
|
var _form$setFieldsValue4;
|
4107
4133
|
var setFieldsValues = _objectSpread2({}, record);
|
4108
4134
|
filterFormColumns.forEach(function (c) {
|
4135
|
+
if (c.type == 'group') {
|
4136
|
+
var _c$children5;
|
4137
|
+
c.children = (_c$children5 = c.children) === null || _c$children5 === void 0 ? void 0 : _c$children5.forEach(function (itm) {
|
4138
|
+
if (itm.search && itm.search.transformSetForm) {
|
4139
|
+
var transformObj = itm.search.transformSetForm(setFieldsValues[itm.dataIndex], setFieldsValues);
|
4140
|
+
setFieldsValues = _objectSpread2(_objectSpread2({}, setFieldsValues), transformObj);
|
4141
|
+
if (!transformObj[itm.dataIndex]) {
|
4142
|
+
delete setFieldsValues[itm.dataIndex];
|
4143
|
+
}
|
4144
|
+
return false;
|
4145
|
+
}
|
4146
|
+
});
|
4147
|
+
}
|
4109
4148
|
if (c.search && c.search.transformSetForm) {
|
4110
4149
|
var transformObj = c.search.transformSetForm(setFieldsValues[c.dataIndex], setFieldsValues);
|
4111
4150
|
setFieldsValues = _objectSpread2(_objectSpread2({}, setFieldsValues), transformObj);
|
@@ -4140,10 +4179,10 @@ var WForm = function WForm(props, ref) {
|
|
4140
4179
|
};
|
4141
4180
|
}, []);
|
4142
4181
|
return /*#__PURE__*/React__default['default'].createElement(antd.Form, _objectSpread2({
|
4143
|
-
style: {
|
4182
|
+
style: _objectSpread2({
|
4144
4183
|
width: '100%'
|
4145
|
-
},
|
4146
|
-
className: "mt10",
|
4184
|
+
}, style || {}),
|
4185
|
+
className: "mt10 ".concat(className || ''),
|
4147
4186
|
onFinish: function onFinish(value) {
|
4148
4187
|
return handleSearch();
|
4149
4188
|
},
|
@@ -6861,7 +6900,7 @@ var TabelCard = function TabelCard(props, ref) {
|
|
6861
6900
|
}, record);
|
6862
6901
|
case 3:
|
6863
6902
|
res = _context2.sent;
|
6864
|
-
if (res.code == 200) {
|
6903
|
+
if ((res === null || res === void 0 ? void 0 : res.code) == 200) {
|
6865
6904
|
loading();
|
6866
6905
|
actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current2 = actionRef.current) === null || _actionRef$current2 === void 0 ? void 0 : _actionRef$current2.reload();
|
6867
6906
|
}
|
@@ -7153,7 +7192,7 @@ var TabelCard = function TabelCard(props, ref) {
|
|
7153
7192
|
});
|
7154
7193
|
case 3:
|
7155
7194
|
res = _context8.sent;
|
7156
|
-
if (res.code == 200) {
|
7195
|
+
if ((res === null || res === void 0 ? void 0 : res.code) == 200) {
|
7157
7196
|
loading(); // 关闭弹窗
|
7158
7197
|
actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current7 = actionRef.current) === null || _actionRef$current7 === void 0 ? void 0 : _actionRef$current7.reload();
|
7159
7198
|
}
|