更新完善字典相关功能
This commit is contained in:
@@ -28,7 +28,7 @@ export default {
|
||||
post: async function (file) {
|
||||
const formData = new FormData()
|
||||
formData.append('file', file)
|
||||
return await request.post('upload', formData, {
|
||||
return await request.post('system/upload', formData, {
|
||||
headers: { 'Content-Type': 'multipart/form-data' }
|
||||
})
|
||||
},
|
||||
@@ -38,64 +38,64 @@ export default {
|
||||
users: {
|
||||
list: {
|
||||
get: async function (params) {
|
||||
return await request.get('users', { params })
|
||||
return await request.get('auth/users', { params })
|
||||
},
|
||||
},
|
||||
detail: {
|
||||
get: async function (id) {
|
||||
return await request.get(`users/${id}`)
|
||||
return await request.get(`auth/users/${id}`)
|
||||
},
|
||||
},
|
||||
add: {
|
||||
post: async function (params) {
|
||||
return await request.post('users', params)
|
||||
return await request.post('auth/users', params)
|
||||
},
|
||||
},
|
||||
edit: {
|
||||
put: async function (id, params) {
|
||||
return await request.put(`users/${id}`, params)
|
||||
return await request.put(`auth/users/${id}`, params)
|
||||
},
|
||||
},
|
||||
delete: {
|
||||
delete: async function (id) {
|
||||
return await request.delete(`users/${id}`)
|
||||
return await request.delete(`auth/users/${id}`)
|
||||
},
|
||||
},
|
||||
batchDelete: {
|
||||
post: async function (params) {
|
||||
return await request.post('users/batch-delete', params)
|
||||
return await request.post('auth/users/batch-delete', params)
|
||||
},
|
||||
},
|
||||
batchStatus: {
|
||||
post: async function (params) {
|
||||
return await request.post('users/batch-status', params)
|
||||
return await request.post('auth/users/batch-status', params)
|
||||
},
|
||||
},
|
||||
batchDepartment: {
|
||||
post: async function (params) {
|
||||
return await request.post('users/batch-department', params)
|
||||
return await request.post('auth/users/batch-department', params)
|
||||
},
|
||||
},
|
||||
batchRoles: {
|
||||
post: async function (params) {
|
||||
return await request.post('users/batch-roles', params)
|
||||
return await request.post('auth/users/batch-roles', params)
|
||||
},
|
||||
},
|
||||
export: {
|
||||
post: async function (params) {
|
||||
return await request.post('users/export', params, { responseType: 'blob' })
|
||||
return await request.post('auth/users/export', params, { responseType: 'blob' })
|
||||
},
|
||||
},
|
||||
import: {
|
||||
post: async function (formData) {
|
||||
return await request.post('users/import', formData, {
|
||||
return await request.post('auth/users/import', formData, {
|
||||
headers: { 'Content-Type': 'multipart/form-data' }
|
||||
})
|
||||
},
|
||||
},
|
||||
downloadTemplate: {
|
||||
get: async function () {
|
||||
return await request.get('users/download-template', { responseType: 'blob' })
|
||||
return await request.get('auth/users/download-template', { responseType: 'blob' })
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -104,27 +104,27 @@ export default {
|
||||
onlineUsers: {
|
||||
count: {
|
||||
get: async function () {
|
||||
return await request.get('online-users/count')
|
||||
return await request.get('auth/online-users/count')
|
||||
},
|
||||
},
|
||||
list: {
|
||||
get: async function (params) {
|
||||
return await request.get('online-users', { params })
|
||||
return await request.get('auth/online-users', { params })
|
||||
},
|
||||
},
|
||||
sessions: {
|
||||
get: async function (userId) {
|
||||
return await request.get(`online-users/${userId}/sessions`)
|
||||
return await request.get(`auth/online-users/${userId}/sessions`)
|
||||
},
|
||||
},
|
||||
offline: {
|
||||
post: async function (userId, params) {
|
||||
return await request.post(`online-users/${userId}/offline`, params)
|
||||
return await request.post(`auth/online-users/${userId}/offline`, params)
|
||||
},
|
||||
},
|
||||
offlineAll: {
|
||||
post: async function (userId) {
|
||||
return await request.post(`online-users/${userId}/offline-all`)
|
||||
return await request.post(`auth/online-users/${userId}/offline-all`)
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -133,77 +133,77 @@ export default {
|
||||
roles: {
|
||||
list: {
|
||||
get: async function (params) {
|
||||
return await request.get('roles', { params })
|
||||
return await request.get('auth/roles', { params })
|
||||
},
|
||||
},
|
||||
all: {
|
||||
get: async function () {
|
||||
return await request.get('roles/all')
|
||||
return await request.get('auth/roles/all')
|
||||
},
|
||||
},
|
||||
detail: {
|
||||
get: async function (id) {
|
||||
return await request.get(`roles/${id}`)
|
||||
return await request.get(`auth/roles/${id}`)
|
||||
},
|
||||
},
|
||||
add: {
|
||||
post: async function (params) {
|
||||
return await request.post('roles', params)
|
||||
return await request.post('auth/roles', params)
|
||||
},
|
||||
},
|
||||
edit: {
|
||||
put: async function (id, params) {
|
||||
return await request.put(`roles/${id}`, params)
|
||||
return await request.put(`auth/roles/${id}`, params)
|
||||
},
|
||||
},
|
||||
delete: {
|
||||
delete: async function (id) {
|
||||
return await request.delete(`roles/${id}`)
|
||||
return await request.delete(`auth/roles/${id}`)
|
||||
},
|
||||
},
|
||||
batchDelete: {
|
||||
post: async function (params) {
|
||||
return await request.post('roles/batch-delete', params)
|
||||
return await request.post('auth/roles/batch-delete', params)
|
||||
},
|
||||
},
|
||||
batchStatus: {
|
||||
post: async function (params) {
|
||||
return await request.post('roles/batch-status', params)
|
||||
return await request.post('auth/roles/batch-status', params)
|
||||
},
|
||||
},
|
||||
permissions: {
|
||||
get: async function (id) {
|
||||
return await request.get(`roles/${id}/permissions`)
|
||||
return await request.get(`auth/roles/${id}/permissions`)
|
||||
},
|
||||
post: async function (id, params) {
|
||||
return await request.post(`roles/${id}/permissions`, params)
|
||||
return await request.post(`auth/roles/${id}/permissions`, params)
|
||||
},
|
||||
},
|
||||
copy: {
|
||||
post: async function (id, params) {
|
||||
return await request.post(`roles/${id}/copy`, params)
|
||||
return await request.post(`auth/roles/${id}/copy`, params)
|
||||
},
|
||||
},
|
||||
batchCopy: {
|
||||
post: async function (params) {
|
||||
return await request.post('roles/batch-copy', params)
|
||||
return await request.post('auth/roles/batch-copy', params)
|
||||
},
|
||||
},
|
||||
export: {
|
||||
post: async function (params) {
|
||||
return await request.post('roles/export', params, { responseType: 'blob' })
|
||||
return await request.post('auth/roles/export', params, { responseType: 'blob' })
|
||||
},
|
||||
},
|
||||
import: {
|
||||
post: async function (formData) {
|
||||
return await request.post('roles/import', formData, {
|
||||
return await request.post('auth/roles/import', formData, {
|
||||
headers: { 'Content-Type': 'multipart/form-data' }
|
||||
})
|
||||
},
|
||||
},
|
||||
downloadTemplate: {
|
||||
get: async function () {
|
||||
return await request.get('roles/download-template', { responseType: 'blob' })
|
||||
return await request.get('auth/roles/download-template', { responseType: 'blob' })
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -212,64 +212,64 @@ export default {
|
||||
permissions: {
|
||||
list: {
|
||||
get: async function (params) {
|
||||
return await request.get('permissions', { params })
|
||||
return await request.get('auth/permissions', { params })
|
||||
},
|
||||
},
|
||||
tree: {
|
||||
get: async function () {
|
||||
return await request.get('permissions/tree')
|
||||
return await request.get('auth/permissions/tree')
|
||||
},
|
||||
},
|
||||
menu: {
|
||||
get: async function () {
|
||||
return await request.get('permissions/menu')
|
||||
return await request.get('auth/permissions/menu')
|
||||
},
|
||||
},
|
||||
detail: {
|
||||
get: async function (id) {
|
||||
return await request.get(`permissions/${id}`)
|
||||
return await request.get(`auth/permissions/${id}`)
|
||||
},
|
||||
},
|
||||
add: {
|
||||
post: async function (params) {
|
||||
return await request.post('permissions', params)
|
||||
return await request.post('auth/permissions', params)
|
||||
},
|
||||
},
|
||||
edit: {
|
||||
put: async function (id, params) {
|
||||
return await request.put(`permissions/${id}`, params)
|
||||
return await request.put(`auth/permissions/${id}`, params)
|
||||
},
|
||||
},
|
||||
delete: {
|
||||
delete: async function (id) {
|
||||
return await request.delete(`permissions/${id}`)
|
||||
return await request.delete(`auth/permissions/${id}`)
|
||||
},
|
||||
},
|
||||
batchDelete: {
|
||||
post: async function (params) {
|
||||
return await request.post('permissions/batch-delete', params)
|
||||
return await request.post('auth/permissions/batch-delete', params)
|
||||
},
|
||||
},
|
||||
batchStatus: {
|
||||
post: async function (params) {
|
||||
return await request.post('permissions/batch-status', params)
|
||||
return await request.post('auth/permissions/batch-status', params)
|
||||
},
|
||||
},
|
||||
export: {
|
||||
post: async function (params) {
|
||||
return await request.post('permissions/export', params, { responseType: 'blob' })
|
||||
return await request.post('auth/permissions/export', params, { responseType: 'blob' })
|
||||
},
|
||||
},
|
||||
import: {
|
||||
post: async function (formData) {
|
||||
return await request.post('permissions/import', formData, {
|
||||
return await request.post('auth/permissions/import', formData, {
|
||||
headers: { 'Content-Type': 'multipart/form-data' }
|
||||
})
|
||||
},
|
||||
},
|
||||
downloadTemplate: {
|
||||
get: async function () {
|
||||
return await request.get('permissions/download-template', { responseType: 'blob' })
|
||||
return await request.get('auth/permissions/download-template', { responseType: 'blob' })
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -278,64 +278,64 @@ export default {
|
||||
departments: {
|
||||
list: {
|
||||
get: async function (params) {
|
||||
return await request.get('departments', { params })
|
||||
return await request.get('auth/departments', { params })
|
||||
},
|
||||
},
|
||||
tree: {
|
||||
get: async function (params) {
|
||||
return await request.get('departments/tree', { params })
|
||||
return await request.get('auth/departments/tree', { params })
|
||||
},
|
||||
},
|
||||
all: {
|
||||
get: async function () {
|
||||
return await request.get('departments/all')
|
||||
return await request.get('auth/departments/all')
|
||||
},
|
||||
},
|
||||
detail: {
|
||||
get: async function (id) {
|
||||
return await request.get(`departments/${id}`)
|
||||
return await request.get(`auth/departments/${id}`)
|
||||
},
|
||||
},
|
||||
add: {
|
||||
post: async function (params) {
|
||||
return await request.post('departments', params)
|
||||
return await request.post('auth/departments', params)
|
||||
},
|
||||
},
|
||||
edit: {
|
||||
put: async function (id, params) {
|
||||
return await request.put(`departments/${id}`, params)
|
||||
return await request.put(`auth/departments/${id}`, params)
|
||||
},
|
||||
},
|
||||
delete: {
|
||||
delete: async function (id) {
|
||||
return await request.delete(`departments/${id}`)
|
||||
return await request.delete(`auth/departments/${id}`)
|
||||
},
|
||||
},
|
||||
batchDelete: {
|
||||
post: async function (params) {
|
||||
return await request.post('departments/batch-delete', params)
|
||||
return await request.post('auth/departments/batch-delete', params)
|
||||
},
|
||||
},
|
||||
batchStatus: {
|
||||
post: async function (params) {
|
||||
return await request.post('departments/batch-status', params)
|
||||
return await request.post('auth/departments/batch-status', params)
|
||||
},
|
||||
},
|
||||
export: {
|
||||
post: async function (params) {
|
||||
return await request.post('departments/export', params, { responseType: 'blob' })
|
||||
return await request.post('auth/departments/export', params, { responseType: 'blob' })
|
||||
},
|
||||
},
|
||||
import: {
|
||||
post: async function (formData) {
|
||||
return await request.post('departments/import', formData, {
|
||||
return await request.post('auth/departments/import', formData, {
|
||||
headers: { 'Content-Type': 'multipart/form-data' }
|
||||
})
|
||||
},
|
||||
},
|
||||
downloadTemplate: {
|
||||
get: async function () {
|
||||
return await request.get('departments/download-template', { responseType: 'blob' })
|
||||
return await request.get('auth/departments/download-template', { responseType: 'blob' })
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user