| | |
| | | <template> |
| | | <el-dialog :fullscreen="full" v-model="isShowDialog" :title="titles" width="60%"> |
| | | <el-dialog :fullscreen="full" v-model="dialogVisible" draggable :title="titles" width="60%"> |
| | | <el-button @click="toggleFullscreen" size="small" class="pot" :icon="FullScreen"></el-button> |
| | | <el-form :model="form" label-width="130px" :disabled="disabled"> |
| | | <el-row> |
| | |
| | | </el-form> |
| | | <el-tabs v-model="activeName" class="demo-tabs"> |
| | | <el-tab-pane label="设备保养" name="first"> |
| | | <el-button type="primary" size="default" @click="openMaintenance">新增</el-button> |
| | | <el-table :data="tableData" style="width: 100%"> |
| | | <el-button type="primary" size="default" @click="openMaintenance('新增', '')">新增</el-button> |
| | | <el-table :data="form.takecareDetailList" style="width: 100%"> |
| | | <el-table-column align="center" prop="takecareMemo" label="保养情况" /> |
| | | <el-table-column align="center" prop="leadingPersonId" label="保养负责人" /> |
| | | <el-table-column align="center" prop="takecareDate" label="保养日期" /> |
| | | <el-table-column align="center" prop="leadingPersonDepartmentId" label="保养负责人单位" /> |
| | | <el-table-column align="center" label="操作"> |
| | | <template #default> |
| | | <el-button link type="primary" size="small">查看</el-button> |
| | | <template #default="scope"> |
| | | <el-button link type="primary" @click="openMaintenance('查看', 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-table :data="tableData" style="width: 100%"> |
| | | <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="testPersonDepartmentId" label="检测人单位" /> |
| | |
| | | <el-table-column align="center" prop="testStatus" label="检测状态" /> |
| | | <el-table-column align="center" label="操作"> |
| | | <template #default> |
| | | <el-button link type="primary" size="small">查看</el-button> |
| | | <el-button link type="primary" @click="openDetect('查看', 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-table :data="tableData" style="width: 100%"> |
| | | <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" prop="repairMemo" label="维修情况" /> |
| | |
| | | <el-table-column align="center" prop="repairStartDate" label="维修开始日期" /> |
| | | <el-table-column align="center" prop="repairEndDate" label="维修结束日期" /> |
| | | <el-table-column align="center" label="操作"> |
| | | <template #default> |
| | | <el-button link type="primary" size="small">查看</el-button> |
| | | <template #default="scope"> |
| | | <el-button link type="primary" @click="openRepair('查看', scope.row)" size="small">查看</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="检查标准设置" name="fourth">checkContent |
| | | <el-tab-pane label="检查标准设置" name="fourth" |
| | | >checkContent |
| | | <el-button type="primary" size="default" @click="openStandard">新增</el-button> |
| | | <el-table :data="tableData" style="width: 100%"> |
| | | <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" prop="checkTarget" label="检查指标" /> |
| | |
| | | <el-table-column align="center" prop="checkPart" label="巡检部位" /> |
| | | <el-table-column align="center" prop="rate" label="频次" /> |
| | | <el-table-column align="center" label="操作"> |
| | | <template #default> |
| | | <el-button link type="primary" size="small">查看</el-button> |
| | | <template #default="scope"> |
| | | <el-button link type="primary" @click="openStandard('查看', scope.row)" size="small">查看</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="巡检记录" name="five"> |
| | | <el-table :data="tableData" style="width: 100%"> |
| | | <el-table :data="name" style="width: 100%"> |
| | | <el-table-column align="center" type="selection" width="75" /> |
| | | <el-table-column align="center" sortable prop="name" label="任务编号" /> |
| | | <el-table-column align="center" sortable prop="address" label="任务名称" /> |
| | |
| | | </el-tabs> |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | | <el-button @click="resetForm(ruleFormRef)">关闭</el-button> |
| | | <el-button type="primary" v-if="disabled == true ? false : true" @click="submitForm(titles, ruleFormRef)">确定</el-button> |
| | | <el-button @click="resetForm">关闭</el-button> |
| | | <el-button type="primary" @click="submitForm">确定</el-button> |
| | | </span> |
| | | </template> |
| | | </el-dialog> |
| | | <categoryDailog ref="categoryShow"></categoryDailog> |
| | | <planDailog ref="planShow"></planDailog> |
| | | <DailogSearchUser ref="UserShow"></DailogSearchUser> |
| | | <maintenanceDailog ref="maintenanceShow"></maintenanceDailog> |
| | | <detectDailog ref="detectShow"></detectDailog> |
| | | <repairDailog ref="repairShow"></repairDailog> |
| | | <standardDailog ref="standardShow"></standardDailog> |
| | | <maintenanceDailog ref="maintenanceShow" @onMain="main"></maintenanceDailog> |
| | | <detectDailog ref="detectShow" @onDelect="delect"></detectDailog> |
| | | <repairDailog ref="repairShow" @onRepair="Repair"></repairDailog> |
| | | <standardDailog ref="standardShow" @onStand="Stand"></standardDailog> |
| | | </template> |
| | | <script lang="ts"> |
| | | import { defineComponent, ref, reactive } from 'vue'; |
| | | import { Search,Plus,FullScreen, FormInstance, } from '@element-plus/icons-vue'; |
| | | 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 maintenanceDailog from './maintenanceDailog.vue'; |
| | |
| | | import DailogSearchUser from '/@/components/DailogSearchUser/index.vue'; |
| | | import { ElMessage, ElMessageBox } from 'element-plus'; |
| | | import type { UploadProps, UploadUserFile } from 'element-plus'; |
| | | import {releaseDrillPlanApi} from "/@/api/emergencyDrillPlan"; |
| | | import {facilityManagementApi} from "/@/api/facilityManagement"; |
| | | import { facilityManagementApi } from '/@/api/facilityManagement'; |
| | | export default defineComponent({ |
| | | components: { categoryDailog, planDailog, DailogSearchUser, maintenanceDailog, detectDailog, repairDailog, standardDailog }, |
| | | setup() { |
| | | const isShowDialog = ref(false); |
| | | const form = reactive({ |
| | | equipmentTypeId: '', |
| | | treatment: '', |
| | | inputPersonId: '', |
| | | departmentId: '', |
| | | setup(props, { emit }) { |
| | | const dialogVisible = ref(false); |
| | | const form = ref({ |
| | | equipmentTypeId: '3', |
| | | |
| | | treatment: '发生的', |
| | | |
| | | inputPersonId: 0, |
| | | |
| | | departmentId: 0, |
| | | |
| | | delRepaireDetailList: [], |
| | | |
| | | delTestDetailList: [], |
| | | takecareDetailList: [{ |
| | | leadingPersonId:'', |
| | | takecareDate:'', |
| | | |
| | | takecareDetailList: [ |
| | | { |
| | | leadingPersonDepartmentId:'', |
| | | |
| | | takecareDate: '', |
| | | |
| | | equipmentId: '', |
| | | |
| | | leadingPersonId: '', |
| | | |
| | | takecareMemo: '', |
| | | }], |
| | | }, |
| | | ], |
| | | checkDetailList:[], |
| | | responsibilityPersonId: '', |
| | | |
| | | responsibilityPersonId: 0, |
| | | |
| | | delTakecareStardardeDetailList: [], |
| | | connectPersonId:'', |
| | | |
| | | connectPersonId: 0, |
| | | |
| | | scenePic:'', |
| | | partType:'', |
| | | toDangerous:'', |
| | | |
| | | partType: 0, |
| | | |
| | | toDangerous: '份12', |
| | | |
| | | dangerousElement:'', |
| | | |
| | | takecareStardardeDetailList: [ |
| | | { |
| | | filePath: '', |
| | | } |
| | | filePath: '123', |
| | | }, |
| | | ], |
| | | testDetailList:[{ |
| | | testDetailList: [ |
| | | { |
| | | testMemo:'', |
| | | testPersonDepartmentId:'', |
| | | testPersonId:'', |
| | | |
| | | testPersonDepartmentId: 0, |
| | | |
| | | testStatus:'', |
| | | testResult:'', |
| | | testDate:'', |
| | | }], |
| | | |
| | | testPersonId: 0, |
| | | |
| | | testResult: 0, |
| | | |
| | | testDate: 1658284314185 , |
| | | }, |
| | | ], |
| | | checkCycle: '', |
| | | repaireDetailList:[{ |
| | | repairStatus:'', |
| | | repairPersonDepartmentId:'', |
| | | repaireDetailList: [ |
| | | { |
| | | repairStatus: 0, |
| | | repairPersonDepartmentId: 0, |
| | | repairMemo:'', |
| | | infoTpe:'', |
| | | repairPersonId:'', |
| | | repairEndDate:'', |
| | | repairStartDate:'', |
| | | infoTpe: 0, |
| | | repairPersonId: 0, |
| | | repairEndDate: 1658284314184, |
| | | repairStartDate: 1658284314184, |
| | | exceptionInfo:'', |
| | | }], |
| | | }, |
| | | ], |
| | | delCheckStandardeDetailList:[], |
| | | leadingPersonName: '', |
| | | name: '', |
| | | |
| | | leadingPersonName: '312', |
| | | |
| | | name: '3123', |
| | | |
| | | delTakecareDetailList:[], |
| | | position:'', |
| | | emergencePlanId: '', |
| | | checkStandardeDetailList: [{ |
| | | checkContent:'', |
| | | checkTarget:'', |
| | | unit:'', |
| | | checkPart:'', |
| | | rate:'', |
| | | indexNum:'', |
| | | }], |
| | | delCheckStandardeDetails: '', |
| | | delTakecareStardardeDetails: '', |
| | | delTakecareDetails: '', |
| | | delRepaireDetails: '', |
| | | delTestDetails: '', |
| | | |
| | | position: '312', |
| | | |
| | | emergencePlanId: 0, |
| | | |
| | | checkStandardeDetailList: [ |
| | | { |
| | | indexNum: '1', |
| | | |
| | | checkTarget: '3', |
| | | |
| | | checkPart: '5', |
| | | |
| | | checkContent: '2', |
| | | |
| | | unit: '4', |
| | | |
| | | rate: '6', |
| | | }, |
| | | ], |
| | | delCheckStandardeDetails: '1,2', |
| | | |
| | | delTakecareStardardeDetails: '1,2', |
| | | |
| | | delTakecareDetails: '1,2', |
| | | |
| | | delRepaireDetails: '1,2', |
| | | |
| | | delTestDetails: '1,2', |
| | | }); |
| | | const Dailogtype = ref(false); |
| | | const openDailog = (type: boolean) => { |
| | | isShowDialog.value = true; |
| | | Dailogtype.value = type; |
| | | }; |
| | | const ruleFormRef = ref<FormInstance>() |
| | | const activeName = ref('first'); |
| | | const titles = ref(); |
| | | const disabled = ref(); |
| | | // 打开弹窗 |
| | | const openDialog = (title: string, id: number, type: boolean) => { |
| | | isShowDialog.value = true; |
| | | titles.value = title; |
| | | disabled.value = type; |
| | | if (title == '查看仪器仪表' || title == '修改仪器仪表') { |
| | | const disabled = ref(false); |
| | | const Dailogtype = ref(false); |
| | | const openDailog = (title: string, type: boolean, id: number, num: any) => { |
| | | dialogVisible.value = true; |
| | | Dailogtype.value = type; |
| | | if (num == 0) { |
| | | titles.value = `${title}仪表信息`; |
| | | } else if (num == 1) { |
| | | titles.value = `${title}设备设施`; |
| | | } else if (num == 2) { |
| | | titles.value = `${title}设备设施`; |
| | | } |
| | | |
| | | disabled.value = title == '查看' ? true : false; |
| | | if (title == '查看' || title == '修改') |
| | | facilityManagementApi() |
| | | .getkeypointEquipmentInfoDetail(id) |
| | | .then((res) => { |
| | | if (res.data.code == 200) { |
| | | form.value = res.data.data; |
| | | } else { |
| | | ElMessage.error(res.data.msg); |
| | | } |
| | | }); |
| | | }; |
| | | // 提交 |
| | | const submitForm = () => { |
| | | dialogVisible.value = false; |
| | | facilityManagementApi() |
| | | .getkeypointEquipmentInfoAddOrUpdate(form.value) |
| | | .then((res) => { |
| | | if (res.data.code == 200) { |
| | | ElMessage({ |
| | | message: res.data.msg, |
| | | type: 'success', |
| | | }); |
| | | emit('navAddorUpdata'); |
| | | } else { |
| | | ElMessage.error(res.data.msg); |
| | | } |
| | | }); |
| | | // form.value = null; |
| | | }; |
| | | // 取消 |
| | | const resetForm = () => { |
| | | dialogVisible.value = false; |
| | | }; |
| | | const activeName = ref('first'); |
| | | |
| | | const categoryShow = ref(); |
| | | const opencategory = () => { |
| | | categoryShow.value.openDailog(); |
| | | }; |
| | | |
| | | const tableData = [ |
| | |
| | | address: 'No. 189, Grove St, Los Angeles', |
| | | }, |
| | | ]; |
| | | const categoryShow = ref(); |
| | | const opencategory = () => { |
| | | categoryShow.value.openDailog(); |
| | | }; |
| | | |
| | | const planShow = ref(); |
| | | const openPlan = () => { |
| | | planShow.value.openDailog(); |
| | |
| | | UserShow.value.openDailog(); |
| | | }; |
| | | const maintenanceShow = ref(); |
| | | const openMaintenance = () => { |
| | | maintenanceShow.value.openDailog(); |
| | | const openMaintenance = (title: string, data: any) => { |
| | | maintenanceShow.value.openDailog(title, data); |
| | | }; |
| | | const detectShow = ref(); |
| | | const openDetect = () => { |
| | | detectShow.value.openDailog(); |
| | | const openDetect = (title: string, data: any) => { |
| | | detectShow.value.openDailog(title, data); |
| | | }; |
| | | const repairShow = ref(); |
| | | const openRepair = () => { |
| | | repairShow.value.openDailog(); |
| | | const openRepair = (title: string, data: any) => { |
| | | repairShow.value.openDailog(title, data); |
| | | }; |
| | | const standardShow = ref(); |
| | | const openStandard = () => { |
| | | standardShow.value.openDailog(); |
| | | const openStandard = (title: string, data: any) => { |
| | | standardShow.value.openDailog(title, data); |
| | | }; |
| | | // 上传 |
| | | const fileList = ref<UploadUserFile[]>([ |
| | |
| | | () => false |
| | | ); |
| | | }; |
| | | // 回传 |
| | | const main = (val: any) => { |
| | | form.value.takecareDetailList.push(val); |
| | | }; |
| | | const delect = (val: any) => { |
| | | form.value.testDetailList.push(val); |
| | | }; |
| | | const Repair= (val:any)=>{ |
| | | form.value.repaireDetailList.push(val); |
| | | } |
| | | const Stand=(val:any)=>{ |
| | | form.value.checkStandardeDetailList.push(val); |
| | | } |
| | | |
| | | //图片提交 |
| | | const imageUrl = ref(''); |
| | | |
| | |
| | | } |
| | | return true; |
| | | }; |
| | | |
| | | //全屏 |
| | | const full = ref(false); |
| | | const toggleFullscreen = () => { |
| | |
| | | } |
| | | }; |
| | | return { |
| | | isShowDialog, |
| | | submitForm, |
| | | dialogVisible, |
| | | Dailogtype, |
| | | form, |
| | | openDailog, |
| | | Search, |
| | | main, |
| | | delect, |
| | | Repair, |
| | | Stand, |
| | | activeName, |
| | | tableData, |
| | | categoryShow, |
| | |
| | | handleRemove, |
| | | handlePreview, |
| | | handleExceed, |
| | | disabled, |
| | | titles, |
| | | beforeRemove, |
| | | imageUrl, |
| | | handleAvatarSuccess, |
| | |
| | | full, |
| | | toggleFullscreen, |
| | | FullScreen, |
| | | ruleFormRef, |
| | | openDialog, |
| | | resetForm, |
| | | }; |
| | | }, |
| | | }); |