From 1621b3719092d93e6c29f7a27e401529e0454420 Mon Sep 17 00:00:00 2001 From: Your Name <123456> Date: 星期一, 01 八月 2022 18:57:45 +0800 Subject: [PATCH] 双重预防 --- src/views/doublePrevent/riskCheckManage/hiddenManagement/hiddenRectify/components/rectifyDialog.vue | 119 +++++++++++++++++++++++++++++++++++++++-------------------- 1 files changed, 78 insertions(+), 41 deletions(-) diff --git a/src/views/doublePrevent/hiddenManage/hiddenRectify/components/rectifyDialog.vue b/src/views/doublePrevent/riskCheckManage/hiddenManagement/hiddenRectify/components/rectifyDialog.vue similarity index 60% rename from src/views/doublePrevent/hiddenManage/hiddenRectify/components/rectifyDialog.vue rename to src/views/doublePrevent/riskCheckManage/hiddenManagement/hiddenRectify/components/rectifyDialog.vue index ee5cbd2..dcd8dd1 100644 --- a/src/views/doublePrevent/hiddenManage/hiddenRectify/components/rectifyDialog.vue +++ b/src/views/doublePrevent/riskCheckManage/hiddenManagement/hiddenRectify/components/rectifyDialog.vue @@ -5,27 +5,12 @@ <el-row :gutter="35"> <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20"> <el-form-item label="整改说明" prop="rectifyInfo"> - <el-input - class="input-add" - type="textarea" - :rows="2" - v-model.trim="rectifyForm.rectifyInfo" - placeholder="请输入整改说明" - clearable - ></el-input> + <el-input class="input-add" type="textarea" :rows="2" v-model.trim="rectifyForm.rectifyInfo" placeholder="请输入整改说明" clearable></el-input> </el-form-item> </el-col> <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20"> <el-form-item label="整改时间" prop="applyTime"> - <el-date-picker - type="datetime" - value-format="YYYY-MM-DD HH:mm:ss" - class="input-add" - v-model="rectifyForm.applyTime" - placeholder="请选择整改时间" - clearable - > - </el-date-picker> + <el-date-picker type="datetime" value-format="YYYY-MM-DD HH:mm:ss" class="input-add" v-model="rectifyForm.applyTime" placeholder="请选择整改时间" clearable> </el-date-picker> </el-form-item> </el-col> </el-row> @@ -42,45 +27,71 @@ <el-row :gutter="35"> <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20"> <el-form-item label="延期说明" prop="timeOutDesc"> - <el-input - class="input-add" - type="textarea" - :rows="2" - v-model.trim="delayForm.timeOutDesc" - placeholder="请输入延期说明" - clearable - ></el-input> + <el-input class="input-add" type="textarea" :rows="2" v-model.trim="delayForm.timeOutDesc" placeholder="请输入延期说明" clearable></el-input> </el-form-item> </el-col> <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20"> <el-form-item label="整改期限" prop="rectifyTime"> - <el-date-picker - type="datetime" - value-format="YYYY-MM-DD HH:mm:ss" - class="input-add" - v-model="delayForm.rectifyTime" - placeholder="请选择整改期限" - clearable - > - </el-date-picker> + <el-date-picker type="datetime" value-format="YYYY-MM-DD HH:mm:ss" class="input-add" v-model="delayForm.rectifyTime" placeholder="请选择整改期限" clearable> </el-date-picker> </el-form-item> </el-col> </el-row> </el-form> <template #footer> - <span class="dialog-footer"> + <span class="dialog-footer" v-show="disabled"> <el-button @click="isShowDelayDialog = !isShowDelayDialog" size="default">取 消</el-button> <el-button type="primary" @click="submitDelay" v-throttle size="default">确 实</el-button> </span> </template> </el-dialog> + <el-dialog :title="title" v-model="isShowCheckInfoDialog" width="600px"> + <el-form :model="checkInfoForm" ref="checkFormRef" size="default" label-width="120px"> + <el-row :gutter="35"> + <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20"> + <el-form-item label="整改内容说明" prop="rectifyDesc"> + <el-input class="input-add" type="textarea" :rows="2" v-model.trim="checkInfoForm.rectifyDesc" readonly></el-input> + </el-form-item> + </el-col> + <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20"> + <el-form-item label="整改类型" prop="rectifyType"> + <el-select class="input-add" v-model="checkInfoForm.rectifyType" readonly> + <el-option v-for="item in rectifyTypeList" :key="item.id" :label="item.name" :value="item.id"></el-option> + </el-select> + </el-form-item> + </el-col> + <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20"> + <el-form-item label="整改部门" prop="rectifyDepId"> + <el-cascader @change="achieveUserList" :options="departmentList" :props="{ emitPath: false, checkStrictly: true, value: 'depId', label: 'depName' }" placeholder="请选择部门" clearable filterable class="input-add" v-model="checkInfoForm.rectifyDepId" readonly> </el-cascader> + </el-form-item> + </el-col> + + <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20"> + <el-form-item label="整改责任人" prop="liablePersonId"> + <el-select class="input-add" v-model="checkInfoForm.liablePersonId" clearable filterable readonly> + <el-option v-for="item in userList" :key="item.uid" :label="item.username" :value="item.uid"></el-option> + </el-select> + </el-form-item> + </el-col> + + <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20"> + <el-form-item label="整改资金" prop="dangerResult"> + <el-input class="input-add" type="number" v-model="checkInfoForm.cost" readonly> </el-input> + </el-form-item> + </el-col> + </el-row> + </el-form> + </el-dialog> </div> </template> <script lang="ts"> +import { getUserByDepartment } from '/@/assets/methods'; + interface stateType { + disabled: Boolean; isShowRectifyDialog: Boolean; isShowDelayDialog: Boolean; + isShowCheckInfoDialog: Boolean; rectifyForm: { id: number | null; dangerManagerId: number | null; @@ -94,9 +105,15 @@ timeOutDesc: string | null; }; title: string; + departmentList: []; + userList: []; rectifyTypeList: Array<rectifyTypeState>; rectifyFormRules: {}; delayFormRules: {}; + checkInfoForm: { + rectifyDepId: number | null; + liablePersonId: number | null; + }; } interface rectifyTypeState { regionType: string; @@ -112,7 +129,15 @@ const rectifyFormRef = ref(); const state = reactive<stateType>({ title: '', + disabled: false, rectifyTypeList: [], + departmentList: [], + userList: [], + isShowCheckInfoDialog: false, + checkInfoForm: { + rectifyDepId: null, + liablePersonId: null + }, isShowDelayDialog: false, isShowRectifyDialog: false, rectifyForm: { @@ -138,16 +163,25 @@ }); //打开模态框 - const openRectifyDialog = (type: string, value: object) => { + const openRectifyDialog = async (type: string, value: object, departmentList: []) => { + state.departmentList = departmentList; if (type === '延期') { state.title = '延期'; + state.disabled = true; state.isShowDelayDialog = true; const delayForm = JSON.parse(JSON.stringify(value)); state.delayForm.id = delayForm.id; state.delayForm.dangerManagerId = delayForm.dangerManagerId; state.delayForm.timeOutDesc = null; state.delayForm.rectifyTime = null; + } else if (type === '查看') { + state.title = '查看'; + state.isShowCheckInfoDialog = true; + state.checkInfoForm.rectifyDepId = JSON.parse(JSON.stringify(value)).rectifyDepId; + await achieveUserList(); + state.checkInfoForm = JSON.parse(JSON.stringify(value)); } else { + state.disabled = true; state.title = '整改'; state.isShowRectifyDialog = true; const rectifyForm = JSON.parse(JSON.stringify(value)); @@ -214,10 +248,17 @@ }); }; + const achieveUserList = async () => { + state.checkInfoForm.liablePersonId = null; + const user: unknown = await getUserByDepartment(state.checkInfoForm.rectifyDepId); + state.userList = user as []; + }; + return { ...toRefs(state), rectifyFormRef, submitDelay, + achieveUserList, submitRectify, openRectifyDialog }; @@ -225,8 +266,4 @@ }; </script> -<style scoped> -.input-length { - width: 85%; -} -</style> +<style scoped></style> -- Gitblit v1.9.2