| | |
| | | const onCancel = () => { |
| | | closeDialog(); |
| | | }; |
| | | const onReduction = async (data: any, formEl: FormInstance) => { |
| | | isShowDialog.value = false; |
| | | emergencyPlanApi() |
| | | .addEmergencyPlan(data) |
| | | .then((res) => { |
| | | if (res.data.code == 200) { |
| | | ElMessage({ |
| | | showClose: true, |
| | | message: res.data.msg, |
| | | type: 'success', |
| | | }); |
| | | emit('myAdd', true); |
| | | } else { |
| | | ElMessage({ |
| | | showClose: true, |
| | | message: res.data.msg, |
| | | type: 'error', |
| | | }); |
| | | emit('myAdd', true); |
| | | } |
| | | formEl.resetFields(); |
| | | }); |
| | | } |
| | | // 分页 |
| | | const pageIndex = ref(); |
| | | const pageSize = ref(); |
| | |
| | | // onSubmit, |
| | | total, |
| | | emit, |
| | | onReduction, |
| | | }; |
| | | }, |
| | | }); |