Commit e1d97977 authored by Sixiang_Zzb's avatar Sixiang_Zzb

测试bug修复

parent 1113e39c
...@@ -183,9 +183,12 @@ export default defineConfig({ ...@@ -183,9 +183,12 @@ export default defineConfig({
{ {
path: './CommunityMaintenance', path: './CommunityMaintenance',
name: 'communitymaintenance', name: 'communitymaintenance',
component: './CommercialService/PropertyServices' routes: [
{ path: './', component: './CommercialService/PropertyServices' },
{ path: './Detail', component: './CommercialService/Detail' },
{ path: './Edit', component: './CommercialService/Detail' },
],
}, },
{ {
path: './OwnerComplaints', path: './OwnerComplaints',
// name: 'ownercomplaints', // name: 'ownercomplaints',
...@@ -194,43 +197,51 @@ export default defineConfig({ ...@@ -194,43 +197,51 @@ export default defineConfig({
{ {
path: './ProblemFeedback', path: './ProblemFeedback',
name: 'problemfeedback', name: 'problemfeedback',
component: './CommercialService/PropertyServices', routes: [
{ path: './', component: './CommercialService/PropertyServices' },
{ path: './Detail', component: './CommercialService/Detail' },
{ path: './Edit', component: './CommercialService/Detail' },
]
}, },
{ {
path: './RenovationApplication', path: './RenovationApplication',
name: 'renovationapplication', name: 'renovationapplication',
component: './CommercialService/Renovation', routes: [
{ path: './', component: './CommercialService/Renovation' },
{ path: './Detail', component: './CommercialService/RenovationDetail' },
{ path: './Detail', component: './CommercialService/Detail' },
{ path: './Edit', component: './CommercialService/Detail' },
],
}, },
{ path: './RenovationApplication/Detail', component: './CommercialService/RenovationDetail' },
{ {
path: './AccessCardApplication', path: './AccessCardApplication',
name: 'accessCardapplication', name: 'accessCardapplication',
component: './CommercialService/Card' routes: [
{ path: './', component: './CommercialService/Card' },
{ path: './Detail', component: './CommercialService/CardDetail' },
{ path: './Add', component: './CommercialService/CardAdd' },
],
}, },
{ path: './AccessCardApplication/Detail', component: './CommercialService/CardDetail' },
{ path: './AccessCardApplication/Add', component: './CommercialService/CardAdd' },
{ {
path: './ReportOnline', path: './ReportOnline',
name: 'reportonline', name: 'reportonline',
component: './CommercialService/PropertyServices', routes: [
{ path: "./", component: './CommercialService/PropertyServices' },
{ path: './Detail', component: './CommercialService/Detail' },
{ path: './Edit', component: './CommercialService/Detail' },
]
}, },
{ {
path: './ShelfLifeService', path: './ShelfLifeService',
name: 'shelflifeservice', name: 'shelflifeservice',
component: './CommercialService/PropertyServices' routes: [
{ path: './', component: './CommercialService/PropertyServices' },
{ path: './Detail', component: './CommercialService/Detail' },
{ path: './Edit', component: './CommercialService/Detail' },
],
}, },
{ path: './ShelfLifeService/Detail', component: './CommercialService/Detail' },
{ path: './ShelfLifeService/Edit', component: './CommercialService/Detail' },
{ path: './OwnerComplaints/Detail', component: './CommercialService/Detail' }, { path: './OwnerComplaints/Detail', component: './CommercialService/Detail' },
{ path: './OwnerComplaints/Edit', component: './CommercialService/Detail' }, { path: './OwnerComplaints/Edit', component: './CommercialService/Detail' },
{ path: './ProblemFeedback/Detail', component: './CommercialService/Detail' },
{ path: './ProblemFeedback/Edit', component: './CommercialService/Detail' },
{ path: './RenovationApplication/Detail', component: './CommercialService/Detail' },
{ path: './RenovationApplication/Edit', component: './CommercialService/Detail' },
{ path: './ReportOnline/Detail', component: './CommercialService/Detail' },
{ path: './ReportOnline/Edit', component: './CommercialService/Detail' },
{ path: './CommunityMaintenance/Detail', component: './CommercialService/Detail' },
{ path: './CommunityMaintenance/Edit', component: './CommercialService/Detail' },
], ],
}, },
{ {
......
...@@ -7,6 +7,7 @@ import TitleBack from '@/components/TitleBack/TitleBack'; ...@@ -7,6 +7,7 @@ import TitleBack from '@/components/TitleBack/TitleBack';
import Line from '@/components/Line/Line'; import Line from '@/components/Line/Line';
import TextArea from 'antd/lib/input/TextArea'; import TextArea from 'antd/lib/input/TextArea';
import * as moment from 'moment'; import * as moment from 'moment';
import { RadioChangeEvent } from 'antd/lib/radio';
const module = 'CommunityService'; const module = 'CommunityService';
...@@ -26,7 +27,15 @@ const CardDetail = (props: any) => { ...@@ -26,7 +27,15 @@ const CardDetail = (props: any) => {
const [loading, setLoading] = useState(false); const [loading, setLoading] = useState(false);
const [listData, setListData] = useState(null) as any; const [listData, setListData] = useState(null) as any;
const [onwerDetail, setOnwerDetail] = useState(null) as any; const [onwerDetail, setOnwerDetail] = useState(null) as any;
const [isShowText, setIsShowText] = useState(false);
const onRadioChange = (e: RadioChangeEvent) => {
if (e.target.value === '2') {
setIsShowText(true);
} else {
setIsShowText(false);
}
};
useEffect(() => { useEffect(() => {
if (location.query) { if (location.query) {
setLoading(true); setLoading(true);
...@@ -43,6 +52,7 @@ const CardDetail = (props: any) => { ...@@ -43,6 +52,7 @@ const CardDetail = (props: any) => {
useEffect(() => { useEffect(() => {
if (DataSaveDetail) { if (DataSaveDetail) {
console.log(DataSaveDetail);
setListData(DataSaveDetail.data.rows.list[0]); setListData(DataSaveDetail.data.rows.list[0]);
setOnwerDetail(DataSaveDetail.data.rows.onwerDetail); setOnwerDetail(DataSaveDetail.data.rows.onwerDetail);
setLoading(false); setLoading(false);
...@@ -71,11 +81,9 @@ const CardDetail = (props: any) => { ...@@ -71,11 +81,9 @@ const CardDetail = (props: any) => {
: values.replyContent, : values.replyContent,
type: '7', type: '7',
}; };
RA(34, tmp, module, dispatch); RA(34, tmp, module, dispatch);
setLoading(true); setLoading(true);
}; };
return ( return (
<Spin size="large" spinning={loading}> <Spin size="large" spinning={loading}>
<div style={{ width: '100%', minWidth: 1020, padding: 34, backgroundColor: '#ffffff' }}> <div style={{ width: '100%', minWidth: 1020, padding: 34, backgroundColor: '#ffffff' }}>
...@@ -150,7 +158,7 @@ const CardDetail = (props: any) => { ...@@ -150,7 +158,7 @@ const CardDetail = (props: any) => {
}, },
]} ]}
> >
<Radio.Group> <Radio.Group onChange={onRadioChange}>
<Radio.Button value="1">Approve</Radio.Button> <Radio.Button value="1">Approve</Radio.Button>
<Radio.Button style={{ marginLeft: 10 }} value="2"> <Radio.Button style={{ marginLeft: 10 }} value="2">
Reject Reject
...@@ -165,7 +173,7 @@ const CardDetail = (props: any) => { ...@@ -165,7 +173,7 @@ const CardDetail = (props: any) => {
<Col> <Col>
<Form.Item <Form.Item
name="replyContent" name="replyContent"
rules={[{ required: true, max: 300, message: '*it is required!' }]} rules={[{ required: isShowText, max: 300, message: '*it is required!' }]}
> >
<TextArea style={{ width: 300, height: 100, padding: 8 }} /> <TextArea style={{ width: 300, height: 100, padding: 8 }} />
</Form.Item> </Form.Item>
...@@ -184,11 +192,16 @@ const CardDetail = (props: any) => { ...@@ -184,11 +192,16 @@ const CardDetail = (props: any) => {
</Form.Item> </Form.Item>
</Col> </Col>
</Row> </Row>
<Form.Item> <Row>
<Button type="primary" htmlType="submit"> <Col span={3} />
Submit <Col>
</Button> <Form.Item>
</Form.Item> <Button type="primary" htmlType="submit">
Submit
</Button>
</Form.Item>
</Col>
</Row>
</Form> </Form>
) : ( ) : (
<> <>
...@@ -222,7 +235,12 @@ const CardDetail = (props: any) => { ...@@ -222,7 +235,12 @@ const CardDetail = (props: any) => {
<TextArea <TextArea
disabled disabled
value={listData.reply_content} value={listData.reply_content}
style={{ width: 300, height: 100, padding: 8 }} style={{
width: 300,
height: 100,
padding: 8,
color: listData.apply_status === 2 ? 'red' : '',
}}
/> />
</Col> </Col>
</Row> </Row>
...@@ -241,11 +259,16 @@ const CardDetail = (props: any) => { ...@@ -241,11 +259,16 @@ const CardDetail = (props: any) => {
</Form.Item> </Form.Item>
</Col> </Col>
</Row> </Row>
<Form.Item> <Row>
<Button type="primary" htmlType="submit"> <Col span={3} />
Submit <Col>
</Button> <Form.Item>
</Form.Item> <Button type="primary" htmlType="submit">
Submit
</Button>
</Form.Item>
</Col>
</Row>
</Form> </Form>
) : ( ) : (
<Row gutter={8} style={{ marginTop: 16 }}> <Row gutter={8} style={{ marginTop: 16 }}>
......
...@@ -6,6 +6,7 @@ import TitleBack from '@/components/TitleBack/TitleBack'; ...@@ -6,6 +6,7 @@ import TitleBack from '@/components/TitleBack/TitleBack';
import Line from '@/components/Line/Line'; import Line from '@/components/Line/Line';
import TextArea from 'antd/lib/input/TextArea'; import TextArea from 'antd/lib/input/TextArea';
import { timestampToTime } from '@/utils/time'; import { timestampToTime } from '@/utils/time';
import { RadioChangeEvent } from 'antd/lib/radio';
const module = 'CommunityService'; const module = 'CommunityService';
const decoration_status = [ const decoration_status = [
...@@ -20,6 +21,15 @@ const RenovationDetail = (props: any) => { ...@@ -20,6 +21,15 @@ const RenovationDetail = (props: any) => {
const [loading, setLoading] = useState(false); const [loading, setLoading] = useState(false);
const [listData, setListData] = useState(null) as any; const [listData, setListData] = useState(null) as any;
const [onwerDetail, setOnwerDetail] = useState(null) as any; const [onwerDetail, setOnwerDetail] = useState(null) as any;
const [isShowText, setIsShowText] = useState(false);
const onRadioChange = (e: RadioChangeEvent) => {
if (e.target.value === '2') {
setIsShowText(true);
} else {
setIsShowText(false);
}
};
useEffect(() => { useEffect(() => {
// 发起请求拿取数据 // 发起请求拿取数据
...@@ -151,7 +161,7 @@ const RenovationDetail = (props: any) => { ...@@ -151,7 +161,7 @@ const RenovationDetail = (props: any) => {
}, },
]} ]}
> >
<Radio.Group> <Radio.Group onChange={onRadioChange}>
<Radio.Button value="1">Approve</Radio.Button>{' '} <Radio.Button value="1">Approve</Radio.Button>{' '}
<Radio.Button style={{ marginLeft: 10 }} value="2"> <Radio.Button style={{ marginLeft: 10 }} value="2">
Reject Reject
...@@ -166,17 +176,23 @@ const RenovationDetail = (props: any) => { ...@@ -166,17 +176,23 @@ const RenovationDetail = (props: any) => {
<Col> <Col>
<Form.Item <Form.Item
name="replyView" name="replyView"
rules={[{ required: true, max: 300, message: '*it is required!' }]} rules={[{ required: isShowText, max: 300, message: '*it is required!' }]}
> >
<TextArea style={{ width: 300, height: 100, padding: 8 }} /> <TextArea style={{ width: 300, height: 100, padding: 8 }} />
</Form.Item> </Form.Item>
</Col> </Col>
</Row> </Row>
<Form.Item>
<Button type="primary" htmlType="submit"> <Row>
Submit <Col span={3} />
</Button> <Col>
</Form.Item> <Form.Item>
<Button type="primary" htmlType="submit">
Submit
</Button>
</Form.Item>
</Col>
</Row>
</Form> </Form>
</> </>
) : ( ) : (
...@@ -210,7 +226,13 @@ const RenovationDetail = (props: any) => { ...@@ -210,7 +226,13 @@ const RenovationDetail = (props: any) => {
<Col span={3}>Reply:</Col> <Col span={3}>Reply:</Col>
<Col> <Col>
<TextArea <TextArea
style={{ width: 300, minHeight: 100, padding: 8, resize: 'none' }} style={{
width: 300,
minHeight: 100,
padding: 8,
resize: 'none',
color: listData.decorationStatus === '2' ? 'red' : '',
}}
disabled disabled
value={listData.replyView} value={listData.replyView}
/> />
......
...@@ -146,7 +146,8 @@ const UsersAdd = (props: any) => { ...@@ -146,7 +146,8 @@ const UsersAdd = (props: any) => {
</div> </div>
</div> </div>
<Line /> <Line />
<Form.Item>
<Form.Item style={{ marginLeft: 146 }}>
<Button type="primary" htmlType="submit"> <Button type="primary" htmlType="submit">
Submit Submit
</Button> </Button>
......
...@@ -238,7 +238,7 @@ const Edit = (props: any) => { ...@@ -238,7 +238,7 @@ const Edit = (props: any) => {
</div> </div>
<div className={styles.line} /> <div className={styles.line} />
<Form.Item> <Form.Item style={{ marginLeft: 190 }}>
<Button type="primary" htmlType="submit"> <Button type="primary" htmlType="submit">
Submit Submit
</Button> </Button>
......
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