现场人员,人员报道情况
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { Form, Input, Modal, Spin, Button, Radio, RadioChangeEvent } from 'antd';
|
||||
|
||||
import React, { useEffect, useRef, useState } from 'react';
|
||||
import { Modal, Button, Descriptions, message } from 'antd';
|
||||
import { getUserList } from '../service';
|
||||
import ProTable, { ActionType } from '@ant-design/pro-table';
|
||||
|
||||
interface PersonReportModalProps {
|
||||
title: any;
|
||||
@ -8,35 +9,63 @@ interface PersonReportModalProps {
|
||||
values: any;
|
||||
onCancel: () => void;
|
||||
}
|
||||
const layout = {
|
||||
labelCol: { span: 7 },
|
||||
wrapperCol: { span: 12 },
|
||||
};
|
||||
const PersonReportModal: React.FC<PersonReportModalProps> = (props) => {
|
||||
const [form] = Form.useForm();
|
||||
// const weboffice = useRef<Weboffice>(null);
|
||||
const checkRelationRef = useRef<ActionType>(); //操作数据后刷新列表
|
||||
const { title, modalVisible, values, onCancel, } = props;
|
||||
//loading
|
||||
const [loading, setLoading] = useState<boolean>(false);
|
||||
const [value, setValue] = useState<string>("1");
|
||||
const [userForm, setUserForm] = useState<any>({});
|
||||
|
||||
const onChange = (e: RadioChangeEvent) => {
|
||||
console.log('radio checked', e.target.value);
|
||||
setValue(e.target.value);
|
||||
};
|
||||
const columns: any = [
|
||||
{
|
||||
title: '序号',
|
||||
valueType: 'index',
|
||||
width: 80,
|
||||
search: false,
|
||||
},
|
||||
{
|
||||
title: '人员',
|
||||
dataIndex: 'userName',
|
||||
},
|
||||
{
|
||||
title: '报道状态',
|
||||
dataIndex: 'status',
|
||||
search: false,
|
||||
valueEnum: {
|
||||
0: { text: '未报道' },
|
||||
1: { text: '已报道' },
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '报道时间',
|
||||
dataIndex: 'signDate',
|
||||
valueType: 'dateTime',
|
||||
search: false,
|
||||
},
|
||||
{
|
||||
title: '签到状态',
|
||||
dataIndex: 'loginStatus',
|
||||
valueEnum: {
|
||||
1: { text: '未签到' },
|
||||
2: { text: '已签到' },
|
||||
3: { text: '已申请回避' },
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '签到时间',
|
||||
dataIndex: 'loginDate',
|
||||
valueType: 'dateTime',
|
||||
search: false,
|
||||
},
|
||||
]
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
if (JSON.stringify(values) !== "{}") {
|
||||
form.setFieldsValue({
|
||||
"id": values.id,
|
||||
"evalPlaceId": {label: values.eroomName,value: values.evalPlaceId},
|
||||
"facePic": values.facePic,
|
||||
"sex": values.sex,
|
||||
"personName": values.personName,
|
||||
"identityCard": values.identityCard
|
||||
});
|
||||
getUserList(values.id).then(res => {
|
||||
if (res.code == 200) {
|
||||
setUserForm(res?.data)
|
||||
} else {
|
||||
message.error("数据错误请联系管理员")
|
||||
}
|
||||
})
|
||||
}, [values])
|
||||
|
||||
|
||||
@ -59,63 +88,31 @@ const PersonReportModal: React.FC<PersonReportModalProps> = (props) => {
|
||||
centered
|
||||
footer={renderFooter()}
|
||||
>
|
||||
<Spin spinning={loading}>
|
||||
<Form
|
||||
{...layout}
|
||||
name="nest-messages"
|
||||
form={form}
|
||||
preserve={false}
|
||||
>
|
||||
<Form.Item name="id" label="id" hidden>
|
||||
<Input hidden />
|
||||
</Form.Item>
|
||||
<Descriptions >
|
||||
<Descriptions.Item label="项目编号" key="projectNum">{values.projectNum}</Descriptions.Item>
|
||||
<Descriptions.Item label="标段名称" key="packageNames">{values.packageNames}</Descriptions.Item>
|
||||
<Descriptions.Item label="评标室名称" key="areaName">{values.areaName}</Descriptions.Item>
|
||||
<Descriptions.Item label="预约人" key="reserveBy">{values.reserveBy}</Descriptions.Item>
|
||||
<Descriptions.Item label="预约联系电话" key="reserveContactNumber">{values.reserveContactNumber}</Descriptions.Item>
|
||||
<Descriptions.Item label="预计评标开始时间" key="reserveStartDate">{values.reserveStartDate}</Descriptions.Item>
|
||||
<Descriptions.Item label="预计评标结束时间" key="reserveEndDate">{values.reserveEndDate}</Descriptions.Item>
|
||||
<Descriptions.Item label="开始录制时间" key="realStartDate">{values.realStartDate}</Descriptions.Item>
|
||||
<Descriptions.Item label="结束录制时间" key="realEndDate">{values.realEndDate}</Descriptions.Item>
|
||||
<Descriptions.Item label="专家人数" key="expertAmount">{userForm.expertAmount}</Descriptions.Item>
|
||||
<Descriptions.Item label="采购人代表" key="purchaseExpertAmount">{userForm.purchaseExpertAmount}</Descriptions.Item>
|
||||
<Descriptions.Item label="招标代理机构" key="manageAmount">{userForm.manageAmount}</Descriptions.Item>
|
||||
</Descriptions>
|
||||
|
||||
<Form.Item
|
||||
label="人员姓名"
|
||||
name="personName"
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: '当前项不可为空',
|
||||
},
|
||||
]}
|
||||
>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label="身份证号"
|
||||
name="identityCard"
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: '当前项不可为空',
|
||||
},
|
||||
{
|
||||
pattern: /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/,
|
||||
message: '输入的身份证号不正确',
|
||||
},
|
||||
]}
|
||||
>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label="性别"
|
||||
name="sex"
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: '当前项不可为空',
|
||||
},
|
||||
]}
|
||||
>
|
||||
{/* 1-男性,2-女性 */}
|
||||
<Radio.Group onChange={onChange} value={value}>
|
||||
<Radio value="1">男性</Radio>
|
||||
<Radio value="2">女性 </Radio>
|
||||
</Radio.Group>
|
||||
</Form.Item>
|
||||
</Form>
|
||||
</Spin>
|
||||
<h3 className="first-title" style={{ marginTop: '8px' }}>报道信息</h3>
|
||||
<ProTable
|
||||
actionRef={checkRelationRef}
|
||||
columns={columns}
|
||||
options={false}
|
||||
size='small'
|
||||
search={false}
|
||||
dataSource={userForm.userList}
|
||||
pagination={false}//默认显示条数
|
||||
/>
|
||||
</Modal>
|
||||
);
|
||||
};
|
||||
|
@ -1,13 +1,12 @@
|
||||
import React, { useEffect, useRef, useState } from 'react';
|
||||
import ProTable, { ActionType } from '@ant-design/pro-table';
|
||||
import { getList } from './service';
|
||||
import { Button, Card, Form, message, Spin } from 'antd';
|
||||
import { Card, Spin } from 'antd';
|
||||
import PersonReportModal from './components/PersonReportModal';
|
||||
|
||||
const PersonReport: React.FC<{}> = () => {
|
||||
const checkRelationRef = useRef<ActionType>(); //操作数据后刷新列表
|
||||
const [isEditModalVisible, setIsEditModalVisible] = useState<boolean>(false) //控制新增或编辑模态框是否显示
|
||||
// const [editForm] = Form.useForm();//编辑模块form
|
||||
//单条数据
|
||||
const [editForm, setEditForm] = useState<any>({});
|
||||
const [spinning, setSping] = useState<boolean>(false);//加载遮罩
|
||||
@ -66,12 +65,11 @@ const PersonReport: React.FC<{}> = () => {
|
||||
title: '报道状态',
|
||||
dataIndex: 'reportStatus',
|
||||
search: false,
|
||||
// render: (text: any, record: any) => {
|
||||
// return (
|
||||
// <>
|
||||
// </>
|
||||
// )
|
||||
// }
|
||||
valueEnum: {
|
||||
"all": { text: '全部报道' },
|
||||
"half": { text: '部分报道' },
|
||||
"none": { text: '未报道' },
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
@ -101,7 +99,7 @@ const PersonReport: React.FC<{}> = () => {
|
||||
return (
|
||||
<>
|
||||
<Spin spinning={spinning}>
|
||||
<Card title="评标场所人员管理">
|
||||
<Card title="人员报道情况查询">
|
||||
|
||||
<ProTable
|
||||
actionRef={checkRelationRef}
|
||||
@ -110,7 +108,6 @@ const PersonReport: React.FC<{}> = () => {
|
||||
size='small'
|
||||
search={{
|
||||
labelWidth: 100,
|
||||
// defaultCollapsed: false,//是否展开搜索条件
|
||||
optionRender: (searchConfig, formProps, dom) => [
|
||||
...dom.reverse(),
|
||||
],
|
||||
@ -142,11 +139,11 @@ const PersonReport: React.FC<{}> = () => {
|
||||
pagination={{ defaultPageSize: 10, showSizeChanger: false }}//默认显示条数
|
||||
/>
|
||||
</Card>
|
||||
{/* 新增及编辑银行账号Modal */}
|
||||
{/* 报道详情Modal */}
|
||||
{
|
||||
isEditModalVisible ?
|
||||
<PersonReportModal
|
||||
title={"人员信息"}
|
||||
title={"报道详情"}
|
||||
modalVisible={isEditModalVisible}
|
||||
values={editForm}
|
||||
onCancel={() => {
|
||||
|
@ -11,30 +11,8 @@ export async function getList(params?: any) {
|
||||
}
|
||||
|
||||
|
||||
export async function getPlaceList() { // 列表
|
||||
return request('/api/biz-service-ebtp-evaluation/v1/elec/eval/place/userlimit/list', {
|
||||
export async function getUserList(reserveId?: string) { // 根据预约ID查询预约人员列表报道列表及预约人员分类及数量
|
||||
return request('/api/biz-service-ebtp-evaluation/v1/eleceval/expert/number/report/'+reserveId, {
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增
|
||||
* @param params
|
||||
*/
|
||||
export async function saveSitePerson(data?: any) {
|
||||
return request('/api/biz-service-ebtp-evaluation/v1/eval/room/site/person/save', {
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* @param params
|
||||
*/
|
||||
export async function delSitePerson(id?: any) {
|
||||
return request('/api/biz-service-ebtp-evaluation/v1/eval/room/site/person/delete?id='+id, {
|
||||
method: 'post',
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { Form, Input, Modal, Spin, Select, Button, Radio, RadioChangeEvent } from 'antd';
|
||||
import ExtendUpload from "@/utils/ExtendUpload";
|
||||
import { getFileListByBid } from '@/utils/DownloadUtils';
|
||||
import ExpertPhotoUpload from '@/components/ElecBidEvaluation/ExpertPhotoUpload';
|
||||
|
||||
|
||||
interface SitePersonModalProps {
|
||||
@ -20,7 +19,6 @@ const layout = {
|
||||
};
|
||||
const SitePersonModal: React.FC<SitePersonModalProps> = (props) => {
|
||||
const [form] = Form.useForm();
|
||||
// const weboffice = useRef<Weboffice>(null);
|
||||
const { title, modalVisible, formDisabled, type, values, onSubmit: handleUpdate, onCancel, placeList } = props;
|
||||
//loading
|
||||
const [loading, setLoading] = useState<boolean>(false);
|
||||
@ -36,7 +34,7 @@ const SitePersonModal: React.FC<SitePersonModalProps> = (props) => {
|
||||
if (JSON.stringify(values) !== "{}") {
|
||||
form.setFieldsValue({
|
||||
"id": values.id,
|
||||
"evalPlaceId": {label: values.eroomName,value: values.evalPlaceId},
|
||||
"evalPlaceId": { label: values.eroomName, value: values.evalPlaceId },
|
||||
"facePic": values.facePic,
|
||||
"sex": values.sex,
|
||||
"personName": values.personName,
|
||||
@ -52,10 +50,11 @@ const SitePersonModal: React.FC<SitePersonModalProps> = (props) => {
|
||||
setLoading(true)
|
||||
fieldsValue["evalPlaceId"] = fieldsValue.evalPlaceId.value
|
||||
console.log(fieldsValue)
|
||||
fieldsValue["facePicName"] = fieldsValue.personName
|
||||
|
||||
await getFileListByBid(fieldsValue.facePic).then(res => {
|
||||
fieldsValue["facePicName"] = res[0].name
|
||||
})
|
||||
// await getFileListByBid(fieldsValue.facePic).then(res => {
|
||||
// fieldsValue["facePicName"] = res[0].name
|
||||
// })
|
||||
console.log(fieldsValue)
|
||||
await handleUpdate({ ...fieldsValue }).finally(() => {
|
||||
setLoading(false)
|
||||
@ -100,7 +99,14 @@ const SitePersonModal: React.FC<SitePersonModalProps> = (props) => {
|
||||
<Form.Item name="id" label="id" hidden>
|
||||
<Input hidden />
|
||||
</Form.Item>
|
||||
<Form.Item name="evalPlaceId" label="选择评标场所" >
|
||||
<Form.Item name="evalPlaceId" label="选择评标场所"
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: '当前项不可为空',
|
||||
},
|
||||
]}
|
||||
>
|
||||
<Select placeholder="请选择评标场所" labelInValue disabled={formDisabled}>
|
||||
{
|
||||
placeList.map((item: any, index: any) => {
|
||||
@ -159,17 +165,15 @@ const SitePersonModal: React.FC<SitePersonModalProps> = (props) => {
|
||||
<Form.Item
|
||||
label="人脸照片"
|
||||
name="facePic"
|
||||
style={{ marginBottom: 0 }}
|
||||
extra="请上传清晰人脸正面照片,要求.jpg格式图片,文件大下不得超过60kb"
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: '当前项不可为空',
|
||||
},
|
||||
]}
|
||||
>
|
||||
<ExtendUpload bid={values.facePic} btnName="上传" maxCount={1} maxSize={0.057} uploadProps={{ accept: ".jpg" }}>
|
||||
{/* maxSize={0.057} */}
|
||||
</ExtendUpload>
|
||||
]}>
|
||||
<ExpertPhotoUpload maxSize={60} />
|
||||
</Form.Item>
|
||||
</Form>
|
||||
</Spin>
|
||||
|
@ -3,7 +3,7 @@ import ProTable, { ActionType } from '@ant-design/pro-table';
|
||||
import { getList, saveSitePerson, delSitePerson, getPlaceList } from './service';
|
||||
import { Button, Card, Form, message, Spin, Popconfirm } from 'antd';
|
||||
import SitePersonModal from './components/SitePersonModal';
|
||||
import { downloadFileObjectId } from '@/utils/DownloadUtils';
|
||||
import { downloadFile } from '@/utils/DownloadUtils';
|
||||
|
||||
|
||||
const SitePersonList: React.FC<{}> = () => {
|
||||
@ -57,8 +57,7 @@ const SitePersonList: React.FC<{}> = () => {
|
||||
search: false,
|
||||
render: (text: any, record: any) => {
|
||||
return (
|
||||
<>
|
||||
<a onClick={() => downloadFileObjectId(record.facePic)}>{record.facePicName}</a>
|
||||
<><a onClick={() => downloadFile({ uid: record.facePic })}>{record.facePicName}</a>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
Reference in New Issue
Block a user