|
@@ -42,7 +42,7 @@
|
|
</a-form-item>
|
|
</a-form-item>
|
|
<a-form-item>
|
|
<a-form-item>
|
|
<a-button type="primary" html-type="submit" style="margin-right: 10px;">确定</a-button>
|
|
<a-button type="primary" html-type="submit" style="margin-right: 10px;">确定</a-button>
|
|
- <a-button @click="$refs.formRef.resetFields(); visible = false;">取消</a-button>
|
|
|
|
|
|
+ <a-button @click="resetForm">取消</a-button>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-form>
|
|
</a-form>
|
|
</a-modal>
|
|
</a-modal>
|
|
@@ -150,16 +150,12 @@ const handleSubmit = ({ values, errors }) => {
|
|
if (typeCurrent.value == 1) {
|
|
if (typeCurrent.value == 1) {
|
|
dictionaryAdd(submitData).then(res => {
|
|
dictionaryAdd(submitData).then(res => {
|
|
intData();
|
|
intData();
|
|
- visible.value = false;
|
|
|
|
- dicId.value = null;
|
|
|
|
-
|
|
|
|
|
|
+ resetForm();
|
|
})
|
|
})
|
|
} else {
|
|
} else {
|
|
dictionaryUpdate(submitData).then(res => {
|
|
dictionaryUpdate(submitData).then(res => {
|
|
intData();
|
|
intData();
|
|
- visible.value = false;
|
|
|
|
- dicId.value = null;
|
|
|
|
-
|
|
|
|
|
|
+ resetForm();
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
@@ -187,6 +183,14 @@ const dictShowModel = (type, data) => {
|
|
const resetForm = () => {
|
|
const resetForm = () => {
|
|
visible.value = false;
|
|
visible.value = false;
|
|
dicId.value = null;
|
|
dicId.value = null;
|
|
|
|
+ formRef.value.resetFields();
|
|
|
|
+ Object.assign(formState, {
|
|
|
|
+ label: '',
|
|
|
|
+ value: '',
|
|
|
|
+ typeKey: '',
|
|
|
|
+ typeLabel: '',
|
|
|
|
+ remark: '',
|
|
|
|
+ });
|
|
}
|
|
}
|
|
// 重置
|
|
// 重置
|
|
const resetSelectData = () => {
|
|
const resetSelectData = () => {
|