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
37e38614
Commit
37e38614
authored
Dec 25, 2020
by
cellee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Signed-off-by: cellee <893264950@qq.com>
parent
39b38790
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
532 additions
and
55 deletions
+532
-55
Tow.tsx
src/components/SelectCommunity/Tow.tsx
+52
-0
Tow.jsx
src/components/SelectOptions/Tow.jsx
+440
-0
AccountAdds.tsx
src/pages/AccountManagement/account/AccountAdds.tsx
+9
-23
AccountDetail.tsx
src/pages/AccountManagement/account/AccountDetail.tsx
+23
-29
AccountEdit.tsx
src/pages/AccountManagement/account/AccountEdit.tsx
+4
-2
BookingDetail.tsx
...es/CommunityManagement/FacilityBookings/BookingDetail.tsx
+4
-1
No files found.
src/components/SelectCommunity/Tow.tsx
0 → 100644
View file @
37e38614
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
SelectOptions
from
'../SelectOptions/Tow'
;
import
{
connect
}
from
'umi'
;
const
index
=
(
props
:
any
)
=>
{
const
{
dispatch
,
CommunityList
,
value
,
onChange
,
checklist
}
=
props
;
// console.log(props)
const
tosCommunityget
=
(
values
:
any
)
=>
{
dispatch
({
type
:
'Init/tosCommunityget'
,
playload
:
values
});
};
useEffect
(()
=>
{
if
(
CommunityList
==
null
)
{
tosCommunityget
(
null
);
}
},
[]);
// 给已选值默认 如果有默认就传递默认 否则传递列表数据
useEffect
(()
=>
{
if
(
checklist
!=
null
)
{
onChange
({
index
:
1
,
value
:
checklist
});
}
else
{
onChange
({
index
:
1
,
value
:
CommunityList
});
}
},
[
checklist
]);
// 点击选择的时候传递给子组件 已选列表
const
printContent
=
(
values
:
any
)
=>
{
onChange
({
index
:
CommunityList
.
length
==
values
.
length
?
1
:
0
,
value
:
values
});
};
return
(
<>
{
CommunityList
!=
null
?
(
<
SelectOptions
list=
{
CommunityList
.
sort
()
}
checklist=
{
checklist
}
show=
{
true
}
onSubmit=
{
printContent
}
/>
)
:
null
}
</>
);
};
function
mapStateToProps
(
state
:
any
)
{
const
{
CommunityList
}
=
state
.
Init
;
return
{
CommunityList
,
};
}
export
default
connect
(
mapStateToProps
)(
index
);
src/components/SelectOptions/Tow.jsx
0 → 100644
View file @
37e38614
This diff is collapsed.
Click to expand it.
src/pages/AccountManagement/account/AccountAdds.tsx
View file @
37e38614
...
@@ -7,7 +7,7 @@ import './Account.less';
...
@@ -7,7 +7,7 @@ import './Account.less';
import
{
zhCnFaci
,
enUsFaci
}
from
'@/utils/power'
;
import
{
zhCnFaci
,
enUsFaci
}
from
'@/utils/power'
;
import
{
AccountTip
}
from
'@/utils/tip'
;
import
{
AccountTip
}
from
'@/utils/tip'
;
import
SelectCommunity
from
'@/components/SelectCommunity'
;
import
SelectCommunity
from
'@/components/SelectCommunity
/Tow
'
;
import
{
getNumber
}
from
'@/utils/string'
;
// 正则
import
{
getNumber
}
from
'@/utils/string'
;
// 正则
import
{
RA
}
from
'@/utils/method'
;
import
{
RA
}
from
'@/utils/method'
;
...
@@ -105,6 +105,7 @@ const Account = (props: any) => {
...
@@ -105,6 +105,7 @@ const Account = (props: any) => {
if
(
Info
!=
null
)
{
if
(
Info
!=
null
)
{
setCommunity
(
Info
.
community
);
setCommunity
(
Info
.
community
);
power
(
Info
.
permissions
);
power
(
Info
.
permissions
);
setCheckedKeys
([]);
}
}
},
[
Info
]);
},
[
Info
]);
...
@@ -148,9 +149,6 @@ const Account = (props: any) => {
...
@@ -148,9 +149,6 @@ const Account = (props: any) => {
const
userInfo
=
localStorage
.
getItem
(
'userInfo'
)
||
''
;
const
userInfo
=
localStorage
.
getItem
(
'userInfo'
)
||
''
;
const
id
=
JSON
.
parse
(
userInfo
).
userModel
.
id
;
const
id
=
JSON
.
parse
(
userInfo
).
userModel
.
id
;
console
.
log
(
treeDataList
);
console
.
log
();
if
(
if
(
value
.
tosAccountName
.
length
<=
2
&&
value
.
tosAccountName
.
length
<=
2
&&
value
.
tosUserPhone
.
length
!=
8
&&
value
.
tosUserPhone
.
length
!=
8
&&
...
@@ -182,9 +180,7 @@ const Account = (props: any) => {
...
@@ -182,9 +180,7 @@ const Account = (props: any) => {
value
.
tosUserLevel
=
values
;
//级别
value
.
tosUserLevel
=
values
;
//级别
value
.
creatorName
=
JSON
.
parse
(
userInfo
).
userModel
.
tosUserName
;
//新建者账号
value
.
creatorName
=
JSON
.
parse
(
userInfo
).
userModel
.
tosUserName
;
//新建者账号
value
.
creatorId
=
id
;
//新建者ID
value
.
creatorId
=
id
;
//新建者ID
if
(
values
==
3
)
{
value
.
userLeader
=
towAccountId
;
}
delete
value
.
community
;
delete
value
.
community
;
// 判断有没有 0 有就删除
// 判断有没有 0 有就删除
...
@@ -194,7 +190,7 @@ const Account = (props: any) => {
...
@@ -194,7 +190,7 @@ const Account = (props: any) => {
// 追加到上级id
// 追加到上级id
let
Obj
=
treeData
[
0
].
children
;
let
Obj
=
treeData
[
0
].
children
;
console
.
log
(
Obj
);
for
(
let
i
in
Obj
)
{
for
(
let
i
in
Obj
)
{
for
(
let
j
in
checkedKeys
)
{
for
(
let
j
in
checkedKeys
)
{
if
(
JSON
.
stringify
(
Obj
[
i
].
children
).
indexOf
(
JSON
.
stringify
(
checkedKeys
[
j
]))
!=
-
1
)
{
if
(
JSON
.
stringify
(
Obj
[
i
].
children
).
indexOf
(
JSON
.
stringify
(
checkedKeys
[
j
]))
!=
-
1
)
{
...
@@ -208,6 +204,9 @@ const Account = (props: any) => {
...
@@ -208,6 +204,9 @@ const Account = (props: any) => {
return
parseInt
(
n1
)
-
parseInt
(
n2
);
return
parseInt
(
n1
)
-
parseInt
(
n2
);
});
});
if
(
values
==
3
)
{
value
.
userLeader
=
towAccountId
;
}
// 另传权限
// 另传权限
let
obj
=
{
let
obj
=
{
userName
:
value
.
tosUserName
,
userName
:
value
.
tosUserName
,
...
@@ -255,25 +254,12 @@ const Account = (props: any) => {
...
@@ -255,25 +254,12 @@ const Account = (props: any) => {
//级别切换
//级别切换
const
onRadio
=
(
e
:
any
)
=>
{
const
onRadio
=
(
e
:
any
)
=>
{
setvalues
(
e
.
target
.
value
);
setvalues
(
e
.
target
.
value
);
// setCheckedKeys([]);
// 如果是3级,取消后面两个选择
if
(
e
.
target
.
value
==
2
)
{
let
treeDatas
=
treeDataList
;
//将转换而来的字符串转换为原生js对
let
_p
=
treeDatas
[
0
].
children
;
// 所有权限列表
// 禁用最后两个
if
(
e
.
target
.
value
==
3
)
{
_p
[
_p
.
length
-
1
].
children
[
2
].
disableCheckbox
=
true
;
_p
[
_p
.
length
-
1
].
children
[
3
].
disableCheckbox
=
true
;
}
else
{
//否则打开
//否则打开
_p
[
_p
.
length
-
1
].
children
[
2
].
disableCheckbox
=
false
;
_p
[
_p
.
length
-
1
].
children
[
3
].
disableCheckbox
=
false
;
settowAccountId
(
null
);
settowAccountId
(
null
);
setCommunity
(
CommunityList
);
setCommunity
(
CommunityList
);
}
}
// 赋值改变
treeDatas
[
0
].
children
=
_p
;
settreeDataList
(
treeDatas
as
any
);
// 可勾选列表
};
};
//手机号
//手机号
...
...
src/pages/AccountManagement/account/AccountDetail.tsx
View file @
37e38614
...
@@ -39,7 +39,6 @@ const Account = (props: any) => {
...
@@ -39,7 +39,6 @@ const Account = (props: any) => {
const
[
values
,
setvalues
]
=
useState
(
2
);
// 树形菜单展开关闭
const
[
values
,
setvalues
]
=
useState
(
2
);
// 树形菜单展开关闭
const
[
over
,
setOver
]
=
useState
(
false
);
// 关闭账号确认弹窗
const
[
over
,
setOver
]
=
useState
(
false
);
// 关闭账号确认弹窗
const
[
accountName
,
setaccountName
]
=
useState
(
null
as
any
);
// 弹窗账号信息
// 表单标识
// 表单标识
const
[
form
]
=
Form
.
useForm
();
const
[
form
]
=
Form
.
useForm
();
...
@@ -48,7 +47,6 @@ const Account = (props: any) => {
...
@@ -48,7 +47,6 @@ const Account = (props: any) => {
// // 数据
// // 数据
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
DataSave
!=
null
)
{
if
(
DataSave
!=
null
)
{
console
.
log
(
DataSave
.
tosUserLevel
);
// 赋值
// 赋值
form
.
setFieldsValue
({
form
.
setFieldsValue
({
tosUserName
:
DataSave
.
tosUserName
,
tosUserName
:
DataSave
.
tosUserName
,
...
@@ -195,14 +193,6 @@ const Account = (props: any) => {
...
@@ -195,14 +193,6 @@ const Account = (props: any) => {
setSelectedKeys
(
selectedKeys
);
setSelectedKeys
(
selectedKeys
);
};
};
// 管理员级别样式
const
radioStyle
=
{
display
:
'block'
,
height
:
'30px'
,
lineHeight
:
'30px'
,
marginBottom
:
'15px'
,
};
// 监听改变状态提交结果
// 监听改变状态提交结果
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
Result
!=
null
)
{
if
(
Result
!=
null
)
{
...
@@ -216,11 +206,6 @@ const Account = (props: any) => {
...
@@ -216,11 +206,6 @@ const Account = (props: any) => {
}
}
},
[
Result
]);
},
[
Result
]);
//级别切换
const
onRadio
=
(
e
:
any
)
=>
{
setvalues
(
e
.
target
.
value
);
};
//手机号
//手机号
const
keyup_communityManagerFee
=
(
e
:
any
)
=>
{
const
keyup_communityManagerFee
=
(
e
:
any
)
=>
{
e
.
target
.
value
=
keyup_tool
(
e
.
target
.
value
);
e
.
target
.
value
=
keyup_tool
(
e
.
target
.
value
);
...
@@ -232,9 +217,14 @@ const Account = (props: any) => {
...
@@ -232,9 +217,14 @@ const Account = (props: any) => {
// 停用账号弹窗
// 停用账号弹窗
const
lockS
=
()
=>
{
const
lockS
=
()
=>
{
setOver
(
true
);
// 先判断是不是自己
setaccountName
(
DataSave
);
const
userInfo
=
JSON
.
parse
(
localStorage
.
getItem
(
'userInfo'
)
||
'[]'
);
console
.
log
(
DataSave
);
if
(
userInfo
.
userModel
.
id
==
DataSave
.
id
)
{
message
.
info
(
'Unable to close own account!'
);
return
;
}
else
{
setOver
(
true
);
}
};
};
// 关闭弹窗
// 关闭弹窗
...
@@ -246,9 +236,9 @@ const Account = (props: any) => {
...
@@ -246,9 +236,9 @@ const Account = (props: any) => {
const
handleOk
=
(
e
:
any
)
=>
{
const
handleOk
=
(
e
:
any
)
=>
{
//
//
let
obj
=
{
let
obj
=
{
// userStatus:
accountNam
e.userStatus == 0 ? 1 : 0,
// userStatus:
DataSav
e.userStatus == 0 ? 1 : 0,
userStatus
:
1
,
userStatus
:
1
,
userID
:
accountNam
e
.
tosUserId
,
userID
:
DataSav
e
.
tosUserId
,
};
};
RA
(
52
,
obj
,
module
,
dispatch
);
RA
(
52
,
obj
,
module
,
dispatch
);
// setOver(false);
// setOver(false);
...
@@ -261,10 +251,14 @@ const Account = (props: any) => {
...
@@ -261,10 +251,14 @@ const Account = (props: any) => {
<
EditOutlined
/>
<
EditOutlined
/>
Detail Account
Detail Account
<
div
className=
"back"
>
<
div
className=
"back"
>
<
Button
type=
"primary"
danger
style=
{
{
marginRight
:
15
}
}
onClick=
{
lockS
}
>
{
DataSave
&&
DataSave
.
tosUserLevel
<=
2
?
(
<
PoweroffOutlined
/>
<
Button
type=
"primary"
danger
style=
{
{
marginRight
:
15
}
}
onClick=
{
lockS
}
>
Close Account
<
PoweroffOutlined
/>
</
Button
>
Close Account
</
Button
>
)
:
(
''
)
}
<
Button
onClick=
{
goToReturn
}
>
<
Button
onClick=
{
goToReturn
}
>
<
LeftOutlined
/>
<
LeftOutlined
/>
Back
Back
...
@@ -330,11 +324,11 @@ const Account = (props: any) => {
...
@@ -330,11 +324,11 @@ const Account = (props: any) => {
color=
"success"
color=
"success"
style=
{
{
verticalAlign
:
'sub'
,
fontSize
:
14
,
padding
:
'4px 7px'
}
}
style=
{
{
verticalAlign
:
'sub'
,
fontSize
:
14
,
padding
:
'4px 7px'
}
}
>
>
{
DataSave
.
tosUserLevel
==
2
{
DataSave
&&
DataSave
.
tosUserLevel
==
2
?
'Two Level Administrator '
?
'Two Level Administrator '
:
'Three Level Administrator'
}
:
'Three Level Administrator'
}
</
Tag
>
</
Tag
>
{
DataSave
.
tosUserLevel
==
3
?
(
{
DataSave
&&
DataSave
.
tosUserLevel
==
3
?
(
<
Tag
<
Tag
icon=
{
<
RightOutlined
/>
}
icon=
{
<
RightOutlined
/>
}
color=
"processing"
color=
"processing"
...
@@ -388,11 +382,11 @@ const Account = (props: any) => {
...
@@ -388,11 +382,11 @@ const Account = (props: any) => {
onCancel=
{
handleCancel
}
onCancel=
{
handleCancel
}
confirmLoading=
{
loading
}
confirmLoading=
{
loading
}
>
>
{
accountNam
e
!=
null
?
(
{
DataSav
e
!=
null
?
(
<
p
>
<
p
>
Are You Sure To
{
' '
}
Are You Sure To
{
' '
}
<
span
style=
{
{
color
:
'red'
}
}
>
{
accountNam
e
.
userStatus
!=
1
?
'Close'
:
'Open'
}
</
span
>
{
' '
}
<
span
style=
{
{
color
:
'red'
}
}
>
{
DataSav
e
.
userStatus
!=
1
?
'Close'
:
'Open'
}
</
span
>
{
' '
}
The Account '
<
span
style=
{
{
color
:
'red'
}
}
>
{
accountNam
e
.
tosUserName
}
</
span
>
' ?
The Account '
<
span
style=
{
{
color
:
'red'
}
}
>
{
DataSav
e
.
tosUserName
}
</
span
>
' ?
</
p
>
</
p
>
)
:
(
)
:
(
''
''
...
...
src/pages/AccountManagement/account/AccountEdit.tsx
View file @
37e38614
...
@@ -91,6 +91,8 @@ const Account = (props: any) => {
...
@@ -91,6 +91,8 @@ const Account = (props: any) => {
// 发起获取权限请求
// 发起获取权限请求
RA
(
54
,
{
tosUserName
:
DataSave
.
tosUserName
},
module
,
dispatch
);
// 发起获取权限请求
RA
(
54
,
{
tosUserName
:
DataSave
.
tosUserName
},
module
,
dispatch
);
// 发起获取权限请求
}
else
{
history
.
push
(
'/AccountManagement/account'
);
}
}
},
[
DataSave
,
user
]);
},
[
DataSave
,
user
]);
...
@@ -357,11 +359,11 @@ const Account = (props: any) => {
...
@@ -357,11 +359,11 @@ const Account = (props: any) => {
color=
"success"
color=
"success"
style=
{
{
verticalAlign
:
'sub'
,
fontSize
:
14
,
padding
:
'4px 7px'
}
}
style=
{
{
verticalAlign
:
'sub'
,
fontSize
:
14
,
padding
:
'4px 7px'
}
}
>
>
{
DataSave
.
tosUserLevel
==
2
{
DataSave
&&
DataSave
.
tosUserLevel
==
2
?
'Two Level Administrator '
?
'Two Level Administrator '
:
'Three Level Administrator'
}
:
'Three Level Administrator'
}
</
Tag
>
</
Tag
>
{
DataSave
.
tosUserLevel
==
3
?
(
{
DataSave
&&
DataSave
.
tosUserLevel
==
3
?
(
<
Tag
<
Tag
icon=
{
<
RightOutlined
/>
}
icon=
{
<
RightOutlined
/>
}
color=
"processing"
color=
"processing"
...
...
src/pages/CommunityManagement/FacilityBookings/BookingDetail.tsx
View file @
37e38614
...
@@ -167,7 +167,10 @@ const BookingDetail = (props: any) => {
...
@@ -167,7 +167,10 @@ const BookingDetail = (props: any) => {
<
hr
/>
<
hr
/>
{
/* 已交押金且未产生退费 */
}
{
/* 已交押金且未产生退费 */
}
{
DataSave
!=
null
&&
DataSave
.
managerFeeStatus
==
1
&&
DataSave
.
backMarginFee
>
0
?
(
{
DataSave
&&
DataSaveDetail
&&
DataSave
.
managerFeeStatus
==
1
&&
DataSaveDetail
.
backMarginFee
==
0
?
(
<>
<>
<
Form
<
Form
ref=
{
formRef
}
ref=
{
formRef
}
...
...
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