-
Notifications
You must be signed in to change notification settings - Fork 385
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
33 changed files
with
2,116 additions
and
428 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,67 @@ | ||
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 spaceList = () => { | ||
return axios.get('/workspace') | ||
} | ||
|
||
export const spaceDetail = (workspaceId: string) => { | ||
return axios.get(`/workspace/${workspaceId}`) | ||
} | ||
|
||
export const spaceDelete = (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 collaboratorBatchSave = ({ 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 | ||
} | ||
}) | ||
} |
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.