Merge pull request #2874 from jumpserver/pr@dev@perf_log_diff_performence

perf: 修改活动记录详情中的表现
This commit is contained in:
老广
2023-03-08 10:39:11 +08:00
committed by GitHub
2 changed files with 20 additions and 6 deletions

View File

@@ -13,8 +13,7 @@
<div v-else>
<el-table
:data="diff"
height="500"
style="width: 100%"
class="diffTable"
>
<el-table-column
:label="$tc('audits.ChangeField')"
@@ -66,7 +65,7 @@ export default {
},
data() {
return {
diff: '',
diff: [],
detailVisible: false
}
},
@@ -84,7 +83,7 @@ export default {
</script>
<style scoped>
<style lang='scss' scoped>
.el-tag {
width: 100%;
white-space: normal;
@@ -94,4 +93,13 @@ export default {
.el-table::before {
background-color: inherit;
}
.diffTable {
width: 100%;
max-height: 80vh;
& >>> td {
padding: 5px 0 !important;
}
}
</style>

View File

@@ -13,7 +13,11 @@
placement="bottom"
>
{{ activity.content }}
<el-link v-if="activity.detail_url" type="primary" @click.native="onClick(activity.r_type, activity.detail_url)">
<el-link
v-if="activity['detail_url']"
type="primary"
@click.native="onClick(activity)"
>
{{ $tc('common.Detail') }}
</el-link>
</el-timeline-item>
@@ -66,7 +70,9 @@ export default {
}
})
},
onClick(type, taskUrl) {
onClick(activity) {
const type = activity['r_type']
const taskUrl = activity['detail_url']
if (type === 'O') {
this.$axios.get(taskUrl).then(
res => {