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

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

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