Commit 1935e33d authored by Sixiang_Zzb's avatar Sixiang_Zzb

测试bug修复

parent f4c7c6cc
...@@ -109,13 +109,16 @@ const PictureOptionsRow = (props: any) => { ...@@ -109,13 +109,16 @@ const PictureOptionsRow = (props: any) => {
// 给传递的附加名字 // 给传递的附加名字
// props.data.fileName = fileList[0].name; // props.data.fileName = fileList[0].name;
let tmp = fileList; let tmp = fileList;
setFileList(tmp.filter((file: any) => !!file.status || file.status == null)); setFileList(tmp.filter((file: any) => file.status && file.status !== null));
var result = new Array(); var result = new Array();
fileList.map((item: { name: string }, index: number) => { fileList.map((item: { name: string; status: string }, index: number) => {
result.push(item.name); if (item.status && item.status !== null) {
result.push(item.name);
}
}); });
onChange(result); onChange(result);
}; };
function beforeUpload(file: any) { function beforeUpload(file: any) {
// 文件类型判断 // 文件类型判断
const isJpgOrPng = const isJpgOrPng =
......
...@@ -144,7 +144,7 @@ class SelectOptions extends React.PureComponent { ...@@ -144,7 +144,7 @@ class SelectOptions extends React.PureComponent {
selectoptionsSelectAll: 'Select All', selectoptionsSelectAll: 'Select All',
selectoptionsSelectNone: 'Unselect All', selectoptionsSelectNone: 'Unselect All',
selectoptionsAll: 'All', selectoptionsAll: 'All',
selectoptionsSearchCell: 'Search cell', selectoptionsSearchCell: 'Search',
selectoptionsAllCell: ' All', selectoptionsAllCell: ' All',
componetVisible: 'Close', componetVisible: 'Close',
}); });
......
...@@ -119,13 +119,13 @@ const TableShow = (props: any) => { ...@@ -119,13 +119,13 @@ const TableShow = (props: any) => {
pagination={false} pagination={false}
></Table> ></Table>
</Col> </Col>
<Col style={{ textAlign: 'center' }}> <Col span={4}>
<Row style={{ marginTop: 8 }}> <Row style={{ marginTop: 8 }}>
<div style={{ textAlign: 'center' }}> <div style={{ textAlign: 'center' }}>
<img width={80} height={80} src={unit.imgUrl} /> <img width={80} height={80} src={unit.imgUrl} />
<br /> <br />
{item.owner.cdkCode} {item.owner.cdkCode}
<br />({user_code[item.owner.cdkStatus]}) <br />({user_code[item.owner.enable]})
</div> </div>
</Row> </Row>
</Col> </Col>
......
...@@ -35,10 +35,10 @@ class TagSelect extends React.Component { ...@@ -35,10 +35,10 @@ class TagSelect extends React.Component {
icon: <ExclamationCircleOutlined />, icon: <ExclamationCircleOutlined />,
content: 'Some descriptions', content: 'Some descriptions',
onOk() { onOk() {
console.log('OK'); // console.log('OK');
console.log(removedTag); // console.log(removedTag);
const value = that.state.value.filter((tag) => tag !== removedTag); const value = that.state.value.filter((tag) => tag !== removedTag);
console.log(value); // console.log(value);
that.props.onRemove(removedTag); that.props.onRemove(removedTag);
that.setState({ value }); that.setState({ value });
that.props.onChange(value); that.props.onChange(value);
...@@ -101,8 +101,7 @@ class TagSelect extends React.Component { ...@@ -101,8 +101,7 @@ class TagSelect extends React.Component {
render() { render() {
const { value, inputVisible, inputValue, editInputIndex, editInputValue, visible } = this.state; const { value, inputVisible, inputValue, editInputIndex, editInputValue, visible } = this.state;
console.log(this.props.value);
console.log(value);
return ( return (
<> <>
<Tag className="editTag" key="Accountant"> <Tag className="editTag" key="Accountant">
...@@ -114,7 +113,7 @@ class TagSelect extends React.Component { ...@@ -114,7 +113,7 @@ class TagSelect extends React.Component {
return ( return (
<Input <Input
ref={this.saveEditInputRef} ref={this.saveEditInputRef}
key={tag} key={tag.serviceName}
size="small" size="small"
className={styles.tagInput} className={styles.tagInput}
value={editInputValue} value={editInputValue}
...@@ -125,30 +124,30 @@ class TagSelect extends React.Component { ...@@ -125,30 +124,30 @@ class TagSelect extends React.Component {
); );
} }
const isLongTag = tag.length > 20; const isLongTag = value.length > 20;
const tagElem = ( const tagElem = (
<Tag <Tag
className="editTag" className="editTag"
key={tag} key={tag.serviceName}
closable={index !== -1} closable={index !== -1}
onClose={(e) => this.handleClose(tag, e)} onClose={(e) => this.handleClose(tag, e)}
visible={true} visible={true}
> >
<span <span
onDoubleClick={(e) => { onDoubleClick={(e) => {
this.setState({ editInputIndex: index, editInputValue: tag }, () => { this.setState({ editInputIndex: index, editInputValue: tag.serviceName }, () => {
this.editInput.focus(); this.editInput.focus();
}); });
e.preventDefault(); e.preventDefault();
}} }}
> >
{isLongTag ? `${tag.slice(0, 20)}...` : tag} {isLongTag ? `${value.slice(0, 20)}...` : tag.serviceName}
</span> </span>
</Tag> </Tag>
); );
return isLongTag ? ( return isLongTag ? (
<Tooltip title={tag} key={tag}> <Tooltip title={tag.serviceName} key={tag.serviceName}>
{tagElem} {tagElem}
</Tooltip> </Tooltip>
) : ( ) : (
......
...@@ -54,7 +54,7 @@ export default { ...@@ -54,7 +54,7 @@ export default {
'menu.monitoringcenter': 'Monitoring Center', 'menu.monitoringcenter': 'Monitoring Center',
'menu.usemanagement.lifeusers': 'LIFE User Management', 'menu.usemanagement.lifeusers': 'LIFE User Management',
'menu.usemanagement.serviceproviders': 'Service Provider Management', 'menu.usemanagement.serviceproviders': 'Service Provider Management',
'menu.propertymanagement': 'Property Management', 'menu.propertymanagement': 'Property Fee Management',
'menu.commercialservice': 'Commercial Service', 'menu.commercialservice': 'Commercial Service',
'menu.commercialservice.communitymaintenance': 'Community maintenance', 'menu.commercialservice.communitymaintenance': 'Community maintenance',
'menu.commercialservice.ownercomplaints': 'Owner Complaints', 'menu.commercialservice.ownercomplaints': 'Owner Complaints',
......
...@@ -154,7 +154,7 @@ const ChargeManager = (props: any) => { ...@@ -154,7 +154,7 @@ const ChargeManager = (props: any) => {
<div className={styles.base}> <div className={styles.base}>
<TitleSearch <TitleSearch
listkey={['tosOwnerName']} listkey={['tosOwnerName']}
list={['TosOwnerName']} list={['Name Of Owner']}
communitySelect={true} communitySelect={true}
onSubmit={TitleSearchContent} onSubmit={TitleSearchContent}
defaultValue={readyData} defaultValue={readyData}
......
...@@ -163,7 +163,8 @@ const ServiceProviderManagement = (props: propsType) => { ...@@ -163,7 +163,8 @@ const ServiceProviderManagement = (props: propsType) => {
...location.query, ...location.query,
}; };
} }
// console.log(CommunityList, flag); console.log(location.query);
console.log(readyData);
if (CommunityList && flag === false) { if (CommunityList && flag === false) {
flag = true; flag = true;
setLoading(true); setLoading(true);
......
...@@ -21,13 +21,20 @@ const Services = (props: any) => { ...@@ -21,13 +21,20 @@ const Services = (props: any) => {
useEffect(() => { useEffect(() => {
if (DataServices != null) { if (DataServices != null) {
console.log(DataServices); console.log(DataServices);
let tmp = DataServices.data.rows.map((v: object, i: number) => { // let tmp = DataServices.data.rows.map((v: object, i: number) => {
return v['serviceName']; // return v['serviceName'];
}); // });
// console.log(tmp);
// tmp = tmp.filter((v: string) => {
// return v !== 'Accountant';
// });
let tmp = DataServices.data.rows.filter(
(v: { serviceName: string; deleted: number }, i: number) => {
return v.serviceName !== 'Accountant' && v.deleted !== 1 && v;
},
);
console.log(tmp); console.log(tmp);
tmp = tmp.filter((v: string) => {
return v !== 'Accountant';
});
formRef.current['setFieldsValue']({ serviceName: tmp }); formRef.current['setFieldsValue']({ serviceName: tmp });
} }
}, [DataServices]); }, [DataServices]);
...@@ -50,12 +57,12 @@ const Services = (props: any) => { ...@@ -50,12 +57,12 @@ const Services = (props: any) => {
}; };
// 删除服务范围 // 删除服务范围
const Remove = (values: string) => { const Remove = (values: { id: string }) => {
console.log(values); console.log(values);
RA( RA(
53, 53,
{ {
serviceName: values, id: values.id,
}, },
module, module,
dispatch, dispatch,
......
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