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