From c819024e241b9f7c54cc3786373ad0d2998f2190 Mon Sep 17 00:00:00 2001 From: 马宇豪 <978517621@qq.com> Date: 星期五, 05 五月 2023 08:55:46 +0800 Subject: [PATCH] 修改 --- src/views/hiddenDangerRegistration/hiddenDangerAdd.vue | 49 +++++++++++++++++++++++++++++++++++++++++-------- 1 files changed, 41 insertions(+), 8 deletions(-) diff --git a/src/views/hiddenDangerRegistration/hiddenDangerAdd.vue b/src/views/hiddenDangerRegistration/hiddenDangerAdd.vue index bb4ff05..b6442e7 100644 --- a/src/views/hiddenDangerRegistration/hiddenDangerAdd.vue +++ b/src/views/hiddenDangerRegistration/hiddenDangerAdd.vue @@ -115,8 +115,28 @@ <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_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="整改措施"> + <template slot-scope="scope"> + <el-popover trigger="hover" placement="top"> + <p>{{ scope.row.measure }}</p> + <div slot="reference" class="name-wrapper">{{ + scope.row.measure != null && scope.row.measure.length > 10 ? scope.row.measure.substring(0, 8) + "...." : scope.row.measure + }} + </div> + </el-popover> + </template> + </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> @@ -385,6 +405,7 @@ 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 @@ -571,9 +592,15 @@ 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) => { @@ -613,9 +640,15 @@ 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}) } -- Gitblit v1.9.2