Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
legobackend
/
lego-manage-web
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
b5235a6c
authored
2025-07-05 13:53:47 +0800
by
chentao
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
调整层级关系
1 parent
9baf0281
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
82 additions
and
57 deletions
src/api/legao/kit.js
src/lang/package/zh-cn.js
src/views/legao/block/index.vue
src/views/legao/course/index.vue
src/views/legao/kit/index.vue
src/views/legao/problem/index.vue
src/api/legao/kit.js
View file @
b5235a6
...
...
@@ -16,6 +16,14 @@ export function getEntiretyists(params) {
})
}
// 查询系列数据(不分页)
export
function
getBuildingBlockLists
(
params
)
{
return
request
({
url
:
'/core/buildingBlock/list'
,
method
:
'get'
,
})
}
// 新增
export
function
addEntirety
(
data
)
{
return
request
({
...
...
src/lang/package/zh-cn.js
View file @
b5235a6
...
...
@@ -39,9 +39,10 @@ export default {
title
:
'套件管理'
,
indexName
:
'序号'
,
groupName
:
'套件名称'
,
buildingBlockName
:
'系列名称'
,
sortName
:
'排序'
,
cateName
:
'类别'
,
unitName
:
'单元类别'
,
dialogGroup
:
'系列'
,
tableControlsName
:
'操作'
,
controlsDelName
:
'删除'
,
controlsEditName
:
'编辑'
,
...
...
@@ -53,12 +54,14 @@ export default {
dialogSort
:
'排序'
,
dialogConfim
:
'确认'
,
dialogExit
:
'退出'
,
dialogPhoto
:
'图片'
,
},
// 系列
block
:
{
title
:
'系列管理'
,
indexName
:
'序号'
,
blockName
:
'系列名称'
,
sortName
:
'排序'
,
groupName
:
'套件'
,
tableControlsName
:
'操作'
,
controlsDelName
:
'删除'
,
...
...
@@ -70,7 +73,6 @@ export default {
dialogTitleEdit
:
'修改'
,
dialogName
:
'系列名称'
,
tableSortName
:
'排序'
,
dialogGroup
:
'套件'
,
dialogPhoto
:
'图片'
,
dialogConfim
:
'确认'
,
dialogExit
:
'退出'
,
...
...
@@ -80,7 +82,7 @@ export default {
title
:
'课程管理'
,
indexName
:
'序号'
,
courseName
:
'课程名称'
,
blockName
:
'系列
名称'
,
entiretyName
:
'套件
名称'
,
buildName
:
'搭建'
,
caseName
:
'有无案例'
,
packName
:
'是否打包'
,
...
...
@@ -94,7 +96,7 @@ export default {
dialogTitleAdd
:
'新增'
,
dialogTitleEdit
:
'修改'
,
dialogName
:
'课程名称'
,
dialog
Block
:
'系列
'
,
dialog
Entirety
:
'套件
'
,
dialogPack
:
'是否打包'
,
dialogTypes
:
'搭建类型'
,
dialogTwoD
:
'2D'
,
...
...
@@ -112,6 +114,8 @@ export default {
title
:
'常见问题'
,
tableIndex
:
'序号'
,
tableAnsName
:
'问题'
,
tableBuildingBlockName
:
'系列'
,
tableSortName
:
'排序'
,
tableShowName
:
'展示'
,
tableStateName
:
'发布状态'
,
tableControlsName
:
'操作'
,
...
...
@@ -132,6 +136,7 @@ export default {
dialogSubmit
:
'直接发布'
,
dialogSave
:
'保存'
,
dialogExit
:
'退出'
,
dialogGroup
:
'系列'
,
},
// 升级管理
upgradation
:
{
...
...
src/views/legao/block/index.vue
View file @
b5235a6
...
...
@@ -42,7 +42,7 @@
>
<el-table-column
:label=
"$t('block.indexName')"
type=
"index"
width=
"80"
/>
<el-table-column
:label=
"$t('block.blockName')"
prop=
"name"
/>
<el-table-column
:label=
"$t('block.
groupName')"
prop=
"entiretyName
"
/>
<el-table-column
:label=
"$t('block.
sortName')"
prop=
"sort
"
/>
<el-table-column
:label=
"$t('block.tableControlsName')"
class-name=
"small-padding fixed-width"
>
<template
#
default=
"
{ row }">
<el-button
...
...
@@ -72,15 +72,6 @@
<el-form-item
:label=
"$t('block.dialogName')"
prop=
"name"
label-width=
"80"
>
<el-input
v-model=
"showForm.form.name"
placeholder=
"请输入系列名称"
/>
</el-form-item>
<el-form-item
:label=
"$t('block.dialogGroup')"
prop=
"entiretyId"
label-width=
"80"
>
<el-select-v2
v-model=
"showForm.form.entiretyId"
:options=
"kitLists"
:props=
"props"
placeholder=
"请选择套件"
style=
"width: 180px;"
/>
</el-form-item>
<el-form-item
:label=
"$t('block.tableSortName')"
label-width=
"80"
>
<el-input-number
v-model=
"showForm.form.sort"
controls-position=
"right"
:min=
"0"
/>
</el-form-item>
...
...
@@ -103,8 +94,6 @@
import
{
useTableHeight
}
from
'@/hooks/useTableHeight'
// 导入api接口
import
{
getBuildingBlockList
,
getBuildingBlockLists
,
addBuildingBlock
,
editBuildingBlock
,
delBuildingBlock
}
from
'@/api/legao/block'
import
{
getEntiretyists
}
from
'@/api/legao/kit'
import
{
reactive
,
toRefs
}
from
'vue'
;
const
{
windowSize
}
=
useTableHeight
(
'max-height'
)
...
...
@@ -165,12 +154,6 @@ function getList () {
})
}
function
getKitLists
()
{
getEntiretyists
().
then
(
res
=>
{
kitLists
.
value
=
res
?.
data
||
[]
})
}
// 搜索
function
btn_search
()
{
queryParams
.
value
.
pageNum
=
1
...
...
@@ -179,7 +162,6 @@ function btn_search () {
// 单条编辑
function
handleEdit
(
row
)
{
getKitLists
()
showForm
.
value
.
title
=
proxy
.
$t
(
'advertisement.dialogTitleEdit'
)
showForm
.
value
=
{
...
showForm
.
value
,
...
...
@@ -189,7 +171,6 @@ function handleEdit (row) {
}
function
btn_add
()
{
getKitLists
()
showForm
.
value
.
title
=
proxy
.
$t
(
'advertisement.dialogTitleAdd'
)
showForm
.
value
=
{
...
showForm
.
value
,
...
...
@@ -202,7 +183,6 @@ function handleDel(row) {
return
delBuildingBlock
(
row
.
id
);
}).
then
(()
=>
{
getList
();
proxy
.
$modal
.
msgSuccess
(
res
.
msg
);
}).
finally
(()
=>
{
});
...
...
src/views/legao/course/index.vue
View file @
b5235a6
...
...
@@ -41,7 +41,8 @@
>
<el-table-column
:label=
"$t('course.indexName')"
type=
"index"
width=
"80"
/>
<el-table-column
:label=
"$t('course.courseName')"
prop=
"name"
/>
<el-table-column
:label=
"$t('course.blockName')"
prop=
"buildingBlockName"
/>
<el-table-column
:label=
"$t('course.entiretyName')"
prop=
"entiretyName"
/>
<el-table-column
:label=
"$t('course.tableSortName')"
prop=
"sort"
/>
<el-table-column
:label=
"$t('course.buildName')"
prop=
"type"
/>
<el-table-column
:label=
"$t('course.caseName')"
prop=
"caseName"
/>
<el-table-column
:label=
"$t('course.packName')"
prop=
"canPack"
>
...
...
@@ -81,12 +82,12 @@
<el-form-item
:label=
"$t('course.dialogName')"
prop=
"name"
label-width=
"80"
>
<el-input
v-model=
"showForm.form.name"
placeholder=
"请输入课程名称"
/>
</el-form-item>
<el-form-item
:label=
"$t('course.dialog
Block')"
prop=
"buildingBlock
Id"
label-width=
"80"
>
<el-form-item
:label=
"$t('course.dialog
Entirety')"
prop=
"entirety
Id"
label-width=
"80"
>
<el-select-v2
v-model=
"showForm.form.
buildingBlock
Id"
:options=
"
block
Lists"
v-model=
"showForm.form.
entirety
Id"
:options=
"
entirety
Lists"
:props=
"props"
placeholder=
"请选择
系列
"
placeholder=
"请选择
套件
"
style=
"width: 180px;"
/>
</el-form-item>
...
...
@@ -164,7 +165,7 @@
import
{
useTableHeight
}
from
'@/hooks/useTableHeight'
// 导入api接口
import
{
getCourseList
,
addCourse
,
editCourse
,
delCourse
}
from
'@/api/legao/course'
import
{
get
BuildingBlockLists
}
from
'@/api/legao/block
'
import
{
get
Entiretyists
}
from
'@/api/legao/kit
'
import
{
reactive
,
toRefs
}
from
'vue'
;
const
{
windowSize
}
=
useTableHeight
(
'max-height'
)
...
...
@@ -189,7 +190,7 @@ const data = reactive({
},
total
:
0
,
list
:
[],
block
Lists
:
[],
entirety
Lists
:
[],
showForm
:
{
title
:
''
,
open
:
false
,
...
...
@@ -205,7 +206,7 @@ const data = reactive({
}
})
const
{
status
,
queryParams
,
total
,
list
,
showForm
,
rules
,
block
Lists
}
=
toRefs
(
data
)
const
{
status
,
queryParams
,
total
,
list
,
showForm
,
rules
,
entirety
Lists
}
=
toRefs
(
data
)
//#region 初始化
...
...
@@ -237,8 +238,8 @@ function getList () {
// 系列
function
getBlockLists
()
{
get
BuildingBlockL
ists
().
then
((
res
)
=>
{
block
Lists
.
value
=
res
.
data
get
Entirety
ists
().
then
((
res
)
=>
{
entirety
Lists
.
value
=
res
.
data
})
}
...
...
src/views/legao/kit/index.vue
View file @
b5235a6
...
...
@@ -27,15 +27,8 @@
>
<el-table-column
:label=
"$t('kit.indexName')"
type=
"index"
width=
"80"
/>
<el-table-column
:label=
"$t('kit.groupName')"
prop=
"name"
/>
<el-table-column
:label=
"$t('kit.buildingBlockName')"
prop=
"buildingBlockName"
/>
<el-table-column
:label=
"$t('kit.sortName')"
prop=
"sort"
/>
<el-table-column
:label=
"$t('kit.cateName')"
prop=
"type"
>
<template
#
default=
"
{ row }">
<dict-tag
:options=
"entirety_type"
:value=
"row.type"
></dict-tag>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('kit.tableControlsName')"
class-name=
"small-padding fixed-width"
>
<template
#
default=
"
{ row }">
<el-button
...
...
@@ -65,19 +58,21 @@
<el-form-item
:label=
"$t('kit.dialogName')"
prop=
"name"
label-width=
"80"
>
<el-input
v-model=
"showForm.form.name"
placeholder=
"请输入套件名称"
/>
</el-form-item>
<el-form-item
:label=
"$t('kit.dialog
Cate')"
prop=
"type
"
label-width=
"80"
>
<el-select
v-model=
"showForm.form.type"
placeholder=
"请选择类别"
clearable
>
<el-option
v-for=
"dict in entirety_type
"
:key=
"dict.value
"
:label=
"dict.label
"
:value=
"dict.value
"
<el-form-item
:label=
"$t('kit.dialog
Group')"
prop=
"buildingBlockId
"
label-width=
"80"
>
<el-select
-v2
v-model=
"showForm.form.buildingBlockId"
:options=
"kitLists
"
:props=
"props
"
placeholder=
"请选择系列
"
style=
"width: 180px;
"
/>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('kit.dialogSort')"
label-width=
"80"
>
<el-input-number
v-model=
"showForm.form.sort"
controls-position=
"right"
:min=
"0"
/>
</el-form-item>
<el-form-item
:label=
"$t('kit.dialogPhoto')"
prop=
"ossId"
label-width=
"80"
>
<imageUpload
v-model=
"showForm.form.ossId"
:fileType=
'["png", "jpg", "jpeg", "ico"]'
/>
</el-form-item>
</el-form>
<
template
#
footer
>
<div
class=
"dialog-footer"
>
...
...
@@ -93,10 +88,13 @@
<
script
setup
name=
"ruleManager"
>
import
{
useTableHeight
}
from
'@/hooks/useTableHeight'
// 导入api接口
import
{
getEntiretyist
,
addEntirety
,
editEntirety
,
delEntirety
}
from
'@/api/legao/kit'
import
{
getEntiretyist
,
addEntirety
,
editEntirety
,
delEntirety
,
getBuildingBlockLists
}
from
'@/api/legao/kit'
import
{
reactive
,
toRefs
}
from
'vue'
;
const
{
windowSize
}
=
useTableHeight
(
'max-height'
)
const
props
=
{
label
:
'name'
,
value
:
'id'
,
}
// 导入字典
const
{
proxy
}
=
getCurrentInstance
();
const
{
entirety_type
}
=
proxy
.
useDict
(
"entirety_type"
);
...
...
@@ -108,6 +106,7 @@ const data = reactive({
showForm
:
false
,
showCodePart
:
false
},
kitLists
:
[],
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
...
...
@@ -123,11 +122,11 @@ const data = reactive({
},
rules
:
{
name
:
[{
required
:
true
,
message
:
"套件名称不能为空"
,
trigger
:
"blur"
}],
type
:
[{
required
:
true
,
message
:
"类别
不能为空"
,
trigger
:
"blur"
}]
buildingBlockId
:
[{
required
:
true
,
message
:
"系列
不能为空"
,
trigger
:
"blur"
}]
}
})
const
{
status
,
queryParams
,
total
,
list
,
showForm
,
rules
}
=
toRefs
(
data
)
const
{
status
,
queryParams
,
total
,
list
,
showForm
,
rules
,
kitLists
}
=
toRefs
(
data
)
//#region 初始化
...
...
@@ -157,6 +156,7 @@ function btn_search () {
// 单条编辑
function
handleEdit
(
row
)
{
getKitLists
()
showForm
.
value
.
title
=
proxy
.
$t
(
'advertisement.dialogTitleEdit'
)
showForm
.
value
=
{
...
showForm
.
value
,
...
...
@@ -166,6 +166,7 @@ function handleEdit (row) {
}
function
btn_add
()
{
getKitLists
()
showForm
.
value
.
title
=
proxy
.
$t
(
'advertisement.dialogTitleAdd'
)
showForm
.
value
=
{
...
showForm
.
value
,
...
...
@@ -203,4 +204,10 @@ function closeDialog() {
form
:
{}
}
}
function
getKitLists
()
{
getBuildingBlockLists
().
then
(
res
=>
{
kitLists
.
value
=
res
?.
data
||
[]
})
}
</
script
>
...
...
src/views/legao/problem/index.vue
View file @
b5235a6
...
...
@@ -47,6 +47,8 @@
>
<el-table-column
:label=
"$t('problem.tableIndex')"
type=
"index"
width=
"80"
/>
<el-table-column
:label=
"$t('problem.tableAnsName')"
prop=
"title"
/>
<el-table-column
:label=
"$t('problem.tableBuildingBlockName')"
prop=
"buildingBlockName"
/>
<el-table-column
:label=
"$t('problem.tableSortName')"
prop=
"sort"
/>
<el-table-column
:label=
"$t('problem.tableShowName')"
prop=
"showStr"
/>
<el-table-column
:label=
"$t('problem.tableStateName')"
prop=
"status"
>
<template
#
default=
"
{ row }">
...
...
@@ -97,6 +99,15 @@
<el-form-item
:label=
"$t('problem.dialogName')"
prop=
"title"
label-width=
"80"
>
<el-input
v-model=
"showForm.form.title"
placeholder=
"请输入问题"
/>
</el-form-item>
<el-form-item
:label=
"$t('problem.dialogGroup')"
prop=
"buildingBlockId"
label-width=
"80"
>
<el-select-v2
v-model=
"showForm.form.buildingBlockId"
:options=
"kitLists"
:props=
"props"
placeholder=
"请选择系列"
style=
"width: 180px;"
/>
</el-form-item>
<el-form-item
:label=
"$t('problem.dialogPhote')"
label-width=
"80"
>
<imageUpload
v-model=
"showForm.form.coverOssId"
:limit=
"1"
:fileType=
'["png", "jpg", "jpeg", "ico"]'
/>
</el-form-item>
...
...
@@ -133,9 +144,13 @@
import
{
useTableHeight
}
from
'@/hooks/useTableHeight'
// 导入api接口
import
{
getQuestionList
,
updateStatus
,
addQuestion
,
editQuestion
,
delQuestion
}
from
'@/api/legao/problem'
import
{
getBuildingBlockLists
}
from
'@/api/legao/kit'
import
{
reactive
,
toRefs
}
from
'vue'
;
const
{
windowSize
}
=
useTableHeight
(
'max-height'
)
const
props
=
{
label
:
'name'
,
value
:
'id'
,
}
// 导入字典
const
{
proxy
}
=
getCurrentInstance
();
const
{
advert_state
}
=
proxy
.
useDict
(
"advert_state"
);
...
...
@@ -148,6 +163,7 @@ const data = reactive({
showForm
:
false
,
showCodePart
:
false
},
kitLists
:
[],
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
...
...
@@ -168,7 +184,7 @@ const data = reactive({
const
tableRefs
=
ref
(
null
)
const
{
status
,
queryParams
,
total
,
list
,
showForm
,
rules
}
=
toRefs
(
data
)
const
{
status
,
queryParams
,
total
,
list
,
showForm
,
rules
,
kitLists
}
=
toRefs
(
data
)
//#region 初始化
...
...
@@ -198,6 +214,7 @@ function btn_search () {
// 单条编辑
function
handleEdit
(
row
)
{
getKitLists
()
showForm
.
value
.
title
=
proxy
.
$t
(
'advertisement.dialogTitleEdit'
)
showForm
.
value
=
{
...
showForm
.
value
,
...
...
@@ -207,6 +224,7 @@ function handleEdit (row) {
}
function
btn_add
()
{
getKitLists
()
showForm
.
value
.
title
=
proxy
.
$t
(
'advertisement.dialogTitleAdd'
)
showForm
.
value
.
open
=
true
showForm
.
value
.
form
=
{
...
...
@@ -258,4 +276,10 @@ function closeDialog() {
form
:
{}
}
}
function
getKitLists
()
{
getBuildingBlockLists
().
then
(
res
=>
{
kitLists
.
value
=
res
?.
data
||
[]
})
}
</
script
>
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment