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
c9b23759
Commit
c9b23759
authored
Dec 23, 2020
by
cellee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
账号权限
Signed-off-by:
cellee
<
893264950@qq.com
>
parent
d1381930
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
888 additions
and
93 deletions
+888
-93
Facilitys copy.tsx
src/components/Facilitys/Facilitys copy.tsx
+228
-0
Facilitys.tsx
src/components/Facilitys/Facilitys.tsx
+13
-15
PictureOptionsRow.tsx
src/components/PictureOptions/PictureOptionsRow.tsx
+1
-1
Account.ts
src/models/CommunityManagement/Account.ts
+5
-0
Account.tsx
src/pages/AccountManagement/account/Account.tsx
+2
-2
AccountAdds.tsx
src/pages/AccountManagement/account/AccountAdds.tsx
+80
-6
AccountEdit copy.tsx
src/pages/AccountManagement/account/AccountEdit copy.tsx
+389
-0
AccountEdit.tsx
src/pages/AccountManagement/account/AccountEdit.tsx
+139
-64
CardDetail.tsx
src/pages/CommercialService/CardDetail.tsx
+7
-2
RenovationDetail.tsx
src/pages/CommercialService/RenovationDetail.tsx
+6
-1
Facility.tsx
src/pages/CommunityManagement/FacilityBookings/Facility.tsx
+17
-1
FacilityBookings.tsx
...CommunityManagement/FacilityBookings/FacilityBookings.tsx
+1
-1
No files found.
src/components/Facilitys/Facilitys copy.tsx
0 → 100644
View file @
c9b23759
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
'./index.less'
;
import
{
Button
,
Form
,
message
,
Modal
,
Input
,
Upload
}
from
'antd'
;
import
{
PlusOutlined
}
from
'@ant-design/icons'
;
// import FacilitysTow from './FacilitysTow';
import
{
Link
,
useIntl
,
connect
,
Dispatch
,
history
}
from
'umi'
;
function
getBase64
(
file
:
any
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
const
reader
=
new
FileReader
();
reader
.
readAsDataURL
(
file
);
reader
.
onload
=
()
=>
resolve
(
reader
.
result
);
reader
.
onerror
=
(
error
)
=>
reject
(
error
);
});
}
const
module
=
'FacilityBookings'
;
const
Facilitys
=
(
props
:
any
)
=>
{
//传递值
const
{
updata
,
disabled
,
FacilitysList
,
dispatch
,
dumps
}
=
props
;
//上传列表
// const [FacilitysList, setFileList] = useState(FacilitysList);
//显示隐藏
const
[
previewVisible
,
setpreviewVisible
]
=
useState
(
false
);
// 名称
const
[
previewTitle
,
setpreviewTitle
]
=
useState
(
''
);
// 图片地址
const
[
previewImage
,
setpreviewImage
]
=
useState
(
''
);
// 传递给后台加 key
const
updetaTow
=
(
key
:
any
)
=>
{
let
data
=
updata
;
data
.
identification
=
key
;
return
data
;
};
//绑定值
const
updetaList
=
(
key
:
any
)
=>
{
return
FacilitysList
[
key
].
fileList
;
};
// 预览
const
handlePreview
=
async
(
file
:
any
)
=>
{
if
(
!
file
.
url
&&
!
file
.
preview
)
{
file
.
preview
=
await
getBase64
(
file
.
originFileObj
);
}
setpreviewImage
(
file
.
url
||
file
.
preview
);
setpreviewTitle
(
file
.
name
);
setpreviewVisible
(
true
);
};
// 点击遮罩回调
const
handleCancel
=
()
=>
{
setpreviewVisible
(
false
);
};
// 上传属性
const
uploadProps
:
any
=
{
listType
:
'picture-card'
,
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`
);
// 拿到key 值 开始存储
let
key
=
info
.
fileList
[
0
].
response
.
data
.
identification
;
let
list
=
FacilitysList
;
list
[
key
].
id
=
key
;
list
[
key
].
fileList
=
info
.
fileList
;
// 存储到mode里面去
dispatch
({
type
:
module
+
'/genxin'
,
list
});
// 当前页面也要刷新
// let list = fileList;
// setFileList(list); // 注意 不能直接赋值 因为使用完全绑定需要全部更新
// setFileList(list);
// let list: any = [...fileList, ...info.fileList];
// setFileList(list);
console
.
log
(
list
);
// 将图片信息提交给state
// let data = { val: info.file.name, key: keys };
// dispatch({ type: module + '/retImgsList', data });
// 结束
}
else
if
(
info
.
file
.
status
===
'error'
)
{
message
.
error
(
`
${
info
.
file
.
name
}
file upload failed.`
);
}
},
};
// 新增动作
const
add
=
()
=>
{
let
list
=
FacilitysList
;
let
adds
=
{
id
:
'-1'
,
fileList
:
[],
name
:
''
,
};
// 验证已添加的是否上传完整
let
complete
=
list
.
every
((
item
:
any
)
=>
{
// return item.fileList.length > 0 && item.name !== '';
return
item
.
fileList
.
length
>
0
;
});
if
(
list
.
length
==
0
||
complete
)
{
list
.
push
(
adds
);
// 存储到mode里面去
dispatch
({
type
:
module
+
'/genxin'
,
list
});
}
else
{
// 提示每一项都要填写完
message
.
error
(
'Please fill out each item !'
);
}
};
//删除动作
const
deleteImg
=
(
key
:
any
)
=>
{
console
.
log
(
key
);
let
list
=
FacilitysList
;
// list[key].name = '';
// 这里还要清除表单的值,否则再次新增输入框的值会重复出现
dumps
(
key
);
list
.
splice
(
key
,
1
);
console
.
log
(
list
);
// // 存储到mode里面去
dispatch
({
type
:
module
+
'/genxin'
,
list
});
};
// 新增按钮
const
uploadButton
=
(
<
div
>
<
PlusOutlined
/>
<
div
className=
"ant-upload-text"
>
Upload
</
div
>
</
div
>
);
// 输入框内容
const
monitor
=
(
e
:
any
)
=>
{
let
list
=
FacilitysList
;
let
{
id
,
value
}
=
e
.
target
;
if
(
id
==
'basic_shebei_0'
)
{
id
=
0
;
}
list
[
id
].
name
=
value
;
dispatch
({
type
:
module
+
'/genxin'
,
list
});
};
return
(
<>
<
Form
.
Item
name=
"picList"
required=
{
false
}
style=
{
{
marginBottom
:
0
}
}
>
{
FacilitysList
.
map
((
item
:
any
,
index
:
any
,
keys
:
any
)
=>
{
console
.
log
(
item
);
return
(
<
div
className=
{
'test'
}
key=
{
item
.
id
}
>
<
div
className=
{
'diybox'
}
key=
{
item
.
id
}
>
<
Upload
{
...
uploadProps
}
fileList=
{
FacilitysList
[
index
].
fileList
.
length
>
0
?
FacilitysList
[
index
].
fileList
:
false
}
// data=
{
updata
}
data=
{
updetaTow
(
index
)
}
// 携带数据
disabled=
{
disabled
}
// 禁止
onPreview=
{
handlePreview
}
// 预览
onRemove=
{
()
=>
{
deleteImg
(
index
);
}
}
//移除
>
{
FacilitysList
[
index
].
fileList
.
length
>
0
?
null
:
uploadButton
}
</
Upload
>
<
div
className=
{
'Facility'
}
key=
{
item
.
id
}
>
<
Form
.
Item
label=
{
`Facility Name ${index + 1}`
}
name=
{
'shebei_'
+
index
}
rules=
{
[{
required
:
true
,
message
:
'Please input Facility Name!'
}]
}
>
<
Input
placeholder=
"Facility Name"
disabled=
{
disabled
}
id=
{
index
}
onChange=
{
(
e
:
any
)
=>
monitor
(
e
)
}
value=
{
FacilitysList
[
index
].
name
}
/>
</
Form
.
Item
>
<
div
className=
{
'over'
}
>
<
Button
type=
"link"
disabled=
{
disabled
}
onClick=
{
()
=>
deleteImg
(
index
)
}
>
Delete
</
Button
>
</
div
>
</
div
>
</
div
>
</
div
>
);
})
}
</
Form
.
Item
>
<
Form
.
Item
>
<
Button
type=
"dashed"
onClick=
{
()
=>
add
()
}
style=
{
{
width
:
'100px'
,
height
:
'100px'
}
}
icon=
{
<
PlusOutlined
/>
}
disabled=
{
disabled
}
></
Button
>
</
Form
.
Item
>
{
/* 预览表格 */
}
<
Modal
visible=
{
previewVisible
}
title=
{
previewTitle
}
footer=
{
null
}
onCancel=
{
handleCancel
}
>
<
img
alt=
"example"
style=
{
{
width
:
'100%'
}
}
src=
{
previewImage
}
/>
</
Modal
>
</>
);
};
function
mapStateToProps
(
state
:
any
)
{
const
{
FacilitysList
}
=
state
.
FacilityBookings
;
return
{
FacilitysList
,
};
}
export
default
connect
(
mapStateToProps
)(
Facilitys
);
src/components/Facilitys/Facilitys.tsx
View file @
c9b23759
...
@@ -50,13 +50,6 @@ const Facilitys = (props: any) => {
...
@@ -50,13 +50,6 @@ const Facilitys = (props: any) => {
setpreviewVisible
(
true
);
setpreviewVisible
(
true
);
};
};
// 点击移除图片
const
handRemove
=
(
key
:
any
)
=>
{
// let list = fileList;
// 将图片信息提交给state
deleteImg
(
key
);
};
// 点击遮罩回调
// 点击遮罩回调
const
handleCancel
=
()
=>
{
const
handleCancel
=
()
=>
{
setpreviewVisible
(
false
);
setpreviewVisible
(
false
);
...
@@ -123,12 +116,13 @@ const Facilitys = (props: any) => {
...
@@ -123,12 +116,13 @@ const Facilitys = (props: any) => {
};
};
//删除动作
//删除动作
const
deleteImg
=
(
key
:
any
)
=>
{
const
deleteImg
=
(
key
:
any
,
id
:
any
)
=>
{
let
list
=
FacilitysList
;
let
list
=
FacilitysList
;
list
[
key
].
name
=
''
;
list
[
key
].
name
=
''
;
// 这里还要清除表单的值,否则再次新增输入框的值会重复出现
// 这里还要清除表单的值,否则再次新增输入框的值会重复出现
dumps
(
key
);
dumps
(
id
);
list
.
splice
(
key
,
1
);
list
.
splice
(
key
,
1
);
// 存储到mode里面去
// 存储到mode里面去
...
@@ -159,8 +153,8 @@ const Facilitys = (props: any) => {
...
@@ -159,8 +153,8 @@ const Facilitys = (props: any) => {
<
Form
.
Item
name=
"picList"
required=
{
false
}
style=
{
{
marginBottom
:
0
}
}
>
<
Form
.
Item
name=
"picList"
required=
{
false
}
style=
{
{
marginBottom
:
0
}
}
>
{
FacilitysList
.
map
((
item
:
any
,
index
:
any
,
key
:
any
)
=>
{
{
FacilitysList
.
map
((
item
:
any
,
index
:
any
,
key
:
any
)
=>
{
return
(
return
(
<
div
className=
{
'test'
}
key=
{
'pic_'
+
index
}
>
<
div
className=
{
'test'
}
key=
{
item
.
id
}
>
<
div
className=
{
'diybox'
}
key=
{
'pic_'
+
index
}
>
<
div
className=
{
'diybox'
}
key=
{
item
.
id
}
>
<
Upload
<
Upload
{
...
uploadProps
}
{
...
uploadProps
}
fileList=
{
fileList=
{
...
@@ -171,16 +165,16 @@ const Facilitys = (props: any) => {
...
@@ -171,16 +165,16 @@ const Facilitys = (props: any) => {
disabled=
{
disabled
}
// 禁止
disabled=
{
disabled
}
// 禁止
onPreview=
{
handlePreview
}
// 预览
onPreview=
{
handlePreview
}
// 预览
onRemove=
{
()
=>
{
onRemove=
{
()
=>
{
handRemove
(
index
);
deleteImg
(
index
,
item
.
id
);
}
}
//移除
}
}
//移除
>
>
{
FacilitysList
[
index
].
fileList
.
length
>
0
?
null
:
uploadButton
}
{
FacilitysList
[
index
].
fileList
.
length
>
0
?
null
:
uploadButton
}
</
Upload
>
</
Upload
>
<
div
className=
{
'Facility'
}
key=
{
'pic_'
+
index
}
>
<
div
className=
{
'Facility'
}
key=
{
item
.
id
}
>
<
Form
.
Item
<
Form
.
Item
label=
{
`Facility Name ${index + 1}`
}
label=
{
`Facility Name ${index + 1}`
}
name=
{
'shebei_'
+
i
ndex
}
name=
{
'shebei_'
+
i
tem
.
id
}
rules=
{
[{
required
:
true
,
message
:
'Please input Facility Name!'
}]
}
rules=
{
[{
required
:
true
,
message
:
'Please input Facility Name!'
}]
}
>
>
<
Input
<
Input
...
@@ -192,7 +186,11 @@ const Facilitys = (props: any) => {
...
@@ -192,7 +186,11 @@ const Facilitys = (props: any) => {
/>
/>
</
Form
.
Item
>
</
Form
.
Item
>
<
div
className=
{
'over'
}
>
<
div
className=
{
'over'
}
>
<
Button
type=
"link"
disabled=
{
disabled
}
onClick=
{
()
=>
deleteImg
(
index
)
}
>
<
Button
type=
"link"
disabled=
{
disabled
}
onClick=
{
()
=>
deleteImg
(
index
,
item
.
id
)
}
>
Delete
Delete
</
Button
>
</
Button
>
</
div
>
</
div
>
...
...
src/components/PictureOptions/PictureOptionsRow.tsx
View file @
c9b23759
...
@@ -115,7 +115,7 @@ const PictureOptionsRow = (props: any) => {
...
@@ -115,7 +115,7 @@ const PictureOptionsRow = (props: any) => {
}
}
return
isJpgOrPng
&&
isLt2M
;
return
isJpgOrPng
&&
isLt2M
;
}
}
console
.
log
(
props
);
//
console.log(props);
return
(
return
(
<
div
>
<
div
>
<
Upload
<
Upload
...
...
src/models/CommunityManagement/Account.ts
View file @
c9b23759
...
@@ -105,6 +105,11 @@ export default {
...
@@ -105,6 +105,11 @@ export default {
// yield put({ type: 'returnResult', Result });
// yield put({ type: 'returnResult', Result });
}
}
break
;
break
;
case
56
:
// 二级账号
{
localStorage
.
setItem
(
'towAccount'
,
JSON
.
stringify
(
resp
.
data
));
}
break
;
}
}
}
}
},
},
...
...
src/pages/AccountManagement/account/Account.tsx
View file @
c9b23759
...
@@ -110,8 +110,8 @@ const Account = (props: any) => {
...
@@ -110,8 +110,8 @@ const Account = (props: any) => {
},
},
{
{
title
:
'Creation Time'
,
title
:
'Creation Time'
,
dataIndex
:
'
cre
ateTime'
,
dataIndex
:
'
upd
ateTime'
,
key
:
'
cre
ateTime'
,
key
:
'
upd
ateTime'
,
render
:
(
text
:
any
)
=>
{
render
:
(
text
:
any
)
=>
{
return
moment
(
text
).
format
(
'YYYY-MM-DD'
);
return
moment
(
text
).
format
(
'YYYY-MM-DD'
);
},
},
...
...
src/pages/AccountManagement/account/AccountAdds.tsx
View file @
c9b23759
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
{
Form
,
Input
,
Button
,
message
,
Descriptions
,
Spin
,
Tree
,
Radio
}
from
'antd'
;
import
{
Form
,
Input
,
Button
,
message
,
Descriptions
,
Spin
,
Tree
,
Radio
,
Select
}
from
'antd'
;
import
{
connect
,
history
}
from
'umi'
;
import
{
connect
,
history
}
from
'umi'
;
import
{
EditOutlined
,
LeftOutlined
}
from
'@ant-design/icons'
;
import
{
EditOutlined
,
LeftOutlined
}
from
'@ant-design/icons'
;
import
{
getCookie
}
from
'@/utils/method'
;
import
'./Account.less'
;
import
'./Account.less'
;
import
{
zhCnFaci
,
enUsFaci
}
from
'@/utils/power'
;
import
{
zhCnFaci
,
enUsFaci
}
from
'@/utils/power'
;
...
@@ -27,11 +26,18 @@ const Account = (props: any) => {
...
@@ -27,11 +26,18 @@ const Account = (props: any) => {
// 单选 二级还是三级管理员
// 单选 二级还是三级管理员
const
[
values
,
setvalues
]
=
useState
(
2
);
// 树形菜单展开关闭
const
[
values
,
setvalues
]
=
useState
(
2
);
// 树形菜单展开关闭
const
[
disab
,
setdisab
]
=
useState
(
false
);
// 是否禁止选择二级
const
[
towAccountId
,
settowAccountId
]
=
useState
(
null
);
// 二级账户id
// 表单标识
// 表单标识
const
[
form
]
=
Form
.
useForm
();
const
[
form
]
=
Form
.
useForm
();
const
formRef
=
useRef
(
null
);
const
formRef
=
useRef
(
null
);
const
{
Option
}
=
Select
;
//二级账户列表
const
towAccount
=
JSON
.
parse
(
localStorage
.
getItem
(
'towAccount'
)
||
'[]'
);
// 当前账户权限
// 当前账户权限
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
user
!=
null
)
{
if
(
user
!=
null
)
{
...
@@ -57,6 +63,23 @@ const Account = (props: any) => {
...
@@ -57,6 +63,23 @@ const Account = (props: any) => {
}
}
}
}
}
}
// 当当前账户是二级以上禁用创建二级菜单
if
(
user
.
currentUser
.
userModel
.
tosUserLevel
>
1
)
{
setvalues
(
3
);
setdisab
(
true
);
settowAccountId
(
user
.
currentUser
.
id
);
// 如果是三级账户,禁用最后两个账户管理
if
(
user
.
currentUser
.
userModel
.
tosUserLevel
==
3
)
{
// 禁用最后两个
_p
[
_p
.
length
-
1
].
children
[
2
].
disableCheckbox
=
true
;
_p
[
_p
.
length
-
1
].
children
[
3
].
disableCheckbox
=
true
;
}
}
else
{
// 如果是一级账户获取挂靠的二级账户名称
RA
(
56
,
{},
module
,
dispatch
);
// 权限上传
}
// 赋值改变
// 赋值改变
treeDatas
[
0
].
children
=
_p
;
treeDatas
[
0
].
children
=
_p
;
setCheckedKeys
(
treeDatas
as
any
);
// 可勾选列表
setCheckedKeys
(
treeDatas
as
any
);
// 可勾选列表
...
@@ -101,12 +124,19 @@ const Account = (props: any) => {
...
@@ -101,12 +124,19 @@ const Account = (props: any) => {
// 账号长度
// 账号长度
message
.
error
(
'The Account Password is Greater Than 6 Digits!'
);
message
.
error
(
'The Account Password is Greater Than 6 Digits!'
);
return
false
;
return
false
;
}
else
if
(
values
==
3
&&
towAccountId
==
null
)
{
// 如果创建的是三级账号就要判断是否选择了绑定的二级账户
message
.
error
(
'Please select affiliated account !'
);
return
false
;
}
else
{
}
else
{
value
.
tosUserServiceCellList
=
value
.
community
.
value
;
// 管辖小区
value
.
tosUserServiceCellList
=
value
.
community
.
value
;
// 管辖小区
value
.
tosUserEmail
=
value
.
tosUserName
;
// 邮箱就是账号
value
.
tosUserEmail
=
value
.
tosUserName
;
// 邮箱就是账号
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 有就删除
...
@@ -177,6 +207,24 @@ const Account = (props: any) => {
...
@@ -177,6 +207,24 @@ const Account = (props: any) => {
//级别切换
//级别切换
const
onRadio
=
(
e
:
any
)
=>
{
const
onRadio
=
(
e
:
any
)
=>
{
setvalues
(
e
.
target
.
value
);
setvalues
(
e
.
target
.
value
);
// 如果是3级,取消后面两个选择
let
treeDatas
=
treeData
;
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
);
}
// 赋值改变
treeDatas
[
0
].
children
=
_p
;
setCheckedKeys
(
treeDatas
as
any
);
// 可勾选列表
};
};
//手机号
//手机号
...
@@ -186,7 +234,21 @@ const Account = (props: any) => {
...
@@ -186,7 +234,21 @@ 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
listItems
=
towAccount
.
map
((
item
:
any
)
=>
{
return
(
<
Option
key=
{
item
.
id
}
value=
{
item
.
id
}
>
{
item
.
tosAccountName
}
-
{
item
.
tosUserEmail
}
</
Option
>
);
});
// 选择哪个二级账号
const
handleChange
=
(
value
:
any
)
=>
{
console
.
log
(
`selected
${
value
}
`
);
settowAccountId
(
value
);
};
return
(
return
(
<
Spin
spinning=
{
loading
}
>
<
Spin
spinning=
{
loading
}
>
...
@@ -246,15 +308,27 @@ const Account = (props: any) => {
...
@@ -246,15 +308,27 @@ const Account = (props: any) => {
<
span
className=
"title"
>
Privilege Level:
</
span
>
<
span
className=
"title"
>
Privilege Level:
</
span
>
</
div
>
</
div
>
<
div
className=
"label"
>
<
div
className=
"label"
>
<
Radio
.
Group
defaultV
alue=
{
values
}
onChange=
{
onRadio
}
>
<
Radio
.
Group
v
alue=
{
values
}
onChange=
{
onRadio
}
>
<
Radio
style=
{
radioStyle
}
value=
{
2
}
>
<
Radio
style=
{
radioStyle
}
disabled=
{
disab
}
value=
{
2
}
>
Two Level Administrator
Two Level Administrator
</
Radio
>
</
Radio
>
<
Radio
style=
{
radioStyle
}
value=
{
3
}
>
<
Radio
style=
{
radioStyle
}
value=
{
3
}
>
Three Level Administrator
Three Level Administrator
{
/* <Input placeholder="三级管理员" style={{ width: 160, marginLeft: 10 }} /> */
}
</
Radio
>
</
Radio
>
</
Radio
.
Group
>
</
Radio
.
Group
>
{
/* 选择挂靠的二级菜单 */
}
{
values
===
3
&&
user
.
currentUser
.
userModel
.
tosUserLevel
<=
1
?
(
<
Select
style=
{
{
width
:
260
}
}
onChange=
{
handleChange
}
placeholder=
"Please select affiliated account"
>
{
towAccount
?
listItems
:
''
}
</
Select
>
)
:
(
''
)
}
</
div
>
</
div
>
</
div
>
</
div
>
...
...
src/pages/AccountManagement/account/AccountEdit copy.tsx
0 → 100644
View file @
c9b23759
This diff is collapsed.
Click to expand it.
src/pages/AccountManagement/account/AccountEdit.tsx
View file @
c9b23759
This diff is collapsed.
Click to expand it.
src/pages/CommercialService/CardDetail.tsx
View file @
c9b23759
...
@@ -135,11 +135,16 @@ const CardDetail = (props: any) => {
...
@@ -135,11 +135,16 @@ const CardDetail = (props: any) => {
{
listData
.
apply_status
===
0
?
(
{
listData
.
apply_status
===
0
?
(
<
Form
ref=
{
formRef
}
name=
"basic"
onFinish=
{
onFinish
}
>
<
Form
ref=
{
formRef
}
name=
"basic"
onFinish=
{
onFinish
}
>
<
Row
gutter=
{
8
}
style=
{
{
marginTop
:
16
}
}
>
<
Row
gutter=
{
8
}
style=
{
{
marginTop
:
16
}
}
>
<
Col
span=
{
3
}
>
Examine
:
</
Col
>
<
Col
span=
{
3
}
>
Approval For Application
:
</
Col
>
<
Col
span=
{
5
}
>
<
Col
span=
{
5
}
>
<
Form
.
Item
<
Form
.
Item
name=
"applyStatus"
name=
"applyStatus"
rules=
{
[{
required
:
true
,
message
:
'Please select the reply result!'
}]
}
rules=
{
[
{
required
:
true
,
message
:
'Please choose Approve or Reject for the application!'
,
},
]
}
>
>
<
Radio
.
Group
>
<
Radio
.
Group
>
<
Radio
.
Button
value=
{
'1'
}
>
Approve
</
Radio
.
Button
>
<
Radio
.
Button
value=
{
'1'
}
>
Approve
</
Radio
.
Button
>
...
...
src/pages/CommercialService/RenovationDetail.tsx
View file @
c9b23759
...
@@ -136,7 +136,12 @@ const RenovationDetail = (props: any) => {
...
@@ -136,7 +136,12 @@ const RenovationDetail = (props: any) => {
<
Col
>
<
Col
>
<
Form
.
Item
<
Form
.
Item
name=
"decorationStatus"
name=
"decorationStatus"
rules=
{
[{
required
:
true
,
message
:
'You have to choose an outcome!'
}]
}
rules=
{
[
{
required
:
true
,
message
:
'Please choose Approve or Reject the application! '
,
},
]
}
>
>
<
Radio
.
Group
>
<
Radio
.
Group
>
<
Radio
.
Button
value=
{
'1'
}
>
Approve
</
Radio
.
Button
>
{
' '
}
<
Radio
.
Button
value=
{
'1'
}
>
Approve
</
Radio
.
Button
>
{
' '
}
...
...
src/pages/CommunityManagement/FacilityBookings/Facility.tsx
View file @
c9b23759
...
@@ -45,6 +45,8 @@ const Facility = (props: any) => {
...
@@ -45,6 +45,8 @@ const Facility = (props: any) => {
const
[
ctyName
,
setCtyName
]
=
useState
(
null
);
const
[
ctyName
,
setCtyName
]
=
useState
(
null
);
const
[
soltTime
,
setSoltTime
]
=
useState
([
''
,
''
]);
// 已选时间
const
[
soltTime
,
setSoltTime
]
=
useState
([
''
,
''
]);
// 已选时间
const
[
Cycle
,
setCycle
]
=
useState
(
null
as
any
);
// Appointment Cycle下拉
// 表单标识
// 表单标识
const
[
form
]
=
Form
.
useForm
();
const
[
form
]
=
Form
.
useForm
();
...
@@ -102,9 +104,14 @@ const Facility = (props: any) => {
...
@@ -102,9 +104,14 @@ const Facility = (props: any) => {
setFileList
(
sourceData
.
categoriesDetailsImageName
);
//设置图片组名称
setFileList
(
sourceData
.
categoriesDetailsImageName
);
//设置图片组名称
// delete sourceData.categoriesDetailsImageName;
// delete sourceData.categoriesDetailsImageName;
setCycle
(
sourceData
.
periodType
+
''
);
// delete sourceData.periodType;
// 设置表单默认值
// 设置表单默认值
formRef
.
current
.
setFieldsValue
(
sourceData
);
formRef
.
current
.
setFieldsValue
(
sourceData
);
console
.
log
(
Cycle
);
}
else
{
}
else
{
// 新增页面进来 先清一遍 图片列表
// 新增页面进来 先清一遍 图片列表
let
list
:
any
=
[];
let
list
:
any
=
[];
...
@@ -175,6 +182,8 @@ const Facility = (props: any) => {
...
@@ -175,6 +182,8 @@ const Facility = (props: any) => {
result
.
categoriesOpenTime
=
`
${
soltTime
[
0
]}
-
${
soltTime
[
1
]}
`
;
// 预约时间段 二开需要
result
.
categoriesOpenTime
=
`
${
soltTime
[
0
]}
-
${
soltTime
[
1
]}
`
;
// 预约时间段 二开需要
result
.
communityManagerFee
=
result
.
communityManagerFee
?
result
.
communityManagerFee
:
'0.00'
;
// 价格押金没有为0
result
.
communityManagerFee
=
result
.
communityManagerFee
?
result
.
communityManagerFee
:
'0.00'
;
// 价格押金没有为0
result
.
communityMargin
=
result
.
communityMargin
?
result
.
communityMargin
:
'0.00'
;
// 价格押金没有为0
result
.
communityMargin
=
result
.
communityMargin
?
result
.
communityMargin
:
'0.00'
;
// 价格押金没有为0
result
.
periodType
=
Cycle
;
delete
result
.
startTime
;
delete
result
.
startTime
;
delete
result
.
endTime
;
delete
result
.
endTime
;
delete
result
.
picList
;
delete
result
.
picList
;
...
@@ -216,6 +225,11 @@ const Facility = (props: any) => {
...
@@ -216,6 +225,11 @@ const Facility = (props: any) => {
formRef
.
current
.
setFieldsValue
(
tmp
);
formRef
.
current
.
setFieldsValue
(
tmp
);
};
};
//选择周期
function
handleChange
(
value
:
any
)
{
setCycle
(
value
);
}
// 选择小区名字并赋值
// 选择小区名字并赋值
const
opname
=
(
value
:
any
)
=>
{
const
opname
=
(
value
:
any
)
=>
{
console
.
log
(
'选择的小区是:'
+
value
);
console
.
log
(
'选择的小区是:'
+
value
);
...
@@ -455,12 +469,14 @@ const Facility = (props: any) => {
...
@@ -455,12 +469,14 @@ const Facility = (props: any) => {
{
/* 设置次数 */
}
{
/* 设置次数 */
}
<
Input
.
Group
>
<
Input
.
Group
>
<
Form
.
Item
label=
"Appointment Cycle"
name=
"periodType"
rules=
{
NewFaci
[
8
]
}
>
<
Form
.
Item
label=
"Appointment Cycle"
rules=
{
NewFaci
[
8
]
}
>
<
Select
<
Select
placeholder=
"Period"
placeholder=
"Period"
allowClear
allowClear
style=
{
{
width
:
120
}
}
style=
{
{
width
:
120
}
}
disabled=
{
facilityDetail
}
disabled=
{
facilityDetail
}
value=
{
Cycle
?
Cycle
:
''
}
onChange=
{
handleChange
}
>
>
<
Option
value=
"1"
>
Week
</
Option
>
<
Option
value=
"1"
>
Week
</
Option
>
<
Option
value=
"2"
>
Month
</
Option
>
<
Option
value=
"2"
>
Month
</
Option
>
...
...
src/pages/CommunityManagement/FacilityBookings/FacilityBookings.tsx
View file @
c9b23759
...
@@ -392,7 +392,7 @@ const FacilityBookings = (props: any) => {
...
@@ -392,7 +392,7 @@ const FacilityBookings = (props: any) => {
};
};
function
mapStateToProps
(
state
:
any
)
{
function
mapStateToProps
(
state
:
any
)
{
console
.
log
(
state
);
//
console.log(state);
const
{
Data
,
Data2
,
DataSave
,
curString
,
Result
}
=
state
.
FacilityBookings
;
const
{
Data
,
Data2
,
DataSave
,
curString
,
Result
}
=
state
.
FacilityBookings
;
const
{
token
}
=
state
.
login
;
const
{
token
}
=
state
.
login
;
const
loading
=
const
loading
=
...
...
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