13937891274
2022-08-04 44dae1108f8bc7134fbbc39a09c581bf3c4e0bb2
src/views/contingencyManagement/panManagement/index.vue
@@ -84,11 +84,11 @@
                <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="abolish">
              <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 />
@@ -127,7 +127,7 @@
      </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>
@@ -176,7 +176,7 @@
} 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";
@@ -186,7 +186,7 @@
  components: {
    OpenAdd,
    // StartUp,
    // AbolishLibrary,
    AbolishLibrary,
    EditPen,
    Plus,
    Edit,
@@ -207,6 +207,7 @@
      searchParams: {
        name: "",
        type: "",
        abolishStatus: false,
      }
    })
    // 定义表格数据
@@ -276,14 +277,6 @@
          remark: '',
        }
    }
    // 新增后刷新
    // const startUp = (e: boolean) => {
    //   if (e) {
    //     onSubmit();
    //   } else {
    //     onSubmit();
    //   }
    // };
    // 打开新增用户弹窗
    const addRef = ref();
    const onOpenAdd = () => {
@@ -307,10 +300,39 @@
    };
    //打开废止库弹窗
    // const abolishRef = ref();
    // const onabolishLibrary = () => {
    //   abolishRef.value.openDialog();
    // };
    const abolishRef = ref();
    const onabolishLibrary = () => {
      abolishRef.value.openDialog();
    };
    // 废止
    const abolish = (data: any) => {
      ElMessageBox.confirm('确定要废止所选项吗?', '提示', {
        confirmButtonText: '确认',
        cancelButtonText: '取消',
        type: 'warning',
      }).then(() => {
        emergencyPlanApi()
            .EmergencyTeam(data)
            .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();
              }
            });
      }).catch(() => {});
    };
    // 删除用户
    const onRowDel = (id: number) => {
      let arr = [];
@@ -442,9 +464,9 @@
      onSubmit,
      onOpenAdd,  //新增
      addRef,
      // onabolishLibrary,
      // abolishRef,
      // abolish,
      onabolishLibrary,
      abolishRef,
      abolish,
      onRowDel,
      onHandleSizeChange,
      onHandleCurrentChange,