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