diff --git a/src/components/ElecBidEvaluation/ExpertPhotoUpload.tsx b/src/components/ElecBidEvaluation/ExpertPhotoUpload.tsx index 32ad7f5..3040d00 100644 --- a/src/components/ElecBidEvaluation/ExpertPhotoUpload.tsx +++ b/src/components/ElecBidEvaluation/ExpertPhotoUpload.tsx @@ -148,7 +148,7 @@ const ExpertPhotoUpload: React.FC = (props) => { > {uploadProps?.disabled || fileList.length >= 1 ? null : uploadButton} - + example diff --git a/src/pages/Tender/ProjectManager/JudgingPanel/List/OutsourcingManage.tsx b/src/pages/Tender/ProjectManager/JudgingPanel/List/OutsourcingManage.tsx index 424d23b..4308ec5 100644 --- a/src/pages/Tender/ProjectManager/JudgingPanel/List/OutsourcingManage.tsx +++ b/src/pages/Tender/ProjectManager/JudgingPanel/List/OutsourcingManage.tsx @@ -7,6 +7,7 @@ import React, { useEffect, useState } from "react"; import './judgList.less'; import '@/assets/xsy_style.less'; import { saveAssistPeople } from "./service"; +import { isEmpty } from "@/utils/CommonUtils"; interface OutsourcingManageProps { modalVisible: boolean, @@ -124,6 +125,17 @@ const OutsourcingManage: React.FC = (props) => { // }} onOk={() => { if (Number(assistNumber) == dataSource.length) { + let count = 0 + for (let i = 0, length = dataSource.length; i < length; i++) { + const item = dataSource[i]; + if (isEmpty(item.faceId)) { + count += 1; + } + } + if (count > 0) { + message.error(`请上传专家照片`); + return; + } const params = { juryId, assistList: [...dataSource], @@ -252,18 +264,19 @@ const OutsourcingManage: React.FC = (props) => { > - + 若预约了电子评标室,请提前维护外协人员照片,避免无法进入电子评标室。} + style={{ display: 'inline-block', width: '80%' }} + rules={[{ required: true, message: "请上传照片" }]} + extra={要求本人清晰、免冠、正面彩色2寸头像照片,无逆光、无ps、无美颜,面部五官无遮挡,头像部约占照片高度的三分之二,照片保存格式为JPG格式,大小400k以下} > - + - - + */} @@ -1204,6 +1206,7 @@ const JudgingPanel: React.FC<{}> = () => { checkBoxsSet([]); changeMemberIdSet(''); setCheckedList([]); + setReserveStatus(false); form.resetFields(); } const columnsMember: ProColumns[] = [//成员管理页面表格 @@ -1616,19 +1619,20 @@ const JudgingPanel: React.FC<{}> = () => { > - + 评审专家照片为专家进入电子评标室报道及人脸识别认证使用,若预约了电子评标室,请维护专家照片。} + style={{ display: 'inline-block', width: '80%' }} + rules={[{ required: reserveStatus, message: "请上传照片" }]} + extra={要求本人清晰、免冠、正面彩色2寸头像照片,无逆光、无ps、无美颜,面部五官无遮挡,头像部约占照片高度的三分之二,照片保存格式为JPG格式,大小400k以下} > - - - - {/* */} + + {/* */} + {/* */} + {/* */} {/* = () => { // qita != undefined && qita.extractNumber==qita.juryMemberList.length ? params.push(...qita.juryMemberList) : null; if (chackNum) { + let count = 0 + for (let i = 0, length = params.length; i < length; i++) { + const item = params[i]; + if (isEmpty(item.faceId)) { + count += 1; + } + } + if (count > 0) { + message.error(`请上传专家照片`); + loadingSet(false); + return; + } const success = await saveMember({ juryMemberDTOList: params }).then((res) => { return res.success }); @@ -1889,7 +1905,7 @@ const JudgingPanel: React.FC<{}> = () => { centered destroyOnClose title="评审小组成员管理" - bodyStyle={{ maxHeight: modalHeight - 140, overflow: 'auto', minHeight: '300px', padding: '16px 0px 0px 0px' }} + bodyStyle={{ maxHeight: modalHeight - 140, overflow: 'auto', minHeight: '350px', padding: '16px 0px 0px 0px' }} footer={returnFooterMem()} onCancel={() => { setMemberVis(false); diff --git a/src/pages/ZZhaoMu/JudgingPanel/index.tsx b/src/pages/ZZhaoMu/JudgingPanel/index.tsx index 471e357..146380c 100644 --- a/src/pages/ZZhaoMu/JudgingPanel/index.tsx +++ b/src/pages/ZZhaoMu/JudgingPanel/index.tsx @@ -17,6 +17,7 @@ import { getUserPhoto, unlockAccount } from '@/pages/Tender/ProjectManager/Judgi import BidEvalAppointment from '@/components/ElecBidEvaluation/BidEvalAppointment'; import OutsourcingManage from '@/pages/Tender/ProjectManager/JudgingPanel/List/OutsourcingManage'; import { dateTimeFormatter } from '@/utils/DateUtils'; +import { isEmpty } from '@/utils/CommonUtils'; const JudgingPanel: React.FC<{}> = (props: any) => { const modalHeight = window.innerHeight * 96 / 100; @@ -56,6 +57,7 @@ const JudgingPanel: React.FC<{}> = (props: any) => { const [isReserve, setIsReserve] = useState("0");//电子评标室-是否预约电子评标室 2022.9.23 zhoujianlong 0-不预约 1-预约 const userData = getSessionUserData();//当前登录人用户信息 const [assistVisible, setAssistVisible] = useState(false);//协办管理visible 2022.10.10 zhoujianlong + const [reserveStatus, setReserveStatus] = useState(false);//成员管理-当前行是否预约了评标室 true-预约了 false-没预约 //外协管理 const [assistList, setAssistList] = useState([]);//外协人员数据 assistList const [assistNumber, setAssistNumber] = useState("");//外协人员数量 assistNumber @@ -155,6 +157,7 @@ const JudgingPanel: React.FC<{}> = (props: any) => { await queryOpenStatus(record.id); categorySet(record.juryCategoryVOList); juryIdSet(record.id); + setReserveStatus(record.reserveStatus === 1); memberCountSet(memberCount + 1); setMemberVis(true); }}>成员管理 @@ -1072,6 +1075,7 @@ const JudgingPanel: React.FC<{}> = (props: any) => { updateKeyMemSet(-1); checkBoxsSet([]); changeMemberIdSet(''); + setReserveStatus(false); form.resetFields(); } const columnsMember: ProColumns[] = [//成员管理页面表格 @@ -1484,19 +1488,20 @@ const JudgingPanel: React.FC<{}> = (props: any) => { > - + 评审专家照片为专家进入电子评标室报道及人脸识别认证使用,若预约了电子评标室,请维护专家照片。} + style={{ display: 'inline-block', width: '80%' }} + rules={[{ required: reserveStatus, message: "请上传照片" }]} + extra={要求本人清晰、免冠、正面彩色2寸头像照片,无逆光、无ps、无美颜,面部五官无遮挡,头像部约占照片高度的三分之二,照片保存格式为JPG格式,大小400k以下} > - - - - {/* */} + + {/* */} + {/* */} + {/* */} {/* = (props: any) => { // qita != undefined && qita.extractNumber==qita.juryMemberList.length ? params.push(...qita.juryMemberList) : null; if (chackNum) { + let count = 0 + for (let i = 0, length = params.length; i < length; i++) { + const item = params[i]; + if (isEmpty(item.faceId)) { + count += 1; + } + } + if (count > 0) { + message.error(`请上传专家照片`); + loadingSet(false); + return; + } const success = await saveMember({ juryMemberDTOList: params, roomId: roomId }).then((res) => { return res.success }); @@ -1757,7 +1774,7 @@ const JudgingPanel: React.FC<{}> = (props: any) => { centered destroyOnClose title="评审小组成员管理" - bodyStyle={{ maxHeight: modalHeight - 140, overflow: 'auto', minHeight: '300px', padding: '16px 0px 0px 0px' }} + bodyStyle={{ maxHeight: modalHeight - 140, overflow: 'auto', minHeight: '350px', padding: '16px 0px 0px 0px' }} footer={returnFooterMem()} onCancel={() => { setMemberVis(false); diff --git a/src/pages/userformal/login/index.tsx b/src/pages/userformal/login/index.tsx index 6f4ed66..4ba4663 100644 --- a/src/pages/userformal/login/index.tsx +++ b/src/pages/userformal/login/index.tsx @@ -2,7 +2,7 @@ import React, { useEffect, useState, useRef } from 'react'; import { Form, Button, Input, Row, Col, Modal, Spin, message, Tabs } from 'antd'; import { UserOutlined, LockOutlined, SafetyCertificateOutlined } from '@ant-design/icons'; import './style.less'; -import { changePass } from './service'; +import { changePass, showFaceTab } from './service'; import logo from '@/images/login/logoPic.png'; import { refreshTokenApi, ZjfakeAccountLogin, ZjfakeFaceLogin } from '@/services/login'; import { history } from 'umi'; @@ -40,6 +40,7 @@ const Index: React.FC<{}> = () => { const { TabPane } = Tabs; const [submitLoading, setSubmitLoading] = useState(false); const [faceLoginDisable, setFaceLoginDisable] = useState(false); + const [faceLoginShow, setFaceLoginShow] = useState(false); const lv = useRef(); const [timerShow, setTimeShow] = useState(false); const [itemShow, setItemShow] = useState(false); @@ -496,6 +497,11 @@ const Index: React.FC<{}> = () => { } return false; } + //是否显示人脸登录 + const showFaceLogin = async () => { + const res = await showFaceTab(); + setFaceLoginShow(res?.data === 1); + } useEffect(() => { @@ -505,6 +511,7 @@ const Index: React.FC<{}> = () => { if (!allowedToFaceLogin()) { setFaceLoginDisable(true); } + showFaceLogin(); }, []); useEffect(() => { @@ -592,49 +599,51 @@ const Index: React.FC<{}> = () => { - {/* -
- + + - - } - placeholder="请输入用户名" - /> - - - - {!whetherIE.current ? () : ()} - - - - - -
-
*/} - {/* 加载摄像头 */} - {/* */} - {/* */} - {/* onClick={() => {hanleFaceSubmit(null, null);}} */} + + + } + placeholder="请输入用户名" + /> + + + + {!whetherIE.current ? () : ()} + + + + + + + + {/* 加载摄像头 */} + + + {/* onClick={() => {hanleFaceSubmit(null, null);}} */} + } diff --git a/src/pages/userformal/login/service.ts b/src/pages/userformal/login/service.ts index 48828ed..88f7353 100644 --- a/src/pages/userformal/login/service.ts +++ b/src/pages/userformal/login/service.ts @@ -17,11 +17,19 @@ export async function changePass(params: any) { */ export async function rgbToBase64(params: any) { const _body = JSON.stringify({//post请求参数 - type: 'pixel', + type: 'pixel', rgb: params.image }); return request('/api/core-service-ebtp-userinfo/outer/v1/ebtp/face/rgbArray2Base64', { method: 'post', - body:_body, + body: _body, }); +} + +/** + * 是否显示人脸识别tab + * @param params + */ +export async function showFaceTab() { + return request('/api/biz-service-ebtp-extend//v1/BizFuncSwitchConfig/bizfuncswitchconfig/getFaceRecognitionFlag'); } \ No newline at end of file