修改:admin分组(多级控制器)
Signed-off-by: skyselang <215817969@qq.com>
This commit is contained in:
parent
a51850b797
commit
6cc4a039a7
|
@ -1,5 +1,5 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
const url = '/admin/admin.Apidoc/'
|
||||
// ----------------接口文档----------------
|
||||
/**
|
||||
* 接口文档
|
||||
|
@ -7,7 +7,7 @@ import request from '@/utils/request'
|
|||
*/
|
||||
export function apidoc(params) {
|
||||
return request({
|
||||
url: '/admin/AdminApidoc/apidoc',
|
||||
url: url + 'apidoc',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
|
@ -1,5 +1,5 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
const url = '/admin/admin.Index/'
|
||||
// ----------------控制台-----------------
|
||||
/**
|
||||
* 首页
|
||||
|
@ -7,7 +7,7 @@ import request from '@/utils/request'
|
|||
*/
|
||||
export function index(params) {
|
||||
return request({
|
||||
url: '/admin/AdminIndex/index',
|
||||
url: url + 'index',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
|
@ -18,7 +18,18 @@ export function index(params) {
|
|||
*/
|
||||
export function member(params) {
|
||||
return request({
|
||||
url: '/admin/AdminIndex/member',
|
||||
url: url + 'member',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 内容统计
|
||||
* @param {array} params 请求参数
|
||||
*/
|
||||
export function cms(params) {
|
||||
return request({
|
||||
url: url + 'cms',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
|
@ -1,5 +1,5 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
const url = '/admin/admin.Login/'
|
||||
// ----------------登录退出-----------------
|
||||
/**
|
||||
* 验证码
|
||||
|
@ -7,7 +7,7 @@ import request from '@/utils/request'
|
|||
*/
|
||||
export function captcha(params) {
|
||||
return request({
|
||||
url: '/admin/AdminLogin/captcha',
|
||||
url: url + 'captcha',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
|
@ -18,7 +18,7 @@ export function captcha(params) {
|
|||
*/
|
||||
export function login(data) {
|
||||
return request({
|
||||
url: '/admin/AdminLogin/login',
|
||||
url: url + 'login',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
|
@ -29,7 +29,7 @@ export function login(data) {
|
|||
*/
|
||||
export function logout(data) {
|
||||
return request({
|
||||
url: '/admin/AdminLogin/logout',
|
||||
url: url + 'logout',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
|
@ -1,5 +1,5 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
const url = '/admin/admin.Menu/'
|
||||
// ----------------菜单管理----------------
|
||||
/**
|
||||
* 菜单列表
|
||||
|
@ -7,7 +7,7 @@ import request from '@/utils/request'
|
|||
*/
|
||||
export function list(params) {
|
||||
return request({
|
||||
url: '/admin/AdminMenu/list',
|
||||
url: url + 'list',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
|
@ -18,7 +18,7 @@ export function list(params) {
|
|||
*/
|
||||
export function info(params) {
|
||||
return request({
|
||||
url: '/admin/AdminMenu/info',
|
||||
url: url + 'info',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
|
@ -29,7 +29,7 @@ export function info(params) {
|
|||
*/
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: '/admin/AdminMenu/add',
|
||||
url: url + 'add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
|
@ -40,7 +40,7 @@ export function add(data) {
|
|||
*/
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: '/admin/AdminMenu/edit',
|
||||
url: url + 'edit',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
|
@ -51,7 +51,7 @@ export function edit(data) {
|
|||
*/
|
||||
export function dele(data) {
|
||||
return request({
|
||||
url: '/admin/AdminMenu/dele',
|
||||
url: url + 'dele',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
|
@ -62,7 +62,7 @@ export function dele(data) {
|
|||
*/
|
||||
export function disable(data) {
|
||||
return request({
|
||||
url: '/admin/AdminMenu/disable',
|
||||
url: url + 'disable',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
|
@ -73,7 +73,7 @@ export function disable(data) {
|
|||
*/
|
||||
export function unauth(data) {
|
||||
return request({
|
||||
url: '/admin/AdminMenu/unauth',
|
||||
url: url + 'unauth',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
|
@ -84,7 +84,7 @@ export function unauth(data) {
|
|||
*/
|
||||
export function unlogin(data) {
|
||||
return request({
|
||||
url: '/admin/AdminMenu/unlogin',
|
||||
url: url + 'unlogin',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
|
@ -95,7 +95,7 @@ export function unlogin(data) {
|
|||
*/
|
||||
export function role(params) {
|
||||
return request({
|
||||
url: '/admin/AdminMenu/role',
|
||||
url: url + 'role',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
|
@ -106,7 +106,7 @@ export function role(params) {
|
|||
*/
|
||||
export function roleRemove(data) {
|
||||
return request({
|
||||
url: '/admin/AdminMenu/roleRemove',
|
||||
url: url + 'roleRemove',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
|
@ -117,7 +117,7 @@ export function roleRemove(data) {
|
|||
*/
|
||||
export function user(params) {
|
||||
return request({
|
||||
url: '/admin/AdminMenu/user',
|
||||
url: url + 'user',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
|
@ -128,7 +128,7 @@ export function user(params) {
|
|||
*/
|
||||
export function userRemove(data) {
|
||||
return request({
|
||||
url: '/admin/AdminMenu/userRemove',
|
||||
url: url + 'userRemove',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
|
@ -1,5 +1,5 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
const url = '/admin/admin.Role/'
|
||||
// ----------------角色管理----------------
|
||||
/**
|
||||
* 角色列表
|
||||
|
@ -7,7 +7,7 @@ import request from '@/utils/request'
|
|||
*/
|
||||
export function list(params) {
|
||||
return request({
|
||||
url: '/admin/AdminRole/list',
|
||||
url: url + 'list',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
|
@ -18,7 +18,7 @@ export function list(params) {
|
|||
*/
|
||||
export function info(params) {
|
||||
return request({
|
||||
url: '/admin/AdminRole/info',
|
||||
url: url + 'info',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
|
@ -29,7 +29,7 @@ export function info(params) {
|
|||
*/
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: '/admin/AdminRole/add',
|
||||
url: url + 'add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
|
@ -40,7 +40,7 @@ export function add(data) {
|
|||
*/
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: '/admin/AdminRole/edit',
|
||||
url: url + 'edit',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
|
@ -51,7 +51,7 @@ export function edit(data) {
|
|||
*/
|
||||
export function dele(data) {
|
||||
return request({
|
||||
url: '/admin/AdminRole/dele',
|
||||
url: url + 'dele',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
|
@ -62,7 +62,7 @@ export function dele(data) {
|
|||
*/
|
||||
export function disable(data) {
|
||||
return request({
|
||||
url: '/admin/AdminRole/disable',
|
||||
url: url + 'disable',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
|
@ -73,7 +73,7 @@ export function disable(data) {
|
|||
*/
|
||||
export function user(params) {
|
||||
return request({
|
||||
url: '/admin/AdminRole/user',
|
||||
url: url + 'user',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
|
@ -84,7 +84,7 @@ export function user(params) {
|
|||
*/
|
||||
export function userRemove(data) {
|
||||
return request({
|
||||
url: '/admin/AdminRole/userRemove',
|
||||
url: url + 'userRemove',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
|
@ -1,5 +1,5 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
const url = '/admin/admin.Setting/'
|
||||
// ----------------设置管理----------------
|
||||
/**
|
||||
* 缓存设置信息
|
||||
|
@ -7,7 +7,7 @@ import request from '@/utils/request'
|
|||
*/
|
||||
export function cacheInfo(params) {
|
||||
return request({
|
||||
url: '/admin/AdminSetting/cacheInfo',
|
||||
url: url + 'cacheInfo',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
|
@ -18,7 +18,7 @@ export function cacheInfo(params) {
|
|||
*/
|
||||
export function cacheClear(data) {
|
||||
return request({
|
||||
url: '/admin/AdminSetting/cacheClear',
|
||||
url: url + 'cacheClear',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
|
@ -29,7 +29,7 @@ export function cacheClear(data) {
|
|||
*/
|
||||
export function tokenInfo(params) {
|
||||
return request({
|
||||
url: '/admin/AdminSetting/tokenInfo',
|
||||
url: url + 'tokenInfo',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
|
@ -40,7 +40,7 @@ export function tokenInfo(params) {
|
|||
*/
|
||||
export function tokenEdit(data) {
|
||||
return request({
|
||||
url: '/admin/AdminSetting/tokenEdit',
|
||||
url: url + 'tokenEdit',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
|
@ -51,7 +51,7 @@ export function tokenEdit(data) {
|
|||
*/
|
||||
export function captchaInfo(params) {
|
||||
return request({
|
||||
url: '/admin/AdminSetting/captchaInfo',
|
||||
url: url + 'captchaInfo',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
|
@ -62,7 +62,7 @@ export function captchaInfo(params) {
|
|||
*/
|
||||
export function captchaEdit(data) {
|
||||
return request({
|
||||
url: '/admin/AdminSetting/captchaEdit',
|
||||
url: url + 'captchaEdit',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
|
@ -73,7 +73,7 @@ export function captchaEdit(data) {
|
|||
*/
|
||||
export function logInfo(params) {
|
||||
return request({
|
||||
url: '/admin/AdminSetting/logInfo',
|
||||
url: url + 'logInfo',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
|
@ -84,7 +84,7 @@ export function logInfo(params) {
|
|||
*/
|
||||
export function logEdit(data) {
|
||||
return request({
|
||||
url: '/admin/AdminSetting/logEdit',
|
||||
url: url + 'logEdit',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
|
@ -95,7 +95,7 @@ export function logEdit(data) {
|
|||
*/
|
||||
export function apiInfo(params) {
|
||||
return request({
|
||||
url: '/admin/AdminSetting/apiInfo',
|
||||
url: url + 'apiInfo',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
|
@ -106,7 +106,7 @@ export function apiInfo(params) {
|
|||
*/
|
||||
export function apiEdit(data) {
|
||||
return request({
|
||||
url: '/admin/AdminSetting/apiEdit',
|
||||
url: url + 'apiEdit',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
|
@ -1,5 +1,5 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
const url = '/admin/admin.UserCenter/'
|
||||
// ----------------个人中心----------------
|
||||
/**
|
||||
* 我的信息
|
||||
|
@ -7,7 +7,7 @@ import request from '@/utils/request'
|
|||
*/
|
||||
export function info(params) {
|
||||
return request({
|
||||
url: '/admin/AdminUserCenter/info',
|
||||
url: url + 'info',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
|
@ -18,7 +18,7 @@ export function info(params) {
|
|||
*/
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: '/admin/AdminUserCenter/edit',
|
||||
url: url + 'edit',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
|
@ -29,21 +29,16 @@ export function edit(data) {
|
|||
*/
|
||||
export function pwd(data) {
|
||||
return request({
|
||||
url: '/admin/AdminUserCenter/pwd',
|
||||
url: url + 'pwd',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 更换头像
|
||||
* @param {array} data 请求数据
|
||||
*/
|
||||
export function avatar(data) {
|
||||
return request({
|
||||
url: '/admin/AdminUserCenter/avatar',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
export function avatar() {
|
||||
return process.env.VUE_APP_BASE_API + url + 'avatar'
|
||||
}
|
||||
/**
|
||||
* 我的日志
|
||||
|
@ -51,7 +46,7 @@ export function avatar(data) {
|
|||
*/
|
||||
export function log(params) {
|
||||
return request({
|
||||
url: '/admin/AdminUserCenter/log',
|
||||
url: url + 'log',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
|
@ -1,5 +1,5 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
const url = '/admin/admin.UserLog/'
|
||||
// ----------------日志----------------
|
||||
/**
|
||||
* 日志列表
|
||||
|
@ -7,7 +7,7 @@ import request from '@/utils/request'
|
|||
*/
|
||||
export function list(params) {
|
||||
return request({
|
||||
url: '/admin/AdminUserLog/list',
|
||||
url: url + 'list',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
|
@ -18,7 +18,7 @@ export function list(params) {
|
|||
*/
|
||||
export function info(params) {
|
||||
return request({
|
||||
url: '/admin/AdminUserLog/info',
|
||||
url: url + 'info',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
|
@ -29,7 +29,7 @@ export function info(params) {
|
|||
*/
|
||||
export function dele(data) {
|
||||
return request({
|
||||
url: '/admin/AdminUserLog/dele',
|
||||
url: url + 'dele',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
|
@ -40,7 +40,7 @@ export function dele(data) {
|
|||
*/
|
||||
export function clear(data) {
|
||||
return request({
|
||||
url: '/admin/AdminUserLog/clear',
|
||||
url: url + 'clear',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
|
@ -51,7 +51,7 @@ export function clear(data) {
|
|||
*/
|
||||
export function stat(data) {
|
||||
return request({
|
||||
url: '/admin/AdminUserLog/stat',
|
||||
url: url + 'stat',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
|
@ -1,5 +1,5 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
const url = '/admin/admin.User/'
|
||||
// ----------------用户管理----------------
|
||||
/**
|
||||
* 用户列表
|
||||
|
@ -7,7 +7,7 @@ import request from '@/utils/request'
|
|||
*/
|
||||
export function list(params) {
|
||||
return request({
|
||||
url: '/admin/AdminUser/list',
|
||||
url: url + 'list',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
|
@ -18,7 +18,7 @@ export function list(params) {
|
|||
*/
|
||||
export function info(params) {
|
||||
return request({
|
||||
url: '/admin/AdminUser/info',
|
||||
url: url + 'info',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
|
@ -29,7 +29,7 @@ export function info(params) {
|
|||
*/
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: '/admin/AdminUser/add',
|
||||
url: url + 'add',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
|
@ -40,7 +40,7 @@ export function add(data) {
|
|||
*/
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: '/admin/AdminUser/edit',
|
||||
url: url + 'edit',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
|
@ -51,18 +51,24 @@ export function edit(data) {
|
|||
*/
|
||||
export function dele(data) {
|
||||
return request({
|
||||
url: '/admin/AdminUser/dele',
|
||||
url: url + 'dele',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 更换头像
|
||||
*/
|
||||
export function avatar() {
|
||||
return process.env.VUE_APP_BASE_API + url + 'avatar'
|
||||
}
|
||||
/**
|
||||
* 用户重置密码
|
||||
* @param {array} data 请求数据
|
||||
*/
|
||||
export function pwd(data) {
|
||||
return request({
|
||||
url: '/admin/AdminUser/pwd',
|
||||
url: url + 'pwd',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
|
@ -74,13 +80,13 @@ export function pwd(data) {
|
|||
export function rule(data, method = 'get') {
|
||||
if (method === 'post') {
|
||||
return request({
|
||||
url: '/admin/AdminUser/rule',
|
||||
url: url + 'rule',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
} else {
|
||||
return request({
|
||||
url: '/admin/AdminUser/rule',
|
||||
url: url + 'rule',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
|
@ -92,7 +98,7 @@ export function rule(data, method = 'get') {
|
|||
*/
|
||||
export function disable(data) {
|
||||
return request({
|
||||
url: '/admin/AdminUser/disable',
|
||||
url: url + 'disable',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
|
@ -103,7 +109,7 @@ export function disable(data) {
|
|||
*/
|
||||
export function issuper(data) {
|
||||
return request({
|
||||
url: '/admin/AdminUser/super',
|
||||
url: url + 'super',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
|
@ -1,5 +1,5 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
const url = '/admin/admin.Utils/'
|
||||
// ----------------实用工具----------------
|
||||
/**
|
||||
* 随机字符串
|
||||
|
@ -7,7 +7,7 @@ import request from '@/utils/request'
|
|||
*/
|
||||
export function strrand(data) {
|
||||
return request({
|
||||
url: '/admin/AdminUtils/strrand',
|
||||
url: url + 'strrand',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
|
@ -18,7 +18,7 @@ export function strrand(data) {
|
|||
*/
|
||||
export function strtran(data) {
|
||||
return request({
|
||||
url: '/admin/AdminUtils/strtran',
|
||||
url: url + 'strtran',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
|
@ -29,7 +29,7 @@ export function strtran(data) {
|
|||
*/
|
||||
export function timestamp(data) {
|
||||
return request({
|
||||
url: '/admin/AdminUtils/timestamp',
|
||||
url: url + 'timestamp',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
|
@ -40,7 +40,7 @@ export function timestamp(data) {
|
|||
*/
|
||||
export function bytetran(data) {
|
||||
return request({
|
||||
url: '/admin/AdminUtils/bytetran',
|
||||
url: url + 'bytetran',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
|
@ -51,7 +51,7 @@ export function bytetran(data) {
|
|||
*/
|
||||
export function ipinfo(data) {
|
||||
return request({
|
||||
url: '/admin/AdminUtils/ipinfo',
|
||||
url: url + 'ipinfo',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
|
@ -62,7 +62,7 @@ export function ipinfo(data) {
|
|||
*/
|
||||
export function server(params) {
|
||||
return request({
|
||||
url: '/admin/AdminUtils/server',
|
||||
url: url + 'server',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
|
@ -39,7 +39,7 @@
|
|||
</el-dropdown>
|
||||
|
||||
<span style="display:inline-block;float:right;margin-right:10px;color:#409eff">
|
||||
<el-button v-if="checkPermission(['admin/AdminSetting/cacheClear'])" v-loading="loading" icon="el-icon-delete" circle title="清除缓存" @click="clearCache" />
|
||||
<el-button v-if="checkPermission(['admin/admin.Setting/cacheClear'])" v-loading="loading" icon="el-icon-delete" circle title="清除缓存" @click="clearCache" />
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -47,7 +47,7 @@
|
|||
|
||||
<script>
|
||||
import checkPermission from '@/utils/permission' // 权限判断函数
|
||||
import { cacheClear } from '@/api/admin-setting'
|
||||
import { cacheClear } from '@/api/admin/setting'
|
||||
import { mapGetters } from 'vuex'
|
||||
import Breadcrumb from '@/components/Breadcrumb'
|
||||
import Hamburger from '@/components/Hamburger'
|
||||
|
|
|
@ -105,8 +105,8 @@ export const constantRoutes = [
|
|||
*/
|
||||
export const asyncRoutes = [
|
||||
{
|
||||
path: '/members',
|
||||
name: 'Members',
|
||||
path: '/member',
|
||||
name: 'member',
|
||||
meta: {
|
||||
title: '会员管理',
|
||||
icon: 'el-icon-user',
|
||||
|
@ -210,17 +210,17 @@ export const asyncRoutes = [
|
|||
]
|
||||
},
|
||||
{
|
||||
path: '/settings',
|
||||
name: 'Settings',
|
||||
path: '/setting',
|
||||
name: 'setting',
|
||||
meta: {
|
||||
title: '设置管理',
|
||||
icon: 'el-icon-setting',
|
||||
roles: [
|
||||
'admin/Api/list',
|
||||
'admin/Setting/tokenInfo',
|
||||
'admin/Setting/captchaInfo',
|
||||
'admin/Setting/logInfo',
|
||||
'admin/Setting/apiInfo',
|
||||
'admin/Api/list',
|
||||
'admin/SettingWechat/offiInfo',
|
||||
'admin/SettingWechat/miniInfo',
|
||||
'admin/Region/list'
|
||||
|
@ -230,6 +230,16 @@ export const asyncRoutes = [
|
|||
component: Layout,
|
||||
alwaysShow: true,
|
||||
children: [
|
||||
{
|
||||
path: 'api',
|
||||
name: 'Api',
|
||||
meta: {
|
||||
title: '接口管理',
|
||||
icon: 'el-icon-connection',
|
||||
roles: ['admin/Api/list']
|
||||
},
|
||||
component: () => import('@/views/api/api')
|
||||
},
|
||||
{
|
||||
path: 'base',
|
||||
name: 'Base',
|
||||
|
@ -245,16 +255,6 @@ export const asyncRoutes = [
|
|||
},
|
||||
component: () => import('@/views/setting/base')
|
||||
},
|
||||
{
|
||||
path: 'api',
|
||||
name: 'Api',
|
||||
meta: {
|
||||
title: '接口管理',
|
||||
icon: 'el-icon-connection',
|
||||
roles: ['admin/Api/list']
|
||||
},
|
||||
component: () => import('@/views/api/api')
|
||||
},
|
||||
{
|
||||
path: 'wechat',
|
||||
name: 'Wechat',
|
||||
|
@ -280,16 +280,16 @@ export const asyncRoutes = [
|
|||
|
||||
{
|
||||
path: '/admin/rule',
|
||||
name: 'Rule',
|
||||
name: 'AdminRule',
|
||||
meta: {
|
||||
title: '权限管理',
|
||||
icon: 'el-icon-lock',
|
||||
roles: [
|
||||
'admin/AdminMenu/list',
|
||||
'admin/AdminRole/list',
|
||||
'admin/AdminUser/list',
|
||||
'admin/AdminUserLog/list',
|
||||
'admin/AdminUserCenter/info'
|
||||
'admin/admin.Menu/list',
|
||||
'admin/admin.Role/list',
|
||||
'admin/admin.User/list',
|
||||
'admin/admin.UserLog/list',
|
||||
'admin/admin.UserCenter/info'
|
||||
]
|
||||
},
|
||||
redirect: 'noRedirect',
|
||||
|
@ -298,51 +298,51 @@ export const asyncRoutes = [
|
|||
children: [
|
||||
{
|
||||
path: 'menu',
|
||||
name: 'Menu',
|
||||
name: 'AdminMenu',
|
||||
meta: {
|
||||
title: '菜单管理',
|
||||
icon: 'el-icon-menu',
|
||||
roles: ['admin/AdminMenu/list']
|
||||
roles: ['admin/admin.Menu/list']
|
||||
},
|
||||
component: () => import('@/views/admin/menu/menu')
|
||||
},
|
||||
{
|
||||
path: 'role',
|
||||
name: 'Role',
|
||||
name: 'AdminRole',
|
||||
meta: {
|
||||
title: '角色管理',
|
||||
icon: 'el-icon-s-custom',
|
||||
roles: ['admin/AdminRole/list']
|
||||
roles: ['admin/admin.Role/list']
|
||||
},
|
||||
component: () => import('@/views/admin/role/role')
|
||||
},
|
||||
{
|
||||
path: 'user',
|
||||
name: 'User',
|
||||
name: 'AdminUser',
|
||||
meta: {
|
||||
title: '用户管理',
|
||||
icon: 'el-icon-user',
|
||||
roles: ['admin/AdminUser/list']
|
||||
roles: ['admin/admin.User/list']
|
||||
},
|
||||
component: () => import('@/views/admin/user/user')
|
||||
},
|
||||
{
|
||||
path: 'user-log',
|
||||
name: 'UserLog',
|
||||
name: 'AdminUserLog',
|
||||
meta: {
|
||||
title: '日志管理',
|
||||
icon: 'el-icon-notebook-2',
|
||||
roles: ['admin/AdminUserLog/list']
|
||||
roles: ['admin/admin.UserLog/list']
|
||||
},
|
||||
component: () => import('@/views/admin/user/user-log')
|
||||
},
|
||||
{
|
||||
path: 'user-log-stat',
|
||||
name: 'UserLogStat',
|
||||
name: 'AdminUserLogStat',
|
||||
meta: {
|
||||
title: '日志管理统计',
|
||||
icon: 'el-icon-s-data',
|
||||
roles: ['admin/AdminUserLog/stat'],
|
||||
roles: ['admin/admin.UserLog/stat'],
|
||||
activeMenu: '/admin/rule/user-log'
|
||||
},
|
||||
component: () => import('@/views/admin/user/user-log-stat'),
|
||||
|
@ -350,11 +350,11 @@ export const asyncRoutes = [
|
|||
},
|
||||
{
|
||||
path: 'user-center',
|
||||
name: 'UserCenter',
|
||||
name: 'AdminUserCenter',
|
||||
meta: {
|
||||
title: '个人中心',
|
||||
icon: 'el-icon-user-solid',
|
||||
roles: ['admin/AdminUserCenter/info']
|
||||
roles: ['admin/admin.UserCenter/info']
|
||||
},
|
||||
component: () => import('@/views/admin/user/user-center')
|
||||
}
|
||||
|
@ -363,18 +363,18 @@ export const asyncRoutes = [
|
|||
|
||||
{
|
||||
path: '/admin/system',
|
||||
name: 'System',
|
||||
name: 'AdminSystem',
|
||||
meta: {
|
||||
title: '系统管理',
|
||||
icon: 'el-icon-s-tools',
|
||||
roles: [
|
||||
'admin/AdminSetting/cacheInfo',
|
||||
'admin/AdminSetting/tokenInfo',
|
||||
'admin/AdminSetting/captchaInfo',
|
||||
'admin/AdminSetting/logInfo',
|
||||
'admin/AdminSetting/apiInfo',
|
||||
'admin/AdminApidoc/apidoc',
|
||||
'admin/AdminUtils/utils'
|
||||
'admin/admin.Setting/cacheInfo',
|
||||
'admin/admin.Setting/tokenInfo',
|
||||
'admin/admin.Setting/captchaInfo',
|
||||
'admin/admin.Setting/logInfo',
|
||||
'admin/admin.Setting/apiInfo',
|
||||
'admin/admin.Apidoc/apidoc',
|
||||
'admin/admin.Utils/utils'
|
||||
]
|
||||
},
|
||||
redirect: 'noRedirect',
|
||||
|
@ -383,37 +383,37 @@ export const asyncRoutes = [
|
|||
children: [
|
||||
{
|
||||
path: 'setting',
|
||||
name: 'Setting',
|
||||
name: 'AdminSetting',
|
||||
meta: {
|
||||
title: '设置管理',
|
||||
icon: 'el-icon-s-tools',
|
||||
roles: [
|
||||
'admin/AdminSetting/cacheInfo',
|
||||
'admin/AdminSetting/tokenInfo',
|
||||
'admin/AdminSetting/captchaInfo',
|
||||
'admin/AdminSetting/logInfo',
|
||||
'admin/AdminSetting/apiInfo'
|
||||
'admin/admin.Setting/cacheInfo',
|
||||
'admin/admin.Setting/tokenInfo',
|
||||
'admin/admin.Setting/captchaInfo',
|
||||
'admin/admin.Setting/logInfo',
|
||||
'admin/admin.Setting/apiInfo'
|
||||
]
|
||||
},
|
||||
component: () => import('@/views/admin/setting/setting')
|
||||
},
|
||||
{
|
||||
path: 'apidoc',
|
||||
name: 'Apidoc',
|
||||
name: 'AdminApidoc',
|
||||
meta: {
|
||||
title: '接口文档',
|
||||
icon: 'el-icon-document',
|
||||
roles: ['admin/AdminApidoc/apidoc']
|
||||
roles: ['admin/admin.Apidoc/apidoc']
|
||||
},
|
||||
component: () => import('@/views/admin/apidoc/apidoc')
|
||||
},
|
||||
{
|
||||
path: 'utils',
|
||||
name: 'Utils',
|
||||
name: 'AdminUtils',
|
||||
meta: {
|
||||
title: '实用工具',
|
||||
icon: 'el-icon-help',
|
||||
roles: ['admin/AdminUtils/utils']
|
||||
roles: ['admin/admin.Utils/utils']
|
||||
},
|
||||
component: () => import('@/views/admin/utils/utils')
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { login, logout } from '@/api/admin-login'
|
||||
import { info as userInfo } from '@/api/admin-user-center'
|
||||
import { login, logout } from '@/api/admin/login'
|
||||
import { info as userInfo } from '@/api/admin/user-center'
|
||||
import {
|
||||
setAdminToken,
|
||||
getAdminToken,
|
||||
|
@ -74,7 +74,7 @@ const actions = {
|
|||
|
||||
const {
|
||||
nickname,
|
||||
avatar,
|
||||
avatar_url,
|
||||
roles
|
||||
} = data
|
||||
|
||||
|
@ -84,10 +84,10 @@ const actions = {
|
|||
}
|
||||
|
||||
commit('SET_NICKNAME', nickname)
|
||||
commit('SET_AVATAR', avatar)
|
||||
commit('SET_AVATAR', avatar_url)
|
||||
commit('SET_ROLES', roles)
|
||||
setNickname(data.nickname)
|
||||
setAvatar(data.avatar)
|
||||
setAvatar(data.avatar_url)
|
||||
resolve(data)
|
||||
}).catch(error => {
|
||||
reject(error)
|
||||
|
|
|
@ -20,10 +20,10 @@
|
|||
<script>
|
||||
import screenHeight from '@/utils/screen-height'
|
||||
import clip from '@/utils/clipboard'
|
||||
import { apidoc } from '@/api/admin-apidoc'
|
||||
import { apidoc } from '@/api/admin/apidoc'
|
||||
|
||||
export default {
|
||||
name: 'Apidoc',
|
||||
name: 'AdminApidoc',
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
|
|
|
@ -0,0 +1,113 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-card v-loading="loading" class="box-card">
|
||||
<el-row :gutter="10">
|
||||
<el-col :sm="8">
|
||||
<el-card class="box-card" :body-style="cardBodyStyle">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>内容</span>
|
||||
</div>
|
||||
<div class="text">
|
||||
<el-row :gutter="0">
|
||||
<el-col :span="24" class="color-tot" title="总数">
|
||||
{{ count.content }}
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :sm="8">
|
||||
<el-card class="box-card" :body-style="cardBodyStyle">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>分类</span>
|
||||
</div>
|
||||
<div class="text">
|
||||
<el-row :gutter="0">
|
||||
<el-col :span="24" class="color-tot" title="总数">
|
||||
{{ count.category }}
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :sm="8">
|
||||
<el-card class="box-card" :body-style="cardBodyStyle">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>点击量</span>
|
||||
</div>
|
||||
<div class="text">
|
||||
<el-row :gutter="0">
|
||||
<el-col :span="24" class="color-tot" title="总数">
|
||||
{{ count.hits }}
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
|
||||
<back-to-top transition-name="fade" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import screenHeight from '@/utils/screen-height'
|
||||
import BackToTop from '@/components/BackToTop'
|
||||
import { cms } from '@/api/admin/index'
|
||||
|
||||
export default {
|
||||
name: 'Cms',
|
||||
components: { BackToTop },
|
||||
data() {
|
||||
return {
|
||||
height: 680,
|
||||
loading: false,
|
||||
count: {
|
||||
category: '-',
|
||||
content: '-',
|
||||
hits: '-'
|
||||
},
|
||||
cardBodyStyle: {
|
||||
padding: '10px 0px 0px 0px'
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
created() {
|
||||
this.height = screenHeight(180)
|
||||
this.cms()
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
cms() {
|
||||
this.loading = true
|
||||
cms().then(res => {
|
||||
this.count = res.data
|
||||
this.loading = false
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.box-card {
|
||||
text-align: center;
|
||||
}
|
||||
.box-card .text {
|
||||
color: #666;
|
||||
font-size: 20px;
|
||||
line-height: 32px;
|
||||
font-weight: 700;
|
||||
text-align: center;
|
||||
}
|
||||
.el-row {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.color-tot {
|
||||
color: #1890ff;
|
||||
}
|
||||
</style>
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-card v-loading="loadNum" class="box-card">
|
||||
<el-card v-loading="loading" class="box-card">
|
||||
<el-row :gutter="10">
|
||||
<el-col :sm="4">
|
||||
<el-card class="box-card" :body-style="cardBodyStyle">
|
||||
|
@ -119,8 +119,6 @@
|
|||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<el-card v-loading="loadDate" class="box-card">
|
||||
<el-row :gutter="0">
|
||||
<el-col :sm="24">
|
||||
<el-date-picker
|
||||
|
@ -161,7 +159,7 @@ echarts.use([LegendComponent, TitleComponent, TooltipComponent, GridComponent, L
|
|||
|
||||
import screenHeight from '@/utils/screen-height'
|
||||
import BackToTop from '@/components/BackToTop'
|
||||
import { member } from '@/api/index'
|
||||
import { member } from '@/api/admin/index'
|
||||
|
||||
export default {
|
||||
name: 'Member',
|
||||
|
@ -169,9 +167,7 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
height: 680,
|
||||
loadNum: false,
|
||||
loadDate: false,
|
||||
loadRegion: false,
|
||||
loading: false,
|
||||
number: {
|
||||
total: '-',
|
||||
today: '-',
|
||||
|
@ -218,7 +214,7 @@ export default {
|
|||
mounted() {},
|
||||
methods: {
|
||||
member() {
|
||||
this.loadNum = true
|
||||
this.loading = true
|
||||
member().then(res => {
|
||||
this.number = res.data.number
|
||||
this.active = res.data.active
|
||||
|
@ -226,21 +222,21 @@ export default {
|
|||
this.date_act = res.data.date_act
|
||||
this.region = res.data.region
|
||||
this.echartDate(res.data.date_new, res.data.date_act)
|
||||
this.loadNum = false
|
||||
this.loading = false
|
||||
}).catch(() => {
|
||||
this.loadNum = false
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
echartDateChange() {
|
||||
this.loadDate = true
|
||||
this.loading = true
|
||||
member({
|
||||
type: 'date',
|
||||
date: this.date_new.date
|
||||
}).then(res => {
|
||||
this.echartDate(res.data.date_new, res.data.date_act)
|
||||
this.loadDate = false
|
||||
this.loading = false
|
||||
}).catch(() => {
|
||||
this.loadDate = false
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
echartDate(date_new, date_act) {
|
||||
|
|
|
@ -2,7 +2,10 @@
|
|||
<div class="app-container">
|
||||
<el-row :gutter="0">
|
||||
<el-col :span="24">
|
||||
<member v-if="checkPermission(['admin/AdminIndex/member'])" />
|
||||
<member v-if="checkPermission(['admin/admin.Index/member'])" />
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<cms v-if="checkPermission(['admin/admin.Index/cms'])" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
|
@ -11,10 +14,11 @@
|
|||
<script>
|
||||
import checkPermission from '@/utils/permission' // 权限判断函数
|
||||
import Member from './components/Member'
|
||||
import Cms from './components/Cms'
|
||||
|
||||
export default {
|
||||
name: 'Index',
|
||||
components: { Member },
|
||||
name: 'Dashboard',
|
||||
components: { Member, Cms },
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
|
|
|
@ -25,10 +25,10 @@
|
|||
|
||||
<script>
|
||||
import setting from '@/settings'
|
||||
import { captcha } from '@/api/admin-login'
|
||||
import { captcha } from '@/api/admin/login'
|
||||
|
||||
export default {
|
||||
name: 'Login',
|
||||
name: 'AdminLogin',
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
<script>
|
||||
export default {
|
||||
name: 'Logout',
|
||||
name: 'AdminLogout',
|
||||
components: {},
|
||||
data() {
|
||||
return { loading: true }
|
||||
|
|
|
@ -175,10 +175,10 @@
|
|||
import screenHeight from '@/utils/screen-height'
|
||||
import Pagination from '@/components/Pagination'
|
||||
import permission from '@/directive/permission/index.js' // 权限判断指令
|
||||
import { list, info, add, edit, dele, disable, unauth, unlogin, role, roleRemove, user, userRemove } from '@/api/admin-menu'
|
||||
import { list, info, add, edit, dele, disable, unauth, unlogin, role, roleRemove, user, userRemove } from '@/api/admin/menu'
|
||||
|
||||
export default {
|
||||
name: 'Menu',
|
||||
name: 'AdminMenu',
|
||||
components: { Pagination },
|
||||
directives: { permission },
|
||||
data() {
|
||||
|
|
|
@ -115,11 +115,11 @@
|
|||
<script>
|
||||
import screenHeight from '@/utils/screen-height'
|
||||
import Pagination from '@/components/Pagination'
|
||||
import { list as menuTree } from '@/api/admin-menu'
|
||||
import { list, info, add, edit, dele, disable, user, userRemove } from '@/api/admin-role'
|
||||
import { list as menuTree } from '@/api/admin/menu'
|
||||
import { list, info, add, edit, dele, disable, user, userRemove } from '@/api/admin/role'
|
||||
|
||||
export default {
|
||||
name: 'Role',
|
||||
name: 'AdminRole',
|
||||
components: { Pagination },
|
||||
data() {
|
||||
return {
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { apiInfo, apiEdit } from '@/api/admin-setting'
|
||||
import { apiInfo, apiEdit } from '@/api/admin/setting'
|
||||
|
||||
export default {
|
||||
name: 'Api',
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { cacheInfo, cacheClear } from '@/api/admin-setting'
|
||||
import { cacheInfo, cacheClear } from '@/api/admin/setting'
|
||||
|
||||
export default {
|
||||
name: 'Cache',
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { captchaInfo, captchaEdit } from '@/api/admin-setting'
|
||||
import { captchaInfo, captchaEdit } from '@/api/admin/setting'
|
||||
|
||||
export default {
|
||||
name: 'Captcha',
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { logInfo, logEdit } from '@/api/admin-setting'
|
||||
import { logInfo, logEdit } from '@/api/admin/setting'
|
||||
|
||||
export default {
|
||||
name: 'Log',
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { tokenInfo, tokenEdit } from '@/api/admin-setting'
|
||||
import { tokenInfo, tokenEdit } from '@/api/admin/setting'
|
||||
|
||||
export default {
|
||||
name: 'Token',
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-tabs>
|
||||
<el-tab-pane v-if="checkPermission(['admin/AdminSetting/cacheInfo'])" label="缓存设置" lazy>
|
||||
<el-tab-pane v-if="checkPermission(['admin/admin.Setting/cacheInfo'])" label="缓存设置" lazy>
|
||||
<Cache />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane v-if="checkPermission(['admin/AdminSetting/tokenInfo'])" label="Token设置" lazy>
|
||||
<el-tab-pane v-if="checkPermission(['admin/admin.Setting/tokenInfo'])" label="Token设置" lazy>
|
||||
<Token />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane v-if="checkPermission(['admin/AdminSetting/captchaInfo'])" label="验证码设置" lazy>
|
||||
<el-tab-pane v-if="checkPermission(['admin/admin.Setting/captchaInfo'])" label="验证码设置" lazy>
|
||||
<Captcha />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane v-if="checkPermission(['admin/AdminSetting/logInfo'])" label="日志设置" lazy>
|
||||
<el-tab-pane v-if="checkPermission(['admin/admin.Setting/logInfo'])" label="日志设置" lazy>
|
||||
<Log />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane v-if="checkPermission(['admin/AdminSetting/apiInfo'])" label="接口设置" lazy>
|
||||
<el-tab-pane v-if="checkPermission(['admin/admin.Setting/apiInfo'])" label="接口设置" lazy>
|
||||
<Api />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
|
@ -30,7 +30,7 @@ import Log from './components/Log'
|
|||
import Api from './components/Api'
|
||||
|
||||
export default {
|
||||
name: 'Setting',
|
||||
name: 'AdminSetting',
|
||||
directives: { permission },
|
||||
components: { Cache, Token, Captcha, Log, Api },
|
||||
data() {
|
||||
|
|
|
@ -1,71 +0,0 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-card v-loading="loading" class="box-card">
|
||||
<el-row :gutter="0">
|
||||
<el-col :xs="24" :sm="12">
|
||||
<el-form ref="ref" label-width="100px">
|
||||
<el-form-item label="头像">
|
||||
<el-avatar v-if="avatar" shape="circle" fit="contain" :size="100" :src="avatar" />
|
||||
</el-form-item>
|
||||
<el-form-item label="">
|
||||
<div>jpg、png图片,小于100kb,宽高1:1</div>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-upload
|
||||
name="avatar_file"
|
||||
:show-file-list="false"
|
||||
:before-upload="uploadBefore"
|
||||
:action="uploadAction"
|
||||
:headers="uploadHeaders"
|
||||
:on-success="uploadSuccess"
|
||||
:on-error="uploadError"
|
||||
>
|
||||
<el-button type="primary">更换</el-button>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAdminToken } from '@/utils/auth'
|
||||
import { mapGetters } from 'vuex'
|
||||
import store from '@/store'
|
||||
|
||||
export default {
|
||||
name: 'UserCenterAvatar',
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
uploadAction: process.env.VUE_APP_BASE_API + '/admin/AdminUserCenter/avatar',
|
||||
uploadHeaders: { AdminToken: getAdminToken() }
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['avatar'])
|
||||
},
|
||||
methods: {
|
||||
uploadBefore(file) {
|
||||
this.loading = true
|
||||
},
|
||||
uploadSuccess(res, file) {
|
||||
if (res.code === 200) {
|
||||
store.commit('user/SET_AVATAR', res.data.avatar)
|
||||
this.loading = false
|
||||
this.$message.success(res.msg)
|
||||
} else {
|
||||
this.loading = false
|
||||
this.$message.error(res.msg)
|
||||
}
|
||||
},
|
||||
uploadError(file) {
|
||||
this.loading = false
|
||||
this.$message.error('上传出错')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -4,6 +4,25 @@
|
|||
<el-row :gutter="0">
|
||||
<el-col :xs="24" :sm="12">
|
||||
<el-form ref="ref" :rules="rules" :model="model" label-width="100px">
|
||||
<el-form-item label="头像" prop="avatar">
|
||||
<el-col :span="10">
|
||||
<el-avatar shape="circle" fit="contain" :size="100" :src="model.avatar_url" />
|
||||
</el-col>
|
||||
<el-col :span="14">
|
||||
<el-upload
|
||||
name="file"
|
||||
:show-file-list="false"
|
||||
:action="uploadAction"
|
||||
:headers="uploadHeaders"
|
||||
:data="uploadData"
|
||||
:on-success="uploadSuccess"
|
||||
:on-error="uploadError"
|
||||
>
|
||||
<el-button size="mini">上传头像</el-button>
|
||||
</el-upload>
|
||||
<span>jpg、png图片,小于100kb,宽高1:1</span>
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
<el-form-item label="账号" prop="username">
|
||||
<el-input v-model="model.username" placeholder="请输入账号" clearable />
|
||||
</el-form-item>
|
||||
|
@ -28,7 +47,8 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { info, edit } from '@/api/admin-user-center'
|
||||
import { getAdminToken } from '@/utils/auth'
|
||||
import { info, edit, avatar } from '@/api/admin/user-center'
|
||||
import store from '@/store'
|
||||
|
||||
export default {
|
||||
|
@ -38,11 +58,16 @@ export default {
|
|||
return {
|
||||
loading: false,
|
||||
model: {
|
||||
avatar: '',
|
||||
avatar_url: '',
|
||||
username: '',
|
||||
nickname: '',
|
||||
phone: '',
|
||||
email: ''
|
||||
},
|
||||
uploadAction: avatar(),
|
||||
uploadHeaders: { AdminToken: getAdminToken() },
|
||||
uploadData: { type: 'image' },
|
||||
rules: {
|
||||
username: [{ required: true, message: '请输入账号', trigger: 'blur' }],
|
||||
nickname: [{ required: true, message: '请输入昵称', trigger: 'blur' }]
|
||||
|
@ -59,6 +84,8 @@ export default {
|
|||
}).then(res => {
|
||||
this.$refs['ref'].resetFields()
|
||||
this.model = res.data
|
||||
store.commit('user/SET_AVATAR', res.data.avatar_url)
|
||||
store.commit('user/SET_NICKNAME', res.data.nickname)
|
||||
})
|
||||
},
|
||||
submit() {
|
||||
|
@ -67,8 +94,6 @@ export default {
|
|||
this.loading = true
|
||||
edit(this.model).then(res => {
|
||||
this.refresh()
|
||||
store.commit('user/SET_NICKNAME', res.data.nickname)
|
||||
store.commit('user/SET_USERNAME', res.data.username)
|
||||
this.loading = false
|
||||
this.$message.success(res.msg)
|
||||
}).catch(() => {
|
||||
|
@ -81,6 +106,19 @@ export default {
|
|||
this.loading = true
|
||||
this.info()
|
||||
this.loading = false
|
||||
},
|
||||
// 上传头像
|
||||
uploadSuccess(res) {
|
||||
if (res.code === 200) {
|
||||
this.model.avatar_url = res.data.url
|
||||
this.model.avatar = res.data.path
|
||||
this.$message.success(res.msg)
|
||||
} else {
|
||||
this.$message.error(res.msg)
|
||||
}
|
||||
},
|
||||
uploadError(res) {
|
||||
this.$message.error(res.msg || '上传出错')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
<el-row :gutter="0">
|
||||
<el-col :xs="24" :sm="12">
|
||||
<el-form ref="ref" :rules="rules" :model="model" class="dialog-body" label-width="100px">
|
||||
<el-form-item v-if="model.admin_user_id && model.avatar" label="头像">
|
||||
<el-avatar shape="circle" fit="contain" :size="100" :src="model.avatar" />
|
||||
<el-form-item label="头像">
|
||||
<el-avatar shape="circle" fit="contain" :size="100" :src="model.avatar_url" />
|
||||
</el-form-item>
|
||||
<el-form-item label="账号" prop="username">
|
||||
<el-input v-model="model.username" placeholder="请输入账号" clearable />
|
||||
|
@ -45,7 +45,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { info } from '@/api/admin-user-center'
|
||||
import { info } from '@/api/admin/user-center'
|
||||
|
||||
export default {
|
||||
name: 'UserCenterInfo',
|
||||
|
@ -54,6 +54,8 @@ export default {
|
|||
return {
|
||||
loading: false,
|
||||
model: {
|
||||
avatar: '',
|
||||
avatar_url: '',
|
||||
username: '',
|
||||
nickname: '',
|
||||
phone: '',
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
<script>
|
||||
import screenHeight from '@/utils/screen-height'
|
||||
import Pagination from '@/components/Pagination'
|
||||
import { log } from '@/api/admin-user-center'
|
||||
import { log } from '@/api/admin/user-center'
|
||||
|
||||
export default {
|
||||
name: 'UserCenterLog',
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { pwd } from '@/api/admin-user-center'
|
||||
import { pwd } from '@/api/admin/user-center'
|
||||
|
||||
export default {
|
||||
name: 'UserCenterPwd',
|
||||
|
|
|
@ -1,22 +1,19 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-tabs v-model="actTabName" @tab-click="tabClick">
|
||||
<el-tab-pane v-if="checkPermission(['admin/AdminUserCenter/info'])" label="我的信息" name="info">
|
||||
<el-tab-pane v-if="checkPermission(['admin/admin.UserCenter/info'])" label="我的信息" name="info">
|
||||
<user-center-info v-if="info" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane v-if="checkPermission(['admin/AdminUserCenter/edit'])" label="修改信息" name="edit">
|
||||
<el-tab-pane v-if="checkPermission(['admin/admin.UserCenter/edit'])" label="修改信息" name="edit">
|
||||
<user-center-edit v-if="edit" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane v-if="checkPermission(['admin/AdminUserCenter/pwd'])" label="修改密码" name="pwd">
|
||||
<el-tab-pane v-if="checkPermission(['admin/admin.UserCenter/pwd'])" label="修改密码" name="pwd">
|
||||
<user-center-pwd v-if="pwd" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane v-if="checkPermission(['admin/AdminUserCenter/avatar'])" label="更换头像" name="avatar">
|
||||
<user-center-avatar v-if="avatar" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane v-if="checkPermission(['admin/AdminUserCenter/log'])" label="我的日志" name="log">
|
||||
<el-tab-pane v-if="checkPermission(['admin/admin.UserCenter/log'])" label="我的日志" name="log">
|
||||
<user-center-log v-if="log" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane v-if="checkPermission(['admin/AdminUserCenter/setting'])" label="我的设置" name="setting">
|
||||
<el-tab-pane v-if="checkPermission(['admin/admin.UserCenter/setting'])" label="我的设置" name="setting">
|
||||
<user-center-setting v-if="setting" />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
|
@ -28,13 +25,12 @@ import checkPermission from '@/utils/permission' // 权限判断函数
|
|||
import UserCenterInfo from './components/UserCenterInfo'
|
||||
import UserCenterEdit from './components/UserCenterEdit'
|
||||
import UserCenterPwd from './components/UserCenterPwd'
|
||||
import UserCenterAvatar from './components/UserCenterAvatar'
|
||||
import UserCenterLog from './components/UserCenterLog'
|
||||
import UserCenterSetting from './components/UserCenterSetting'
|
||||
|
||||
export default {
|
||||
name: 'UserCenter',
|
||||
components: { UserCenterInfo, UserCenterEdit, UserCenterPwd, UserCenterAvatar, UserCenterLog, UserCenterSetting },
|
||||
name: 'AdminUserCenter',
|
||||
components: { UserCenterInfo, UserCenterEdit, UserCenterPwd, UserCenterLog, UserCenterSetting },
|
||||
data() {
|
||||
return {
|
||||
info: true,
|
||||
|
|
|
@ -146,10 +146,10 @@ echarts.use([LegendComponent, TitleComponent, TooltipComponent, GridComponent, L
|
|||
|
||||
import screenHeight from '@/utils/screen-height'
|
||||
import BackToTop from '@/components/BackToTop'
|
||||
import { stat } from '@/api/admin-user-log'
|
||||
import { stat } from '@/api/admin/user-log'
|
||||
|
||||
export default {
|
||||
name: 'UserLogStat',
|
||||
name: 'AdminUserLogStat',
|
||||
components: { BackToTop },
|
||||
data() {
|
||||
return {
|
||||
|
|
|
@ -26,8 +26,8 @@
|
|||
<el-button class="filter-item" @click="refresh()">刷新</el-button>
|
||||
</el-col>
|
||||
<el-col :xs="24" :sm="3" style="text-align:right;">
|
||||
<el-button v-permission="['admin/AdminUserLog/clear']" class="filter-item" title="日志清除" @click="clear()">清除</el-button>
|
||||
<el-button v-permission="['admin/AdminUserLog/stat']" class="filter-item" type="primary" title="日志管理统计" @click="stat">统计</el-button>
|
||||
<el-button v-permission="['admin/admin.UserLog/clear']" class="filter-item" title="日志清除" @click="clear()">清除</el-button>
|
||||
<el-button v-permission="['admin/admin.UserLog/stat']" class="filter-item" type="primary" title="日志管理统计" @click="stat">统计</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
|
@ -160,10 +160,10 @@
|
|||
import screenHeight from '@/utils/screen-height'
|
||||
import Pagination from '@/components/Pagination'
|
||||
import permission from '@/directive/permission/index.js' // 权限判断指令
|
||||
import { list, info, dele, clear } from '@/api/admin-user-log'
|
||||
import { list, info, dele, clear } from '@/api/admin/user-log'
|
||||
|
||||
export default {
|
||||
name: 'UserLog',
|
||||
name: 'AdminUserLog',
|
||||
components: { Pagination },
|
||||
directives: { permission },
|
||||
data() {
|
||||
|
|
|
@ -49,16 +49,14 @@
|
|||
<!-- 添加、修改 -->
|
||||
<el-dialog :title="dialogTitle" :visible.sync="dialog" top="1vh" width="50%" :before-close="cancel">
|
||||
<el-form ref="ref" :model="model" :rules="rules" class="dialog-body" label-width="100px" :style="{height:height+'px'}">
|
||||
<el-form-item v-if="model.admin_user_id && model.avatar" label="头像" prop="avatar">
|
||||
<el-form-item label="头像" prop="avatar">
|
||||
<el-col :span="10">
|
||||
<el-avatar shape="circle" fit="contain" :size="100" :src="model.avatar" />
|
||||
<el-avatar shape="circle" fit="contain" :size="100" :src="model.avatar_url" />
|
||||
</el-col>
|
||||
<el-col class="line" :span="4" style="text-align:center" />
|
||||
<el-col :span="10">
|
||||
<el-col :span="14">
|
||||
<el-upload
|
||||
name="avatar_file"
|
||||
name="file"
|
||||
:show-file-list="false"
|
||||
:before-upload="uploadBefore"
|
||||
:action="uploadAction"
|
||||
:headers="uploadHeaders"
|
||||
:data="uploadData"
|
||||
|
@ -201,10 +199,10 @@
|
|||
import screenHeight from '@/utils/screen-height'
|
||||
import Pagination from '@/components/Pagination'
|
||||
import { getAdminToken } from '@/utils/auth'
|
||||
import { list, info, add, edit, dele, issuper, disable, rule, pwd } from '@/api/admin-user'
|
||||
import { list, info, add, edit, dele, avatar, issuper, disable, rule, pwd } from '@/api/admin/user'
|
||||
|
||||
export default {
|
||||
name: 'User',
|
||||
name: 'AdminUser',
|
||||
components: { Pagination },
|
||||
data() {
|
||||
return {
|
||||
|
@ -219,6 +217,8 @@ export default {
|
|||
dialog: false,
|
||||
dialogTitle: '',
|
||||
model: {
|
||||
avatar: '',
|
||||
avatar_url: '',
|
||||
admin_user_id: '',
|
||||
admin_role_ids: [],
|
||||
admin_menu_ids: [],
|
||||
|
@ -237,9 +237,9 @@ export default {
|
|||
create_time: '',
|
||||
update_time: ''
|
||||
},
|
||||
uploadAction: process.env.VUE_APP_BASE_API + '/admin/AdminUser/avatar',
|
||||
uploadAction: avatar(),
|
||||
uploadHeaders: { AdminToken: getAdminToken() },
|
||||
uploadData: { admin_user_id: '' },
|
||||
uploadData: { type: 'image' },
|
||||
ruleDialog: false,
|
||||
roleData: [],
|
||||
menuTree: [],
|
||||
|
@ -369,20 +369,18 @@ export default {
|
|||
this.list()
|
||||
}
|
||||
},
|
||||
// 更换头像
|
||||
uploadBefore() {
|
||||
this.uploadData.admin_user_id = this.model.admin_user_id
|
||||
},
|
||||
// 上传头像
|
||||
uploadSuccess(res) {
|
||||
if (res.code === 200) {
|
||||
this.model.avatar = res.data.avatar
|
||||
this.model.avatar_url = res.data.url
|
||||
this.model.avatar = res.data.path
|
||||
this.$message.success(res.msg)
|
||||
} else {
|
||||
this.$message.error(res.msg)
|
||||
}
|
||||
},
|
||||
uploadError() {
|
||||
this.$message.error('上传出错!')
|
||||
uploadError(res) {
|
||||
this.$message.error(res.msg || '上传出错')
|
||||
},
|
||||
// 是否超管
|
||||
isSuper(row) {
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
|
||||
<script>
|
||||
import clip from '@/utils/clipboard'
|
||||
import { bytetran } from '@/api/admin-utils'
|
||||
import { bytetran } from '@/api/admin/utils'
|
||||
|
||||
export default {
|
||||
name: 'Byte',
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
|
||||
<script>
|
||||
import clip from '@/utils/clipboard'
|
||||
import { ipinfo } from '@/api/admin-utils'
|
||||
import { ipinfo } from '@/api/admin/utils'
|
||||
|
||||
export default {
|
||||
name: 'Ip',
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
<template>
|
||||
<el-tabs v-model="actTabName" @tab-click="tabClick">
|
||||
<el-tab-pane v-if="checkPermission(['admin/AdminUtils/mapAmap'])" label="高德地图" name="MapAmap">
|
||||
<el-tab-pane v-if="checkPermission(['admin/admin.Utils/mapAmap'])" label="高德地图" name="MapAmap">
|
||||
<map-amap v-if="MapAmap" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane v-if="checkPermission(['admin/AdminUtils/mapBaidu'])" label="百度地图" name="MapBaidu">
|
||||
<el-tab-pane v-if="checkPermission(['admin/admin.Utils/mapBaidu'])" label="百度地图" name="MapBaidu">
|
||||
<map-baidu v-if="MapBaidu" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane v-if="checkPermission(['admin/AdminUtils/mapSogou'])" label="搜狗地图" name="MapSogou">
|
||||
<el-tab-pane v-if="checkPermission(['admin/admin.Utils/mapSogou'])" label="搜狗地图" name="MapSogou">
|
||||
<map-sogou v-if="MapSogou" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane v-if="checkPermission(['admin/AdminUtils/mapTencent'])" label="腾讯地图" name="MapTencent">
|
||||
<el-tab-pane v-if="checkPermission(['admin/admin.Utils/mapTencent'])" label="腾讯地图" name="MapTencent">
|
||||
<map-tencent v-if="MapTencent" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane v-if="checkPermission(['admin/AdminUtils/mapBeidou'])" label="北斗" name="MapBeidou">
|
||||
<el-tab-pane v-if="checkPermission(['admin/admin.Utils/mapBeidou'])" label="北斗" name="MapBeidou">
|
||||
<map-beidou v-if="MapBeidou" />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
|
|
|
@ -142,7 +142,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { server } from '@/api/admin-utils'
|
||||
import { server } from '@/api/admin/utils'
|
||||
|
||||
export default {
|
||||
name: 'Server',
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
|
||||
<script>
|
||||
import clip from '@/utils/clipboard'
|
||||
import { strrand } from '@/api/admin-utils'
|
||||
import { strrand } from '@/api/admin/utils'
|
||||
|
||||
export default {
|
||||
name: 'Strrand',
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
|
||||
<script>
|
||||
import clip from '@/utils/clipboard'
|
||||
import { strtran } from '@/api/admin-utils'
|
||||
import { strtran } from '@/api/admin/utils'
|
||||
|
||||
export default {
|
||||
name: 'Strtran',
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
<script>
|
||||
import clip from '@/utils/clipboard'
|
||||
import { timestamp } from '@/api/admin-utils'
|
||||
import { timestamp } from '@/api/admin/utils'
|
||||
|
||||
export default {
|
||||
name: 'Timestamp',
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-tabs v-model="actTabName" @tab-click="tabClick">
|
||||
<el-tab-pane v-if="checkPermission(['admin/AdminUtils/strrand','admin/AdminUtils/strtran'])" label="字符串" name="str">
|
||||
<el-tab-pane v-if="checkPermission(['admin/admin.Utils/strrand','admin/admin.Utils/strtran'])" label="字符串" name="str">
|
||||
<el-row :gutter="8">
|
||||
<el-col v-permission="['admin/AdminUtils/strrand']" :sm="24" :md="12">
|
||||
<el-col v-permission="['admin/admin.Utils/strrand']" :sm="24" :md="12">
|
||||
<div class=" filter-container">
|
||||
<Strrand v-if="str" />
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col v-permission="['admin/AdminUtils/strtran']" :sm="24" :md="12">
|
||||
<el-col v-permission="['admin/admin.Utils/strtran']" :sm="24" :md="12">
|
||||
<div class="filter-container">
|
||||
<Strtran v-if="str" />
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane v-if="checkPermission(['admin/AdminUtils/timestamp'])" label="时间戳" name="timestamp">
|
||||
<el-tab-pane v-if="checkPermission(['admin/admin.Utils/timestamp'])" label="时间戳" name="timestamp">
|
||||
<el-row :gutter="8">
|
||||
<el-col :sm="24" :md="12">
|
||||
<div class="filter-container">
|
||||
|
@ -24,7 +24,7 @@
|
|||
</el-col>
|
||||
</el-row>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane v-if="checkPermission(['admin/AdminUtils/qrcode'])" label="二维码" name="qrcode">
|
||||
<el-tab-pane v-if="checkPermission(['admin/admin.Utils/qrcode'])" label="二维码" name="qrcode">
|
||||
<el-row :gutter="8">
|
||||
<el-col :sm="24" :md="12">
|
||||
<div class="filter-container">
|
||||
|
@ -33,7 +33,7 @@
|
|||
</el-col>
|
||||
</el-row>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane v-if="checkPermission(['admin/AdminUtils/bytetran'])" label="字节" name="byte">
|
||||
<el-tab-pane v-if="checkPermission(['admin/admin.Utils/bytetran'])" label="字节" name="byte">
|
||||
<el-row :gutter="8">
|
||||
<el-col :sm="24" :md="12">
|
||||
<div class="filter-container">
|
||||
|
@ -42,7 +42,7 @@
|
|||
</el-col>
|
||||
</el-row>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane v-if="checkPermission(['admin/AdminUtils/ipinfo'])" label="IP" name="ip">
|
||||
<el-tab-pane v-if="checkPermission(['admin/admin.Utils/ipinfo'])" label="IP" name="ip">
|
||||
<el-row :gutter="8">
|
||||
<el-col :sm="24" :md="12">
|
||||
<div class="filter-container">
|
||||
|
@ -51,7 +51,7 @@
|
|||
</el-col>
|
||||
</el-row>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane v-if="checkPermission(['admin/AdminUtils/map'])" label="地图" name="map">
|
||||
<el-tab-pane v-if="checkPermission(['admin/admin.Utils/map'])" label="地图" name="map">
|
||||
<el-row :gutter="8">
|
||||
<el-col :sm="24" :md="24">
|
||||
<div class="filter-container">
|
||||
|
@ -60,7 +60,7 @@
|
|||
</el-col>
|
||||
</el-row>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane v-if="checkPermission(['admin/AdminUtils/server'])" label="服务器" name="server">
|
||||
<el-tab-pane v-if="checkPermission(['admin/admin.Utils/server'])" label="服务器" name="server">
|
||||
<el-row :gutter="8" class="dialog-body" :style="{height:height+60+'px'}">
|
||||
<el-col :sm="24" :md="24">
|
||||
<div class="filter-container">
|
||||
|
@ -69,7 +69,7 @@
|
|||
</el-col>
|
||||
</el-row>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane v-if="checkPermission(['admin/AdminUtils/toollu'])" label="在线工具" name="toollu">
|
||||
<el-tab-pane v-if="checkPermission(['admin/admin.Utils/toollu'])" label="在线工具" name="toollu">
|
||||
<el-row :gutter="8" class="dialog-body" :style="{height:height+60+'px'}">
|
||||
<el-col :sm="24" :md="24">
|
||||
<div class="filter-container">
|
||||
|
@ -97,7 +97,7 @@ import Server from './components/Server'
|
|||
import Toollu from './components/Toollu'
|
||||
|
||||
export default {
|
||||
name: 'Utils',
|
||||
name: 'AdminUtils',
|
||||
directives: { permission },
|
||||
components: { Strtran, Strrand, Timestamp, Qrcode, Byte, Ip, Map, Server, Toollu },
|
||||
data() {
|
||||
|
|
|
@ -161,6 +161,7 @@ export default {
|
|||
this.loading = true
|
||||
list(this.query).then(res => {
|
||||
this.data = res.data.list
|
||||
this.isExpandAll = false
|
||||
this.loading = false
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
|
@ -187,7 +188,6 @@ export default {
|
|||
},
|
||||
// 刷新
|
||||
refresh() {
|
||||
this.isExpandAll = false
|
||||
this.list()
|
||||
},
|
||||
// 添加
|
||||
|
@ -311,7 +311,6 @@ export default {
|
|||
},
|
||||
// 上传图片
|
||||
uploadSuccess(res, file, fileList) {
|
||||
console.log(res)
|
||||
if (res.code === 200) {
|
||||
this.model.imgs.push(res.data)
|
||||
this.$message.success(res.msg)
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
style="width:100%"
|
||||
clearable
|
||||
filterable
|
||||
placeholder="一级"
|
||||
placeholder="一级地区"
|
||||
@change="pidChange"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { logInfo, logEdit } from '@/api/admin-setting'
|
||||
import { logInfo, logEdit } from '@/api/setting'
|
||||
|
||||
export default {
|
||||
name: 'Log',
|
||||
|
|
Loading…
Reference in New Issue