shj
2022-08-10 01b6b200bedf57900a88bbd982cf25889e13dc49
对接
已修改2个文件
46 ■■■■■ 文件已修改
src/components/equipmentDailog/Dailog.vue 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/facilityManagement/deviceType/component/Dailog.vue 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/equipmentDailog/Dailog.vue
@@ -357,7 +357,7 @@
import type { UploadProps, UploadUserFile } from 'element-plus';
import { facilityManagementApi } from '/@/api/facilityManagement';
import { goalManagementApi } from '/@/api/goalManagement';
import {deepClone} from '/@/utils/other'
import { deepClone } from '/@/utils/other';
export default defineComponent({
  components: { categoryDailog, regionDailog, DailogSearchUser, maintenanceDailog, detectDailog, repairDailog, standardDailog },
  setup(props, { emit }) {
@@ -461,8 +461,7 @@
      repaireDetailList: [],
      equipmentTypeId: "",
      equipmentTypeName:"",
            equipmentTypeId: '',
      useDate: '',
@@ -487,10 +486,12 @@
      delTestDetails: '',
    });
    const titles = ref();
        const titleT = ref();
    const disabled = ref(false);
    const Dailogtype = ref(false);
    const openDailog = (title: string, type: boolean, id: number, num: any) => {
      dialogVisible.value = true;
            titleT.value = title;
      department();
      Dailogtype.value = type;
      if (num == 0) {
@@ -575,6 +576,13 @@
          form.value.delRepaireDetails = deleteCId.value.toString();
          form.value.delCheckStandardeDetails = deleteDId.value.toString();
          dialogVisible.value = false;
                    delete form.value.equipmentTypeName;
                    delete form.value.departmentName;
                    delete form.value.leadingPersonDepartmentName;
                    delete form.value.leadingDepartmentName;
                    if (titleT.value == '新建') {
                        delete form.value.id;
                    }
          facilityManagementApi()
              .getequipmentInfoAddOrUpdate(form.value)
              .then((res) => {
@@ -693,7 +701,7 @@
    };
    // 回传
    const main = (data: any) => {
      let val=deepClone(data)
            let val = deepClone(data);
      if (index.value == -1) {
        form.value.takecareDetailList.push(val);
      } else {
@@ -701,7 +709,7 @@
      }
    };
    const delect = (data: any) => {
      let val=deepClone(data)
            let val = deepClone(data);
      if (index.value == -1) {
        form.value.testDetailList.push(val);
      } else {
@@ -709,7 +717,7 @@
      }
    };
    const Repair = (data: any) => {
      let val=deepClone(data)
            let val = deepClone(data);
      if (index.value == -1) {
        form.value.repaireDetailList.push(val);
      } else {
@@ -717,7 +725,7 @@
      }
    };
    const Stand = (data: any) => {
      let val=deepClone(data)
            let val = deepClone(data);
      if (index.value == -1) {
        form.value.checkStandardeDetailList.push(val);
      } else {
@@ -735,10 +743,10 @@
      }
    };
    const Tid=(data:any)=>{
      form.value.equipmentTypeId=data.id
      form.value.equipmentTypeName=data.typeName
      form.value.positionNum=data.sortNum
    }
            form.value.equipmentTypeId = data.id;
            form.value.equipmentTypeName = data.typeName;
            form.value.positionNum = data.sortNum;
        };
    //全屏
    const full = ref(false);
    const toggleFullscreen = () => {
src/views/facilityManagement/deviceType/component/Dailog.vue
@@ -6,8 +6,8 @@
                <el-col :span="11">
                    <el-form-item label="是否为设备内容" size="default" prop="isContent">
                        <el-select v-model="form.isContent" placeholder="请选择" style="width: 100%">
                            <el-option label="是" value="1" />
                            <el-option label="否" value="2" />
                            <el-option label="是" :value="1" />
                            <el-option label="否" :value="2" />
                        </el-select>
                    </el-form-item>
                </el-col>
@@ -51,16 +51,18 @@
        const form = ref({
            isContent: '', ////是否为设备内容  1:是 2:否
            typeName: '', ////类别名称
            parentId: "", ////父级ID,如果没有父级,为0
            parentId: '', ////父级ID,如果没有父级,为0
            isCheck: 0, ////是否检测  1:是 2:否
            isVisit: 0, ////是否巡检 1:是 2:否
            sortNum: '', //排列序列
            id: '', //设备类型ID ,更新时必填
            // id: '', //设备类型ID ,更新时必填
        });
        const titles = ref();
        const titleT = ref();
        const disabled = ref(false);
        const openDailog = (title: string, id: number) => {
            listApi();
            titleT.value = title;
            dialogVisible.value = true;
            titles.value = `${title}设备设施类型管理`;
            if (title == '查看') {
@@ -69,7 +71,7 @@
            } else if (title == '修改') {
                detail(id);
            } else if (title == '添加') {
                 form.value.parentId=id
                form.value.parentId = id;
            }
        };
        const detail = (id: number) => {
@@ -123,6 +125,9 @@
            if (!formEl) return;
            await formEl.validate((valid, fields) => {
                if (valid) {
                    if (titleT.value == '新建') {
                        delete form.value.id;
                    }
                    facilityManagementApi()
                        .getequipmentTypeMngAddOrUpdate(form.value)
                        .then((res) => {
@@ -163,6 +168,7 @@
            }
        };
        return {
            titleT,
            detail,
            rules,
            ruleFormRef,