更新日程删除提示

This commit is contained in:
Master 2024-07-16 11:46:14 +08:00
parent 9cd0ce6647
commit d0c6fb5b72

View File

@ -34,7 +34,7 @@
<script lang="ts" setup name="editSchedule">
import { onMounted, reactive, ref } from 'vue';
import { dayjs, ElMessageBox, ElNotification } from 'element-plus';
import { dayjs, ElMessageBox, ElMessage, ElNotification } from 'element-plus';
import { getAPI } from '/@/utils/axios-utils';
import { SysScheduleApi } from '/@/api-services/api';
@ -93,13 +93,17 @@ const submit = () => {
//
const remove = () => {
console.log(JSON.stringify(state.ruleForm));
ruleFormRef.value.validate(async (valid: boolean) => {
await getAPI(SysScheduleApi).apiSysScheduleDeletePost(state.ruleForm);
closeDialog();
});
ElMessageBox.confirm(`确定删除吗?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(async () => {
await getAPI(SysScheduleApi).apiSysScheduleDeletePost(state.ruleForm);
closeDialog();
ElMessage.success('操作成功');
})
.catch(() => {});
};
//