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
b692d874
Commit
b692d874
authored
Nov 26, 2020
by
cellee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
文案修复,展示调整
Signed-off-by:
cellee
<
893264950@qq.com
>
parent
7f010f33
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
108 additions
and
84 deletions
+108
-84
CommunityAnnouncement.ts
src/models/CommunityManagement/CommunityAnnouncement.ts
+30
-22
Account.tsx
src/pages/AccountManagement/account/Account.tsx
+1
-1
AccountDetail.tsx
src/pages/AccountManagement/account/AccountDetail.tsx
+76
-5
AccountEdit.tsx
src/pages/AccountManagement/account/AccountEdit.tsx
+1
-56
No files found.
src/models/CommunityManagement/CommunityAnnouncement.ts
View file @
b692d874
/*
* @Author: your name
* @Date: 2020-11-19 16:54:53
* @LastEditTime: 2020-11-26 16:33:11
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \tostumi\src\models\CommunityManagement\CommunityAnnouncement.ts
*/
import
*
as
service
from
'../../services/tos'
;
import
*
as
service
from
'../../services/tos'
;
import
{
message
}
from
'antd'
;
import
{
message
}
from
'antd'
;
import
{
Link
,
useIntl
,
connect
,
Dispatch
,
history
}
from
'umi'
;
import
{
Link
,
useIntl
,
connect
,
Dispatch
,
history
}
from
'umi'
;
...
@@ -46,8 +54,8 @@ export default {
...
@@ -46,8 +54,8 @@ export default {
if
(
resp
.
error_code
!=
'0000'
)
{
if
(
resp
.
error_code
!=
'0000'
)
{
printf
(
playload
,
resp
);
printf
(
playload
,
resp
);
}
message
.
error
(
`
${
resp
.
error_code
}
:
${
resp
.
error_msg
}
`
);
}
else
{
switch
(
playload
.
index
)
{
switch
(
playload
.
index
)
{
case
25
:
case
25
:
{
{
...
@@ -66,9 +74,9 @@ export default {
...
@@ -66,9 +74,9 @@ export default {
let
ImgSrc
=
resp
.
data
;
let
ImgSrc
=
resp
.
data
;
yield
put
({
type
:
'returnImg'
,
ImgSrc
});
yield
put
({
type
:
'returnImg'
,
ImgSrc
});
}
}
console
.
log
(
'图片请求成功'
);
break
;
break
;
}
}
}
},
},
*
ResultClear
({},
{
put
})
{
*
ResultClear
({},
{
put
})
{
...
...
src/pages/AccountManagement/account/Account.tsx
View file @
b692d874
...
@@ -258,7 +258,7 @@ const Account = (props: any) => {
...
@@ -258,7 +258,7 @@ const Account = (props: any) => {
<
ProTable
<
ProTable
// request={requestHeadl}
// request={requestHeadl}
rowKey=
{
'id'
}
rowKey=
{
'id'
}
dataSource=
{
Data
?
Data
.
list
:
null
}
dataSource=
{
Data
?
Data
.
list
.
filter
((
item
:
any
)
=>
item
.
userStatus
!=
1
)
:
null
}
columns=
{
columns
}
columns=
{
columns
}
pagination=
{
false
}
// 隐藏默认分页
pagination=
{
false
}
// 隐藏默认分页
search=
{
false
}
search=
{
false
}
...
...
src/pages/AccountManagement/account/AccountDetail.tsx
View file @
b692d874
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
,
ClearOutlined
,
EditOutlined
,
Left
Outlined
}
from
'@ant-design/icons'
;
import
{
EditOutlined
,
LeftOutlined
,
Poweroff
Outlined
}
from
'@ant-design/icons'
;
import
{
getCookie
}
from
'@/utils/method'
;
import
{
getCookie
}
from
'@/utils/method'
;
import
'./Account.less'
;
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';
import
ShowOptions
from
'@/components/ShowOptions/index'
;
import
{
getNumber
}
from
'@/utils/string'
;
// 正则
import
{
getNumber
}
from
'@/utils/string'
;
// 正则
import
{
RA
}
from
'@/utils/method'
;
import
{
RA
}
from
'@/utils/method'
;
...
@@ -33,6 +35,9 @@ const Account = (props: any) => {
...
@@ -33,6 +35,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
);
...
@@ -183,6 +188,19 @@ const Account = (props: any) => {
...
@@ -183,6 +188,19 @@ const Account = (props: any) => {
marginBottom
:
'15px'
,
marginBottom
:
'15px'
,
};
};
// 监听改变状态提交结果
useEffect
(()
=>
{
if
(
Result
!=
null
)
{
message
.
success
(
'Successful Operation !'
);
setOver
(
false
);
// 清除结果
dispatch
({
type
:
'Account/ResultClear'
});
dispatch
({
type
:
'Account/ReData'
});
// 退回列表
history
.
push
(
'/AccountManagement/account'
);
}
},
[
Result
]);
//级别切换
//级别切换
const
onRadio
=
(
e
:
any
)
=>
{
const
onRadio
=
(
e
:
any
)
=>
{
setvalues
(
e
.
target
.
value
);
setvalues
(
e
.
target
.
value
);
...
@@ -197,6 +215,29 @@ const Account = (props: any) => {
...
@@ -197,6 +215,29 @@ const Account = (props: any) => {
};
};
// 选择小区名字并赋值
// 选择小区名字并赋值
// 停用账号弹窗
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
}
>
<
div
className=
"contop"
style=
{
{
padding
:
'12px 20px'
}
}
>
<
div
className=
"contop"
style=
{
{
padding
:
'12px 20px'
}
}
>
...
@@ -204,6 +245,10 @@ const Account = (props: any) => {
...
@@ -204,6 +245,10 @@ 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
}
>
<
PoweroffOutlined
/>
Close Account
</
Button
>
<
Button
onClick=
{
goToReturn
}
>
<
Button
onClick=
{
goToReturn
}
>
<
LeftOutlined
/>
<
LeftOutlined
/>
Back
Back
...
@@ -249,9 +294,14 @@ const Account = (props: any) => {
...
@@ -249,9 +294,14 @@ const Account = (props: any) => {
</
Descriptions
>
</
Descriptions
>
<
Form
.
Item
name=
"community"
label=
"Community"
>
<
Form
.
Item
name=
"community"
label=
"Community"
>
<
SelectCommunity
{
/*
<SelectCommunity
checklist={DataSave == null ? null : DataSave.tosUserServiceCell.split(',')}
checklist={DataSave == null ? null : DataSave.tosUserServiceCell.split(',')}
/>
/> */
}
<
ShowOptions
list=
{
DataSave
?
DataSave
.
tosUserServiceCell
.
split
(
','
)
:
[]
}
defaultValue=
{
'Put It Away'
}
></
ShowOptions
>
</
Form
.
Item
>
</
Form
.
Item
>
<
div
className=
"diy"
style=
{
{
marginBottom
:
'14px'
}
}
>
<
div
className=
"diy"
style=
{
{
marginBottom
:
'14px'
}
}
>
...
@@ -300,6 +350,27 @@ const Account = (props: any) => {
...
@@ -300,6 +350,27 @@ const Account = (props: any) => {
</
div
>
</
div
>
</
div
>
</
div
>
</
Form
>
</
Form
>
{
/* 确认关闭账号 */
}
<
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
>
</
div
>
</
div
>
</
Spin
>
</
Spin
>
);
);
...
...
src/pages/AccountManagement/account/AccountEdit.tsx
View file @
b692d874
...
@@ -30,9 +30,6 @@ const Account = (props: any) => {
...
@@ -30,9 +30,6 @@ const Account = (props: any) => {
// 单选 二级还是三级管理员
// 单选 二级还是三级管理员
const
[
values
,
setvalues
]
=
useState
(
2
);
// 树形菜单展开关闭
const
[
values
,
setvalues
]
=
useState
(
2
);
// 树形菜单展开关闭
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
);
...
@@ -112,14 +109,8 @@ const Account = (props: any) => {
...
@@ -112,14 +109,8 @@ const Account = (props: any) => {
// 监听改变状态提交结果
// 监听改变状态提交结果
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
Result
!=
null
)
{
if
(
Result
!=
null
)
{
// console.log('改变取消弹窗重新加载,在清空结果');
// let obj = {
// userStatus: accountName.userStatus == 0 ? 1 : 0,
// userID: accountName.tosUserId,
// };
// RA(52, obj);
message
.
success
(
'Successful Operation !'
);
message
.
success
(
'Successful Operation !'
);
setOver
(
false
);
//
setOver(false);
// 清除结果
// 清除结果
dispatch
({
type
:
'Account/ResultClear'
});
dispatch
({
type
:
'Account/ResultClear'
});
dispatch
({
type
:
'Account/ReData'
});
dispatch
({
type
:
'Account/ReData'
});
...
@@ -222,28 +213,6 @@ const Account = (props: any) => {
...
@@ -222,28 +213,6 @@ 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
}
>
...
@@ -252,10 +221,6 @@ const Account = (props: any) => {
...
@@ -252,10 +221,6 @@ const Account = (props: any) => {
<
EditOutlined
/>
<
EditOutlined
/>
Edit Account
Edit Account
<
div
className=
"back"
>
<
div
className=
"back"
>
<
Button
type=
"primary"
danger
style=
{
{
marginRight
:
15
}
}
onClick=
{
lockS
}
>
<
PoweroffOutlined
/>
Close Account
</
Button
>
<
Button
onClick=
{
goToReturn
}
>
<
Button
onClick=
{
goToReturn
}
>
<
LeftOutlined
/>
<
LeftOutlined
/>
Back
Back
...
@@ -351,26 +316,6 @@ const Account = (props: any) => {
...
@@ -351,26 +316,6 @@ 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
>
);
);
};
};
...
...
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