优化代码

This commit is contained in:
smallchill 2019-02-22 21:52:18 +08:00
parent 3c1a8972f9
commit 9a7ddce149
18 changed files with 70 additions and 70 deletions

View File

@ -2,7 +2,7 @@ import request from '@/router/axios';
export const getList = (current, size, params) => { export const getList = (current, size, params) => {
return request({ return request({
url: 'api/blade-desk/notice/list', url: '/api/blade-desk/notice/list',
method: 'get', method: 'get',
params: { params: {
...params, ...params,
@ -14,7 +14,7 @@ export const getList = (current, size, params) => {
export const remove = (ids) => { export const remove = (ids) => {
return request({ return request({
url: 'api/blade-desk/notice/remove', url: '/api/blade-desk/notice/remove',
method: 'post', method: 'post',
params: { params: {
ids, ids,
@ -24,7 +24,7 @@ export const remove = (ids) => {
export const add = (row) => { export const add = (row) => {
return request({ return request({
url: 'api/blade-desk/notice/submit', url: '/api/blade-desk/notice/submit',
method: 'post', method: 'post',
data: row data: row
}) })
@ -32,7 +32,7 @@ export const add = (row) => {
export const update = (row) => { export const update = (row) => {
return request({ return request({
url: 'api/blade-desk/notice/submit', url: '/api/blade-desk/notice/submit',
method: 'post', method: 'post',
data: row data: row
}) })
@ -40,7 +40,7 @@ export const update = (row) => {
export const getNotice = (id) => { export const getNotice = (id) => {
return request({ return request({
url: 'api/blade-desk/notice/detail', url: '/api/blade-desk/notice/detail',
method: 'get', method: 'get',
params: { params: {
id id

View File

@ -2,7 +2,7 @@ import request from '@/router/axios';
export const getUsualList = (current, size) => { export const getUsualList = (current, size) => {
return request({ return request({
url: 'api/blade-log/usual/list', url: '/api/blade-log/usual/list',
method: 'get', method: 'get',
params: { params: {
current, current,
@ -13,7 +13,7 @@ export const getUsualList = (current, size) => {
export const getApiList = (current, size) => { export const getApiList = (current, size) => {
return request({ return request({
url: 'api/blade-log/api/list', url: '/api/blade-log/api/list',
method: 'get', method: 'get',
params: { params: {
current, current,
@ -24,7 +24,7 @@ export const getApiList = (current, size) => {
export const getErrorList = (current, size) => { export const getErrorList = (current, size) => {
return request({ return request({
url: 'api/blade-log/error/list', url: '/api/blade-log/error/list',
method: 'get', method: 'get',
params: { params: {
current, current,
@ -36,7 +36,7 @@ export const getErrorList = (current, size) => {
export const getUsualLogs = (id) => { export const getUsualLogs = (id) => {
return request({ return request({
url: 'api/blade-log/usual/detail', url: '/api/blade-log/usual/detail',
method: 'get', method: 'get',
params: { params: {
id, id,
@ -45,7 +45,7 @@ export const getUsualLogs = (id) => {
} }
export const getApiLogs = (id) => { export const getApiLogs = (id) => {
return request({ return request({
url: 'api/blade-log/api/detail', url: '/api/blade-log/api/detail',
method: 'get', method: 'get',
params: { params: {
id, id,
@ -54,7 +54,7 @@ export const getApiLogs = (id) => {
} }
export const getErrorLogs = (id) => { export const getErrorLogs = (id) => {
return request({ return request({
url: 'api/blade-log/error/detail', url: '/api/blade-log/error/detail',
method: 'get', method: 'get',
params: { params: {
id, id,

View File

@ -2,7 +2,7 @@ import request from '@/router/axios';
export const getList = (current, size, params) => { export const getList = (current, size, params) => {
return request({ return request({
url: 'api/blade-system/dept/list', url: '/api/blade-system/dept/list',
method: 'get', method: 'get',
params: { params: {
...params, ...params,
@ -13,7 +13,7 @@ export const getList = (current, size, params) => {
} }
export const remove = (ids) => { export const remove = (ids) => {
return request({ return request({
url: 'api/blade-system/dept/remove', url: '/api/blade-system/dept/remove',
method: 'post', method: 'post',
params: { params: {
ids, ids,
@ -23,7 +23,7 @@ export const remove = (ids) => {
export const add = (row) => { export const add = (row) => {
return request({ return request({
url: 'api/blade-system/dept/submit', url: '/api/blade-system/dept/submit',
method: 'post', method: 'post',
data: row data: row
}) })
@ -31,7 +31,7 @@ export const add = (row) => {
export const update = (row) => { export const update = (row) => {
return request({ return request({
url: 'api/blade-system/dept/submit', url: '/api/blade-system/dept/submit',
method: 'post', method: 'post',
data: row data: row
}) })
@ -39,7 +39,7 @@ export const update = (row) => {
export const getDept = (id) => { export const getDept = (id) => {
return request({ return request({
url: 'api/blade-system/dept/detail', url: '/api/blade-system/dept/detail',
method: 'get', method: 'get',
params: { params: {
id, id,
@ -48,7 +48,7 @@ export const getDept = (id) => {
} }
export const getDeptTree = () => { export const getDeptTree = () => {
return request({ return request({
url: 'api/blade-system/dept/tree', url: '/api/blade-system/dept/tree',
method: 'get' method: 'get'
}) })
} }

View File

@ -2,7 +2,7 @@ import request from '@/router/axios';
export const getList = (current, size, params) => { export const getList = (current, size, params) => {
return request({ return request({
url: 'api/blade-system/dict/list', url: '/api/blade-system/dict/list',
method: 'get', method: 'get',
params: { params: {
...params, ...params,
@ -13,7 +13,7 @@ export const getList = (current, size, params) => {
} }
export const remove = (ids) => { export const remove = (ids) => {
return request({ return request({
url: 'api/blade-system/dict/remove', url: '/api/blade-system/dict/remove',
method: 'post', method: 'post',
params: { params: {
ids, ids,
@ -23,7 +23,7 @@ export const remove = (ids) => {
export const add = (row) => { export const add = (row) => {
return request({ return request({
url: 'api/blade-system/dict/submit', url: '/api/blade-system/dict/submit',
method: 'post', method: 'post',
data: row data: row
}) })
@ -31,7 +31,7 @@ export const add = (row) => {
export const update = (row) => { export const update = (row) => {
return request({ return request({
url: 'api/blade-system/dict/submit', url: '/api/blade-system/dict/submit',
method: 'post', method: 'post',
data: row data: row
}) })
@ -40,7 +40,7 @@ export const update = (row) => {
export const getDict = (id) => { export const getDict = (id) => {
return request({ return request({
url: 'api/blade-system/dict/detail', url: '/api/blade-system/dict/detail',
method: 'get', method: 'get',
params: { params: {
id, id,
@ -49,7 +49,7 @@ export const getDict = (id) => {
} }
export const getDictTree = () => { export const getDictTree = () => {
return request({ return request({
url: 'api/blade-system/dict/tree?code=DICT', url: '/api/blade-system/dict/tree?code=DICT',
method: 'get' method: 'get'
}) })
} }

View File

@ -2,7 +2,7 @@ import request from '@/router/axios';
export const getList = (current, size, params) => { export const getList = (current, size, params) => {
return request({ return request({
url: 'api/blade-system/menu/list', url: '/api/blade-system/menu/list',
method: 'get', method: 'get',
params: { params: {
...params, ...params,
@ -13,7 +13,7 @@ export const getList = (current, size, params) => {
} }
export const remove = (ids) => { export const remove = (ids) => {
return request({ return request({
url: 'api/blade-system/menu/remove', url: '/api/blade-system/menu/remove',
method: 'post', method: 'post',
params: { params: {
ids, ids,
@ -23,7 +23,7 @@ export const remove = (ids) => {
export const add = (row) => { export const add = (row) => {
return request({ return request({
url: 'api/blade-system/menu/submit', url: '/api/blade-system/menu/submit',
method: 'post', method: 'post',
data: row data: row
}) })
@ -31,7 +31,7 @@ export const add = (row) => {
export const update = (row) => { export const update = (row) => {
return request({ return request({
url: 'api/blade-system/menu/submit', url: '/api/blade-system/menu/submit',
method: 'post', method: 'post',
data: row data: row
}) })
@ -39,7 +39,7 @@ export const update = (row) => {
export const getMenu = (id) => { export const getMenu = (id) => {
return request({ return request({
url: 'api/blade-system/menu/detail', url: '/api/blade-system/menu/detail',
method: 'get', method: 'get',
params: { params: {
id, id,

View File

@ -2,7 +2,7 @@ import request from '@/router/axios';
export const getList = (current, size, params) => { export const getList = (current, size, params) => {
return request({ return request({
url: 'api/blade-system/param/list', url: '/api/blade-system/param/list',
method: 'get', method: 'get',
params: { params: {
...params, ...params,
@ -13,7 +13,7 @@ export const getList = (current, size, params) => {
} }
export const remove = (ids) => { export const remove = (ids) => {
return request({ return request({
url: 'api/blade-system/param/remove', url: '/api/blade-system/param/remove',
method: 'post', method: 'post',
params: { params: {
ids, ids,
@ -23,7 +23,7 @@ export const remove = (ids) => {
export const add = (row) => { export const add = (row) => {
return request({ return request({
url: 'api/blade-system/param/submit', url: '/api/blade-system/param/submit',
method: 'post', method: 'post',
data: row data: row
}) })
@ -31,7 +31,7 @@ export const add = (row) => {
export const update = (row) => { export const update = (row) => {
return request({ return request({
url: 'api/blade-system/param/submit', url: '/api/blade-system/param/submit',
method: 'post', method: 'post',
data: row data: row
}) })

View File

@ -2,7 +2,7 @@ import request from '@/router/axios';
export const getList = (current, size, params) => { export const getList = (current, size, params) => {
return request({ return request({
url: 'api/blade-system/role/list', url: '/api/blade-system/role/list',
method: 'get', method: 'get',
params: { params: {
...params, ...params,
@ -13,14 +13,14 @@ export const getList = (current, size, params) => {
} }
export const getTree = () => { export const getTree = () => {
return request({ return request({
url: 'api/blade-system/menu/grant-tree', url: '/api/blade-system/menu/grant-tree',
method: 'get', method: 'get',
}) })
} }
export const grant = (roleIds, menuIds) => { export const grant = (roleIds, menuIds) => {
return request({ return request({
url: 'api/blade-system/role/grant', url: '/api/blade-system/role/grant',
method: 'post', method: 'post',
params: { params: {
roleIds, roleIds,
@ -31,7 +31,7 @@ export const grant = (roleIds, menuIds) => {
export const remove = (ids) => { export const remove = (ids) => {
return request({ return request({
url: 'api/blade-system/role/remove', url: '/api/blade-system/role/remove',
method: 'post', method: 'post',
params: { params: {
ids, ids,
@ -41,7 +41,7 @@ export const remove = (ids) => {
export const add = (row) => { export const add = (row) => {
return request({ return request({
url: 'api/blade-system/role/submit', url: '/api/blade-system/role/submit',
method: 'post', method: 'post',
data: row data: row
}) })
@ -49,7 +49,7 @@ export const add = (row) => {
export const update = (row) => { export const update = (row) => {
return request({ return request({
url: 'api/blade-system/role/submit', url: '/api/blade-system/role/submit',
method: 'post', method: 'post',
data: row data: row
}) })
@ -58,7 +58,7 @@ export const update = (row) => {
export const getRole = (roleIds) => { export const getRole = (roleIds) => {
return request({ return request({
url: 'api/blade-system/menu/role-tree-keys', url: '/api/blade-system/menu/role-tree-keys',
method: 'get', method: 'get',
params: { params: {
roleIds, roleIds,
@ -68,7 +68,7 @@ export const getRole = (roleIds) => {
export const getRoleTree = () => { export const getRoleTree = () => {
return request({ return request({
url: 'api/blade-system/role/tree', url: '/api/blade-system/role/tree',
method: 'get' method: 'get'
}) })
} }

View File

@ -2,7 +2,7 @@ import request from '@/router/axios';
export const resetPassword = (userIds) => { export const resetPassword = (userIds) => {
return request({ return request({
url: 'api/blade-user/reset-password', url: '/api/blade-user/reset-password',
method: 'post', method: 'post',
params: { params: {
userIds, userIds,
@ -11,7 +11,7 @@ export const resetPassword = (userIds) => {
} }
export const getList = (current, size, params) => { export const getList = (current, size, params) => {
return request({ return request({
url: 'api/blade-user/list', url: '/api/blade-user/list',
method: 'get', method: 'get',
params: { params: {
...params, ...params,
@ -22,7 +22,7 @@ export const getList = (current, size, params) => {
} }
export const remove = (ids) => { export const remove = (ids) => {
return request({ return request({
url: 'api/blade-user/remove', url: '/api/blade-user/remove',
method: 'post', method: 'post',
params: { params: {
ids, ids,
@ -32,7 +32,7 @@ export const remove = (ids) => {
export const add = (row) => { export const add = (row) => {
return request({ return request({
url: 'api/blade-user/submit', url: '/api/blade-user/submit',
method: 'post', method: 'post',
data: row data: row
}) })
@ -40,7 +40,7 @@ export const add = (row) => {
export const update = (row) => { export const update = (row) => {
return request({ return request({
url: 'api/blade-user/submit', url: '/api/blade-user/submit',
method: 'post', method: 'post',
data: row data: row
}) })
@ -48,7 +48,7 @@ export const update = (row) => {
export const getUser = (id) => { export const getUser = (id) => {
return request({ return request({
url: 'api/blade-user/detail', url: '/api/blade-user/detail',
method: 'get', method: 'get',
params: { params: {
id, id,

View File

@ -2,7 +2,7 @@ import request from '@/router/axios';
export const getList = (current, size) => { export const getList = (current, size) => {
return request({ return request({
url: 'api/blade-develop/code/list', url: '/api/blade-develop/code/list',
method: 'get', method: 'get',
params: { params: {
current, current,
@ -13,7 +13,7 @@ export const getList = (current, size) => {
export const build = (ids) => { export const build = (ids) => {
return request({ return request({
url: 'api/blade-develop/code/gen-code', url: '/api/blade-develop/code/gen-code',
method: 'post', method: 'post',
params: { params: {
ids, ids,
@ -22,7 +22,7 @@ export const build = (ids) => {
} }
export const remove = (ids) => { export const remove = (ids) => {
return request({ return request({
url: 'api/blade-develop/code/remove', url: '/api/blade-develop/code/remove',
method: 'post', method: 'post',
params: { params: {
ids, ids,
@ -32,7 +32,7 @@ export const remove = (ids) => {
export const add = (row) => { export const add = (row) => {
return request({ return request({
url: 'api/blade-develop/code/submit', url: '/api/blade-develop/code/submit',
method: 'post', method: 'post',
data: row data: row
}) })
@ -48,7 +48,7 @@ export const update = (row) => {
export const getCode = (id) => { export const getCode = (id) => {
return request({ return request({
url: 'api/blade-develop/code/detail', url: '/api/blade-develop/code/detail',
method: 'get', method: 'get',
params: { params: {
id, id,

View File

@ -2,7 +2,7 @@ import request from '@/router/axios';
import {baseUrl} from '@/config/env'; import {baseUrl} from '@/config/env';
export const loginByUsername = (account, password, type) => request({ export const loginByUsername = (account, password, type) => request({
url: 'api/blade-auth/token', url: '/api/blade-auth/token',
method: 'post', method: 'post',
params: { params: {
account, account,
@ -12,7 +12,7 @@ export const loginByUsername = (account, password, type) => request({
}) })
export const getButtons = () => request({ export const getButtons = () => request({
url: 'api/blade-system/menu/buttons', url: '/api/blade-system/menu/buttons',
method: 'get' method: 'get'
}); });
@ -27,7 +27,7 @@ export const refeshToken = () => request({
}) })
export const getMenu = () => request({ export const getMenu = () => request({
url: 'api/blade-system/menu/routes', url: '/api/blade-system/menu/routes',
method: 'get' method: 'get'
}); });

View File

@ -144,7 +144,7 @@
}); });
}, },
rowDel(row) { rowDel(row) {
this.$confirm("确定将选删除?", { this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning"
@ -174,7 +174,7 @@
this.$message.warning("请选择至少一条数据"); this.$message.warning("请选择至少一条数据");
return; return;
} }
this.$confirm("确定将选择账号删除?", { this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning"

View File

@ -154,7 +154,7 @@
}); });
}, },
rowDel(row) { rowDel(row) {
this.$confirm("确定将选删除?", { this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning"
@ -175,7 +175,7 @@
this.$message.warning("请选择至少一条数据"); this.$message.warning("请选择至少一条数据");
return; return;
} }
this.$confirm("确定将选择账号删除?", { this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning"

View File

@ -163,7 +163,7 @@
}); });
}, },
rowDel(row) { rowDel(row) {
this.$confirm("确定将选删除?", { this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning"
@ -193,7 +193,7 @@
this.$message.warning("请选择至少一条数据"); this.$message.warning("请选择至少一条数据");
return; return;
} }
this.$confirm("确定将选择账号删除?", { this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning"

View File

@ -222,7 +222,7 @@
}); });
}, },
rowDel(row) { rowDel(row) {
this.$confirm("确定将选删除?", { this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning"
@ -252,7 +252,7 @@
this.$message.warning("请选择至少一条数据"); this.$message.warning("请选择至少一条数据");
return; return;
} }
this.$confirm("确定将选择账号删除?", { this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning"

View File

@ -128,7 +128,7 @@
}); });
}, },
rowDel(row) { rowDel(row) {
this.$confirm("确定将选删除?", { this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning"
@ -158,7 +158,7 @@
this.$message.warning("请选择至少一条数据"); this.$message.warning("请选择至少一条数据");
return; return;
} }
this.$confirm("确定将选择账号删除?", { this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning"

View File

@ -194,7 +194,7 @@
}); });
}, },
rowDel(row) { rowDel(row) {
this.$confirm("确定将选删除?", { this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning"
@ -240,7 +240,7 @@
this.$message.warning("请选择至少一条数据"); this.$message.warning("请选择至少一条数据");
return; return;
} }
this.$confirm("确定将选择账号删除?", { this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning"

View File

@ -256,7 +256,7 @@
}); });
}, },
rowDel(row) { rowDel(row) {
this.$confirm("确定将选删除?", { this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning"
@ -286,7 +286,7 @@
this.$message.warning("请选择至少一条数据"); this.$message.warning("请选择至少一条数据");
return; return;
} }
this.$confirm("确定将选择账号删除?", { this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning"

View File

@ -186,7 +186,7 @@
}); });
}, },
rowDel(row) { rowDel(row) {
this.$confirm("确定将选删除?", { this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning"
@ -217,7 +217,7 @@
this.$message.warning("请选择至少一条数据"); this.$message.warning("请选择至少一条数据");
return; return;
} }
this.$confirm("确定将选择账号删除?", { this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning"