13937891274
2022-08-08 dfcccc080d5b24572a11d234a8065a6753bbd91c
src/views/contingencyManagement/panManagement/component/openAdd.vue
@@ -89,7 +89,7 @@
                  <el-form-item label="应急队伍" prop="emergencyTeam">
                     <el-input v-model="ruleForm.emergencyTeam" placeholder="请选择" class="input-with-select">
                        <template #append>
                           <el-button :icon="Search" @click="daiInpt" />
                           <el-button :icon="Search" @click="daiInpt(0)" />
                        </template>
                     </el-input>
                  </el-form-item>
@@ -131,7 +131,7 @@
            </span>
         </template>
      </el-dialog>
      <CheckTemplate ref="Shows" />
      <CheckTemplate ref="Shows"  @SearchUser="SearchUser" />
      <DailogSearchUserManger ref="userRef" @SearchUser="onUser" />
      <RegionsDialog ref="openRef" />
   </div>
@@ -146,7 +146,7 @@
import DailogSearchUserManger from '/@/components/DailogSearchUserManger/index.vue';
import CheckTemplate from '/@/components/checkTemplate/index.vue';
import RegionsDialog from '/@/components/regionsDialog/index.vue';
import { emergencyPlanApi } from '/@/api/emergencyPlan';
import { emergencyPlanApi } from '/@/api/contingencyManagement/emergencyPlan';
import { goalManagementApi } from '/@/api/goalManagement';
export default defineComponent({
@@ -176,7 +176,8 @@
         ],
         emergencyTeam: '', //应急队伍
         areaList: [], //区域列表
         teamList: [],
         teamList: [
            ],
         deptList: [],
         abolishStatus: false,
      });
@@ -208,7 +209,12 @@
            .getTreedepartment()
            .then((res) => {
               if (res.data.code == 200) {
                  data.value = res.data.data;
            ruleForm.value = res.data.data;
            let arr = [];
            for (let i = 0; i < ruleForm.value.teamList.length; i++) {
              arr.push(ruleForm.value.teamList[i].userName);
            }
            ruleForm.value.userName = arr.toString();
               } else {
                  ElMessage.error(res.data.msg);
               }
@@ -305,7 +311,8 @@
               ],
               emergencyTeam: '', //应急队伍
               areaList: [], //区域列表
               teamList: [],
               teamList: [
          ],
               deptList: [],
               abolishStatus: false,
            };
@@ -314,13 +321,46 @@
      const resetForm = (formEl: FormInstance | undefined) => {
         isShowDialog.value = false;
         if (!formEl) return;
      ruleForm.value = {
        name: '', // 预案名称
        type: '', //预案类型
        associatedDanger: '', // 危险源关联
        level: '', // 预案级别
        authorUid: '', // 编写人
        authorName: '',
        authorDeptId: '', // 编写部门
        releaseDate: '', // 发布实施日期
        fileList: [
          {
            fileUrl: 'url',
            fileName: 'name',
          },
        ],
        emergencyTeam: '', //应急队伍
        areaList: [], //区域列表
        teamList: [
        ],
        deptList: [],
        abolishStatus: false,
      };
         formEl.resetFields();
      };
      // 应急队伍弹窗
      const Shows = ref();
      const daiInpt = () => {
         Shows.value.openDailog();
      const daiInpt = (data: any) => {
      Shows.value.openDailog(data);
      };
    const SearchUser = (e: any) => {
      let arr = [];
      for (let i = 0; i < val.length; i++) {
        arr.push(val[i].realName);
        ruleForm.value.userList.push({
          userUid: val[i].uid,
          userName: val[i].realName,
        });
      }
      ruleForm.value.userName = arr.toString();
    };
      // 选择区域弹窗
      const openRef = ref();
      const regionsDialog = () => {
@@ -358,6 +398,7 @@
         department,
         daiInpt,
         Shows,
      SearchUser,
         submitForm,
         openUser,
         userRef,