|
@@ -6,6 +6,14 @@ import {
|
|
|
getTreeselect,
|
|
|
} from "@/request";
|
|
|
|
|
|
+const request = axios.create({
|
|
|
+ baseURL: 'https://xj-mix3d.4dkankan.com/fusion-xj',
|
|
|
+ timeout: 1000,
|
|
|
+ headers: {
|
|
|
+ share: 1,
|
|
|
+ 'Content-Type': 'application/json'
|
|
|
+ },
|
|
|
+});
|
|
|
|
|
|
export enum DeptType {
|
|
|
corps = 1,
|
|
@@ -28,7 +36,7 @@ export type Organization = {
|
|
|
};
|
|
|
|
|
|
export const getOrganizationTree = async (type?: string) =>
|
|
|
- (await axios.get<Organization[]>(getTreeselect, { headers: { share: 1 }, params: { type, ingoreRes: true, share: 1, } })).data;
|
|
|
+ (await request.get<Organization[]>('/web/department/treeselect', { headers: { share: 1 }, params: { type, ingoreRes: true, share: 1, } })).data;
|
|
|
|
|
|
export const addOrganization = async (
|
|
|
dept: Omit<Organization, "id">,
|