Commit bf32777f authored by Sixiang_Zzb's avatar Sixiang_Zzb

测试问题修复

parent 598f4ac7
...@@ -22,18 +22,7 @@ const TableShow = (props: any) => { ...@@ -22,18 +22,7 @@ const TableShow = (props: any) => {
console.log('组件入参'); console.log('组件入参');
console.log(dataRow); console.log(dataRow);
}, []); }, []);
//
// Contact Details
// Email
// cdk_code
// Account Type
// User Status
// ower_email: "535740436@qq.com"
// ower_name: "测试"
// ower_phone: "微微"
// Owner/Family Member/Tenant
// const user_status = [[1, "家属"], [2, "租户"]] // const user_status = [[1, "家属"], [2, "租户"]]
const user_status = [ const user_status = [
[1, 'Family Member'], [1, 'Family Member'],
...@@ -86,9 +75,9 @@ const TableShow = (props: any) => { ...@@ -86,9 +75,9 @@ const TableShow = (props: any) => {
{item.owner.buildingNumber + {item.owner.buildingNumber +
' #' + ' #' +
item.owner.floorNumber + item.owner.floorNumber +
'-' + ' -' +
item.owner.roomNumber + item.owner.roomNumber +
',' + ', ' +
item.owner.addressAndpostalCode} item.owner.addressAndpostalCode}
</Col> </Col>
</Row> </Row>
......
...@@ -25,17 +25,28 @@ const goToName = ['Reply', 'Detail']; ...@@ -25,17 +25,28 @@ const goToName = ['Reply', 'Detail'];
const module = 'CommunityService'; const module = 'CommunityService';
interface DataType {
handleStatus: string;
ownerName: string;
communityName: string;
}
// 页码 // 页码
let pageNum: any = 1; let pageNum: any = 1;
let readyData: DataType = {
handleStatus: '',
ownerName: '',
communityName: '',
};
const PropertyServices = (props: any) => { const PropertyServices = (props: any) => {
const permissionArr = JSON.parse(localStorage.getItem('permission') || ''); const permissionArr = JSON.parse(localStorage.getItem('permission') || '');
const { dispatch, location, Data } = props; const { dispatch, location, Data } = props;
const [loading, setLoading] = useState(false); const [loading, setLoading] = useState(false);
// const [pageNum, setPageNum] = useState(1)
const [serviceTypeGobal, setServiceType] = useState(''); const [serviceTypeGobal, setServiceType] = useState('');
const [readyData, setReadyData] = useState(null); // const [readyData, setReadyData] = useState(null);
const columns = [ const columns = [
{ title: 'Community Name', dataIndex: 'community_name' }, { title: 'Community Name', dataIndex: 'community_name' },
...@@ -99,6 +110,14 @@ const PropertyServices = (props: any) => { ...@@ -99,6 +110,14 @@ const PropertyServices = (props: any) => {
}, [Data]); }, [Data]);
useEffect(() => { useEffect(() => {
console.log('清空默认数据');
// 清空默认数据里面的内容
readyData = {
handleStatus: '',
ownerName: '',
communityName: '',
};
if (location != null) { if (location != null) {
//细分类:页面指令 //细分类:页面指令
var serviceType = ''; var serviceType = '';
...@@ -118,7 +137,11 @@ const PropertyServices = (props: any) => { ...@@ -118,7 +137,11 @@ const PropertyServices = (props: any) => {
//前置数据 //前置数据
var tmp: any = filterObjbyTg(location.query, ['handleStatus', 'ownerName', 'communityName']); var tmp: any = filterObjbyTg(location.query, ['handleStatus', 'ownerName', 'communityName']);
tmp.handleStatus = handle_Status[parseInt(tmp.handleStatus)]; //特殊处理 tmp.handleStatus = handle_Status[parseInt(tmp.handleStatus)]; //特殊处理
setReadyData(tmp); console.log(tmp);
// setReadyData(tmp);
readyData = {
...tmp,
};
//获取数据 //获取数据
setLoading(true); setLoading(true);
RA( RA(
......
...@@ -350,32 +350,3 @@ function mapStateToProps(state: any) { ...@@ -350,32 +350,3 @@ function mapStateToProps(state: any) {
}; };
} }
export default connect(mapStateToProps)(UsersDetail); export default connect(mapStateToProps)(UsersDetail);
// "owerName":"孟浩",
// "owerPhone":"18813787878",
// "owerEmail":"sale@huahuico.com",
// "communityName":"A7",
// "buildingNumber":"A1",
// "floorNumber":"11",
// "roomNumber":"388",
// "addressAndpostalCode":"工业大道3689561"
// address_and_postalCode: "工业大道3689561"
// building_number: "01"
// cdk_code: 295863
// cdk_status: 0
// enable: 0
// floor_number: "05"
// ower_email: "sale@huahuico.com"
// ower_name: "小小莎"
// ower_phone: "18813787871"
// room_number: "388"
// "ownerId":"770da9de6b6c43f6b61bc3d671fa2e89",
// "owerName":"jack-小雄",
// "communityName":"A7"
// http://47.74.233.180:8651/tos/life/community/account/member/del
// {
// "id":"c06286cfe7b843cb96fdfcb987231123",
// "ownerId":"6b359755a36b49c28241a4620fa6539b"
// }
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