dockerfiles/anylink/web/src/pages/set/Audit.vue

62 lines
1.5 KiB
Vue
Raw Normal View History

2021-08-26 23:09:52 +08:00
<template>
<div>
2023-04-26 22:17:10 +08:00
<el-card>
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="用户活动日志" name="act_log">
<AuditActLog ref="auditActLog"></AuditActLog>
</el-tab-pane>
<el-tab-pane label="用户访问日志" name="access_audit">
<AuditAccess ref="auditAccess"></AuditAccess>
</el-tab-pane>
</el-tabs>
</el-card>
2021-08-26 23:09:52 +08:00
</div>
</template>
<script>
2023-04-26 22:17:10 +08:00
import AuditAccess from "../../components/audit/Access";
import AuditActLog from "../../components/audit/ActLog";
2021-08-26 23:09:52 +08:00
export default {
name: "Audit",
2023-04-26 22:17:10 +08:00
components:{
AuditAccess,
AuditActLog
},
2021-08-26 23:09:52 +08:00
mixins: [],
2023-04-26 22:17:10 +08:00
mounted() {
this.upTab();
},
2021-08-26 23:09:52 +08:00
created() {
this.$emit('update:route_path', this.$route.path)
2023-04-26 22:17:10 +08:00
this.$emit('update:route_name', ['基础信息', '审计日志'])
2021-08-26 23:09:52 +08:00
},
data() {
return {
2023-04-26 22:17:10 +08:00
activeName: "act_log",
2021-08-26 23:09:52 +08:00
}
},
2023-04-26 22:17:10 +08:00
methods: {
upTab() {
var tabname = this.$route.query.tabname
if (tabname) {
this.activeName = tabname
2022-11-10 15:53:48 +08:00
}
2023-04-26 22:17:10 +08:00
this.handleClick(this.activeName)
2022-11-10 15:53:48 +08:00
},
2023-04-26 22:17:10 +08:00
handleClick() {
switch (this.activeName) {
case "access_audit":
this.$refs.auditAccess.setSearchData()
this.$refs.auditAccess.getData(1)
break
case "act_log":
this.$refs.auditActLog.getData(1)
break
2022-11-10 15:53:48 +08:00
}
2023-04-26 22:17:10 +08:00
this.$router.push({path: this.$route.path, query: {tabname: this.activeName}})
},
}
2021-08-26 23:09:52 +08:00
}
</script>