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