上传代码
This commit is contained in:
@ -6,27 +6,49 @@ export default {
|
|||||||
// pathRewrite: { '^': '' },
|
// pathRewrite: { '^': '' },
|
||||||
// },
|
// },
|
||||||
'/api/*': {
|
'/api/*': {
|
||||||
target: 'http://10.242.37.148:18022',//连接天宫的ng
|
// target: 'http://10.242.37.148:18022',//连接天宫的ng
|
||||||
|
target: 'http://localhost:3000',//连接天宫的ng
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
pathRewrite: { '^': '' },
|
pathRewrite: { '^': '' },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
UAT: {
|
UAT: {
|
||||||
|
'/api/core-service-ebtp-userinfo': {
|
||||||
|
target: 'http://localhost:18023',
|
||||||
|
changeOrigin: true,
|
||||||
|
pathRewrite: { '/api/core-service-ebtp-userinfo': '' },
|
||||||
|
},
|
||||||
|
'/api/biz-service-ebtp-bid': {
|
||||||
|
target: 'http://localhost:18003',
|
||||||
|
changeOrigin: true,
|
||||||
|
pathRewrite: { 'biz-service-ebtp-bid': '' },
|
||||||
|
},
|
||||||
|
'/api/biz-service-ebtp-extend': {
|
||||||
|
target: 'http://localhost:18018',
|
||||||
|
changeOrigin: true,
|
||||||
|
pathRewrite: { '/api/biz-service-ebtp-extend': '' },
|
||||||
|
},
|
||||||
|
'/api/biz-service-ebtp-project': {
|
||||||
|
target: 'http://localhost:18012',
|
||||||
|
changeOrigin: true,
|
||||||
|
pathRewrite: { '/api/biz-service-ebtp-project': '' },
|
||||||
|
},
|
||||||
// '/api/wfap/v1/audit/bill/find/by/procid': {
|
// '/api/wfap/v1/audit/bill/find/by/procid': {
|
||||||
// target: 'http://10.242.31.158:8891/',//审批单 uat环境自动审批,暂时用不到
|
// target: 'http://10.242.31.158:8891/',//审批单 uat环境自动审批,暂时用不到
|
||||||
// changeOrigin: true,
|
// changeOrigin: true,
|
||||||
// pathRewrite: { '^': '' },
|
// pathRewrite: { '^': '' },
|
||||||
// },
|
// },
|
||||||
'/living/api/*': {
|
// '/living/api/*': {
|
||||||
target: 'https://ai.cubigdata.cn:5001',//连接天宫的ng
|
// // target: 'https://ai.cubigdata.cn:5001',//连接天宫的ng
|
||||||
changeOrigin: true,
|
// target: 'http://localhost:3000',//连接天宫的ng
|
||||||
pathRewrite: { '/living/api': '' },
|
// changeOrigin: true,
|
||||||
},
|
// pathRewrite: { '/living/api': '' },
|
||||||
'/api/*': {
|
// },
|
||||||
target: 'http://10.242.31.158:18022',//连接天宫的ng
|
// '/api/*': {
|
||||||
changeOrigin: true,
|
// target: 'http://10.242.31.158:18022',//连接天宫的ng
|
||||||
pathRewrite: { '^': '' },
|
// changeOrigin: true,
|
||||||
},
|
// pathRewrite: { '^': '' },
|
||||||
|
// },
|
||||||
// '/doc/v1.0/*': {
|
// '/doc/v1.0/*': {
|
||||||
// target: 'http://10.242.31.158:8806',//连接天宫的ng
|
// target: 'http://10.242.31.158:8806',//连接天宫的ng
|
||||||
// changeOrigin: true,
|
// changeOrigin: true,
|
||||||
|
@ -109,17 +109,336 @@ const BasicLayout: React.FC<BasicLayoutProps> = (props) => {
|
|||||||
const userData: any = getSessionUserData();//当前登录人信息
|
const userData: any = getSessionUserData();//当前登录人信息
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (getSessionRoleData()?.roleId) {
|
if (getSessionRoleData()?.roleId) {
|
||||||
let params = {
|
// let params = {
|
||||||
roleIdList: [getSessionRoleData()?.roleId]
|
// roleIdList: [getSessionRoleData()?.roleId]
|
||||||
|
// }
|
||||||
|
const res = {
|
||||||
|
"code": "1",
|
||||||
|
"success": true,
|
||||||
|
"message": "操作成功",
|
||||||
|
"data": [
|
||||||
|
{
|
||||||
|
"menuId": "2",
|
||||||
|
"path": "",
|
||||||
|
"name": "我的工作台",
|
||||||
|
"icon": "DesktopOutlined",
|
||||||
|
"menuScope": "EBTP",
|
||||||
|
"menuOu": null,
|
||||||
|
"isTop": 0,
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"path": "/workbench/files",
|
||||||
|
"name": "共享文档下载",
|
||||||
|
"frame": "N"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "/SystemMessage/message",
|
||||||
|
"name": "系统消息",
|
||||||
|
"frame": "N"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "/api/auth/oauth/authorize?response_type\u003dcode\u0026client_id\u003d3FjMVIzt\u0026redirect_uri\u003dhttps://10.242.31.158:18023/Expertlibraryworkbench/MyExpertHome/Extract?proxyCompanyNo\u003d{organizationId}\u0026sign\u003dprocure\u0026urlSign\u003dSubagenT\u0026mall3_token\u003d{mall3_token}",
|
||||||
|
"name": "代理机构信息管理",
|
||||||
|
"frame": "S"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "/api/auth/oauth/authorize?response_type\u003dcode\u0026client_id\u003dCOsHJydx\u0026redirect_uri\u003dhttps://uat-uscm.chinaunicom.cn:8631/redirect?page\u003dcustomerservice/support/conversation/index\u0026mall3_token\u003d{mall3_token}",
|
||||||
|
"name": "我的客服",
|
||||||
|
"frame": "S"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "/Lowcode/LowcodeRedirect",
|
||||||
|
"name": "我的服务单",
|
||||||
|
"frame": "Y"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "/api/auth/oauth/authorize?response_type\u003dcode\u0026client_id\u003ds3FXwGQh\u0026redirect_uri\u003dhttps://uat-uscm.chinaunicom.cn:18024/supplierInfo/redirect?page\u003d/supplier-info-ordinary\u0026mall3_token\u003d{mall3_token}",
|
||||||
|
"name": "智企查",
|
||||||
|
"frame": "S"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"feignFlag": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"menuId": "3",
|
||||||
|
"path": "",
|
||||||
|
"name": "通知公告",
|
||||||
|
"icon": "NotificationOutlined",
|
||||||
|
"menuScope": "EBTP",
|
||||||
|
"menuOu": null,
|
||||||
|
"isTop": 0,
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"path": "/notice/noticeList",
|
||||||
|
"name": "通知公告查看",
|
||||||
|
"frame": "N"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"feignFlag": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"menuId": "41",
|
||||||
|
"path": "",
|
||||||
|
"name": "分派项目管理",
|
||||||
|
"icon": "BookOutlined",
|
||||||
|
"menuScope": "EBTP",
|
||||||
|
"menuOu": null,
|
||||||
|
"isTop": 0,
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"path": "/Project/EntrustAssign/Operator",
|
||||||
|
"name": "分派给我的项目",
|
||||||
|
"frame": "N"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "/Project/EntrustWithdraw",
|
||||||
|
"name": "委托撤回记录",
|
||||||
|
"frame": "N"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"feignFlag": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"menuId": "1000001",
|
||||||
|
"path": "",
|
||||||
|
"name": "招标项目管理",
|
||||||
|
"icon": "ProfileOutlined",
|
||||||
|
"menuScope": "EBTP",
|
||||||
|
"menuOu": null,
|
||||||
|
"isTop": 0,
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"path": "/Bid/Manage",
|
||||||
|
"name": "项目管理",
|
||||||
|
"frame": "N"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"feignFlag": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"menuId": "1000006",
|
||||||
|
"path": "Negotiation",
|
||||||
|
"name": "谈判项目管理",
|
||||||
|
"icon": "CommentOutlined",
|
||||||
|
"menuScope": "EBTP",
|
||||||
|
"menuOu": null,
|
||||||
|
"isTop": 0,
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"path": "/Negotiation/Manage",
|
||||||
|
"name": "项目管理",
|
||||||
|
"frame": "N"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"feignFlag": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"menuId": "1843567845937700866",
|
||||||
|
"path": "DirectProc",
|
||||||
|
"name": "直接采购管理",
|
||||||
|
"icon": "SelectOutlined",
|
||||||
|
"menuScope": "EBTP",
|
||||||
|
"menuOu": null,
|
||||||
|
"isTop": 0,
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"path": "/DirectProc/Manage",
|
||||||
|
"name": "项目管理",
|
||||||
|
"frame": "N"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"feignFlag": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"menuId": "100009",
|
||||||
|
"path": "ComparisonProc",
|
||||||
|
"name": "询比采购管理",
|
||||||
|
"icon": "PartitionOutlined",
|
||||||
|
"menuScope": "EBTP",
|
||||||
|
"menuOu": null,
|
||||||
|
"isTop": 0,
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"path": "/ComparisonProc/Manage",
|
||||||
|
"name": "项目管理",
|
||||||
|
"frame": "N"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"feignFlag": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"menuId": "1000008",
|
||||||
|
"path": "Inquiry",
|
||||||
|
"name": "询价项目管理",
|
||||||
|
"icon": "ProjectOutlined",
|
||||||
|
"menuScope": "EBTP",
|
||||||
|
"menuOu": null,
|
||||||
|
"isTop": 0,
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"path": "/Inquiry/Manage",
|
||||||
|
"name": "项目管理",
|
||||||
|
"frame": "N"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"feignFlag": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"menuId": "1000007",
|
||||||
|
"path": "Recruit",
|
||||||
|
"name": "招募项目管理",
|
||||||
|
"icon": "MacCommandOutlined",
|
||||||
|
"menuScope": "EBTP",
|
||||||
|
"menuOu": null,
|
||||||
|
"isTop": 0,
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"path": "/Recruit/Manage",
|
||||||
|
"name": "项目管理",
|
||||||
|
"frame": "N"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"feignFlag": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"menuId": "11111111",
|
||||||
|
"path": "Finance",
|
||||||
|
"name": "财务管理",
|
||||||
|
"icon": "PayCircleOutlined",
|
||||||
|
"menuScope": "EBTP",
|
||||||
|
"menuOu": null,
|
||||||
|
"isTop": 0,
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"path": "/Finance/ProjectManager/RevenueRecognition",
|
||||||
|
"name": "招标收入确认",
|
||||||
|
"frame": "N"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "/Finance/EnsureAmount",
|
||||||
|
"name": "投标保证金查询",
|
||||||
|
"frame": "N"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "/Finance/EnsureAmountRefund",
|
||||||
|
"name": "保证金退还",
|
||||||
|
"frame": "N"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"feignFlag": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"menuId": "11",
|
||||||
|
"path": "Invoice",
|
||||||
|
"name": "发票管理",
|
||||||
|
"icon": "WalletOutlined",
|
||||||
|
"menuScope": "EBTP",
|
||||||
|
"menuOu": null,
|
||||||
|
"isTop": 0,
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"path": "/Invoice/Manager",
|
||||||
|
"name": "发票列表",
|
||||||
|
"frame": "N"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"feignFlag": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"menuId": "1565509326829727746",
|
||||||
|
"path": "ExpertManage",
|
||||||
|
"name": "专家管理",
|
||||||
|
"icon": "IdcardOutlined",
|
||||||
|
"menuScope": "EBTP",
|
||||||
|
"menuOu": null,
|
||||||
|
"isTop": 0,
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"path": "/api/auth/oauth/authorize?response_type\u003dcode\u0026client_id\u003d3FjMVIzt\u0026redirect_uri\u003dhttps://10.242.31.158:18023/Expertlibraryworkbench/MyExpertHome/Extract?proxyCompanyNo\u003d{organizationId}\u0026sign\u003dprocure\u0026mall3_token\u003d{mall3_token}",
|
||||||
|
"name": "专家抽取",
|
||||||
|
"frame": "S"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "/api/auth/oauth/authorize?response_type\u003dcode\u0026client_id\u003d3FjMVIzt\u0026redirect_uri\u003dhttps://10.242.31.158:18023/Expertlibraryworkbench/MyExpertHome/Extract?proxyCompanyNo\u003d{organizationId}\u0026sign\u003dprocure\u0026urlSign\u003dEvaluate\u0026mall3_token\u003d{mall3_token}",
|
||||||
|
"name": "专家评价",
|
||||||
|
"frame": "S"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "/ExpertInfo/ExpertInformationManage",
|
||||||
|
"name": "专家信息管理",
|
||||||
|
"frame": "N"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "/ExpertInfo/ExpertExtractionAvoidance",
|
||||||
|
"name": "专家抽取回避",
|
||||||
|
"frame": "N"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"feignFlag": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"menuId": "1565574276328947714",
|
||||||
|
"path": "VideoMonitor",
|
||||||
|
"name": "视频监控查询",
|
||||||
|
"icon": "PlaySquareOutlined",
|
||||||
|
"menuScope": "EBTP",
|
||||||
|
"menuOu": null,
|
||||||
|
"isTop": 0,
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"path": "/HistoryVideo",
|
||||||
|
"name": "历史视频上传列表",
|
||||||
|
"frame": "N"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"feignFlag": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"menuId": "1722061270189662209",
|
||||||
|
"path": "PurchaseReOffer",
|
||||||
|
"name": "采购复盘与检查",
|
||||||
|
"icon": "BookOutlined",
|
||||||
|
"menuScope": "EBTP",
|
||||||
|
"menuOu": null,
|
||||||
|
"isTop": 0,
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"path": "/PurchaseReOffer",
|
||||||
|
"name": "采购复盘与检查表",
|
||||||
|
"frame": "N"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"feignFlag": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"menuId": "1767358998249476098",
|
||||||
|
"path": "UnbalancedBid",
|
||||||
|
"name": "不均衡报价分析",
|
||||||
|
"icon": "BookOutlined",
|
||||||
|
"menuScope": "EBTP",
|
||||||
|
"menuOu": null,
|
||||||
|
"isTop": 0,
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"path": "/UnbalancedBidList",
|
||||||
|
"name": "不均衡报价分析表",
|
||||||
|
"frame": "N"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"feignFlag": null
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
getMenu(params).then(res => {
|
|
||||||
if (res.code == 1) {
|
|
||||||
setMenuData( res.data || [])
|
setMenuData( res.data || [])
|
||||||
setmenuShow(true)
|
setmenuShow(true)
|
||||||
} else {
|
// getMenu(params).then(res => {
|
||||||
message.error("数据错误请联系管理员")
|
// if (res.code == 1) {
|
||||||
}
|
// setMenuData(res.data || [])
|
||||||
})
|
// setmenuShow(true)
|
||||||
|
// } else {
|
||||||
|
// message.error("数据错误请联系管理员")
|
||||||
|
// }
|
||||||
|
// })
|
||||||
}
|
}
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
@ -63,19 +63,19 @@ const Loading: React.FC<{}> = () => {
|
|||||||
}
|
}
|
||||||
//跳转
|
//跳转
|
||||||
const redirect = async (userData: any, url: string, extra: any) => {
|
const redirect = async (userData: any, url: string, extra: any) => {
|
||||||
const roleCode = getURLInformation('roleCode');
|
// const roleCode = getURLInformation('roleCode');
|
||||||
if (isNotEmpty(roleCode)) {
|
// if (isNotEmpty(roleCode)) {
|
||||||
const authIndex = userData.authorityList.findIndex((ite: any) => ite.roleCode == roleCode);
|
// const authIndex = userData.authorityList.findIndex((ite: any) => ite.roleCode == roleCode);
|
||||||
if (authIndex != -1) {
|
// if (authIndex != -1) {
|
||||||
setUserData(userData, userData.authorityList[authIndex].roleCode, userData.authorityList[authIndex])//角色信息存储
|
// setUserData(userData, userData.authorityList[authIndex].roleCode, userData.authorityList[authIndex])//角色信息存储
|
||||||
} else {
|
// } else {
|
||||||
|
// setUserData(userData, userData.authorityList[0].roleCode, userData.authorityList[0]);
|
||||||
|
// error('402');
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
// } else {
|
||||||
setUserData(userData, userData.authorityList[0].roleCode, userData.authorityList[0]);
|
setUserData(userData, userData.authorityList[0].roleCode, userData.authorityList[0]);
|
||||||
error('402');
|
// }
|
||||||
return;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
setUserData(userData, userData.authorityList[0].roleCode, userData.authorityList[0]);
|
|
||||||
}
|
|
||||||
await setDict();//存字典
|
await setDict();//存字典
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
history.push({
|
history.push({
|
||||||
@ -89,11 +89,127 @@ const Loading: React.FC<{}> = () => {
|
|||||||
|
|
||||||
//获取用户信息
|
//获取用户信息
|
||||||
async function getUserData(token: string, url: string, extra: any, status: number) {
|
async function getUserData(token: string, url: string, extra: any, status: number) {
|
||||||
await fgetUserMsg(token).then(async res => {
|
const res = {
|
||||||
if (res) {
|
"userId": "ex-linjp29",
|
||||||
if (res?.userType == null) {
|
"lastName": null,
|
||||||
error('401');
|
"firstName": null,
|
||||||
} else {
|
"fullName": "林剑萍",
|
||||||
|
"emailAddress": null,
|
||||||
|
"loginName": "ex-linjp29",
|
||||||
|
"mobilePhone": null,
|
||||||
|
"officePhone": null,
|
||||||
|
"sex": null,
|
||||||
|
"employeeCategory": null,
|
||||||
|
"userType": "1",
|
||||||
|
"dateOfBirth": null,
|
||||||
|
"age": null,
|
||||||
|
"employeeNumber": "1743164896",
|
||||||
|
"nationalityId": null,
|
||||||
|
"nationality": null,
|
||||||
|
"nationalIdentifier": null,
|
||||||
|
"supervisorId": null,
|
||||||
|
"organizationId": "101058278",
|
||||||
|
"organizationName": "湖北信通通信有限公司",
|
||||||
|
"orgCategory": null,
|
||||||
|
"deptId": "101058278",
|
||||||
|
"deptName": "湖北信通通信有限公司",
|
||||||
|
"roleIds": null,
|
||||||
|
"bussiGroupId": null,
|
||||||
|
"positionId": null,
|
||||||
|
"currentRoleCode": "undefined",
|
||||||
|
"province": null,
|
||||||
|
"authorityList": [
|
||||||
|
{
|
||||||
|
"roleId": "000009",
|
||||||
|
"roleName": "代理机构业务经理",
|
||||||
|
"roleCode": "ebtp-agency-project-manager",
|
||||||
|
"roleScope": "EBTP",
|
||||||
|
"authorities": [
|
||||||
|
"ebtp-agency-project-manager",
|
||||||
|
null,
|
||||||
|
"ebtp-agency-project-manager",
|
||||||
|
"ebtp-agency-project-manager,ebtp-expert,ebtp-supplier,ebtp-agency-admin",
|
||||||
|
"ebtp-agency-project-manager",
|
||||||
|
"ebtp-agency-project-manager,ebtp-expert,ebtp-supplier,ebtp-agency-admin",
|
||||||
|
"ebtp-agency-project-manager",
|
||||||
|
"ebtp-agency-project-manager",
|
||||||
|
null,
|
||||||
|
"ebtp-agency-project-manager",
|
||||||
|
null,
|
||||||
|
"ebtp-agency-project-manager",
|
||||||
|
"ebtp-agency-project-manager",
|
||||||
|
null,
|
||||||
|
"ebtp-agency-project-manager,ebtp-expert,ebtp-agency-admin",
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
"ebtp-agency-admin",
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
"ebtp-agency-project-manager",
|
||||||
|
"ebtp-agency-project-manager,ebtp-purchase",
|
||||||
|
"ebtp-agency-project-manager,ebtp-purchase",
|
||||||
|
"ebtp-agency-project-manager,ebtp-purchase",
|
||||||
|
"ebtp-agency-project-manager,ebtp-purchase",
|
||||||
|
"ebtp-agency-project-manager,ebtp-purchase",
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
"ebtp-agency-project-manager,ebtp-expert,ebtp-supplier",
|
||||||
|
"ebtp-agency-project-manager,ebtp-supplier",
|
||||||
|
"ebtp-agency-project-manager",
|
||||||
|
"ebtp-agency-project-manager",
|
||||||
|
null
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"roleId": "000006",
|
||||||
|
"roleName": "供应商",
|
||||||
|
"roleCode": "ebtp-supplier",
|
||||||
|
"roleScope": "EBTP",
|
||||||
|
"authorities": [
|
||||||
|
"system:user:test",
|
||||||
|
"ebtp-agency-project-manager,ebtp-expert,ebtp-supplier,ebtp-agency-admin",
|
||||||
|
"system:user:test",
|
||||||
|
"ebtp-agency-project-manager",
|
||||||
|
"ebtp-agency-project-manager,ebtp-expert,ebtp-supplier,ebtp-agency-admin",
|
||||||
|
"ebtp-supplier",
|
||||||
|
"ebtp-supplier",
|
||||||
|
"system:user:test",
|
||||||
|
"system:user:test",
|
||||||
|
"ebtp-agency-project-manager,ebtp-expert,ebtp-agency-admin",
|
||||||
|
"ebtp-supplier",
|
||||||
|
"system:user:test",
|
||||||
|
"ebtp-supplier",
|
||||||
|
"system:user:test",
|
||||||
|
"ebtp-supplier",
|
||||||
|
"ebtp-supplier",
|
||||||
|
"ebtp-supplier",
|
||||||
|
"ebtp-supplier",
|
||||||
|
"ebtp-supplier",
|
||||||
|
"ebtp-supplier",
|
||||||
|
"ebtp-supplier",
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
"ebtp-agency-project-manager,ebtp-expert,ebtp-supplier",
|
||||||
|
"ebtp-agency-project-manager,ebtp-supplier",
|
||||||
|
"ebtp-supplier",
|
||||||
|
"system:user:test",
|
||||||
|
"system:user:test",
|
||||||
|
"system:user:test",
|
||||||
|
"ebtp-agency-project-manager",
|
||||||
|
"system:user:test"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
if (res?.authorityList == null || res?.authorityList?.length == 0) {
|
if (res?.authorityList == null || res?.authorityList?.length == 0) {
|
||||||
if (url == 'ExamineAndApprove/Announcement' ||
|
if (url == 'ExamineAndApprove/Announcement' ||
|
||||||
url == 'ExamineAndApprove/ChangeTheAnnouncement' ||
|
url == 'ExamineAndApprove/ChangeTheAnnouncement' ||
|
||||||
@ -111,21 +227,47 @@ const Loading: React.FC<{}> = () => {
|
|||||||
})
|
})
|
||||||
res.authorityList = [...newAuthority];
|
res.authorityList = [...newAuthority];
|
||||||
await redirect(res, url, extra);
|
await redirect(res, url, extra);
|
||||||
} else {
|
|
||||||
if (status == 0) {
|
|
||||||
await refreshUserData(res?.userType, token, url, extra);
|
|
||||||
} else {
|
|
||||||
error('401');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
await redirect(res, url, extra);
|
await redirect(res, url, extra);
|
||||||
}
|
}
|
||||||
}
|
// await fgetUserMsg(token).then(async res => {
|
||||||
} else {
|
// if (res) {
|
||||||
message.error("登录信息有误,请重新登录")
|
// if (res?.userType == null) {
|
||||||
}
|
// error('401');
|
||||||
})
|
// } else {
|
||||||
|
// if (res?.authorityList == null || res?.authorityList?.length == 0) {
|
||||||
|
// if (url == 'ExamineAndApprove/Announcement' ||
|
||||||
|
// url == 'ExamineAndApprove/ChangeTheAnnouncement' ||
|
||||||
|
// url == 'ExamineAndApprove/Publicity' ||
|
||||||
|
// url == 'ExamineAndApprove/InvitationLetter' ||
|
||||||
|
// url == 'ExamineAndApprove/ExternalReference' ||
|
||||||
|
// url == 'ExamineAndApprove/FailureAnnouncement') {
|
||||||
|
// let newAuthority: any[] = []
|
||||||
|
// newAuthority.push({
|
||||||
|
// authorities: [null, "system:user:test", "system:user:test", "system:user:test", "system:user:test", null, null],
|
||||||
|
// roleCode: "ebtp-unicom-default",
|
||||||
|
// roleId: "20004",
|
||||||
|
// roleName: "联通普通用户",
|
||||||
|
// roleScope: "EBTP"
|
||||||
|
// })
|
||||||
|
// res.authorityList = [...newAuthority];
|
||||||
|
// await redirect(res, url, extra);
|
||||||
|
// } else {
|
||||||
|
// if (status == 0) {
|
||||||
|
// await refreshUserData(res?.userType, token, url, extra);
|
||||||
|
// } else {
|
||||||
|
// error('401');
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// } else {
|
||||||
|
// await redirect(res, url, extra);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// } else {
|
||||||
|
// message.error("登录信息有误,请重新登录")
|
||||||
|
// }
|
||||||
|
// })
|
||||||
}
|
}
|
||||||
//通过code取token
|
//通过code取token
|
||||||
async function getToken(code: string, data: any) {
|
async function getToken(code: string, data: any) {
|
||||||
|
@ -216,10 +216,10 @@ const Index: React.FC<{}> = () => {
|
|||||||
|
|
||||||
const login = (val: any) => {
|
const login = (val: any) => {
|
||||||
let captcha = form.getFieldValue("captcha");
|
let captcha = form.getFieldValue("captcha");
|
||||||
if(captcha==undefined||captcha==null||captcha==""){
|
// if(captcha==undefined||captcha==null||captcha==""){
|
||||||
message.error('请输入验证码!');
|
// message.error('请输入验证码!');
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
/*
|
/*
|
||||||
testLogin({ userName: val.loginName, password: val.psw,captcha:captcha,tmpToken:tmpToken }).then(res => {
|
testLogin({ userName: val.loginName, password: val.psw,captcha:captcha,tmpToken:tmpToken }).then(res => {
|
||||||
if(res?.success){
|
if(res?.success){
|
||||||
|
@ -105,22 +105,22 @@ const Login: React.FC<LoginProps> = (props) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
disSet(true);
|
// disSet(true);
|
||||||
await CooperfakeAccountLogin({ ...values }).then((res) => {
|
// await CooperfakeAccountLogin({ ...values }).then((res) => {
|
||||||
if (res?.success) {
|
// if (res?.success) {
|
||||||
if (moment(res?.data?.expiration).diff(moment(), 'hours') < remainingTime) {
|
// if (moment(res?.data?.expiration).diff(moment(), 'hours') < remainingTime) {
|
||||||
refreshToken(res?.data)
|
// refreshToken(res?.data)
|
||||||
} else {
|
// } else {
|
||||||
sessionStorage.setItem('Authorization', res?.data?.value);
|
sessionStorage.setItem('Authorization', "2ecb7a57-61ed-4406-9063-5d85a26a18eb");
|
||||||
// sessionStorage.setItem('refreshToken', res?.data?.refreshToken.value);
|
// sessionStorage.setItem('refreshToken', res?.data?.refreshToken.value);
|
||||||
sessionStorage.setItem('scope', res?.data?.scope);
|
sessionStorage.setItem('scope', "all");
|
||||||
history.push('/redirect');
|
history.push('/redirect');
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
changeCaptcha();
|
// changeCaptcha();
|
||||||
}).finally(() => {
|
// }).finally(() => {
|
||||||
disSet(false);
|
// disSet(false);
|
||||||
});
|
// });
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -212,18 +212,20 @@ const Login: React.FC<LoginProps> = (props) => {
|
|||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
) : (
|
)
|
||||||
|
: (
|
||||||
<Row>
|
<Row>
|
||||||
<Col span={12}>
|
{/*<Col span={12}>*/}
|
||||||
<Form.Item name="captcha" rules={[{ required: true, message: '请输入验证码' }]}>
|
{/* <Form.Item name="captcha" rules={[{ required: true, message: '请输入验证码' }]}>*/}
|
||||||
<Input size='large' placeholder="验证码" />
|
{/* <Input size='large' placeholder="验证码" />*/}
|
||||||
</Form.Item>
|
{/* </Form.Item>*/}
|
||||||
</Col>
|
{/*</Col>*/}
|
||||||
<Col span={12} style={{ lineHeight: '33.11px' }}>
|
{/*<Col span={12} style={{ lineHeight: '33.11px' }}>*/}
|
||||||
<Image src={imgUrl} preview={false} onClick={() => changeCaptcha()} />
|
{/* <Image src={imgUrl} preview={false} onClick={() => changeCaptcha()} />*/}
|
||||||
</Col>
|
{/*</Col>*/}
|
||||||
</Row>
|
</Row>
|
||||||
)}
|
)
|
||||||
|
}
|
||||||
</Tab>
|
</Tab>
|
||||||
<Submit loading={submitting} disabled={dis}>
|
<Submit loading={submitting} disabled={dis}>
|
||||||
登录
|
登录
|
||||||
|
Reference in New Issue
Block a user