Commit 4b7d3110 authored by MrShi's avatar MrShi

[fix] 访客记录模块

parent 93acc448
......@@ -27,13 +27,17 @@ import { objectColumns } from '@/utils/string';
// updateTime: "Sep 7, 2020 6:13:06 PM"
// visitorsName: "销赃"
// visitorsPhone: "18535669865"
const columns = objectColumns( [
["User Name", "inviterName"],
["Visitor", "visitorsName"],
["Security Guard", "securityGuardName"],
["Number Plate", "numberPlate"],
["Address", "inviterAddress"],
["Actions",null, (text: any, record: any) => (<Space size="middle"> <a>Detail</a></Space>)],
["time", "updateTime"],
["community", "visitorCommunity"],
["unit", "inviterAddress"]
// ["Actions",null, (text: any, record: any) => (<Space size="middle"> <a>Detail</a></Space>)],
])
import TitleSearch from '@/components/TitleSearch/TitleSearch'
......@@ -42,16 +46,30 @@ const module="VisitorRecord"
const VisitorRecord = (props:any) => {
const { dispatch, Data } = props;
const TosVisitorRecordGet = (values: any) => { dispatch({ type: 'tosVisitorRecord/get', playload: values }) };
useEffect(() => {
RA(26,{inviterAddress: "", visitorCommunity: ""},module,dispatch)
}, [])
const CallBackTitleSearch = (values:any) => {
console.log(values)
// visitorCommunity
TosVisitorRecordGet({
visitorCommunity: values.inviterAddress,
})
}
const pagination={defaultCurrent:1,total: Data!=null?Data.length:0}
return (
<div style={{ width: "100%", minWidth: 1020, padding: 34, backgroundColor: "#ffffff" }}>
<TitleSearch listkey={['inviterAddress']} list={['Community Name']} onSubmit={CallBackTitleSearch}/>
<TitleSearch listkey={['inviterAddress']}
list={['Community Name']}
community={"serviceCommunityList"}
onSubmit={CallBackTitleSearch}/>
{Data!=null?
<Table
loading={false}
......@@ -59,7 +77,9 @@ const VisitorRecord = (props:any) => {
style={{ marginTop: 16 }}
dataSource={Data.rows}
columns={columns}
pagination={{ current: 1, total: Data.total}} />:null}
pagination={pagination}
// pagination={{ current: 1, total: Data.total}}
/>:null}
</div>
);
};
......
......@@ -137,7 +137,10 @@ const ServiceProviderManagement = (props: any) => {
{/* 列表组件 */}
<Spin spinning={Data!=null?false:true}>
<Table size="small" rowKey={"id"} style={{ marginTop: 16 }} columns={columns} dataSource={Data!=null?dataSource(Data):null} pagination={pagination} />
<Table size="small" rowKey={"id"}
style={{ marginTop: 16 }} columns={columns}
dataSource={Data!=null?dataSource(Data):null}
pagination={pagination} />
</Spin>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment