Commit 1ed4c475 by wangyalan-git

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

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