13937891274
2022-08-05 c12e39694dae65cf10460b3eccfb2e4005559173
应急预案管理数据对接
已修改3个文件
68 ■■■■ 文件已修改
src/api/emergencyPlan/index.ts 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/contingencyManagement/panManagement/component/abolishLibrary.vue 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/contingencyManagement/panManagement/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/emergencyPlan/index.ts
@@ -44,7 +44,14 @@
        // 应急队伍废止
        EmergencyTeam: (params:object) => {
            return request({
                url: `/emergencyPlan/updateAbolish/${params}/abolishStatus=false`,
                url: `/emergencyPlan/updateAbolish?id=${params}&abolishStatus=true`,
                method: 'get',
            });
        },
        // 应急队伍还原
        reductionEmergencyTeam: (params:number) => {
            return request({
                url: `/emergencyPlan/updateAbolish?id=${params}&abolishStatus=false`,
                method: 'get',
            });
        },
src/views/contingencyManagement/panManagement/component/abolishLibrary.vue
@@ -1,18 +1,12 @@
<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'}"
@@ -23,8 +17,7 @@
            <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>
@@ -58,26 +51,20 @@
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({
@@ -85,15 +72,15 @@
      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;
@@ -103,14 +90,14 @@
        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;
@@ -123,10 +110,10 @@
    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({
@@ -142,10 +129,10 @@
                type: 'error',
              });
              emit('myAdd', true);
            openDialog()
            }
            formEl.resetFields();
          });
    }
                }).catch(() => {});
        };
    // 分页
    const pageIndex = ref();
    const pageSize = ref();
src/views/contingencyManagement/panManagement/index.vue
@@ -84,7 +84,7 @@
                <VideoPlay />
              </el-icon>启动
            </el-button>
            <el-button size="small" text type="primary" @click="abolish">
            <el-button size="small" text type="primary" @click="abolish(scope.row.id)">
              <el-icon style="margin-right: 5px;">
                <VideoPause />
              </el-icon>废止