-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
41 changed files
with
2,274 additions
and
473 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
import axios from './base' | ||
|
||
// 空间 | ||
export const createSpace = ({ name, description, members }: any) => { | ||
return axios.post('/workspace', { name, description, members }) | ||
} | ||
|
||
export const updateSpace = ({ workspaceId, name, description, members }: any) => { | ||
return axios.post(`/workspace/${workspaceId}`, { name, description, members }) | ||
} | ||
|
||
export const getSpaceList = () => { | ||
return axios.get('/workspace') | ||
} | ||
|
||
export const getSpaceDetail = (workspaceId: string) => { | ||
return axios.get(`/workspace/${workspaceId}`) | ||
} | ||
|
||
export const deleteSpace = (workspaceId: string) => { | ||
return axios.delete(`/workspace/${workspaceId}`) | ||
} | ||
|
||
export const getUserList = (username: string) => { | ||
return axios.get(`/user/getUserList`, { | ||
params: { | ||
username | ||
} | ||
}) | ||
} | ||
|
||
// 协作权限列表 | ||
export const getPermissionList = () => { | ||
return axios.get('collaborator/getPermissionList') | ||
} | ||
|
||
export const saveCollaborator = ({ surveyId, collaborators }: any) => { | ||
return axios.post('collaborator/batchSave', { | ||
surveyId, | ||
collaborators | ||
}) | ||
} | ||
|
||
// 添加协作人 | ||
export const addCollaborator = ({ surveyId, userId, permissions }: any) => { | ||
return axios.post('collaborator', { | ||
surveyId, | ||
userId, | ||
permissions | ||
}) | ||
} | ||
// 更新问卷协作信息 | ||
export const updateCollaborator = ({ surveyId, userId, permissions }: any) => { | ||
return axios.post('collaborator/changeUserPermission', { | ||
surveyId, | ||
userId, | ||
permissions | ||
}) | ||
} | ||
// 获取问卷协作信息 | ||
export const getCollaborator = (surveyId: string) => { | ||
return axios.get(`collaborator`, { | ||
params: { | ||
surveyId | ||
} | ||
}) | ||
} | ||
// 获取问卷协作权限 | ||
export const getCollaboratorPermissions = (surveyId: string) => { | ||
return axios.get(`collaborator/permissions`, { | ||
params: { | ||
surveyId | ||
} | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.