Commit 8ca7af94 authored by cellee's avatar cellee

Signed-off-by: cellee <893264950@qq.com>

parent f7414378
......@@ -59,7 +59,8 @@ class SelectOptions extends React.Component {
super(props);
const { list, dispatch, checklist } = this.props;
console.log(checklist);
console.log(list);
if (list == null) {
//console.error("组件错误:没有数据导入")
}
......@@ -101,21 +102,24 @@ class SelectOptions extends React.Component {
}
console.log(this.state.componetVisible);
}
if (this.props.list !== prevProps.list) {
// 发生改变重新赋值
this.setState({
menuList: ArrayToPingYin.get(this.props.list),
checkedListOptions: this.props.list,
checkedList: this.props.single != null ? [] : this.props.list,
indeterminate: false,
checkAll: true,
checkNone: false,
resultList: this.props.single != null ? [] : this.props.list,
flag: false,
lastValue: null,
});
}
// console.log(this.props.list);
// console.log(prevProps.list);
// if (this.props.list.length > prevProps.list.length) {
// console.log(this.props.list);
// console.log(prevProps.list);
// // 发生改变重新赋值
// this.setState({
// menuList: ArrayToPingYin.get(this.props.list),
// checkedListOptions: this.props.list,
// checkedList: this.props.list,
// indeterminate: false,
// checkAll: true,
// checkNone: false,
// resultList: this.props.list,
// flag: false,
// lastValue: null,
// });
// }
}
}
componentDidMount() {
......@@ -159,6 +163,7 @@ class SelectOptions extends React.Component {
};
// 多选框改变的回调
onChangeValue = (checkedList) => {
// console.log(checkedList);
if (this.props.single != null) {
var tmp;
if (checkedList.length > 1) {
......@@ -201,6 +206,7 @@ class SelectOptions extends React.Component {
};
// 全选
onCheckAllChange = (e) => {
// console.log(prevProps.list);
this.setState({
checkedList: this.props.list,
indeterminate: false,
......@@ -223,6 +229,7 @@ class SelectOptions extends React.Component {
};
// 索引 -- 全部点击
itemSelectAll = (e) => {
console.log(this.props.list);
this.setState({
checkedListOptions: this.props.list,
checkedList: this.state.resultList,
......
......@@ -52,9 +52,8 @@ const TitleSearch = (props: any) => {
form.setFieldsValue(defaultValue);
}
}, [defaultValue]);
useEffect(() => {
// console.log(CommunityList)
useEffect(() => {
if (CommunityList != null) {
var tmp = {};
tmp[community] = CommunityList;
......@@ -179,7 +178,7 @@ const TitleSearch = (props: any) => {
<SelectOptions
checklist={checklist}
single={single}
list={communitys !== null ? communitys.sort() : []}
list={CommunityList.sort()}
show={selectOptions}
onSubmit={printContent}
/>
......
......@@ -11,7 +11,6 @@ export default {
reducers: {
returnCommunityList(state, { CommunityList }) {
// console.log(CommunityList);
return { ...state, CommunityList };
},
},
......
......@@ -219,7 +219,7 @@ const Adds = (props: any) => {
obj.propertyFee = PropertyFee;
// 小区信息;
let { residentialZipCode, residentialAddress, residentialName } = values.des;
obj.residentialZipCode = `SINGAPORE${residentialZipCode}`;
obj.residentialZipCode = `SINGAPORE ${residentialZipCode}`;
obj.residentialAddress = residentialAddress;
obj.residentialName = residentialName;
......
......@@ -46,17 +46,15 @@ const CellLists = (props: any) => {
const { dispatch, Data, loading, curString, village } = props;
// 翻页数据
function pagesList( name:string , list: any , num: number){
function pagesList(name: string, list: any, num: number) {
let msg = {
residentialManagerUserName: name ? name : '',
communityNameList: list,
pageNum: num,
}
return msg
};
return msg;
}
console.log(village.page)
// 先请求一次 拿到所有小区列表
useEffect(() => {
RA(24, { communityName: '' }, module, dispatch);
......@@ -65,7 +63,7 @@ const CellLists = (props: any) => {
// 监听data请求完毕再请求一次
useEffect(() => {
if (Data != null) {
RA(48, pagesList('',Data.communityList , 1), module, dispatch);
RA(48, pagesList('', Data.communityList, 1), module, dispatch);
}
}, [Data]);
......@@ -90,23 +88,22 @@ const CellLists = (props: any) => {
// 点击搜索
const CallBackTitleSearch = (comment: any) => {
console.log(comment)
console.log(comment);
if (comment.communityName.length > 0 || typeof comment.label !== 'undefined') {
RA(48, pagesList(comment.label,comment.communityName , 1), module, dispatch);
}
else {
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) => {
RA(48, pagesList('',Data.communityList , page), module, dispatch);
RA(48, pagesList('', Data.communityList, page), module, dispatch);
};
// 刷新
const resetHandler = () => {
RA(48, pagesList('',Data.communityList , 1), module, dispatch);
RA(48, pagesList('', Data.communityList, 1), module, dispatch);
};
return (
......@@ -149,7 +146,6 @@ const CellLists = (props: any) => {
/>
{village.page ? (
<div className="pages">
<Pagination
current={village.page.currentPage}
total={village.page.totalRow}
......@@ -157,8 +153,9 @@ const CellLists = (props: any) => {
onChange={paginationHandler}
/>
</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