| | |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="9"> |
| | | <el-form-item label="检查部门" prop="check_branch"> |
| | | <el-select v-model="ruleForm.check_branch" placeholder="请选择" style="width: 100%"> |
| | | <el-option |
| | | v-for="item in JCBMList" |
| | | :key="item.value" |
| | | :label="item.value" |
| | | :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="9" :offset="4"> |
| | | |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="9"> |
| | | <el-form-item label="检查人员" prop="check_man"> |
| | | <el-input v-model="ruleForm.check_man"></el-input> |
| | | </el-form-item> |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | |
| | | <el-row> |
| | | <el-col :span="22"> |
| | | <el-form-item label="行走路线"> |
| | |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <!-- <el-row style="margin-bottom: 20px" v-if="addShow"> |
| | | <el-row style="margin-bottom: 20px"> |
| | | <el-col :span="9"> |
| | | <el-button type="primary" class="btns" @click="addDanger">新增隐患</el-button> |
| | | </el-col> |
| | | </el-row> --> |
| | | </el-row> |
| | | |
| | | <el-table :data="tableData" style="width: 100%"> |
| | | <el-table-column type="index" width="55" align="center" label="序号"></el-table-column> |
| | | <el-table-column prop="ht_branch" align="center" label="隐患部门"></el-table-column> |
| | | <el-table-column prop="address" align="center" label="地点"></el-table-column> |
| | | <el-table-column prop="ht_content" show-overflow-tooltip align="center" label="隐患内容"></el-table-column> |
| | | <el-table-column prop="ht_content" align="center" label="隐患内容"> |
| | | <template slot-scope="scope"> |
| | | <el-popover trigger="hover" placement="top"> |
| | | <p>{{ scope.row.ht_content }}</p> |
| | | <div slot="reference" class="name-wrapper">{{ |
| | | scope.row.ht_content != null && scope.row.ht_content.length > 10 ? scope.row.ht_content.substring(0, 8) + "...." : scope.row.ht_content |
| | | }} |
| | | </div> |
| | | </el-popover> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="measure" align="center" label="整改措施"></el-table-column> |
| | | <el-table-column prop="ht_typesub" align="center" label="隐患类别"></el-table-column> |
| | | <el-table-column prop="dangerousSource" align="center" label="关联危险源"></el-table-column> |
| | |
| | | initYHLX, |
| | | initYwks |
| | | } from "@/api/sgyhpczl/initSelect"; |
| | | import {getPageList,initDangerRebound} from '@/api/sgyhpczl/hiddenDangerRegistration' |
| | | import {getPageList,initDangerRebound,saveDanger} from '@/api/sgyhpczl/hiddenDangerRegistration' |
| | | import {deepClone} from '@/utils' |
| | | |
| | | export default { |
| | |
| | | address: [{ required: true, message: '不能为空', trigger: 'blur' },], |
| | | ht_content: [{ required: true, message: '不能为空', trigger: 'blur' },], |
| | | ht_typesub: [{ required: true, message: '不能为空', trigger: 'blur' },], |
| | | measure: [{ required: true, message: '不能为空', trigger: 'blur' },], |
| | | DTRisk_bankId: [{ required: true, message: '不能为空', trigger: 'blur' },], |
| | | ht_level: [{ required: true, message: '不能为空', trigger: 'blur' },], |
| | | alter_time: [{ required: true, message: '不能为空', trigger: 'blur' },], |
| | |
| | | pageSize: 10, |
| | | recordTotal: 0, |
| | | detailTableData:[],//隐患详情列表 |
| | | beforeData:{}, //上个页面信息 |
| | | beforeFlag:true,//上个页面信息保存标志 |
| | | }; |
| | | }, |
| | | |
| | |
| | | initInfo(data){ |
| | | this.paramsData = this.$route.query.data; |
| | | this.ruleForm.jyfsId = data.id; |
| | | this.tableData[0] = { |
| | | address: data.address, |
| | | ht_content: data.ht_content, |
| | | ht_level: data.ht_level, |
| | | }; |
| | | this.dangerForm.address = data.address; |
| | | this.dangerForm.ht_content = data.ht_content; |
| | | // this.tableData[0] = { |
| | | // address: data.address, |
| | | // ht_content: data.ht_content, |
| | | // ht_level: data.ht_level, |
| | | // }; |
| | | }, |
| | | |
| | | // async initInfo(){ |
| | |
| | | this.$refs[formName].validate((valid) => { |
| | | if (valid) { |
| | | if(this.title=='新增'){ |
| | | this.beforeFlag = false; |
| | | this.tableData.push(this.dangerForm) |
| | | console.log(this.tableData) |
| | | }else { |
| | | var arr = this.tableData; |
| | | arr.splice(this.rowIndex, 1, this.dangerForm); |
| | |
| | | }, |
| | | |
| | | addDanger(){ |
| | | this.dangerForm={} |
| | | if (!this.beforeFlag){ |
| | | this.dangerForm={} |
| | | } |
| | | this.title="新增" |
| | | this.dialogVisible=true |
| | | }, |
| | |
| | | }, |
| | | submitForm(formName) { |
| | | this.$refs[formName].validate((valid) => { |
| | | |
| | | if (valid) { |
| | | this.ruleForm.items=this.tableData |
| | | if(this.judge(this.tableData[0])){ |
| | | this.$message({type:'error', message:"请完整录入隐患", duration:2000}) |
| | | } |
| | | // if(this.addShow){ |
| | | console.log(this.ruleForm) |
| | | saveDanger(this.ruleForm).then(res=>{ |
| | | if (res.data.ok==1){ |
| | | this.$message({type:'success', message:"保存成功", duration:3000}) |
| | | this.$router.push({ |
| | | path:"/oneFromanother" |
| | | path:"/oneFromanotherN" |
| | | }) |
| | | }else { |
| | | this.$message({type:'error', message:res.data.msg, duration:3000}) |
| | | } |
| | | }) |
| | | // }else { |
| | | // var param=deepClone(this.ruleForm) |
| | | // var obj=deepClone(this.tableData[0]) |
| | | // param.ht_branch=obj.ht_branch |
| | | // param.address=obj.address |
| | | // param.ht_content=obj.ht_content |
| | | // param.measure=obj.measure |
| | | // param.ht_typesub=obj.ht_typesub |
| | | // param.DTRisk_bankId=obj.DTRisk_bankId |
| | | // param.DTRisk_level=obj.mriskLevel |
| | | // param.dangerousSource=obj.mriskPoint |
| | | // param.ht_level=obj.ht_level |
| | | // param.alter_time=obj.alter_time |
| | | // param.duty_officer=obj.duty_officer |
| | | // param.alter_status=obj.alter_status |
| | | // param.Review=obj.Review |
| | | // param.repeatId=obj.repeatId |
| | | // editDanger(param).then(res=>{ |
| | | // if (res.data.ok==1){ |
| | | // this.$message({type:'success', message:"编辑成功", duration:3000}) |
| | | // this.$router.push({ |
| | | // path:"/hiddenDangerRegistration" |
| | | // }) |
| | | // }else { |
| | | // this.$message({type:'error', message:res.data.msg, duration:3000}) |
| | | // } |
| | | // }) |
| | | // var param=deepClone(this.ruleForm) |
| | | // var obj=deepClone(this.tableData[0]) |
| | | // param.ht_branch=obj.ht_branch |
| | | // param.address=obj.address |
| | | // param.ht_content=obj.ht_content |
| | | // param.measure=obj.measure |
| | | // param.ht_typesub=obj.ht_typesub |
| | | // param.DTRisk_bankId=obj.DTRisk_bankId |
| | | // param.DTRisk_level=obj.mriskLevel |
| | | // param.dangerousSource=obj.mriskPoint |
| | | // param.ht_level=obj.ht_level |
| | | // param.alter_time=obj.alter_time |
| | | // param.duty_officer=obj.duty_officer |
| | | // param.alter_status=obj.alter_status |
| | | // param.Review=obj.Review |
| | | // param.repeatId=obj.repeatId |
| | | // editDanger(param).then(res=>{ |
| | | // if (res.data.ok==1){ |
| | | // this.$message({type:'success', message:"编辑成功", duration:3000}) |
| | | // this.$router.push({ |
| | | // path:"/hiddenDangerRegistration" |
| | | // }) |
| | | // }else { |
| | | // this.$message({type:'error', message:res.data.msg, duration:3000}) |
| | | // } |
| | | // }) |
| | | // } |
| | | |
| | | |