shj
2022-08-03 65c36e11602028af23f87b380237a58ff678dd7d
src/components/equipmentDailog/DailogS.vue
@@ -21,10 +21,8 @@
         <el-row>
            <el-col :span="11">
               <el-form-item label="所属部门" size="default">
                  <el-select v-model="form.departmentId" placeholder="请选择" style="width: 100%">
                     <el-option label="Zone one" value="shanghai" />
                     <el-option label="Zone two" value="beijing" />
                  </el-select>
                  <el-tree-select v-model="form.departmentId" :data="data" check-strictly="true" placeholder="请选择" :props="propse" style="width: 100%">
                  </el-tree-select>
               </el-form-item>
            </el-col>
            <el-col :span="11" :offset="2">
@@ -44,7 +42,7 @@
               <el-form-item label="联系人" size="default">
                  <el-input v-model="form.connectPersonId" placeholder="请选择">
                     <template #append>
                        <el-button :icon="Search" @click="openUser"></el-button>
                        <el-button :icon="Search" @click="openUser(0)"></el-button>
                     </template>
                  </el-input>
               </el-form-item>
@@ -55,7 +53,7 @@
               <el-form-item label="录入人" size="default">
                  <el-input v-model="form.inputPersonId" placeholder="请选择">
                     <template #append>
                        <el-button :icon="Search" @click="openUser"></el-button>
                        <el-button :icon="Search" @click="openUser(1)"></el-button>
                     </template>
                  </el-input>
               </el-form-item>
@@ -64,7 +62,7 @@
               <el-form-item label="责任人" size="default">
                  <el-input v-model="form.responsibilityPersonId" placeholder="请选择">
                     <template #append>
                        <el-button :icon="Search" @click="openUser"></el-button>
                        <el-button :icon="Search" @click="openUser(2)"></el-button>
                     </template>
                  </el-input>
               </el-form-item>
@@ -74,8 +72,8 @@
            <el-col :span="11">
               <el-form-item label="装置部位分类" size="default">
                  <el-select v-model="form.partType" placeholder="请选择" style="width: 100%">
                     <el-option label="Zone one" value="shanghai" />
                     <el-option label="Zone two" value="beijing" />
                     <el-option label="关键装置" value="关键装置" />
                     <el-option label="重点部位" value="重点部位" />
                  </el-select>
               </el-form-item>
            </el-col>
@@ -250,8 +248,8 @@
      </template>
   </el-dialog>
   <categoryDailog ref="categoryShow"></categoryDailog>
   <planDailog ref="planShow"></planDailog>
   <DailogSearchUser ref="UserShow"></DailogSearchUser>
   <RegionsDialog ref="planShow" @SearchUser="onUser"></RegionsDialog>
   <DailogSearchUser ref="UserShow" @SearchUser="userId"></DailogSearchUser>
   <maintenanceDailog ref="maintenanceShow" @onMain="main"></maintenanceDailog>
   <detectDailog ref="detectShow" @onDelect="delect"></detectDailog>
   <repairDailog ref="repairShow" @onRepair="Repair"></repairDailog>
@@ -261,7 +259,7 @@
import { defineComponent, ref } from 'vue';
import { Search, Plus, FullScreen } from '@element-plus/icons-vue';
import categoryDailog from './categoryDailog.vue';
import planDailog from './planDailog.vue';
import RegionsDialog from '../../views/contingencyManagement/emergencyDrill/releaseOfDrillPlan/component/regionsDialog.vue';
import maintenanceDailog from './maintenanceDailog.vue';
import detectDailog from './detectDailog.vue';
import repairDailog from './repairDailog.vue';
@@ -270,8 +268,9 @@
import { ElMessage, ElMessageBox } from 'element-plus';
import type { UploadProps, UploadUserFile } from 'element-plus';
import { facilityManagementApi } from '/@/api/facilityManagement';
import {goalManagementApi} from "/@/api/goalManagement";
export default defineComponent({
   components: { categoryDailog, planDailog, DailogSearchUser, maintenanceDailog, detectDailog, repairDailog, standardDailog },
   components: { categoryDailog, RegionsDialog, DailogSearchUser, maintenanceDailog, detectDailog, repairDailog, standardDailog },
   setup(props, { emit }) {
      const dialogVisible = ref(false);
      const form = ref({
@@ -287,19 +286,7 @@
         delTestDetailList: [],
         takecareDetailList: [
            {
          leadingPersonDepartmentId: '',
          takecareDate: '',
          equipmentId: '',
          leadingPersonId: '',
          takecareMemo: '',
            },
         ],
         takecareDetailList: [],
      checkDetailList: [],
      responsibilityPersonId: '',
@@ -321,34 +308,9 @@
               filePath: '',
            },
         ],
      testDetailList: [
            {
          testMemo: '',
          testPersonDepartmentId: '',
          testStatus: '',
          testPersonId: '',
          testResult: '',
          testDate: '' ,
            },
         ],
      testDetailList: [],
      checkCycle: '',
      repaireDetailList: [
            {
          repairStatus: '',
          repairPersonDepartmentId: '',
          repairMemo: '',
          infoTpe: '',
          repairPersonId: '',
          repairEndDate: '',
          repairStartDate: '',
          exceptionInfo: '',
            },
         ],
      repaireDetailList: [],
      delCheckStandardeDetailList: [],
      leadingPersonName: '',
@@ -359,23 +321,10 @@
      position: '',
      emergencePlanId: 0,
      emergencePlanId: '',
      checkStandardeDetailList: [
            {
          indexNum: '',
          checkTarget: '',
          checkPart: '',
          checkContent: '',
          unit: '',
          rate: '',
            },
         ],
      checkStandardeDetailList: [],
      infoTpe: '',
      delCheckStandardeDetails: '',
      delTakecareStardardeDetails: '',
@@ -391,13 +340,17 @@
    const Dailogtype = ref(false);
      const openDailog = (title: string, type: boolean, id: number, num: any) => {
         dialogVisible.value = true;
      department();
         Dailogtype.value = type;
      if (num == 0) {
        titles.value = `${title}仪表信息`;
        form.value.infoTpe = num;
      } else if (num == 1) {
        titles.value = `${title}设备设施`;
        form.value.infoTpe = num;
      } else if (num == 2) {
        titles.value = `${title}设备设施`;
        form.value.infoTpe = num;
      }
      disabled.value = title == '查看' ? true : false;
@@ -445,13 +398,18 @@
      categoryShow.value.openDailog();
    };
    // 应急预案弹窗
      const planShow = ref();
      const openPlan = () => {
         planShow.value.openDailog();
      };
    const onUser = (e:any) => {
      form.value.emergencePlanId=e.id
    };
      const UserShow = ref();
      const openUser = () => {
         UserShow.value.openDailog();
      const openUser = (type: any) => {
         UserShow.value.openDailog(type);
      };
      const maintenanceShow = ref();
      const openMaintenance = (title: string, data: any) => {
@@ -572,6 +530,34 @@
         return true;
      };
    const userId = (val: any, type: number) => {
      console.log(val, type);
      if (type == 0) {
        form.value.connectPersonId = val.uid;
      } else if (type == 1) {
        form.value.inputPersonId = val.uid;
      } else if (type == 2){
        form.value.responsibilityPersonId = val.uid;
      }
    };
    //部门树
    const department = () => {
      goalManagementApi()
          .getTreedepartment()
          .then((res) => {
            if (res.data.code == 200) {
              data.value = res.data.data;
            } else {
              ElMessage.error(res.data.msg);
            }
          });
    };
    const propse = {
      label: 'depName',
      children: 'children',
      value: 'depId',
    };
    const data = ref();
      //全屏
      const full = ref(false);
      const toggleFullscreen = () => {
@@ -582,6 +568,8 @@
         }
      };
      return {
      propse,
      data,
         submitForm,
         dialogVisible,
         Dailogtype,
@@ -597,6 +585,7 @@
         categoryShow,
         opencategory,
         planShow,
      onUser,
         openPlan,
         UserShow,
         openUser,
@@ -607,6 +596,7 @@
         repairShow,
         openRepair,
         standardShow,
      userId,
         openStandard,
         fileList,
         handleRemove,