Browse Source

修复 操作日志当结构不为json时的参数展示形式

main
pixel 4 years ago
parent
commit
27f1e41e4e
  1. 11
      web/src/view/superAdmin/operation/sysOperationRecord.vue

11
web/src/view/superAdmin/operation/sysOperationRecord.vue

@ -59,7 +59,7 @@
<div> <div>
<el-popover placement="top-start" trigger="hover" v-if="scope.row.body"> <el-popover placement="top-start" trigger="hover" v-if="scope.row.body">
<div class="popover-box"> <div class="popover-box">
<pre>{{JSON.parse(scope.row.body)}}</pre>
<pre>{{fmtBody(scope.row.body)}}</pre>
</div> </div>
<i class="el-icon-view" slot="reference"></i> <i class="el-icon-view" slot="reference"></i>
</el-popover> </el-popover>
@ -73,7 +73,7 @@
<div> <div>
<el-popover placement="top-start" trigger="hover" v-if="scope.row.resp"> <el-popover placement="top-start" trigger="hover" v-if="scope.row.resp">
<div class="popover-box"> <div class="popover-box">
<pre>{{JSON.parse(scope.row.resp)}}</pre>
<pre>{{fmtBody(scope.row.resp)}}</pre>
</div> </div>
<i class="el-icon-view" slot="reference"></i> <i class="el-icon-view" slot="reference"></i>
</el-popover> </el-popover>
@ -192,6 +192,13 @@ export default {
}) })
this.getTableData() this.getTableData()
} }
},
fmtBody(value){
try{
return JSON.parse(value)
}catch (err){
return value
}
} }
}, },
created() { created() {

Loading…
Cancel
Save