9.16 评委会自动获取照片
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
import React, { useEffect, useRef, useState } from 'react';
|
||||
import { Button, Checkbox, Col, Collapse, DatePicker, Drawer, Form, Input, message, Modal, Popconfirm, Row, Select, Spin, Tabs, Upload } from 'antd'
|
||||
import { Button, Checkbox, Col, Collapse, DatePicker, Drawer, Form, Input, message, Modal, Popconfirm, Row, Select, Spin, Tabs, Upload, Image } from 'antd'
|
||||
import ProTable, { ActionType, ProColumns } from '@ant-design/pro-table';
|
||||
import { getList, getSecs, saveGroup, delOne, saveMember, changeEx, queryVoList, changeMember, applyFor, roomStatus, juryTem, rePassWord, getUserPhoto } from './service';
|
||||
import moment from 'moment';
|
||||
@ -12,7 +12,7 @@ import { UploadOutlined } from '@ant-design/icons';
|
||||
import { btnAuthority } from '@/utils/authority';
|
||||
import RiskPrevention from '@/utils/RiskPrevention';
|
||||
import BidEvalAppointment from '@/components/ElecBidEvaluation/BidEvalAppointment';
|
||||
import { downloadFile } from '@/utils/DownloadUtils';
|
||||
import { downloadFile, downloadPath } from '@/utils/DownloadUtils';
|
||||
import ExpertPhotoUpload from '@/components/ElecBidEvaluation/ExpertPhotoUpload';
|
||||
|
||||
const JudgingPanel: React.FC<{}> = () => {
|
||||
@ -1011,7 +1011,8 @@ const JudgingPanel: React.FC<{}> = () => {
|
||||
dataIndex: 'faceId',
|
||||
render: (_, record) => {
|
||||
if (record.faceId) {
|
||||
return <a onClick={() => downloadFile({ uid: record.faceId })}>{record.name}</a>
|
||||
// return <a onClick={() => downloadFile({ uid: record.faceId })}>{record.name}</a>
|
||||
return <Image height={80} width={60} src={downloadPath + '?fileId=' + record.faceId} />
|
||||
};
|
||||
return '-';
|
||||
}
|
||||
@ -1402,7 +1403,7 @@ const JudgingPanel: React.FC<{}> = () => {
|
||||
},
|
||||
]}
|
||||
>
|
||||
<Input style={{ width: "60%" }} />
|
||||
<Input style={{ width: "60%" }} onChange={onCertificateChange} />
|
||||
</FormItem></Col></Row>
|
||||
<Form.Item label="照片" style={{ marginBottom: 0 }}>
|
||||
<Form.Item
|
||||
@ -1414,7 +1415,7 @@ const JudgingPanel: React.FC<{}> = () => {
|
||||
<Form.Item
|
||||
style={{ display: 'inline-block', width: '40%', position: "relative", right: '24%' }}
|
||||
>
|
||||
<Button type='primary' onClick={() => getExpertPhoto()}>获取照片</Button>
|
||||
{/* <Button type='primary' onClick={() => getExpertPhoto()}>获取照片</Button> */}
|
||||
</Form.Item>
|
||||
</Form.Item>
|
||||
{/* <Row><Col span={24}><FormItem
|
||||
@ -1463,7 +1464,7 @@ const JudgingPanel: React.FC<{}> = () => {
|
||||
setAdd(false);
|
||||
}
|
||||
loadingSet(false);
|
||||
}}>暂存</Button>
|
||||
}}>保存</Button>
|
||||
<Button type="primary" loading={loading} hidden={changeBtn || btnAuthority(['ebtp-agency-project-manager', 'ebtp-purchase'])} onClick={async () => {
|
||||
loadingSet(true);
|
||||
let formValsMem = formMem.getFieldsValue();
|
||||
@ -1764,14 +1765,20 @@ const JudgingPanel: React.FC<{}> = () => {
|
||||
const data = res?.data;
|
||||
if (data) {
|
||||
formMem.setFieldsValue({ faceId: data });
|
||||
message.info("获取专家照片成功");
|
||||
} else {
|
||||
message.info("当前专家无照片,请上传");
|
||||
formMem.setFieldsValue({ faceId: null });
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
//身份证号onchange
|
||||
const onCertificateChange = (e: { target: { value: any; }; }) => {
|
||||
const data = e.target.value;
|
||||
if (data.length == 18) {
|
||||
getExpertPhoto();
|
||||
}
|
||||
}
|
||||
return (
|
||||
<div className='bgCWhite' style={{ padding: '0px 24px 24px' }}>
|
||||
<Spin spinning={spin}>
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React, { useEffect, useRef, useState } from 'react';
|
||||
import { Button, Checkbox, Col, Collapse, DatePicker, Drawer, Form, Input, message, Modal, Popconfirm, Row, Select, Spin, Tabs, Upload } from 'antd'
|
||||
import { Button, Checkbox, Col, Collapse, DatePicker, Drawer, Form, Input, message, Modal, Popconfirm, Row, Select, Spin, Tabs, Upload, Image } from 'antd'
|
||||
import ProTable, { ActionType, ProColumns } from '@ant-design/pro-table';
|
||||
import { getList, saveGroup, delOne, saveMember, changeEx, queryVoList, changeMember, applyFor, roomStatus, juryTem, rePassWord } from './service';
|
||||
import moment from 'moment';
|
||||
@ -12,7 +12,7 @@ import { UploadOutlined } from '@ant-design/icons';
|
||||
import { btnAuthority } from '@/utils/authority';
|
||||
import RiskPrevention from '@/utils/RiskPrevention';
|
||||
import { history } from 'umi';
|
||||
import { downloadFile } from '@/utils/DownloadUtils';
|
||||
import { downloadFile, downloadPath } from '@/utils/DownloadUtils';
|
||||
import ExpertPhotoUpload from '@/components/ElecBidEvaluation/ExpertPhotoUpload';
|
||||
import { getUserPhoto } from '@/pages/Tender/ProjectManager/JudgingPanel/List/service';
|
||||
import BidEvalAppointment from '@/components/ElecBidEvaluation/BidEvalAppointment';
|
||||
@ -891,7 +891,8 @@ const JudgingPanel: React.FC<{}> = () => {
|
||||
dataIndex: 'faceId',
|
||||
render: (_, record) => {
|
||||
if (record.faceId) {
|
||||
return <a onClick={() => downloadFile({ uid: record.faceId })}>{record.name}</a>
|
||||
// return <a onClick={() => downloadFile({ uid: record.faceId })}>{record.name}</a>
|
||||
return <Image height={80} width={60} src={downloadPath + '?fileId=' + record.faceId} />
|
||||
};
|
||||
return '-';
|
||||
}
|
||||
@ -1282,7 +1283,7 @@ const JudgingPanel: React.FC<{}> = () => {
|
||||
},
|
||||
]}
|
||||
>
|
||||
<Input style={{ width: "60%" }} />
|
||||
<Input style={{ width: "60%" }} onChange={onCertificateChange} />
|
||||
</FormItem></Col></Row>
|
||||
<Form.Item label="照片" style={{ marginBottom: 0 }}>
|
||||
<Form.Item
|
||||
@ -1294,7 +1295,7 @@ const JudgingPanel: React.FC<{}> = () => {
|
||||
<Form.Item
|
||||
style={{ display: 'inline-block', width: '40%', position: "relative", right: '24%' }}
|
||||
>
|
||||
<Button type='primary' onClick={() => getExpertPhoto()}>获取照片</Button>
|
||||
{/* <Button type='primary' onClick={() => getExpertPhoto()}>获取照片</Button> */}
|
||||
</Form.Item>
|
||||
</Form.Item>
|
||||
{/* <Row><Col span={24}><FormItem
|
||||
@ -1343,7 +1344,7 @@ const JudgingPanel: React.FC<{}> = () => {
|
||||
setAdd(false);
|
||||
}
|
||||
loadingSet(false);
|
||||
}}>暂存</Button>
|
||||
}}>保存</Button>
|
||||
<Button type="primary" loading={loading} hidden={changeBtn || btnAuthority(['ebtp-agency-project-manager', 'ebtp-purchase'])} onClick={async () => {
|
||||
loadingSet(true);
|
||||
let formValsMem = formMem.getFieldsValue();
|
||||
@ -1652,6 +1653,13 @@ const JudgingPanel: React.FC<{}> = () => {
|
||||
})
|
||||
})
|
||||
}
|
||||
//身份证号onchange
|
||||
const onCertificateChange = (e: { target: { value: any; }; }) => {
|
||||
const data = e.target.value;
|
||||
if (data.length == 18) {
|
||||
getExpertPhoto();
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<div className='bgCWhite' style={{ padding: '24px' }}>
|
||||
|
Reference in New Issue
Block a user