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
79a8bb89
Commit
79a8bb89
authored
Nov 23, 2020
by
张烨
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://g.civnet.cn:8443/test/maintenance
parents
1d49990e
dfe921b0
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
227 additions
and
20 deletions
+227
-20
.gitignore
.gitignore
+1
-0
global.less
src/global.less
+5
-0
VersionPublish.js
src/pages/appConfig/VersionPublish.js
+150
-0
VersionPublish.less
src/pages/appConfig/VersionPublish.less
+25
-0
index.js
src/pages/appConfig/index.js
+4
-0
UserManage.js
src/pages/userCenter/UserManage.js
+28
-17
UserManage.less
src/pages/userCenter/UserManage.less
+8
-3
api.js
src/services/appConfig/api.js
+6
-0
No files found.
.gitignore
View file @
79a8bb89
...
...
@@ -11,4 +11,5 @@ npm-debug.log
src/umi
src/.umi
*.local
.history
src/global.less
View file @
79a8bb89
...
...
@@ -29,6 +29,11 @@ ol {
list-style: none;
}
iframe {
border: none;
padding-top: 15px;
}
@media (max-width: @screen-xs) {
.ant-table {
width: 100%;
...
...
src/pages/appConfig/VersionPublish.js
0 → 100644
View file @
79a8bb89
import
React
,
{
useEffect
,
useState
,
useRef
}
from
'react'
;
import
{
Switch
,
Button
,
Message
,
Spin
,
Modal
}
from
'antd'
;
import
BaseForm
from
'@/components/BaseForm/index'
;
import
{
getApkNameAndDate
}
from
'@/services/appConfig/api'
;
import
styles
from
'./VersionPublish.less'
;
export
default
()
=>
{
const
items
=
[
{
label
:
'更新描述'
,
dataIndex
:
'describe'
,
rules
:
[
{
required
:
true
,
message
:
'请输入apk的更新描述'
,
},
],
formType
:
'INPUT'
,
},
{
label
:
'强制更新'
,
dataIndex
:
'forceUpdate'
,
initialValue
:
1
,
rules
:
[
{
required
:
true
,
message
:
'请选择是否强制更新'
,
},
],
options
:
[
{
children
:
'是'
,
value
:
1
,
},
{
children
:
'否'
,
value
:
0
,
},
],
formType
:
'SINGLE_RADIO'
,
},
{
label
:
'apk上传'
,
dataIndex
:
'file'
,
rules
:
[
{
required
:
true
,
message
:
'请上传对应的apk'
,
},
],
formType
:
'IMGSHOP'
,
},
];
const
formEntity
=
useRef
(
null
);
const
[
loading
,
setLoading
]
=
useState
(
true
);
// 显示请求的loading
const
[
showModal
,
setShowModal
]
=
useState
(
false
);
// 显示更新的modal
const
[
fileData
,
setFileData
]
=
useState
({});
// 获取到的包名和更新时间
const
submitForm
=
()
=>
{
console
.
log
(
formEntity
);
const
{
validateFields
}
=
formEntity
.
current
;
validateFields
()
.
then
(
values
=>
{
console
.
log
(
values
);
})
.
catch
(
res
=>
{
const
{
errorFields
,
values
}
=
res
;
console
.
log
(
errorFields
,
values
);
});
};
const
handleGetForm
=
form
=>
{
formEntity
.
current
=
form
;
};
useEffect
(()
=>
{
getApkNameAndDate
({})
.
then
(
res
=>
{
console
.
log
(
res
);
const
message
=
res
.
ResultMessage
||
''
;
const
[
fileName
,
updateTime
]
=
message
.
split
(
','
);
setFileData
({
fileName
,
updateTime
,
});
setLoading
(
false
);
})
.
catch
(
err
=>
{
Message
.
error
(
err
);
setLoading
(
false
);
});
},
[]);
return
(
<
div
className
=
{
loading
?
styles
.
loadingContainer
:
styles
.
VersionPublish
}
>
{
loading
?
(
<
Spin
/>
)
:
(
<
div
className
=
"base-info"
>
<
div
className
=
{
styles
.
row
}
>
<
div
className
=
{
styles
.
label
}
>
当前包名:
<
/div
>
<
div
className
=
"value"
>
{
fileData
.
fileName
||
'未找到对应的包名'
}
<
/div
>
<
/div
>
<
div
className
=
{
styles
.
row
}
>
<
div
className
=
{
styles
.
label
}
>
更新时间:
<
/div
>
<
div
className
=
"value"
>
{
fileData
.
updateTime
}
<
/div
>
<
/div
>
<
div
className
=
{
styles
.
row
}
>
<
div
className
=
{
styles
.
label
}
>
下载地址:
<
/div
>
<
div
className
=
"value"
>
<
a
href
=
"https://example.com"
target
=
"_blank"
>
https
:
//example.com
<
/a
>
<
/div
>
<
/div
>
<
div
className
=
{
styles
.
row
}
>
<
div
className
=
{
styles
.
label
}
>
更新描述:
<
/div
>
<
div
className
=
"value"
>
更新描述:更新描述:更新描述:更新描述:更新描述:更新描述:更新描述:更新描述:更新描述:更新描述:更新描述:更新描述:更新描述:更新描述:更新描述:
<
/div
>
<
/div
>
<
div
className
=
{
styles
.
row
}
>
<
div
className
=
{
styles
.
label
}
>
强制更新:
<
/div
>
<
div
className
=
"value"
>
<
Switch
checked
disabled
/>
<
/div
>
<
/div
>
<
Button
type
=
"primary"
onClick
=
{()
=>
setShowModal
(
true
)}
>
更新
<
/Button
>
<
/div
>
)}
{
showModal
&&
(
<
Modal
visible
=
{
showModal
}
closable
=
{
false
}
maskClosable
onCancel
=
{()
=>
setShowModal
(
false
)}
onOk
=
{
submitForm
}
>
<
BaseForm
items
=
{
items
}
getForm
=
{
handleGetForm
}
/
>
<
/Modal
>
)}
<
/div
>
);
};
src/pages/appConfig/VersionPublish.less
0 → 100644
View file @
79a8bb89
.loadingContainer {
display: flex;
justify-content: center;
align-items: center;
padding: 0 15px;
min-height: 300px;
}
.VersionPublish {
display: flex;
padding: 0 15px;
min-height: 300px;
}
.row {
display: flex;
align-items: flex-start;
margin-bottom: 15px;
}
.label {
width: 100px;
flex-shrink: 0;
}
\ No newline at end of file
src/pages/appConfig/index.js
View file @
79a8bb89
...
...
@@ -3,6 +3,7 @@ import { Tabs, Card } from 'antd';
import
PageContainer
from
'@/components/BasePageContainer'
;
import
SevenParams
from
'./SevenParams'
;
import
AppMenu
from
'./AppMenu'
;
import
VersionPublish
from
'./VersionPublish'
;
const
AppConfigPage
=
()
=>
{
const
{
TabPane
}
=
Tabs
;
...
...
@@ -16,6 +17,9 @@ const AppConfigPage = () => {
<
TabPane
tab
=
"菜单管理"
key
=
"2"
type
=
"card"
>
<
AppMenu
/>
<
/TabPane
>
<
TabPane
tab
=
"版本发布"
key
=
"3"
type
=
"card"
>
<
VersionPublish
/>
<
/TabPane
>
<
/Tabs
>
<
/Card
>
<
/PageContainer
>
...
...
src/pages/userCenter/UserManage.js
View file @
79a8bb89
...
...
@@ -290,8 +290,8 @@ const UserManage = () => {
console
.
log
(
selectedRows
.
map
(
item
=>
item
.
OUID
).
toString
());
setUserIDs
(
selectedRowKeys
.
toString
());
// 数组转字符串,逗号连接
setOrgIDs
(
selectedRows
.
map
(
item
=>
item
.
OUID
).
toString
());
// 选中行数大于
1
时设置批量操作可行
if
(
selectedRows
.
length
>
1
)
{
// 选中行数大于
0
时设置批量操作可行
if
(
selectedRows
.
length
>
0
)
{
setMultiOperate
(
false
);
setMultiOperateButtonType
(
'primary'
);
}
else
{
...
...
@@ -533,6 +533,8 @@ const UserManage = () => {
getUserByKey
(
searchWord
)
.
then
(
res
=>
{
if
(
res
.
success
)
{
setOrgTitle
(
'搜索结果'
);
// 设置表头
setCurrentSelectOrg
([]);
// 清空机构时选中机构
setTableData
(
res
.
root
);
setTableLength
(
res
.
root
.
length
);
}
else
{
...
...
@@ -871,15 +873,12 @@ const UserManage = () => {
const
newPassword
=
passwordForm
.
getFieldValue
(
'newPassword'
);
const
passwordConfirm
=
passwordForm
.
getFieldValue
(
'passwordConfirm'
);
if
(
(
newPassword
&&
newPassword
.
length
<
6
)
||
(
passwordConfirm
&&
passwordConfirm
<
6
)
newPassword
&&
newPassword
.
length
>=
6
&&
passwordConfirm
&&
newPassword
.
length
>=
6
&&
newPassword
===
passwordConfirm
)
{
notification
.
error
({
message
:
'提交失败'
,
description
:
'密码至少为6位!'
,
});
}
if
(
newPassword
&&
passwordConfirm
&&
newPassword
===
passwordConfirm
)
{
updateUserPassword
(
currentUser
.
userID
,
password
,
...
...
@@ -908,7 +907,15 @@ const UserManage = () => {
message
:
'提交失败'
,
description
:
'带*号为必填项,不能为空'
,
});
}
else
{
}
else
if
(
(
newPassword
&&
newPassword
.
length
<
6
)
||
(
passwordConfirm
&&
passwordConfirm
<
6
)
)
{
notification
.
error
({
message
:
'提交失败'
,
description
:
'密码至少为6位!'
,
});
}
else
if
(
newPassword
!==
passwordConfirm
)
{
notification
.
error
({
message
:
'提交失败'
,
description
:
'确认密码不一致!'
,
...
...
@@ -1078,13 +1085,13 @@ const UserManage = () => {
<
/Menu.Item
>
<
hr
/>
<
Menu
.
Item
key
=
"2"
onClick
=
{
addSubOrg
}
icon
=
{
<
UsergroupAddOutlined
/>
}
>
添加机构
添加
下级
机构
<
/Menu.Item
>
<
Menu
.
Item
key
=
"3"
onClick
=
{
editOrg
}
icon
=
{
<
EditOutlined
/>
}
>
编辑机构
编辑
当前
机构
<
/Menu.Item
>
<
Menu
.
Item
key
=
"4"
onClick
=
{
deleteOrg
}
icon
=
{
<
DeleteOutlined
/>
}
>
删除机构
删除
当前
机构
<
/Menu.Item
>
<
/Menu
>
);
...
...
@@ -1139,7 +1146,6 @@ const UserManage = () => {
/
>
)}
<
/div
>
<
div
className
=
{
styles
.
switcher
}
>
{
treeVisible
&&
(
<
Tooltip
title
=
"隐藏机构列表"
>
...
...
@@ -1156,7 +1162,12 @@ const UserManage = () => {
<
/Spin
>
{
/* 右侧用户表 */
}
<
div
className
=
{
styles
.
userContainer
}
>
<
div
className
=
{
classnames
({
[
styles
.
userContainer
]:
true
,
[
styles
.
userContainerHide
]:
!
treeVisible
,
})}
>
<
div
style
=
{{
height
:
'50px'
}}
>
<
p
style
=
{{
margin
:
'16px 0 10px 16px'
,
display
:
'inline-block'
}}
>
{
orgTitle
}
(共
{
tableLength
}
人)
...
...
@@ -1172,7 +1183,7 @@ const UserManage = () => {
/
>
<
Dropdown
overlay
=
{
orgButtonMenu
}
>
<
Button
type
=
"primary"
>
机构操作
<
DownOutlined
/>
当前
机构操作
<
DownOutlined
/>
<
/Button
>
<
/Dropdown
>
<
Dropdown
overlay
=
{
userButtonMenu
}
disabled
=
{
multiOperate
}
>
...
...
src/pages/userCenter/UserManage.less
View file @
79a8bb89
...
...
@@ -91,7 +91,8 @@
background: white;
overflow: auto;
margin-right:10px;
transform: translateX(0px);
margin-left:0px;
transform: translateX(1px);
transition: transform 0.5s;
.ant-tree{
padding-top: 6px;
...
...
@@ -115,12 +116,16 @@
.orgContainerHide{
transform: translateX(-230px);
}
.userContainerHide{
transform: translateX(-230px);
margin-right: -230px;
}
.userContainer{
height: calc(100vh - 74px) !important;
flex: 1;
min-width:
76
0px;
min-width:
80
0px;
background: white;
transition: transform 0.5s;
.ant-table-pagination{
padding-right: 12px;
background: white;
...
...
src/services/appConfig/api.js
View file @
79a8bb89
...
...
@@ -101,3 +101,9 @@ export const deleteMenuApi = id =>
menuID
:
id
,
subSystemValue
:
'miniapp'
,
});
// 获取当前服务器上最新的apk包名和更新时间
export
const
getApkNameAndDate
=
params
=>
get
(
`/Cityinterface/Services/CityServer_MobileBusiness/REST/BaseREST.svc/AppModifyTime`
,
params
,
);
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