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