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
fd923672
Commit
fd923672
authored
Aug 30, 2021
by
邓超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 修改数据库初始化界面,替换web页面配置跟app配置接口,修复遇到的问题
parent
c4788d3e
Pipeline
#33626
passed with stages
in 33 minutes 13 seconds
Changes
16
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
132 additions
and
60 deletions
+132
-60
index.jsx
src/components/RadioGroup/index.jsx
+34
-0
index.less
src/components/RadioGroup/index.less
+14
-0
InitDataBase.jsx
src/pages/database/InitDataBase.jsx
+0
-0
InitDataBase.less
src/pages/database/InitDataBase.less
+32
-6
SiteConfig.jsx
src/pages/mobileConfig/SiteConfig.jsx
+3
-7
addConfig.jsx
src/pages/mobileConfig/addConfig.jsx
+2
-6
index.js
src/pages/mobileConfig/index.js
+1
-1
miniMenu.jsx
src/pages/mobileConfig/menuconfig/miniMenu.jsx
+1
-1
RoleManage.jsx
src/pages/userCenter/roleManage/RoleManage.jsx
+5
-12
EditModal.jsx
src/pages/userCenter/siteManage/EditModal.jsx
+1
-1
siteManage.jsx
src/pages/userCenter/siteManageV2/siteManage.jsx
+8
-9
AddForm.jsx
src/pages/webConfig/menuconfig/AddForm.jsx
+1
-0
webMenu.jsx
src/pages/webConfig/menuconfig/webMenu.jsx
+5
-4
api.js
src/services/database/api.js
+10
-0
api.js
src/services/mobileConfig/api.js
+10
-10
api.js
src/services/webConfig/api.js
+5
-3
No files found.
src/components/RadioGroup/index.jsx
0 → 100644
View file @
fd923672
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Radio
}
from
'antd'
;
import
styles
from
'./index.less'
;
const
RadioBox
=
props
=>
{
const
{
radioTitle
,
radioOptions
,
currentVal
,
currentIndex
,
callBack
,
}
=
props
;
useEffect
(()
=>
{},
[]);
// 选择时通过回调函数传回要改变数据的索引跟选中的值
const
onChange
=
e
=>
{
callBack
(
currentIndex
,
e
.
target
.
value
);
};
return
(
<
div
className=
{
styles
.
radioBox
}
>
<
div
className=
{
styles
.
radioTitle
}
>
{
radioTitle
}
:
</
div
>
<
div
className=
{
styles
.
radioContent
}
>
<
Radio
.
Group
onChange=
{
onChange
}
value=
{
currentVal
}
>
{
radioOptions
.
map
((
item
,
num
)
=>
(
<
Radio
value=
{
item
.
version
}
key=
{
num
}
className=
{
styles
.
radio
}
>
{
item
.
functionName
+
item
.
version
}
</
Radio
>
))
}
</
Radio
.
Group
>
</
div
>
</
div
>
);
};
export
default
RadioBox
;
src/components/RadioGroup/index.less
0 → 100644
View file @
fd923672
.radioBox {
display: flex;
justify-content: flex-start;
margin-bottom: 20px;
.radioTitle {
width: 100px;
}
.radioContent {
width: 760px;
.radio {
margin-bottom: 10px;
}
}
}
src/pages/database/InitDataBase.jsx
View file @
fd923672
This diff is collapsed.
Click to expand it.
src/pages/database/InitDataBase.less
View file @
fd923672
.tableTitle{
.tableTitle
{
font-size: 16px;
}
.mgTop20{
.mgTop20
{
margin-top: 20px !important;
}
.tCenter{
.tCenter
{
text-align: center;
}
.decsBox{
.decsBox
{
height: 32px;
line-height: 32px;
}
.btnBox {
display: flex !important;
justify-content: space-between;
}
\ No newline at end of file
}
.ant-modal-header {
height: 70px;
}
.cardContainer {
margin-top: 10px;
border: 1px solid #ecf0fa;
border-top: none;
.ant-tabs-nav {
background-color: #f4f6fc;
.ant-tabs-tab {
background-color: transparent;
border: none;
border-top: 2px solid transparent;
box-sizing: content-box;
}
.ant-tabs-tab-active {
border: none;
background-color: #fff;
border-top: 2px solid #1685ff;
}
}
.tabContainer {
padding-left: 20px;
box-sizing: border-box;
}
}
src/pages/mobileConfig/SiteConfig.jsx
View file @
fd923672
...
...
@@ -50,7 +50,7 @@ const SiteConfig = props => {
let
obj
=
{};
let
arr
=
Object
.
keys
(
form
.
getFieldsValue
());
arr
.
map
(
k
=>
{
obj
[
k
]
=
res
[
k
];
obj
[
k
]
=
res
.
data
[
k
];
});
form
.
setFieldsValue
(
obj
);
})
...
...
@@ -67,14 +67,10 @@ const SiteConfig = props => {
setLoading
(
true
);
const
obj
=
{
...
form
.
getFieldsValue
()
};
let
params
=
{
...
obj
,
mode
:
'single'
,
client
:
clientName
};
editWebsite
(
params
,
{
headers
:
{
'content-type'
:
'application/x-www-form-urlencggoded;charset=UTF-8'
,
},
})
editWebsite
(
params
)
.
then
(
res
=>
{
setLoading
(
false
);
if
(
res
.
success
)
{
if
(
res
.
code
===
0
)
{
submitCallback
(
obj
.
title
);
notification
.
success
({
message
:
'提示'
,
...
...
src/pages/mobileConfig/addConfig.jsx
View file @
fd923672
...
...
@@ -43,14 +43,10 @@ const AddConfig = props => {
setLoading
(
true
);
const
obj
=
{
...
form
.
getFieldsValue
()
};
let
params
=
{
...
obj
,
mode
:
'single'
};
addWebsite
(
params
,
{
headers
:
{
'content-type'
:
'application/x-www-form-urlencggoded;charset=UTF-8'
,
},
})
addWebsite
(
params
)
.
then
(
res
=>
{
setLoading
(
false
);
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
addCallback
(
params
.
title
);
notification
.
success
({
message
:
'提示'
,
...
...
src/pages/mobileConfig/index.js
View file @
fd923672
...
...
@@ -141,7 +141,7 @@ const MobileConfigPage = props => {
})
.
then
(
res
=>
{
setLoading
(
false
);
if
(
res
.
success
)
{
if
(
res
.
code
===
0
)
{
setMiniTitle
(
''
);
setTimeout
(()
=>
{
setFlag
(
flag
+
1
);
...
...
src/pages/mobileConfig/menuconfig/miniMenu.jsx
View file @
fd923672
...
...
@@ -303,7 +303,7 @@ const MiniMenu = props => {
})
.
then
(
res
=>
{
setSubmitLoading
(
false
);
if
(
res
.
success
)
{
if
(
res
.
code
===
0
)
{
setAddVisible
(
false
);
setAddTwoVisible
(
false
);
setFlag
(
flag
+
1
);
...
...
src/pages/userCenter/roleManage/RoleManage.jsx
View file @
fd923672
...
...
@@ -476,20 +476,13 @@ const SiteManage = () => {
};
const
handleCommit
=
results
=>
{
setBtnLoading
(
true
);
setMenuToRole
(
qs
.
stringify
({
roleID
,
menuNameList
:
String
(
results
.
flat
()),
}),
{
headers
:
{
'content-type'
:
'application/x-www-form-urlencggoded;charset=UTF-8'
,
},
},
)
setMenuToRole
({
roleID
:
Number
(
roleID
),
menuIdList
:
String
(
results
.
flat
()),
})
.
then
(
res
=>
{
setBtnLoading
(
false
);
if
(
res
.
msg
===
'Ok'
)
{
if
(
res
.
code
===
0
)
{
setValueList
([...
results
.
flat
()]);
notification
.
success
({
message
:
'提示'
,
...
...
src/pages/userCenter/siteManage/EditModal.jsx
View file @
fd923672
...
...
@@ -18,7 +18,7 @@ const EditModal = props => {
editStation
({
stationName
:
res
.
stationName
,
description
:
res
.
description
,
stationID
:
stationObj
,
stationID
:
stationObj
.
id
,
})
.
then
(
res
=>
{
setLoading
(
false
);
...
...
src/pages/userCenter/siteManageV2/siteManage.jsx
View file @
fd923672
...
...
@@ -70,6 +70,7 @@ const SiteManageV2 = () => {
const
[
treeState
,
setTreeState
]
=
useState
(
true
);
// 树第一次加载
const
[
treeLoading
,
setTreeLoading
]
=
useState
(
false
);
const
[
currentStation
,
setCurrentStation
]
=
useState
(
''
);
// 当前选中站点
const
[
currentStationMsg
,
setCurrentStationMsg
]
=
useState
({});
//当前编辑节点信息
const
[
currentStationOperate
,
setCurrentStationOperate
]
=
useState
(
false
)
const
[
flag
,
setFlag
]
=
useState
(
1
);
//操作标致触发界面刷新
const
[
dataList
,
setdataList
]
=
useState
([]);
//当前站点对应的分页用户列表
...
...
@@ -131,7 +132,10 @@ const SiteManageV2 = () => {
//编辑当前站点
const
editorSite
=
(
e
,
recode
)
=>
{
e
.
stopPropagation
();
setCurrentStation
(
recode
.
id
);
// console.log(recode);
// 保存编辑回显信息
setCurrentStationMsg
(
recode
);
// setCurrentStation(recode.id);
handleShowModal
(
'editVisible'
,
true
);
}
// 重新渲染树
...
...
@@ -422,15 +426,10 @@ const SiteManageV2 = () => {
description
:
'请至少选择选择一个用户!'
,
});
chooseUserToStation
(
qs
.
stringify
(
{
{
userList
:
String
(
result
.
flat
()),
stationID
:
currentStation
,
}),
{
headers
:
{
'content-type'
:
'application/x-www-form-urlencggoded;charset=UTF-8'
,
},
},
}
)
.
then
(
res
=>
{
handleShowModal
(
'btnLoading'
,
false
);
...
...
@@ -537,7 +536,7 @@ const SiteManageV2 = () => {
/>
<
EditModal
visible=
{
visibleParams
.
editVisible
}
stationObj=
{
currentStation
}
stationObj=
{
currentStation
Msg
}
onCancel=
{
()
=>
handleShowModal
(
'editVisible'
,
false
)
}
confirmModal=
{
editModal
}
/>
...
...
src/pages/webConfig/menuconfig/AddForm.jsx
View file @
fd923672
...
...
@@ -96,6 +96,7 @@ const AddForm = props => {
rules=
{
[
{
required
:
true
,
// pattern: /^[^\s]*$/,
message
:
'请输入功能路径'
,
},
]
}
...
...
src/pages/webConfig/menuconfig/webMenu.jsx
View file @
fd923672
...
...
@@ -263,10 +263,11 @@ const MiniMenu = props => {
};
// 新增提交的回调
const
submitCallback
=
(
prop
,
item
)
=>
{
console
.
log
(
subSystemValue
,
'subSystemValue'
);
setSubmitLoading
(
true
);
let
baseUrl
=
handleGeturl
(
prop
.
imageUrl
);
let
obj
=
{
...
prop
,
baseUrl
};
const
parentID
=
item
.
menuID
?
item
.
menuID
:
-
1
;
const
parentID
=
item
.
menuID
?
Number
(
item
.
menuID
)
:
-
1
;
addWebMenu
({
_dc
:
Date
.
now
(),
parentID
,
...
...
@@ -307,7 +308,7 @@ const MiniMenu = props => {
obj
.
relatedRoleList
=
String
(
roleList
)
||
''
;
editWebMenu
({
_dc
:
Date
.
now
(),
menuID
,
menuID
:
Number
(
menuID
)
,
// subSystemValue,
...
obj
,
})
...
...
@@ -339,12 +340,12 @@ const MiniMenu = props => {
// 新接口改为editWebMenu 原来为pEditWebMenu
editWebMenu
({
_dc
:
Date
.
now
(),
menuID
,
menuID
:
Number
(
menuID
)
,
// subSystemValue,
...
obj
,
product
:
null
,
baseUrl
:
null
,
hideInMenu
:
null
,
hideInMenu
:
false
,
})
.
then
(
res
=>
{
setLoading
(
false
);
...
...
src/services/database/api.js
View file @
fd923672
...
...
@@ -203,3 +203,13 @@ export const AddUserAuthSetting = params =>
get
(
`
${
PUBLISH_SERVICE
}
/WebSite/AddUserAuthSetting`
,
params
);
export
const
GetUserAuthSet
=
params
=>
get
(
`
${
PUBLISH_SERVICE
}
/WebSite/GetUserAuthSet`
,
params
);
// 获取产品列表
export
const
GetProductList
=
params
=>
get
(
`
${
PUBLISH_SERVICE
}
/DBManager/GetProductList`
,
params
);
// 获取产品方案配置
export
const
GetDbProduct
=
params
=>
post
(
`
${
PUBLISH_SERVICE
}
/DBManager/GetDbProduct`
,
params
);
// 数据库初始化
export
const
InitAddDataBase
=
params
=>
post
(
`
${
PUBLISH_SERVICE
}
/DBManager/InitAddDataBase`
,
params
);
src/services/mobileConfig/api.js
View file @
fd923672
...
...
@@ -13,7 +13,7 @@ export const miniAppSiteTree = params =>
* title:'名称'
*/
export
const
getWebsite
=
params
=>
get
(
`
${
CITY_SERVICE
}
/OMS.svc
/MiniApp_GetWebsite`
,
params
);
get
(
`
${
PUBLISH_SERVICE
}
/WebSite
/MiniApp_GetWebsite`
,
params
);
/**
*
* @param {*} params
...
...
@@ -29,10 +29,10 @@ export const getWebsite = params =>
"cloudLogin":false
*/
export
const
editWebsite
=
(
params
,
options
)
=>
{
let
strParams
=
JSON
.
stringify
(
params
)
;
let
qsParams
=
qs
.
stringify
({
config
:
strParams
})
;
let
strParams
=
params
;
let
qsParams
=
strParams
;
return
post
(
`
${
CITY_SERVICE
}
/OMS.svc
/MiniApp_EditWebsite?_version=9999`
,
`
${
PUBLISH_SERVICE
}
/WebSite
/MiniApp_EditWebsite?_version=9999`
,
qsParams
,
options
,
);
...
...
@@ -65,7 +65,7 @@ export const getMiniAppModuleTree = params =>
}
*/
export
const
addMenu
=
params
=>
get
(
`
${
CITY_SERVICE
}
/OMS.svc
/MiniApp_AddMenu`
,
params
);
post
(
`
${
PUBLISH_SERVICE
}
/WebSite
/MiniApp_AddMenu`
,
params
);
// 获取菜单详情
/**
...
...
@@ -90,14 +90,14 @@ export const getRoleListPlain = params =>
// 删除小程序
export
const
deleteWebsite
=
params
=>
get
(
`
${
CITY_SERVICE
}
/OMS.svc
/MiniApp_DeleteWebsite`
,
params
);
get
(
`
${
PUBLISH_SERVICE
}
/WebSite
/MiniApp_DeleteWebsite`
,
params
);
// 新增小程序
export
const
addWebsite
=
(
params
,
options
)
=>
{
let
strParams
=
JSON
.
stringify
(
params
);
let
qsParams
=
qs
.
stringify
({
config
:
strParams
});
//
let strParams = JSON.stringify(params);
//
let qsParams = qs.stringify({ config: strParams });
return
post
(
`
${
CITY_SERVICE
}
/OMS.svc
/MiniApp_AddWebsite?_version=9999`
,
qsP
arams
,
`
${
PUBLISH_SERVICE
}
/WebSite
/MiniApp_AddWebsite?_version=9999`
,
p
arams
,
options
,
);
};
...
...
src/services/webConfig/api.js
View file @
fd923672
...
...
@@ -75,12 +75,14 @@ export const addWebMenu = param => {
const
defaultConfig
=
{
pageUrl
:
''
};
// eslint-disable-next-line no-return-assign
Object
.
keys
(
param
).
forEach
(
k
=>
(
defaultConfig
[
k
]
=
param
[
k
]));
return
get
(
`
${
PUBLISH_SERVICE
}
/WebSite/AddMenu?_version=9999`
,
defaultConfig
);
return
post
(
`
${
PUBLISH_SERVICE
}
/WebSite/AddMenu?_version=9999`
,
defaultConfig
,
);
};
export
const
editWebMenu
=
param
=>
// get(`${CITY_SERVICE}/OMS.svc/W4_EditMenu?_version=9999`, param);
get
(
`
${
PUBLISH_SERVICE
}
/WebSite/EditMenu?_version=9999`
,
param
);
post
(
`
${
PUBLISH_SERVICE
}
/WebSite/EditMenu?_version=9999`
,
param
);
export
const
pEditWebMenu
=
param
=>
get
(
`
${
CITY_SERVICE
}
/OMS.svc/P_EditMenu?_version=9999`
,
param
);
...
...
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