Commit 1ed4c475 by wangyalan-git

操作日志,用户列表,管理员列表

parent b1d8cc7a
......@@ -16,3 +16,11 @@ export function editSetting(data) {
data
})
}
// 万科后台_操作日志分页操作
export function getLogList(params) {
return request({
url: 'vankeBackLog/list',
method: 'get',
params
})
}
......@@ -3,14 +3,6 @@
*/
import request from '@/utils/request'
// 管理员列表查询
export function getAdminList(params) {
return request({
url: 'manage/queryPageList',
method: 'get',
params
})
}
// 万科后台_用户分页操作
export function getMemberList(params) {
......
......@@ -81,21 +81,21 @@ const permission = {
const { username } = data
const accessedRouters = asyncRouterMap.filter(v => {
// admin帐号直接返回所有菜单
if (username === 'admin') return true
// if (hasPermission(menus, v)) {
// if (v.children && v.children.length > 0) {
// v.children = v.children.filter(child => {
// if (hasPermission(menus, child)) {
// return child
// }
// return false
// })
// return v
// } else {
// return v
// }
// }
// return false
// if (username === 'admin') return true
if (hasPermission(menus, v)) {
if (v.children && v.children.length > 0) {
v.children = v.children.filter(child => {
if (hasPermission(menus, child)) {
return child
}
return false
})
return v
} else {
return v
}
}
return false
})
//对菜单进行排序
sortRouters(accessedRouters)
......
......@@ -10,7 +10,8 @@
trigger="click">
<div class="avatar-wrapper">
<img class="user-avatar"
:src="avatar">
:src="avatar || defaultIcon">
<i class="el-icon-caret-bottom"></i>
</div>
<el-dropdown-menu class="user-dropdown"
......@@ -47,6 +48,11 @@ export default {
PersonalInfo,
ChangeTel
},
data(){
return {
defaultIcon: require('@/assets/images/head@2x.png')
}
},
computed: {
...mapGetters([
'sidebar',
......
......@@ -38,16 +38,16 @@
border>
<el-table-column label="操作人"
align="center"
prop="adminName">
prop="name">
</el-table-column>
<el-table-column label="操作内容"
align="center"
prop="content">
prop="msg">
</el-table-column>
<el-table-column label="操作时间"
align="center"
prop="module">
<template slot-scope="scope">{{scope.row.createTime | formatTime}}</template>
<template slot-scope="scope">{{scope.row.createtime | formatTime}}</template>
</el-table-column>
</el-table>
</div>
......@@ -66,7 +66,7 @@
</el-card>
</template>
<script>
import { logRequest } from '@/api/login'
import { getLogList } from '@/api/setting'
import moment from 'moment/moment'
const defaultListQuery = {
pageNum: 1,
......@@ -93,7 +93,7 @@ export default {
if (name) {
this.listQuery.name = name
}
this.logRequest()
this.getLogList()
},
methods: {
//时间戳转化时间
......@@ -115,28 +115,28 @@ export default {
// 条件查询
handleSearchList() {
this.listQuery.pageNum = 1
this.logRequest()
this.getLogList()
},
//表单重置
handleResetSearch() {
this.listQuery = Object.assign({}, defaultListQuery)
his.logRequest()
his.getLogList()
},
// 每页页数变化
handleSizeChange(val) {
this.listQuery.pageNum = 1
this.listQuery.pageSize = val
this.logRequest()
this.getLogList()
},
//当前页变化
handleCurrentChange(val) {
this.listQuery.pageNum = val
this.logRequest()
this.getLogList()
},
// 日志
logRequest() {
getLogList() {
this.listLoading = true
logRequest(this.listQuery).then(response => {
getLogList(this.listQuery).then(response => {
this.listLoading = false
this.list = response.data.list
this.total = response.data.total
......
......@@ -89,16 +89,14 @@
</template>
<script>
import moment from 'moment'
import { getAdminList, cancleAdmin } from '@/api/user'
import { getMemberList, cancleAdmin } from '@/api/user'
import AddDepot from './modules/AddAdmin'
// 列表查询参数默认值
const defaultListQuery = {
pageNum: 1,
pageSize: 10,
name: '',
condition: 0,
roleId: '',
departId: ''
accountType: 0
}
export default {
......@@ -153,7 +151,7 @@ export default {
getList() {
this.listLoading = true
//请求数据
getAdminList(this.listQuery).then(res => {
getMemberList(this.listQuery).then(res => {
this.listLoading = false
this.list = res.data.list
this.total = res.data.total
......
......@@ -109,7 +109,8 @@ const defaultListQuery = {
pageNum: 1,
pageSize: 10,
name: null,
departId: null
departId: null,
accountType: 1
}
export default {
......
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