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,6 +93,11 @@ const handleDetail = (row) => {
}) })
} }
const handleDelete = (row) => { const handleDelete = (row) => {
ElMessageBox.confirm('确认删除该条数据吗?', '确认删除', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
deletePlan(row.annualPlanId).then(res => { deletePlan(row.annualPlanId).then(res => {
console.log(res) console.log(res)
ElNotification({ ElNotification({
@@ -100,6 +105,11 @@ const handleDelete = (row) => {
message: res.msg, message: res.msg,
type: res.code === 1000 ? 'success' : 'error' type: res.code === 1000 ? 'success' : 'error'
}) })
if (res.code === 1000){
tableIns.value.refresh()
}
})
}).catch(() => {
}) })
} }
</script> </script>