9.1 评标室预约上传照片

This commit is contained in:
jl-zhoujl2
2022-09-01 09:38:29 +08:00
parent adb2068805
commit 286e3f1840
2 changed files with 163 additions and 13 deletions

View File

@ -12,8 +12,8 @@ import { UploadOutlined } from '@ant-design/icons';
import { btnAuthority } from '@/utils/authority';
import RiskPrevention from '@/utils/RiskPrevention';
import BidEvalAppointment from '@/components/ElecBidEvaluation/BidEvalAppointment';
import { downloadFile, downloadFileObjectId, getFileListByBid } from '@/utils/DownloadUtils';
import ExtendUpload from "@/utils/ExtendUpload";
import { downloadFile } from '@/utils/DownloadUtils';
import ExpertPhotoUpload from '@/components/ElecBidEvaluation/ExpertPhotoUpload';
const JudgingPanel: React.FC<{}> = () => {
const modalHeight = window.innerHeight * 96 / 100;
@ -49,7 +49,7 @@ const JudgingPanel: React.FC<{}> = () => {
const [selectEvalVisible, setSelectEvalVisible] = useState<boolean>(false);//电子评标室-评标室预约选择 2022.8.26 zhoujianlong
const [selectEvalDisabled, setSelectEvalDisabled] = useState<boolean>(true);//电子评标室-评标室预约选择不可选状态控制 true-不可填写 false-可填写 2022.8.26 zhoujianlong
const [selectEvalData, setSelectEvalData] = useState<any>();//电子评标室-评标室预约选择-数据 2022.8.26 zhoujianlong
const [userPhotoId, setUserPhotoId] = useState<string>("");//电子评标室-录入外部专家-相片id 2022.8.29 zhoujianlong
// const [userPhotoId, setUserPhotoId] = useState<string>("");//电子评标室-录入外部专家-相片id 2022.8.29 zhoujianlong
const [appoType, setAppoType] = useState<string>("0");//电子评标室-预约框状态 2022.8.29 zhoujianlong
function getShouName() {
@ -1000,10 +1000,10 @@ const JudgingPanel: React.FC<{}> = () => {
{ title: '通知结果备注', dataIndex: 'remark', },
{
title: '照片',
dataIndex: 'facePicName',
dataIndex: 'faceId',
render: (_, record) => {
if (record.facePicName) {
return <a onClick={() => downloadFileObjectId(record.facePicName)}>{record.name}</a>
if (record.faceId) {
return <a onClick={() => downloadFile({ uid: record.faceId })}>{record.name}</a>
};
return '-';
}
@ -1020,7 +1020,6 @@ const JudgingPanel: React.FC<{}> = () => {
updateKeyMemSet(record.key);
changeBtnSet(true);
formMem.setFieldsValue({ ...record });
setUserPhotoId(record.facePicName);
}}></Button>
<Popconfirm
placement="topRight"
@ -1038,7 +1037,6 @@ const JudgingPanel: React.FC<{}> = () => {
changeMemberIdSet(record.id);
changeBtnSet(false);
formMem.setFieldsValue({ ...record });
setUserPhotoId(record.facePicName);
}}></Button>
<Button type='text' hidden={!open || allEnd || btnAuthority(['ebtp-agency-project-manager', 'ebtp-purchase'])} onClick={async () => {
await rePassWord(record.id);
@ -1331,7 +1329,7 @@ const JudgingPanel: React.FC<{}> = () => {
onClose={() => {
setAdd(false);
changeBtnSet(true);
formMem.resetFields();
// formMem.resetFields();
}}
visible={add}
getContainer={false}
@ -1400,11 +1398,10 @@ const JudgingPanel: React.FC<{}> = () => {
</FormItem></Col></Row>
<Form.Item label="照片" style={{ marginBottom: 0 }}>
<Form.Item
name="facePicName"
name="faceId"
style={{ display: 'inline-block', width: '60%' }}
>
<ExtendUpload bid={userPhotoId} btnName="上传照片" maxCount={1} maxSize={30} uploadProps={{ name: "file", disabled: false, accept: ".jpeg,.jpg,.png", listType: 'picture', onPreview(file) { window.open(file.url) }, }}>
</ExtendUpload>
<ExpertPhotoUpload maxSize={60} />
</Form.Item>
<Form.Item
style={{ display: 'inline-block', width: '40%', position: "relative", right: '24%' }}
@ -1758,7 +1755,7 @@ const JudgingPanel: React.FC<{}> = () => {
if (res?.code == 200) {
const data = res?.data;
if (data) {
setUserPhotoId(data);
formMem.setFieldsValue({ faceId: data });
message.info("获取专家照片成功");
} else {
message.info("当前专家无照片,请上传");