fix(系统设置): 请求记录的操作日志,查看详情,显示为上次打开的内容

--bug=1026197 --user=陈建星 【项目设置】操作日志-请求类型-查看日志详情和操作记录不对应 https://www.tapd.cn/55049933/s/1372092
This commit is contained in:
chenjianxing 2023-05-16 18:19:34 +08:00 committed by jianxing
parent ee50e7456e
commit a9b815f5cd
2 changed files with 26 additions and 0 deletions

View File

@ -6,6 +6,7 @@
<template v-slot:default="scope">
<div v-if="isObject(scope.row.newValue)" class="code-edit-container">
<ms-code-edit
v-if="visible"
mode="json"
:read-only="true"
:data="getJsonValue(scope.row.newValue)"
@ -34,12 +35,24 @@ import MsCodeEdit from "metersphere-frontend/src/components/MsCodeEdit";
},
data() {
return {
visible: true
}
},
watch: {
detail() {
this.reload();
}
},
methods: {
getJsonValue(value) {
return JSON.stringify(value);
},
reload() {
this.visible = false;
this.$nextTick(() => {
this.visible = true;
});
},
isObject(value) {
if (value instanceof Object) {
return true;

View File

@ -6,6 +6,7 @@
<template v-slot:default="scope">
<div v-if="isObject(scope.row.newValue)" class="code-edit-container">
<ms-code-edit
v-if="visible"
mode="json"
:read-only="true"
:data="getJsonValue(scope.row.newValue)"
@ -34,12 +35,24 @@ import MsCodeEdit from "metersphere-frontend/src/components/MsCodeEdit";
},
data() {
return {
visible: true
}
},
watch: {
detail() {
this.reload();
}
},
methods: {
getJsonValue(value) {
return JSON.stringify(value);
},
reload() {
this.visible = false;
this.$nextTick(() => {
this.visible = true;
});
},
isObject(value) {
if (value instanceof Object) {
return true;