Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CivManage
Project
Project
Details
Activity
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
ReactWeb5
CivManage
Commits
fae711e7
Commit
fae711e7
authored
Nov 25, 2020
by
张烨
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://g.civnet.cn:8443/test/maintenance
parents
78575f5a
1df324d5
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
129 additions
and
56 deletions
+129
-56
index.js
src/components/BaseFrameContainer/index.js
+0
-0
index.less
src/components/BaseFrameContainer/index.less
+0
-0
index.js
src/pages/log/serviceLog/index.js
+101
-29
UserManage.js
src/pages/userCenter/UserManage.js
+10
-20
config.js
src/routes/config.js
+17
-5
api.js
src/services/userCenter/userManage/api.js
+1
-2
No files found.
src/components/BaseFramContainer/index.js
→
src/components/BaseFram
e
Container/index.js
View file @
fae711e7
File moved
src/components/BaseFramContainer/index.less
→
src/components/BaseFram
e
Container/index.less
View file @
fae711e7
File moved
src/pages/log/serviceLog/index.js
View file @
fae711e7
import
React
from
'react'
;
import
{
Chart
,
Interval
,
Tooltip
}
from
'bizcharts'
;
import
{
Form
,
DatePicker
,
Table
,
Row
,
Col
,
Button
}
from
'antd'
;
import
{
Chart
,
Interval
,
Tooltip
,
Axis
}
from
'bizcharts'
;
import
{
DataSet
}
from
'@antv/data-set'
;
const
data
=
[
{
value
:
251
,
name
:
'
大事例
一'
,
subName
:
'子事例一'
},
{
value
:
1041
,
name
:
'
大事例
三'
,
subName
:
'子事例二'
},
{
value
:
610
,
name
:
'
大事例
二'
,
subName
:
'子事例二'
},
{
value
:
434
,
name
:
'
大事例
二'
,
subName
:
'子事例四'
},
{
value
:
335
,
name
:
'
大事例
二'
,
subName
:
'子事例五'
},
{
value
:
250
,
name
:
'
大事例
三'
,
subName
:
'子事例二'
},
{
value
:
251
,
name
:
'
接口名称
一'
,
subName
:
'子事例一'
},
{
value
:
1041
,
name
:
'
接口名称
三'
,
subName
:
'子事例二'
},
{
value
:
610
,
name
:
'
接口名称
二'
,
subName
:
'子事例二'
},
{
value
:
434
,
name
:
'
接口名称
二'
,
subName
:
'子事例四'
},
{
value
:
335
,
name
:
'
接口名称
二'
,
subName
:
'子事例五'
},
{
value
:
250
,
name
:
'
接口名称
三'
,
subName
:
'子事例二'
},
];
const
columns
=
Object
.
keys
(
data
[
0
]).
map
(
key
=>
({
title
:
key
,
dataIndex
:
key
,
key
,
}));
// console.log(Object.keys(data[0]));
const
scale
=
{
name
:
{
alias
:
'接口名称'
,
// 别名
},
subName
:
{
alias
:
'名称'
,
// 别名
},
};
const
dv1
=
new
DataSet
.
View
().
source
(
data
);
dv1
.
transform
({
...
...
@@ -41,31 +56,88 @@ dv2
order
:
'DESC'
,
// 默认为 ASC,DESC 则为逆序
});
console
.
log
(
dv2
.
rows
);
function
Demo
()
{
const
[
timeForm
]
=
Form
.
useForm
();
return
(
<>
<
Chart
height
=
{
300
}
width
=
{
400
}
autoFit
data
=
{
dv1
.
rows
}
interactions
=
{[
'active-region'
]}
padding
=
"auto"
>
<
Interval
position
=
"name*计数"
/>
<
Tooltip
shared
/>
<
/Chart
>
<
Chart
height
=
{
300
}
width
=
{
400
}
autoFit
data
=
{
dv2
.
rows
}
interactions
=
{[
'active-region'
]}
padding
=
"auto"
>
<
Interval
position
=
"subName*平均值"
/>
<
Tooltip
shared
/>
<
/Chart
>
<
Form
style
=
{{
padding
:
'0px 6px'
}}
form
=
{
timeForm
}
>
<
Row
>
<
Col
span
=
{
4
}
>
<
Form
.
Item
name
=
"startTime"
label
=
"起始时间"
>
<
DatePicker
showTime
format
=
"YYYY-MM-DD HH:mm:ss"
/>
<
/Form.Item
>
<
/Col
>
<
Col
span
=
{
4
}
>
<
Form
.
Item
name
=
"endTime"
label
=
"结束时间"
>
<
DatePicker
showTime
format
=
"YYYY-MM-DD HH:mm:ss"
/>
<
/Form.Item
>
<
/Col
>
<
Col
span
=
{
12
}
>
<
Button
onClick
=
{()
=>
{
// timeForm.setFieldsValue({ startTime: '2020-11-12 12:12:12' });
}}
>
近
1
小时
<
/Button
>
<
Button
>
近
6
小时
<
/Button
>
<
Button
>
近
12
小时
<
/Button
>
<
Button
>
近
1
天
<
/Button
>
<
Button
>
近
1
周
<
/Button
>
<
/Col
>
<
/Row
>
<
/Form
>
<
Row
style
=
{{
padding
:
'10px'
}}
>
<
Col
span
=
{
8
}
>
<
Chart
height
=
{
300
}
width
=
{
400
}
autoFit
data
=
{
dv1
.
rows
}
interactions
=
{[
'active-region'
]}
padding
=
"auto"
scale
=
{
scale
}
>
<
Axis
name
=
"name"
title
/>
<
Axis
name
=
"计数"
title
/>
<
Interval
position
=
"name*计数"
/>
<
Tooltip
shared
/>
<
/Chart
>
<
/Col
>
<
Col
span
=
{
8
}
>
<
Chart
height
=
{
300
}
width
=
{
400
}
autoFit
data
=
{
dv2
.
rows
}
interactions
=
{[
'active-region'
]}
padding
=
"auto"
scale
=
{
scale
}
>
<
Axis
name
=
"subName"
title
/>
<
Axis
name
=
"平均值"
title
/>
<
Interval
position
=
"subName*平均值"
/>
<
Tooltip
shared
/>
<
/Chart
>
<
/Col
>
<
/Row
>
<
Table
size
=
"small"
bordered
columns
=
{
columns
||
[]}
dataSource
=
{
data
}
// loading={tableLoading}
scroll
=
{{
x
:
'max-content'
}}
pagination
=
{{
showTotal
:
(
total
,
range
)
=>
`第
${
range
[
0
]}
-
${
range
[
1
]}
条/共
${
total
}
条`
,
pageSizeOptions
:
[
10
,
20
,
50
,
100
],
defaultPageSize
:
20
,
showQuickJumper
:
true
,
showSizeChanger
:
true
,
}}
/
>
<
/
>
);
}
...
...
src/pages/userCenter/UserManage.js
View file @
fae711e7
...
...
@@ -563,33 +563,29 @@ const UserManage = () => {
message
:
'提交失败'
,
description
:
'登录名不支持中文!'
,
});
}
if
(
password
.
length
<
6
)
{
}
else
if
(
password
.
length
<
6
)
{
notification
.
error
({
message
:
'提交失败'
,
description
:
'密码至少为6位!'
,
});
}
if
(
userName
===
''
)
{
}
else
if
(
userName
===
''
)
{
notification
.
error
({
message
:
'提交失败'
,
description
:
'用户名称不能为空!'
,
});
}
if
(
phone
!==
''
&&
!
isPhone
.
test
(
phone
))
{
}
else
if
(
phone
!==
''
&&
!
isPhone
.
test
(
phone
))
{
notification
.
error
({
message
:
'提交失败'
,
description
:
'请输入11位手机号!'
,
});
}
if
(
email
!==
''
&&
!
isEmail
.
test
(
email
))
{
}
else
if
(
email
!==
''
&&
!
isEmail
.
test
(
email
))
{
notification
.
error
({
message
:
'提交失败'
,
description
:
'邮箱格式不正确!'
,
});
}
// 所有验证通过才可以提交,phone/email为空时不验证
if
(
else
if
(
noChinese
.
test
(
loginName
)
&&
password
.
length
>=
6
&&
userName
&&
...
...
@@ -940,28 +936,24 @@ const UserManage = () => {
message
:
'提交失败'
,
description
:
'登录名不支持中文!'
,
});
}
if
(
userName
===
''
)
{
}
else
if
(
userName
===
''
)
{
notification
.
error
({
message
:
'提交失败'
,
description
:
'用户姓名不能为空!'
,
});
}
if
(
phone
!==
''
&&
!
isPhone
.
test
(
phone
))
{
}
else
if
(
phone
!==
''
&&
!
isPhone
.
test
(
phone
))
{
notification
.
error
({
message
:
'提交失败'
,
description
:
'请输入11位手机号!'
,
});
}
if
(
email
!==
''
&&
!
isEmail
.
test
(
email
))
{
}
else
if
(
email
!==
''
&&
!
isEmail
.
test
(
email
))
{
notification
.
error
({
message
:
'提交失败'
,
description
:
'邮箱格式不正确!'
,
});
}
// 所有验证通过才可以提交,phone/email为空时不验证
if
(
else
if
(
loginName
&&
noChinese
.
test
(
loginName
)
&&
userName
&&
...
...
@@ -1051,9 +1043,7 @@ const UserManage = () => {
};
// 提交-批量删除用户
const
submitDeleteUsers
=
()
=>
{
const
temp
=
orgIDs
.
split
(
','
);
const
[
org
]
=
temp
;
multiDeleteUsers
(
userIDs
,
org
)
multiDeleteUsers
(
userIDs
)
.
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
setDeleteUserVisible
(
false
);
...
...
src/routes/config.js
View file @
fae711e7
...
...
@@ -30,7 +30,7 @@ import WebConfigPage from '@/pages/webConfig';
import
AppConfigPage
from
'@/pages/appConfig'
;
import
MobileConfigPage
from
'@/pages/mobileConfig'
;
import
{
USER_MODE
}
from
'@/utils/constants'
;
import
BaseFram
Container
from
'@/components/BaseFram
Container'
;
import
BaseFram
eContainer
from
'@/components/BaseFrame
Container'
;
const
iconStyle
=
{
verticalAlign
:
'0.125em'
};
const
superAuthority
=
[
USER_MODE
.
SUPER
];
...
...
@@ -140,7 +140,19 @@ export default {
{
path
:
'/platformCenter/gis'
,
name
:
'GIS平台'
,
component
:
Welcome
,
component
:
BaseFrameContainer
,
tabs
:
[
{
tabName
:
'范围配置'
,
url
:
'/web4/?widget=product/Tool/EditBoundary/EditBoundary&serverCollextion=JiangNing&solution=熊猫智慧水务平台'
,
},
{
tabName
:
'方案配置'
,
url
:
'/web4/?widget=product/Tool/MapSettings/MapSettings|hideMap=true'
,
},
],
},
// {
// path: '/platformCenter/order',
...
...
@@ -150,7 +162,7 @@ export default {
{
path
:
'/platformCenter/notify'
,
name
:
'消息平台'
,
component
:
BaseFramContainer
,
component
:
BaseFram
e
Container
,
tabs
:
[
{
tabName
:
'推送模板配置'
,
...
...
@@ -169,14 +181,14 @@ export default {
name
:
'视频管理'
,
url
:
'/web4/?widget=product/oms/VideoConfig/VideoConfig|hideMap=true&videoType=萤石云'
,
component
:
BaseFramContainer
,
component
:
BaseFram
e
Container
,
},
{
path
:
'/platformCenter/emq'
,
name
:
'宿主管理'
,
url
:
'/web4/?widget=product/oms/MqttConfig/MqttConfig.js|hideMap=true'
,
component
:
BaseFramContainer
,
component
:
BaseFram
e
Container
,
},
{
path
:
'/platformCenter/dictionary'
,
...
...
src/services/userCenter/userManage/api.js
View file @
fae711e7
...
...
@@ -151,12 +151,11 @@ export const deleteUser = userID =>
userID
,
});
// 批量删除用户
export
const
multiDeleteUsers
=
(
userIDs
,
orgIDs
)
=>
export
const
multiDeleteUsers
=
userIDs
=>
get
(
`
${
PUBLISH_SERVICE
}
/UserCenter/DeleteUsers`
,
{
_version
:
9999
,
_dc
:
Date
.
now
(),
userIds
:
userIDs
,
groupId
:
orgIDs
,
});
export
const
setUserRelation
=
(
userID
,
roleList
=
[],
stationList
)
=>
...
...
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