Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
quantum-blocks
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
ui
quantum-blocks
Commits
523b67b8
Commit
523b67b8
authored
Apr 19, 2022
by
Xuguangxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 完成后台导航配置部分功能
parent
e9f5bbd6
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
73 additions
and
27 deletions
+73
-27
navigator.ts
app/controller/navigator.ts
+2
-4
navigator.ts
app/service/navigator.ts
+32
-0
dev.config.ts
app/web/config/dev.config.ts
+6
-6
addOrEditNavigator.vue
...e/editor/view/navigator/components/addOrEditNavigator.vue
+22
-16
navigatorPageTable.vue
...e/editor/view/navigator/components/navigatorPageTable.vue
+11
-1
No files found.
app/controller/navigator.ts
View file @
523b67b8
...
@@ -16,11 +16,9 @@ export default class NavigatorController extends Controller {
...
@@ -16,11 +16,9 @@ export default class NavigatorController extends Controller {
}
}
// 查询导航配置列表(父子接口,供选择页面使用,且带有分页)
// 查询导航配置列表(父子接口,供选择页面使用,且带有分页)
public
async
getNavigatorConfigListWithRelation
(
ctx
:
Context
)
{
public
async
getNavigatorConfigListWithRelation
(
ctx
:
Context
)
{
const
{
pageNo
,
pageSize
,
name
,
author
}
=
ctx
.
query
;
const
{
pageNo
,
pageSize
,
name
,
author
,
id
}
=
ctx
.
query
;
try
{
try
{
const
list
=
await
ctx
.
service
.
navigator
.
getList
(
pageNo
,
pageSize
,
name
,
author
);
const
list
=
await
ctx
.
service
.
navigator
.
getNavigatorConfigListWithRelation
(
pageNo
,
pageSize
,
name
,
author
,
id
);
const
{
data
}
=
list
;
ctx
.
body
=
ctx
.
helper
.
ok
(
list
);
ctx
.
body
=
ctx
.
helper
.
ok
(
list
);
}
catch
(
e
)
{
}
catch
(
e
)
{
ctx
.
logger
.
info
(
`获取导航配置数据异常,
${
JSON
.
stringify
(
e
)}
`
);
ctx
.
logger
.
info
(
`获取导航配置数据异常,
${
JSON
.
stringify
(
e
)}
`
);
...
...
app/service/navigator.ts
View file @
523b67b8
...
@@ -48,6 +48,38 @@ export default class ArticeService extends Service {
...
@@ -48,6 +48,38 @@ export default class ArticeService extends Service {
}
}
return
result
;
return
result
;
}
}
// 选择页面 导航配置 获取列表
async
getNavigatorConfigListWithRelation
(
pageNo
,
pageSize
,
name
=
''
,
author
=
''
,
id
)
{
const
offset
=
(
+
pageNo
-
1
)
*
pageSize
;;
const
condition
=
{
author
:
null
,
name
:
null
,
id
:
null
};
// 模糊匹配作者
if
(
author
)
condition
.
author
=
author
;
// 模糊匹配名称
if
(
name
)
condition
.
name
=
name
;
if
(
id
)
{
condition
.
id
=
{
$notIn
:
[
id
]
}
}
if
(
!
condition
.
author
)
delete
condition
.
author
;
if
(
!
condition
.
name
)
delete
condition
.
name
;
if
(
!
condition
.
id
)
delete
condition
.
id
;
const
res
=
await
this
.
context
.
model
.
NavigatorConfig
.
findAndCountAll
({
where
:
condition
,
limit
:
+
pageSize
,
offset
})
const
result
=
{
total
:
res
.
count
||
0
,
data
:
res
.
rows
||
[]
}
return
result
;
}
// 删除导航配置
// 删除导航配置
async
deleteById
(
id
)
{
async
deleteById
(
id
)
{
const
res
=
await
this
.
context
.
model
.
NavigatorConfig
.
destroy
({
const
res
=
await
this
.
context
.
model
.
NavigatorConfig
.
destroy
({
...
...
app/web/config/dev.config.ts
View file @
523b67b8
...
@@ -3,15 +3,15 @@ const protocol = EASY_ENV_IS_BROWSER ? window.location.protocol : 'http';
...
@@ -3,15 +3,15 @@ const protocol = EASY_ENV_IS_BROWSER ? window.location.protocol : 'http';
const
hostMap
=
{
const
hostMap
=
{
apiHost
:
`http://localhost:7002/`
,
apiHost
:
`http://localhost:7002/`
,
// apiHost: `http://192.168.28.199:7001/`,
// apiHost: `http://192.168.28.199:7001/`,
// apiHost: 'https://quantum-blocks-
vcc2
.liangkebang.net/',
// apiHost: 'https://quantum-blocks-
bfe
.liangkebang.net/',
h5Host
:
'
https://quantum-h5-
vcc2
.liangkebang.net
'
,
h5Host
:
'
https://quantum-h5-
bfe
.liangkebang.net
'
,
qiniuHost
:
`https://appsync.lkbang.net`
,
qiniuHost
:
`https://appsync.lkbang.net`
,
shenceUrl
:
`
${
protocol
}
//bn.xyqb.com/sa?project=default`
,
shenceUrl
:
`
${
protocol
}
//bn.xyqb.com/sa?project=default`
,
opapiHost
:
`https://opapi-
vcc2
.liangkebang.net`
,
opapiHost
:
`https://opapi-
bfe
.liangkebang.net`
,
qiniuUpHost
:
`
${
protocol
}
//up-z0.qiniup.com`
,
qiniuUpHost
:
`
${
protocol
}
//up-z0.qiniup.com`
,
// kdspHost: 'https://kdsp-api-
vcc2
.liangkebang.net',
// kdspHost: 'https://kdsp-api-
bfe
.liangkebang.net',
talosHost
:
'
https://talos-
vcc2
.liangkebang.net
'
,
talosHost
:
'
https://talos-
bfe
.liangkebang.net
'
,
kdspHost
:
'
https://kdsp-api-
vcc2
.liangkebang.net
'
,
kdspHost
:
'
https://kdsp-api-
bfe
.liangkebang.net
'
,
yxmTenantId
:
560761
,
yxmTenantId
:
560761
,
appIdMap
:
{
appIdMap
:
{
560761
:
'
wxe16bf9293671506c
'
,
560761
:
'
wxe16bf9293671506c
'
,
...
...
app/web/page/editor/view/navigator/components/addOrEditNavigator.vue
View file @
523b67b8
...
@@ -96,22 +96,24 @@
...
@@ -96,22 +96,24 @@
<Button
type=
"ghost"
@
click=
"close"
>
取消
</Button>
<Button
type=
"ghost"
@
click=
"close"
>
取消
</Button>
<Button
type=
"primary"
@
click=
"confirm"
>
保存
</Button>
<Button
type=
"primary"
@
click=
"confirm"
>
保存
</Button>
</div>
</div>
<Modal
v-model=
"showSelectPageModal"
id=
"selectPageModal"
title=
"选择页面"
width=
"1000"
:styles=
"{zIndex: 999999}"
>
<div
v-if=
"showSelectPageModal"
>
<Tabs
:value=
"pageTabType"
>
<Modal
v-model=
"showSelectPageModal"
:mask-closable=
"false"
id=
"selectPageModal"
title=
"选择页面"
width=
"1000"
>
<TabPane
label=
"功能页面"
name=
"1"
>
<Tabs
:value=
"pageTabType"
>
<featurePageTable
<TabPane
label=
"功能页面"
name=
"1"
>
@
selectPage=
"selectPage"
<featurePageTable
/>
@
selectPage=
"selectPage"
</TabPane>
/>
<TabPane
label=
"活动页面"
name=
"2"
>
</TabPane>
<activityPageTable
@
selectPage=
"selectPage"
/>
<TabPane
label=
"活动页面"
name=
"2"
>
</TabPane>
<activityPageTable
@
selectPage=
"selectPage"
/>
<TabPane
label=
"导航页面"
name=
"3"
>
</TabPane>
<navigatorPageTable
@
selectPage=
"selectPage"
/>
<TabPane
label=
"导航页面"
name=
"3"
>
</TabPane>
<navigatorPageTable
:nav-id=
"id"
@
selectPage=
"selectPage"
/>
</Tabs>
</TabPane>
<div
slot=
"footer"
/>
</Tabs>
</Modal>
<div
slot=
"footer"
/>
</Modal>
</div>
</Modal>
</Modal>
</template>
</template>
<
script
>
<
script
>
...
@@ -314,6 +316,10 @@ export default {
...
@@ -314,6 +316,10 @@ export default {
/deep/ .ivu-modal-mask, /deep/ .ivu-modal-wrap{
/deep/ .ivu-modal-mask, /deep/ .ivu-modal-wrap{
z-index: 1009
z-index: 1009
}
}
/deep/ .ivu-modal-body{
height: 70vh;
overflow-y: auto;
}
}
}
/deep/ .ivu-modal-body{
/deep/ .ivu-modal-body{
max-height: 70vh;
max-height: 70vh;
...
...
app/web/page/editor/view/navigator/components/navigatorPageTable.vue
View file @
523b67b8
...
@@ -43,6 +43,12 @@ import navigatorApi from '@api/navigator.api'
...
@@ -43,6 +43,12 @@ import navigatorApi from '@api/navigator.api'
import
expandRow
from
'
./expandRow.vue
'
;
import
expandRow
from
'
./expandRow.vue
'
;
import
config
from
'
@/config/index
'
;
import
config
from
'
@/config/index
'
;
export
default
{
export
default
{
props
:
{
navId
:
{
type
:
[
Number
,
String
],
default
:
''
}
},
components
:
{
components
:
{
expandRow
expandRow
},
},
...
@@ -132,7 +138,11 @@ export default {
...
@@ -132,7 +138,11 @@ export default {
this
.
query
();
this
.
query
();
},
},
async
query
()
{
async
query
()
{
const
res
=
await
navigatorApi
.
getListWithRelation
(
this
.
searchForm
);
const
queryParams
=
Object
.
assign
({},
this
.
searchForm
);
if
(
this
.
navId
)
{
queryParams
.
id
=
navId
;
}
const
res
=
await
navigatorApi
.
getListWithRelation
(
queryParams
);
this
.
total
=
res
.
total
||
0
;
this
.
total
=
res
.
total
||
0
;
if
(
res
.
data
.
length
)
{
if
(
res
.
data
.
length
)
{
for
(
let
i
=
0
;
i
<
res
.
data
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
res
.
data
.
length
;
i
++
)
{
...
...
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