| | |
| | | <template> |
| | | <div class="system-edit-user-container"> |
| | | <el-dialog |
| | | title="新建待整改" |
| | | :title="titles" |
| | | v-model="isShowDialog" |
| | | width="769px" |
| | | draggable |
| | |
| | | :model="ruleForm" |
| | | size="default" |
| | | label-width="120px" |
| | | :disabled="disabled" |
| | | > |
| | | <el-row :gutter="35"> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="整改标题" prop="teamName"> |
| | | <el-input v-model="ruleForm.teamName" placeholder="请填写队伍名称"></el-input> |
| | | <el-form-item label="整改标题" prop="emergencyPlanName"> |
| | | <el-input v-model="ruleForm.emergencyPlanName" placeholder="请填写队伍名称"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="整改单编号" prop="teamName"> |
| | | <el-input v-model="ruleForm.teamName" disabled placeholder="请填写队伍名称"></el-input> |
| | | <el-input v-model="ruleForm.teamName" placeholder="请填写队伍名称"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="整改来源" prop="teamLeader"> |
| | | <el-select v-model="ruleForm.teamLevel" class="w100" disabled placeholder="请选择"> |
| | | <el-select v-model="ruleForm.teamLevel" class="w100" placeholder="请选择"> |
| | | <el-option label="演练评价等" value="admin"></el-option> |
| | | <el-option label="现场处置方案" value="common"></el-option> |
| | | <el-option label="专项应急预案" value="common"></el-option> |
| | |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="隐患等级" prop="teamLeader"> |
| | | <el-select v-model="ruleForm.teamLevel" class="w100" placeholder="请选择"> |
| | | <el-option label="一般" value="admin"></el-option> |
| | | <el-option label="重大" value="common"></el-option> |
| | | <el-option label="一般">一般</el-option> |
| | | <el-option label="重大">重大</el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="隐患后果" prop="teamLeader"> |
| | | <el-select v-model="ruleForm.teamLevel" class="w100" placeholder="请选择"> |
| | | <el-option label="死亡" value="admin"></el-option> |
| | | <el-option label="重伤" value="common"></el-option> |
| | | <el-option label="轻伤" value="admin"></el-option> |
| | | <el-option label="火灾" value="common"></el-option> |
| | | <el-option label="交通事故" value="admin"></el-option> |
| | | <el-option label="财产损失" value="common"></el-option> |
| | | <el-option label="其它" value="common"></el-option> |
| | | <el-option label="死亡">死亡</el-option> |
| | | <el-option label="重伤">重伤</el-option> |
| | | <el-option label="轻伤">轻伤</el-option> |
| | | <el-option label="火灾">火灾</el-option> |
| | | <el-option label="交通事故">交通事故</el-option> |
| | | <el-option label="财产损失">财产损失</el-option> |
| | | <el-option label="其它">其它</el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | v-model="ruleForm.teamLeader" |
| | | placeholder="请选择" |
| | | class="input-with-select" |
| | | disabled |
| | | > |
| | | <template #append> |
| | | <el-button :icon="Search" @click="regionsDialog"/> |
| | |
| | | </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="telephone"> |
| | | <el-upload |
| | | class="avatar-uploader" |
| | | action="https://run.mocky.io/v3/9d059bf9-4660-45f2-925d-ce80ad6c4d15" |
| | | :show-file-list="false" |
| | | :on-success="handleAvatarSuccess" |
| | | :before-upload="beforeAvatarUpload" |
| | | > |
| | | <img v-if="imageUrl" :src="imageUrl" class="avatar" /> |
| | | <el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon> |
| | | </el-upload> |
| | | </el-form-item> |
| | | </el-col> |
| | | <!-- <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">--> |
| | | <!-- <el-form-item label="隐患照片" prop="telephone">--> |
| | | <!-- <el-upload--> |
| | | <!-- class="avatar-uploader"--> |
| | | <!-- action="https://run.mocky.io/v3/9d059bf9-4660-45f2-925d-ce80ad6c4d15"--> |
| | | <!-- :show-file-list="false"--> |
| | | <!-- :on-success="handleAvatarSuccess"--> |
| | | <!-- :before-upload="beforeAvatarUpload"--> |
| | | <!-- >--> |
| | | <!-- <img v-if="imageUrl" :src="imageUrl" class="avatar" />--> |
| | | <!-- <el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>--> |
| | | <!-- </el-upload>--> |
| | | <!-- </el-form-item>--> |
| | | <!-- </el-col>--> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20"> |
| | | <el-form-item label="发现人" prop="telephone" > |
| | | <el-input |
| | |
| | | <el-row style="margin: 0"> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20" style="padding-left: 17.5px;padding-right: 17.5px;"> |
| | | <el-form-item label="整改意见" prop="teamLevel"> |
| | | <el-input v-model="ruleForm.name" class="textarea" type="textarea" disabled placeholder="请填写整改意见"></el-input> |
| | | <el-input v-model="ruleForm.name" class="textarea" type="textarea" placeholder="请填写整改意见"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20" style="padding-left: 17.5px;padding-right: 17.5px;"> |
| | |
| | | class="w100" |
| | | type="datetime" |
| | | placeholder="选择日期时间" |
| | | disabled |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | v-model="ruleForm.teamLeader" |
| | | placeholder="请选择" |
| | | class="input-with-select" |
| | | disabled |
| | | > |
| | | <template #append> |
| | | <el-button :icon="Search" disabled @click="openUser"/> |
| | | <el-button :icon="Search" @click="openUser"/> |
| | | </template> |
| | | </el-input> |
| | | </el-form-item> |
| | |
| | | class="w100" |
| | | type="datetime" |
| | | placeholder="选择日期时间" |
| | | disabled |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | </el-form> |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | | <el-button @click="onCancel" size="default">关闭</el-button> |
| | | <el-button @click="resetForm(ruleFormRef)" size="default">关闭</el-button> |
| | | <el-button size="default" v-if="disabled == true ? false : true" type="primary" @click="submitForm(titles, ruleFormRef)">确定</el-button> |
| | | </span> |
| | | </template> |
| | | </el-dialog> |
| | |
| | | import UserSelections from "/@/components/userSelections/index.vue" |
| | | import CheckTemplate from '/@/components/checkTemplate/index.vue' |
| | | import RegionsDialog from '/@/components/regionsDialog/index.vue' |
| | | import {releaseDrillPlanApi} from "/@/api/contingencyManagement/emergencyDrillPlan"; |
| | | import {emergencyDrillEvaluationApi} from "/@/api/contingencyManagement/emergencyDrillEvaluation"; |
| | | |
| | | export default defineComponent({ |
| | | name: 'rectificationDialog', |
| | |
| | | UserSelections, |
| | | RegionsDialog, |
| | | }, |
| | | setup() { |
| | | setup(props, { emit }) { |
| | | const isShowDialog = ref(false) |
| | | |
| | | const ruleFormRef = ref<FormInstance>() |
| | | //定义表单 |
| | | const ruleForm = reactive({ |
| | | teamName: '', // 队伍名称 |
| | | teamLeader: '', //队伍负责人 |
| | | department: [], // 负责人部门 |
| | | phone: '', // 负责人手机 |
| | | telephone: '', // 固定电话 |
| | | id: '', |
| | | drillPlanId: '', |
| | | suitable: '', |
| | | sufficient: '', |
| | | arrival: '', |
| | | supplies: '', |
| | | protection: '', |
| | | whole: '', |
| | | division: '', |
| | | effect: '', |
| | | report: '', |
| | | safety: '', |
| | | rescue: '', |
| | | evacuate: '', |
| | | needModify: '', |
| | | questionAndImprove: '', |
| | | modifyContent: '', |
| | | fileList: [ |
| | | { |
| | | fileName: 'name', |
| | | fileUrl: 'url', |
| | | } |
| | | ], |
| | | userList: [ |
| | | { |
| | | userUid: '' |
| | | }, |
| | | { |
| | | userUid: '' |
| | | } |
| | | ] |
| | | }); |
| | | const titles = ref(); |
| | | const disabled = ref(); |
| | | // 打开弹窗 |
| | | const openDialog = () => { |
| | | // state.ruleForm = row; |
| | | const openDialog = (title: string, id: number, type: boolean) => { |
| | | isShowDialog.value = true; |
| | | titles.value = title; |
| | | disabled.value = type; |
| | | // if (title == '查看演练实施评价' || title == '修改演练实施评价') { |
| | | // releaseDrillPlanApi() |
| | | // .seeReleaseDrillPlan(id) |
| | | // .then((res) => { |
| | | // if (res.data.code == 200) { |
| | | // ruleForm.value = res.data.data; |
| | | // } |
| | | // }); |
| | | // } |
| | | }; |
| | | // 关闭弹窗 |
| | | const closeDialog = () => { |
| | |
| | | label: 'Level one 1', |
| | | children: [ |
| | | { |
| | | value: '1-1', |
| | | value: '11', |
| | | label: 'Level two 1-1', |
| | | children: [ |
| | | { |
| | | value: '1-1-1', |
| | | value: '111', |
| | | label: 'Level three 1-1-1', |
| | | }, |
| | | ], |
| | |
| | | label: 'Level one 2', |
| | | children: [ |
| | | { |
| | | value: '2-1', |
| | | value: '21', |
| | | label: 'Level two 2-1', |
| | | children: [ |
| | | { |
| | | value: '2-1-1', |
| | | value: '211', |
| | | label: 'Level three 2-1-1', |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | value: '2-2', |
| | | value: '22', |
| | | label: 'Level two 2-2', |
| | | children: [ |
| | | { |
| | | value: '2-2-1', |
| | | value: '221', |
| | | label: 'Level three 2-2-1', |
| | | }, |
| | | ], |
| | |
| | | label: 'Level one 3', |
| | | children: [ |
| | | { |
| | | value: '3-1', |
| | | value: '31', |
| | | label: 'Level two 3-1', |
| | | children: [ |
| | | { |
| | | value: '3-1-1', |
| | | value: '311', |
| | | label: 'Level three 3-1-1', |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | value: '3-2', |
| | | value: '32', |
| | | label: 'Level two 3-2', |
| | | children: [ |
| | | { |
| | | value: '3-2-1', |
| | | value: '321', |
| | | label: 'Level three 3-2-1', |
| | | }, |
| | | ], |
| | |
| | | label: '广汇能源综合物流发展有限责任公司', |
| | | children: [ |
| | | { |
| | | value: '1-1', |
| | | value: '11', |
| | | label: '经营班子', |
| | | children: [], |
| | | }, |
| | |
| | | label: '生产运行部', |
| | | children: [ |
| | | { |
| | | value: '2-1', |
| | | value: '21', |
| | | label: '灌装一班', |
| | | children: [] |
| | | }, |
| | | { |
| | | value: '2-2', |
| | | value: '22', |
| | | label: '工艺四班', |
| | | children: [], |
| | | }, |
| | |
| | | label: '设备部', |
| | | children: [ |
| | | { |
| | | value: '3-1', |
| | | value: '31', |
| | | label: '仪表班', |
| | | children: [], |
| | | }, |
| | | { |
| | | value: '3-2', |
| | | value: '32', |
| | | label: '机修班', |
| | | children: [], |
| | | }, |
| | |
| | | // ], |
| | | // }) |
| | | // 应急队伍弹窗 |
| | | // 表单提交验证必填项 |
| | | const submitForm = async (title: string, formEl: FormInstance | undefined) => { |
| | | if (title == '查看演练实施评价') { |
| | | if (!formEl) return; |
| | | await formEl.validate((valid, fields) => { |
| | | if (valid) { |
| | | isShowDialog.value = false; |
| | | emergencyDrillEvaluationApi() |
| | | .addEmergencyDrillEvaluation(ruleForm.value) |
| | | .then((res) => { |
| | | if (res.data.code == 200) { |
| | | ElMessage({ |
| | | showClose: true, |
| | | message: res.data.msg, |
| | | type: 'success', |
| | | }); |
| | | emit('myAdd', true); |
| | | } else { |
| | | ElMessage({ |
| | | showClose: true, |
| | | message: res.data.msg, |
| | | type: 'error', |
| | | }); |
| | | emit('myAdd', true); |
| | | } |
| | | formEl.resetFields(); |
| | | }); |
| | | } else { |
| | | console.log('error submit!', fields); |
| | | } |
| | | }); |
| | | } |
| | | else if (title == '修改演练实施评价') { |
| | | if (!formEl) return; |
| | | await formEl.validate((valid, fields) => { |
| | | if (valid) { |
| | | isShowDialog.value = false; |
| | | emergencyDrillEvaluationApi() |
| | | .editEmergencyDrillEvaluation(ruleForm.value) |
| | | .then((res) => { |
| | | if (res.data.code == 200) { |
| | | ElMessage({ |
| | | showClose: true, |
| | | message: '修改成功', |
| | | type: 'success', |
| | | }); |
| | | emit('myAdd', true); |
| | | } else { |
| | | ElMessage({ |
| | | showClose: true, |
| | | message: res.data.msg, |
| | | type: 'error', |
| | | }); |
| | | emit('myAdd', true); |
| | | } |
| | | formEl.resetFields(); |
| | | }); |
| | | } else { |
| | | console.log('error submit!', fields); |
| | | } |
| | | }); |
| | | formEl.resetFields(); |
| | | ruleForm.value = { |
| | | id: '', |
| | | drillPlanId: '', |
| | | suitable: '', |
| | | sufficient: '', |
| | | arrival: '', |
| | | supplies: '', |
| | | protection: '', |
| | | whole: '', |
| | | division: '', |
| | | effect: '', |
| | | report: '', |
| | | safety: '', |
| | | rescue: '', |
| | | evacuate: '', |
| | | needModify: '', |
| | | questionAndImprove: '', |
| | | modifyContent: '', |
| | | fileList: [ |
| | | { |
| | | fileName: 'name', |
| | | fileUrl: 'url', |
| | | } |
| | | ], |
| | | userList: [ |
| | | { |
| | | userUid: '' |
| | | }, |
| | | { |
| | | userUid: '' |
| | | } |
| | | ] |
| | | }; |
| | | } |
| | | } |
| | | const resetForm = (formEl: FormInstance | undefined) => { |
| | | isShowDialog.value = false; |
| | | if (!formEl) return; |
| | | formEl.resetFields(); |
| | | }; |
| | | const Shows=ref() |
| | | const daiInpt=()=>{ |
| | | Shows.value.openDailog() |
| | |
| | | toggleFullscreen, |
| | | FullScreen, |
| | | full, |
| | | submitForm, |
| | | emit, |
| | | titles, |
| | | disabled, |
| | | resetForm, |
| | | }; |
| | | }, |
| | | }); |