Commit d9588522 authored by 皮倩雯's avatar 皮倩雯

前端服务地址改为PandaOMS,用户管理模块新接口替换

parent 622d1b1a
Pipeline #31105 skipped with stages
# PUBLIC_PATH = reactOMS, 默认转发 /cityinterface
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
PROXY=/Cityinterface:http://192.168.19.105:8049;/PandaOMS: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/
......
......@@ -19,7 +19,7 @@ const AddUserModal = props => {
'',
)
.then(res => {
if (res.success) {
if (res.msg==="Ok") {
onCancel();
notification.success({
message: '提交成功',
......
......@@ -66,7 +66,7 @@ const AddUserModal = props => {
) {
addUser({ OUID: orgID, loginName, userName, password, phone, email })
.then(res => {
if (res.success) {
if (res.msg==='') {
addUserForm.resetFields();
onCancel(); // 设置Modal不可见
notification.success({
......
......@@ -9,7 +9,7 @@ const DeleteOrgModal = props => {
const submitDeleteOrg = () =>
deleteOrg(orgID)
.then(res => {
if (res.success) {
if (res.msg==='') {
onCancel();
notification.success({
message: '提交成功',
......
......@@ -31,7 +31,7 @@ const EditOrgModal = props => {
'',
)
.then(res => {
if (res.success) {
if (res.msg==='') {
onCancel();
notification.success({
message: '提交成功',
......
......@@ -72,7 +72,7 @@ const EditUserModal = props => {
) {
editUser(currentUser.userID, loginName, userName, phone, email)
.then(res => {
if (res.success) {
if (res.msg==='') {
onCancel();
// 重新获取用户表
// eslint-disable-next-line no-unused-expressions
......
......@@ -499,7 +499,7 @@ const UserManage = () => {
// 更新获取初始范围
useEffect(() => {
getOrgArea().then(res => {
if (res.IsSuccess) {
if (res.msg==="Ok") {
setOrgAreas(res.Results);
}
});
......@@ -1116,7 +1116,7 @@ const onTypeChange = (value) => {
};
const handleReset = () => {
updateTrees();
setSearchWord('');
}
// 更改机构范围
const submitExtent = (extent, areaName) => {
......@@ -1126,7 +1126,7 @@ const onTypeChange = (value) => {
areaName,
extent,
}).then(res => {
if (res.IsSuccess) {
if (res.msg==='') {
setSaveExtentFlag(saveExtentFlag + 1);
message.success('机构范围设置成功!');
} else {
......
......@@ -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 = '/PandaCore/OMS';
const PUBLISH_SERVICE = '/PandaOMS/OMS';
// export const PUBLISH_SERVICE = '/Publish/GateWay/OMS';
const get = async (url, params, options = {}) =>
request({
......
......@@ -3,9 +3,7 @@ import qs from 'qs';
import { CITY_SERVICE, get, post, PUBLISH_SERVICE } from '@/services/index';
export const getUserTree = (selectOU, node) =>
get(`${CITY_SERVICE}/OMS.svc/U_GetOUTree`, {
_version: 9999,
_dc: new Date().getTime(),
get(`${PUBLISH_SERVICE}/UserCenter/GetOUTree`, {
selectOU,
node,
});
......@@ -19,8 +17,6 @@ export const getUserTree = (selectOU, node) =>
export const getOneOUUserListNew = OUID =>
get(`${PUBLISH_SERVICE}/UserCenter/GroupUserList`, {
_version: 9999,
_dc: new Date().getTime(),
groupId: OUID,
});
......@@ -47,7 +43,7 @@ export const addUser = ({
phone,
email,
}) =>
get(`${CITY_SERVICE}/OMS.svc/U_AddUser`, {
get(`${PUBLISH_SERVICE}/UserCenter/AddUser`, {
_version: 9999,
_dc: Date.now(),
OUID,
......@@ -59,9 +55,7 @@ export const addUser = ({
});
export const addOrg = (orgID, OUName, description, comment) =>
get(`${CITY_SERVICE}/OMS.svc/U_AddOU`, {
_version: 9999,
_dc: Date.now(),
get(`${PUBLISH_SERVICE}/UserCenter/AddOU`, {
pid: orgID,
OUName,
description,
......@@ -69,33 +63,25 @@ export const addOrg = (orgID, OUName, description, comment) =>
});
export const editOrgInfo = (orgID, OUName, description, comment) =>
get(`${CITY_SERVICE}/OMS.svc/U_EditOneOUInfo`, {
_version: 9999,
_dc: Date.now(),
OUID: orgID,
OUName,
get(`${PUBLISH_SERVICE}/UserCenter/EditOneOUInfo`, {
ouid: orgID,
ouName: OUName,
description,
comment,
});
export const deleteOrg = orgID =>
get(`${CITY_SERVICE}/OMS.svc/U_DeleteOU`, {
_version: 9999,
_dc: Date.now(),
get(`${PUBLISH_SERVICE}/UserCenter/DeleteOU`, {
OUID: orgID,
});
export const getUserRelationList = userID =>
get(`${CITY_SERVICE}/OMS.svc/W4_GetUserRelationList`, {
_version: 9999,
_dc: Date.now(),
get(`${PUBLISH_SERVICE}/UserCenter/GetUserRelationList`, {
userID: `${userID}`,
});
export const addToOrg = (userID, orgID, newOrgID) =>
get(`${CITY_SERVICE}/OMS.svc/U_JumpToAnotherOU`, {
_version: 9999,
_dc: Date.now(),
get(`${PUBLISH_SERVICE}/UserCenter/JumpToAnotherOU`, {
userID,
oldOUID: orgID,
newOUID: newOrgID,
......@@ -103,8 +89,6 @@ export const addToOrg = (userID, orgID, newOrgID) =>
// 批量更改机构
export const addToOrgs = (userIDs, orgIDs, newOrgID) =>
get(`${PUBLISH_SERVICE}/UserCenter/ModifyUserRole`, {
_version: 9999,
_dc: Date.now(),
userIds: userIDs,
oldGroupIds: orgIDs,
newGroupId: newOrgID,
......@@ -114,9 +98,7 @@ export const updateUserPassword = params =>
post(`${PUBLISH_SERVICE}/UserCenter/UpdateUserPassword`, params);
export const editUser = (userID, loginName, userName, phone, email) =>
get(`${CITY_SERVICE}/OMS.svc/U_EditUser`, {
_version: 9999,
_dc: Date.now(),
get(`${PUBLISH_SERVICE}/UserCenter/EditUser`, {
userID,
loginName,
userName,
......@@ -125,24 +107,15 @@ export const editUser = (userID, loginName, userName, phone, email) =>
});
export const setUserState = (OUID, state) =>
get(`${CITY_SERVICE}/OMS.svc/U_UserStateOU`, {
_version: 9999,
_dc: Date.now(),
get(`${PUBLISH_SERVICE}/UserCenter/UserStateOU`, {
OUID,
state,
});
export const deleteUser = userID =>
get(`${CITY_SERVICE}/OMS.svc/U_DeleteUser`, {
_version: 9999,
_dc: Date.now(),
userID,
});
// 批量删除用户
export const multiDeleteUsers = userIDs =>
get(`${PUBLISH_SERVICE}/UserCenter/DeleteUsers`, {
_version: 9999,
_dc: Date.now(),
userIds: userIDs,
});
......@@ -171,9 +144,9 @@ export const setUserRelations = (userIDs, roleList, stationList) =>
});
export const setOrgArea = params =>
get(`${CITY_SERVICE}/OMS.svc/SetOrgUserArea`, params)
get(`${PUBLISH_SERVICE}/UserCenter/SetOrgUserArea`, params)
export const getOrgArea = params =>
get(`${CITY_SERVICE}/OMS.svc/GetOrgUserArea`, params)
get(`${PUBLISH_SERVICE}/UserCenter/GetOrgUserArea`, params)
export const GetMapSetByGroupID = params =>
get(`${PUBLISH_SERVICE}/Maplayer/GetMapSetByGroupID`, params)
export const GetOUTreeNew = params =>
......@@ -191,8 +164,8 @@ export const GetOUTreeNew = params =>
export const AddOUNew = params =>
get(`${PUBLISH_SERVICE}/UserCenter/AddOUNew`, params)
export const EditOneOUInfoNew = params =>
get(`${PUBLISH_SERVICE}/UserCenter/EditOneOUInfo`, params)
// export const EditOneOUInfoNew = params =>
// get(`${PUBLISH_SERVICE}/UserCenter/EditOneOUInfo`, params)
export const JumpToAnotherOUNew = params =>
get(`${PUBLISH_SERVICE}/UserCenter/JumpToAnotherOU`, 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 = '/PandaCore/GateWay'
const getWay = '/PandaOMS/GateWay'
if(token){
request.headers.Authorization = 'Bearer ' + token
}
if(pandaPublish){
if(request.url!='/PandaCore/OMS/OMSLogin'&&request.url!='/Publish/OMS/FileCenter/SaveMobileApk'&&request.url!='/Publish/OMS/GateWayConfig')
if(request.url!='/PandaOMS/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