| | |
| | | <template> |
| | | <div class="system-add-menu-container"> |
| | | <el-dialog :title="title" v-model="isShowReportDialog" width="50%"> |
| | | <el-dialog :title="title" v-model="isShowReportDialog" width="50%" :close-on-click-modal="false"> |
| | | <el-form :model="reportForm" :rules="reportFormRules" ref="reportFormRef" size="default" label-width="120px"> |
| | | <el-tabs class="active" v-model="activeNameOne"> |
| | | <el-tab-pane label="隐患信息" name="hiddenInfo"> |
| | | <el-row :gutter="25"> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20"> |
| | | <el-form-item label="隐患描述" prop="dangerDesc"> |
| | | <el-input class="input-add" :disabled="!disabled" v-model.trim="reportForm.dangerDesc" placeholder="请输入隐患情况描述" clearable></el-input> |
| | | <el-form-item label="隐患名称" prop="dangerCode"> |
| | | <el-input class="input-add" :disabled="!disabled" v-model.trim="reportForm.dangerCode" placeholder="请输入隐患名称" clearable></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20"> |
| | | <el-form-item label="隐患名称" prop="dangerCode"> |
| | | <el-input class="input-add" :disabled="!disabled" v-model.trim="reportForm.dangerCode" placeholder="请输入隐患名称" clearable></el-input> |
| | | <el-form-item label="隐患描述" prop="dangerDesc"> |
| | | <el-input class="input-add" :disabled="!disabled" v-model.trim="reportForm.dangerDesc" placeholder="请输入隐患情况描述" clearable></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20"> |
| | |
| | | |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20"> |
| | | <el-form-item label="整改资金" prop="dangerResult"> |
| | | <el-input class="input-add" :disabled="!disabled" type="number" v-model="reportForm.cost" placeholder="请选择整改资金"> </el-input> |
| | | <el-input class="input-add" :disabled="!disabled" type="number" @input="onVerifyNumberPercentageFloat($event)" v-model="reportForm.cost" placeholder="请选择整改资金"> </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12"> |
| | |
| | | import { ElMessage } from 'element-plus'; |
| | | import { hiddenReportApi } from '/@/api/doublePreventSystem/report'; |
| | | import { getUserByDepartment } from '/@/assets/methods'; |
| | | import { verifyNumberIntegerAndFloat, verifyNumberPercentageFloat } from '../../../../../../utils/toolsValidate'; |
| | | export default { |
| | | name: 'reportDialog', |
| | | setup(props: any, context: any) { |
| | |
| | | state.safetyRiskUnitData = state.allSafetyRiskUnitData.filter((item) => item.produceDeviceId === state.reportForm.produceDeviceId); |
| | | }; |
| | | |
| | | const onVerifyNumberPercentageFloat = (val: string) => { |
| | | state.reportForm.cost = JSON.parse(verifyNumberIntegerAndFloat(val)); |
| | | }; |
| | | |
| | | return { |
| | | ...toRefs(state), |
| | | changeUnit, |
| | | reportFormRef, |
| | | submitReport, |
| | | achieveUserList, |
| | | openReportDialog |
| | | openReportDialog, |
| | | onVerifyNumberPercentageFloat |
| | | }; |
| | | } |
| | | }; |