diff --git a/admin/src/api/app.ts b/admin/src/api/app.ts index 2d691d53..156b7927 100644 --- a/admin/src/api/app.ts +++ b/admin/src/api/app.ts @@ -1,7 +1,7 @@ import request from '@/utils/request' export function apiFileCateAdd(params: any) { - return request.post('/file/addCate', params) + return request.post('/album/cateAdd', params) } export function apiFileCateEdit(params: { id: number; name: string }) { @@ -10,32 +10,32 @@ export function apiFileCateEdit(params: { id: number; name: string }) { // 文件分类删除 export function apiFileCateDelete(params: { id: number }) { - return request.post('/file/delCate', params) + return request.post('/album/albumDel', params) } // 文件分类列表 export function apiFileCateLists(params: any) { - return request.get('/file/listCate', { params }) + return request.get('/album/cateList', { params }) } // 文件列表 export function apiFileList(params: any) { - return request.get('/file/lists', { params }) + return request.get('/album/albumList', { params }) } // 文件删除 export function apiFileDelete(params: { ids: any[] }) { - return request.post('/file/delete', params) + return request.post('/album/albumDel', params) } // 文件移动 export function apiFileMove(params: { ids: any[]; cid: number }) { - return request.post('/file/move', params) + return request.post('/album/albumMove', params) } // 文件重命名 export function apiFileRename(params: { id: number; name: string }) { - return request.post('/file/rename', params) + return request.post('/album/albumRename', params) } // 配置 diff --git a/admin/src/api/auth.ts b/admin/src/api/auth.ts index 24770177..74e9281b 100644 --- a/admin/src/api/auth.ts +++ b/admin/src/api/auth.ts @@ -24,25 +24,26 @@ export function apiAdminDetail(params: any) { return request.get('/system/admin/detail', { params }) } +/* 角色 */ // 角色列表 export function apiRoleLists(params: any) { return request.get('/system/role/lists', { params }) } // 添加角色 export function apiRoleAdd(params: any) { - return request.post('/auth.role/add', { ...params }) + return request.post('/system/role/add', { ...params }) } // 编辑角色 export function apiRoleEdit(params: any) { - return request.post('/auth.role/edit', { ...params }) + return request.post('/system/role/edit', { ...params }) } // 删除角色 export function apiRoleDel(params: any) { - return request.post('/auth.role/delete', { ...params }) + return request.post('/system/role/del', { ...params }) } // 角色详情 export function apiRoleDetail(params: any) { - return request.get('/auth.role/detail', { params }) + return request.get('/system/role/detail', { params }) } // 角色权限菜单 diff --git a/admin/src/api/setting.ts b/admin/src/api/setting.ts index 5169a17f..101e18c9 100644 --- a/admin/src/api/setting.ts +++ b/admin/src/api/setting.ts @@ -2,11 +2,11 @@ import request from '@/utils/request' // 获取备案信息 export function apiGetCopyright() { - return request.get('/setting.web.web_setting/getCopyright') + return request.get('/setting/copyright') } // 设置备案信息 export function apiSetCopyright(params: any) { - return request.post('/setting.web.web_setting/setCopyright', { ...params }) + return request.post('/setting/copyright', { ...params }) } // 获取网站信息 @@ -15,7 +15,7 @@ export function apiGetWebsite() { } // 设置网站信息 export function apiSetWebsite(params: any) { - return request.post('/setting.web.web_setting/setWebsite', { ...params }) + return request.post('/setting/website', { ...params }) } // 获取政策协议 @@ -29,7 +29,7 @@ export function apiSetProtocol(params: any) { // 获取系统环境 export function apiSystemInfo() { - return request.get('/setting.system.system/info') + return request.get('/monitor/server') } /** S 在线客服 **/ diff --git a/admin/src/assets/images/avatar.png b/admin/src/assets/images/avatar.png new file mode 100644 index 00000000..705f788b Binary files /dev/null and b/admin/src/assets/images/avatar.png differ diff --git a/admin/src/components/material-select/hook.ts b/admin/src/components/material-select/hook.ts index 02b899f7..eead20a1 100644 --- a/admin/src/components/material-select/hook.ts +++ b/admin/src/components/material-select/hook.ts @@ -5,26 +5,24 @@ import { apiFileCateLists, apiFileDelete, apiFileList, - apiFileMove, -} from "@/api/app" -import { usePages } from "@/core/hooks/pages" -import { ElMessage } from "element-plus" -import { computed, inject, reactive, ref, Ref } from "vue" - - + apiFileMove +} from '@/api/app' +import { usePages } from '@/core/hooks/pages' +import { ElMessage } from 'element-plus' +import { computed, inject, reactive, ref, Ref } from 'vue' // 左侧分组的钩子函数 export function useCate(typeValue: Ref) { // 分组列表 const cateLists: Ref = ref([]) // 选中的分组id - const cateId = ref("") + const cateId = ref('') // 添加分组 const handleAddCate = (val: string) => { apiFileCateAdd({ type: typeValue.value, pid: 0, - name: val, + name: val }).then(() => { getCateLists() }) @@ -33,7 +31,7 @@ export function useCate(typeValue: Ref) { const handleEditCate = (val: string, id: number) => { apiFileCateEdit({ id, - name: val, + name: val }).then(() => { getCateLists() }) @@ -41,7 +39,7 @@ export function useCate(typeValue: Ref) { // 删除分组 const handleDeleteCate = (id: number) => { apiFileCateDelete({ - id, + id }).then(() => { getCateLists() }) @@ -51,17 +49,17 @@ export function useCate(typeValue: Ref) { return new Promise((resolve, reject) => { apiFileCateLists({ type: typeValue.value, - page_type: 1, + page_type: 1 }).then((res: any) => { const item: any[] = [ { - name: "全部", - id: "", + name: '全部', + id: '' }, { - name: "未分组", - id: 0, - }, + name: '未分组', + id: 0 + } ] cateLists.value = res?.lists cateLists.value.unshift(...item) @@ -75,25 +73,23 @@ export function useCate(typeValue: Ref) { handleAddCate, handleEditCate, handleDeleteCate, - getCateLists, + getCateLists } } - // 处理文件的钩子函数 export function useFile(cateId: Ref, type: Ref, limit: Ref) { const moveId = ref(0) const select: Ref = ref([]) const fileParams = reactive({ - name: "", + name: '', type: type, - cid: cateId, + cid: cateId }) const { pager, requestApi, resetPage } = usePages({ callback: apiFileList, params: fileParams }) - const selectStatus = computed( () => (id: number) => select.value.find((item: any) => item.id == id) @@ -108,8 +104,8 @@ export function useFile(cateId: Ref, type: Ref, limit: Ref) const batchFileDelete = (id?: number[]) => { let ids = id ? id : select.value.map((item: any) => item.id) apiFileDelete({ - ids, - }).then((res) => { + ids + }).then(res => { getFileList() clearSelect() }) @@ -118,8 +114,8 @@ export function useFile(cateId: Ref, type: Ref, limit: Ref) let ids = select.value.map((item: any) => item.id) apiFileMove({ ids, - cid: moveId.value, - }).then((res) => { + cid: moveId.value + }).then(res => { moveId.value = 0 getFileList() clearSelect() @@ -138,7 +134,7 @@ export function useFile(cateId: Ref, type: Ref, limit: Ref) select.value.push(item) return } - ElMessage.warning("已达到选择上限") + ElMessage.warning('已达到选择上限') return } select.value.push(item) @@ -147,7 +143,7 @@ export function useFile(cateId: Ref, type: Ref, limit: Ref) select.value = [] } const cancelSelete = (id: number) => { - select.value = select.value.filter((item) => item.id != id) + select.value = select.value.filter(item => item.id != id) } return { moveId, diff --git a/admin/src/components/upload/index.vue b/admin/src/components/upload/index.vue index 66703633..6f19d01e 100644 --- a/admin/src/components/upload/index.vue +++ b/admin/src/components/upload/index.vue @@ -76,7 +76,7 @@ export default defineComponent({ setup(props, { emit }) { const store = useStore() const uploadRefs: Ref = ref(null) - const action = ref(`${import.meta.env.VITE_APP_BASE_URL}/adminapi/upload/${props.type}`) + const action = ref(`${import.meta.env.VITE_APP_BASE_URL}/api/upload/${props.type}`) const headers = computed(() => ({ token: store.getters.token, version: version diff --git a/admin/src/views/permission/admin/edit.vue b/admin/src/views/permission/admin/edit.vue index 7fd0ac3f..7b34011c 100644 --- a/admin/src/views/permission/admin/edit.vue +++ b/admin/src/views/permission/admin/edit.vue @@ -13,8 +13,8 @@ size="small" > - - + + @@ -23,13 +23,13 @@ - - + + - - + + - + @@ -100,31 +100,31 @@ export default defineComponent({ const { formData, rules } = toRefs( reactive({ formData: { - account: '', - name: '', - role_id: '', + username: '', + nickname: '', + role: '', avatar: '', password: '', password_confirm: '', - disable: 0, - multipoint_login: 0 + isDisable: 0, + isMultipoint: 0 }, rules: { - account: [ + username: [ { required: true, message: '请输入账号', trigger: ['blur'] } ], - name: [ + nickname: [ { required: true, message: '请输入名称', trigger: ['blur'] } ], - role_id: [ + role: [ { required: true, message: '请选择角色', diff --git a/admin/src/views/permission/role/edit.vue b/admin/src/views/permission/role/edit.vue index e4175665..382e16b6 100644 --- a/admin/src/views/permission/role/edit.vue +++ b/admin/src/views/permission/role/edit.vue @@ -18,9 +18,9 @@ - + @@ -114,8 +140,8 @@ - - + +