| | |
| | | this.initWXY() |
| | | this.initDangerRebound() |
| | | this.id = this.$route.query.id; |
| | | this.route = this.$route.query.route; |
| | | if( this.id!=null && this.id!=''){ |
| | | this.initInfo(); |
| | | this.addShow=false |
| | |
| | | |
| | | |
| | | returnIndex(){ |
| | | this.$router.push({ |
| | | path:"/hiddenDangerRegistration" |
| | | }) |
| | | if(this.route!=null){ |
| | | this.$router.push({ |
| | | path:"/"+this.route |
| | | }) |
| | | }else{ |
| | | this.$router.push({ |
| | | path:"/hiddenDangerRegistration" |
| | | }) |
| | | } |
| | | }, |
| | | submitForm(formName) { |
| | | this.$refs[formName].validate((valid) => { |
| | |
| | | editDanger(param).then(res=>{ |
| | | if (res.data.ok==1){ |
| | | this.$message({type:'success', message:"编辑成功", duration:3000}) |
| | | this.$router.push({ |
| | | path:"/hiddenDangerRegistration" |
| | | }) |
| | | if(this.route!=null){ |
| | | this.$router.push({ |
| | | path:"/"+this.route |
| | | }) |
| | | }else{ |
| | | this.$router.push({ |
| | | path:"/hiddenDangerRegistration" |
| | | }) |
| | | } |
| | | }else { |
| | | this.$message({type:'error', message:res.data.msg, duration:3000}) |
| | | } |