| | |
| | | <div class="system-user-search mb15"> |
| | | <el-form :inline="true" class="demo-form-inline"> |
| | | <el-form-item> |
| | | <el-input size="default" v-model="listQuery.searchParams.name" placeholder="预案名称" style="max-width: 215px;"> </el-input> |
| | | <el-input size="default" v-model="listQuery.searchParams.name" placeholder="预案名称" style="max-width: 215px"> </el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-select size="default" v-model="listQuery.searchParams.type" placeholder="请选择预案类型" class="ml10" style="max-width: 215px;"> |
| | | <el-select size="default" v-model="listQuery.searchParams.type" placeholder="请选择预案类型" class="ml10" style="max-width: 215px"> |
| | | <el-option label="综合应急预案" value="admin"></el-option> |
| | | <el-option label="现场处置方案" value="common"></el-option> |
| | | <el-option label="专项应急预案" value="common"></el-option> |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button size="default" type="primary" class="ml10" @click="onSubmit"> |
| | | 查询 |
| | | </el-button> |
| | | <el-button size="default" class="ml10" @click="submitReset"> |
| | | 重置 |
| | | </el-button> |
| | | <el-button size="default" type="primary" class="ml10" @click="onSubmit"> 查询 </el-button> |
| | | <el-button size="default" class="ml10" @click="submitReset"> 重置 </el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | |
| | | <div class="button_Left"> |
| | | <el-button size="default" type="primary" @click="onOpenAdd"> |
| | | <el-icon> |
| | | <Plus /> |
| | | </el-icon>新建 |
| | | <Plus /> </el-icon |
| | | >新建 |
| | | </el-button> |
| | | <el-button size="default" type="warning" plain :disabled="warning"> |
| | | <el-icon> |
| | | <Edit /> |
| | | </el-icon>修改 |
| | | <Edit /> </el-icon |
| | | >修改 |
| | | </el-button> |
| | | <el-button size="default" type="danger" plain :disabled="danger" @click="onDeleteAll"> |
| | | <el-icon> |
| | | <Delete /> |
| | | </el-icon>删除 |
| | | <Delete /> </el-icon |
| | | >删除 |
| | | </el-button> |
| | | <el-button size="default" type="primary" @click="onabolishLibrary"> |
| | | 废止库 |
| | | </el-button> |
| | | <el-button size="default" type="primary" @click="onabolishLibrary"> 废止库 </el-button> |
| | | </div> |
| | | <div class="button_Right"> |
| | | <!-- <el-button size="default" @click="upButton">--> |
| | |
| | | <!-- </el-button>--> |
| | | </div> |
| | | </div> |
| | | <el-table |
| | | :data="tableData" |
| | | style="width: 100%" |
| | | ref="multipleTableRef" |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <el-table-column |
| | | type="selection" |
| | | width="55" |
| | | /> |
| | | <el-table :data="tableData" style="width: 100%" ref="multipleTableRef" @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55" /> |
| | | <el-table-column prop="name" label="预案名称" show-overflow-tooltip sortable></el-table-column> |
| | | <el-table-column prop="type" label="预案类型" show-overflow-tooltip sortable></el-table-column> |
| | | <el-table-column prop="level" label="预案级别" show-overflow-tooltip sortable></el-table-column> |
| | |
| | | <el-table-column label="操作" width="260" align="center" fixed="right"> |
| | | <template #default="scope"> |
| | | <el-button size="small" text type="primary" @click="isDialogFormVisible(scope.row.id)"> |
| | | <el-icon style="margin-right: 5px;"> |
| | | <VideoPlay /> |
| | | </el-icon>启动 |
| | | <el-icon style="margin-right: 5px"> |
| | | <VideoPlay /> </el-icon |
| | | >启动 |
| | | </el-button> |
| | | <el-button size="small" text type="primary" @click="abolish(scope.row.id)"> |
| | | <el-icon style="margin-right: 5px;"> |
| | | <VideoPause /> |
| | | </el-icon>废止 |
| | | <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-icon style="margin-right: 5px"> |
| | | <EditPen /> </el-icon |
| | | >修改 |
| | | </el-button> |
| | | <el-button |
| | | size="small" |
| | | text |
| | | type="primary" |
| | | v-if="scope.row.approveStatus === 0 || scope.row.approveStatus === null" |
| | | @click="initiateApproval(scope.row.id)" |
| | | > |
| | | 发起审批 |
| | | </el-button> |
| | | <el-button |
| | | size="small" |
| | | text |
| | | type="primary" |
| | | v-if="scope.row.approveStatus === 1 || scope.row.checkApprove == true" |
| | | @click="onApproval(scope.row.id)" |
| | | > |
| | | 审批 |
| | | </el-button> |
| | | <el-button |
| | | size="small" |
| | | text |
| | | type="primary" |
| | | v-if="scope.row.approveStatus === 1 || scope.row.checkApprove == false" |
| | | @click="initiateApproval(scope.row.id)" |
| | | > |
| | | 查看审批 |
| | | </el-button> |
| | | <el-button size="small" text type="primary" v-if="scope.row.approveStatus === 2" @click="initiateApproval(scope.row.id)"> |
| | | 查看审批流程 |
| | | </el-button> |
| | | <!-- <el-button size="small" text type="primary" @click="jumpFrom(0)">--> |
| | | <!-- <el-icon style="margin-right: 5px;">--> |
| | |
| | | <!-- </el-button>--> |
| | | <el-button size="small" text type="primary" @click="onRowDel(scope.row.id)"> |
| | | <el-icon> |
| | | <Delete /> |
| | | </el-icon>删除 |
| | | <Delete /> </el-icon |
| | | >删除 |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | </el-card> |
| | | <OpenAdd ref="addRef" @myAdd="onMyAdd"/> |
| | | <AbolishLibrary ref="abolishRef"/> |
| | | <InitiateApproval ref="initiateApprovalRef" /> |
| | | <Approval ref="approvalRef" /> |
| | | <!-- <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> |
| | |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | | <el-button @click="dialogFormVisible = false">取消</el-button> |
| | | <el-button type="primary" @click="onDetermine" |
| | | >确定</el-button |
| | | > |
| | | <el-button type="primary" @click="onDetermine">确定</el-button> |
| | | </span> |
| | | </template> |
| | | </el-dialog> |
| | |
| | | </template> |
| | | |
| | | <script lang="ts"> |
| | | import { |
| | | reactive, |
| | | onMounted, |
| | | ref, |
| | | defineComponent |
| | | } from 'vue'; |
| | | import { |
| | | ElMessageBox, |
| | | ElMessage, |
| | | } from 'element-plus'; |
| | | import { reactive, onMounted, ref, defineComponent } from 'vue'; |
| | | import { ElMessageBox, ElMessage } from 'element-plus'; |
| | | // import {useRouter} from "vue-router" |
| | | import type { |
| | | // FormInstance, |
| | | } from 'element-plus' |
| | | import { Plus, |
| | | Edit, |
| | | Delete, |
| | | Upload, |
| | | Download, |
| | | Refresh, |
| | | VideoPause, |
| | | VideoPlay, |
| | | EditPen, |
| | | FullScreen |
| | | } from '@element-plus/icons-vue' |
| | | import type {} from // FormInstance, |
| | | 'element-plus'; |
| | | import { Plus, Edit, Delete, Upload, Download, Refresh, VideoPause, VideoPlay, EditPen, FullScreen } 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 InitiateApproval from '/@/views/contingencyManagement/panManagement/component/initiateApproval.vue'; |
| | | import Approval from '/@/views/contingencyManagement/panManagement/component/approval.vue'; |
| | | // import UpData from '/@/views/contingencyManagement/panManagement/component/upData.vue'; |
| | | import {emergencyPlanApi} from "/@/api/emergencyPlan"; |
| | | import {emergencyPlanLogApi} from "/@/api/emergencyPlanLog"; |
| | | import { emergencyPlanApi } from '/@/api/emergencyPlan'; |
| | | import { emergencyPlanLogApi } from '/@/api/emergencyPlanLog'; |
| | | |
| | | export default defineComponent({ |
| | | name: 'systemUser', |
| | | components: { |
| | | OpenAdd, |
| | | // StartUp, |
| | | InitiateApproval, |
| | | AbolishLibrary, |
| | | Approval, |
| | | EditPen, |
| | | Plus, |
| | | Edit, |
| | |
| | | VideoPause, |
| | | VideoPlay, |
| | | // UpData, |
| | | emergencyPlanApi |
| | | emergencyPlanApi, |
| | | }, |
| | | setup(prop, {emit}) { |
| | | // 列表参数 |
| | |
| | | pageIndex: 1, |
| | | pageSize: 10, |
| | | searchParams: { |
| | | name: "", |
| | | type: "", |
| | | name: '', |
| | | type: '', |
| | | abolishStatus: false, |
| | | } |
| | | }) |
| | | }, |
| | | }); |
| | | // 定义表格数据 |
| | | const tableData = ref([]); |
| | | // 列表数据请求 |
| | | const onSubmit = async () => { |
| | | let res = await emergencyPlanApi().getEmergencyPlanList(listQuery) |
| | | let res = await emergencyPlanApi().getEmergencyPlanList(listQuery); |
| | | if(res.data.code === '200'){ |
| | | tableData.value = res.data.data; |
| | | pageIndex.value = res.data.pageIndex; |
| | |
| | | ElMessage({ |
| | | showClose: true, |
| | | type:'error', |
| | | message:res.data.msg |
| | | }) |
| | | message: res.data.msg, |
| | | }); |
| | | } |
| | | } |
| | | }; |
| | | // 重置 |
| | | const submitReset = () => { |
| | | listQuery.searchParams.name = ''; |
| | |
| | | const warning = ref(true); |
| | | const danger = ref(true); |
| | | |
| | | |
| | | // 上传 |
| | | // const upShow=ref() |
| | | // const upButton=()=>{ |
| | |
| | | // } |
| | | // 启动弹窗 |
| | | const isDialogFormVisible = (data: any) => { |
| | | dialogFormVisible.value=true |
| | | form.value.planId=data |
| | | } |
| | | const dialogFormVisible = ref(false) |
| | | dialogFormVisible.value = true; |
| | | form.value.planId = data; |
| | | }; |
| | | const dialogFormVisible = ref(false); |
| | | const form = ref ({ |
| | | remark: '', |
| | | }) |
| | | }); |
| | | const onDetermine = () => { |
| | | dialogFormVisible.value=false |
| | | dialogFormVisible.value = false; |
| | | emergencyPlanLogApi() |
| | | .addEmergencyPlanLog(form.value) |
| | | .then((res) => { |
| | |
| | | }); |
| | | form.value = { |
| | | remark: '', |
| | | } |
| | | } |
| | | }; |
| | | }; |
| | | // 打开新增用户弹窗 |
| | | const addRef = ref(); |
| | | const onOpenAdd = () => { |
| | |
| | | confirmButtonText: '确认', |
| | | cancelButtonText: '取消', |
| | | type: 'warning', |
| | | }).then(() => { |
| | | }) |
| | | .then(() => { |
| | | emergencyPlanApi() |
| | | .EmergencyTeam(data) |
| | | .then((res) => { |
| | |
| | | onSubmit(); |
| | | } |
| | | }); |
| | | }).catch(() => {}); |
| | | }) |
| | | .catch(() => {}); |
| | | }; |
| | | |
| | | // 删除用户 |
| | | const onRowDel = (id: number) => { |
| | | let arr = []; |
| | | arr.push(id) |
| | | arr.push(id); |
| | | ElMessageBox.confirm('确定删除所选项吗?', '提示', { |
| | | confirmButtonText: '确认', |
| | | cancelButtonText: '取消', |
| | | type: 'warning', |
| | | }).then(() => { |
| | | }) |
| | | .then(() => { |
| | | emergencyPlanApi() |
| | | .deleteEmergencyTeam(arr) |
| | | .then((res) => { |
| | |
| | | onSubmit(); |
| | | } |
| | | }); |
| | | }).catch(() => {}); |
| | | }) |
| | | .catch(() => {}); |
| | | }; |
| | | |
| | | const deleteAll = ref(); |
| | |
| | | // } |
| | | // }) |
| | | // } |
| | | // 发起审批弹窗 |
| | | const initiateApprovalRef = ref(); |
| | | const initiateApproval = () => { |
| | | initiateApprovalRef.value.openDialog(); |
| | | }; |
| | | // 审批 |
| | | const approvalRef = ref(); |
| | | const onApproval = () => { |
| | | approvalRef.value.openDialog(); |
| | | }; |
| | | //全屏 |
| | | const full = ref(false); |
| | | const toggleFullscreen = () => { |
| | |
| | | onSubmit(); |
| | | }); |
| | | return { |
| | | // upButton, |
| | | // upShow, |
| | | tableData, |
| | | onSubmit, |
| | | onOpenAdd, //新增 |
| | |
| | | onRowDel, |
| | | onHandleSizeChange, |
| | | onHandleCurrentChange, |
| | | // jumpFrom, |
| | | // router, |
| | | toggleFullscreen, |
| | | FullScreen, |
| | | full, |
| | |
| | | handleSelectionChange, |
| | | onMyAdd, |
| | | onDeleteAll, |
| | | // dialogTableVisible, |
| | | dialogFormVisible, |
| | | isDialogFormVisible, |
| | | form, |
| | | emit, |
| | | onDetermine, |
| | | onEdit, |
| | | initiateApproval, |
| | | initiateApprovalRef, |
| | | onApproval, |
| | | approvalRef, |
| | | }; |
| | | }, |
| | | }); |