Commit 0053138f authored by 水落(YangLei)'s avatar 水落(YangLei)

feat: 操作日志页面完成

parent 90a0dc8d
......@@ -51,11 +51,11 @@
placement="right"
:visible="addVisible"
@close="addDrawerClose"
v-if="addBtn"
:maskClosable="!!addBtn.maskClosable"
v-if="$slots.drawer"
:maskClosable="addBtn && !!addBtn.maskClosable"
:drawerStyle="drawerStyle"
:bodyStyle="bodyStyle"
:width="addBtn.width || 600"
:width="(addBtn && addBtn.width) || 600"
destroyOnClose
>
<div class="tw-overflow-y-hidden">
......
<template>
<div class="footer">
<div class="links">
<a target="_blank" :key="index" :href="item.link ? item.link : 'javascript: void(0)'" v-for="(item, index) in linkList">
<a-icon v-if="item.icon" :type="item.icon" />{{item.name}}
</a>
</div>
<div class="copyright">
Copyright
<a-icon type="copyright" />{{copyright}}
</div>
</div>
</template>
<script>
export default {
name: 'LayoutCopyrightFooter',
props: ['copyright', 'linkList'],
};
</script>
<style lang="less" scoped>
.footer {
padding: 48px 16px 24px;
/*margin: 48px 0 24px;*/
text-align: center;
.copyright {
color: @text-color-second;
font-size: 14px;
i {
margin: 0 4px;
}
}
.links {
margin-bottom: 8px;
a:not(:last-child) {
margin-right: 40px;
}
a {
color: @text-color-second;
-webkit-transition: all 0.3s;
transition: all 0.3s;
}
}
}
</style>
<template>
<a-dropdown>
<div class="tw-inline-flex tw-cursor-pointer tw-items-center">
<a-avatar
class="tw-mr-3"
size="small"
shape="circle"
:src="`${$fileUrl}${userInfo.userAvatar}`"
/>
<a-avatar class="tw-mr-3" size="small" shape="circle" :src="userAvatar" />
<span>{{ userInfo.userName }}</span>
</div>
<a-menu style="width: 150px" slot="overlay">
......@@ -33,7 +28,9 @@ export default {
i18n: layoutTopHeaderI18n,
computed: {
...mapState(['userInfo']),
userAvatar() {
return this.userInfo.userAvatar ? `${this.$fileUrl}${this.userInfo.userAvatar}` : null;
},
profile() {
return this.$t('profile');
},
......
......@@ -52,16 +52,12 @@
<slot></slot>
</div>
</a-layout-content>
<a-layout-footer style="padding: 0px">
<layout-copyright-footer :link-list="footerLinks" :copyright="copyright" />
</a-layout-footer>
</a-layout>
</a-layout>
</template>
<script>
import LayoutTopHeader from '../components/header/LayoutTopHeader';
import LayoutCopyrightFooter from '../components/footer/LayoutCopyrightFooter';
import Drawer from '@/components/tool/Drawer';
import SideMenu from '@/components/menu/SideMenu';
import Setting from '../components/setting/Setting';
......@@ -71,7 +67,7 @@ import { mapState, mapMutations, mapGetters } from 'vuex';
export default {
name: 'AdminLayout',
components: { Setting, SideMenu, Drawer, LayoutCopyrightFooter, LayoutTopHeader },
components: { Setting, SideMenu, Drawer, LayoutTopHeader },
data() {
return {
minHeight: window.innerHeight - 64 - 122,
......@@ -204,9 +200,7 @@ export default {
}
}
.admin-layout-content {
padding: 24px 24px 0;
/*overflow-x: hidden;*/
/*min-height: calc(100vh - 64px - 122px);*/
padding: 24px;
}
.setting {
background-color: @primary-color;
......
......@@ -3,17 +3,14 @@
<div class="content">
<slot></slot>
</div>
<layout-copyright-footer :link-list="footerLinks" :copyright="copyright"></layout-copyright-footer>
</div>
</template>
<script>
import LayoutCopyrightFooter from '../components/footer/LayoutCopyrightFooter';
import { mapState } from 'vuex';
export default {
name: 'CommonLayout',
components: { LayoutCopyrightFooter },
computed: {
...mapState('settingModule', ['footerLinks', 'copyright']),
},
......
<template>
<h1>Log Management</h1>
</template>
\ No newline at end of file
import LogManagement from './LogManagement';
export default LogManagement;
\ No newline at end of file
<template>
<h1>Form</h1>
</template>
<template>
<pre>{{ data.operateContent }}</pre>
</template>
<script>
export default {
props: ['data'],
};
</script>
<template>
<my-table url="/api/v1/logger/operation" rowKey="logId" ref="table">
<template #drawer>
<Form :data="currentClickRow" />
</template>
<template #search="{query}">
<my-form-item label="开始时间">
<a-date-picker
class="tw-w-full"
show-time
v-model="query.startTime"
valueFormat="YYYY-MM-DD HH:mm:ss"
/>
</my-form-item>
<my-form-item label="结束时间">
<a-date-picker
class="tw-w-full"
show-time
v-model="query.endTime"
valueFormat="YYYY-MM-DD HH:mm:ss"
/>
</my-form-item>
<my-form-item label="登录用户">
<a-input v-model="query.userId" />
</my-form-item>
<my-form-item label="业务模块">
<a-select v-model="query.loginType" allowClear>
<a-select-option value="LOGIN">登录系统</a-select-option>
<a-select-option value="LOGOUT">退出系统</a-select-option>
</a-select>
</my-form-item>
<my-form-item label="操作服务">
<a-select v-model="query.isSuccess" allowClear>
<a-select-option value="0">失败</a-select-option>
<a-select-option value="1">成功</a-select-option>
</a-select>
</my-form-item>
</template>
<a-table-column title="用户Id" data-index="operatorId" />
<a-table-column title="用户名称" data-index="operatorName" />
<a-table-column title="业务模块" data-index="moduleCode" />
<a-table-column title="操作服务" data-index="serviceCode" />
<a-table-column title="操作时间" data-index="operateTime" />
<a-table-column title="操作">
<template #default="row">
<a @click="() => view(row)">详情</a>
</template>
</a-table-column>
</my-table>
</template>
<script>
import Form from './form.vue';
export default {
components: { Form },
data() {
return {
currentClickRow: {},
};
},
methods: {
refreshTable() {
this.$refs.table.getData();
},
showDrawer(type, noFooter) {
this.$refs['table'].show({ type, noFooter });
},
view(row) {
this.currentClickRow = row;
this.showDrawer(2, true);
},
},
};
</script>
......@@ -25,7 +25,7 @@
<img
style="width: 100px;height: 100px"
class="tw-max-w-full tw-max-h-full tw-rounded-full tw-my-4"
:src="`${$fileUrl}${form.userAvatar}`"
:src="userAvatar"
/>
<my-upload v-model="form.userAvatar" />
</div>
......@@ -50,6 +50,9 @@ export default {
loginId() {
return this.$store.state.userInfo.loginId;
},
userAvatar() {
return this.form.userAvatar ? `${this.$fileUrl}${this.form.userAvatar}` : null;
},
},
watch: {
'$store.state.userInfo'(userInfo) {
......
// 视图组件
const view = {
tabs: () => import('@/pages/frame/view/template/TabsTemplateView'),
......@@ -20,20 +19,20 @@ const routerMap = {
component: view.tabs,
},
exp403: {
authority: "*",
name: "403错误",
path: "403",
component: () => import("@/pages/frame/view/exception/403"),
authority: '*',
name: '403错误',
path: '403',
component: () => import('@/pages/frame/view/exception/403'),
},
exp404: {
name: "404错误",
path: "404",
component: () => import("@/pages/frame/view/exception/404"),
name: '404错误',
path: '404',
component: () => import('@/pages/frame/view/exception/404'),
},
exp500: {
name: "500错误",
path: "500",
component: () => import("@/pages/frame/view/exception/500"),
name: '500错误',
path: '500',
component: () => import('@/pages/frame/view/exception/500'),
},
dashboard: {
name: 'Dashboard',
......@@ -72,9 +71,5 @@ const routerMap = {
name: '参数管理',
component: () => import('@/pages/system/view/parameter'),
},
log_management: {
name: '日志管理',
component: () => import('@/pages/system/view/log'),
},
};
export default routerMap;
......@@ -122,6 +122,11 @@ const options = {
name: '登录日志',
component: () => import('@/pages/system/view/log/login_log/index.vue'),
},
{
path: 'operation_log',
name: '操作日志',
component: () => import('@/pages/system/view/log/operation/index.vue'),
},
],
},
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment