| | |
| | | <template #default="scope"> |
| | | <el-button link type="primary" @click="toProcess('view',scope.row)">查看</el-button> |
| | | <el-button link type="primary" @click="toProcess('edit',scope.row)">编辑</el-button> |
| | | <el-button link type="danger">删除</el-button> |
| | | <el-button link type="danger" @click="del(scope.row)">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | |
| | | <script setup> |
| | | import {onMounted, reactive, ref} from "vue"; |
| | | import {getProjectList, getProjectStatistics} from "@/api/projectManage/project"; |
| | | import {ElMessage} from "element-plus"; |
| | | import {delProject, getProjectList, getProjectStatistics} from "@/api/projectManage/project"; |
| | | import {ElMessage, ElMessageBox} from "element-plus"; |
| | | import {delMonitor} from "@/api/sysUsers"; |
| | | const router = useRouter(); |
| | | |
| | | const loading = ref(false); |
| | |
| | | value.type = type; |
| | | router.push({ path: '/process', query: {id: value.id, type: type}}); |
| | | } |
| | | const del = (val) => { |
| | | ElMessageBox.confirm( |
| | | '确定删除此条数据?', |
| | | '提示', |
| | | { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning', |
| | | }) |
| | | .then( async() => { |
| | | const res = await delProject(val) |
| | | if(res.code == 200){ |
| | | ElMessage.success('数据删除成功') |
| | | getList() |
| | | }else{ |
| | | ElMessage.warning(res.message) |
| | | } |
| | | }) |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |