| | |
| | | <template> |
| | | <el-dialog v-model="dialogVisible" :fullscreen="full" :before-close="resetForm" draggable :title="titles" width="60%"> |
| | | <el-button @click="toggleFullscreen" size="small" class="pot" :icon="FullScreen"></el-button> |
| | | <el-form :model="form" :disabled="disabled" label-width="120px" class="formType"> |
| | | <el-form :model="form" ref="ruleFormRef" :rules="rules" :disabled="disabled" label-width="120px" class="formType"> |
| | | <el-form-item label="装置设施名称" size="default"> |
| | | <el-input v-model="form.qName" placeholder="请填写装置设施名称" /> |
| | | </el-form-item> |
| | |
| | | <el-date-picker v-model="form.nextTakecareDate" format="YYYY-MM-DD HH:mm:ss" type="datetime" placeholder="选择日期时间" style="width: 100%" /> |
| | | </el-form-item> |
| | | <el-form-item label="负责人" size="default"> |
| | | <el-input v-model="form.leadingPersonId" placeholder="请选择"> |
| | | <el-input v-model="form.leadingPersonName" placeholder="请选择"> |
| | | <template #append> |
| | | <el-button :icon="Search" @click="openUser(0)"></el-button> |
| | | <el-button :icon="Search" @click="openUser(1)"></el-button> |
| | | </template> |
| | | </el-input> |
| | | </el-form-item> |
| | |
| | | <el-date-picker v-model="form.actualStopDate" format="YYYY-MM-DD HH:mm:ss" type="datetime" placeholder="选择日期时间" style="width: 100%" /> |
| | | </el-form-item> |
| | | <el-form-item label="停用提交人" size="default"> |
| | | <el-input v-model="form.stopSubmitPersonId" placeholder="请选择"> |
| | | <el-input v-model="form.stopSubmitPersonName" placeholder="请选择"> |
| | | <template #append> |
| | | <el-button :icon="Search" @click="openUser(1)"></el-button> |
| | | <el-button :icon="Search" @click="openUser(2)"></el-button> |
| | | </template> |
| | | </el-input> |
| | | </el-form-item> |
| | |
| | | <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="leadingPersonName" label="保养负责人" /> |
| | | <el-table-column align="center" prop="takecareDate" :formatter="timeDate" label="保养日期" /> |
| | | <el-table-column align="center" prop="leadingPersonDepartmentId" label="保养负责人单位" /> |
| | | <el-table-column align="center" label="操作"> |
| | |
| | | </el-tabs> |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | | <el-button @click="resetForm">关闭</el-button> |
| | | <el-button type="primary" @click="submitForm">确定</el-button> |
| | | <el-button @click="resetForm(ruleFormRef)">关闭</el-button> |
| | | <el-button type="primary" @click="submitForm(ruleFormRef)">确定</el-button> |
| | | </span> |
| | | </template> |
| | | </el-dialog> |
| | |
| | | import maintenanceDailog from './maintenanceDailog.vue'; |
| | | import detectDailog from './detectDailog.vue'; |
| | | import repairDailog from './repairDailog.vue'; |
| | | import {timeDate} from '/@/assets/index.ts' |
| | | import { timeDate } from '/@/assets/index.ts'; |
| | | import standardDailog from './standardDailog.vue'; |
| | | import DailogSearchUser from '/@/components/DailogSearchUser/index.vue'; |
| | | import { ElMessage, ElMessageBox } from 'element-plus'; |
| | | import { ElMessage, ElMessageBox, FormInstance, FormRules } from 'element-plus'; |
| | | import type { UploadProps, UploadUserFile } from 'element-plus'; |
| | | import { facilityManagementApi } from '/@/api/facilityManagement'; |
| | | import { goalManagementApi } from '/@/api/goalManagement'; |
| | | import { number } from 'echarts'; |
| | | export default defineComponent({ |
| | | components: { categoryDailog, regionDailog, DailogSearchUser, maintenanceDailog, detectDailog, repairDailog, standardDailog }, |
| | | setup(props, { emit }) { |
| | | const dialogVisible = ref(false); |
| | | const ruleFormRef = ref<FormInstance>(); |
| | | const form = ref({ |
| | | supplyName: '', |
| | | |
| | |
| | | checkPoint: '', |
| | | |
| | | leadingPersonId: '', |
| | | leadingPersonName: '', |
| | | |
| | | qName: '', |
| | | |
| | |
| | | lockNum: '', |
| | | |
| | | stopSubmitPersonId: '', |
| | | |
| | | stopSubmitPersonName: '', |
| | | afterStopStep: '', |
| | | |
| | | lifeCycle: '', |
| | |
| | | } |
| | | }); |
| | | }; |
| | | const rules = reactive<FormRules>({}); |
| | | // 提交 |
| | | 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() |
| | | .getequipmentInfoAddOrUpdate(form.value) |
| | | .then((res) => { |
| | | if (res.data.code == 200) { |
| | | ElMessage({ |
| | | message: res.data.msg, |
| | | type: 'success', |
| | | const submitForm = async (formEl: FormInstance | undefined) => { |
| | | if (!formEl) return; |
| | | await formEl.validate((valid, fields) => { |
| | | if (valid) { |
| | | 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() |
| | | .getequipmentInfoAddOrUpdate(form.value) |
| | | .then((res) => { |
| | | if (res.data.code == 200) { |
| | | ElMessage({ |
| | | message: res.data.msg, |
| | | type: 'success', |
| | | }); |
| | | emit('navAddorUpdata'); |
| | | } else { |
| | | ElMessage.error(res.data.msg); |
| | | } |
| | | }); |
| | | emit('navAddorUpdata'); |
| | | } else { |
| | | ElMessage.error(res.data.msg); |
| | | } |
| | | }); |
| | | form.value = { |
| | | supplyName: '', |
| | | |
| | | nextTestDate: '', |
| | | |
| | | qUsage: '', |
| | | |
| | | departmentId: '', |
| | | |
| | | produceTime: '', |
| | | |
| | | actualStopDate: '', |
| | | |
| | | takecareDetailList: [], |
| | | |
| | | infoType: '', |
| | | |
| | | leadingDepartmentId: '', |
| | | |
| | | useEndDay: '', |
| | | |
| | | previousTakecareDate: '', |
| | | |
| | | previousCheckDate: '', |
| | | |
| | | model: '', |
| | | |
| | | stopStatus: '', |
| | | |
| | | testWarn: '', |
| | | |
| | | stopSubmitDate: '', |
| | | |
| | | repairStatus: '', |
| | | |
| | | takecareStardardeDetailList: [ |
| | | { |
| | | filePath: '123', |
| | | }, |
| | | ], |
| | | |
| | | nextCheckDate: '', |
| | | |
| | | checkCycle: '', |
| | | |
| | | checkPoint: '', |
| | | |
| | | leadingPersonId: '', |
| | | |
| | | qName: '', |
| | | |
| | | nextTakecareDate: '', |
| | | |
| | | setPart: '', |
| | | |
| | | checkStandardeDetailList: [], |
| | | |
| | | actualDestoryDate: '', |
| | | |
| | | isNeedTest: '', |
| | | |
| | | alertNum: '', |
| | | |
| | | checkContent: '', |
| | | |
| | | useMemo: '', |
| | | |
| | | previousTestDate: '', |
| | | |
| | | isNeedTakecare: '', |
| | | |
| | | destoryReason: '', |
| | | |
| | | checkDetailList: [], |
| | | |
| | | positionNum: '', |
| | | |
| | | testCycle: '', |
| | | |
| | | recoveryReason: '', |
| | | |
| | | isNeedCheck: '', |
| | | |
| | | actualRecoveryDate: '', |
| | | |
| | | leadingPersonDepartmentId: '', |
| | | |
| | | stopReason: '', |
| | | |
| | | destorySubmitDate: '', |
| | | |
| | | testDetailList: [], |
| | | |
| | | checkWarn: '', |
| | | |
| | | repaireDetailList: [], |
| | | |
| | | equipmentTypeId: 1, |
| | | |
| | | useDate: '', |
| | | |
| | | recoverySubmitDate: '', |
| | | |
| | | lockNum: '', |
| | | |
| | | stopSubmitPersonId: '', |
| | | |
| | | afterStopStep: '', |
| | | |
| | | lifeCycle: '', |
| | | |
| | | delCheckStandardeDetails: '', |
| | | |
| | | delTakecareStardardeDetails: '', |
| | | |
| | | delTakecareDetails: '', |
| | | |
| | | delRepaireDetails: '', |
| | | |
| | | delTestDetails: '', |
| | | }; |
| | | } |
| | | }); |
| | | }; |
| | | // 取消 |
| | | const resetForm = () => { |
| | | dialogVisible.value = false; |
| | | form.value = { |
| | | supplyName: '', |
| | | |
| | | nextTestDate: '', |
| | | |
| | | qUsage: '', |
| | | |
| | | departmentId: '', |
| | | |
| | | produceTime: '', |
| | | |
| | | actualStopDate: '', |
| | | |
| | | takecareDetailList: [], |
| | | |
| | | infoType: '', |
| | | |
| | | leadingDepartmentId: '', |
| | | |
| | | useEndDay: '', |
| | | |
| | | previousTakecareDate: '', |
| | | |
| | | previousCheckDate: '', |
| | | |
| | | model: '', |
| | | |
| | | stopStatus: '', |
| | | |
| | | testWarn: '', |
| | | |
| | | stopSubmitDate: '', |
| | | |
| | | repairStatus: '', |
| | | |
| | | takecareStardardeDetailList: [ |
| | | { |
| | | filePath: '123', |
| | | }, |
| | | ], |
| | | |
| | | nextCheckDate: '', |
| | | |
| | | checkCycle: '', |
| | | |
| | | checkPoint: '', |
| | | |
| | | leadingPersonId: '', |
| | | |
| | | qName: '', |
| | | |
| | | nextTakecareDate: '', |
| | | |
| | | setPart: '', |
| | | |
| | | checkStandardeDetailList: [], |
| | | |
| | | actualDestoryDate: '', |
| | | |
| | | isNeedTest: '', |
| | | |
| | | alertNum: '', |
| | | |
| | | checkContent: '', |
| | | |
| | | useMemo: '', |
| | | |
| | | previousTestDate: '', |
| | | |
| | | isNeedTakecare: '', |
| | | |
| | | destoryReason: '', |
| | | |
| | | checkDetailList: [], |
| | | |
| | | positionNum: '', |
| | | |
| | | testCycle: '', |
| | | |
| | | recoveryReason: '', |
| | | |
| | | isNeedCheck: '', |
| | | |
| | | actualRecoveryDate: '', |
| | | |
| | | leadingPersonDepartmentId: '', |
| | | |
| | | stopReason: '', |
| | | |
| | | destorySubmitDate: '', |
| | | |
| | | testDetailList: [], |
| | | |
| | | checkWarn: '', |
| | | |
| | | repaireDetailList: [], |
| | | |
| | | equipmentTypeId: 1, |
| | | |
| | | useDate: '', |
| | | |
| | | recoverySubmitDate: '', |
| | | |
| | | lockNum: '', |
| | | |
| | | stopSubmitPersonId: '', |
| | | |
| | | afterStopStep: '', |
| | | |
| | | lifeCycle: '', |
| | | |
| | | delCheckStandardeDetails: '', |
| | | |
| | | delTakecareStardardeDetails: '', |
| | | |
| | | delTakecareDetails: '', |
| | | |
| | | delRepaireDetails: '', |
| | | |
| | | delTestDetails: '', |
| | | }; |
| | | }; |
| | | const activeName = ref('first'); |
| | | const index = ref<any>(); |
| | |
| | | }; |
| | | const userId = (val: any, type: number) => { |
| | | console.log(val, type); |
| | | if (type == 0) { |
| | | if (type == 1) { |
| | | form.value.leadingPersonId = val.uid; |
| | | } else if (type == 1) { |
| | | form.value.leadingPersonName = val.realName; |
| | | } else if (type == 2) { |
| | | form.value.stopSubmitPersonId = val.uid; |
| | | form.value.stopSubmitPersonName = val.realName; |
| | | } |
| | | }; |
| | | //全屏 |
| | |
| | | }; |
| | | const data = ref(); |
| | | return { |
| | | rules, |
| | | userId, |
| | | department, |
| | | propse, |
| | |
| | | full, |
| | | toggleFullscreen, |
| | | FullScreen, |
| | | timeDate, |
| | | timeDate, |
| | | ruleFormRef, |
| | | }; |
| | | }, |
| | | }); |