Commit 4b7d3110 authored by MrShi's avatar MrShi

[fix] 访客记录模块

parent 93acc448
...@@ -4,7 +4,7 @@ const { TabPane } = Tabs; ...@@ -4,7 +4,7 @@ const { TabPane } = Tabs;
import {connect} from 'umi'; import {connect} from 'umi';
import { objectColumns } from '@/utils/string'; import { objectColumns } from '@/utils/string';
// cdkCode: 998974 // cdkCode: 998974
// cdkStatus: "0" // cdkStatus: "0"
...@@ -27,13 +27,17 @@ import { objectColumns } from '@/utils/string'; ...@@ -27,13 +27,17 @@ import { objectColumns } from '@/utils/string';
// updateTime: "Sep 7, 2020 6:13:06 PM" // updateTime: "Sep 7, 2020 6:13:06 PM"
// visitorsName: "销赃" // visitorsName: "销赃"
// visitorsPhone: "18535669865" // visitorsPhone: "18535669865"
const columns = objectColumns( [ const columns = objectColumns( [
["User Name", "inviterName"], ["User Name", "inviterName"],
["Visitor", "visitorsName"], ["Visitor", "visitorsName"],
["Security Guard", "securityGuardName"], ["Security Guard", "securityGuardName"],
["Number Plate", "numberPlate"], ["Number Plate", "numberPlate"],
["Address", "inviterAddress"], ["time", "updateTime"],
["Actions",null, (text: any, record: any) => (<Space size="middle"> <a>Detail</a></Space>)], ["community", "visitorCommunity"],
["unit", "inviterAddress"]
// ["Actions",null, (text: any, record: any) => (<Space size="middle"> <a>Detail</a></Space>)],
]) ])
import TitleSearch from '@/components/TitleSearch/TitleSearch' import TitleSearch from '@/components/TitleSearch/TitleSearch'
...@@ -42,16 +46,30 @@ const module="VisitorRecord" ...@@ -42,16 +46,30 @@ const module="VisitorRecord"
const VisitorRecord = (props:any) => { const VisitorRecord = (props:any) => {
const { dispatch, Data } = props; const { dispatch, Data } = props;
const TosVisitorRecordGet = (values: any) => { dispatch({ type: 'tosVisitorRecord/get', playload: values }) };
useEffect(() => { useEffect(() => {
RA(26,{inviterAddress: "", visitorCommunity: ""},module,dispatch) RA(26,{inviterAddress: "", visitorCommunity: ""},module,dispatch)
}, []) }, [])
const CallBackTitleSearch = (values:any) => { const CallBackTitleSearch = (values:any) => {
console.log(values) console.log(values)
// visitorCommunity
TosVisitorRecordGet({
visitorCommunity: values.inviterAddress,
})
} }
const pagination={defaultCurrent:1,total: Data!=null?Data.length:0}
return ( return (
<div style={{ width: "100%", minWidth: 1020, padding: 34, backgroundColor: "#ffffff" }}> <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? {Data!=null?
<Table <Table
loading={false} loading={false}
...@@ -59,7 +77,9 @@ const VisitorRecord = (props:any) => { ...@@ -59,7 +77,9 @@ const VisitorRecord = (props:any) => {
style={{ marginTop: 16 }} style={{ marginTop: 16 }}
dataSource={Data.rows} dataSource={Data.rows}
columns={columns} columns={columns}
pagination={{ current: 1, total: Data.total}} />:null} pagination={pagination}
// pagination={{ current: 1, total: Data.total}}
/>:null}
</div> </div>
); );
}; };
......
...@@ -137,7 +137,10 @@ const ServiceProviderManagement = (props: any) => { ...@@ -137,7 +137,10 @@ const ServiceProviderManagement = (props: any) => {
{/* 列表组件 */} {/* 列表组件 */}
<Spin spinning={Data!=null?false:true}> <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> </Spin>
</div> </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