Commit 43ce00ec authored by cellee's avatar cellee

修复bug

Signed-off-by: cellee's avatarcellee <893264950@qq.com>
parent 966f6305
...@@ -23,7 +23,7 @@ export default { ...@@ -23,7 +23,7 @@ export default {
pathRewrite: { '^': '' }, pathRewrite: { '^': '' },
}, },
'/cash/tos-manager/': { '/cash/tos-manager/': {
target: 'http://acc-huahui.oss-cn-shenzhen.aliyuncs.com', target: 'https://acc-huahui.oss-cn-shenzhen.aliyuncs.com',
changeOrigin: true, changeOrigin: true,
pathRewrite: { '^': '' }, pathRewrite: { '^': '' },
}, },
...@@ -55,7 +55,7 @@ export default { ...@@ -55,7 +55,7 @@ export default {
pathRewrite: { '^': '' }, pathRewrite: { '^': '' },
}, },
'/cash/tos-manager/': { '/cash/tos-manager/': {
target: 'http://acc-huahui.oss-cn-shenzhen.aliyuncs.com', target: 'https://acc-huahui.oss-cn-shenzhen.aliyuncs.com',
changeOrigin: true, changeOrigin: true,
pathRewrite: { '^': '' }, pathRewrite: { '^': '' },
}, },
...@@ -82,7 +82,7 @@ export default { ...@@ -82,7 +82,7 @@ export default {
pathRewrite: { '^': '' }, pathRewrite: { '^': '' },
}, },
'/cash/tos-manager/': { '/cash/tos-manager/': {
target: 'http://acc-huahui.oss-cn-shenzhen.aliyuncs.com', target: 'https://acc-huahui.oss-cn-shenzhen.aliyuncs.com',
changeOrigin: true, changeOrigin: true,
pathRewrite: { '^': '' }, pathRewrite: { '^': '' },
}, },
......
...@@ -63,9 +63,10 @@ ...@@ -63,9 +63,10 @@
"react": "^16.8.6", "react": "^16.8.6",
"react-dom": "^16.8.6", "react-dom": "^16.8.6",
"react-helmet-async": "^1.0.4", "react-helmet-async": "^1.0.4",
"react-pdf": "^4.2.0", "react-pdf": "^5.0.0",
"react-pdf-js": "^5.1.0", "react-pdf-js": "^5.1.0",
"react-persist": "^1.0.2", "react-persist": "^1.0.2",
"react-file-viewer": "^1.2.1",
"redux-persist": "^6.0.0", "redux-persist": "^6.0.0",
"umi": "^3.1.2", "umi": "^3.1.2",
"umi-request": "^1.0.8", "umi-request": "^1.0.8",
...@@ -103,7 +104,6 @@ ...@@ -103,7 +104,6 @@
"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": {
......
{
"compact": false
}
\ No newline at end of file
declare module 'react-file-viewer'; declare module 'react-file-viewer';
declare module 'react-pdf'; declare module 'react-pdf';
declare module '@/assets/d1.pdf';
...@@ -121,6 +121,7 @@ const Account = (props: any) => { ...@@ -121,6 +121,7 @@ const Account = (props: any) => {
onClick={() => { onClick={() => {
edit(record); edit(record);
}} }}
disabled={record.userStatus == 1 ? true : false}
> >
Edit Edit
</Button> </Button>
......
...@@ -94,7 +94,15 @@ const Account = (props: any) => { ...@@ -94,7 +94,15 @@ const Account = (props: any) => {
// 保存提交 // 保存提交
const onFinishContract = async (value: any) => { const onFinishContract = async (value: any) => {
// console.log(value); // console.log(value);
if (checkedKeys.length == 0) { if (
value.tosAccountName.length <= 2 &&
value.tosUserPhone.length != 8 &&
value.tosUserPhone.length != 11
) {
// 姓名联系方式
message.error('Please enter the correct name and contact information!');
return false;
} else if (checkedKeys.length == 0) {
// 权限 // 权限
message.error('Please Select Permission!'); message.error('Please Select Permission!');
return false; return false;
......
...@@ -22,7 +22,7 @@ const Account = (props: any) => { ...@@ -22,7 +22,7 @@ const Account = (props: any) => {
// 权限列表 // 权限列表
const treeData = enUsFaci || zhCnFaci; const treeData = enUsFaci || zhCnFaci;
const [expandedKeys, setExpandedKeys] = useState<string[]>([]); // 展开栏目 const [expandedKeys, setExpandedKeys] = useState<string[]>(['0']); // 展开栏目
const [checkedKeys, setCheckedKeys] = useState<string[]>([]); // 默认已选栏目 const [checkedKeys, setCheckedKeys] = useState<string[]>([]); // 默认已选栏目
const [selectedKeys, setSelectedKeys] = useState<string[]>([]); // 设置选中的树节点 const [selectedKeys, setSelectedKeys] = useState<string[]>([]); // 设置选中的树节点
const [autoExpandParent, setAutoExpandParent] = useState<boolean>(true); // 树形菜单展开关闭 const [autoExpandParent, setAutoExpandParent] = useState<boolean>(true); // 树形菜单展开关闭
...@@ -249,7 +249,9 @@ const Account = (props: any) => { ...@@ -249,7 +249,9 @@ const Account = (props: any) => {
</Descriptions> </Descriptions>
<Form.Item name="community" label="Community"> <Form.Item name="community" label="Community">
<SelectCommunity /> <SelectCommunity
checklist={DataSave == null ? null : DataSave.tosUserServiceCell.split(',')}
/>
</Form.Item> </Form.Item>
<div className="diy" style={{ marginBottom: '14px' }}> <div className="diy" style={{ marginBottom: '14px' }}>
......
...@@ -30,9 +30,6 @@ const Account = (props: any) => { ...@@ -30,9 +30,6 @@ const Account = (props: any) => {
// 单选 二级还是三级管理员 // 单选 二级还是三级管理员
const [values, setvalues] = useState(2); // 树形菜单展开关闭 const [values, setvalues] = useState(2); // 树形菜单展开关闭
// 已选小区
const [ServiceCell, setServiceCell] = useState(null as any);
const [over, setOver] = useState(false); // 关闭账号确认弹窗 const [over, setOver] = useState(false); // 关闭账号确认弹窗
const [accountName, setaccountName] = useState(null as any); // 弹窗账号信息 const [accountName, setaccountName] = useState(null as any); // 弹窗账号信息
...@@ -57,7 +54,6 @@ const Account = (props: any) => { ...@@ -57,7 +54,6 @@ const Account = (props: any) => {
}); });
setvalues(DataSave.tosUserLevel); // 等级 setvalues(DataSave.tosUserLevel); // 等级
setServiceCell(DataSave.tosUserServiceCell.split(',')); // 已选小区
// 发起获取权限请求 // 发起获取权限请求
RA(54, { tosUserName: DataSave.tosUserName }, module, dispatch); // 发起获取权限请求 RA(54, { tosUserName: DataSave.tosUserName }, module, dispatch); // 发起获取权限请求
...@@ -135,7 +131,15 @@ const Account = (props: any) => { ...@@ -135,7 +131,15 @@ const Account = (props: any) => {
// 保存提交 // 保存提交
const onFinishContract = async (value: any) => { const onFinishContract = async (value: any) => {
// console.log(value); // console.log(value);
if (checkedKeys.length == 0) { if (
value.tosAccountName.length <= 2 &&
value.tosUserPhone.length != 8 &&
value.tosUserPhone.length != 11
) {
// 姓名联系方式
message.error('Please enter the correct name and contact information!');
return false;
} else if (checkedKeys.length == 0) {
// 权限 // 权限
message.error('Please Select Permission!'); message.error('Please Select Permission!');
return false; return false;
...@@ -164,10 +168,11 @@ const Account = (props: any) => { ...@@ -164,10 +168,11 @@ const Account = (props: any) => {
return parseInt(n1) - parseInt(n2); return parseInt(n1) - parseInt(n2);
}), }),
}; };
// console.log(obj); console.log(value);
console.log(obj);
RA(38, value, module, dispatch); // 信息上传 // RA(38, value, module, dispatch); // 信息上传
RA(42, obj, module, dispatch); // 权限上传 // RA(42, obj, module, dispatch); // 权限上传
} }
}; };
...@@ -295,7 +300,9 @@ const Account = (props: any) => { ...@@ -295,7 +300,9 @@ const Account = (props: any) => {
</Descriptions> </Descriptions>
<Form.Item name="community" label="Community"> <Form.Item name="community" label="Community">
<SelectCommunity /> <SelectCommunity
checklist={DataSave == null ? null : DataSave.tosUserServiceCell.split(',')}
/>
</Form.Item> </Form.Item>
<div className="diy" style={{ marginBottom: '14px' }}> <div className="diy" style={{ marginBottom: '14px' }}>
...@@ -303,7 +310,7 @@ const Account = (props: any) => { ...@@ -303,7 +310,7 @@ const Account = (props: any) => {
<span className="title">Privilege Level:</span> <span className="title">Privilege Level:</span>
</div> </div>
<div className="label"> <div className="label">
<Radio.Group defaultValue={values} onChange={onRadio}> <Radio.Group defaultValue={DataSave.tosUserLevel} onChange={onRadio}>
<Radio style={radioStyle} value={2}> <Radio style={radioStyle} value={2}>
Two Level Administrator Two Level Administrator
</Radio> </Radio>
......
...@@ -45,7 +45,7 @@ const VisitorRecord = (props: any) => { ...@@ -45,7 +45,7 @@ const VisitorRecord = (props: any) => {
{ {
title: 'Unit', title: 'Unit',
dataIndex: 'inviterAddress', dataIndex: 'inviterAddress',
render: (text) => <span>BLK {text}</span>, render: (text) => <span>{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>)],
]; ];
......
...@@ -45,7 +45,7 @@ const VisitorRecord = (props: any) => { ...@@ -45,7 +45,7 @@ const VisitorRecord = (props: any) => {
{ {
title: 'Unit', title: 'Unit',
dataIndex: 'inviterAddress', dataIndex: 'inviterAddress',
render: (text) => <span>BLK {text}</span>, render: (text) => <span>{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>)],
]; ];
......
This diff is collapsed.
...@@ -32,8 +32,6 @@ import { tipList } from '@/utils/tip'; ...@@ -32,8 +32,6 @@ import { tipList } from '@/utils/tip';
import FileViewer from 'react-file-viewer'; import FileViewer from 'react-file-viewer';
import PDF from 'react-pdf-js'; import PDF from 'react-pdf-js';
import { Document, Page } from 'react-pdf';
import { stringSplit } from '@/utils/string'; import { stringSplit } from '@/utils/string';
const ContractContent = (props: any) => { const ContractContent = (props: any) => {
...@@ -245,16 +243,15 @@ const ContractContent = (props: any) => { ...@@ -245,16 +243,15 @@ const ContractContent = (props: any) => {
}; };
// pdf 总页数 // pdf 总页数
// const onDocumentLoadSuccess = (pages: any) => { const onDocumentLoadSuccess = (pages: any) => {
// setNumPages(pages); setNumPages(pages);
// setNumPages()
// };
const onDocumentLoadSuccess = ({ numPages }: any) => {
//numPages是总页数
setNumPages(numPages);
}; };
// const onDocumentLoadSuccess = ({ numPages }: any) => {
// //numPages是总页数
// setNumPages(numPages);
// };
// 切换pdf 总数 // 切换pdf 总数
const onChangePage = (page: any) => { const onChangePage = (page: any) => {
setPageNumber(page); setPageNumber(page);
...@@ -467,7 +464,7 @@ const ContractContent = (props: any) => { ...@@ -467,7 +464,7 @@ const ContractContent = (props: any) => {
fileInfo.type == 'pdf' ? ( fileInfo.type == 'pdf' ? (
// pdf 换一种 // pdf 换一种
<> <>
{/* <PDF <PDF
file={stringSplit(fileInfo.url, 'm/cash')} file={stringSplit(fileInfo.url, 'm/cash')}
page={pageNumber} page={pageNumber}
scale={1.25} scale={1.25}
...@@ -479,9 +476,9 @@ const ContractContent = (props: any) => { ...@@ -479,9 +476,9 @@ const ContractContent = (props: any) => {
defaultCurrent={pageNumber} defaultCurrent={pageNumber}
total={numPages * 10} total={numPages * 10}
onChange={onChangePage} onChange={onChangePage}
/> */} />
<Document {/* <Document
// file={stringSplit(fileInfo.url, 'm/cash')} //文档地址 // file={stringSplit(fileInfo.url, 'm/cash')} //文档地址
file={stringSplit(fileInfo.url, 'm/cash')} //文档地址 file={stringSplit(fileInfo.url, 'm/cash')} //文档地址
onLoadSuccess={onDocumentLoadSuccess} onLoadSuccess={onDocumentLoadSuccess}
...@@ -501,7 +498,7 @@ const ContractContent = (props: any) => { ...@@ -501,7 +498,7 @@ const ContractContent = (props: any) => {
defaultCurrent={pageNumber} defaultCurrent={pageNumber}
total={numPages * 10} total={numPages * 10}
onChange={onChangePage} onChange={onChangePage}
/> /> */}
</> </>
) : fileInfo.type == 'jpg' || fileInfo.type == 'png' ? ( ) : fileInfo.type == 'jpg' || fileInfo.type == 'png' ? (
// 图片用指定格式 // 图片用指定格式
......
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