Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
corporate-culture-qd
Overview
Overview
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
王立鹏
corporate-culture-qd
Commits
a4df63ff
Commit
a4df63ff
authored
Sep 23, 2026
by
lijiabin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【需求 25171】 feat: 新增后台案例库删除功能
parent
f5a5dc76
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
22 deletions
+16
-22
index.vue
src/views/backend/caseManage/index.vue
+16
-22
No files found.
src/views/backend/caseManage/index.vue
View file @
a4df63ff
...
@@ -47,8 +47,6 @@
...
@@ -47,8 +47,6 @@
<el-icon><IEpDownload
/></el-icon>
下载导入模板
</el-button
<el-icon><IEpDownload
/></el-icon>
下载导入模板
</el-button
>
>
<ImportExcelBtn
:api=
"importCaseExcel"
@
success=
"refresh"
@
error=
"handleError"
/>
<ImportExcelBtn
:api=
"importCaseExcel"
@
success=
"refresh"
@
error=
"handleError"
/>
<el-button
type=
"primary"
@
click=
"handleBatchPublish"
>
批量发布/隐藏
</el-button>
<el-button
type=
"danger"
@
click=
"handleBatchDelete"
>
批量删除
</el-button>
</div>
</div>
<!-- 表格区域 -->
<!-- 表格区域 -->
...
@@ -248,10 +246,10 @@
...
@@ -248,10 +246,10 @@
</el-select>
</el-select>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"操作"
width=
"1
0
0"
fixed=
"right"
>
<el-table-column
label=
"操作"
width=
"1
3
0"
fixed=
"right"
>
<
template
#
default=
"{ row }"
>
<
template
#
default=
"{ row }"
>
<el-button
type=
"primary"
link
@
click=
"handleEdit(row)"
>
编辑
</el-button>
<el-button
type=
"primary"
link
@
click=
"handleEdit(row)"
>
编辑
</el-button>
<
!--
<el-button
type=
"danger"
link
@
click=
"handleDelete(row)"
>
删除
</el-button>
--
>
<
el-button
type=
"danger"
link
@
click=
"handleDelete(row)"
>
删除
</el-button
>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -280,11 +278,10 @@
...
@@ -280,11 +278,10 @@
import
{
usePageSearch
}
from
'@/hooks'
import
{
usePageSearch
}
from
'@/hooks'
import
{
import
{
getCaseList
,
getCaseList
,
deleteColumn
,
hideColumn
,
changeUsageStatus
,
changeUsageStatus
,
auditCase
,
auditCase
,
importCaseExcel
,
importCaseExcel
,
deleteCase
,
}
from
'@/api/backend'
}
from
'@/api/backend'
import
type
{
BackendCaseListItemDto
}
from
'@/api/backend'
import
type
{
BackendCaseListItemDto
}
from
'@/api/backend'
import
{
import
{
...
@@ -332,22 +329,6 @@ const handleSelectionChange = (selection: BackendCaseListItemDto[]) => {
...
@@ -332,22 +329,6 @@ const handleSelectionChange = (selection: BackendCaseListItemDto[]) => {
selectedRows
.
value
=
selection
selectedRows
.
value
=
selection
}
}
// 批量发布/隐藏
const
handleBatchPublish
=
async
()
=>
{
await
hideColumn
(
selectedRows
.
value
.
map
((
item
)
=>
item
.
id
))
refresh
()
selectedRows
.
value
=
[]
push
.
success
(
'发布/隐藏成功'
)
}
// 批量删除
const
handleBatchDelete
=
async
()
=>
{
await
deleteColumn
(
selectedRows
.
value
.
map
((
item
)
=>
item
.
id
))
refresh
()
selectedRows
.
value
=
[]
push
.
success
(
'删除成功'
)
}
const
handleContent
=
(
row
:
BackendCaseListItemDto
)
=>
{
const
handleContent
=
(
row
:
BackendCaseListItemDto
)
=>
{
ElMessageBox
.
alert
(
row
.
content
,
'案例全部文本内容'
,
{
ElMessageBox
.
alert
(
row
.
content
,
'案例全部文本内容'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
...
@@ -383,6 +364,19 @@ const handleError = (list: BackendCaseListItemDto[]) => {
...
@@ -383,6 +364,19 @@ const handleError = (list: BackendCaseListItemDto[]) => {
errorList
.
value
=
list
errorList
.
value
=
list
}
}
const
handleDelete
=
async
(
row
:
BackendCaseListItemDto
)
=>
{
await
confirm
({
title
:
'提示'
,
message
:
'确定要删除该案例吗?'
,
confirmText
:
'确定'
,
cancelText
:
'取消'
,
type
:
'danger'
,
})
await
deleteCase
(
row
.
id
)
push
.
success
(
'删除案例库成功'
)
refresh
()
}
const
downloadImportTemplate
=
()
=>
{
const
downloadImportTemplate
=
()
=>
{
window
.
open
(
window
.
open
(
'https://soundasia.oss-cn-shenzhen.aliyuncs.com/OA/readName/xlsx/2026/03/11/Common/1773219970707.xlsx'
,
'https://soundasia.oss-cn-shenzhen.aliyuncs.com/OA/readName/xlsx/2026/03/11/Common/1773219970707.xlsx'
,
...
...
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