|
@@ -83,6 +83,16 @@ function AddModal(props) {
|
|
type: item.code,
|
|
type: item.code,
|
|
});
|
|
});
|
|
setType(item);
|
|
setType(item);
|
|
|
|
+ if (id == 7) {
|
|
|
|
+ form.resetFields(['industry_id', 'location', 'name', 'version']);
|
|
|
|
+ setCodes({
|
|
|
|
+ type: '',
|
|
|
|
+ industry: '',
|
|
|
|
+ location: '',
|
|
|
|
+ name: '',
|
|
|
|
+ version: '',
|
|
|
|
+ });
|
|
|
|
+ }
|
|
form.setFieldsValue({ flow_id: id == 7 ? '4' : '1' });
|
|
form.setFieldsValue({ flow_id: id == 7 ? '4' : '1' });
|
|
};
|
|
};
|
|
const changeIndustry = id => {
|
|
const changeIndustry = id => {
|
|
@@ -196,6 +206,7 @@ function AddModal(props) {
|
|
// };
|
|
// };
|
|
|
|
|
|
useEffect(() => {
|
|
useEffect(() => {
|
|
|
|
+ form.resetFields();
|
|
if (data.id) {
|
|
if (data.id) {
|
|
const type = typeList.find(item => item.id == data.type_id);
|
|
const type = typeList.find(item => item.id == data.type_id);
|
|
const industry = industryList.find(item => item.id == data.industry_id);
|
|
const industry = industryList.find(item => item.id == data.industry_id);
|