| | |
| | | </el-col> |
| | | <el-col :span="9" :offset="4"> |
| | | <el-form-item label="班次" prop="check_class"> |
| | | <el-select v-model="ruleForm.check_class" placeholder="请选择" style="width: 100%"> |
| | | <el-select v-model="ruleForm.check_class" placeholder="请选择" style="width: 100%"> |
| | | <el-option |
| | | v-for="item in BCList" |
| | | :key="item.value" |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <!--<el-row> |
| | | <el-col :span="9"> |
| | | <el-form-item label="检查类别" prop="checktype"> |
| | | <el-select v-model="ruleForm.checktype" placeholder="请选择" style="width: 100%"> |
| | | <el-option |
| | | v-for="item in JCLBList" |
| | | :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-form-item label="检查单位" prop="check_main_branch"> |
| | | <el-select v-model="ruleForm.check_main_branch" placeholder="请选择" @change="changeJCDW" style="width: 100%"> |
| | | <el-option |
| | | v-for="item in JCDWList" |
| | | :key="item.label" |
| | | :label="item.label" |
| | | :value="item.label" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </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-input v-model="ruleForm.check_man"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <!--<el-col :span="9" :offset="4"> |
| | | <el-form-item label="陪检人员" prop="acc_man"> |
| | | <el-input v-model="ruleForm.acc_man"></el-input> |
| | | </el-form-item> |
| | | </el-col>--> |
| | | </el-row> |
| | | |
| | | |
| | | <!-- <el-row> |
| | | <el-col :span="22"> |
| | | <el-form-item label="行走路线"> |
| | | <el-input v-model="ruleForm.route" rows="3" type="textarea" class="multiline"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row>--> |
| | | |
| | | <el-row> |
| | | <el-row style="margin-bottom: 20px"> |
| | | <el-col :span="9"> |
| | | <el-button type="primary" class="btns" @click="addDanger">新增隐患</el-button> |
| | | <el-button type="primary" class="btns" v-show="!update" @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" 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-table-column prop="DTRisk_level" align="center" label="风险等级"></el-table-column> |
| | | <el-table-column prop="ht_level" align="center" label="隐患级别"></el-table-column> |
| | | <el-table-column prop="alter_time" align="center" label="限改时间"></el-table-column> |
| | | <el-table-column prop="duty_officer" align="center" label="责任人"></el-table-column> |
| | | <el-table-column prop="alter_status" align="center" label="整改情况"></el-table-column> |
| | | <el-table-column prop="Review" 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="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-table-column prop="DTRisk_level" align="center" label="风险等级"></el-table-column> |
| | | <el-table-column prop="ht_level" align="center" label="隐患级别"></el-table-column> |
| | | <el-table-column prop="alter_time" align="center" label="限改时间"></el-table-column> |
| | | <el-table-column prop="duty_officer" align="center" label="责任人"></el-table-column> |
| | | <el-table-column prop="alter_status" align="center" label="整改情况"></el-table-column> |
| | | <el-table-column prop="Review" align="center" label="业务科室"></el-table-column> |
| | | <el-table-column prop="time" label="操作" align="center" width="140"> |
| | | <template slot-scope="scope"> |
| | | <div style="display: flex;align-items: center;flex-direction: row;"> |
| | |
| | | >编辑 |
| | | </el-button> |
| | | <el-button |
| | | v-if="!update" |
| | | size="mini" |
| | | @click="deleteDanger(scope.row, scope.$index)" |
| | | >删除 |
| | |
| | | <el-col :span="22"> |
| | | <el-form-item style="text-align: center"> |
| | | <el-button type="primary" class="btns" @click="submitForm('ruleForm')" |
| | | >保存</el-button |
| | | >保存 |
| | | </el-button |
| | | > |
| | | <el-button @click="close()">关闭</el-button> |
| | | </el-form-item> |
| | |
| | | </el-col> |
| | | <el-col :span="9" :offset="4"> |
| | | <el-form-item label="地点" prop="address"> |
| | | <el-input v-model="dangerForm.address" rows="3" type="textarea" class="multiline"></el-input> |
| | | <el-input v-model="dangerForm.address" rows="3" type="textarea" |
| | | class="multiline"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | <el-row> |
| | | <el-col :span="9"> |
| | | <el-form-item label="隐患内容" prop="ht_content"> |
| | | <el-input v-model="dangerForm.ht_content" rows="3" type="textarea" class="multiline"></el-input> |
| | | <el-input v-model="dangerForm.ht_content" rows="3" type="textarea" |
| | | class="multiline"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="9" :offset="4"> |
| | | <el-form-item label="整改措施" prop="measure"> |
| | | <el-input v-model="dangerForm.measure" rows="3" type="textarea" class="multiline"></el-input> |
| | | <el-input v-model="dangerForm.measure" rows="3" type="textarea" |
| | | class="multiline"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | </el-col> |
| | | <el-col :span="9" :offset="4"> |
| | | <el-form-item label="关联危险源" prop="DTRisk_bankId"> |
| | | <el-select v-model="dangerForm.DTRisk_bankId" placeholder="请选择" @change="changeWxy" filterable> |
| | | <el-select v-model="dangerForm.DTRisk_bankId" placeholder="请选择" @change="changeWxy" |
| | | filterable> |
| | | <el-option |
| | | v-for="item in dangerList" |
| | | :key="item.id" |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row>--> |
| | | <el-row> |
| | | <el-row style="margin-top: 20px"> |
| | | <el-col :span="22"> |
| | | <el-form-item style="text-align: center"> |
| | | <el-button type="primary" class="btns" @click="submitDanger('form')" |
| | | >保存</el-button |
| | | >保存 |
| | | </el-button |
| | | > |
| | | <el-button @click="dialogVisible=false">关闭</el-button> |
| | | </el-form-item> |
| | |
| | | </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 {initDangerRebound} from '@/api/sgyhpczl/hiddenDangerRegistration' |
| | | import {saveSelfDanger} from '@/api/sgyhpczl/hiddenDangerManagement' |
| | | import {deepClone} from '@/utils' |
| | | import { |
| | | initJCBM, |
| | | initYHLX, |
| | | initBC, |
| | | initJCLB, |
| | | initYHBM, |
| | | initYHJB, |
| | | initLlr, |
| | | initReformStatus, |
| | | initYwks, |
| | | initWxy |
| | | } from "@/api/sgyhpczl/initSelect"; |
| | | import {initDangerRebound} from '@/api/sgyhpczl/hiddenDangerRegistration' |
| | | import {getDangerDetails,self_info} from "@/api/sgyhpczl/recheckCancellationNumber"; |
| | | |
| | | export default { |
| | | components: { Titlename }, |
| | | name: "hiddenDangerList", |
| | | data() { |
| | | return { |
| | | rowIndex:-1, |
| | | dangerList:[], |
| | | dangerForm:{}, |
| | | dangerRules:{ |
| | | ht_branch: [{ required: true, message: '不能为空', trigger: 'blur' },], |
| | | address: [{ required: true, message: '不能为空', trigger: 'blur' },], |
| | | ht_content: [{ required: true, message: '不能为空', trigger: 'blur' },], |
| | | ht_typesub: [{ 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' },], |
| | | alter_status: [{ required: true, message: '不能为空', trigger: 'blur' },], |
| | | Review: [{ required: true, message: '不能为空', trigger: 'blur' },], |
| | | duty_officer:[{ required: true, message: '不能为空', trigger: 'blur' },] |
| | | }, |
| | | title:'新增', |
| | | dialogVisible:false, |
| | | BCList:[], |
| | | JCLBList:[], |
| | | JCDWList:[{label:"众泰煤焦化",value:0},{label:"上级单位",value:1}], |
| | | YHBMList:[], |
| | | YHLXList:[], |
| | | YHJBList:[], |
| | | JCBMList:[], |
| | | llrList:[], |
| | | statusList:[], |
| | | YWKSList:[], |
| | | reboundList:[], |
| | | 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_branch: [{ required: true, message: '不能为空', trigger: 'blur' },], |
| | | check_man: [{ required: true, message: '不能为空', trigger: 'blur' },], |
| | | checktype: [{ required: true, message: '不能为空', trigger: 'blur' },], |
| | | }, |
| | | tableData: [], |
| | | }; |
| | | }, |
| | | mounted(){ |
| | | this.initBC() |
| | | //this.initJCLB() |
| | | this.initYHJB() |
| | | this.initYHLX() |
| | | //this.initLlr() |
| | | this.initReformStatus() |
| | | this.initYHBM() |
| | | this.initYWKS() |
| | | this.initWXY() |
| | | //this.initDangerRebound() |
| | | }, |
| | | methods: { |
| | | initDangerRebound(){ |
| | | initDangerRebound().then(res=>{ |
| | | if (res.data.ok==1){ |
| | | this.reboundList=res.data.data |
| | | } else{ |
| | | this.$message({type:'error', message:res.data.msg, duration:3000}) |
| | | } |
| | | }) |
| | | import {saveSelfDanger,self_edit_do} from '@/api/sgyhpczl/hiddenDangerManagement' |
| | | import {deepClone} from '@/utils' |
| | | |
| | | export default { |
| | | components: {Titlename}, |
| | | name: "hiddenDangerList", |
| | | data() { |
| | | return { |
| | | rowIndex: -1, |
| | | dangerList: [], |
| | | dangerForm: {}, |
| | | dangerRules: { |
| | | measure:[{required: true, message: '不能为空', trigger: 'blur'},], |
| | | ht_branch: [{required: true, message: '不能为空', trigger: 'blur'},], |
| | | address: [{required: true, message: '不能为空', trigger: 'blur'},], |
| | | ht_content: [{required: true, message: '不能为空', trigger: 'blur'},], |
| | | ht_typesub: [{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'},], |
| | | alter_status: [{required: true, message: '不能为空', trigger: 'blur'},], |
| | | Review: [{required: true, message: '不能为空', trigger: 'blur'},], |
| | | duty_officer: [{required: true, message: '不能为空', trigger: 'blur'},] |
| | | }, |
| | | submitDanger(formName){ |
| | | this.$refs[formName].validate((valid) => { |
| | | if (valid) { |
| | | if(this.title=='新增'){ |
| | | this.tableData.push(this.dangerForm) |
| | | }else { |
| | | var arr = this.tableData; |
| | | arr.splice(this.rowIndex, 1, this.dangerForm); |
| | | this.tableData = arr; |
| | | } |
| | | this.dialogVisible=false |
| | | title: '新增', |
| | | dialogVisible: false, |
| | | BCList: [], |
| | | JCLBList: [], |
| | | JCDWList: [{label: "众泰煤焦化", value: 0}, {label: "上级单位", value: 1}], |
| | | YHBMList: [], |
| | | YHLXList: [], |
| | | YHJBList: [], |
| | | JCBMList: [], |
| | | llrList: [], |
| | | statusList: [], |
| | | YWKSList: [], |
| | | update: false, |
| | | reboundList: [], |
| | | ruleForm: { |
| | | check_date:"", |
| | | check_class:"", |
| | | check_man:"" |
| | | }, |
| | | rules: { |
| | | check_date: [{required: true, message: '不能为空', trigger: 'blur'},], |
| | | check_class: [{required: true, message: '不能为空', trigger: 'blur'},], |
| | | check_man: [{required: true, message: '不能为空', trigger: 'blur'},], |
| | | }, |
| | | tableData: [], |
| | | }; |
| | | }, |
| | | mounted() { |
| | | if (this.$route.query != null) { |
| | | self_info(this.$route.query.id).then(res => { |
| | | console.log(res) |
| | | if (res.data.ok) { |
| | | this.tableData.push(res.data.data); |
| | | this.ruleForm.check_date = res.data.data.check_date |
| | | this.ruleForm.check_class = res.data.data.check_class |
| | | this.ruleForm.check_man = res.data.data.check_man |
| | | this.update = true; |
| | | } |
| | | }) |
| | | |
| | | } |
| | | this.initBC() |
| | | //this.initJCLB() |
| | | this.initYHJB() |
| | | this.initYHLX() |
| | | //this.initLlr() |
| | | this.initReformStatus() |
| | | this.initYHBM() |
| | | this.initYWKS() |
| | | this.initWXY() |
| | | //this.initDangerRebound() |
| | | }, |
| | | methods: { |
| | | initDangerRebound() { |
| | | initDangerRebound().then(res => { |
| | | if (res.data.ok == 1) { |
| | | this.reboundList = res.data.data |
| | | } else { |
| | | this.$message({type: 'error', message: res.data.msg, duration: 3000}) |
| | | } |
| | | }) |
| | | }, |
| | | submitDanger(formName) { |
| | | this.$refs[formName].validate((valid) => { |
| | | if (valid) { |
| | | if (this.title == '新增') { |
| | | this.tableData.push(this.dangerForm) |
| | | } else { |
| | | console.log("error submit!!"); |
| | | return false; |
| | | var arr = this.tableData; |
| | | arr.splice(this.rowIndex, 1, this.dangerForm); |
| | | this.tableData = arr; |
| | | } |
| | | }); |
| | | }, |
| | | deleteDanger(row, index) { |
| | | this.dialogVisible = false |
| | | |
| | | } else { |
| | | console.log("error submit!!"); |
| | | return false; |
| | | } |
| | | }); |
| | | }, |
| | | deleteDanger(row, index) { |
| | | |
| | | |
| | | this.$confirm('确认删除吗', '提示', { |
| | | confirmButtonText: '确认', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }) |
| | | .then(() => { |
| | | var arr = deepClone(this.tableData); |
| | | var brr = []; |
| | | for (var i = 0; i < arr.length; i++) { |
| | | if (i == index) { |
| | | } else { |
| | | brr.push(arr[i]); |
| | | } |
| | | this.$confirm('确认删除吗', '提示', { |
| | | confirmButtonText: '确认', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }) |
| | | .then(() => { |
| | | var arr = deepClone(this.tableData); |
| | | var brr = []; |
| | | for (var i = 0; i < arr.length; i++) { |
| | | if (i == index) { |
| | | } else { |
| | | brr.push(arr[i]); |
| | | } |
| | | this.tableData = deepClone(brr); |
| | | //this.tableData.splice(index) |
| | | |
| | | }) |
| | | .catch(error => { |
| | | }); |
| | | |
| | | |
| | | }, |
| | | editDanger(row, index) { |
| | | this.dangerForm = deepClone(row); |
| | | this.rowIndex = index; |
| | | this.dialogVisible = true; |
| | | this.title = '编辑'; |
| | | }, |
| | | |
| | | addDanger(){ |
| | | this.dangerForm={} |
| | | this.title="新增" |
| | | this.dialogVisible=true |
| | | }, |
| | | changeWxy(e){ |
| | | for(var i=0;i<this.dangerList.length;i++){ |
| | | if(e==this.dangerList[i].id){ |
| | | this.dangerForm.DTRisk_level=this.dangerList[i].mriskLevel |
| | | this.dangerForm.dangerousSource=this.dangerList[i].mriskPoint |
| | | } |
| | | this.tableData = deepClone(brr); |
| | | //this.tableData.splice(index) |
| | | |
| | | }) |
| | | .catch(error => { |
| | | }); |
| | | |
| | | |
| | | }, |
| | | editDanger(row, index) { |
| | | this.dangerForm = deepClone(row); |
| | | this.rowIndex = index; |
| | | this.dialogVisible = true; |
| | | this.title = '编辑'; |
| | | }, |
| | | |
| | | addDanger() { |
| | | this.dangerForm = {} |
| | | this.title = "新增" |
| | | this.dialogVisible = true |
| | | }, |
| | | changeWxy(e) { |
| | | for (var i = 0; i < this.dangerList.length; i++) { |
| | | if (e == this.dangerList[i].id) { |
| | | this.dangerForm.DTRisk_level = this.dangerList[i].mriskLevel |
| | | this.dangerForm.dangerousSource = this.dangerList[i].mriskPoint |
| | | } |
| | | }, |
| | | initWXY(){ |
| | | var param={ |
| | | page: 1, |
| | | limit: 1000 |
| | | } |
| | | }, |
| | | initWXY() { |
| | | var param = { |
| | | page: 1, |
| | | limit: 1000 |
| | | } |
| | | initWxy(param).then(res => { |
| | | if (res.data.ok == 1) { |
| | | this.dangerList = res.data.data.items |
| | | } else { |
| | | this.$message({type: 'error', message: res.data.msg, duration: 3000}) |
| | | } |
| | | initWxy(param).then(res=>{ |
| | | if (res.data.ok==1){ |
| | | this.dangerList=res.data.data.items |
| | | } else{ |
| | | this.$message({type:'error', message:res.data.msg, duration:3000}) |
| | | } |
| | | }) |
| | | }, |
| | | initYWKS(){ |
| | | initYwks().then(res=>{ |
| | | if (res.data.ok==1){ |
| | | this.YWKSList=res.data.data |
| | | } else{ |
| | | this.$message({type:'error', message:res.data.msg, duration:3000}) |
| | | } |
| | | }) |
| | | }, |
| | | initYHBM(){ |
| | | initYHBM().then(res=>{ |
| | | if (res.data.ok==1){ |
| | | this.YHBMList=res.data.data |
| | | } else{ |
| | | this.$message({type:'error', message:res.data.msg, duration:3000}) |
| | | } |
| | | }) |
| | | }, |
| | | initLlr(){ |
| | | initLlr().then(res=>{ |
| | | if (res.data.ok==1){ |
| | | this.llrList=res.data.data |
| | | } else{ |
| | | this.$message({type:'error', message:res.data.msg, duration:3000}) |
| | | } |
| | | }) |
| | | }, |
| | | initReformStatus(){ |
| | | initReformStatus().then(res=>{ |
| | | if (res.data.ok==1){ |
| | | this.statusList=res.data.data |
| | | } else{ |
| | | this.$message({type:'error', message:res.data.msg, duration:3000}) |
| | | } |
| | | }) |
| | | }, |
| | | changeJCDW(val){ |
| | | initJCBM(val).then(res=>{ |
| | | if (res.data.ok==1){ |
| | | this.JCBMList=res.data.data |
| | | } else{ |
| | | this.$message({type:'error', message:res.data.msg, duration:3000}) |
| | | } |
| | | }) |
| | | }, |
| | | initYHLX(){ |
| | | initYHLX().then(res=>{ |
| | | if (res.data.ok==1){ |
| | | this.YHLXList=res.data.data |
| | | } else{ |
| | | this.$message({type:'error', message:res.data.msg, duration:3000}) |
| | | } |
| | | }) |
| | | }, |
| | | initYHJB(){ |
| | | initYHJB().then(res=>{ |
| | | if (res.data.ok==1){ |
| | | this.YHJBList=res.data.data |
| | | } else{ |
| | | this.$message({type:'error', message:res.data.msg, duration:3000}) |
| | | } |
| | | }) |
| | | }, |
| | | initBC(){ |
| | | initBC().then(res=>{ |
| | | if (res.data.ok==1){ |
| | | this.BCList=res.data.data |
| | | } else{ |
| | | this.$message({type:'error', message:res.data.msg, duration:3000}) |
| | | } |
| | | }) |
| | | }, |
| | | initJCLB(){ |
| | | initJCLB().then(res=>{ |
| | | if (res.data.ok==1){ |
| | | this.JCLBList=res.data.data |
| | | } else{ |
| | | this.$message({type:'error', message:res.data.msg, duration:3000}) |
| | | } |
| | | }) |
| | | }, |
| | | }) |
| | | }, |
| | | initYWKS() { |
| | | initYwks().then(res => { |
| | | if (res.data.ok == 1) { |
| | | this.YWKSList = res.data.data |
| | | } else { |
| | | this.$message({type: 'error', message: res.data.msg, duration: 3000}) |
| | | } |
| | | }) |
| | | }, |
| | | initYHBM() { |
| | | initYHBM().then(res => { |
| | | if (res.data.ok == 1) { |
| | | this.YHBMList = res.data.data |
| | | } else { |
| | | this.$message({type: 'error', message: res.data.msg, duration: 3000}) |
| | | } |
| | | }) |
| | | }, |
| | | initLlr() { |
| | | initLlr().then(res => { |
| | | if (res.data.ok == 1) { |
| | | this.llrList = res.data.data |
| | | } else { |
| | | this.$message({type: 'error', message: res.data.msg, duration: 3000}) |
| | | } |
| | | }) |
| | | }, |
| | | initReformStatus() { |
| | | initReformStatus().then(res => { |
| | | if (res.data.ok == 1) { |
| | | this.statusList = res.data.data |
| | | } else { |
| | | this.$message({type: 'error', message: res.data.msg, duration: 3000}) |
| | | } |
| | | }) |
| | | }, |
| | | changeJCDW(val) { |
| | | initJCBM(val).then(res => { |
| | | if (res.data.ok == 1) { |
| | | this.JCBMList = res.data.data |
| | | } else { |
| | | this.$message({type: 'error', message: res.data.msg, duration: 3000}) |
| | | } |
| | | }) |
| | | }, |
| | | initYHLX() { |
| | | initYHLX().then(res => { |
| | | if (res.data.ok == 1) { |
| | | this.YHLXList = res.data.data |
| | | } else { |
| | | this.$message({type: 'error', message: res.data.msg, duration: 3000}) |
| | | } |
| | | }) |
| | | }, |
| | | initYHJB() { |
| | | initYHJB().then(res => { |
| | | if (res.data.ok == 1) { |
| | | this.YHJBList = res.data.data |
| | | } else { |
| | | this.$message({type: 'error', message: res.data.msg, duration: 3000}) |
| | | } |
| | | }) |
| | | }, |
| | | initBC() { |
| | | initBC().then(res => { |
| | | if (res.data.ok == 1) { |
| | | this.BCList = res.data.data |
| | | } else { |
| | | this.$message({type: 'error', message: res.data.msg, duration: 3000}) |
| | | } |
| | | }) |
| | | }, |
| | | initJCLB() { |
| | | initJCLB().then(res => { |
| | | if (res.data.ok == 1) { |
| | | this.JCLBList = res.data.data |
| | | } else { |
| | | this.$message({type: 'error', message: res.data.msg, duration: 3000}) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | |
| | | |
| | | submitForm(formName) { |
| | | submitForm(formName) { |
| | | if (!this.update) { |
| | | this.$refs[formName].validate((valid) => { |
| | | if (valid) { |
| | | if(this.tableData==null || this.tableData.length==0){ |
| | | this.$message({type:'error', message:"请添加隐患", duration:2000}) |
| | | if (this.tableData == null || this.tableData.length == 0) { |
| | | this.$message({type: 'error', message: "请添加隐患", duration: 2000}) |
| | | } |
| | | this.ruleForm.items=this.tableData |
| | | saveSelfDanger(this.ruleForm).then(res=>{ |
| | | if (res.data.ok==1){ |
| | | this.$message({type:'success', message:"新增成功", duration:3000}) |
| | | this.ruleForm.items = this.tableData |
| | | saveSelfDanger(this.ruleForm).then(res => { |
| | | if (res.data.ok == 1) { |
| | | this.$message({type: 'success', message: "新增成功", duration: 3000}) |
| | | this.$router.push({ |
| | | path:"/hiddenDangerRegistration" |
| | | path: "/hiddenDangerManagement" |
| | | }) |
| | | }else { |
| | | this.$message({type:'error', message:res.data.msg, duration:3000}) |
| | | } else { |
| | | this.$message({type: 'error', message: res.data.msg, duration: 3000}) |
| | | } |
| | | }) |
| | | |
| | |
| | | return false; |
| | | } |
| | | }); |
| | | }, |
| | | } else { |
| | | console.log(this.tableData) |
| | | this.$refs[formName].validate((valid) => { |
| | | if (valid) { |
| | | var requestData = this.tableData[0]; |
| | | requestData.check_class= this.ruleForm.check_class |
| | | requestData.check_man= this.ruleForm.check_man |
| | | requestData.check_date= this.ruleForm.check_date |
| | | console.log(requestData) |
| | | self_edit_do(requestData).then(res => { |
| | | if (res.data.ok == 1) { |
| | | this.$message({type: 'success', message: "编辑成功", duration: 3000}) |
| | | this.$router.push({ |
| | | path: "/hiddenDangerManagement" |
| | | }) |
| | | } else { |
| | | this.$message({type: 'error', message: res.data.msg, duration: 3000}) |
| | | } |
| | | }) |
| | | |
| | | } else { |
| | | console.log("error submit!!"); |
| | | return false; |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | }; |
| | | close() { |
| | | this.$router.push({ |
| | | path: "/hiddenDangerManagement" |
| | | }) |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .app-container { |
| | | padding: 20px; |
| | | height: 850px; |
| | | overflow-y: auto; |
| | | } |
| | | .app-container { |
| | | padding: 20px; |
| | | height: 850px; |
| | | overflow-y: auto; |
| | | } |
| | | |
| | | .app-container /deep/ .box { |
| | | padding-top: 0; |
| | | } |
| | | .app-container /deep/ .box { |
| | | padding-top: 0; |
| | | } |
| | | |
| | | /* /deep/ .multiline .el-input__inner { |
| | | height: 62px; |
| | | } */ |
| | | .btns{ |
| | | background-color: #034ea2; |
| | | border: 1px solid #034ea2; |
| | | } |
| | | /* /deep/ .multiline .el-input__inner { |
| | | height: 62px; |
| | | } */ |
| | | .btns { |
| | | background-color: #034ea2; |
| | | border: 1px solid #034ea2; |
| | | } |
| | | </style> |