Commit 19afdaad authored by cellee's avatar cellee

修复bug

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