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
16513394
Commit
16513394
authored
Jan 27, 2021
by
cellee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
权限绑定修改
Signed-off-by:
cellee
<
893264950@qq.com
>
parent
b32b2ffc
Changes
21
Show whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
330 additions
and
156 deletions
+330
-156
proxy.ts
config/proxy.ts
+6
-6
Facilitys.tsx
src/components/Facilitys/Facilitys.tsx
+7
-17
CompanyInformation.tsx
...countManagement/CompanyInformation/CompanyInformation.tsx
+24
-16
index.less
src/pages/AccountManagement/CompanyInformation/index.less
+29
-31
SystemFeedback.tsx
...pages/AccountManagement/SystemFeedback/SystemFeedback.tsx
+1
-3
Account.tsx
src/pages/AccountManagement/account/Account.tsx
+1
-3
AccountAdds.tsx
src/pages/AccountManagement/account/AccountAdds.tsx
+13
-12
AccountEdit copy.tsx
src/pages/AccountManagement/account/AccountEdit copy.tsx
+16
-6
AccountEdit.tsx
src/pages/AccountManagement/account/AccountEdit.tsx
+197
-10
CellList.tsx
src/pages/CommunityManagement/CellList/CellList.tsx
+4
-3
CommunityAnnouncement.tsx
...anagement/CommunityAnnouncement/CommunityAnnouncement.tsx
+1
-3
BookingDetail.tsx
...es/CommunityManagement/FacilityBookings/BookingDetail.tsx
+1
-6
Facility.tsx
src/pages/CommunityManagement/FacilityBookings/Facility.tsx
+2
-2
FacilityBookings.tsx
...CommunityManagement/FacilityBookings/FacilityBookings.tsx
+1
-3
FacilityTow.tsx
...ages/CommunityManagement/FacilityBookings/FacilityTow.tsx
+2
-6
VisitorRecord.tsx
...pages/CommunityManagement/VisitorRecord/VisitorRecord.tsx
+1
-3
VisitorRecord.tsx
...pages/CommunityManagement/visitorRecord/VisitorRecord.tsx
+1
-3
Contract.tsx
src/pages/ContractManagement/Contract.tsx
+2
-4
ContractContent.tsx
src/pages/ContractManagement/ContractContent.tsx
+17
-13
ChargeManager.tsx
src/pages/PropertyManagement/ChargeManager.tsx
+1
-3
params.ts
src/utils/params.ts
+3
-3
No files found.
config/proxy.ts
View file @
16513394
...
...
@@ -86,15 +86,15 @@ export default {
changeOrigin
:
true
,
pathRewrite
:
{
'^'
:
''
},
},
'/tos/'
:
{
target
:
'http://47.74.233.180:8651'
,
changeOrigin
:
true
,
pathRewrite
:
{
'^'
:
''
},
},
// '/tos/': {
// target: 'http://
192.168.1.28
:8651',
// target: 'http://
47.74.233.180
:8651',
// changeOrigin: true,
// pathRewrite: { '^': '' },
// },
'/tos/'
:
{
target
:
'http://192.168.1.28:8651'
,
changeOrigin
:
true
,
pathRewrite
:
{
'^'
:
''
},
},
},
};
src/components/Facilitys/Facilitys.tsx
View file @
16513394
...
...
@@ -27,16 +27,11 @@ const Facilitys = (props: any) => {
const
[
previewTitle
,
setpreviewTitle
]
=
useState
(
''
);
// 图片地址
const
[
previewImage
,
setpreviewImage
]
=
useState
(
''
);
//
默认Id
//
const
[
idKey
,
setidKey
]
=
useState
(
10001
);
// 当前操作的Id
const
[
idPush
,
setidPush
]
=
useState
(
null
as
any
);
// 传递给后台加 key
const
updetaTow
=
(
key
:
any
)
=>
{
console
.
log
(
key
);
setidPush
(
key
);
let
data
=
updata
;
data
.
identification
=
key
;
return
data
;
...
...
@@ -63,12 +58,14 @@ const Facilitys = (props: any) => {
accept
:
'.jpeg,.png,.jpg'
,
action
:
'/tos/image/upload'
,
onChange
(
info
:
any
)
{
// console.log(info);
if
(
info
.
file
.
status
===
'done'
)
{
message
.
success
(
`
${
info
.
file
.
name
}
file uploaded successfully`
);
// 后台返回的
内容
// 后台返回的
值
let
data
=
info
.
file
.
response
.
data
;
// 拿到key 值 开始存储
let
key
=
parseInt
(
data
.
identification
);
// 重命名图片的名称
info
.
file
.
name
=
data
.
imageName
;
...
...
@@ -84,8 +81,7 @@ const Facilitys = (props: any) => {
// 存储到mode里面去
dispatch
({
type
:
module
+
'/genxin'
,
list
});
// 清除操作ID
setidPush
(
null
);
console
.
log
(
list
);
}
else
if
(
info
.
file
.
status
===
'error'
)
{
message
.
error
(
`
${
info
.
file
.
name
}
file upload failed.`
);
}
...
...
@@ -123,9 +119,9 @@ const Facilitys = (props: any) => {
//删除动作
const
deleteImg
=
(
key
:
any
,
id
:
any
)
=>
{
// console.log(key);
let
list
=
FacilitysList
;
// list[key].name = '';
list
[
key
].
name
=
''
;
list
.
splice
(
key
,
1
);
// 存储到mode里面去
dispatch
({
type
:
module
+
'/genxin'
,
list
});
...
...
@@ -156,11 +152,6 @@ const Facilitys = (props: any) => {
dispatch
({
type
:
module
+
'/genxin'
,
list
});
};
//点击新增按钮
const
handleChange
=
(
a
)
=>
{
console
.
log
(
a
);
};
return
(
<>
<
Form
.
Item
name=
"picList"
required=
{
false
}
style=
{
{
marginBottom
:
0
}
}
>
...
...
@@ -183,7 +174,6 @@ const Facilitys = (props: any) => {
onRemove=
{
()
=>
{
deleteImgs
(
index
,
item
.
id
);
}
}
//移除
// onChange=
{
handleChange
}
// 点击确认
>
{
FacilitysList
[
index
].
fileList
.
length
>
0
?
null
:
uploadButton
}
</
Upload
>
...
...
src/pages/AccountManagement/CompanyInformation/CompanyInformation.tsx
View file @
16513394
/*
* @Author: your name
* @Date: 2020-11-19 16:54:53
* @LastEditTime: 2021-01-27 17:23:53
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \tostumi\src\pages\AccountManagement\CompanyInformation\CompanyInformation.tsx
*/
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
styles
from
'./index.less'
;
import
{
Input
,
Menu
,
Table
,
Space
,
Pagination
,
Tooltip
,
Button
}
from
'antd'
;
import
{
Input
,
Menu
,
Table
,
Space
,
Pagination
,
Tooltip
,
Button
}
from
'antd'
;
import
{
Link
,
useIntl
,
connect
,
Dispatch
}
from
'umi'
;
const
CompanyInformation
=
()
=>
{
return
(
<
div
className=
{
styles
.
base
}
>
<
div
className=
{
styles
.
box1
}
>
<
div
className=
{
styles
.
box1item1
}
>
Management Company
</
div
>
<
div
className=
{
styles
.
box1item2
}
>
Singapore Management Company
</
div
>
<
div
className=
{
styles
.
box1item3
}
>
<
Button
>
Edit
</
Button
></
div
>
<
div
className=
{
styles
.
box1item1
}
>
Management Company :
</
div
>
<
div
style=
{
{
position
:
'absolute'
,
left
:
160
}
}
>
<
Input
style=
{
{
width
:
200
}
}
value=
"TOS Pte Ltd"
/>
</
div
>
{
/* <div className={styles.box1item3}> <Button>Edit</Button></div> */
}
</
div
>
<
div
className=
{
styles
.
box2
}
>
<
div
className=
{
styles
.
box2item1
}
>
Contact Number
</
div
>
<
div
className=
{
styles
.
box2item2
}
><
Input
style=
{
{
width
:
200
}
}
/></
div
>
<
div
className=
{
styles
.
box2item1
}
>
Contact Number :
</
div
>
<
div
className=
{
styles
.
box2item2
}
>
<
Input
style=
{
{
width
:
200
}
}
value=
"67441692"
/>
</
div
>
</
div
>
<
div
className=
{
styles
.
box2
}
>
<
div
className=
{
styles
.
box2item1
}
>
Contact Email
</
div
>
<
div
className=
{
styles
.
box2item2
}
><
Input
style=
{
{
width
:
200
}
}
/></
div
>
<
div
className=
{
styles
.
box2item1
}
>
Contact Email :
</
div
>
<
div
className=
{
styles
.
box2item2
}
>
<
Input
style=
{
{
width
:
200
}
}
value=
"admin.tos@crems.com.sg"
/>
</
div
>
</
div
>
</
div
>
);
};
export
default
CompanyInformation
;
src/pages/AccountManagement/CompanyInformation/index.less
View file @
16513394
...
...
@@ -5,38 +5,36 @@
width: 100%;
background-color: #ffffff;
padding: 34px;
min-width: 1020px;
}
.box1{
.box1
{
width: 100%;
height: 34px;
position: relative;
margin-bottom: 28px;
}
.box1item1{
.box1item1
{
position: absolute;
}
.box1item2{
.box1item2
{
position: absolute;
left: 197px;
}
.box1item3{
.box1item3
{
position: absolute;
right: 0;
}
.box2{
.box2 {
width: 100%;
height: 34px;
position: relative;
margin-bottom: 28px;
}
.box2item1{
.box2item1
{
position: absolute;
}
.box2item2{
.box2item2
{
position: absolute;
left: 158px;
}
src/pages/AccountManagement/SystemFeedback/SystemFeedback.tsx
View file @
16513394
...
...
@@ -88,9 +88,7 @@ const SystemFeedback = (props: any) => {
options=
{
{
density
:
false
,
fullScreen
:
false
,
reload
:
()
=>
{
Refresh
();
},
reload
:
false
,
setting
:
false
,
}
}
loading=
{
loading
}
...
...
src/pages/AccountManagement/account/Account.tsx
View file @
16513394
...
...
@@ -284,9 +284,7 @@ const Account = (props: any) => {
options=
{
{
density
:
false
,
fullScreen
:
false
,
reload
:
()
=>
{
Refresh
();
},
reload
:
false
,
setting
:
false
,
}
}
headerTitle=
"Account list"
...
...
src/pages/AccountManagement/account/AccountAdds.tsx
View file @
16513394
...
...
@@ -36,7 +36,9 @@ const Account = (props: any) => {
const
{
Option
}
=
Select
;
//二级账户列表
const
towAccount
=
JSON
.
parse
(
localStorage
.
getItem
(
'towAccount'
)
||
'[]'
);
const
towAccount
=
JSON
.
parse
(
localStorage
.
getItem
(
'towAccount'
)
||
'[{"id":1,"tosAccountName":"2"}]'
,
);
// 当前账户权限
useEffect
(()
=>
{
...
...
@@ -73,7 +75,7 @@ const Account = (props: any) => {
// 且禁用最后两个账户管理
_p
[
_p
.
length
-
1
].
children
[
2
].
disableCheckbox
=
true
;
_p
[
_p
.
length
-
1
].
children
[
3
].
disableCheckbox
=
true
;
}
else
{
}
else
if
(
values
==
3
)
{
// 如果是一级账户获取挂靠的二级账户名称
RA
(
56
,
{},
module
,
dispatch
);
// 权限上传
}
...
...
@@ -261,15 +263,6 @@ const Account = (props: any) => {
return
getNumber
(
value
.
replace
(
/
[^\d
^
\.]
+/g
,
''
));
};
// 二级账户
const
listItems
=
towAccount
.
map
((
item
:
any
)
=>
{
return
(
<
Option
key=
{
item
.
id
}
value=
{
item
.
id
}
>
{
item
.
tosAccountName
}
</
Option
>
);
});
// 选择哪个二级账号
const
handleChange
=
(
value
:
any
)
=>
{
RA
(
57
,
{
tosUserLevelId
:
value
},
module
,
dispatch
);
// 根据用户id获取用户管辖小区名和权限
...
...
@@ -343,7 +336,15 @@ const Account = (props: any) => {
onChange=
{
handleChange
}
placeholder=
"Please select affiliated account"
>
{
towAccount
?
listItems
:
''
}
{
towAccount
?
towAccount
.
map
((
item
:
any
)
=>
{
return
(
<
Option
key=
{
item
.
id
}
value=
{
item
.
id
}
>
{
item
.
tosAccountName
}
</
Option
>
);
})
:
''
}
</
Select
>
)
:
(
''
...
...
src/pages/AccountManagement/account/AccountEdit copy.tsx
View file @
16513394
...
...
@@ -29,7 +29,8 @@ const Account = (props: any) => {
const
[
towAccountId
,
settowAccountId
]
=
useState
(
null
);
// 二级账户id
//提醒次数
const
[
frequency
,
setfrequency
]
=
useState
(
0
);
// 权限列表
// const [frequency, setfrequency] = useState(0); // 权限列表
const
[
TreeDisabled
,
setTreeDisabled
]
=
useState
(
true
);
// 权限是否可编辑
// 表单标识
const
[
form
]
=
Form
.
useForm
();
...
...
@@ -56,6 +57,14 @@ const Account = (props: any) => {
settowAccountId
(
DataSave
.
userLeader
);
//上级id
}
// 二级账户可以编辑下级但不可编辑自身
if
(
user
.
currentUser
.
userModel
.
tosUserLevel
==
1
||
(
user
.
currentUser
.
userModel
.
tosUserLevel
==
2
&&
DataSave
.
tosUserLevel
==
3
)
)
{
setTreeDisabled
(
false
);
}
// 发起获取权限请求
RA
(
54
,
{
tosUserName
:
DataSave
.
tosUserName
},
module
,
dispatch
);
// 发起获取权限请求
}
else
{
...
...
@@ -175,6 +184,7 @@ const Account = (props: any) => {
value
.
userLeader
=
towAccountId
;
}
delete
value
.
community
;
// 编辑的时候传id 新增则没有
DataSave
?
(
value
.
id
=
DataSave
.
id
)
:
''
;
// 判断有没有 0 有就删除
...
...
@@ -313,7 +323,7 @@ const Account = (props: any) => {
cancelText
:
'No'
,
onOk
()
{
setCheckedKeys
(
checkedKeys
);
setfrequency
(
1
);
//
setfrequency(1);
},
onCancel
()
{},
});
...
...
@@ -380,7 +390,7 @@ const Account = (props: any) => {
<
Descriptions
column=
{
{
xs
:
1
,
sm
:
1
,
md
:
2
,
xl
:
3
}
}
>
<
Descriptions
.
Item
>
<
Form
.
Item
name=
"tosUserName"
label=
"Account ID"
rules=
{
AccountTip
[
0
]
as
any
}
>
<
Input
placeholder=
"Login Account"
className=
"input"
/>
<
Input
placeholder=
"Login Account"
className=
"input"
disabled
/>
</
Form
.
Item
>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
>
...
...
@@ -407,10 +417,10 @@ const Account = (props: any) => {
<
div
className=
"label"
>
<
Radio
.
Group
value=
{
values
}
onChange=
{
onRadio
}
>
<
Radio
style=
{
radioStyle
}
disabled
value=
{
2
}
>
Two
Level Administrator
Second
Level Administrator
</
Radio
>
<
Radio
style=
{
radioStyle
}
disabled
value=
{
3
}
>
Th
ree
Level Administrator
Th
ird
Level Administrator
</
Radio
>
</
Radio
.
Group
>
...
...
@@ -451,7 +461,7 @@ const Account = (props: any) => {
onSelect=
{
onSelect
}
selectedKeys=
{
selectedKeys
}
treeData=
{
treeDataList
}
disabled=
{
user
&&
user
.
currentUser
.
userModel
.
tosUserLevel
!=
1
?
true
:
false
}
disabled=
{
TreeDisabled
}
/>
</
div
>
</
div
>
...
...
src/pages/AccountManagement/account/AccountEdit.tsx
View file @
16513394
...
...
@@ -13,7 +13,7 @@ import { RA } from '@/utils/method';
const
Account
=
(
props
:
any
)
=>
{
const
module
=
'Account'
;
const
{
Option
}
=
Select
;
const
{
dispatch
,
SubResult
,
loading
,
user
,
DataSave
,
Permission
}
=
props
;
const
{
dispatch
,
SubResult
,
loading
,
user
,
DataSave
,
Permission
,
Info
}
=
props
;
// 权限列表
const
treeData
=
localStorage
.
getItem
(
'umi_locale'
)
==
'zh-CN'
?
zhCnFaci
:
enUsFaci
;
...
...
@@ -26,7 +26,7 @@ const Account = (props: any) => {
// 单选 二级还是三级管理员
const
[
values
,
setvalues
]
=
useState
(
2
);
// 树形菜单展开关闭
const
[
towAccountId
,
settowAccountId
]
=
useState
(
null
);
// 二级账户id
const
[
towAccountId
,
settowAccountId
]
=
useState
(
null
as
any
);
// 二级账户id
//提醒次数
// const [frequency, setfrequency] = useState(0); // 权限列表
...
...
@@ -55,6 +55,9 @@ const Account = (props: any) => {
if
(
DataSave
.
tosUserLevel
==
3
)
{
settowAccountId
(
DataSave
.
userLeader
);
//上级id
// 获取列表
RA
(
56
,
{},
module
,
dispatch
);
// 获取三级
}
// 二级账户可以编辑下级但不可编辑自身
...
...
@@ -354,16 +357,183 @@ const Account = (props: any) => {
marginBottom
:
'15px'
,
};
/* -------------------------- 2021年1月27日 更新----------------------------------- */
//级别切换
const
onRadio
=
(
e
:
any
)
=>
{
setvalues
(
e
.
target
.
value
);
// setCheckedKeys([]);
if
(
e
.
target
.
value
==
2
)
{
//否则打开
settowAccountId
(
null
);
setvalues
(
e
.
target
.
value
);
// 原本是二级的话就要还原之前的
if
(
DataSave
.
tosUserLevel
==
2
)
{
power2
();
}
else
{
power3
(
user
.
currentUser
.
permission
);
}
}
else
if
(
DataSave
.
subordinateAccountStatus
==
1
)
{
message
.
info
(
'There Is A Subordinate Acount And Cannot Be Modified !'
);
// setvalues(2);
return
false
;
}
else
{
setvalues
(
e
.
target
.
value
);
RA
(
56
,
{},
module
,
dispatch
);
// 获取三级
}
};
// 二级管辖小区和权限
useEffect
(()
=>
{
if
(
Info
!=
null
)
{
power
(
Info
.
permissions
);
setCheckedKeys
([]);
}
},
[
Info
]);
//权限赋值
const
power
=
(
val
:
any
)
=>
{
let
_tmp
=
JSON
.
stringify
(
treeData
);
//将对象转换为json字符串形式
let
treeDatas
=
JSON
.
parse
(
_tmp
);
//将转换而来的字符串转换为原生js对
let
_a
=
val
;
// 当前账户权限
let
_p
=
treeDatas
[
0
].
children
;
// 所有权限列表
let
arr
:
any
=
[];
// 一级栏目权限
let
erArr
:
any
=
[];
// 一级栏目权限
// 循环一级 判断当前账户有没有权限修改增加
for
(
let
i
of
_a
)
{
for
(
let
j
in
_p
)
{
if
(
_p
[
j
].
key
==
i
)
{
arr
.
push
(
_p
[
j
].
key
);
_p
[
j
].
disabled
=
false
;
}
// 二级权限
for
(
let
k
in
_p
[
j
].
children
)
{
if
(
_p
[
j
].
children
[
k
].
key
==
i
)
{
erArr
.
push
(
_p
[
j
].
children
[
k
].
key
);
_p
[
j
].
children
[
k
].
disableCheckbox
=
false
;
}
}
}
}
// 且禁用最后两个账户管理
_p
[
_p
.
length
-
1
].
children
[
2
].
disableCheckbox
=
true
;
_p
[
_p
.
length
-
1
].
children
[
3
].
disableCheckbox
=
true
;
// 赋值改变
treeDatas
[
0
].
children
=
_p
;
settreeDataList
(
treeDatas
as
any
);
// 可勾选列表
};
//权限恢复 2->3->2
const
power2
=
()
=>
{
let
data
=
Permission
.
curUserPermission
?
Permission
.
curUserPermission
.
split
(
','
)
:
[];
let
dataTow
=
Permission
.
beloginPermission
?
Permission
.
beloginPermission
.
split
(
','
)
:
[];
// 深拷贝权限列表
let
treeDatas
=
JSON
.
parse
(
JSON
.
stringify
(
treeData
));
// 如果是三级账户 可编辑的就是 上级权限,否者是登录的账户权限
let
_a
=
DataSave
.
tosUserLevel
==
3
?
dataTow
:
user
.
currentUser
.
permission
;
// 当前账户权限
let
_p
=
treeDatas
[
0
].
children
;
// 所有权限列表
let
arr
:
any
=
[];
// 一级栏目权限
let
erArr
:
any
=
[];
// 一级栏目权限
// 循环一级 判断当前账户有没有权限修改增加
for
(
let
i
of
_a
)
{
for
(
let
j
in
_p
)
{
if
(
_p
[
j
].
key
==
i
)
{
arr
.
push
(
_p
[
j
].
key
);
_p
[
j
].
disabled
=
false
;
}
// 二级权限
for
(
let
k
in
_p
[
j
].
children
)
{
if
(
_p
[
j
].
children
[
k
].
key
==
i
)
{
erArr
.
push
(
_p
[
j
].
children
[
k
].
key
);
_p
[
j
].
children
[
k
].
disableCheckbox
=
false
;
}
}
}
}
// 赋值 可勾选的权限
treeDatas
[
0
].
children
=
_p
;
settreeDataList
([...
treeDatas
]);
//-----------------分割--------------------
// 在解决默认已勾选的值
for
(
let
i
in
_p
)
{
let
arr
=
_p
[
i
].
children
;
// 每个权限
let
newArr
=
[];
// 每个权限下的子权限列表
for
(
let
j
in
arr
)
{
newArr
.
push
(
arr
[
j
].
key
);
}
if
(
!
newArr
.
every
((
val
)
=>
data
.
includes
(
val
)))
{
// 判断数组是否包含另一个数组
// console.log('不包含' + _p[i].key);
// 不全部包含就删除数组的元素
var
index
=
data
.
indexOf
(
_p
[
i
].
key
);
if
(
index
>
-
1
)
{
data
.
splice
(
index
,
1
);
}
}
}
// 再赋值给列表
if
(
DataSave
.
tosUserLevel
==
3
)
{
// 且禁用最后两个账户管理
_p
[
_p
.
length
-
1
].
children
[
2
].
disableCheckbox
=
true
;
_p
[
_p
.
length
-
1
].
children
[
3
].
disableCheckbox
=
true
;
}
setCheckedKeys
(
data
);
};
//权限恢复 3-> 2
const
power3
=
(
val
:
any
)
=>
{
let
_tmp
=
JSON
.
stringify
(
treeData
);
//将对象转换为json字符串形式
let
treeDatas
=
JSON
.
parse
(
_tmp
);
//将转换而来的字符串转换为原生js对
let
_a
=
val
;
// 当前账户权限
let
_p
=
treeDatas
[
0
].
children
;
// 所有权限列表
let
arr
:
any
=
[];
// 一级栏目权限
let
erArr
:
any
=
[];
// 一级栏目权限
// 循环一级 判断当前账户有没有权限修改增加
for
(
let
i
of
_a
)
{
for
(
let
j
in
_p
)
{
if
(
_p
[
j
].
key
==
i
)
{
arr
.
push
(
_p
[
j
].
key
);
_p
[
j
].
disabled
=
false
;
}
// 二级权限
for
(
let
k
in
_p
[
j
].
children
)
{
if
(
_p
[
j
].
children
[
k
].
key
==
i
)
{
erArr
.
push
(
_p
[
j
].
children
[
k
].
key
);
_p
[
j
].
children
[
k
].
disableCheckbox
=
false
;
}
}
}
}
// 赋值改变
treeDatas
[
0
].
children
=
_p
;
settreeDataList
(
treeDatas
as
any
);
// 可勾选列表
};
//二级账户列表
const
towAccount
=
JSON
.
parse
(
localStorage
.
getItem
(
'towAccount'
)
||
'[{"id":1,"tosAccountName":"test"}]'
,
);
console
.
log
(
towAccount
);
// 选择哪个二级账号
const
handleChange
=
(
value
:
any
)
=>
{
RA
(
57
,
{
tosUserLevelId
:
value
},
module
,
dispatch
);
// 根据用户id获取用户管辖小区名和权限
settowAccountId
(
value
);
};
/* --------------------------- 更新 End---------------------------------- */
return
(
<
Spin
spinning=
{
loading
}
>
<
div
className=
"contop"
style=
{
{
padding
:
'12px 20px'
}
}
>
...
...
@@ -415,11 +585,15 @@ const Account = (props: any) => {
<
span
className=
"title"
>
Privilege Level:
</
span
>
</
div
>
<
div
className=
"label"
>
<
Radio
.
Group
value=
{
values
}
onChange=
{
onRadio
}
>
<
Radio
style=
{
radioStyle
}
disabled
value=
{
2
}
>
<
Radio
.
Group
value=
{
values
}
onChange=
{
onRadio
}
disabled=
{
user
.
currentUser
.
userModel
.
tosUserLevel
!=
1
}
>
<
Radio
style=
{
radioStyle
}
value=
{
2
}
>
Second Level Administrator
</
Radio
>
<
Radio
style=
{
radioStyle
}
disabled
value=
{
3
}
>
<
Radio
style=
{
radioStyle
}
value=
{
3
}
>
Third Level Administrator
</
Radio
>
</
Radio
.
Group
>
...
...
@@ -429,16 +603,29 @@ const Account = (props: any) => {
<
Select
style=
{
{
width
:
260
}
}
placeholder=
"Please select affiliated account"
disabled
defaultValue=
{
DataSave
.
userLeader
}
defaultValue=
{
towAccountId
}
onChange=
{
handleChange
}
>
{
towAccount
?
towAccount
.
map
((
item
:
any
)
=>
{
return
(
<
Option
key=
{
item
.
id
}
value=
{
item
.
id
}
disabled=
{
DataSave
&&
item
.
id
==
DataSave
.
id
}
>
{
DataSave
?
(
{
item
.
tosAccountName
}
</
Option
>
);
})
:
''
}
{
/* {DataSave ? (
<Option key={DataSave.userLeader} value={DataSave.userLeader}>
{DataSave.userLeaderAccountName}
</Option>
) : (
''
)
}
)}
*/
}
</
Select
>
)
:
(
''
...
...
src/pages/CommunityManagement/CellList/CellList.tsx
View file @
16513394
...
...
@@ -159,9 +159,10 @@ const CellLists = (props: any) => {
options=
{
{
density
:
false
,
fullScreen
:
false
,
reload
:
()
=>
{
resetHandler
();
},
// reload: () =>
{
// resetHandler();
//
},
reload
:
false
,
setting
:
false
,
}
}
headerTitle=
"Community List"
...
...
src/pages/CommunityManagement/CommunityAnnouncement/CommunityAnnouncement.tsx
View file @
16513394
...
...
@@ -248,9 +248,7 @@ const CommunityAnnouncement = (props: any) => {
options=
{
{
density
:
false
,
fullScreen
:
false
,
reload
:
()
=>
{
onReset
();
},
reload
:
false
,
setting
:
false
,
}
}
headerTitle=
"Announcement list"
...
...
src/pages/CommunityManagement/FacilityBookings/BookingDetail.tsx
View file @
16513394
...
...
@@ -235,12 +235,7 @@ const BookingDetail = (props: any) => {
<
InputNumber
placeholder=
"00.00"
min=
{
0
}
max=
{
(
parseInt
(
DataSaveDetail
.
marginFee
)
+
parseInt
(
DataSaveDetail
.
managerFee
)
).
toFixed
(
2
)
as
any
}
max=
{
parseInt
(
DataSaveDetail
.
marginFee
).
toFixed
(
2
)
as
any
}
maxLength=
{
6
}
step=
{
0.01
}
prefix=
"$"
...
...
src/pages/CommunityManagement/FacilityBookings/Facility.tsx
View file @
16513394
...
...
@@ -431,7 +431,7 @@ const Facility = (props: any) => {
/>
</
Form
.
Item
>
<
Form
.
Item
label=
"
No Deposit To Cancel Reservation
"
label=
"
Cancel Reservation Without Payment
"
name=
"nomarginCancelReservationDay"
rules=
{
NewFaci
[
6
]
}
>
...
...
@@ -460,7 +460,7 @@ const Facility = (props: any) => {
{
/* 设置次数 */
}
<
Input
.
Group
>
<
Form
.
Item
label=
"Booking
Quota
s"
rules=
{
NewFaci
[
8
]
}
>
<
Form
.
Item
label=
"Booking
Limit
s"
rules=
{
NewFaci
[
8
]
}
>
<
Select
placeholder=
"Cycle"
allowClear
...
...
src/pages/CommunityManagement/FacilityBookings/FacilityBookings.tsx
View file @
16513394
...
...
@@ -400,9 +400,7 @@ const FacilityBookings = (props: any) => {
options=
{
{
density
:
false
,
fullScreen
:
false
,
reload
:
()
=>
{
onReset
();
},
reload
:
false
,
setting
:
false
,
}
}
// headerTitle="预约列表"
...
...
src/pages/CommunityManagement/FacilityBookings/FacilityTow.tsx
View file @
16513394
...
...
@@ -106,10 +106,6 @@ const FacilityTow = (props: any) => {
},
],
};
// 设施图片列表默认值
form
.
setFieldsValue
({
[
'shebei_'
+
index
]:
item
.
categoriesName
,
});
return
sam
;
})
:
[];
...
...
@@ -448,7 +444,7 @@ const FacilityTow = (props: any) => {
/>
</
Form
.
Item
>
<
Form
.
Item
label=
"
No Deposit To Cancel Reservation
"
label=
"
Cancel Reservation Without Payment
"
name=
"nomarginCancelReservationDay"
rules=
{
NewFaci
[
6
]
}
>
...
...
@@ -477,7 +473,7 @@ const FacilityTow = (props: any) => {
{
/* 设置次数 */
}
<
Input
.
Group
>
<
Form
.
Item
label=
"Booking
Quota
s"
rules=
{
NewFaci
[
8
]
}
>
<
Form
.
Item
label=
"Booking
Limit
s"
rules=
{
NewFaci
[
8
]
}
>
<
Select
placeholder=
"Cycle"
allowClear
...
...
src/pages/CommunityManagement/VisitorRecord/VisitorRecord.tsx
View file @
16513394
...
...
@@ -240,9 +240,7 @@ const VisitorRecord = (props: any) => {
options=
{
{
density
:
false
,
fullScreen
:
false
,
reload
:
()
=>
{
onReset
();
},
reload
:
false
,
setting
:
false
,
}
}
headerTitle=
"Visitor List"
...
...
src/pages/CommunityManagement/visitorRecord/VisitorRecord.tsx
View file @
16513394
...
...
@@ -240,9 +240,7 @@ const VisitorRecord = (props: any) => {
options=
{
{
density
:
false
,
fullScreen
:
false
,
reload
:
()
=>
{
onReset
();
},
reload
:
false
,
setting
:
false
,
}
}
headerTitle=
"Visitor List"
...
...
src/pages/ContractManagement/Contract.tsx
View file @
16513394
...
...
@@ -51,7 +51,7 @@ const Contract = (props: any) => {
render
:
function
(
record
:
any
)
{
let
mom
=
moment
(
record
.
contractValidEndDate
).
diff
(
moment
(),
'months'
);
// console.log(mom);
if
(
mom
<
2
)
{
if
(
mom
<
3
)
{
return
(
<
Tooltip
title=
"Due Soon"
placement=
"right"
color=
{
'red'
}
key=
{
record
.
id
}
>
<
span
className=
{
styles
.
red
}
>
{
record
.
contractNumber
}
</
span
>
...
...
@@ -210,9 +210,7 @@ const Contract = (props: any) => {
options=
{
{
density
:
false
,
fullScreen
:
false
,
reload
:
()
=>
{
onReset
();
},
reload
:
false
,
setting
:
false
,
}
}
headerTitle=
"Contract list"
...
...
src/pages/ContractManagement/ContractContent.tsx
View file @
16513394
...
...
@@ -35,7 +35,7 @@ const contentState = {
fileList
:
[],
// 图片列表
uploadUp
:
true
,
// 禁止上传 直到选择了小区后
comtyName
:
null
,
// 已选小区名字
tipTime
:
[
'previous month'
,
'two months'
],
//时间提示
tipTime
:
[
'previous month'
,
'two months'
,
'there months'
],
//时间提示
tipModal
:
false
,
//附件弹窗
fileInfo
:
null
,
//附件内容
numPages
:
1
,
// pdf 总页码数
...
...
@@ -45,7 +45,7 @@ const contentState = {
imgLoad
:
false
,
//本地图片上传加载
};
// 方法
const
contentReducer
=
(
state
,
action
)
=>
{
const
contentReducer
=
(
state
:
any
,
action
:
any
)
=>
{
switch
(
action
.
type
)
{
case
'setFileList'
:
// 改变图片列表
return
{
...
state
,
fileList
:
action
.
payload
};
...
...
@@ -119,15 +119,12 @@ const ContractContent = (props: any) => {
dispatchs
({
type
:
'setUploadUp'
,
payload
:
false
});
// 提示时间
let
a1
=
moment
(
DataSaveDetail
.
contractValidEndDate
)
.
subtract
(
2
,
'month'
)
.
format
(
'YYYY-MM-DD'
);
let
a2
=
moment
(
DataSaveDetail
.
contractValidEndDate
)
.
subtract
(
1
,
'month'
)
.
format
(
'YYYY-MM-DD'
);
let
a1
=
timeOver
(
DataSaveDetail
.
contractValidEndDate
,
2
);
let
a2
=
timeOver
(
DataSaveDetail
.
contractValidEndDate
,
1
);
let
a3
=
timeOver
(
DataSaveDetail
.
contractValidEndDate
,
3
);
// setTipTime([a1, a2]);
dispatchs
({
type
:
'setTipTime'
,
payload
:
[
a1
,
a2
]
});
dispatchs
({
type
:
'setTipTime'
,
payload
:
[
a
3
,
a
1
,
a2
]
});
// 给到上传绑定
// setComtyName(DataSaveDetail.communityName);
...
...
@@ -144,6 +141,11 @@ const ContractContent = (props: any) => {
}
},
[
DataSaveDetail
]);
// 时间转换
const
timeOver
=
(
time
:
any
,
day
:
any
)
=>
{
return
moment
(
time
).
subtract
(
day
,
'month'
).
format
(
'YYYY-MM-DD'
);
};
// 监听上传图片列表
useEffect
(()
=>
{
if
(
FileImg
!=
null
)
{
...
...
@@ -249,10 +251,11 @@ 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'
);
let
a1
=
timeOver
(
data
[
1
],
2
);
let
a2
=
timeOver
(
data
[
1
],
1
);
let
a3
=
timeOver
(
data
[
1
],
3
);
// setTipTime([a1, a2]);
dispatchs
({
type
:
'setTipTime'
,
payload
:
[
a1
,
a2
]
});
dispatchs
({
type
:
'setTipTime'
,
payload
:
[
a
3
,
a
1
,
a2
]
});
}
};
...
...
@@ -505,7 +508,8 @@ const ContractContent = (props: any) => {
<
p
style=
{
{
marginBottom
:
0
}
}
>
The system will send e-mail notification in the
{
' '
}
<
span
style=
{
{
color
:
'red'
}
}
>
{
state
.
tipTime
[
0
]
}
</
span
>
and
{
' '
}
<
span
style=
{
{
color
:
'red'
}
}
>
{
state
.
tipTime
[
1
]
}
</
span
>
that the contract is
<
span
style=
{
{
color
:
'red'
}
}
>
{
state
.
tipTime
[
1
]
}
</
span
>
and
{
' '
}
<
span
style=
{
{
color
:
'red'
}
}
>
{
state
.
tipTime
[
2
]
}
</
span
>
that the contract is
about to expire !
</
p
>
<
p
style=
{
{
marginBottom
:
0
}
}
>
...
...
src/pages/PropertyManagement/ChargeManager.tsx
View file @
16513394
...
...
@@ -186,9 +186,7 @@ const ChargeManager = (props: any) => {
options=
{
{
density
:
true
,
fullScreen
:
true
,
reload
:
()
=>
{
resetHandler
();
},
reload
:
false
,
setting
:
false
,
}
}
/
>
...
...
src/utils/params.ts
View file @
16513394
/*
* @Author: your name
* @Date: 2020-11-19 20:34:18
* @LastEditTime: 2021-01-2
0 17:30:05
* @LastEditTime: 2021-01-2
7 14:48:03
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \tostumi\src\utils\params.ts
...
...
@@ -88,8 +88,8 @@ export const requestList = [
[
'/tos/tosServiceScope/cancel'
,
'53 删除服务范围'
],
[
'/tos/user/permission/get'
,
'54 根据用户名称获取用户权限'
,
{}],
[
'/tos/tosCommunity/get/user'
,
'55 根据用户id获取用户管辖小区名'
,
{}],
[
'/tos/user/twoLevel/get'
,
'56 获取二级账号'
,
{}],
[
'/tos/user/twoLevel/get/CommunityAuth'
,
'57 根据
用
户id获取用户管辖小区名和权限'
,
{}],
[
'/tos/user/twoLevel/get'
,
'56 获取二级账号
列表
'
,
{}],
[
'/tos/user/twoLevel/get/CommunityAuth'
,
'57 根据
二级账
户id获取用户管辖小区名和权限'
,
{}],
[
'/tos/community/categories/subscribe/reservationInfo'
,
'58 获取小区设施可预约次数'
,
{}],
[
'/tos/bug/feedback/list'
,
'59 获取用户反馈列表'
,
{}],
[
'/tos/community/facilities/get/detail'
,
'60 获取小区设施详情'
,
{}],
...
...
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