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
f48f02f4
Commit
f48f02f4
authored
Dec 10, 2020
by
Sixiang_Zzb
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'final' of
http://120.77.240.215:9701/Maple/tostumi
into final
parents
01e4a8da
89d56b21
Changes
7
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
707 additions
and
146 deletions
+707
-146
SecurityLayout.tsx
src/layouts/SecurityLayout.tsx
+8
-1
login.ts
src/models/login.ts
+3
-0
BookingDetail.tsx
...es/CommunityManagement/FacilityBookings/BookingDetail.tsx
+1
-1
Contract.tsx
src/pages/ContractManagement/Contract.tsx
+1
-6
ContractContent copy.tsx
src/pages/ContractManagement/ContractContent copy.tsx
+549
-0
ContractContent.tsx
src/pages/ContractManagement/ContractContent.tsx
+143
-84
ContractDetail.tsx
src/pages/ContractManagement/ContractDetail.tsx
+2
-54
No files found.
src/layouts/SecurityLayout.tsx
View file @
f48f02f4
...
...
@@ -5,7 +5,7 @@ import { stringify } from 'querystring';
import
{
ConnectState
}
from
'@/models/connect'
;
import
{
CurrentUser
}
from
'@/models/user'
;
import
{
getCookie
}
from
'@/utils/method'
;
import
{
Result
,
Button
}
from
'antd'
;
import
{
message
}
from
'antd'
;
interface
SecurityLayoutProps
extends
ConnectProps
{
loading
?:
boolean
;
...
...
@@ -105,6 +105,13 @@ class SecurityLayout extends React.Component<SecurityLayoutProps, SecurityLayout
const
permission
=
JSON
.
parse
(
localStorage
.
getItem
(
'permission'
)
||
'[]'
);
// 用户重新打开需要重新登录
const
tokenLogin
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'token'
)
||
'[]'
);
if
(
tokenLogin
.
length
==
0
)
{
message
.
warning
(
'Login Expired !'
);
return
<
Redirect
to=
{
`/user/login`
}
/>;
}
let
perObj
=
perList
.
filter
((
obj
)
=>
{
return
obj
.
path
===
location
.
pathname
;
});
...
...
src/models/login.ts
View file @
f48f02f4
...
...
@@ -97,6 +97,9 @@ const Model: LoginModelType = {
localStorage
.
setItem
(
'userInfo'
,
JSON
.
stringify
(
userMessage
));
localStorage
.
setItem
(
'permission'
,
JSON
.
stringify
(
userMessage
.
permission
));
console
.
log
(
'获取到Token:'
+
getCookie
(
'token'
));
// 设置 session 登录 token
sessionStorage
.
setItem
(
'token'
,
JSON
.
stringify
(
userMessage
.
token
));
yield
put
({
type
:
'saveToken'
,
token
:
userMessage
.
token
,
...
...
src/pages/CommunityManagement/FacilityBookings/BookingDetail.tsx
View file @
f48f02f4
...
...
@@ -152,7 +152,7 @@ const BookingDetail = (props: any) => {
{
DataSave
.
communityName
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"Booking Facilities"
>
{
DataSave
.
facilityTitl
e
}
{
DataSave
.
categoriesNam
e
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"Booking Time"
>
{
DataSave
.
subscribeDate
}
{
ExtractTime
}
...
...
src/pages/ContractManagement/Contract.tsx
View file @
f48f02f4
...
...
@@ -124,11 +124,6 @@ const Contract = (props: any) => {
RA
(
19
,
obj
);
};
// 刷新
const
onReset2
=
()
=>
{
RA
(
19
,
term
);
};
// 表单提交
const
onFinishContract
=
(
value
:
any
)
=>
{
if
(
!
value
.
communityName
&&
!
value
.
contractNumber
&&
!
value
.
contractTitle
)
{
...
...
@@ -213,7 +208,7 @@ const Contract = (props: any) => {
density
:
false
,
fullScreen
:
false
,
reload
:
()
=>
{
onReset
2
();
onReset
();
},
setting
:
false
,
}
}
...
...
src/pages/ContractManagement/ContractContent copy.tsx
0 → 100644
View file @
f48f02f4
This diff is collapsed.
Click to expand it.
src/pages/ContractManagement/ContractContent.tsx
View file @
f48f02f4
This diff is collapsed.
Click to expand it.
src/pages/ContractManagement/ContractDetail.tsx
View file @
f48f02f4
...
...
@@ -5,7 +5,8 @@ import { LeftOutlined } from '@ant-design/icons';
import
{
connect
,
history
}
from
'umi'
;
import
LINE
from
'../../components/Line/Line'
;
import
TextArea
from
'antd/lib/input/TextArea'
;
const
{
TextArea
}
=
Input
;
import
PDF
from
'react-pdf-js'
;
import
moment
from
'moment'
;
...
...
@@ -119,30 +120,6 @@ const ContractContent = (props: any) => {
history
.
go
(
-
1
);
};
// 提交
const
onFinish
=
(
values
:
any
)
=>
{
// 判断有没有文件
if
(
fileList
.
length
==
0
)
{
message
.
error
(
'Please upload the attachment!'
);
}
else
{
values
.
contractValidStartDate
=
values
.
time
[
0
].
format
(
'YYYY-MM-DD'
);
values
.
contractValidEndDate
=
values
.
time
[
1
].
format
(
'YYYY-MM-DD'
);
let
data
=
new
Array
();
for
(
let
i
=
0
;
i
<
fileList
.
length
;
i
++
)
{
data
.
push
(
fileList
[
i
].
name
);
}
values
.
contractFileNameList
=
data
;
// 编辑
if
(
DataSaveDetail
!=
null
)
{
values
.
id
=
DataSaveDetail
.
id
;
}
RA
(
27
,
values
);
// RA(27, values)
}
};
// 上传文件设置
const
uploadProps
=
{
accept
:
'.docx,.jpg,.png,.pdf'
,
...
...
@@ -163,30 +140,6 @@ const ContractContent = (props: any) => {
},
};
// // 设置提示倒计时
const
changeTime
=
(
data
:
any
,
dateStrings
:
any
)
=>
{
if
(
data
!=
null
)
{
let
a1
=
moment
(
data
[
1
]).
subtract
(
2
,
'month'
).
format
(
'YYYY-MM-DD'
);
let
a2
=
moment
(
data
[
1
]).
subtract
(
1
,
'month'
).
format
(
'YYYY-MM-DD'
);
setTipTime
([
a1
,
a2
]);
}
console
.
log
(
dateStrings
);
};
// 选择小区名字并赋值
const
opname
=
(
value
:
any
)
=>
{
// 打开上传 如果选择了 小区就打开 否则 禁止上传
value
?
setUploadUp
(
false
)
:
setUploadUp
(
true
);
// 如果切换了 清掉上传的图片
if
(
value
!=
comtyName
)
{
setFileList
([]);
}
setComtyName
(
value
);
// 赋值小区名字 给到上传
form
.
setFieldsValue
({
communityName
:
value
,
});
};
//本地图预览处理
function
getBase64
(
file
:
any
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
...
...
@@ -251,8 +204,6 @@ const ContractContent = (props: any) => {
form=
{
form
}
name=
"basic"
initialValues=
{
DataSaveDetail
}
onFinish=
{
onFinish
}
// initialValues={defForm}
>
<
div
className=
"contract_box"
>
<
div
className=
"list2"
>
...
...
@@ -296,8 +247,6 @@ const ContractContent = (props: any) => {
>
<
SearchOptionsCommnity
defaultName=
{
DataSaveDetail
?
DataSaveDetail
.
communityName
:
null
}
// ubmit={extendName}
opname=
{
opname
}
disabled=
{
true
}
/>
</
Form
.
Item
>
...
...
@@ -327,7 +276,6 @@ const ContractContent = (props: any) => {
defaultValue=
{
DataSaveDetail
?
DataSaveDetail
.
time
:
null
}
disabledDate=
{
disabledDate
}
placeholder=
{
[
'Effective Date'
,
'Expiration Date'
]
}
onChange=
{
changeTime
}
disabled
/>
</
Form
.
Item
>
...
...
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