Commit 8a96ea46 authored by cellee's avatar cellee

Merge branch 'final' of http://120.77.240.215:9701/Maple/tostumi.git into final

parents 530e8b4a accc62a9
......@@ -52,6 +52,7 @@ const TableShow = (props: any) => {
[
'status',
'status',
(text: number, record: any) => <Space size="middle">{user_type_status[text]}</Space>,
],
[
......@@ -71,7 +72,7 @@ const TableShow = (props: any) => {
<Tabs defaultActiveKey="0">
{dataRow.map((item: any, index: number) => {
return (
<TabPane tab={item.name} key={item.id}>
<TabPane tab={item.name} key={index}>
<Row gutter={16} style={{ marginLeft: 9 }}>
<Col>Address:</Col>
<Col>
......@@ -86,7 +87,7 @@ const TableShow = (props: any) => {
</Row>
{item.unit.map((unit: any, uindex: any) => {
return (
<div key={unit.living}>
<div key={uindex}>
<Row gutter={32}>
<Col span={20}>
<Table
......@@ -114,7 +115,7 @@ const TableShow = (props: any) => {
);
}}
footer={() => ''}
rowKey={'ower_name'}
rowKey={'id'}
dataSource={unit.member}
columns={key}
pagination={false}
......
......@@ -50,6 +50,8 @@ const UsersDetail = (props: any) => {
const formRef = useRef(null as any);
const [loadding, setLoadding] = useState(false);
// 提交
const onFinish = (values: any) => {
if (DataSave != null) {
......@@ -71,6 +73,7 @@ const UsersDetail = (props: any) => {
}
};
// 监听删除结果
useEffect(() => {
if (Result != null) {
console.log(Result);
......@@ -82,6 +85,7 @@ const UsersDetail = (props: any) => {
}
}, [Result]);
// 监听返回内容
useEffect(() => {
console.log(returnValue);
if (returnValue != null) {
......@@ -101,6 +105,7 @@ const UsersDetail = (props: any) => {
}
}, [returnValue]);
// 监听数据返回
useEffect(() => {
if (DataSave != null) {
console.log('给予页面数据');
......@@ -124,6 +129,7 @@ const UsersDetail = (props: any) => {
}
}, [DataSave]);
// 监听数据返回
useEffect(() => {
if (DataSaveDetail != null) {
console.log('页面数据副歌');
......@@ -132,8 +138,10 @@ const UsersDetail = (props: any) => {
}
}, [DataSaveDetail]);
// 存储住户详情页的数据
useEffect(() => {
console.log(memberDetail);
if (DataSave) {
if (!memberDetail) {
var tmp = {
owerName: DataSave.owerName,
......@@ -142,6 +150,7 @@ const UsersDetail = (props: any) => {
};
formRef.current.setFieldsValue(tmp);
}
}
}, [memberDetail]);
useEffect(() => {
......@@ -151,6 +160,7 @@ const UsersDetail = (props: any) => {
setDataSaveLoading(true);
}, []);
// 住户详情页
const tableShowCallback = (values: any) => {
console.log('成员信息');
console.log(values);
......@@ -159,6 +169,7 @@ const UsersDetail = (props: any) => {
setMemberDetail(true);
};
// 删除单元
const deleteUnit = (values: any) => {
if (permissionArr.indexOf('5') < 0) {
message.error('No Permissions!!!', 3);
......@@ -186,6 +197,7 @@ const UsersDetail = (props: any) => {
});
};
// 删除住户
const DeleteMember = (values: any, e: any) => {
console.log(values);
if (permissionArr.indexOf('7') < 0) {
......@@ -201,18 +213,22 @@ const UsersDetail = (props: any) => {
cancelText: 'Cancel',
onCancel() {},
onOk() {
setLoadding(true);
RA(39, { id: values.id, ownerId: values.owner_id });
},
});
};
// 返回
const titleBackCallBack = () => {
setMemberDetail(false);
};
// 监听删除住户返回的结果
useEffect(() => {
if (memberResult != null) {
setMemberDetail(false);
setLoadding(false);
message.success('Successfully delete!!!');
RA(13, {
id: DataSave.id,
......@@ -226,6 +242,7 @@ const UsersDetail = (props: any) => {
}
}, [memberResult]);
// 编辑手机号码验证
const checkData = (rule: any, value: any, callback: any) => {
if (value) {
if (/^\d{8}$|^1[3|5|7|8]\d{9}$/.test(value)) {
......@@ -237,9 +254,6 @@ const UsersDetail = (props: any) => {
callback('*it is required!');
};
console.log(memberDetail);
console.log(DataSave);
return (
<div className={styles.base}>
<Spin spinning={visible} tip="Loading Submit">
......@@ -329,6 +343,7 @@ const UsersDetail = (props: any) => {
</>
) : (
<>
<Spin spinning={loadding}>
<div>
<TitleBack
title={'Family/Tenant Details'}
......@@ -358,6 +373,7 @@ const UsersDetail = (props: any) => {
Delete
</Button>
</div>
</Spin>
</>
)}
</Spin>
......
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