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
830f61f7
authored
2026-01-13 18:00:43 +0800
by
chentao
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
no message
1 parent
069379e4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
118 additions
and
9 deletions
src/api/legao/kit.js
src/views/legao/course/index.vue
src/views/legao/kit/index.vue
src/api/legao/kit.js
View file @
830f61f
...
...
@@ -49,3 +49,35 @@ export function delEntirety(id) {
method
:
'DELETE'
,
})
}
// 显示
export
function
displayEntirety
(
id
)
{
return
request
({
url
:
`/core/entirety/display/
${
id
}
`
,
method
:
'put'
,
})
}
// 批量显示
export
function
batchDisplayEntirety
(
ids
)
{
return
request
({
url
:
`/core/entirety/batch/display/
${
ids
}
`
,
method
:
'put'
,
})
}
// 隐藏
export
function
hideEntirety
(
id
)
{
return
request
({
url
:
`/core/entirety/hide/
${
id
}
`
,
method
:
'put'
,
})
}
// 批量隐藏
export
function
batchHideEntirety
(
ids
)
{
return
request
({
url
:
`/core/entirety/batch/hide/
${
ids
}
`
,
method
:
'put'
,
})
}
...
...
src/views/legao/course/index.vue
View file @
830f61f
...
...
@@ -15,10 +15,10 @@
/>
</el-form-item>
<el-form-item
label=
""
>
<el-button
type=
"
primary"
icon=
"Plus"
:disabled=
"multiple"
@
click=
"handleBatchDisplay"
>
批量显示
</el-button>
<el-button
type=
"
success"
icon=
"Edit"
:disabled=
"multiple"
@
click=
"handleBatchHide"
>
批量隐藏
</el-button>
</el-form-item>
<el-form-item
label=
""
>
<el-button
type=
"
success"
icon=
"Edit"
:disabled=
"multiple"
@
click=
"handleBatchHide"
>
批量隐藏
</el-button>
<el-button
type=
"
primary"
icon=
"Plus"
:disabled=
"multiple"
@
click=
"handleBatchDisplay"
>
批量显示
</el-button>
</el-form-item>
<el-form-item
label=
""
>
<el-button
type=
"primary"
icon=
"Search"
@
click=
"btn_search"
>
查询
</el-button>
...
...
@@ -80,12 +80,14 @@
link
type=
"text"
@
click=
"handleDisplay(row)"
:style=
"
{ color:'#00FF00' }"
v-if="!row.visible"
>
{{
$t
(
'course.controlsDisplayName'
)
}}
</el-button>
<el-button
link
type=
"text"
@
click=
"handleHide(row)"
:style=
"
{ color:'#FF0000' }"
v-if="row.visible"
>
{{
$t
(
'course.controlsHideName'
)
}}
</el-button>
</
template
>
...
...
@@ -344,7 +346,7 @@ function handleDisplay(row) {
function
handleBatchDisplay
(
row
)
{
const
courseIds
=
row
.
id
||
ids
.
value
;
proxy
.
$modal
.
confirm
(
`
确认显示这些课程
吗?`
).
then
(()
=>
{
proxy
.
$modal
.
confirm
(
`
您已选择`
+
courseIds
.
length
+
`项内容,确认执行批量显示操作
吗?`
).
then
(()
=>
{
return
batchDisplayCourse
(
courseIds
);
}).
then
(()
=>
{
getList
();
...
...
@@ -367,7 +369,7 @@ function handleHide(row) {
function
handleBatchHide
(
row
)
{
const
courseIds
=
row
.
id
||
ids
.
value
;
proxy
.
$modal
.
confirm
(
`
确认隐藏这些课程吗?隐藏后APP端将不可见。
`
).
then
(()
=>
{
proxy
.
$modal
.
confirm
(
`
您已选择`
+
courseIds
.
length
+
`项内容,确认执行批量隐藏操作吗?
`
).
then
(()
=>
{
return
batchHideCourse
(
courseIds
);
}).
then
(()
=>
{
getList
();
...
...
src/views/legao/kit/index.vue
View file @
830f61f
...
...
@@ -6,6 +6,12 @@
<!-- 列表操作 -->
<el-row
:gutter=
"10"
class=
"mb8"
justify=
"end"
>
<el-col
:span=
"1.5"
>
<el-button
type=
"success"
icon=
"Edit"
:disabled=
"multiple"
@
click=
"handleBatchHide"
>
批量隐藏
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"primary"
icon=
"Plus"
:disabled=
"multiple"
@
click=
"handleBatchDisplay"
>
批量显示
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"primary"
plain
...
...
@@ -24,12 +30,16 @@
:header-cell-style=
"
{textAlign:'center'}"
:cell-style="{textAlign:'center'}"
border
@selection-change="handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"50"
align=
"center"
/>
<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.visibleName')"
prop=
"
isVisible
"
/>
<el-table-column
:label=
"$t('kit.visibleName')"
prop=
"
display
"
/>
<el-table-column
:label=
"$t('kit.tableControlsName')"
class-name=
"small-padding fixed-width"
>
<template
#
default=
"
{ row }">
<el-button
...
...
@@ -45,8 +55,17 @@
<el-button
link
type=
"text"
@
click=
"handleEdit(row)"
>
{{
$t
(
'kit.controlsVisibleName'
)
}}
</el-button>
@
click=
"handleDisplay(row)"
:style=
"
{ color:'#00FF00' }"
v-if="!row.visible"
>
{{
$t
(
'kit.controlsDisplayName'
)
}}
</el-button>
<el-button
link
type=
"text"
@
click=
"handleHide(row)"
:style=
"
{ color:'#FF0000' }"
v-if="row.visible"
>
{{
$t
(
'kit.controlsHideName'
)
}}
</el-button>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -94,7 +113,7 @@
<
script
setup
name=
"ruleManager"
>
import
{
useTableHeight
}
from
'@/hooks/useTableHeight'
// 导入api接口
import
{
getEntiretyist
,
addEntirety
,
editEntirety
,
delEntirety
,
getBuildingBlockLists
}
from
'@/api/legao/kit'
import
{
getEntiretyist
,
addEntirety
,
editEntirety
,
delEntirety
,
getBuildingBlockLists
,
displayEntirety
,
batchDisplayEntirety
,
hideEntirety
,
batchHideEntirety
}
from
'@/api/legao/kit'
import
{
reactive
,
toRefs
}
from
'vue'
;
const
{
windowSize
}
=
useTableHeight
(
'max-height'
)
const
props
=
{
...
...
@@ -131,7 +150,9 @@ const data = reactive({
buildingBlockId
:
[{
required
:
true
,
message
:
"系列不能为空"
,
trigger
:
"blur"
}]
}
})
const
ids
=
ref
([]);
const
single
=
ref
(
true
);
const
multiple
=
ref
(
true
);
const
{
status
,
queryParams
,
total
,
list
,
showForm
,
rules
,
kitLists
}
=
toRefs
(
data
)
...
...
@@ -216,4 +237,58 @@ function getKitLists() {
kitLists
.
value
=
res
?.
data
||
[]
})
}
/** 选择条数 */
function
handleSelectionChange
(
selection
)
{
ids
.
value
=
selection
.
map
(
item
=>
item
.
id
);
single
.
value
=
selection
.
length
!=
1
;
multiple
.
value
=
!
selection
.
length
;
}
function
handleDisplay
(
row
)
{
proxy
.
$modal
.
confirm
(
`确认显示该套件吗?`
).
then
(()
=>
{
return
displayEntirety
(
row
.
id
);
}).
then
(()
=>
{
getList
();
proxy
.
$modal
.
msgSuccess
(
res
.
msg
);
}).
finally
(()
=>
{
});
}
function
handleBatchDisplay
(
row
)
{
const
entiretyIds
=
row
.
id
||
ids
.
value
;
proxy
.
$modal
.
confirm
(
`您已选择`
+
entiretyIds
.
length
+
`项内容,确认执行批量显示操作吗?`
).
then
(()
=>
{
return
batchDisplayEntirety
(
entiretyIds
);
}).
then
(()
=>
{
getList
();
proxy
.
$modal
.
msgSuccess
(
res
.
msg
);
}).
finally
(()
=>
{
});
}
function
handleHide
(
row
)
{
proxy
.
$modal
.
confirm
(
`确认隐藏该套件吗?隐藏后APP端将不可见。`
).
then
(()
=>
{
return
hideEntirety
(
row
.
id
);
}).
then
(()
=>
{
getList
();
proxy
.
$modal
.
msgSuccess
(
res
.
msg
);
}).
finally
(()
=>
{
});
}
function
handleBatchHide
(
row
)
{
const
entiretyIds
=
row
.
id
||
ids
.
value
;
proxy
.
$modal
.
confirm
(
`您已选择`
+
entiretyIds
.
length
+
`项内容,确认执行批量隐藏操作吗?`
).
then
(()
=>
{
return
batchHideEntirety
(
entiretyIds
);
}).
then
(()
=>
{
getList
();
proxy
.
$modal
.
msgSuccess
(
res
.
msg
);
}).
finally
(()
=>
{
});
}
</
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