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

feat: 操作日志页面完成

parent 90a0dc8d
...@@ -51,11 +51,11 @@ ...@@ -51,11 +51,11 @@
placement="right" placement="right"
:visible="addVisible" :visible="addVisible"
@close="addDrawerClose" @close="addDrawerClose"
v-if="addBtn" v-if="$slots.drawer"
:maskClosable="!!addBtn.maskClosable" :maskClosable="addBtn && !!addBtn.maskClosable"
:drawerStyle="drawerStyle" :drawerStyle="drawerStyle"
:bodyStyle="bodyStyle" :bodyStyle="bodyStyle"
:width="addBtn.width || 600" :width="(addBtn && addBtn.width) || 600"
destroyOnClose destroyOnClose
> >
<div class="tw-overflow-y-hidden"> <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> <template>
<a-dropdown> <a-dropdown>
<div class="tw-inline-flex tw-cursor-pointer tw-items-center"> <div class="tw-inline-flex tw-cursor-pointer tw-items-center">
<a-avatar <a-avatar class="tw-mr-3" size="small" shape="circle" :src="userAvatar" />
class="tw-mr-3"
size="small"
shape="circle"
:src="`${$fileUrl}${userInfo.userAvatar}`"
/>
<span>{{ userInfo.userName }}</span> <span>{{ userInfo.userName }}</span>
</div> </div>
<a-menu style="width: 150px" slot="overlay"> <a-menu style="width: 150px" slot="overlay">
...@@ -33,7 +28,9 @@ export default { ...@@ -33,7 +28,9 @@ export default {
i18n: layoutTopHeaderI18n, i18n: layoutTopHeaderI18n,
computed: { computed: {
...mapState(['userInfo']), ...mapState(['userInfo']),
userAvatar() {
return this.userInfo.userAvatar ? `${this.$fileUrl}${this.userInfo.userAvatar}` : null;
},
profile() { profile() {
return this.$t('profile'); return this.$t('profile');
}, },
......
...@@ -52,16 +52,12 @@ ...@@ -52,16 +52,12 @@
<slot></slot> <slot></slot>
</div> </div>
</a-layout-content> </a-layout-content>
<a-layout-footer style="padding: 0px">
<layout-copyright-footer :link-list="footerLinks" :copyright="copyright" />
</a-layout-footer>
</a-layout> </a-layout>
</a-layout> </a-layout>
</template> </template>
<script> <script>
import LayoutTopHeader from '../components/header/LayoutTopHeader'; import LayoutTopHeader from '../components/header/LayoutTopHeader';
import LayoutCopyrightFooter from '../components/footer/LayoutCopyrightFooter';
import Drawer from '@/components/tool/Drawer'; import Drawer from '@/components/tool/Drawer';
import SideMenu from '@/components/menu/SideMenu'; import SideMenu from '@/components/menu/SideMenu';
import Setting from '../components/setting/Setting'; import Setting from '../components/setting/Setting';
...@@ -71,7 +67,7 @@ import { mapState, mapMutations, mapGetters } from 'vuex'; ...@@ -71,7 +67,7 @@ import { mapState, mapMutations, mapGetters } from 'vuex';
export default { export default {
name: 'AdminLayout', name: 'AdminLayout',
components: { Setting, SideMenu, Drawer, LayoutCopyrightFooter, LayoutTopHeader }, components: { Setting, SideMenu, Drawer, LayoutTopHeader },
data() { data() {
return { return {
minHeight: window.innerHeight - 64 - 122, minHeight: window.innerHeight - 64 - 122,
...@@ -204,9 +200,7 @@ export default { ...@@ -204,9 +200,7 @@ export default {
} }
} }
.admin-layout-content { .admin-layout-content {
padding: 24px 24px 0; padding: 24px;
/*overflow-x: hidden;*/
/*min-height: calc(100vh - 64px - 122px);*/
} }
.setting { .setting {
background-color: @primary-color; background-color: @primary-color;
......
...@@ -3,17 +3,14 @@ ...@@ -3,17 +3,14 @@
<div class="content"> <div class="content">
<slot></slot> <slot></slot>
</div> </div>
<layout-copyright-footer :link-list="footerLinks" :copyright="copyright"></layout-copyright-footer>
</div> </div>
</template> </template>
<script> <script>
import LayoutCopyrightFooter from '../components/footer/LayoutCopyrightFooter';
import { mapState } from 'vuex'; import { mapState } from 'vuex';
export default { export default {
name: 'CommonLayout', name: 'CommonLayout',
components: { LayoutCopyrightFooter },
computed: { computed: {
...mapState('settingModule', ['footerLinks', 'copyright']), ...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 @@ ...@@ -25,7 +25,7 @@
<img <img
style="width: 100px;height: 100px" style="width: 100px;height: 100px"
class="tw-max-w-full tw-max-h-full tw-rounded-full tw-my-4" 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" /> <my-upload v-model="form.userAvatar" />
</div> </div>
...@@ -50,6 +50,9 @@ export default { ...@@ -50,6 +50,9 @@ export default {
loginId() { loginId() {
return this.$store.state.userInfo.loginId; return this.$store.state.userInfo.loginId;
}, },
userAvatar() {
return this.form.userAvatar ? `${this.$fileUrl}${this.form.userAvatar}` : null;
},
}, },
watch: { watch: {
'$store.state.userInfo'(userInfo) { '$store.state.userInfo'(userInfo) {
......
// 视图组件 // 视图组件
const view = { const view = {
tabs: () => import('@/pages/frame/view/template/TabsTemplateView'), tabs: () => import('@/pages/frame/view/template/TabsTemplateView'),
...@@ -20,20 +19,20 @@ const routerMap = { ...@@ -20,20 +19,20 @@ const routerMap = {
component: view.tabs, component: view.tabs,
}, },
exp403: { exp403: {
authority: "*", authority: '*',
name: "403错误", name: '403错误',
path: "403", path: '403',
component: () => import("@/pages/frame/view/exception/403"), component: () => import('@/pages/frame/view/exception/403'),
}, },
exp404: { exp404: {
name: "404错误", name: '404错误',
path: "404", path: '404',
component: () => import("@/pages/frame/view/exception/404"), component: () => import('@/pages/frame/view/exception/404'),
}, },
exp500: { exp500: {
name: "500错误", name: '500错误',
path: "500", path: '500',
component: () => import("@/pages/frame/view/exception/500"), component: () => import('@/pages/frame/view/exception/500'),
}, },
dashboard: { dashboard: {
name: 'Dashboard', name: 'Dashboard',
...@@ -72,9 +71,5 @@ const routerMap = { ...@@ -72,9 +71,5 @@ const routerMap = {
name: '参数管理', name: '参数管理',
component: () => import('@/pages/system/view/parameter'), component: () => import('@/pages/system/view/parameter'),
}, },
log_management: {
name: '日志管理',
component: () => import('@/pages/system/view/log'),
},
}; };
export default routerMap; export default routerMap;
...@@ -122,6 +122,11 @@ const options = { ...@@ -122,6 +122,11 @@ const options = {
name: '登录日志', name: '登录日志',
component: () => import('@/pages/system/view/log/login_log/index.vue'), 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