diff --git a/src/api/system/dept.ts b/src/api/system/dept.ts index d84b7058..9dc3bb45 100644 --- a/src/api/system/dept.ts +++ b/src/api/system/dept.ts @@ -8,16 +8,16 @@ export const listDept = (queryParams?: object) => { }) } -export const getDept = (deptId: any) => { +export const getDept = (id: any) => { return request({ - url: '/youlai-admin/api/v1/depts/'+deptId, + url: '/youlai-admin/api/v1/depts/'+id, method: 'get' }) } -export const delDept = (deptId: any) => { +export const delDept = (id: any) => { return request({ - url: '/youlai-admin/api/v1/depts/'+deptId, + url: '/youlai-admin/api/v1/depts/'+id, method: 'delete', }) } @@ -32,7 +32,7 @@ export const addDept = (data: any) => { } // 修改部门 -export const updateDept = (id:string,data: any) => { +export const updateDept = (id:number,data: any) => { return request({ url: '/youlai-admin/api/v1/depts/'+id, method: 'put', diff --git a/src/main.ts b/src/main.ts index eb056434..088ce8ad 100644 --- a/src/main.ts +++ b/src/main.ts @@ -16,7 +16,7 @@ import '@/permission' import Pagination from '@/components/Pagination/index.vue' -import {listDictItems} from '@/api/system/dict.ts' +import {listDictItems} from '@/api/system/dict' const app = createApp(App) @@ -34,4 +34,4 @@ app .use(router) .use(store, key) .use(ElementPlus, {locale}) - .mount('#app') \ No newline at end of file + .mount('#app') diff --git a/src/views/system/dept/index.vue b/src/views/system/dept/index.vue index c22b3db3..728d176d 100644 --- a/src/views/system/dept/index.vue +++ b/src/views/system/dept/index.vue @@ -1,17 +1,17 @@ -