perf: 优化 operate log

This commit is contained in:
ibuler
2023-02-01 12:12:26 +08:00
parent 4e04675dfe
commit 3212d90436
2 changed files with 18 additions and 13 deletions

View File

@@ -5,18 +5,19 @@
:header-actions="headerActions"
:table-config="tableConfig"
/>
<el-dialog
<Dialog
v-if="logDetailVisible"
:title="this.$tc('route.OperateLog')"
:visible.sync="logDetailVisible"
width="80%"
>
<OperateLogDetail :row="rowObj" />
</el-dialog>
</Dialog>
</div>
</template>
<script>
import GenericListPage from '@/layout/components/GenericListPage'
import { Dialog } from '@/components'
import { getDaysAgo, getDaysFuture } from '@/utils/common'
import OperateLogDetail from './components/OperateLogDetail'
import { ActionsFormatter } from '@/components/TableFormatters'
@@ -24,7 +25,8 @@ import { ActionsFormatter } from '@/components/TableFormatters'
export default {
components: {
GenericListPage,
OperateLogDetail
OperateLogDetail,
Dialog
},
data() {
const vm = this

View File

@@ -6,23 +6,23 @@
<div v-else>
<el-table
:data="row.diff"
style="width: 100%"
height="500"
style="width: 100%"
>
<el-table-column
prop="field"
:label="this.$tc('audits.ChangeField')"
prop="field"
show-overflow-tooltip
width="100"
show-overflow-tooltip
/>
<el-table-column
prop="before"
:label="this.$tc('audits.BeforeChange')"
prop="before"
show-overflow-tooltip
/>
<el-table-column
prop="after"
:label="this.$tc('audits.AfterChange')"
prop="after"
show-overflow-tooltip
/>
</el-table>
@@ -40,7 +40,6 @@ export default {
default: () => ({})
}
},
data() {},
methods: {
isEmpty() {
const content = this.row.diff
@@ -52,9 +51,13 @@ export default {
</script>
<style scoped>
.el-tag{
.el-tag {
width: 100%;
white-space: normal;
height:auto;
}
height: auto;
}
.el-table::before {
background-color: inherit;
}
</style>