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

Loading…
Cancel
Save