Commit 9670e42a authored by cellee's avatar cellee

完善小区提交信息,转化英文

Signed-off-by: cellee's avatarcellee <893264950@qq.com>
parent 6aaa43c3
import React, { useState, useEffect, useRef } from 'react';
import { Link, useIntl, connect, Dispatch, history } from 'umi';
import styles from './index.less';
import BackButton from '../BackButton/BackButton';
import TitleGet from '../TitleGet/TitleGet';
import {SearchOutlined} from '@ant-design/icons';
import { Input, Row, Col, Form, Select, Button, DatePicker } from 'antd';
const { Option } = Select;
......@@ -195,7 +192,7 @@ const TitleSearch = (props: any) => {
htmlType="submit"
style={{ backgroundColor: '#e7f4ff', color: 'rgba(24,144,255,1)' }}
>
Search
<SearchOutlined /> Search
</Button>
</Form.Item>
</>
......
......@@ -68,13 +68,13 @@ export default {
yield put({ type: 'returnPage', Data });
}
break;
case 29: // 小区编辑
case 29: // 小区新增编辑
{
let Result = resp;
yield put({ type: 'returnResult', Result });
// message.success(`小区信息保存成功!`);
// history.push('/CommunityManagement/CellList');
message.success(`Information saved successfully!`);
history.push('/CommunityManagement/CellList');
}
break;
case 32: // 获取小区详情
......
......@@ -44,7 +44,18 @@ const CellLists = (props: any) => {
]);
const { dispatch, Data, loading, curString, village } = props;
// console.log(Data);
// 翻页数据
function pagesList( name:string , list: any , num: number){
let msg = {
residentialManagerUserName: name ? name : '',
communityNameList: list,
pageNum: num,
}
return msg
}
console.log(village.page)
// 先请求一次 拿到所有小区列表
useEffect(() => {
......@@ -54,12 +65,7 @@ const CellLists = (props: any) => {
// 监听data请求完毕再请求一次
useEffect(() => {
if (Data != null) {
let msg = {
residentialManagerUserName: '',
communityNameList: Data.communityList,
pageNum: 1,
};
RA(48, msg, module, dispatch);
RA(48, pagesList('',Data.communityList , 1), module, dispatch);
}
}, [Data]);
......@@ -84,39 +90,23 @@ const CellLists = (props: any) => {
// 点击搜索
const CallBackTitleSearch = (comment: any) => {
message.error('后台接口更新中');
// if (comment.communityName.length > 0 || typeof comment.label !== 'undefined') {
// let tmp: any = new Object();
// tmp.adminName = comment.label;
// tmp.communityName = comment.communityName;
// tmp.curPage = 1;
// // QA(tmp);
// console.log(tmp);
// // CallbackSearch()
// //中断
// // RA(9, {
// // userToken: token,
// // pageNum: '1',
// // subscribeDate: tmp.subscribeDate,
// // status: tmp.status,
// // communityNameList: comment.communityName,
// // }, module, dispatch);
// } else {
// message.error('请输入管理员姓名或选择小区进行搜索!');
// }
console.log(comment)
if (comment.communityName.length > 0 || typeof comment.label !== 'undefined') {
RA(48, pagesList(comment.label,comment.communityName , 1), module, dispatch);
}
else {
message.error('Please Enter And Select A Content To Search!');
}
};
// 页面切换
// 点击页面属性传参数
const paginationHandler = (page: number, pageSize?: number) => {
dispatch({
type: 'ContractModel/getList',
payload: {
index: 19,
page: {
pageNum: page,
},
},
});
RA(48, pagesList('',Data.communityList , page), module, dispatch);
};
// 刷新
const resetHandler = () => {
RA(48, pagesList('',Data.communityList , 1), module, dispatch);
};
return (
......@@ -150,27 +140,29 @@ const CellLists = (props: any) => {
density: true,
fullScreen: true,
reload: () => {
// resetHandler();
resetHandler();
},
setting: false,
}}
headerTitle="Community List"
// pagination={{ defaultCurrent: 1, total: Data.totalRow }}
// pagination={{ defaultCurrent: 1, total: Data.totalRow }}
/>
<div className="pages">
{/* <Pagination
current={village.page}
total={village.totalRow}
onChange={paginationHandler}
// onShowSizeChange={pageSizeHandler}
// current={users.meta.page}
// pageSize={users.meta.per_page}
/> */}
</div>
{village.page ? (
<div className="pages">
<Pagination
current={village.page.currentPage}
total={village.page.totalRow}
pageSize={village.page.curPageSize}
onChange={paginationHandler}
/>
</div>
) : ''}
</>
) : (
'暂无数据'
)}
'暂无数据'
)}
</div>
);
};
......
......@@ -125,7 +125,7 @@ const Detail = (props: any) => {
<div className="form">
<h3>
<EyeOutlined />
&nbsp;小区详情
&nbsp;Community Details
<div className="back">
<Button
type="primary"
......@@ -149,7 +149,7 @@ const Detail = (props: any) => {
<div className="celBox">
{/* 激活码 */}
<div className="code">
<li>小区激活码</li>
<li>Community Activation Code</li>
<Image width={140} src={detailData.visitorUrl} fallback={imgs} />
<li className="lis">{detailData.rows.cdkCode}</li>
</div>
......@@ -157,19 +157,19 @@ const Detail = (props: any) => {
{/* 详情 */}
<div className="list-item">
<div className="item">
<label>小区名称</label>
<label>Community Name</label>
<span>{detailData.rows.residentialName}</span>
</div>
{/* ---------- */}
<div className="item">
<label>详细地址</label>
<label>Community Address</label>
<span>
{detailData.rows.residentialAddress}&nbsp;{detailData.rows.residentialZipCode}{' '}
</span>
</div>
{/* ---------- */}
<div className="item">
<label>工作时间</label>
<label>Working Hours</label>
<span>
{detailData.rows.residentialStartWorking} -{' '}
{detailData.rows.residentialEndWorking}
......@@ -178,23 +178,23 @@ const Detail = (props: any) => {
{/* ---------- */}
<div className="inst">
<div className="item">
<label>小区联系电话</label>
<label>Community Telephone</label>
<span>{detailData.rows.residentialPhone}</span>
</div>
<div className="item">
<label>小区邮箱</label>
<label>Community Email</label>
<span>{detailData.rows.residentialEmail}</span>
</div>
</div>
{/* ---------- */}
<div className="item">
<label>小区管理员</label>
<label>Administrators</label>
<span>{detailData.rows.residentialManagerUserName}</span>
</div>
{/* ---------- */}
<div className="item" style={{ marginBottom: '0' }}>
<label>物业费</label>
<label>Property Fee</label>
<Checkbox.Group options={plainOptions} defaultValue={['1']} />
</div>
</div>
......@@ -205,7 +205,7 @@ const Detail = (props: any) => {
<div className="celBox">
<div className="list-item">
<div className="item">
<label>楼巴时刻表</label>
<label>Louba Timetable</label>
<Avatar
shape="square"
style={{ color: '#f56a00', backgroundColor: '#F2F6FC' }}
......@@ -214,7 +214,7 @@ const Detail = (props: any) => {
/>
{detailData.rows.balouscheduleUrl ? (
<Button type="link" onClick={() => opens(detailData.rows.balouscheduleUrl)}>
预览
Browse
</Button>
) : (
''
......@@ -222,7 +222,7 @@ const Detail = (props: any) => {
</div>
{/* ---------- */}
<div className="item">
<label>物业办事指南</label>
<label>Property Guide</label>
<Avatar
shape="square"
style={{ color: '#f56a00', backgroundColor: '#F2F6FC' }}
......@@ -231,7 +231,7 @@ const Detail = (props: any) => {
/>
{detailData.rows.serviceGuideUrl ? (
<Button type="link" onClick={() => opens(detailData.rows.serviceGuideUrl)}>
预览
Browse
</Button>
) : (
''
......@@ -239,7 +239,7 @@ const Detail = (props: any) => {
</div>
{/* ---------- */}
<div className="item">
<label>保质期服务</label>
<label>Shelf Life Service</label>
<Avatar
shape="square"
style={{ color: '#f56a00', backgroundColor: '#F2F6FC' }}
......@@ -248,7 +248,7 @@ const Detail = (props: any) => {
/>
{detailData.rows.lifeServiceUrl ? (
<Button type="link" onClick={() => opens(detailData.rows.lifeServiceUrl)}>
预览
Browse
</Button>
) : (
''
......@@ -262,7 +262,7 @@ const Detail = (props: any) => {
<div className="celBox">
<div className="list-item">
<div className="item item_span">
<label>帮助中心</label>
<label>Help Center</label>
<span>{detailData.rows.residentialHotlineName}</span>
<span>{detailData.rows.residentialHotline}</span>
<span>{detailData.rows.residentialHotlineServieStartTime}</span>
......@@ -277,7 +277,7 @@ const Detail = (props: any) => {
<div className="celBox">
<div className="list-item">
<div className="item">
<label>临时到访码下载</label>
<label>Temporary Code</label>
<Image width={64} src={hfor} />
<Button
type="link"
......@@ -285,7 +285,7 @@ const Detail = (props: any) => {
openDows(require('@/assets/h5.png'), 'code.png');
}}
>
下载
Download
</Button>
<Input
......@@ -300,7 +300,7 @@ const Detail = (props: any) => {
copy('http://47.74.233.180:8651/tosVisitorNo');
}}
>
复制
Copy
</Button>
</div>
</div>
......
li {
list-style: none;
}
.contop {
padding: 20px;
background: #fff;
......@@ -26,25 +29,11 @@
margin-bottom: 20px;
background: #fff;
}
.form .span,
.form .li {
display: inline-block;
min-width: 240px;
line-height: 30px;
background: #efefef;
font-size: 15px;
margin-top: -3px;
vertical-align: middle;
margin-left: 12px;
padding: 0 6px;
border-radius: 2px;
border: 1px solid #d9d9d9;
color: #999;
}
.form .li {
min-width: 140px;
margin-top: 15px;
margin-left: 0;
display: block;
}
.form input,
.form .ant-upload-list {
......@@ -69,5 +58,87 @@
margin-bottom: 20px;
}
.form .tip {
padding: 15px 0;
padding: 10px 0 15px;
}
.form .tip p {
display: none;
color: #67c23a;
}
.form .tip p.show {
display: block;
}
.form .tip p span {
margin-right: 5px;
}
.form .ant-form-item-label > label {
width: 160px;
}
.form .ant-divider-horizontal {
margin: 20px 0;
}
.form .celBox {
position: relative;
}
.form .celBox .item {
font-size: 14px;
line-height: 35px;
margin-bottom: 10px;
}
.form .celBox .item label {
display: inline-block;
min-width: 160px;
}
.form .celBox .item_span span {
display: inline-block;
margin-right: 15px;
}
.form .celBox .inst {
display: flex;
}
.form .celBox .inst .item {
flex: 1;
}
.form .celBox .inst .item:nth-child(2) {
flex: 2;
}
.form .celBox .code {
position: absolute;
right: 5%;
top: 50%;
transform: translateY(-55%);
width: 200px;
text-align: center;
}
.form .celBox .code li {
text-align: center;
line-height: 35px;
}
.form .celBox .code img {
width: 140px;
border: 1px solid #f0f0f0;
border-radius: 3px;
margin-bottom: 5px;
}
.form .celBox .code .lis {
color: #67c23a;
font-size: 18px;
font-weight: 500;
}
.ant-picker-time-panel-column {
width: 100px;
}
.redFs {
font-size: 12px;
color: red;
}
img {
cursor: pointer;
}
.capi {
text-transform: capitalize;
}
.pages {
background: #fff;
text-align: right;
padding: 10px ;
}
......@@ -84,12 +84,12 @@ li {
.celBox {
position: relative;
.item {
font-size: 15px;
font-size: 14px;
line-height: 35px;
margin-bottom: 10px;
label {
display: inline-block;
min-width: 110px;
min-width: 160px;
}
}
......@@ -113,6 +113,8 @@ li {
right: 5%;
top: 50%;
transform: translateY(-55%);
width: 200px;
text-align: center;
li {
text-align: center;
line-height: 35px;
......@@ -146,3 +148,8 @@ img {
.capi {
text-transform: capitalize;
}
.pages{
background: #fff;
text-align: right;
padding: 10px ;
}
\ No newline at end of file
......@@ -13,8 +13,8 @@ export const tipList = [
// 小区提示
export const village = [
[{ required: true, message: ' ' }],
[{ required: true, message: '请选择工作时间' }],
[{ required: true, message: '请输入小区管理员' }],
[{ required: true, message: '请输入小区服务电话和服务邮箱' }],
[{ required: true, message: '请完整输入小区邮编地址和名称' }],
[{ required: true, message: 'Please select working hours !' }],
[{ required: true, message: 'Please enter the community administrator !' }],
[{ required: true, message: 'Please enter the phone number and email address !' }],
[{ required: true, message: 'Please input the address and name of the community !' }],
];
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