Commit b751d25a authored by cellee's avatar cellee

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

parent 6044e9a5
...@@ -44,5 +44,5 @@ hr { ...@@ -44,5 +44,5 @@ hr {
.flex { .flex {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: end; justify-content: initial;
} }
/* /*
* @Author: your name * @Author: your name
* @Date: 2021-03-02 14:39:40 * @Date: 2021-03-02 14:39:40
* @LastEditTime: 2021-05-20 16:32:22 * @LastEditTime: 2021-05-24 14:29:56
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: In User Settings Edit * @Description: In User Settings Edit
* @FilePath: \tostumi\src\pages\AccountManagement\Service\serviceEdit.tsx * @FilePath: \tostumi\src\pages\AccountManagement\Service\serviceEdit.tsx
...@@ -178,7 +178,7 @@ const service = (props: any) => { ...@@ -178,7 +178,7 @@ const service = (props: any) => {
imageType: 'tosReportImage', imageType: 'tosReportImage',
identification: '', identification: '',
}} }}
limitNums={10} limitNums={5}
imgs={ImageSrc} imgs={ImageSrc}
over={loading} over={loading}
/> />
...@@ -220,7 +220,7 @@ const service = (props: any) => { ...@@ -220,7 +220,7 @@ const service = (props: any) => {
imageType: 'tosReportImage', imageType: 'tosReportImage',
identification: '', identification: '',
}} }}
limitNums={10} limitNums={5}
imgs={ImageSrc} imgs={ImageSrc}
over={loading} over={loading}
/> />
......
/* /*
* @Author: your name * @Author: your name
* @Date: 2021-03-02 14:39:40 * @Date: 2021-03-02 14:39:40
* @LastEditTime: 2021-05-21 17:24:18 * @LastEditTime: 2021-05-25 10:28:07
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: In User Settings Edit * @Description: In User Settings Edit
* @FilePath: \tostumi\src\pages\AccountManagement\Service\serviceEdit.tsx * @FilePath: \tostumi\src\pages\AccountManagement\Service\serviceEdit.tsx
...@@ -39,7 +39,7 @@ const service = (props: any) => { ...@@ -39,7 +39,7 @@ const service = (props: any) => {
// 监听是否有数据 // 监听是否有数据
useEffect(() => { useEffect(() => {
if (match.params.id) { if (match.params.id) {
RA(69, { id: match.params.id }, module, dispatch); RA(69, { id: match.params.id, pageNum: 1 }, module, dispatch);
} }
}, [match]); }, [match]);
...@@ -75,7 +75,14 @@ const service = (props: any) => { ...@@ -75,7 +75,14 @@ const service = (props: any) => {
const onFinish = (values: any) => { const onFinish = (values: any) => {
values.reportId = reportList[listIdx].reportId; values.reportId = reportList[listIdx].reportId;
console.log(values); // 去掉http和阿里云oss后缀
values.imageNames = values.imageNames.map((item: any, idx: any) => {
if (item.indexOf('http') !== -1) {
let a = [item.lastIndexOf('/') + 1, item.indexOf('?')];
item = item.substring(a[0], a[1]);
}
return item;
});
let obj = { let obj = {
imageContentDtos: [values], imageContentDtos: [values],
...@@ -111,7 +118,7 @@ const service = (props: any) => { ...@@ -111,7 +118,7 @@ const service = (props: any) => {
setReportList([...arr]); setReportList([...arr]);
} else if (Result.state == 2) { } else if (Result.state == 2) {
dispatch({ type: module + '/Results' }); dispatch({ type: module + '/Results' });
RA(69, { id: match.params.id }, module, dispatch); RA(69, { id: match.params.id, pageNum: 1 }, module, dispatch);
} }
} }
}, [Result]); }, [Result]);
...@@ -161,9 +168,10 @@ const service = (props: any) => { ...@@ -161,9 +168,10 @@ const service = (props: any) => {
} }
// 再开始分页 // 再开始分页
let a = JSON.parse(JSON.stringify(term.list)); RA(69, { id: match.params.id, pageNum: page }, module, dispatch);
let b = a.splice((page - 1) * 10, 10); // let a = JSON.parse(JSON.stringify(term.list));
setReportList([...b]); // let b = a.splice((page - 1) * 10, 10);
// setReportList([...b]);
}; };
return ( return (
...@@ -214,7 +222,7 @@ const service = (props: any) => { ...@@ -214,7 +222,7 @@ const service = (props: any) => {
<Form.Item label="Description:" name="content" rules={[{ required: true }]}> <Form.Item label="Description:" name="content" rules={[{ required: true }]}>
<TextArea rows={4} style={{ maxWidth: 600, width: '100%' }} /> <TextArea rows={4} style={{ maxWidth: 600, width: '100%' }} />
</Form.Item> </Form.Item>
<Form.Item label="Remarks:" name="reportRemark" rules={[{ required: true }]}> <Form.Item label="Remarks:" name="reportRemark">
<TextArea rows={4} style={{ maxWidth: 600, width: '100%' }} /> <TextArea rows={4} style={{ maxWidth: 600, width: '100%' }} />
</Form.Item> </Form.Item>
...@@ -306,8 +314,8 @@ const service = (props: any) => { ...@@ -306,8 +314,8 @@ const service = (props: any) => {
<div style={{ textAlign: 'right' }}> <div style={{ textAlign: 'right' }}>
<Pagination <Pagination
defaultCurrent={1} defaultCurrent={1}
defaultPageSize={10} defaultPageSize={term && term.page ? term.page.curPageSize : 5}
total={term && term.list ? term.list.length : 10} total={term && term.page ? term.page.totalRow : 5}
onChange={onChange} onChange={onChange}
/> />
</div> </div>
......
/* /*
* @Author: your name * @Author: your name
* @Date: 2021-03-02 14:39:40 * @Date: 2021-03-02 14:39:40
* @LastEditTime: 2021-05-21 18:07:39 * @LastEditTime: 2021-05-24 14:30:11
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: In User Settings Edit * @Description: In User Settings Edit
* @FilePath: \tostumi\src\pages\AccountManagement\Service\serviceEdit.tsx * @FilePath: \tostumi\src\pages\AccountManagement\Service\serviceEdit.tsx
...@@ -182,7 +182,7 @@ const service = (props: any) => { ...@@ -182,7 +182,7 @@ const service = (props: any) => {
imageType: 'tosReportImage', imageType: 'tosReportImage',
identification: '', identification: '',
}} }}
limitNums={10} limitNums={5}
imgs={ImageSrc} imgs={ImageSrc}
over={loading} over={loading}
/> />
...@@ -224,7 +224,7 @@ const service = (props: any) => { ...@@ -224,7 +224,7 @@ const service = (props: any) => {
imageType: 'tosReportImage', imageType: 'tosReportImage',
identification: '', identification: '',
}} }}
limitNums={10} limitNums={5}
imgs={ImageSrc} imgs={ImageSrc}
over={loading} over={loading}
/> />
......
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