Commit e91c2f3d authored by 张烨's avatar 张烨

fix: fix commit set user relations

parent 0f041e8d
import { get, post } from '@/services/index'; import { get, post } from '@/services/index';
import qs from 'qs';
export const getUserTree = (selectOU, node) => export const getUserTree = (selectOU, node) =>
get(`/Cityinterface/rest/services/OMS.svc/U_GetOUTree`, { get(`/Cityinterface/rest/services/OMS.svc/U_GetOUTree`, {
...@@ -133,24 +134,20 @@ export const deleteUser = userID => ...@@ -133,24 +134,20 @@ export const deleteUser = userID =>
userID, userID,
}); });
export const setUserRelation = (userID, roleList = [], stationList) => { export const setUserRelation = (userID, roleList = [], stationList) =>
const formData = new FormData(); post(
formData.append('userID', userID);
formData.append('roleList', `${roleList.join(',')},`);
formData.append(
'stationList',
stationList.length ? `${stationList.join(',')},` : '',
);
formData.append('headList', '');
formData.append('mobileMapList', '');
formData.append('currentSolution', '熊猫智慧水务平台');
return post(
`/Cityinterface/rest/services/OMS.svc/U_SetUserRelationList?_version=9999`, `/Cityinterface/rest/services/OMS.svc/U_SetUserRelationList?_version=9999`,
formData, qs.stringify({
userID,
roleList: roleList.length ? `${roleList.join(',')},` : '',
stationList: stationList.length ? `${stationList.join(',')},` : '',
headList: '',
mobileMapList: '',
currentSolution: '熊猫智慧水务平台',
}),
{ {
headers: { headers: {
'Content-Type': 'application/x-www-form-urlencoded', 'Content-Type': 'application/x-www-form-urlencoded',
}, },
}, },
); );
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment