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