Commit f7f8ea16 authored by cellee's avatar cellee

预览解决

Signed-off-by: cellee's avatarcellee <893264950@qq.com>
parent 796c5e14
...@@ -27,8 +27,13 @@ export default { ...@@ -27,8 +27,13 @@ export default {
changeOrigin: true, changeOrigin: true,
pathRewrite: { '^': '' }, pathRewrite: { '^': '' },
}, },
// '/tos/': {
// target: 'http://47.74.233.180:8651',
// changeOrigin: true,
// pathRewrite: { '^': '' },
// },
'/tos/': { '/tos/': {
target: 'http://47.74.233.180:8651', target: 'http://192.168.1.28:8651',
changeOrigin: true, changeOrigin: true,
pathRewrite: { '^': '' }, pathRewrite: { '^': '' },
}, },
...@@ -71,11 +76,6 @@ export default { ...@@ -71,11 +76,6 @@ export default {
// }, // },
}, },
pre: { pre: {
// '/api/': {
// target: 'http://localhost:8080',
// changeOrigin: true,
// pathRewrite: { '^': '' },
// },
'/res/': { '/res/': {
target: 'http://mapleonlyone.top', target: 'http://mapleonlyone.top',
changeOrigin: true, changeOrigin: true,
...@@ -86,15 +86,15 @@ export default { ...@@ -86,15 +86,15 @@ export default {
changeOrigin: true, changeOrigin: true,
pathRewrite: { '^': '' }, pathRewrite: { '^': '' },
}, },
'/tos/': {
target: 'http://47.74.233.180:8651',
changeOrigin: true,
pathRewrite: { '^': '' },
},
// '/tos/': { // '/tos/': {
// target: 'http://localhost:8651', // target: 'http://47.74.233.180:8651',
// changeOrigin: true, // changeOrigin: true,
// pathRewrite: { '^': '' }, // pathRewrite: { '^': '' },
// }, // },
'/tos/': {
target: 'http://192.168.1.28:8651',
changeOrigin: true,
pathRewrite: { '^': '' },
},
}, },
}; };
...@@ -10,6 +10,8 @@ import './index.less'; ...@@ -10,6 +10,8 @@ import './index.less';
import moment from 'moment'; import moment from 'moment';
import SearchOptionsCommnity from '@/components/SearchOptions/SearchOptionsCommnity'; import SearchOptionsCommnity from '@/components/SearchOptions/SearchOptionsCommnity';
import SelectCommunity from '@/components/SelectCommunity';
const module = 'VisitorRecord'; const module = 'VisitorRecord';
const VisitorRecord = (props: any) => { const VisitorRecord = (props: any) => {
...@@ -91,22 +93,40 @@ const VisitorRecord = (props: any) => { ...@@ -91,22 +93,40 @@ const VisitorRecord = (props: any) => {
// 点击搜索 // 点击搜索
const onSubmitForm = (value: any) => { const onSubmitForm = (value: any) => {
// 有的话需要先转换 否则会被清除 // 小区更换为数组
// value.visitorCommunity = value.community.value;
let visitorCommunity = value.community.value;
delete value.community;
if (value.showTime) { if (value.showTime) {
value.showTime = moment(value.showTime).format('YYYY-MM-DD'); value.showTime = moment(value.showTime).format('YYYY-MM-DD');
} }
// 有的话需要先转换 否则会被清除
// 清除 undefind // 清除 undefind
let info = JSON.parse(stringifyNoEmptyField(value)); let info = JSON.parse(stringifyNoEmptyField(value));
if (JSON.stringify(info) == '{}') {
message.info('Please select a search'); if (info.showTime) {
} else { info.showTime = moment(info.showTime).format('YYYY-MM-DD');
if (info.showTime) { }
info.showTime = moment(info.showTime).format('YYYY-MM-DD');
// 所有字符串条件检索出来的结果
let Datas = filter(info, DataSave);
let newArr = [];
// 开始数组处理
if (visitorCommunity.length > 0) {
for (let i in Datas) {
if (visitorCommunity.indexOf(Datas[i].visitorCommunity) != -1) {
newArr.push(Datas[i]);
}
} }
console.log(info); } else {
let Datas = filter(info, DataSave); // 没有选小区
SA(Datas, module, dispatch); newArr = Datas;
} }
SA(newArr, module, dispatch);
}; };
// 点击重置 // 点击重置
...@@ -171,11 +191,11 @@ const VisitorRecord = (props: any) => { ...@@ -171,11 +191,11 @@ const VisitorRecord = (props: any) => {
} }
// 选择小区名字并赋值 // 选择小区名字并赋值
const opname = (value: any) => { // const opname = (value: any) => {
form.setFieldsValue({ // form.setFieldsValue({
visitorCommunity: value, // visitorCommunity: value,
}); // });
}; // };
return ( return (
<> <>
...@@ -187,14 +207,15 @@ const VisitorRecord = (props: any) => { ...@@ -187,14 +207,15 @@ const VisitorRecord = (props: any) => {
name="contract" name="contract"
onFinish={onSubmitForm} onFinish={onSubmitForm}
> >
<Form.Item name="visitorCommunity"> {/* <Form.Item name="visitorCommunity">
<SearchOptionsCommnity <SearchOptionsCommnity
// ubmit={extendName} // ubmit={extendName}
opname={opname} opname={opname}
/> />
</Form.Item> </Form.Item> */}
<Form.Item name="inviterName"> <Form.Item name="inviterName">
<Input allowClear placeholder="Invitees Name." style={{ width: 160 }} /> <Input allowClear placeholder="Invitees Name" style={{ width: 160 }} />
</Form.Item> </Form.Item>
<Form.Item name="showTime"> <Form.Item name="showTime">
<DatePicker format="YYYY-MM-DD" placeholder="Visitor Time" /> <DatePicker format="YYYY-MM-DD" placeholder="Visitor Time" />
...@@ -214,6 +235,11 @@ const VisitorRecord = (props: any) => { ...@@ -214,6 +235,11 @@ const VisitorRecord = (props: any) => {
Reset Reset
</Button> </Button>
</Form.Item> </Form.Item>
<div style={{ maxWidth: '100%', marginTop: 15 }}>
<Form.Item name="community" label="">
<SelectCommunity />
</Form.Item>
</div>
</Form> </Form>
</div> </div>
<div style={{ width: '100%', padding: 16, backgroundColor: '#ffffff' }}> <div style={{ width: '100%', padding: 16, backgroundColor: '#ffffff' }}>
......
...@@ -10,6 +10,8 @@ import './index.less'; ...@@ -10,6 +10,8 @@ import './index.less';
import moment from 'moment'; import moment from 'moment';
import SearchOptionsCommnity from '@/components/SearchOptions/SearchOptionsCommnity'; import SearchOptionsCommnity from '@/components/SearchOptions/SearchOptionsCommnity';
import SelectCommunity from '@/components/SelectCommunity';
const module = 'VisitorRecord'; const module = 'VisitorRecord';
const VisitorRecord = (props: any) => { const VisitorRecord = (props: any) => {
...@@ -91,22 +93,40 @@ const VisitorRecord = (props: any) => { ...@@ -91,22 +93,40 @@ const VisitorRecord = (props: any) => {
// 点击搜索 // 点击搜索
const onSubmitForm = (value: any) => { const onSubmitForm = (value: any) => {
// 有的话需要先转换 否则会被清除 // 小区更换为数组
// value.visitorCommunity = value.community.value;
let visitorCommunity = value.community.value;
delete value.community;
if (value.showTime) { if (value.showTime) {
value.showTime = moment(value.showTime).format('YYYY-MM-DD'); value.showTime = moment(value.showTime).format('YYYY-MM-DD');
} }
// 有的话需要先转换 否则会被清除
// 清除 undefind // 清除 undefind
let info = JSON.parse(stringifyNoEmptyField(value)); let info = JSON.parse(stringifyNoEmptyField(value));
if (JSON.stringify(info) == '{}') {
message.info('Please select a search'); if (info.showTime) {
} else { info.showTime = moment(info.showTime).format('YYYY-MM-DD');
if (info.showTime) { }
info.showTime = moment(info.showTime).format('YYYY-MM-DD');
// 所有字符串条件检索出来的结果
let Datas = filter(info, DataSave);
let newArr = [];
// 开始数组处理
if (visitorCommunity.length > 0) {
for (let i in Datas) {
if (visitorCommunity.indexOf(Datas[i].visitorCommunity) != -1) {
newArr.push(Datas[i]);
}
} }
console.log(info); } else {
let Datas = filter(info, DataSave); // 没有选小区
SA(Datas, module, dispatch); newArr = Datas;
} }
SA(newArr, module, dispatch);
}; };
// 点击重置 // 点击重置
...@@ -171,11 +191,11 @@ const VisitorRecord = (props: any) => { ...@@ -171,11 +191,11 @@ const VisitorRecord = (props: any) => {
} }
// 选择小区名字并赋值 // 选择小区名字并赋值
const opname = (value: any) => { // const opname = (value: any) => {
form.setFieldsValue({ // form.setFieldsValue({
visitorCommunity: value, // visitorCommunity: value,
}); // });
}; // };
return ( return (
<> <>
...@@ -187,14 +207,15 @@ const VisitorRecord = (props: any) => { ...@@ -187,14 +207,15 @@ const VisitorRecord = (props: any) => {
name="contract" name="contract"
onFinish={onSubmitForm} onFinish={onSubmitForm}
> >
<Form.Item name="visitorCommunity"> {/* <Form.Item name="visitorCommunity">
<SearchOptionsCommnity <SearchOptionsCommnity
// ubmit={extendName} // ubmit={extendName}
opname={opname} opname={opname}
/> />
</Form.Item> </Form.Item> */}
<Form.Item name="inviterName"> <Form.Item name="inviterName">
<Input allowClear placeholder="Invitees Name." style={{ width: 160 }} /> <Input allowClear placeholder="Invitees Name" style={{ width: 160 }} />
</Form.Item> </Form.Item>
<Form.Item name="showTime"> <Form.Item name="showTime">
<DatePicker format="YYYY-MM-DD" placeholder="Visitor Time" /> <DatePicker format="YYYY-MM-DD" placeholder="Visitor Time" />
...@@ -214,6 +235,11 @@ const VisitorRecord = (props: any) => { ...@@ -214,6 +235,11 @@ const VisitorRecord = (props: any) => {
Reset Reset
</Button> </Button>
</Form.Item> </Form.Item>
<div style={{ maxWidth: '100%', marginTop: 15 }}>
<Form.Item name="community" label="">
<SelectCommunity />
</Form.Item>
</div>
</Form> </Form>
</div> </div>
<div style={{ width: '100%', padding: 16, backgroundColor: '#ffffff' }}> <div style={{ width: '100%', padding: 16, backgroundColor: '#ffffff' }}>
......
...@@ -465,7 +465,8 @@ const ContractContent = (props: any) => { ...@@ -465,7 +465,8 @@ const ContractContent = (props: any) => {
// pdf 换一种 // pdf 换一种
<> <>
<PDF <PDF
file={stringSplit(fileInfo.url, 'm/cash')} file={fileInfo.url}
// file={stringSplit(fileInfo.url, 'm/cash')}
page={pageNumber} page={pageNumber}
scale={1.25} scale={1.25}
onDocumentComplete={onDocumentLoadSuccess} onDocumentComplete={onDocumentLoadSuccess}
...@@ -511,7 +512,8 @@ const ContractContent = (props: any) => { ...@@ -511,7 +512,8 @@ const ContractContent = (props: any) => {
) : ( ) : (
<FileViewer <FileViewer
fileType={fileInfo.type} fileType={fileInfo.type}
filePath={stringSplit(fileInfo.url, 'm/cash')} filePath={fileInfo.url}
// filePath={stringSplit(fileInfo.url, 'm/cash')}
/> />
) )
) : ( ) : (
......
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