文件名从 src/views/doublePrevent/riskLevel/check/components/checkUnitDialog.vue 修改 |
| | |
| | | <el-row :gutter="35"> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20"> |
| | | <el-form-item label="任务单元名称" prop="taskUnitName"> |
| | | <el-input |
| | | class="input-length" |
| | | v-model.trim="checkUnitForm.taskUnitName" |
| | | placeholder="请输入任务单元名称" |
| | | clearable |
| | | ></el-input> |
| | | <el-input class="input-length" v-model.trim="checkUnitForm.taskUnitName" 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="note"> |
| | | <el-input |
| | | class="input-length" |
| | | v-model.trim="checkUnitForm.note" |
| | | placeholder="请输入任务单元说明" |
| | | clearable |
| | | ></el-input> |
| | | <el-input class="input-length" v-model.trim="checkUnitForm.note" placeholder="请输入任务单元说明" clearable></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | </div> |
| | | |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | | <span class="dialog-footer" v-show="disabled"> |
| | | <el-button @click="isShowCheckUnitDialog = !isShowCheckUnitDialog" size="default">取 消</el-button> |
| | | <el-button type="primary" @click="submitCheckUnit" v-throttle size="default">确 实</el-button> |
| | | </span> |
| | | </template> |
| | | </el-dialog> |
| | | <el-dialog title="选择风险管控措施" v-model="isShowSelectMeasureControlDialog" append-to-body :close-on-click-modal="false" width="70%"> |
| | | <select-measure-control-dialog |
| | | ref="SelectMeasureControlDialogRef" |
| | | @receiveRiskControlId="receiveRiskControlId" |
| | | ></select-measure-control-dialog> |
| | | <select-measure-control-dialog ref="SelectMeasureControlDialogRef" @receiveRiskControlId="receiveRiskControlId"></select-measure-control-dialog> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script lang="ts"> |
| | | import SelectMeasureControlDialog from '/@/views/doublePrevent/riskLevel/checkUnit/components/selectMeasureControlDialog.vue'; |
| | | import SelectMeasureControlDialog from '/@/views/doublePrevent/riskLevel/riskCheckUnit/components/selectMeasureControlDialog.vue'; |
| | | import { reactive, toRefs, ref } from 'vue'; |
| | | import { checkUnitApi } from '/@/api/doublePreventSystem/checkUnit'; |
| | | import { ElMessage } from 'element-plus'; |
| | | interface stateType { |
| | | isShowCheckUnitDialog: Boolean; |
| | | disabled: Boolean; |
| | | isShowSelectMeasureControlDialog: Boolean; |
| | | checkUnitForm: { |
| | | taskUnitName: string | null; |
| | |
| | | const riskControlMeasureDialogRef = ref(); |
| | | const state = reactive<stateType>({ |
| | | title: '', |
| | | disabled: false, |
| | | activeName: 'checkUnit', |
| | | measureData: [], |
| | | checkUnitData: [], |
| | |
| | | checkUnitFormRef.value.clearValidate(); |
| | | }); |
| | | if (type === '新增') { |
| | | state.disabled = true; |
| | | state.title = '新增隐患排查单元'; |
| | | state.checkUnitForm = { |
| | | taskUnitName: null, |
| | | note: null, |
| | | measureList: [] |
| | | }; |
| | | } else if (type === '查看') { |
| | | state.disabled = false; |
| | | state.title = '查看隐患排查单元'; |
| | | state.checkUnitForm = JSON.parse(JSON.stringify(value)); |
| | | } else { |
| | | state.disabled = true; |
| | | state.title = '修改隐患排查单元'; |
| | | state.checkUnitForm = JSON.parse(JSON.stringify(value)); |
| | | } |