| | |
| | | <template> |
| | | <div class="system-edit-user-container"> |
| | | <el-dialog |
| | | title="废止库" |
| | | v-model="isShowDialog" |
| | | width="60%" |
| | | draggable |
| | | :fullscreen="full" |
| | | > |
| | | <el-dialog title="废止库" v-model="isShowDialog" width="60%" draggable :fullscreen="full"> |
| | | <el-button @click="toggleFullscreen" size="small" class="pot" :icon="FullScreen"></el-button> |
| | | <el-row :gutter="35"> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20"> |
| | | <el-table |
| | | :data="tableData" |
| | | style="width: 100%;margin-top: 15px;" |
| | | style="width: 100%; margin-top: 15px" |
| | | ref="multipleTableRef" |
| | | :model="formInline" |
| | | :header-cell-style="{background:'#f6f7fa',color:'#909399'}" |
| | |
| | | <el-table-column prop="releaseDate" label="发布实施日期" show-overflow-tooltip sortable></el-table-column> |
| | | <el-table-column label="操作" width="200" align="center"> |
| | | <template #default="scope"> |
| | | <el-button size="small" text type="primary" @click="onReduction(scope.row.id)">还原 |
| | | </el-button> |
| | | <el-button size="small" text type="primary" @click="onReduction(scope.row.id)">还原 </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | import { |
| | | ref, |
| | | reactive, |
| | | defineComponent |
| | | defineComponent, |
| | | onMounted, |
| | | } from 'vue'; |
| | | |
| | | import type { |
| | | FormInstance, |
| | | } from 'element-plus' |
| | | import type { FormInstance } from 'element-plus'; |
| | | import { |
| | | // ElMessageBox, |
| | | ElMessage, |
| | | } from 'element-plus'; |
| | | import { |
| | | Search, |
| | | FullScreen |
| | | } from '@element-plus/icons-vue' |
| | | import {emergencyPlanApi} from "/@/api/emergencyPlan"; |
| | | import { Search, FullScreen } from '@element-plus/icons-vue'; |
| | | import { emergencyPlanApi } from '../../../../api/emergencyPlan'; |
| | | export default defineComponent({ |
| | | name: 'abolishLibrary', |
| | | components: { |
| | | |
| | | }, |
| | | components: {}, |
| | | setup(prop, {emit}) { |
| | | // 列表参数 |
| | | const listQuery = reactive({ |
| | |
| | | pageSize: 10, |
| | | searchParams: { |
| | | abolishStatus: true, |
| | | } |
| | | }) |
| | | }, |
| | | }); |
| | | // 定义表格数据 |
| | | const tableData = ref([]); |
| | | |
| | | // 列表数据请求 |
| | | const openDialog = async () => { |
| | | isShowDialog.value = true; |
| | | 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 isShowDialog = ref(false) |
| | | const isShowDialog = ref(false); |
| | | |
| | | const ruleFormRef = ref<FormInstance>() |
| | | const ruleFormRef = ref<FormInstance>(); |
| | | // 打开弹窗 |
| | | // const openDialog = () => { |
| | | // isShowDialog.value = true; |
| | |
| | | const onCancel = () => { |
| | | closeDialog(); |
| | | }; |
| | | const onReduction = async (data: any, formEl: FormInstance) => { |
| | | const onReduction = async (id: number) => { |
| | | isShowDialog.value = false; |
| | | emergencyPlanApi() |
| | | .addEmergencyPlan(data) |
| | | .reductionEmergencyTeam(id) |
| | | .then((res) => { |
| | | if (res.data.code == 200) { |
| | | ElMessage({ |
| | |
| | | type: 'error', |
| | | }); |
| | | emit('myAdd', true); |
| | | openDialog() |
| | | } |
| | | formEl.resetFields(); |
| | | }); |
| | | } |
| | | }).catch(() => {}); |
| | | }; |
| | | // 分页 |
| | | const pageIndex = ref(); |
| | | const pageSize = ref(); |