Merge branch 'release_20230224' into 'master'
【生产】2.24版本同步到Master See merge request eshop/fe_service_ebtp_frontend!175
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
import { Avatar, Dropdown, Menu, message, Modal } from 'antd';
|
||||
import { DownOutlined, UserOutlined, UserSwitchOutlined, CarryOutOutlined, HomeOutlined, ImportOutlined } from '@ant-design/icons';
|
||||
import React, { useEffect } from 'react';
|
||||
import React, { useEffect, useRef } from 'react';
|
||||
import moment from 'moment'
|
||||
import { connect, history } from 'umi';
|
||||
import { ConnectState } from '@/models/connect';
|
||||
@ -8,11 +8,13 @@ import logo from '../../assets/logo.svg';
|
||||
import './index.less';
|
||||
import { getMenu, getLogout } from './services'
|
||||
import { getSessionUserData } from "@/utils/session";
|
||||
import { getToSecondUrl } from '@/pages/LoadingPage/service';
|
||||
|
||||
const GlobalHeaderRight: React.FC<{}> = (props) => {
|
||||
// let className = styles.right;
|
||||
let data = getSessionUserData();
|
||||
const [dataMenu, setDataMenu] = React.useState<any>([]);
|
||||
const urlRef = useRef(null);
|
||||
const handelRole = (item: any) => {
|
||||
sessionStorage.setItem('roleData', JSON.stringify(item));
|
||||
sessionStorage.setItem('roleAuthority', JSON.stringify([item.roleCode]));
|
||||
@ -74,13 +76,23 @@ const GlobalHeaderRight: React.FC<{}> = (props) => {
|
||||
</Menu>
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
const getUrl = async () => {
|
||||
const response = await getToSecondUrl();
|
||||
if (response?.success) {
|
||||
urlRef.current = response?.data;
|
||||
}
|
||||
}
|
||||
getUrl();
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<div className="top-menu">
|
||||
<div className="left-logo">
|
||||
<img src={logo} alt="" />中国联通智慧供应链平台 | 招标采购中心
|
||||
</div>
|
||||
<ul className="right-btns">
|
||||
{/* <li><ImportOutlined /><a onClick={()=>window.open(REACT_APP_MALL_V2_URL)}>交易平台2.0</a></li> */}
|
||||
<li><ImportOutlined /><a onClick={() => { urlRef.current && window.open(urlRef.current); }}>交易平台2.0</a></li>
|
||||
<li><HomeOutlined /><a onClick={() => history.push('/Dashboard')}>首页</a></li>
|
||||
<li><CarryOutOutlined />{moment().format("YYYY-MM-DD")}</li>
|
||||
{data?.organizationName == null ? null : (<li><UserSwitchOutlined />{data?.organizationName}</li>)}
|
||||
|
@ -176,7 +176,7 @@ const MonitorException: React.FC<{}> = () => {
|
||||
}
|
||||
useEffect(() => {
|
||||
if (auth.current) {
|
||||
const params = { pageNo: 1, pageSize: 10 };
|
||||
const params = { pageNo: 1, pageSize: 20 };
|
||||
getNoOpenNumber();
|
||||
getThreeDayNoEnd(params, 0);
|
||||
getNoOpenList(params, 0);
|
||||
|
@ -487,7 +487,7 @@ export const ScrollTable = (props: { dataSource: any[], columns: any[], ynum?: n
|
||||
// 只有当大于10条数据的时候 才会看起滚动
|
||||
const v = document.getElementsByClassName("ant-table-body")[tableKey];
|
||||
timer.current = setInterval(() => {
|
||||
v.scrollTop += 0.5;
|
||||
v.scrollTop += 1;
|
||||
if (
|
||||
Math.ceil(v.scrollTop) >= parseFloat((v.scrollHeight - v.clientHeight).toString())
|
||||
) {
|
||||
@ -1773,7 +1773,7 @@ const MonitorHome: React.FC<{}> = () => {
|
||||
<ScreenLabel title="今日开标" extra={<span>标段总数 {isNotEmpty(todayOpeningData?.sectionNumber) ? todayOpeningData?.sectionNumber : 0} 开标完成率 {isNotEmpty(todayOpeningData?.sectionNumber) && todayOpeningData?.sectionNumber != "0" ? Number(((Number(todayOpeningData?.banner) / todayOpeningData?.sectionNumber) * 100).toFixed(0)) : 0}% 评标完成率 {(isNotEmpty(todayInfoData?.sectionNumber) && todayInfoData?.sectionNumber != "0") ? Number(((Number(todayInfoData?.resultNumber) / todayInfoData?.sectionNumber) * 100).toFixed(0)) : 0}%</span>} />
|
||||
</div>
|
||||
<div className="scroll-table">
|
||||
<ScrollTable dataSource={todayOpeningData?.todayList} columns={columns} rowKey="sectionId" ynum={266} />
|
||||
<ScrollTable dataSource={todayOpeningData?.todayList} columns={columns} rowKey="sectionId" ynum={260} rowClassName="scroll-select-bg0" tableKey={0} isScroll />
|
||||
</div>
|
||||
<div className="monitor-label-pointer" onClick={() => { window.open("/ElecMonitor/Supplier") }}>
|
||||
<ScreenLabel title="活跃供应商排名(Top20)" />
|
||||
|
@ -309,10 +309,10 @@ const Index: React.FC<{}> = () => {
|
||||
}
|
||||
|
||||
const handleOk = () => { // 确定修改密码
|
||||
changeForm.validateFields().then(res => {
|
||||
if (changeForm.getFieldValue("newPassword") !== changeForm.getFieldValue("newPassword1")) {
|
||||
message.warn('两次密码输入不一致,请重新输入')
|
||||
} else {
|
||||
changeForm.validateFields().then(res => {
|
||||
setSping(true);
|
||||
const date = {
|
||||
identityCard: changeForm.getFieldValue("identityCard"),
|
||||
@ -330,9 +330,9 @@ const Index: React.FC<{}> = () => {
|
||||
}
|
||||
}).finally(() => {
|
||||
setSping(false);
|
||||
});;
|
||||
})
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
//浏览器类型
|
||||
const BrowserType = () => {
|
||||
@ -652,62 +652,65 @@ const Index: React.FC<{}> = () => {
|
||||
<Form.Item
|
||||
label="新密码"
|
||||
name="newPassword"
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
validator: (rule, value, callback) => {
|
||||
const oNumber = new RegExp(/\d/);
|
||||
const oLetter = new RegExp(/[a-zA-Z]/);
|
||||
const oSpecial = '.~!@#$%^&*()_+=-{}|:<>?,./[]-;\\"';
|
||||
if (!value) {
|
||||
callback('请输入新密码');
|
||||
return;
|
||||
}
|
||||
if (value.length < 6) {
|
||||
callback('密码不能小于六位,至少含字母、数字、特殊字符其中的2种!');
|
||||
return;
|
||||
}
|
||||
try {
|
||||
[...value].forEach(val => {
|
||||
if (
|
||||
!(
|
||||
oNumber.test(val) ||
|
||||
oLetter.test(val) ||
|
||||
oSpecial.indexOf(val) >= 0
|
||||
)
|
||||
) {
|
||||
throw new Error();
|
||||
}
|
||||
});
|
||||
} catch (e) {
|
||||
callback('密码不能小于六位,至少含字母、数字、特殊字符其中的2种!');
|
||||
}
|
||||
const contain: boolean[] = [];
|
||||
[...value].forEach(val => {
|
||||
if (oNumber.test(val)) {
|
||||
contain[0] = true;
|
||||
}
|
||||
if (oLetter.test(val)) {
|
||||
contain[1] = true;
|
||||
}
|
||||
if (oSpecial.indexOf(val) >= 0) {
|
||||
contain[2] = true;
|
||||
}
|
||||
});
|
||||
if (contain.filter(item => item === true).length < 2) {
|
||||
callback('密码不能小于六位,至少含字母、数字、特殊字符其中的2种!');
|
||||
return;
|
||||
}
|
||||
callback();
|
||||
}
|
||||
}
|
||||
]}
|
||||
// rules={[
|
||||
// {
|
||||
// required: true,
|
||||
// message: '请输入新密码',
|
||||
// },
|
||||
// validator: (rule, value, callback) => {
|
||||
// const oNumber = new RegExp(/\d/);
|
||||
// const oLetter = new RegExp(/[a-zA-Z]/);
|
||||
// const oSpecial = '.~!@#$%^&*()_+=-{}|:<>?,./[]-;\\"';
|
||||
// if (!value) {
|
||||
// callback('请输入新密码');
|
||||
// return;
|
||||
// }
|
||||
// if (value.length < 6) {
|
||||
// callback('密码不能小于六位,至少含字母、数字、特殊字符其中的2种!');
|
||||
// return;
|
||||
// }
|
||||
// try {
|
||||
// [...value].forEach(val => {
|
||||
// if (
|
||||
// !(
|
||||
// oNumber.test(val) ||
|
||||
// oLetter.test(val) ||
|
||||
// oSpecial.indexOf(val) >= 0
|
||||
// )
|
||||
// ) {
|
||||
// throw new Error();
|
||||
// }
|
||||
// });
|
||||
// } catch (e) {
|
||||
// callback('密码不能小于六位,至少含字母、数字、特殊字符其中的2种!');
|
||||
// }
|
||||
// const contain: boolean[] = [];
|
||||
// [...value].forEach(val => {
|
||||
// if (oNumber.test(val)) {
|
||||
// contain[0] = true;
|
||||
// }
|
||||
// if (oLetter.test(val)) {
|
||||
// contain[1] = true;
|
||||
// }
|
||||
// if (oSpecial.indexOf(val) >= 0) {
|
||||
// contain[2] = true;
|
||||
// }
|
||||
// });
|
||||
// if (contain.filter(item => item === true).length < 2) {
|
||||
// callback('密码不能小于六位,至少含字母、数字、特殊字符其中的2种!');
|
||||
// return;
|
||||
// }
|
||||
// callback();
|
||||
// }
|
||||
// }
|
||||
// ]}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: '请输入新密码',
|
||||
}, {
|
||||
pattern: /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[`~!@#$%^&*()\-_=+\\|[{}\];:'",<.>/?])[a-zA-Z0-9`~!@#$%^&*()\-_=+\\|[{}\];:'",<.>/?]{8,20}$/,
|
||||
message: "密码不符合规则,密码长度8-20位,必须包含大小写字母、数字和特殊字符",
|
||||
}
|
||||
]}
|
||||
>
|
||||
<Input.Password />
|
||||
</Form.Item>
|
||||
|
Reference in New Issue
Block a user