Commit 9b58ab4c authored by 陈浩玮's avatar 陈浩玮

Merge branch 'master' of...

Merge branch 'master' of http://platform.kuopu.net:9999/gitlab/product/kim3-web-vue/starter-web-vue into feature/chw
parents 3cea87e9 f2ddf640
import Table from './table/index.vue'; import Table from './table/index.vue';
import WhiteCard from './white_card/index.vue'; import WhiteCard from './white_card/index.vue';
import Upload from './upload/index.vue'; import Upload from './upload/index.vue';
import MyFormItem from './table/my_item.vue';
export { Table, WhiteCard, Upload }; export { Table, WhiteCard, Upload, MyFormItem };
...@@ -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> <template>
<a-col v-bind="span"> <a-col v-bind="span">
<a-form-model-item v-bind="layout"> <a-form-model-item v-bind="layout">
<slot /> <slot class="tw-w-full" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
</template> </template>
...@@ -16,6 +16,3 @@ export default { ...@@ -16,6 +16,3 @@ export default {
}, },
}; };
</script> </script>
<style>
</style>
\ No newline at end of file
...@@ -68,6 +68,8 @@ loadGuards(guards, { router, store, i18n, message: Vue.prototype.$message }); ...@@ -68,6 +68,8 @@ loadGuards(guards, { router, store, i18n, message: Vue.prototype.$message });
loadResponseInterceptor({ router }); loadResponseInterceptor({ router });
Vue.prototype.$fileUrl = 'http://platform.kuopu.net:9300/';
new Vue({ new Vue({
router, router,
store, store,
......
<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 class="tw-mr-3" size="small" shape="circle" :src="userInfo.userAvatar" /> <a-avatar class="tw-mr-3" size="small" shape="circle" :src="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">
...@@ -28,7 +28,9 @@ export default { ...@@ -28,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> <template>
<my-table url="/api/v1/logger/login" rowKey="logId" ref="table"> <my-table url="/api/v1/logger/login" rowKey="logId" ref="table">
<template #search="{query}"> <template #search="{query}">
<a-form-model-item label="开始时间"> <my-form-item label="开始时间">
<a-date-picker show-time v-model="query.startTime" valueFormat="YYYY-MM-DD HH:mm:ss" /> <a-date-picker
</a-form-model-item> class="tw-w-full"
<a-form-model-item label="结束时间"> show-time
<a-date-picker show-time v-model="query.endTime" valueFormat="YYYY-MM-DD HH:mm:ss" /> v-model="query.startTime"
</a-form-model-item> valueFormat="YYYY-MM-DD HH:mm:ss"
<a-form-model-item label="登录用户"> />
</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" /> <a-input v-model="query.userId" />
</a-form-model-item> </my-form-item>
<a-form-model-item label="登录IP"> <my-form-item label="登录IP">
<a-input v-model="query.loginIp" /> <a-input v-model="query.loginIp" />
</a-form-model-item> </my-form-item>
<a-form-model-item label="事件类型"> <my-form-item label="事件类型">
<a-select v-model="query.loginType" style="width: 170px" allowClear> <a-select v-model="query.loginType" allowClear>
<a-select-option value="LOGIN">登录系统</a-select-option> <a-select-option value="LOGIN">登录系统</a-select-option>
<a-select-option value="LOGOUT">退出系统</a-select-option> <a-select-option value="LOGOUT">退出系统</a-select-option>
</a-select> </a-select>
</a-form-model-item> </my-form-item>
<a-form-model-item label="事件状态"> <my-form-item label="事件状态">
<a-select v-model="query.isSuccess" style="width: 170px" allowClear> <a-select v-model="query.isSuccess" allowClear>
<a-select-option value="0">失败</a-select-option> <a-select-option value="0">失败</a-select-option>
<a-select-option value="1">成功</a-select-option> <a-select-option value="1">成功</a-select-option>
</a-select> </a-select>
</a-form-model-item> </my-form-item>
</template> </template>
<a-table-column title="用户Id" data-index="userId" /> <a-table-column title="用户Id" data-index="userId" />
<a-table-column title="登录用户" data-index="userName" /> <a-table-column title="登录用户" data-index="userName" />
......
<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>
...@@ -4,12 +4,12 @@ ...@@ -4,12 +4,12 @@
<Form ref="form" /> <Form ref="form" />
</template> </template>
<template #search="{ query }"> <template #search="{ query }">
<MyFormModelItem label="归属部门"> <my-form-item label="归属部门">
<OrganizationTree v-model="query.orgId" /> <OrganizationTree v-model="query.orgId" />
</MyFormModelItem> </my-form-item>
<MyFormModelItem label="账号"> <my-form-item label="账号">
<a-input placeholder="Basic usage" v-model="query.loginId" /> <a-input placeholder="Basic usage" v-model="query.loginId" />
</MyFormModelItem> </my-form-item>
</template> </template>
<a-table-column title="账号" data-index="loginId" /> <a-table-column title="账号" data-index="loginId" />
...@@ -31,10 +31,10 @@ ...@@ -31,10 +31,10 @@
<script> <script>
import Form from './form.vue'; import Form from './form.vue';
import PopconfirmDelete from '@/components/popconfirm_delete/index.vue'; import PopconfirmDelete from '@/components/popconfirm_delete/index.vue';
import MyFormModelItem from '@/components/table/my_item.vue';
import OrganizationTree from '../components/OrganizationTree.vue'; import OrganizationTree from '../components/OrganizationTree.vue';
export default { export default {
components: { Form, PopconfirmDelete, OrganizationTree, MyFormModelItem }, components: { Form, PopconfirmDelete, OrganizationTree },
data() { data() {
return { return {
addBtn: { width: 600, onOk: () => this.$refs['form']?.submit() }, addBtn: { width: 600, onOk: () => this.$refs['form']?.submit() },
......
...@@ -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="`//${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) {
......
import VueI18nPlugin from './vueI18nPlugin'; import VueI18nPlugin from './vueI18nPlugin';
import AuthorityPlugin from './authorityPlugin'; import AuthorityPlugin from './authorityPlugin';
import TabsPagePlugin from './tabsPagePlugin'; import TabsPagePlugin from './tabsPagePlugin';
import { Table, WhiteCard, Upload } from '@/components'; import { Table, WhiteCard, Upload, MyFormItem } from '@/components';
const Plugins = { const Plugins = {
install: function(Vue) { install: function(Vue) {
...@@ -11,6 +11,7 @@ const Plugins = { ...@@ -11,6 +11,7 @@ const Plugins = {
Vue.component('my-table', Table); Vue.component('my-table', Table);
Vue.component('my-card', WhiteCard); Vue.component('my-card', WhiteCard);
Vue.component('my-upload', Upload); Vue.component('my-upload', Upload);
Vue.component('my-form-item', MyFormItem);
}, },
}; };
export default Plugins; export default Plugins;
...@@ -54,11 +54,6 @@ const routerMap = { ...@@ -54,11 +54,6 @@ const routerMap = {
name: '菜单管理', name: '菜单管理',
component: () => import('@/pages/system/view/menu'), component: () => import('@/pages/system/view/menu'),
}, },
// organization_management: {
// name: '组织管理',
// component: () => import('@/pages/system/view/organization'),
// },
user_management: { user_management: {
name: '用户管理', name: '用户管理',
component: () => import('@/pages/system/view/user'), component: () => import('@/pages/system/view/user'),
...@@ -67,13 +62,10 @@ const routerMap = { ...@@ -67,13 +62,10 @@ const routerMap = {
name: '角色管理', name: '角色管理',
component: () => import('@/pages/system/view/role'), component: () => import('@/pages/system/view/role'),
}, },
// parameter_management: {
// name: '参数管理', // log_management: {
// component: () => import('@/pages/system/view/parameter'), // name: '日志管理',
// component: () => import('@/pages/system/view/log'),
// }, // },
log_management: {
name: '日志管理',
component: () => import('@/pages/system/view/log'),
},
}; };
export default routerMap; export default routerMap;
...@@ -130,6 +130,11 @@ const options = { ...@@ -130,6 +130,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