feat : 年度计划删除操作

This commit is contained in:
clay
2024-07-11 22:22:20 +08:00
parent 480d419a6c
commit 3401c8a5e3

View File

@@ -6,7 +6,7 @@
<script setup lang="jsx">
import {deletePlan} from "@/api/project-demand/summary";
import {ElNotification} from "element-plus";
import {ElMessageBox, ElNotification} from "element-plus";
const tableIns = ref()
const router = useRouter()
@@ -93,13 +93,23 @@ const handleDetail = (row) => {
})
}
const handleDelete = (row) => {
deletePlan(row.annualPlanId).then(res => {
console.log(res)
ElNotification({
title: '提示',
message: res.msg,
type: res.code === 1000 ? 'success' : 'error'
ElMessageBox.confirm('确认删除该条数据吗?', '确认删除', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
deletePlan(row.annualPlanId).then(res => {
console.log(res)
ElNotification({
title: '提示',
message: res.msg,
type: res.code === 1000 ? 'success' : 'error'
})
if (res.code === 1000){
tableIns.value.refresh()
}
})
}).catch(() => {
})
}
</script>