+ {/* 标题部分 */}
+
+ 合同基本信息
+
+ {/* 添加全局遮罩 */}
+ {loading && (
+
+ )}
+
+ {/* 框架协议编号,独占一行 */}
+
+
+
+
+ {/* 合同编号和合同名称 */}
+
+
+
+
+
+
+
+
+ {/* 合同主要标的类型和公司签订日期 */}
+
+
+
+
+
+
+
+
+ {/* 合同计价方式,独占一行 */}
+
+
+
+
+
+
+
+
+ {/* 合同金额(CNY)和下拉选项 */}
+
value > 0 ? Promise.resolve() : Promise.reject('金额必须大于0') }]}
+ >
+
+
+ {/**/}
+ {/* */}
+ {/**/}
+
+
+ {/* 付款方式和备注输入框 */}
+
+
+
+
+
+
+
+
+ {/* 合同约定开始日期和合同约定结束日期 */}
+
+ {
+
+ }} disabled={readOnly}/>
+
+
+
+
+
+
+ {/* 履约地点和履约担保 */}
+
+
+
+
+
+
+
+
+ 上传合同
+
+
+
{
+ console.log('Uploaded file info:', info);
+ message.success('文件上传成功');
+ }}
+ >
+
+
+
+
+
+ {/* 按钮部分 */}
+
+
+
+
+
+
+
+ );
+};
+
+export default StepTwo;
diff --git a/src/pages/Loading/service.ts b/src/pages/Loading/service.ts
index 43af287..f7890e7 100644
--- a/src/pages/Loading/service.ts
+++ b/src/pages/Loading/service.ts
@@ -1,7 +1,7 @@
import request from '@/utils/request';
export async function fgetUserMsg(params: any) {
- return request('/api/core-service-ebtp-userinfo/v1/userinfo/get', {
+ return request('/api/sys-manager-ebtp-project/v1/userinfo/get', {
method: 'GET',
headers: { 'Authorization': params },
data: params,
diff --git a/src/pages/LoadingPage/index.tsx b/src/pages/LoadingPage/index.tsx
index deee6f5..b1aa6c7 100644
--- a/src/pages/LoadingPage/index.tsx
+++ b/src/pages/LoadingPage/index.tsx
@@ -76,7 +76,7 @@ const Loading: React.FC<{}> = () => {
// } else {
setUserData(userData, userData.authorityList[0].roleCode, userData.authorityList[0]);
// }
- await setDict();//存字典
+ // await setDict();//存字典
setTimeout(() => {
history.push({
pathname: `/${url}`,
@@ -89,185 +89,185 @@ const Loading: React.FC<{}> = () => {
//获取用户信息
async function getUserData(token: string, url: string, extra: any, status: number) {
-const res = {
- "userId": "ex-linjp29",
- "lastName": null,
- "firstName": null,
- "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 (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);
+// const res = {
+// "userId": "ex-linjp29",
+// "lastName": null,
+// "firstName": null,
+// "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 (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 {
+// await redirect(res, url, extra);
+// }
+ fgetUserMsg(token).then(async res => {
+ if (res) {
+ 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') {
+ const newAuthority: any[] = []
+ newAuthority.push({
+ authorities: [null, "system:user:test", "system:user:test", "system:user:test", "system:user:test", null, null],
+ roleCode: "ebtp-cosco-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("登录信息有误,请重新登录")
}
- }else {
- await redirect(res, url, extra);
- }
- // await fgetUserMsg(token).then(async res => {
- // if (res) {
- // 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
async function getToken(code: string, data: any) {
diff --git a/src/pages/LoadingPage/service.ts b/src/pages/LoadingPage/service.ts
index c79fcbe..dc5401e 100644
--- a/src/pages/LoadingPage/service.ts
+++ b/src/pages/LoadingPage/service.ts
@@ -6,7 +6,7 @@ import request from '@/utils/request';
* @returns
*/
export async function fgetUserMsg(params: any) {
- return request('/api/core-service-ebtp-userinfo/v1/userinfo/get', {
+ return request('/api/v1/userinfo/get', {
method: 'GET',
headers: { 'Authorization': params },
data: params,
@@ -18,7 +18,7 @@ export async function fgetUserMsg(params: any) {
* @returns
*/
export async function getTokenByCode(params: any) {
- return request('/api/core-service-ebtp-userinfo/v1/auth/oauth/token', {
+ return request('/api/sys-manager-ebtp-project/v1/auth/oauth/token', {
method: 'POST',
params: params,
});
@@ -70,7 +70,7 @@ export async function getProjectById(id?: any) {
* 获取跳转2.0的URL
*/
export async function getToSecondUrl() {
- return request('/api/core-service-ebtp-userinfo/zglt/v1/getUrl');
+ return request('/api/sys-manager-ebtp-project/zglt/v1/getUrl');
}
diff --git a/src/pages/Login/internal.less b/src/pages/Login/internal.less
new file mode 100644
index 0000000..5ba938b
--- /dev/null
+++ b/src/pages/Login/internal.less
@@ -0,0 +1,100 @@
+.loginContainer {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ min-height: 100vh;
+ background-color: #f5f7fa;
+ padding: 20px;
+}
+
+.loginCard {
+ width: 100%;
+ max-width: 480px;
+ box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
+ border-radius: 8px;
+
+ :global {
+ .ant-card-body {
+ padding: 40px 48px;
+ }
+ }
+}
+
+.loginTabs {
+ :global {
+ // 自定义标签页样式
+ .ant-tabs-tab {
+ font-size: 16px;
+ padding: 12px 24px;
+ margin: 0 8px !important;
+
+ &:hover {
+ color: #1890ff;
+ }
+ }
+
+ .ant-tabs-tab-active {
+ background-color: #1890ff;
+ color: #fff !important;
+ border-radius: 4px;
+
+ .ant-tabs-tab-btn {
+ color: #fff !important;
+ }
+ }
+
+ // 移除底部边框
+ .ant-tabs-nav::before {
+ border: none;
+ }
+
+ .ant-tabs-ink-bar {
+ display: none;
+ }
+
+ // 表单样式
+ .ant-form-item {
+ margin-bottom: 24px;
+ }
+
+ // 登录按钮样式
+ .ant-btn-primary {
+ height: 48px;
+ font-size: 16px;
+ border-radius: 4px;
+
+ &:hover {
+ background-color: #40a9ff;
+ border-color: #40a9ff;
+ }
+ }
+
+ // 输入框样式
+ .ant-input-affix-wrapper {
+ border-radius: 4px;
+
+ &:hover {
+ border-color: #40a9ff;
+ }
+
+ &:focus,
+ &-focused {
+ border-color: #1890ff;
+ box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
+ }
+ }
+
+ .ant-input {
+ border-radius: 4px;
+
+ &:hover {
+ border-color: #40a9ff;
+ }
+
+ &:focus {
+ border-color: #1890ff;
+ box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/pages/Login/internal.tsx b/src/pages/Login/internal.tsx
new file mode 100644
index 0000000..1411700
--- /dev/null
+++ b/src/pages/Login/internal.tsx
@@ -0,0 +1,151 @@
+import React, { useEffect, useRef, useState } from 'react';
+import { Form, Input, Button, Checkbox, Card, Typography } from 'antd';
+import { UserOutlined, LockOutlined, EyeInvisibleOutlined, EyeTwoTone } from '@ant-design/icons';
+import { history } from 'umi';
+import cookie from 'react-cookies';
+import CaptchaInput from '@/components/CaptchaInput';
+import styles from './internal.less';
+import { internalUserLogin } from '@/services/login';
+
+const { Title, Link } = Typography;
+
+interface LoginFormValues {
+ username: string;
+ password: string;
+ captcha: {
+ captcha: string;
+ captchaToken: string;
+ };
+ remember: boolean;
+}
+
+const InternalLogin: React.FC = () => {
+ const [form] = Form.useForm();
+ const [loading, setLoading] = useState(false);
+ const captchaRef = useRef