| | |
| | | <VideoPlay /> |
| | | </el-icon>启动 |
| | | </el-button> |
| | | <el-button size="small" text type="primary" @click="abolish(0)"> |
| | | <el-icon style="margin-right: 5px;"> |
| | | <VideoPause /> |
| | | </el-icon>废止 |
| | | </el-button> |
| | | <el-button size="small" text type="primary" @click="jumpFrom(0)"> |
| | | <!-- <el-button size="small" text type="primary" @click="abolish(0)">--> |
| | | <!-- <el-icon style="margin-right: 5px;">--> |
| | | <!-- <VideoPause />--> |
| | | <!-- </el-icon>废止--> |
| | | <!-- </el-button>--> |
| | | <el-button size="small" text type="primary" @click="onEdit('修改',scope.row.id)"> |
| | | <el-icon style="margin-right: 5px;"> |
| | | <EditPen /> |
| | | </el-icon>修改 |
| | | </el-button> |
| | | <el-button size="small" text type="primary" @click="abolish(0)"> |
| | | 发起审批 |
| | | </el-button> |
| | | <!-- <el-button size="small" text type="primary" @click="jumpFrom(0)">--> |
| | | <!-- <el-icon style="margin-right: 5px;">--> |
| | | <!-- <EditPen />--> |
| | | <!-- </el-icon>修改--> |
| | | <!-- </el-button>--> |
| | | <!-- <el-button size="small" text type="primary" @click="abolish(0)">--> |
| | | <!-- 发起审批--> |
| | | <!-- </el-button>--> |
| | | <el-button size="small" text type="primary" @click="onRowDel(scope.row.id)"> |
| | | <el-icon> |
| | | <Delete /> |
| | |
| | | </div> |
| | | </el-card> |
| | | <OpenAdd ref="addRef" @myAdd="onMyAdd"/> |
| | | <AbolishLibrary ref="abolishRef"/> |
| | | <!-- <AbolishLibrary ref="abolishRef"/>--> |
| | | <!-- <StartUp ref="startRef" @myAdd="startUp"/>--> |
| | | <el-dialog v-model="dialogFormVisible" width="30%" title="启动" :fullscreen="full"> |
| | | <el-button @click="toggleFullscreen" size="small" class="pot" :icon="FullScreen"></el-button> |
| | |
| | | ElMessageBox, |
| | | ElMessage, |
| | | } from 'element-plus'; |
| | | import {useRouter} from "vue-router" |
| | | // import {useRouter} from "vue-router" |
| | | import type { |
| | | // FormInstance, |
| | | } from 'element-plus' |
| | |
| | | } from '@element-plus/icons-vue' |
| | | import OpenAdd from '/@/views/contingencyManagement/panManagement/component/openAdd.vue'; |
| | | // import StartUp from '/@/views/contingencyManagement/panManagement/component/startUp.vue'; |
| | | import AbolishLibrary from '/@/views/contingencyManagement/panManagement/component/abolishLibrary.vue'; |
| | | // import AbolishLibrary from '/@/views/contingencyManagement/panManagement/component/abolishLibrary.vue'; |
| | | // import UpData from '/@/views/contingencyManagement/panManagement/component/upData.vue'; |
| | | import {emergencyPlanApi} from "/@/api/emergencyPlan"; |
| | | import {emergencyPlanLogApi} from "/@/api/emergencyPlanLog"; |
| | |
| | | components: { |
| | | OpenAdd, |
| | | // StartUp, |
| | | AbolishLibrary, |
| | | // AbolishLibrary, |
| | | EditPen, |
| | | Plus, |
| | | Edit, |
| | |
| | | }; |
| | | const warning = ref(true); |
| | | const danger = ref(true); |
| | | const deleteAll = ref(); |
| | | const handleSelectionChange = (val: any) => { |
| | | let valId = JSON.parse(JSON.stringify(val)); |
| | | let arr = []; |
| | | for (let i = 0; i < valId.length; i++) { |
| | | arr.push(valId[i].id); |
| | | } |
| | | deleteAll.value = arr.toString(); |
| | | console.log(deleteAll.value); |
| | | if (val.length == 1) { |
| | | warning.value = false; |
| | | danger.value = false; |
| | | } else if (val.length == 0) { |
| | | warning.value = true; |
| | | danger.value = true; |
| | | } else { |
| | | warning.value = true; |
| | | danger.value = false; |
| | | } |
| | | }; |
| | | |
| | | |
| | | // 上传 |
| | | // const upShow=ref() |
| | |
| | | // 打开新增用户弹窗 |
| | | const addRef = ref(); |
| | | const onOpenAdd = () => { |
| | | addRef.value.openDialog('新建应急预案管理'); |
| | | addRef.value.openDialog('新建应急预案管理',false); |
| | | }; |
| | | // 新增后刷新 |
| | | const onMyAdd = (e: boolean) => { |
| | |
| | | onSubmit(); |
| | | } |
| | | }; |
| | | //打开废止库弹窗 |
| | | const abolishRef = ref(); |
| | | const onabolishLibrary = () => { |
| | | abolishRef.value.openDialog(); |
| | | // 打开修改应急预案管理弹窗 |
| | | const onEdit = (val: string, row: object) => { |
| | | if (val == '详情') { |
| | | addRef.value.openDialog('查看应急预案管理',row,true); |
| | | } else { |
| | | addRef.value.openDialog('修改应急预案管理',row,false); |
| | | } |
| | | }; |
| | | |
| | | //打开废止库弹窗 |
| | | // const abolishRef = ref(); |
| | | // const onabolishLibrary = () => { |
| | | // abolishRef.value.openDialog(); |
| | | // }; |
| | | // 删除用户 |
| | | const onRowDel = (data: any) => { |
| | | const onRowDel = (id: number) => { |
| | | let arr = []; |
| | | arr.push(id) |
| | | ElMessageBox.confirm('确定删除所选项吗?', '提示', { |
| | | confirmButtonText: '确认', |
| | | cancelButtonText: '取消', |
| | | type: 'warning', |
| | | }).then(() => { |
| | | emergencyPlanApi() |
| | | .deleteEmergencyTeam(data) |
| | | .deleteEmergencyTeam(arr) |
| | | .then((res) => { |
| | | if (res.data.code == 200) { |
| | | ElMessage({ |
| | |
| | | }); |
| | | }).catch(() => {}); |
| | | }; |
| | | |
| | | const deleteAll = ref(); |
| | | const handleSelectionChange = (val: any) => { |
| | | let valId = JSON.parse(JSON.stringify(val)); |
| | | let arr = []; |
| | | for (let i = 0; i < valId.length; i++) { |
| | | arr.push(valId[i].id); |
| | | } |
| | | deleteAll.value = arr; |
| | | if (val.length == 1) { |
| | | warning.value = false; |
| | | danger.value = false; |
| | | } else if (val.length == 0) { |
| | | warning.value = true; |
| | | danger.value = true; |
| | | } else { |
| | | warning.value = true; |
| | | danger.value = false; |
| | | } |
| | | }; |
| | | // 多选删除 |
| | | const onDeleteAll = () => { |
| | | ElMessageBox.confirm('确定删除所选项吗?', '提示', { |
| | |
| | | }) |
| | | .then(() => { |
| | | emergencyPlanApi() |
| | | .deleteEmergencyTeam(deleteAll.value) |
| | | .then((res) => { |
| | | if (res.data.code == 200) { |
| | | ElMessage({ |
| | | showClose: true, |
| | | message: res.data.msg, |
| | | type: 'success', |
| | | }); |
| | | onSubmit(); |
| | | } else { |
| | | ElMessage({ |
| | | showClose: true, |
| | | message: res.data.msg, |
| | | type: 'error', |
| | | }); |
| | | onSubmit(); |
| | | } |
| | | }); |
| | | .deleteEmergencyTeam(deleteAll.value) |
| | | .then((res) => { |
| | | if (res.data.code == 200) { |
| | | ElMessage({ |
| | | message: res.data.msg, |
| | | type: 'success', |
| | | }); |
| | | onSubmit(); |
| | | } else { |
| | | ElMessage({ |
| | | showClose: true, |
| | | message: res.data.msg, |
| | | type: 'error', |
| | | }); |
| | | onSubmit(); |
| | | } |
| | | }); |
| | | }) |
| | | .catch(() => {}); |
| | | }; |
| | |
| | | listQuery.pageIndex = val; |
| | | }; |
| | | |
| | | const router=useRouter() |
| | | // const router=useRouter() |
| | | // 修改跳转 |
| | | const jumpFrom=(data:string)=>{ |
| | | router.push({ |
| | | path:"/processForm", |
| | | query:{ |
| | | type:data |
| | | } |
| | | }) |
| | | } |
| | | // const jumpFrom=(data:string)=>{ |
| | | // router.push({ |
| | | // path:"/processForm", |
| | | // query:{ |
| | | // type:data |
| | | // } |
| | | // }) |
| | | // } |
| | | // 发起审批跳转 |
| | | const abolish=(data:string)=>{ |
| | | router.push({ |
| | | path:"/abolishDialog", |
| | | query:{ |
| | | type:data |
| | | } |
| | | }) |
| | | } |
| | | // const abolish=(data:string)=>{ |
| | | // router.push({ |
| | | // path:"/abolishDialog", |
| | | // query:{ |
| | | // type:data |
| | | // } |
| | | // }) |
| | | // } |
| | | //全屏 |
| | | const full = ref(false); |
| | | const toggleFullscreen = () => { |
| | |
| | | tableData, |
| | | onSubmit, |
| | | onOpenAdd, //新增 |
| | | onabolishLibrary, |
| | | addRef, |
| | | abolishRef, |
| | | // onabolishLibrary, |
| | | // abolishRef, |
| | | // abolish, |
| | | onRowDel, |
| | | onHandleSizeChange, |
| | | onHandleCurrentChange, |
| | | jumpFrom, |
| | | abolish, |
| | | router, |
| | | // jumpFrom, |
| | | // router, |
| | | toggleFullscreen, |
| | | FullScreen, |
| | | full, |
| | |
| | | form, |
| | | emit, |
| | | onDetermine, |
| | | onEdit, |
| | | }; |
| | | }, |
| | | }); |