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
a10a140e
authored
2026-01-13 11:47:43 +0800
by
chentao
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
新增隐藏属性
1 parent
f1595d83
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
78 additions
and
5 deletions
src/api/legao/course.js
src/lang/package/zh-cn.js
src/views/legao/course/index.vue
src/views/legao/kit/index.vue
src/api/legao/course.js
View file @
a10a140
...
...
@@ -34,3 +34,19 @@ export function delCourse(id) {
method
:
'DELETE'
,
})
}
// 显示
export
function
displayCourse
(
id
)
{
return
request
({
url
:
`/core/course/display/
${
id
}
`
,
method
:
'put'
,
})
}
// 隐藏
export
function
hideCourse
(
id
)
{
return
request
({
url
:
`/core/course/hide/
${
id
}
`
,
method
:
'put'
,
})
}
...
...
src/lang/package/zh-cn.js
View file @
a10a140
...
...
@@ -43,9 +43,13 @@ export default {
sortName
:
'排序'
,
unitName
:
'单元类别'
,
dialogGroup
:
'系列'
,
visibleName
:
'状态'
,
tableControlsName
:
'操作'
,
controlsDelName
:
'删除'
,
controlsEditName
:
'编辑'
,
controlsDelName
:
'删除'
,
controlsDisplayName
:
'显示'
,
controlsHideName
:
'隐藏'
,
// 新增
dialogTitleAdd
:
'新增'
,
dialogTitleEdit
:
'修改'
,
...
...
@@ -90,10 +94,13 @@ export default {
buildName
:
'搭建'
,
caseName
:
'有无案例'
,
packName
:
'是否打包'
,
visibleName
:
'状态'
,
tableSortName
:
'排序'
,
tableControlsName
:
'操作'
,
controlsDelName
:
'删除'
,
controlsEditName
:
'编辑'
,
controlsDelName
:
'删除'
,
controlsDisplayName
:
'显示'
,
controlsHideName
:
'隐藏'
,
controlsAddName
:
'新增课程'
,
placeholder
:
'课程、套件、系列名称搜索'
,
// 新增
...
...
src/views/legao/course/index.vue
View file @
a10a140
...
...
@@ -15,6 +15,12 @@
/>
</el-form-item>
<el-form-item
label=
""
>
<el-button
type=
"success"
icon=
"Edit"
:disabled=
"multiple"
@
click=
"handleBatchDisplay"
>
批量显示
</el-button>
</el-form-item>
<el-form-item
label=
""
>
<el-button
type=
"success"
icon=
"Edit"
:disabled=
"multiple"
@
click=
"handleBatchHide"
>
批量隐藏
</el-button>
</el-form-item>
<el-form-item
label=
""
>
<el-button
type=
"primary"
icon=
"Search"
@
click=
"btn_search"
>
查询
</el-button>
</el-form-item>
</el-form>
...
...
@@ -39,6 +45,9 @@
:cell-style="{textAlign:'center'}"
border
>
<el-table-column
type=
"selection"
width=
"50"
align=
"center"
/>
<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.entiretyName')"
prop=
"entiretyName"
/>
...
...
@@ -53,18 +62,31 @@
></dict-tag>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('course.visibleName')"
prop=
"isVisible"
/>
<el-table-column
:label=
"$t('course.tableControlsName')"
class-name=
"small-padding fixed-width"
>
<
template
#
default=
"{ row }"
>
<el-button
link
type=
"text"
@
click=
"handleEdit(row)"
>
{{
$t
(
'course.controlsEditName'
)
}}
</el-button>
<el-button
link
type=
"text"
@
click=
"handleDel(row)"
>
{{
$t
(
'course.controlsDelName'
)
}}
</el-button>
<el-button
link
type=
"text"
@
click=
"handleEdit(row)"
>
{{
$t
(
'course.controlsEditName'
)
}}
</el-button>
@
click=
"handleDisplay(row)"
v-if=
"row.isVisible === 0"
>
{{
$t
(
'course.controlsDisplayName'
)
}}
</el-button>
<el-button
link
type=
"text"
@
click=
"handleHide(row)"
v-if=
"row.isVisible === 1"
>
{{
$t
(
'course.controlsHideName'
)
}}
</el-button>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -174,7 +196,7 @@
<
script
setup
name=
"ruleManager"
>
import
{
useTableHeight
}
from
'@/hooks/useTableHeight'
// 导入api接口
import
{
getCourseList
,
addCourse
,
editCourse
,
delCourse
}
from
'@/api/legao/course'
import
{
getCourseList
,
addCourse
,
editCourse
,
delCourse
,
displayCourse
,
hideCourse
}
from
'@/api/legao/course'
import
{
getEntiretyists
}
from
'@/api/legao/kit'
import
{
reactive
,
toRefs
}
from
'vue'
;
const
{
windowSize
}
=
useTableHeight
(
'max-height'
)
...
...
@@ -299,6 +321,28 @@ function handleDel(row) {
});
}
function
handleDisplay
(
row
)
{
proxy
.
$modal
.
confirm
(
`确认显示该课程吗?`
).
then
(()
=>
{
return
displayCourse
(
row
.
id
);
}).
then
(()
=>
{
getList
();
proxy
.
$modal
.
msgSuccess
(
res
.
msg
);
}).
finally
(()
=>
{
});
}
function
handleHide
(
row
)
{
proxy
.
$modal
.
confirm
(
`确认隐藏该课程吗?隐藏后APP端将不可见。`
).
then
(()
=>
{
return
hideCourse
(
row
.
id
);
}).
then
(()
=>
{
getList
();
proxy
.
$modal
.
msgSuccess
(
res
.
msg
);
}).
finally
(()
=>
{
});
}
function
submitForm
(
type
)
{
const
data
=
{
...
showForm
.
value
.
form
,
...
...
src/views/legao/kit/index.vue
View file @
a10a140
...
...
@@ -29,6 +29,7 @@
<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.visibleName')"
prop=
"isVisible"
/>
<el-table-column
:label=
"$t('kit.tableControlsName')"
class-name=
"small-padding fixed-width"
>
<template
#
default=
"
{ row }">
<el-button
...
...
@@ -41,6 +42,11 @@
type=
"text"
@
click=
"handleEdit(row)"
>
{{
$t
(
'kit.controlsEditName'
)
}}
</el-button>
<el-button
link
type=
"text"
@
click=
"handleEdit(row)"
>
{{
$t
(
'kit.controlsVisibleName'
)
}}
</el-button>
</
template
>
</el-table-column>
</el-table>
...
...
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