Commit 8e33932e authored by mayongxin's avatar mayongxin

访问根路径修改

parent 297ab520
# PUBLIC_PATH = reactOMS, 默认转发 /cityinterface
PROXY=/Cityinterface:http://192.168.19.105:8049;/Publish:http://192.168.19.105:8049;/Web4:http://192.168.19.105:8049;/CityTemp:http://192.168.19.105:8049
PROXY=/Cityinterface:http://192.168.19.105:8049;/PandaCore:http://192.168.19.105:8049;/Web4:http://192.168.19.105:8049;/CityTemp:http://192.168.19.105:8049
# 可设置第二个代理,test为转发前缀,后面为代理转发的地址
# PROXY2 = test : http://localhost:8006/
......
......@@ -47,7 +47,21 @@ import {
setOrgArea,
getOrgArea,
GetMapSetByGroupID,
GetOUTreeNew
GetOUTreeNew,
GetUserRelationListNew,
GetUserByKeyNew,
AddUserNew,
AddOUNew,
EditOneOUInfoNew,
EditUserNew,
UserStateOUNew,
DeleteOUNew,
SetUserRelationListNew,
JumpToAnotherOUNew,
DeleteUserNew,
} from '@/services/userCenter/userManage/api';
import Tree from '@/components/ExpendableTree';
import classnames from 'classnames';
......@@ -573,16 +587,36 @@ const UserManage = () => {
}
// 查找用户
const submitSearchUser = () => {
getUserByKey(searchWord)
// getUserByKey(searchWord)
// .then(res => {
// if (res.success) {
// setSelectedRowKeys([]); // 重置选中用户数
// setCurrentOrgOperate(true); // 禁止当前机构操作
// setMultiOperate(true); // 禁用批量操作
// setOrgTitle('全部机构搜索结果'); // 设置表头
// setCurrentSelectOrg('-1'); // 清空选中机构
// setTableData(res.root);
// setTableLength(res.root.length);
// } else {
// notification.error({
// message: '提交失败',
// description: res.message,
// });
// }
// })
// .catch(err => {
// message.error(err);
// });
GetUserByKeyNew({key:searchWord})
.then(res => {
if (res.success) {
if (res.code == 0) {
setSelectedRowKeys([]); // 重置选中用户数
setCurrentOrgOperate(true); // 禁止当前机构操作
setMultiOperate(true); // 禁用批量操作
setOrgTitle('全部机构搜索结果'); // 设置表头
setCurrentSelectOrg('-1'); // 清空选中机构
setTableData(res.root);
setTableLength(res.root.length);
setTableData(res.data);
setTableLength(res.data.length);
} else {
notification.error({
message: '提交失败',
......@@ -599,11 +633,30 @@ const UserManage = () => {
// 根据当前 userID 获取用户关联角色
const getRoleList = () => {
setLoading(true);
getUserRelationList(currentUser.userID)
// getUserRelationList(currentUser.userID)
// .then(res => {
// setLoading(false);
// if (res.success) {
// const { roleList, stationList } = res;
// setRolelist(roleList);
// setStationlist(stationList);
// } else {
// notification.error({
// message: '提交失败',
// description: res.message,
// });
// }
// })
// .catch(err => {
// setLoading(false);
// setTableLoading(false);
// message.error(err);
// });
GetUserRelationListNew({userID:currentUser.userID})
.then(res => {
setLoading(false);
if (res.success) {
const { roleList, stationList } = res;
if (res.code == 0) {
const { roleList, stationList } = res.data;
setRolelist(roleList);
setStationlist(stationList);
} else {
......@@ -622,11 +675,30 @@ const UserManage = () => {
// 获取全部未勾选的角色列表与站点列表
const getEmptyRoleList = () => {
setLoading(true);
getUserRelationList('')
// getUserRelationList('')
// .then(res => {
// setLoading(false);
// if (res.roleList && res.roleList.length > 0) {
// const { roleList, stationList } = res;
// setRolelist(roleList);
// setStationlist(stationList);
// } else {
// notification.error({
// message: '提交失败',
// description: res.message,
// });
// }
// })
// .catch(err => {
// setLoading(false);
// setTableLoading(false);
// message.error(err);
// });
GetUserRelationListNew({userID:""})
.then(res => {
setLoading(false);
if (res.roleList && res.roleList.length > 0) {
const { roleList, stationList } = res;
if (res.code == 0) {
const { roleList, stationList } = res.data;
setRolelist(roleList);
setStationlist(stationList);
} else {
......@@ -643,28 +715,54 @@ const UserManage = () => {
});
};
// 提交-更改机构
const submitChangeOrg = () =>
addToOrg(currentUser.userID, currentUser.OUID, newOrgID)
.then(res => {
if (res.success) {
setChangeOrgVisible(false);
// 跳转到新组织机构下的用户表
onSelect([newOrgID]);
// setExpandedKeys([`${newOrgID}`]);
notification.success({
message: '提交成功',
duration: 2,
});
} else {
notification.error({
message: '提交失败',
description: res.message,
});
}
})
.catch(err => {
message.error(err);
});
const submitChangeOrg = () =>{
// addToOrg(currentUser.userID, currentUser.OUID, newOrgID)
// .then(res => {
// if (res.success) {
// setChangeOrgVisible(false);
// // 跳转到新组织机构下的用户表
// onSelect([newOrgID]);
// // setExpandedKeys([`${newOrgID}`]);
// notification.success({
// message: '提交成功',
// duration: 2,
// });
// } else {
// notification.error({
// message: '提交失败',
// description: res.message,
// });
// }
// })
// .catch(err => {
// message.error(err);
// });
JumpToAnotherOUNew({
userID:currentUser.userID,
oldOUID:currentUser.OUID,
newOUID:newOrgID
}).then(res => {
if (res.code === 0) {
setChangeOrgVisible(false);
// 跳转到新组织机构下的用户表
onSelect([newOrgID]);
// setExpandedKeys([`${newOrgID}`]);
notification.success({
message: '提交成功',
duration: 2,
});
} else {
notification.error({
message: '提交失败',
description: res.msg,
});
}
})
.catch(err => {
message.error(err);
});
}
// 提交-批量更改机构
const submitChangeOrgs = () =>
addToOrgs(userIDs, orgIDs, newOrgID)
......@@ -726,9 +824,34 @@ const UserManage = () => {
};
// 提交-删除用户
const submitDeleteUser = () => {
postDeleteUser(currentUser.userID)
.then(res => {
if (res.success) {
// postDeleteUser(currentUser.userID)
// .then(res => {
// if (res.success) {
// setDeleteUserVisible(false);
// notification.success({
// message: '提交成功',
// duration: 2,
// });
// // eslint-disable-next-line no-unused-expressions
// currentSelectOrg === '-1'
// ? submitSearchUser()
// : onSelect([currentSelectOrg]);
// } else {
// notification.error({
// message: '提交失败',
// description: res.message,
// });
// }
// })
// .catch(err => {
// setTableLoading(false);
// message.error(err);
// });
DeleteUserNew({
userID:`"${currentUser.userID}"`,
ouID:`"${currentUser.OUID}"`
}).then(res => {
if (res.code == 0) {
setDeleteUserVisible(false);
notification.success({
message: '提交成功',
......@@ -741,7 +864,7 @@ const UserManage = () => {
} else {
notification.error({
message: '提交失败',
description: res.message,
description: res.msg,
});
}
})
......
......@@ -2,7 +2,7 @@ import { request } from '../utils/request';
const CITY_SERVICE = '/Cityinterface/rest/services';
// export const CITY_SERVICE = '/Publish/GateWay/CityServer';
const PUBLISH_SERVICE = '/Publish/OMS';
const PUBLISH_SERVICE = '/PandaCore/OMS';
// export const PUBLISH_SERVICE = '/Publish/GateWay/OMS';
const get = async (url, params, options = {}) =>
request({
......
......@@ -178,3 +178,45 @@ export const GetMapSetByGroupID = params =>
get(`${PUBLISH_SERVICE}/GetMapSetByGroupID`, params)
export const GetOUTreeNew = params =>
get(`${PUBLISH_SERVICE}/UserCenter/GetOUTree`, params)
export const GetUserRelationListNew = params =>
get(`${PUBLISH_SERVICE}/UserCenter/GetUserRelationList`, params)
export const GetUserByKeyNew = params =>
get(`${PUBLISH_SERVICE}/UserCenter/GetUserByKey`, params)
export const AddUserNew = params =>
get(`${PUBLISH_SERVICE}/UserCenter/AddUser`, params)
export const AddOUNew = params =>
get(`${PUBLISH_SERVICE}/UserCenter/AddOUNew`, params)
export const EditOneOUInfoNew = params =>
get(`${PUBLISH_SERVICE}/UserCenter/EditOneOUInfo`, params)
export const JumpToAnotherOUNew = params =>
get(`${PUBLISH_SERVICE}/UserCenter/JumpToAnotherOU`, params)
export const EditUserNew = params =>
get(`${PUBLISH_SERVICE}/UserCenter/EditUser`, params)
export const UserStateOUNew = params =>
get(`${PUBLISH_SERVICE}/UserCenter/UserStateOU`, params)
export const DeleteUserNew = params =>
get(`${PUBLISH_SERVICE}/UserCenter/DeleteUser`, params)
export const SetUserRelationListNew = params =>
get(`${PUBLISH_SERVICE}/UserCenter/SetUserRelationList`, params)
export const DeleteOUNew = params =>
get(`${PUBLISH_SERVICE}/UserCenter/DeleteOU`, params)
......@@ -30,12 +30,12 @@ axios.defaults.withCredentials = true
axios.interceptors.request.use( function (request){
const token = localStorage.getItem('token')
const pandaPublish = localStorage.getItem('panda-publish')
const getWay = '/Publish/GateWay'
const getWay = '/PandaCore/GateWay'
if(token){
request.headers.Authorization = 'Bearer ' + token
}
if(pandaPublish){
if(request.url!='/Publish/OMS/OMSLogin'&&request.url!='/Publish/OMS/FileCenter/SaveMobileApk'&&request.url!='/Publish/OMS/GateWayConfig')
if(request.url!='/PandaCore/OMS/OMSLogin'&&request.url!='/Publish/OMS/FileCenter/SaveMobileApk'&&request.url!='/Publish/OMS/GateWayConfig')
request.url=getWay+request.url
}
return request
......
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