| | |
| | | <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"> |
| | |
| | | <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> |
| | |
| | | <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> |
| | |
| | | <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> |
| | |
| | | <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> |
| | |
| | | <el-table-column align="center" label="操作"> |
| | | <template #default="scope"> |
| | | <el-button link type="primary" @click="openMaintenance('查看', scope.row)" size="small">查看</el-button> |
| | | <el-button link type="primary" @click="openMaintenance('修改', scope.row)" size="small">修改</el-button> |
| | | <el-button link type="primary" @click="deleteA(scope.row)" size="small">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="设备检测" name="second"> |
| | | <el-button type="primary" size="default" @click="openDetect">新增</el-button> |
| | | <el-button type="primary" size="default" @click="openDetect('新增', '')">新增</el-button> |
| | | <el-table :data="form.testDetailList" style="width: 100%"> |
| | | <el-table-column align="center" prop="testPersonId" label="检测人" /> |
| | | <el-table-column align="center" prop="testDate" label="检测日期" /> |
| | |
| | | <el-table-column align="center" prop="testResult" label="检测结果" /> |
| | | <el-table-column align="center" prop="testStatus" label="检测状态" /> |
| | | <el-table-column align="center" label="操作"> |
| | | <template #default> |
| | | <template #default="scope"> |
| | | <el-button link type="primary" @click="openDetect('查看', scope.row)" size="small">查看</el-button> |
| | | <el-button link type="primary" @click="openDetect('修改', scope.row)" size="small">修改</el-button> |
| | | <el-button link type="primary" @click="deleteB(scope.row)" size="small">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="设备维修" name="third"> |
| | | <el-button type="primary" size="default" @click="openRepair">新增</el-button> |
| | | <el-button type="primary" size="default" @click="openRepair('新增', '')">新增</el-button> |
| | | <el-table :data="form.repaireDetailList" style="width: 100%"> |
| | | <el-table-column align="center" prop="exceptionInfo" label="设施异常项" /> |
| | | <el-table-column align="center" prop="repairStatus" label="维修状态" /> |
| | |
| | | <el-table-column align="center" label="操作"> |
| | | <template #default="scope"> |
| | | <el-button link type="primary" @click="openRepair('查看', scope.row)" size="small">查看</el-button> |
| | | <el-button link type="primary" @click="openRepair('修改', scope.row)" size="small">修改</el-button> |
| | | <el-button link type="primary" @click="deleteC(scope.row)" size="small">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="检查标准设置" name="fourth" |
| | | >checkContent |
| | | <el-button type="primary" size="default" @click="openStandard">新增</el-button> |
| | | <el-button type="primary" size="default" @click="openStandard('新增', '')">新增</el-button> |
| | | <el-table :data="form.checkStandardeDetailList" style="width: 100%"> |
| | | <el-table-column align="center" type="indexNum" label="序号" width="75" /> |
| | | <el-table-column align="center" prop="checkContent" label="检查内容" /> |
| | |
| | | <el-table-column align="center" label="操作"> |
| | | <template #default="scope"> |
| | | <el-button link type="primary" @click="openStandard('查看', scope.row)" size="small">查看</el-button> |
| | | <el-button link type="primary" @click="openStandard('修改', scope.row)" size="small">修改</el-button> |
| | | <el-button link type="primary" @click="deleteD(scope.row)" size="small">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | </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> |
| | |
| | | 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'; |
| | |
| | | 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({ |
| | | equipmentTypeId: '3', |
| | | equipmentTypeId: '', |
| | | |
| | | treatment: '发生的', |
| | | treatment: '', |
| | | |
| | | inputPersonId: 0, |
| | | inputPersonId: '', |
| | | |
| | | departmentId: 0, |
| | | departmentId: '', |
| | | |
| | | delRepaireDetailList: [], |
| | | |
| | | delTestDetailList: [], |
| | | |
| | | takecareDetailList: [ |
| | | { |
| | | leadingPersonDepartmentId: '', |
| | | |
| | | takecareDate: '', |
| | | |
| | | equipmentId: '', |
| | | |
| | | leadingPersonId: '', |
| | | |
| | | takecareMemo: '', |
| | | }, |
| | | ], |
| | | takecareDetailList: [], |
| | | checkDetailList: [], |
| | | |
| | | responsibilityPersonId: 0, |
| | | responsibilityPersonId: '', |
| | | |
| | | delTakecareStardardeDetailList: [], |
| | | |
| | | connectPersonId: 0, |
| | | connectPersonId: '', |
| | | |
| | | scenePic: '', |
| | | |
| | | partType: 0, |
| | | partType: '', |
| | | |
| | | toDangerous: '份12', |
| | | toDangerous: '', |
| | | |
| | | dangerousElement: '', |
| | | |
| | | takecareStardardeDetailList: [ |
| | | { |
| | | filePath: '123', |
| | | filePath: '', |
| | | }, |
| | | ], |
| | | testDetailList: [ |
| | | { |
| | | testMemo: '', |
| | | |
| | | testPersonDepartmentId: 0, |
| | | |
| | | testStatus: '', |
| | | |
| | | testPersonId: 0, |
| | | |
| | | testResult: 0, |
| | | |
| | | testDate: 1658284314185 , |
| | | }, |
| | | ], |
| | | testDetailList: [], |
| | | checkCycle: '', |
| | | repaireDetailList: [ |
| | | { |
| | | repairStatus: 0, |
| | | repairPersonDepartmentId: 0, |
| | | repairMemo: '', |
| | | infoTpe: 0, |
| | | repairPersonId: 0, |
| | | repairEndDate: 1658284314184, |
| | | repairStartDate: 1658284314184, |
| | | exceptionInfo: '', |
| | | }, |
| | | ], |
| | | repaireDetailList: [], |
| | | delCheckStandardeDetailList: [], |
| | | |
| | | leadingPersonName: '312', |
| | | leadingPersonName: '', |
| | | |
| | | name: '3123', |
| | | name: '', |
| | | |
| | | delTakecareDetailList: [], |
| | | |
| | | position: '312', |
| | | position: '', |
| | | |
| | | emergencePlanId: 0, |
| | | emergencePlanId: '', |
| | | |
| | | checkStandardeDetailList: [ |
| | | { |
| | | indexNum: '1', |
| | | checkStandardeDetailList: [], |
| | | infoTpe: '', |
| | | delCheckStandardeDetails: '', |
| | | |
| | | checkTarget: '3', |
| | | delTakecareStardardeDetails: '', |
| | | |
| | | checkPart: '5', |
| | | delTakecareDetails: '', |
| | | |
| | | checkContent: '2', |
| | | delRepaireDetails: '', |
| | | |
| | | unit: '4', |
| | | |
| | | rate: '6', |
| | | }, |
| | | ], |
| | | delCheckStandardeDetails: '1,2', |
| | | |
| | | delTakecareStardardeDetails: '1,2', |
| | | |
| | | delTakecareDetails: '1,2', |
| | | |
| | | delRepaireDetails: '1,2', |
| | | |
| | | delTestDetails: '1,2', |
| | | delTestDetails: '', |
| | | }); |
| | | const titles = ref(); |
| | | const disabled = ref(false); |
| | | 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; |
| | |
| | | }; |
| | | // 提交 |
| | | const submitForm = () => { |
| | | form.value.delTakecareDetails =deleteAId.value.toString() |
| | | form.value.delTestDetails =deleteBId.value.toString() |
| | | form.value.delRepaireDetails =deleteCId.value.toString() |
| | | form.value.delCheckStandardeDetails =deleteDId.value.toString() |
| | | dialogVisible.value = false; |
| | | facilityManagementApi() |
| | | .getkeypointEquipmentInfoAddOrUpdate(form.value) |
| | |
| | | dialogVisible.value = false; |
| | | }; |
| | | const activeName = ref('first'); |
| | | |
| | | const index = ref<any>(); |
| | | const categoryShow = ref(); |
| | | const opencategory = () => { |
| | | categoryShow.value.openDailog(); |
| | | }; |
| | | |
| | | const tableData = [ |
| | | { |
| | | date: '2016-05-03', |
| | | name: 'Tom', |
| | | address: 'No. 189, Grove St, Los Angeles', |
| | | }, |
| | | { |
| | | date: '2016-05-02', |
| | | name: 'Tom', |
| | | address: 'No. 189, Grove St, Los Angeles', |
| | | }, |
| | | { |
| | | date: '2016-05-04', |
| | | name: 'Tom', |
| | | address: 'No. 189, Grove St, Los Angeles', |
| | | }, |
| | | { |
| | | date: '2016-05-01', |
| | | name: 'Tom', |
| | | address: 'No. 189, Grove St, Los Angeles', |
| | | }, |
| | | ]; |
| | | |
| | | // 应急预案弹窗 |
| | | 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) => { |
| | | index.value = form.value.takecareDetailList.indexOf(data); |
| | | maintenanceShow.value.openDailog(title, data); |
| | | }; |
| | | const detectShow = ref(); |
| | | const openDetect = (title: string, data: any) => { |
| | | index.value = form.value.testDetailList.indexOf(data); |
| | | detectShow.value.openDailog(title, data); |
| | | }; |
| | | const repairShow = ref(); |
| | | const openRepair = (title: string, data: any) => { |
| | | index.value = form.value.repaireDetailList.indexOf(data); |
| | | repairShow.value.openDailog(title, data); |
| | | }; |
| | | const standardShow = ref(); |
| | | const openStandard = (title: string, data: any) => { |
| | | index.value = form.value.checkStandardeDetailList.indexOf(data); |
| | | standardShow.value.openDailog(title, data); |
| | | }; |
| | | // 上传 |
| | |
| | | () => false |
| | | ); |
| | | }; |
| | | const deleteAId = ref([]); |
| | | const deleteBId = ref([]); |
| | | const deleteCId = ref([]); |
| | | const deleteDId = ref([]); |
| | | // 删除 |
| | | const deleteA = (tag: any) => { |
| | | form.value.takecareDetailList.splice(form.value.takecareDetailList.indexOf(tag), 1); |
| | | deleteAId.value.push(tag.id); |
| | | }; |
| | | const deleteB = (tag: any) => { |
| | | form.value.testDetailList.splice(form.value.testDetailList.indexOf(tag), 1); |
| | | deleteBId.value.push(tag.id); |
| | | }; |
| | | const deleteC = (tag: any) => { |
| | | form.value.repaireDetailList.splice(form.value.repaireDetailList.indexOf(tag), 1); |
| | | deleteCId.value.push(tag.id); |
| | | }; |
| | | const deleteD = (tag: any) => { |
| | | form.value.checkStandardeDetailList.splice(form.value.checkStandardeDetailList.indexOf(tag), 1); |
| | | deleteDId.value.push(tag.id); |
| | | }; |
| | | // 回传 |
| | | const main = (val: any) => { |
| | | form.value.takecareDetailList.push(val); |
| | | if (index.value == -1) { |
| | | form.value.takecareDetailList.push(val); |
| | | } else { |
| | | form.value.takecareDetailList[index.value] = val; |
| | | } |
| | | }; |
| | | const delect = (val: any) => { |
| | | form.value.testDetailList.push(val); |
| | | if (index.value == -1) { |
| | | form.value.testDetailList.push(val); |
| | | } else { |
| | | form.value.testDetailList[index.value] = val; |
| | | } |
| | | }; |
| | | const Repair= (val:any)=>{ |
| | | form.value.repaireDetailList.push(val); |
| | | if (index.value == -1) { |
| | | form.value.repaireDetailList.push(val); |
| | | } else { |
| | | form.value.repaireDetailList[index.value] = val; |
| | | } |
| | | } |
| | | const Stand=(val:any)=>{ |
| | | form.value.checkStandardeDetailList.push(val); |
| | | if (index.value == -1) { |
| | | form.value.checkStandardeDetailList.push(val); |
| | | } else { |
| | | form.value.checkStandardeDetailList[index.value] = val; |
| | | } |
| | | } |
| | | |
| | | //图片提交 |
| | |
| | | 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 = () => { |
| | |
| | | } |
| | | }; |
| | | return { |
| | | propse, |
| | | data, |
| | | submitForm, |
| | | dialogVisible, |
| | | Dailogtype, |
| | |
| | | delect, |
| | | Repair, |
| | | Stand, |
| | | index, |
| | | activeName, |
| | | tableData, |
| | | categoryShow, |
| | | opencategory, |
| | | planShow, |
| | | onUser, |
| | | openPlan, |
| | | UserShow, |
| | | openUser, |
| | |
| | | repairShow, |
| | | openRepair, |
| | | standardShow, |
| | | userId, |
| | | openStandard, |
| | | fileList, |
| | | handleRemove, |
| | |
| | | toggleFullscreen, |
| | | FullScreen, |
| | | resetForm, |
| | | deleteAId, |
| | | deleteBId, |
| | | deleteCId, |
| | | deleteDId, |
| | | deleteA, |
| | | deleteB, |
| | | deleteC, |
| | | deleteD, |
| | | }; |
| | | }, |
| | | }); |