| | |
| | | <template> |
| | | <el-dialog title="验收" :visible.sync="dialogFormVisible" |
| | | :modal-append-to-body="false" :close-on-click-modal="false" width="800px"> |
| | | <el-form ref="dataForm" :rules="dataFormRules" :model="dataForm" label-position="right" label-width="140px" |
| | | style="" element-loading-text="保存中..."> |
| | | |
| | | |
| | | <el-form-item label="隐患级别:"> |
| | | <el-select v-model="dataForm.level" :disabled="isView"> |
| | | <el-option |
| | | v-for="item in levels" |
| | | :key="item.key" |
| | | :label="item.value" |
| | | :value="item.key"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="整改措施:" > |
| | | <el-input |
| | | style="width: 400px" |
| | | type="textarea" |
| | | :rows="3" |
| | | :disabled="isView" |
| | | v-model="dataForm.rectifymeasure"> |
| | | </el-input> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="整改期限:" > |
| | | <el-date-picker |
| | | v-model="dataForm.rectifydeadline" |
| | | type="datetime" |
| | | :disabled="isView" |
| | | format="yyyy-MM-dd HH:mm" |
| | | value-format="yyyy-MM-dd HH:mm" |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="上报说明:" > |
| | | <el-input |
| | | style="width: 400px" |
| | | type="textarea" |
| | | :rows="3" |
| | | :disabled="isView" |
| | | v-model="dataForm.createnote"> |
| | | </el-input> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="上报图片:" v-if="!isView"> |
| | | <el-upload |
| | | ref="upload" |
| | | :action="baseUrl" |
| | | :auto-upload="false" |
| | | :headers="headers" |
| | | :on-change="handleChange" |
| | | name="file" |
| | | :file-list="fileList" |
| | | list-type="picture-card" |
| | | multiple |
| | | > |
| | | <i class="el-icon-plus"></i> |
| | | </el-upload> |
| | | |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="上报图片:" v-if="isView && imgUrls.length > 0" > |
| | | <el-image |
| | | class="upload-img" |
| | | v-for='item in imgUrls' |
| | | :key='item.id' |
| | | :src="item.url" |
| | | :preview-src-list="imgPreviewUrls" |
| | | style="width:100px;height: 100px;margin: 10px;" |
| | | > |
| | | </el-image> |
| | | </el-form-item> |
| | | |
| | | |
| | | <el-form-item label="整改说明:" v-if="isView"> |
| | | <el-input |
| | | style="width: 400px" |
| | | type="textarea" |
| | | :rows="3" |
| | | :disabled="isView" |
| | | v-model="dataForm.rectifynote"> |
| | | </el-input> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="整改图片:" v-if="isView && imgUrls2.length> 0"> |
| | | <el-image |
| | | class="upload-img" |
| | | v-for='item in imgUrls2' |
| | | :key='item.id' |
| | | :src="item.url" |
| | | :preview-src-list="imgPreviewUrls2" |
| | | style="width:100px;height: 100px;margin: 10px;" |
| | | > |
| | | </el-image> |
| | | |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="选择:" > |
| | | <el-radio-group v-model="isReject" > |
| | | <el-radio :label="false" border>验收</el-radio> |
| | | <el-radio :label="true" border>驳回</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | |
| | | |
| | | <el-form-item label="驳回理由:" v-if="isReject"> |
| | | <el-input |
| | | style="width: 400px" |
| | | type="textarea" |
| | | :rows="3" |
| | | v-model="dataForm.rejectnote"> |
| | | </el-input> |
| | | </el-form-item> |
| | | |
| | | <el-dialog title="验收" :visible.sync="isShowCheckDialog" width="600px"> |
| | | <el-form :model="checkForm" :rules="checkFormRules" 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="checkAcceptDesc"> |
| | | <el-input class="input-add" type="textarea" :rows="2" v-model.trim="checkForm.checkAcceptDesc" placeholder="请输入验收意见" clearable></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | |
| | | <div style="margin-top: 30px;margin-left: 140px;" class="dialog-footer" > |
| | | <el-button @click="dialogFormVisible = false">取消</el-button> |
| | | <el-button type="primary" @click="acceptSubmit()" v-if="!isReject" :disabled="submiting">验收</el-button> |
| | | <el-button type="primary" class="el-button el-button--danger" @click="rejectSubmit()" v-if="isReject" :disabled="submiting">驳回</el-button> |
| | | |
| | | <div align="right" class="dialog-footer"> |
| | | <el-button @click="isShowCheckDialog = !isShowCheckDialog" size="default">取 消</el-button> |
| | | <el-button type="primary" @click="submitCheck" size="default">确 定</el-button> |
| | | </div> |
| | | |
| | | </el-dialog> |
| | | </template> |
| | | |
| | |
| | | <script> |
| | | import { hiddenDangerAccept,hiddenDangerReject} from '@/api/hiddenDanger'; |
| | | import { getToken} from "@/utils/auth"; |
| | | import {checkHiddenDangerReport, submitHiddenDangerReport} from "../../../../../../api/hiddenDanger"; |
| | | |
| | | export default { |
| | | name: "acceptDialog", |
| | |
| | | isReject:false, |
| | | submiting:false, |
| | | levels:[ |
| | | {"key":"URGENT","value":"紧急"}, |
| | | {"key":"COMMON","value":"一般"}, |
| | | {"key":"URGENT","value":"重大隐患"}, |
| | | {"key":"COMMON","value":"一般隐患"}, |
| | | ], |
| | | dataForm: { |
| | | id:'', |
| | |
| | | dialogFormVisible: false, |
| | | dialogStatus:'', |
| | | dataFormRules: {}, |
| | | checkTypeList: [], |
| | | rectifyTypeList: [ |
| | | { id: 1, name: '即查即改' }, |
| | | { id: 2, name: '限期整改' } |
| | | ], |
| | | departmentList: [], |
| | | userList: [], |
| | | isShowCheckDialog: false, |
| | | isShowCheckInfoDialog: false, |
| | | checkForm: { |
| | | id: null, |
| | | dangerManagerId: null, |
| | | checkAcceptDesc: null |
| | | }, |
| | | checkInfoForm: { |
| | | rectifyDepId: null, |
| | | liablePersonId: null |
| | | }, |
| | | checkFormRules: { |
| | | checkAcceptDesc: [{ required: true, message: '请填写整改说明', trigger: 'blur' }] |
| | | } |
| | | } |
| | | }, |
| | | methods:{ |
| | | showDialog(row){ |
| | | this.isView = true |
| | | this.dataForm.id = row.id |
| | | this.dataForm.level = row.level; |
| | | this.dataForm.createnote = row.createnote; |
| | | this.dataForm.rectifydeadline = row.rectifydeadline; |
| | | this.dataForm.rectifymeasure = row.rectifymeasure; |
| | | this.dataForm.rectifynote = row.rectifynote; |
| | | this.imgUrls = row.reportResources.map(item=>{return {url:process.env.IMG_API+item.url,name:item.id}}) |
| | | this.imgUrls2 = row.rectifyResources.map(item=>{return {url:process.env.IMG_API+item.url,name:item.id}}) |
| | | this.imgPreviewUrls = row.reportResources.map(item=>{ return process.env.IMG_API + item.url }) |
| | | this.imgPreviewUrls2 = row.rectifyResources.map(item=>{ return process.env.IMG_API + item.url }) |
| | | this.dialogFormVisible = true; |
| | | this.isShowCheckDialog = true; |
| | | const checkForm = JSON.parse(JSON.stringify(row)); |
| | | this.checkForm.id = checkForm.id; |
| | | this.checkForm.dangerManagerId = checkForm.dangerManagerId; |
| | | }, |
| | | acceptSubmit(){ |
| | | let params = {} |
| | | params['id'] = this.dataForm.id |
| | | this.submit(params,hiddenDangerAccept) |
| | | |
| | | submitCheck() { |
| | | this.$refs['checkFormRef'].validate(async (valid) => { |
| | | if (valid) { |
| | | let res = await checkHiddenDangerReport(this.checkForm); |
| | | if (res.data.code === '200') { |
| | | this.$message({ |
| | | type: 'success', |
| | | message: '整改提交成功', |
| | | duration: 2000 |
| | | }); |
| | | this.isShowCheckDialog = false; |
| | | this.$emit('refreshCheck'); |
| | | } else { |
| | | this.$message({ |
| | | type: 'warning', |
| | | message: res.data.message |
| | | }); |
| | | } |
| | | } else { |
| | | this.$message({ |
| | | type: 'warning', |
| | | message: '请完善基本信息' |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | rejectSubmit(){ |