Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
TOSTUMI
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Maple
TOSTUMI
Commits
de1b8180
Commit
de1b8180
authored
Nov 23, 2020
by
cellee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复bug 以及在线预览
Signed-off-by:
cellee
<
893264950@qq.com
>
parent
3ed477eb
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
630 additions
and
29 deletions
+630
-29
declaration.d.ts
src/declaration.d.ts
+1
-0
Account.tsx
src/pages/AccountManagement/account/Account.tsx
+0
-21
AccountEdit.tsx
src/pages/AccountManagement/account/AccountEdit.tsx
+67
-4
Bookings.tsx
src/pages/CommunityManagement/FacilityBookings/Bookings.tsx
+1
-0
Facility.tsx
src/pages/CommunityManagement/FacilityBookings/Facility.tsx
+1
-1
ContractContent copy.tsx
src/pages/ContractManagement/ContractContent copy.tsx
+526
-0
ContractContent.tsx
src/pages/ContractManagement/ContractContent.tsx
+34
-3
No files found.
src/declaration.d.ts
View file @
de1b8180
declare
module
'react-file-viewer'
;
declare
module
'react-file-viewer'
;
declare
module
'react-pdf'
;
src/pages/AccountManagement/account/Account.tsx
View file @
de1b8180
...
@@ -290,27 +290,6 @@ const Account = (props: any) => {
...
@@ -290,27 +290,6 @@ const Account = (props: any) => {
/>
/>
</
div
>
</
div
>
</
div
>
</
div
>
{
/* 确认关闭账号 */
}
<
Modal
title=
"Operation Tips"
visible=
{
over
}
okText=
{
'Confirm'
}
cancelText=
{
'Cancel'
}
onOk=
{
handleOk
}
onCancel=
{
handleCancel
}
confirmLoading=
{
loading
}
>
{
accountName
!=
null
?
(
<
p
>
Are You Sure To
{
' '
}
<
span
style=
{
{
color
:
'red'
}
}
>
{
accountName
.
userStatus
!=
1
?
'Close'
:
'Open'
}
</
span
>
{
' '
}
The Account '
<
span
style=
{
{
color
:
'red'
}
}
>
{
accountName
.
tosUserName
}
</
span
>
' ?
</
p
>
)
:
(
''
)
}
</
Modal
>
</>
</>
);
);
};
};
...
...
src/pages/AccountManagement/account/AccountEdit.tsx
View file @
de1b8180
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
{
Form
,
Input
,
Button
,
Spin
,
message
,
Descriptions
,
Checkbox
,
Tree
,
Radio
}
from
'antd'
;
import
{
Form
,
Input
,
Button
,
Spin
,
message
,
Descriptions
,
Modal
,
Tree
,
Radio
}
from
'antd'
;
import
{
connect
,
history
}
from
'umi'
;
import
{
connect
,
history
}
from
'umi'
;
import
{
SearchOutlined
,
PoweroffOutlined
,
EditOutlined
,
LeftOutlined
}
from
'@ant-design/icons'
;
import
{
SearchOutlined
,
PoweroffOutlined
,
EditOutlined
,
LeftOutlined
}
from
'@ant-design/icons'
;
import
{
getCookie
}
from
'@/utils/method'
;
import
{
getCookie
}
from
'@/utils/method'
;
...
@@ -33,6 +33,9 @@ const Account = (props: any) => {
...
@@ -33,6 +33,9 @@ const Account = (props: any) => {
// 已选小区
// 已选小区
const
[
ServiceCell
,
setServiceCell
]
=
useState
(
null
as
any
);
const
[
ServiceCell
,
setServiceCell
]
=
useState
(
null
as
any
);
const
[
over
,
setOver
]
=
useState
(
false
);
// 关闭账号确认弹窗
const
[
accountName
,
setaccountName
]
=
useState
(
null
as
any
);
// 弹窗账号信息
// 表单标识
// 表单标识
const
[
form
]
=
Form
.
useForm
();
const
[
form
]
=
Form
.
useForm
();
const
formRef
=
useRef
(
null
);
const
formRef
=
useRef
(
null
);
...
@@ -110,6 +113,25 @@ const Account = (props: any) => {
...
@@ -110,6 +113,25 @@ const Account = (props: any) => {
}
}
},
[
Permission
]);
},
[
Permission
]);
// 监听改变状态提交结果
useEffect
(()
=>
{
if
(
Result
!=
null
)
{
// console.log('改变取消弹窗重新加载,在清空结果');
// let obj = {
// userStatus: accountName.userStatus == 0 ? 1 : 0,
// userID: accountName.tosUserId,
// };
// RA(52, obj);
message
.
success
(
'Successful Operation !'
);
setOver
(
false
);
// 清除结果
dispatch
({
type
:
'Account/ResultClear'
});
dispatch
({
type
:
'Account/ReData'
});
// 退回列表
history
.
push
(
'/AccountManagement/account'
);
}
},
[
Result
]);
// 保存提交
// 保存提交
const
onFinishContract
=
async
(
value
:
any
)
=>
{
const
onFinishContract
=
async
(
value
:
any
)
=>
{
// console.log(value);
// console.log(value);
...
@@ -133,7 +155,7 @@ const Account = (props: any) => {
...
@@ -133,7 +155,7 @@ const Account = (props: any) => {
value
.
creatorId
=
getCookie
(
'id'
);
//新建者ID
value
.
creatorId
=
getCookie
(
'id'
);
//新建者ID
delete
value
.
community
;
delete
value
.
community
;
// console.log(value);
// console.log(value);
value
.
id
=
DataSave
.
id
;
// 另传权限
// 另传权限
let
obj
=
{
let
obj
=
{
userName
:
value
.
tosUserName
,
userName
:
value
.
tosUserName
,
...
@@ -195,7 +217,28 @@ const Account = (props: any) => {
...
@@ -195,7 +217,28 @@ const Account = (props: any) => {
const
keyup_tool
=
(
value
:
any
)
=>
{
const
keyup_tool
=
(
value
:
any
)
=>
{
return
getNumber
(
value
.
replace
(
/
[^\d
^
\.]
+/g
,
''
));
return
getNumber
(
value
.
replace
(
/
[^\d
^
\.]
+/g
,
''
));
};
};
// 选择小区名字并赋值
// 停用账号弹窗
const
lockS
=
()
=>
{
setOver
(
true
);
setaccountName
(
DataSave
);
console
.
log
(
DataSave
);
};
// 关闭弹窗
const
handleCancel
=
(
e
:
any
)
=>
{
setOver
(
false
);
};
// 弹窗 提交确认账号打开关闭
const
handleOk
=
(
e
:
any
)
=>
{
//
let
obj
=
{
userStatus
:
accountName
.
userStatus
==
0
?
1
:
0
,
userID
:
accountName
.
tosUserId
,
};
RA
(
52
,
obj
,
module
,
dispatch
);
// setOver(false);
};
return
(
return
(
<
Spin
spinning=
{
loading
}
>
<
Spin
spinning=
{
loading
}
>
...
@@ -204,7 +247,7 @@ const Account = (props: any) => {
...
@@ -204,7 +247,7 @@ const Account = (props: any) => {
<
EditOutlined
/>
<
EditOutlined
/>
Edit Account
Edit Account
<
div
className=
"back"
>
<
div
className=
"back"
>
<
Button
type=
"primary"
danger
style=
{
{
marginRight
:
15
}
}
>
<
Button
type=
"primary"
danger
style=
{
{
marginRight
:
15
}
}
onClick=
{
lockS
}
>
<
PoweroffOutlined
/>
<
PoweroffOutlined
/>
Close Account
Close Account
</
Button
>
</
Button
>
...
@@ -301,6 +344,26 @@ const Account = (props: any) => {
...
@@ -301,6 +344,26 @@ const Account = (props: any) => {
</
div
>
</
div
>
</
Form
>
</
Form
>
</
div
>
</
div
>
{
/* 确认关闭账号 */
}
<
Modal
title=
"Operation Tips"
visible=
{
over
}
okText=
{
'Confirm'
}
cancelText=
{
'Cancel'
}
onOk=
{
handleOk
}
onCancel=
{
handleCancel
}
confirmLoading=
{
loading
}
>
{
accountName
!=
null
?
(
<
p
>
Are You Sure To
{
' '
}
<
span
style=
{
{
color
:
'red'
}
}
>
{
accountName
.
userStatus
!=
1
?
'Close'
:
'Open'
}
</
span
>
{
' '
}
The Account '
<
span
style=
{
{
color
:
'red'
}
}
>
{
accountName
.
tosUserName
}
</
span
>
' ?
</
p
>
)
:
(
''
)
}
</
Modal
>
</
Spin
>
</
Spin
>
);
);
};
};
...
...
src/pages/CommunityManagement/FacilityBookings/Bookings.tsx
View file @
de1b8180
...
@@ -319,6 +319,7 @@ const Bookings = (props: any) => {
...
@@ -319,6 +319,7 @@ const Bookings = (props: any) => {
style=
{
{
width
:
200
}
}
style=
{
{
width
:
200
}
}
placeholder=
"Name Of Subscriber"
placeholder=
"Name Of Subscriber"
disabled=
{
prohibit
}
disabled=
{
prohibit
}
maxLength=
{
30
}
/>
/>
</
Form
.
Item
>
</
Form
.
Item
>
</
div
>
</
div
>
...
...
src/pages/CommunityManagement/FacilityBookings/Facility.tsx
View file @
de1b8180
...
@@ -306,7 +306,7 @@ const Facility = (props: any) => {
...
@@ -306,7 +306,7 @@ const Facility = (props: any) => {
{
/* 设施名称 以及费用 */
}
{
/* 设施名称 以及费用 */
}
<
Input
.
Group
>
<
Input
.
Group
>
<
Form
.
Item
label=
"Facility"
name=
"facilityName"
rules=
{
NewFaci
[
1
]
}
>
<
Form
.
Item
label=
"Facility"
name=
"facilityName"
rules=
{
NewFaci
[
1
]
}
>
<
Input
placeholder=
"Facility Name"
disabled=
{
facilityDetail
}
/>
<
Input
placeholder=
"Facility Name"
disabled=
{
facilityDetail
}
maxLength=
{
30
}
/>
</
Form
.
Item
>
</
Form
.
Item
>
<
Form
.
Item
label=
"Fee($)"
name=
"communityManagerFee"
rules=
{
NewFaci
[
2
]
}
>
<
Form
.
Item
label=
"Fee($)"
name=
"communityManagerFee"
rules=
{
NewFaci
[
2
]
}
>
{
/* <span className="divIconMoney">$</span> */
}
{
/* <span className="divIconMoney">$</span> */
}
...
...
src/pages/ContractManagement/ContractContent copy.tsx
0 → 100644
View file @
de1b8180
This diff is collapsed.
Click to expand it.
src/pages/ContractManagement/ContractContent.tsx
View file @
de1b8180
...
@@ -31,6 +31,9 @@ import { tipList } from '@/utils/tip';
...
@@ -31,6 +31,9 @@ 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
)
=>
{
...
@@ -242,8 +245,14 @@ const ContractContent = (props: any) => {
...
@@ -242,8 +245,14 @@ 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
);
};
};
// 切换pdf 总数
// 切换pdf 总数
...
@@ -458,12 +467,34 @@ const ContractContent = (props: any) => {
...
@@ -458,12 +467,34 @@ 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}
onDocumentComplete={onDocumentLoadSuccess}
onDocumentComplete={onDocumentLoadSuccess}
/>
/>
<Pagination
style={{ textAlign: 'center', marginTop: 10, display: 'block' }}
simple
defaultCurrent={pageNumber}
total={numPages * 10}
onChange={onChangePage}
/> */
}
<
Document
// file=
{
stringSplit
(
fileInfo
.
url
,
'
m
/
cash
')}
//文档地址
file=
{
stringSplit
(
fileInfo
.
url
,
'm/cash'
)
}
//文档地址
onLoadSuccess=
{
onDocumentLoadSuccess
}
scale=
{
1.25
}
>
<
Page
key=
{
numPages
}
defaultCurrent=
{
numPages
}
//当前页页码
pageNumber=
{
pageNumber
}
scale=
{
1.25
}
// width=
{800}
/>
</
Document
>
<
Pagination
<
Pagination
style=
{
{
textAlign
:
'center'
,
marginTop
:
10
,
display
:
'block'
}
}
style=
{
{
textAlign
:
'center'
,
marginTop
:
10
,
display
:
'block'
}
}
simple
simple
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment