13937891274
2022-08-03 cb440a7026729d260e75fc727ffb8099b4c8b2be
数据对接
已修改7个文件
501 ■■■■■ 文件已修改
src/api/emergencyDrillExecute/index.ts 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/emergencyPlan/index.ts 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/contingencyManagement/contingency/component/openAdd.vue 125 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/contingencyManagement/emergencyDrill/implementationOfEmergencyDrill/index.vue 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/contingencyManagement/panManagement/component/openAdd.vue 180 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/contingencyManagement/panManagement/index.vue 177 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/facilityManagement/keyEquipment/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/emergencyDrillExecute/index.ts
@@ -36,8 +36,9 @@
        // 应急演练实施删除
        deleteEmergencyDrillExecute: (params:object) => {
            return request({
                url: `/emergencyDrillExecute/batchDelete/${params}`,
                method: 'get',
                url: `/emergencyDrillExecute/batchDelete`,
                method: 'post',
                data: params
            });
        },
    }
src/api/emergencyPlan/index.ts
@@ -36,8 +36,9 @@
        // 应急队伍删除
        deleteEmergencyTeam: (params:object) => {
            return request({
                url: `/emergencyPlan/batchDelete/${params}`,
                method: 'get',
                url: `/emergencyPlan/batchDelete`,
                method: 'post',
                data: params
            });
        },
    }
src/views/contingencyManagement/contingency/component/openAdd.vue
@@ -12,17 +12,17 @@
                    <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
                        <el-form-item label="队伍级别" prop="teamLevel">
                            <el-select v-model="ruleForm.teamLevel" class="w100" placeholder="请选择">
                                <el-option label="公司" value="admin"></el-option>
                                <el-option label="分厂-车间" value="common"></el-option>
                                <el-option label="工序-班组等" value="shang"></el-option>
                                <el-option label="公司" value="公司"></el-option>
                                <el-option label="分厂-车间" value="分厂-车间"></el-option>
                                <el-option label="工序-班组等" value="工序-班组等"></el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
                        <el-form-item label="队伍负责人" prop="principalUid">
                            <el-input v-model="ruleForm.principalUid" placeholder="请选择" class="input-with-select" disabled>
                            <el-input v-model="ruleForm.principalUid" placeholder="请选择" class="input-with-select">
                                <template #append>
                                    <el-button :icon="Search" @click="openUser" disabled/>
                                    <el-button :icon="Search" @click="openUser"/>
                                </template>
                            </el-input>
                        </el-form-item>
@@ -158,16 +158,7 @@
            fileName: 'name',
          }
        ],
        // memberList: [
        //   {
        //     userUid: '',
        //     gender: '',
        //     jobNumber: '',
        //     name: '',
        //     phone: '',
        //     position: '',
        //   }
        // ]
        memberList: []
      });
    const titles = ref();
    const disabled = ref();
@@ -212,65 +203,14 @@
    onMounted(() => {
      department();
    });
    // const data = [
    //   {
    //     value: '1',
    //     label: '广汇能源综合物流发展有限责任公司',
    //     children: [
    //       {
    //         value: '11',
    //         label: '经营班子',
    //         children: [],
    //       },
    //     ],
    //   },
    //   {
    //     value: '2',
    //     label: '生产运行部',
    //     children: [
    //       {
    //         value: '21',
    //         label: '灌装一班',
    //         children: []
    //       },
    //       {
    //         value: '22',
    //         label: '工艺四班',
    //         children: [],
    //       },
    //     ],
    //   },
    //   {
    //     value: '3',
    //     label: '设备部',
    //     children: [
    //       {
    //         value: '31',
    //         label: '仪表班',
    //         children: [],
    //       },
    //       {
    //         value: '32',
    //         label: '机修班',
    //         children: [],
    //       },
    //     ],
    //   },
    // ]
    // 打开用户选择弹窗
    const userRef = ref();
    const openUser = () => {
      userRef.value.openDailog();
    };
    const nameC = ref();
    const onUser = (e:any) => {
      ruleForm.value.principalUid = e.uid
      nameC.value=e.realName
      ruleForm.value.principalUid = e.username
    };
    // const onUser = (e:any) => {
    //
    //   ruleForm.value.principalUid=e.id
    // };
    //定义tabs切换
    const activeName = ref('first')
    const handleClick = (tab: TabsPaneContext, event: Event) => {
@@ -405,16 +345,7 @@
              fileName: 'name',
            }
          ],
          // memberList: [
          //   {
          //     userUid: '',
          //     gender: '',
          //     jobNumber: '',
          //     name: '',
          //     phone: '',
          //     position: '',
          //   }
          // ]
          memberList: []
        };
      }
    };
@@ -423,45 +354,6 @@
      if (!formEl) return;
      formEl.resetFields();
    };
    // 列表参数
    // const listQuery = ref ({
    //   teamId: ''
    // });
    // 列表数据请求
    // const listApi = async (title: string, formEl: FormInstance | undefined) => {
    //   if (!formEl) return;
    //   await formEl.validate((valid, fields) => {
    //     if (valid) {
    //       isShowDialog.value = false;
    //       contingencyApi()
    //           .getEmergencyTeamPersonnelList(listQuery)
    //           .then((res) => {
    //             if (res.data.code == 200) {
    //               ElMessage({
    //                 showClose: true,
    //                 message: res.data.msg,
    //                 type: 'success',
    //               });
    //               emit('myAdd', true);
    //             } else {
    //               ElMessage({
    //                 showClose: true,
    //                 message: res.data.msg,
    //                 type: 'error',
    //               });
    //               emit('myAdd', true);
    //             }
    //             formEl.resetFields();
    //           });
    //     } else {
    //       console.log('error submit!', fields);
    //     }
    //   });
    //   formEl.resetFields();
    //   const listQuery = {
    //     teamId: ''
    //   };
    // };
    // 定义表格数据
    const tableData = ref([]);
    //添加队伍负责人弹窗
@@ -539,7 +431,6 @@
      FullScreen,
      full,
      onUser,
      nameC,
      onMyAdd,
      // listApi,
      onEdit,
src/views/contingencyManagement/emergencyDrill/implementationOfEmergencyDrill/index.vue
@@ -185,14 +185,17 @@
      }
    };
    // 删除用户
    const onRowDel = (data: any) => {
    const onRowDel = (id: number) => {
      let arr = [];
      arr.push(id)
      console.log(arr)
      ElMessageBox.confirm('确定删除所选项吗?', '提示',{
        confirmButtonText: '确认',
        cancelButtonText: '取消',
        type: 'warning',
      }).then(() => {
        emergencyDrillExecuteApi()
            .deleteEmergencyDrillExecute(data)
            .deleteEmergencyDrillExecute(arr)
            .then((res) => {
              if (res.data.code == 200) {
                ElMessage({
src/views/contingencyManagement/panManagement/component/openAdd.vue
@@ -48,8 +48,8 @@
          <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
            <el-form-item label="危险源关联" prop="associatedDanger">
              <el-select v-model="ruleForm.associatedDanger" class="w100" placeholder="请选择">
                <el-option :label="true">是</el-option>
                <el-option :label="false">否</el-option>
                <el-option label="是" :value="false"></el-option>
                <el-option label="否" :value="true"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
@@ -65,7 +65,7 @@
          <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
            <el-form-item label="编写人" prop="authorId" >
              <el-input
                  v-model="ruleForm.authorId"
                  v-model="ruleForm.authorUid"
                  placeholder="请选择"
                  class="input-with-select"
              >
@@ -130,19 +130,19 @@
              </el-upload>
            </el-form-item>
          </el-col>
          <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
            <el-form-item label="区域名称" prop="areaName">
              <el-input
                  v-model="ruleForm.areaName"
                  placeholder="请选择"
                  class="input-with-select"
              >
                <template #append>
                  <el-button :icon="Search" @click="regionsDialog"/>
                </template>
              </el-input>
            </el-form-item>
          </el-col>
<!--          <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">-->
<!--            <el-form-item label="区域名称" prop="areaName">-->
<!--              <el-input-->
<!--                  v-model="ruleForm.areaName"-->
<!--                  placeholder="请选择"-->
<!--                  class="input-with-select"-->
<!--              >-->
<!--                <template #append>-->
<!--                  <el-button :icon="Search" @click="regionsDialog"/>-->
<!--                </template>-->
<!--              </el-input>-->
<!--            </el-form-item>-->
<!--          </el-col>-->
        </el-row>
      </el-form>
      <template #footer>
@@ -179,6 +179,8 @@
import RegionsDialog from '/@/components/regionsDialog/index.vue'
import {emergencyPlanApi} from "/@/api/emergencyPlan";
import {goalManagementApi} from "/@/api/goalManagement";
import {emergencyPlanLogApi} from "/@/api/emergencyPlanLog";
import {contingencyApi} from "/@/api/contingency";
export default defineComponent({
  name: 'openAdd',
@@ -195,7 +197,7 @@
      type: '', //预案类型
      associatedDanger: '', // 危险源关联
      level: '', // 预案级别
      authorId: '', // 编写人
      authorUid: '', // 编写人
      authorDeptId: '', // 编写部门
      releaseDate: '', // 发布实施日期
      fileList: [
@@ -230,6 +232,15 @@
      isShowDialog.value = true;
      titles.value = title;
      disabled.value = type;
      if (title == '查看应急预案管理' || title == '修改应急预案管理') {
        emergencyPlanApi()
            .seeEmergencyTeam(id)
            .then((res) => {
              if (res.data.code == 200) {
                ruleForm.value = res.data.data;
              }
            });
      }
    };
    //日期选择器
    const releaseDate = ref('')
@@ -257,76 +268,6 @@
    onMounted(() => {
      department();
    });
    // const tree = [
    //   {
    //     value: '1',
    //     label: 'Level one 1',
    //     children: [
    //       {
    //         value: '11',
    //         label: 'Level two 1-1',
    //         children: [
    //           {
    //             value: '111',
    //             label: 'Level three 1-1-1',
    //           },
    //         ],
    //       },
    //     ],
    //   },
    //   {
    //     value: '2',
    //     label: 'Level one 2',
    //     children: [
    //       {
    //         value: '21',
    //         label: 'Level two 2-1',
    //         children: [
    //           {
    //             value: '211',
    //             label: 'Level three 2-1-1',
    //           },
    //         ],
    //       },
    //       {
    //         value: '22',
    //         label: 'Level two 2-2',
    //         children: [
    //           {
    //             value: '221',
    //             label: 'Level three 2-2-1',
    //           },
    //         ],
    //       },
    //     ],
    //   },
    //   {
    //     value: '3',
    //     label: 'Level one 3',
    //     children: [
    //       {
    //         value: '31',
    //         label: 'Level two 3-1',
    //         children: [
    //           {
    //             value: '311',
    //             label: 'Level three 3-1-1',
    //           },
    //         ],
    //       },
    //       {
    //         value: '32',
    //         label: 'Level two 3-2',
    //         children: [
    //           {
    //             value: '321',
    //             label: 'Level three 3-2-1',
    //           },
    //         ],
    //       },
    //     ],
    //   },
    // ]
    //定义树形下拉框
    const responsibleDepartment = ref()
    const data = ref();
@@ -362,6 +303,69 @@
          }
        })
      }
      else if (title == '修改应急预案管理') {
        if (!formEl) return;
        await formEl.validate((valid, fields) => {
          if (valid) {
            isShowDialog.value = false;
            emergencyPlanApi()
                .editEmergencyTeam(ruleForm.value)
                .then((res) => {
                  if (res.data.code == 200) {
                    ElMessage({
                      showClose: true,
                      message: '修改成功',
                      type: 'success',
                    });
                    emit('myAdd', true);
                  } else {
                    ElMessage({
                      showClose: true,
                      message: res.data.msg,
                      type: 'error',
                    });
                    emit('myAdd', true);
                  }
                  formEl.resetFields();
                });
          } else {
            console.log('error submit!', fields);
          }
        });
        formEl.resetFields();
        ruleForm.value = {
          name: '', // 预案名称
          type: '', //预案类型
          associatedDanger: '', // 危险源关联
          level: '', // 预案级别
          authorUid: '', // 编写人
          authorDeptId: '', // 编写部门
          releaseDate: '', // 发布实施日期
          fileList: [
            {
              fileUrl: 'url',
              fileName: 'name',
            }
          ],
          emergencyTeam: '', //应急队伍
          areaList: [
            {
              areaId: '',
            }
          ],  //区域列表
          areaName: '',  //区域名称
          teamList: [
            {
              teamId: '',
            }
          ],
          deptList: [
            {
              departmentId: '',
            }
          ]
        };
      }
    };
    const resetForm = (formEl: FormInstance | undefined) => {
      isShowDialog.value = false;
@@ -384,7 +388,7 @@
      userRef.value.openDailog();
    };
    const onUser = (e:any) => {
      ruleForm.value.authorId=e.id
      ruleForm.value.authorUid=e.username
    };
    //全屏
    const full = ref(false);
src/views/contingencyManagement/panManagement/index.vue
@@ -84,19 +84,24 @@
                <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 />
@@ -122,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>
@@ -154,7 +159,7 @@
  ElMessageBox,
  ElMessage,
} from 'element-plus';
import {useRouter} from "vue-router"
// import {useRouter} from "vue-router"
import type {
  // FormInstance,
} from 'element-plus'
@@ -171,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";
@@ -181,7 +186,7 @@
  components: {
    OpenAdd,
    // StartUp,
    AbolishLibrary,
    // AbolishLibrary,
    EditPen,
    Plus,
    Edit,
@@ -230,26 +235,7 @@
    };
    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()
@@ -301,7 +287,7 @@
    // 打开新增用户弹窗
    const addRef = ref();
    const onOpenAdd = () => {
      addRef.value.openDialog('新建应急预案管理');
      addRef.value.openDialog('新建应急预案管理',false);
    };
    // 新增后刷新
    const onMyAdd = (e: boolean) => {
@@ -311,20 +297,31 @@
        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({
@@ -344,6 +341,26 @@
              });
        }).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('确定删除所选项吗?', '提示', {
@@ -353,24 +370,23 @@
      })
          .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(() => {});
    };
@@ -387,25 +403,25 @@
      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 = () => {
@@ -425,15 +441,15 @@
      tableData,
      onSubmit,
      onOpenAdd,  //新增
      onabolishLibrary,
      addRef,
      abolishRef,
      // onabolishLibrary,
      // abolishRef,
      // abolish,
      onRowDel,
      onHandleSizeChange,
      onHandleCurrentChange,
      jumpFrom,
      abolish,
      router,
      // jumpFrom,
      // router,
      toggleFullscreen,
      FullScreen,
      full,
@@ -455,6 +471,7 @@
      form,
      emit,
      onDetermine,
      onEdit,
    };
  },
});
src/views/facilityManagement/keyEquipment/index.vue
@@ -265,7 +265,7 @@
            for (let i = 0; i < valId.length; i++) {
                arr.push(valId[i].id);
            }
            deletAll.value = arr.toString();
            deletAll.value = arr;
            if (val.length == 1) {
                warning.value = false;
                danger.value = false;