管理员列表优化,权限优化

This commit is contained in:
张乐
2020-08-26 11:58:57 +08:00
parent 8841766011
commit bff836d52e
10 changed files with 32 additions and 22 deletions

View File

@@ -27,7 +27,7 @@ export function delRole(pram) {
export function getInfo(pram) {
const data = {
id: pram.id
ids: pram.id
}
return request({
url: '/admin/system/role/info',

View File

@@ -1,7 +1,7 @@
import request from '@/utils/request'
export function getRoleById(pram) {
const data = { id: pram.id }
const data = { ids: pram.roles }
return request({
url: '/admin/system/role/info',
method: 'GET',

View File

@@ -66,7 +66,6 @@
handleSetVisitChart() {
this.myChart = echarts.init(document.getElementById(this.echarts))
let option = null
console.log(this.echartsTitle)
if (this.echartsTitle === 'circle') {
option = {
tooltip: {

View File

@@ -79,13 +79,12 @@ const actions = {
reject('getInfo: roles must be a non-null array!')
}
// commit('SET_ROLES', roles)
commit('SET_ROLES', ['admin'])
commit('SET_ROLES', roles)
// commit('SET_ROLES', ['admin'])
commit('SET_NAME', account)
// commit('SET_AVATAR', avatar)
commit('SET_AVATAR', 'http://kaifa.crmeb.net/system/images/admin_logo.png')
commit('SET_INTRODUCTION', 'CRMEB admin')
data.roles = 'admin'
resolve(data)
}).catch(error => {
reject(error)

View File

@@ -12,16 +12,6 @@
/>
</el-select>
</el-form-item>
<el-form-item>
<el-select v-model="listPram.isDel" placeholder="删除状态" clearable class="selWidth">
<el-option
v-for="item in constants.deletedOrNormal"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-select v-model="listPram.status" placeholder="状态" clearable class="selWidth">
<el-option
@@ -59,7 +49,7 @@
</el-table-column>
<el-table-column label="最后登录时间" prop="lastTime" min-width="180">
<template slot-scope="scope">
<span>{{ scope.row.updateTime | filterEmpty }}</span>
<span>{{ scope.row.lastTime | filterEmpty }}</span>
</template>
</el-table-column>
<el-table-column label="最后登录IP" prop="lastIp" min-width="150">
@@ -129,7 +119,6 @@ export default {
listPram: {
account: null,
addTime: null,
isDel: null, // false=正常true=已删除,数据库逻辑删除
lastIp: null,
lastTime: null,
level: null,