Commit 19afdaad authored by cellee's avatar cellee

修复bug

Signed-off-by: cellee's avatarcellee <893264950@qq.com>
parent 37cbbb33
...@@ -62,7 +62,6 @@ ...@@ -62,7 +62,6 @@
"qs": "^6.9.4", "qs": "^6.9.4",
"react": "^16.8.6", "react": "^16.8.6",
"react-dom": "^16.8.6", "react-dom": "^16.8.6",
"react-file-viewer": "^1.2.1",
"react-helmet-async": "^1.0.4", "react-helmet-async": "^1.0.4",
"react-pdf": "^4.2.0", "react-pdf": "^4.2.0",
"react-pdf-js": "^5.1.0", "react-pdf-js": "^5.1.0",
...@@ -104,6 +103,7 @@ ...@@ -104,6 +103,7 @@
"prettier": "^2.0.1", "prettier": "^2.0.1",
"pro-download": "1.0.1", "pro-download": "1.0.1",
"puppeteer-core": "^3.0.0", "puppeteer-core": "^3.0.0",
"react-file-viewer": "^1.2.1",
"stylelint": "^13.0.0" "stylelint": "^13.0.0"
}, },
"engines": { "engines": {
......
...@@ -126,11 +126,12 @@ const PictureOptionsRow = (props: any) => { ...@@ -126,11 +126,12 @@ const PictureOptionsRow = (props: any) => {
message.error('You can only upload JPG/PNG file!'); message.error('You can only upload JPG/PNG file!');
} }
// 文件大小判断 // 文件大小判断
const isLt2M = file.size / 1024 / 1024 < 2; // const isLt2M = file.size / 1024 / 1024 < 2;
if (!isLt2M) { // if (!isLt2M) {
message.error('Image must smaller than 2MB!'); // message.error('Image must smaller than 2MB!');
} // }
return isJpgOrPng && isLt2M; // return isJpgOrPng && isLt2M;
return isJpgOrPng;
} }
return ( return (
......
declare module 'react-file-viewer';
...@@ -79,6 +79,13 @@ export default { ...@@ -79,6 +79,13 @@ export default {
yield put({ type: 'returnResult', Result }); yield put({ type: 'returnResult', Result });
} }
break; break;
case 54: // 账号权限
{
console.log(resp.data);
// let Result = resp.error_code;
// yield put({ type: 'returnResult', Result });
}
break;
} }
} }
}, },
......
...@@ -83,16 +83,22 @@ const Account = (props: any) => { ...@@ -83,16 +83,22 @@ const Account = (props: any) => {
render: (text: any) => { render: (text: any) => {
return ( return (
<Tag color={text != 1 ? '#87d068' : '#f20'} key={text}> <Tag color={text != 1 ? '#87d068' : '#f20'} key={text}>
<span> {text != 1 ? 'Enable' : 'Close'}</span> <span> {text != 1 ? 'Normal' : 'Deregistered'}</span>
</Tag> </Tag>
); );
}, },
}, },
// {
// title: 'Created By',
// dataIndex: 'tosUserServiceCell',
// key: 'createAccount',
// width: 280,
// ellipsis: true,
// },
{ {
title: 'Created By', title: 'Creator',
dataIndex: 'tosUserServiceCell', dataIndex: 'creatorName',
key: 'createAccount', key: 'creator',
width: 280,
ellipsis: true, ellipsis: true,
}, },
{ {
...@@ -119,13 +125,22 @@ const Account = (props: any) => { ...@@ -119,13 +125,22 @@ const Account = (props: any) => {
Edit Edit
</Button> </Button>
<Button <Button
type="link"
onClick={() => {
edit(record);
}}
>
Detail
</Button>
{/* <Button
type="link" type="link"
onClick={() => { onClick={() => {
lockS(record); lockS(record);
}} }}
> >
{record.userStatus != 1 ? 'Close' : 'Open'} {record.userStatus != 1 ? 'Close' : 'Open'}
</Button> </Button> */}
{/*{record.userID == 1||record.userID == this.props.currentUser.userid?'': {/*{record.userID == 1||record.userID == this.props.currentUser.userid?'':
<Button style={{background: 'transparent', border: 0, color: '#1890FF'}} <Button style={{background: 'transparent', border: 0, color: '#1890FF'}}
onClick={() => this.changeStatus(record)}> onClick={() => this.changeStatus(record)}>
...@@ -139,11 +154,11 @@ const Account = (props: any) => { ...@@ -139,11 +154,11 @@ const Account = (props: any) => {
const edit = (item: any) => { const edit = (item: any) => {
// console.log(item); // console.log(item);
if (item == 1) { if (item == 1) {
history.push('./account/Add'); history.push('/AccountManagement/account/Add');
} else { } else {
let DataSave = item; let DataSave = item;
dispatch({ type: 'Account/SA', DataSave }); dispatch({ type: 'Account/SA', DataSave });
history.push('./account/edit'); history.push('/AccountManagement/account/edit');
} }
}; };
...@@ -204,9 +219,9 @@ const Account = (props: any) => { ...@@ -204,9 +219,9 @@ const Account = (props: any) => {
<Form.Item name="tosUserName"> <Form.Item name="tosUserName">
<Input allowClear placeholder="Account Name" /> <Input allowClear placeholder="Account Name" />
</Form.Item> </Form.Item>
{/* <Form.Item name="creatorName"> <Form.Item name="creatorName">
<Input allowClear placeholder="Account Creator" /> <Input allowClear placeholder="Account Creator" />
</Form.Item> */} </Form.Item>
<Form.Item> <Form.Item>
<Button type="primary" htmlType="submit" icon={<SearchOutlined />} loading={loading}> <Button type="primary" htmlType="submit" icon={<SearchOutlined />} loading={loading}>
Search{' '} Search{' '}
......
...@@ -15,7 +15,7 @@ import { SearchOutlined, ClearOutlined, EditOutlined, LeftOutlined } from '@ant- ...@@ -15,7 +15,7 @@ import { SearchOutlined, ClearOutlined, EditOutlined, LeftOutlined } from '@ant-
import { getCookie } from '@/utils/method'; import { getCookie } from '@/utils/method';
import './Account.less'; import './Account.less';
import { zhCnFaci } from '@/utils/power'; import { zhCnFaci, enUsFaci } from '@/utils/power';
import { AccountTip } from '@/utils/tip'; import { AccountTip } from '@/utils/tip';
import SelectCommunity from '@/components/SelectCommunity'; import SelectCommunity from '@/components/SelectCommunity';
...@@ -41,7 +41,7 @@ const Account = (props: any) => { ...@@ -41,7 +41,7 @@ const Account = (props: any) => {
// }, [CommunityList]); // }, [CommunityList]);
// 权限列表 // 权限列表
const treeData = zhCnFaci; const treeData = enUsFaci || zhCnFaci;
const [expandedKeys, setExpandedKeys] = useState<string[]>([]); // 展开栏目 const [expandedKeys, setExpandedKeys] = useState<string[]>([]); // 展开栏目
const [checkedKeys, setCheckedKeys] = useState<string[]>([]); // 默认已选栏目 const [checkedKeys, setCheckedKeys] = useState<string[]>([]); // 默认已选栏目
......
...@@ -15,7 +15,7 @@ import { SearchOutlined, ClearOutlined, EditOutlined, LeftOutlined } from '@ant- ...@@ -15,7 +15,7 @@ import { SearchOutlined, ClearOutlined, EditOutlined, LeftOutlined } from '@ant-
import { getCookie } from '@/utils/method'; import { getCookie } from '@/utils/method';
import './Account.less'; import './Account.less';
import { zhCnFaci } from '@/utils/power'; import { zhCnFaci, enUsFaci } from '@/utils/power';
import { AccountTip } from '@/utils/tip'; import { AccountTip } from '@/utils/tip';
import SelectCommunity from '@/components/SelectCommunity'; import SelectCommunity from '@/components/SelectCommunity';
...@@ -30,7 +30,7 @@ const Account = (props: any) => { ...@@ -30,7 +30,7 @@ const Account = (props: any) => {
const { dispatch, Data, DataSave, DataSaveDetail, Result, loading, CommunityList } = props; const { dispatch, Data, DataSave, DataSaveDetail, Result, loading, CommunityList } = props;
// 权限列表 // 权限列表
const treeData = zhCnFaci; const treeData = enUsFaci || zhCnFaci;
const [expandedKeys, setExpandedKeys] = useState<string[]>([]); // 展开栏目 const [expandedKeys, setExpandedKeys] = useState<string[]>([]); // 展开栏目
const [checkedKeys, setCheckedKeys] = useState<string[]>([]); // 默认已选栏目 const [checkedKeys, setCheckedKeys] = useState<string[]>([]); // 默认已选栏目
...@@ -65,6 +65,9 @@ const Account = (props: any) => { ...@@ -65,6 +65,9 @@ const Account = (props: any) => {
setvalues(DataSave.tosUserLevel); // 等级 setvalues(DataSave.tosUserLevel); // 等级
setServiceCell(DataSave.tosUserServiceCell.split(',')); // 已选小区 setServiceCell(DataSave.tosUserServiceCell.split(',')); // 已选小区
// 发起获取权限请求
RA(54, { tosUserName: DataSave.tosUserName }, module, dispatch); // 发起获取权限请求
} }
}, [DataSave]); }, [DataSave]);
......
...@@ -229,7 +229,7 @@ const Adds = (props: any) => { ...@@ -229,7 +229,7 @@ const Adds = (props: any) => {
if (values.help) { if (values.help) {
obj.residentialHotlineName = values.help.residentialHotlineName obj.residentialHotlineName = values.help.residentialHotlineName
? undeFi(values.help.residentialHotlineName) ? undeFi(values.help.residentialHotlineName)
: values.info.tel; : 'Community Hotline';
obj.residentialHotline = values.help.residentialHotlineName obj.residentialHotline = values.help.residentialHotlineName
? undeFi(values.help.residentialHotline) ? undeFi(values.help.residentialHotline)
: values.info.tel; : values.info.tel;
......
...@@ -86,17 +86,17 @@ const CellLists = (props: any) => { ...@@ -86,17 +86,17 @@ const CellLists = (props: any) => {
}; };
const goToAdd = () => { const goToAdd = () => {
SA('', module, dispatch); // 清空之前传递的数据 SA('', module, dispatch); // 清空之前传递的数据
history.push('./CellList/Add'); history.push('/CommunityManagement/CellList/Add');
}; };
const goToEdit = (values: any, e: any) => { const goToEdit = (values: any, e: any) => {
// console.log(values); // console.log(values);
SA(values, module, dispatch); SA(values, module, dispatch);
history.push('./CellList/Add'); history.push('/CommunityManagement/CellList/Add');
}; };
const goToDetail = (values: any, e: any) => { const goToDetail = (values: any, e: any) => {
// console.log(values); // console.log(values);
SA(values, module, dispatch); SA(values, module, dispatch);
history.push('./CellList/Detail'); history.push('/CommunityManagement/CellList/Detail');
}; };
// 点击搜索 // 点击搜索
......
...@@ -192,8 +192,8 @@ const Facility = (props: any) => { ...@@ -192,8 +192,8 @@ const Facility = (props: any) => {
result.categoriesName = categoriesName; // 设施内容 result.categoriesName = categoriesName; // 设施内容
result.reservationQuantumTime = soltTime; // 开放时间段 result.reservationQuantumTime = soltTime; // 开放时间段
result.categoriesOpenTime = `${soltTime[0]}-${soltTime[1]}`; // 预约时间段 二开需要 result.categoriesOpenTime = `${soltTime[0]}-${soltTime[1]}`; // 预约时间段 二开需要
result.communityManagerFee = result.communityManagerFee ? result.communityManagerFee : 0; // 价格押金没有为0 result.communityManagerFee = result.communityManagerFee ? result.communityManagerFee : '0.00'; // 价格押金没有为0
result.communityMargin = result.communityMargin ? result.communityMargin : 0; // 价格押金没有为0 result.communityMargin = result.communityMargin ? result.communityMargin : '0.00'; // 价格押金没有为0
delete result.startTime; delete result.startTime;
delete result.endTime; delete result.endTime;
delete result.picList; delete result.picList;
...@@ -299,6 +299,7 @@ const Facility = (props: any) => { ...@@ -299,6 +299,7 @@ const Facility = (props: any) => {
// ubmit={extendName} // ubmit={extendName}
defaultName={sourceData != null ? DataSave.communityName : null} defaultName={sourceData != null ? DataSave.communityName : null}
opname={opname} opname={opname}
disabled={facilityDetail}
/> />
</Form.Item> </Form.Item>
......
...@@ -30,6 +30,8 @@ const FacilityBookings = (props: any) => { ...@@ -30,6 +30,8 @@ const FacilityBookings = (props: any) => {
const { dispatch, location, Data, Data2, token, DataSave, curString, Result, loading } = props; const { dispatch, location, Data, Data2, token, DataSave, curString, Result, loading } = props;
// console.log(Data2);
const RA = (index: any, values: any) => { const RA = (index: any, values: any) => {
dispatch({ dispatch({
type: 'FacilityBookings/RA', type: 'FacilityBookings/RA',
...@@ -123,8 +125,8 @@ const FacilityBookings = (props: any) => { ...@@ -123,8 +125,8 @@ const FacilityBookings = (props: any) => {
null, null,
(text: any, record: any) => ( (text: any, record: any) => (
<Space size="middle"> <Space size="middle">
<a onClick={() => makeOperator(record, 0)}>Detail</a>
<a onClick={() => makeOperator(record, 1)}>Edit</a> <a onClick={() => makeOperator(record, 1)}>Edit</a>
<a onClick={() => makeOperator(record, 0)}>Detail</a>
<a onClick={() => makeOperator(record, 2)}>Booking</a> <a onClick={() => makeOperator(record, 2)}>Booking</a>
</Space> </Space>
), ),
...@@ -357,7 +359,7 @@ const FacilityBookings = (props: any) => { ...@@ -357,7 +359,7 @@ const FacilityBookings = (props: any) => {
{curString ? ( {curString ? (
<div className="pages"> <div className="pages">
<Pagination <Pagination
current={Data2.total.curPageSize} current={Data2.total.currentPage}
total={Data2.total.totalRow} total={Data2.total.totalRow}
// pageSizeOptions={[]} // pageSizeOptions={[]}
showSizeChanger={false} showSizeChanger={false}
......
...@@ -41,7 +41,12 @@ const VisitorRecord = (props: any) => { ...@@ -41,7 +41,12 @@ const VisitorRecord = (props: any) => {
{ title: 'Visitor Time', hideInTable: true, dataIndex: 'showTime', valueType: 'date' }, { title: 'Visitor Time', hideInTable: true, dataIndex: 'showTime', valueType: 'date' },
{ title: 'Visitor Time', dataIndex: 'updateTime', valueType: 'date' }, { title: 'Visitor Time', dataIndex: 'updateTime', valueType: 'date' },
{ title: 'Community', dataIndex: 'visitorCommunity' }, { title: 'Community', dataIndex: 'visitorCommunity' },
{ title: 'Unit', dataIndex: 'inviterAddress' }, // { title: 'Unit', dataIndex: 'inviterAddress' },
{
title: 'Unit',
dataIndex: 'inviterAddress',
render: (text) => <span>BLK {text}</span>,
},
// ["Actions",null, (text: any, record: any) => (<Space size="middle"> <a>Detail</a></Space>)], // ["Actions",null, (text: any, record: any) => (<Space size="middle"> <a>Detail</a></Space>)],
]; ];
...@@ -189,10 +194,10 @@ const VisitorRecord = (props: any) => { ...@@ -189,10 +194,10 @@ const VisitorRecord = (props: any) => {
/> />
</Form.Item> </Form.Item>
<Form.Item name="inviterName"> <Form.Item name="inviterName">
<Input allowClear placeholder="Please input Invitees Name." style={{ width: 240 }} /> <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="Select Date" /> <DatePicker format="YYYY-MM-DD" placeholder="Visitor Time" />
</Form.Item> </Form.Item>
<Form.Item> <Form.Item>
<Button type="primary" htmlType="submit" icon={<SearchOutlined />} loading={loading}> <Button type="primary" htmlType="submit" icon={<SearchOutlined />} loading={loading}>
......
...@@ -41,7 +41,12 @@ const VisitorRecord = (props: any) => { ...@@ -41,7 +41,12 @@ const VisitorRecord = (props: any) => {
{ title: 'Visitor Time', hideInTable: true, dataIndex: 'showTime', valueType: 'date' }, { title: 'Visitor Time', hideInTable: true, dataIndex: 'showTime', valueType: 'date' },
{ title: 'Visitor Time', dataIndex: 'updateTime', valueType: 'date' }, { title: 'Visitor Time', dataIndex: 'updateTime', valueType: 'date' },
{ title: 'Community', dataIndex: 'visitorCommunity' }, { title: 'Community', dataIndex: 'visitorCommunity' },
{ title: 'Unit', dataIndex: 'inviterAddress' }, // { title: 'Unit', dataIndex: 'inviterAddress' },
{
title: 'Unit',
dataIndex: 'inviterAddress',
render: (text) => <span>BLK {text}</span>,
},
// ["Actions",null, (text: any, record: any) => (<Space size="middle"> <a>Detail</a></Space>)], // ["Actions",null, (text: any, record: any) => (<Space size="middle"> <a>Detail</a></Space>)],
]; ];
...@@ -189,10 +194,10 @@ const VisitorRecord = (props: any) => { ...@@ -189,10 +194,10 @@ const VisitorRecord = (props: any) => {
/> />
</Form.Item> </Form.Item>
<Form.Item name="inviterName"> <Form.Item name="inviterName">
<Input allowClear placeholder="Please input Invitees Name." style={{ width: 240 }} /> <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="Select Date" /> <DatePicker format="YYYY-MM-DD" placeholder="Visitor Time" />
</Form.Item> </Form.Item>
<Form.Item> <Form.Item>
<Button type="primary" htmlType="submit" icon={<SearchOutlined />} loading={loading}> <Button type="primary" htmlType="submit" icon={<SearchOutlined />} loading={loading}>
......
...@@ -20,6 +20,7 @@ import { RA } from '@/services/tos'; ...@@ -20,6 +20,7 @@ import { RA } from '@/services/tos';
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 PDF from 'react-pdf-js';
import moment from 'moment'; import moment from 'moment';
import './ContractContent.less'; import './ContractContent.less';
// 配置英文 // 配置英文
...@@ -30,7 +31,6 @@ import SearchOptionsCommnity from '@/components/SearchOptions/SearchOptionsCommn ...@@ -30,7 +31,6 @@ import SearchOptionsCommnity from '@/components/SearchOptions/SearchOptionsCommn
import { tipList } from '@/utils/tip'; import { tipList } from '@/utils/tip';
import FileViewer from 'react-file-viewer'; import FileViewer from 'react-file-viewer';
import PDF from 'react-pdf-js';
import { stringSplit } from '@/utils/string'; import { stringSplit } from '@/utils/string';
const ContractContent = (props: any) => { const ContractContent = (props: any) => {
......
...@@ -127,4 +127,5 @@ export const requestList = [ ...@@ -127,4 +127,5 @@ export const requestList = [
['/tos/user/infromation/get', '51 获取后台所有账号', {}], ['/tos/user/infromation/get', '51 获取后台所有账号', {}],
['/tos/users/quitAndUser', '52 修改账号状态', {}], ['/tos/users/quitAndUser', '52 修改账号状态', {}],
['/tos/tosServiceScope/cancel', '53 删除服务范围'], ['/tos/tosServiceScope/cancel', '53 删除服务范围'],
['/tos/user/permission/get', '54 根据用户名称获取用户权限', {}],
]; ];
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