| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <div style=""> |
| | | <div class="app-container" > |
| | | <div v-if="type=='0'" style=""> |
| | | <Titlename title="录入隐患单页面"></Titlename> |
| | | <div class="whole-form"> |
| | | <el-form |
| | |
| | | <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" 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="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> |
| | |
| | | <el-button |
| | | size="mini" |
| | | @click="editDanger(scope.row, scope.$index)" |
| | | >添加 |
| | | >编辑 |
| | | </el-button> |
| | | <el-button |
| | | size="mini" |
| | | v-if="addShow" |
| | | @click="deleteDanger(scope.row, scope.$index)" |
| | | >删除 |
| | | </el-button> |
| | |
| | | </el-form> |
| | | </div> |
| | | </div> |
| | | <div v-else> |
| | | <el-table :data="detailTableData" style="width: 100%" > |
| | | <el-table-column type="selection" width="55" align="center"></el-table-column> |
| | | <el-table-column prop="number" label="编号" align="center" width="120"></el-table-column> |
| | | <el-table-column prop="check_branch" label="检查部门" align="center" width="120"></el-table-column> |
| | | <el-table-column prop="check_man" label="检查人" align="center" width="120"></el-table-column> |
| | | <el-table-column prop="checktype" label="检查类别" align="center"></el-table-column> |
| | | <el-table-column label="隐患项目" align="center"> |
| | | <el-table-column prop="check_date" label="检查时间" width="120" align="center"></el-table-column> |
| | | <el-table-column prop="address" label="地点" align="center"> </el-table-column> |
| | | <el-table-column prop="ht_content" label="内容" align="center"> </el-table-column> |
| | | <el-table-column prop="ht_typesub" label="类别" align="center"> </el-table-column> |
| | | <el-table-column prop="ht_level" label="级别" align="center"> </el-table-column> |
| | | </el-table-column> |
| | | <el-table-column label="整改计划" align="center"> |
| | | <el-table-column prop="measure" label="整改措施" align="center"> </el-table-column> |
| | | <el-table-column prop="ht_branch" label="隐患部门" align="center"> </el-table-column> |
| | | <el-table-column prop="duty_officer" label="责任人" align="center"> </el-table-column> |
| | | <el-table-column prop="alter_time" label="限改时间" width="120" align="center"></el-table-column> |
| | | <el-table-column prop="ht_level" label="级别" align="center"> </el-table-column> |
| | | </el-table-column> |
| | | <el-table-column label="整改情况" align="center"> |
| | | <el-table-column prop="ACCOMPLISHTIME" label="完成时间" width="110px" align="center"> </el-table-column> |
| | | <el-table-column prop="CALLBACKRESULT" label="复查结果" align="center"> </el-table-column> |
| | | <el-table-column prop="CALLBACKPERSON" label="复查人" align="center"> </el-table-column> |
| | | <el-table-column prop="CALLBACKTIME" label="复查时间" width="120" align="center"></el-table-column> |
| | | </el-table-column> |
| | | <el-table-column label="隐患处理状态" align="center"> |
| | | <template slot-scope="scope"> |
| | | <span v-if="scope.row.step =='1'">初始状态</span> |
| | | <span v-if="scope.row.step =='2'">整改中</span> |
| | | <span v-if="scope.row.step =='3'">复查中</span> |
| | | <span v-if="scope.row.step =='end'">处理结束</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="DTRisk_bankId" label="是否关联" align="center"> |
| | | <template slot-scope="scope"> |
| | | <span v-if="scope.row.DTRisk_bankId==0 || scope.row.DTRisk_bankId=='' || scope.row.DTRisk_bankId==null">未关联</span> |
| | | <span v-else>已关联</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="DTRisk_level" label="风险等级" align="center"> </el-table-column> |
| | | <el-table-column prop="warningLevel" label="初始警情" align="center"> </el-table-column> |
| | | <el-table-column prop="curWarningLevel" label="当前警情" align="center"> </el-table-column> |
| | | </el-table> |
| | | |
| | | <el-button style="margin-top: 20px" @click="returnIndex">关闭</el-button> |
| | | </div> |
| | | <el-dialog |
| | | :title="title" |
| | | :visible.sync="dialogVisible" |
| | |
| | | </el-row> |
| | | </el-form> |
| | | </el-dialog> |
| | | |
| | | </div> |
| | | |
| | | |
| | | </template> |
| | | |
| | | <script> |
| | | import Titlename from "../../components/Titlename/index.vue"; |
| | | import Titlename from "../../components/Titlename/index.vue"; |
| | | |
| | | import {initJCBM ,initYHLX, initBC ,initJCLB ,initYHBM ,initYHJB,initLlr,initReformStatus,initYwks,initWxy} from "@/api/sgyhpczl/initSelect"; |
| | | import {saveDanger,initDangerRebound,getDangerInfo,editDanger} from '@/api/sgyhpczl/hiddenDangerRegistration' |
| | | import {deepClone} from '@/utils' |
| | | import { |
| | | initBC, |
| | | initJCBM, |
| | | initJCLB, |
| | | initLlr, |
| | | initReformStatus, |
| | | initWxy, |
| | | initYHBM, |
| | | initYHJB, |
| | | initYHLX, |
| | | initYwks |
| | | } from "@/api/sgyhpczl/initSelect"; |
| | | import {getPageList,initDangerRebound} from '@/api/sgyhpczl/hiddenDangerRegistration' |
| | | import {deepClone} from '@/utils' |
| | | |
| | | export default { |
| | | export default { |
| | | components: { Titlename }, |
| | | name: "hiddenDangerList", |
| | | data() { |
| | | return { |
| | | addShow:true, |
| | | type: '0', |
| | | id:'', |
| | | rowIndex:-1, |
| | | dangerList:[], |
| | |
| | | statusList:[], |
| | | YWKSList:[], |
| | | reboundList:[], |
| | | ruleForm: {}, |
| | | rules: { |
| | | ruleForm: {}, |
| | | rules: { |
| | | check_date: [{ required: true, message: '不能为空', trigger: 'blur' },], |
| | | check_class: [{ required: true, message: '不能为空', trigger: 'blur' },], |
| | | check_main_branch: [{ required: true, message: '不能为空', trigger: 'blur' },], |
| | |
| | | check_man: [{ required: true, message: '不能为空', trigger: 'blur' },], |
| | | checktype: [{ required: true, message: '不能为空', trigger: 'blur' },], |
| | | }, |
| | | tableData: [], |
| | | tableData: [], |
| | | paramsData: {},//上个页面参数 |
| | | listQuery:{ |
| | | page:1, |
| | | limit:10, |
| | | form:{}, |
| | | }, |
| | | currentPage: 1, |
| | | pageSize: 10, |
| | | recordTotal: 0, |
| | | detailTableData:[],//隐患详情列表 |
| | | }; |
| | | }, |
| | | |
| | | mounted(){ |
| | | this.initBC() |
| | | this.initJCLB() |
| | |
| | | this.initYWKS() |
| | | this.initWXY() |
| | | this.initDangerRebound() |
| | | this.id = this.$route.query.id; |
| | | if( this.id!=null && this.id!=''){ |
| | | this.initInfo(); |
| | | this.addShow=false |
| | | this.type = this.$route.query.type; |
| | | if (this.type === '0'){ |
| | | this.initInfo(this.$route.query.data); |
| | | }else { |
| | | this.listQuery.form.jyfsId = this.$route.query.data.id |
| | | this.getPageList(); |
| | | } |
| | | }, |
| | | methods: { |
| | | async initInfo(){ |
| | | var res=await getDangerInfo(this.id) |
| | | if (res.data.ok==1){ |
| | | this.ruleForm=res.data.data |
| | | this.changeJCDW(res.data.data.check_main_branch) |
| | | var obj=deepClone(res.data.data) |
| | | this.tableData.push(obj) |
| | | |
| | | } |
| | | 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, |
| | | }; |
| | | }, |
| | | |
| | | // async initInfo(){ |
| | | // var res=await getDangerInfo(this.id) |
| | | // if (res.data.ok==1){ |
| | | // this.ruleForm=res.data.data |
| | | // this.changeJCDW(res.data.data.check_main_branch) |
| | | // var obj=deepClone(res.data.data) |
| | | // this.tableData.push(obj) |
| | | // } |
| | | // }, |
| | | initDangerRebound(){ |
| | | initDangerRebound().then(res=>{ |
| | | if (res.data.ok==1){ |
| | |
| | | } |
| | | }); |
| | | }, |
| | | getPageList(){ |
| | | this.listQuery.page=1 |
| | | getPageList(this.listQuery).then(res=>{ |
| | | if (res.data.ok==1) { |
| | | this.detailTableData = res.data.data.items |
| | | this.recordTotal=res.data.data.total |
| | | }else{ |
| | | this.$message({type:'error', message:res.data.msg, duration:3000}) |
| | | } |
| | | }) |
| | | }, |
| | | deleteDanger(row, index) { |
| | | |
| | | |
| | | this.$confirm('确认删除吗', '提示', { |
| | | confirmButtonText: '确认', |
| | | cancelButtonText: '取消', |
| | |
| | | |
| | | returnIndex(){ |
| | | this.$router.push({ |
| | | path:"/hiddenDangerRegistration" |
| | | path:"/oneFromanother" |
| | | }) |
| | | }, |
| | | judge(obj){ |
| | | console.log(obj) |
| | | if (obj != null || ('ht_branch' in obj) || ('address' in obj) || ('ht_typesub' in obj) || ('dangerousSource' in obj) |
| | | || ('alter_time' in obj) || ('duty_officer' in obj) || ('alter_status' in obj) || ('Review' in obj) || ('DTRisk_bankId' in obj)){ |
| | | return true; |
| | | }else { |
| | | return false; |
| | | } |
| | | }, |
| | | submitForm(formName) { |
| | | this.$refs[formName].validate((valid) => { |
| | | |
| | | if (valid) { |
| | | if(this.tableData==null || this.tableData.length==0){ |
| | | this.$message({type:'error', message:"请添加隐患", duration:2000}) |
| | | } |
| | | this.ruleForm.items=this.tableData |
| | | if(this.addShow){ |
| | | saveDanger(this.ruleForm).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}) |
| | | } |
| | | }) |
| | | }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}) |
| | | } |
| | | }) |
| | | 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" |
| | | }) |
| | | }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}) |
| | | // } |
| | | // }) |
| | | // } |
| | | |
| | | |
| | | |