From b7384d2d201b2e36427bbece8c3ab6294b97b6bd Mon Sep 17 00:00:00 2001
From: peng <peng.com>
Date: 星期一, 27 十月 2025 16:43:16 +0800
Subject: [PATCH] 删除视频

---
 manager/src/views/video/VideoList.vue |   36 ++++++++++++++++++++++++++++--------
 1 files changed, 28 insertions(+), 8 deletions(-)

diff --git a/manager/src/views/video/VideoList.vue b/manager/src/views/video/VideoList.vue
index a25608f..603ef19 100644
--- a/manager/src/views/video/VideoList.vue
+++ b/manager/src/views/video/VideoList.vue
@@ -184,12 +184,6 @@
             </Col>
           </Row>
           <Row :gutter="24">
-            <Col span="24">
-              <FormItem label="閫変腑鍟嗗搧" :label-width="80">
-              </FormItem>
-            </Col>
-          </Row>
-          <Row :gutter="24">
             <Col span="12">
               <FormItem label="鍟嗗搧鍒楄〃" :label-width="80">
                 <Input v-model="searchGoodsForm.keyword" style="width:200px" @on-change="searchGoodsList"></Input>
@@ -322,7 +316,6 @@
                 </Row>
               </Col>
             </Row>
-
           </Form-item>
           <Form-item v-if="detail.videoContentType === 'img'" :label-width="0">
             <div style="display: flex;flex-direction: row;flex-wrap: wrap">
@@ -430,6 +423,10 @@
           </Button>
           <Button type="success" size="small" style="margin-right: 5px" v-else-if="row.status === '0'"
                   @click="videoUp(row)">涓婃灦
+          </Button>
+          <!-- 娣诲姞鍒犻櫎鎸夐挳 -->
+          <Button type="error" size="small" style="margin-right: 5px" v-if="row.status === '0'"
+                  @click="deleteVideo(row)">鍒犻櫎
           </Button>
           <Button type="error" size="small" style="margin-right: 5px"
                   @click="openComment(row)">
@@ -567,7 +564,8 @@
   publish,
   updatePublish,
   getCommentPage,
-  removeById
+  removeById,
+  deleteVideoById
 } from "@/api/video";
 import {getVideoTagList, recommend, videoGoodsEsPage} from "@/api/videoTag";
 import {addPrizeNum} from "@/api/activity-prize";
@@ -1576,6 +1574,28 @@
       this.searchGoodsForm.pageSize = v;
       this.getGoodsDataList();
     },
+    // 娣诲姞鍒犻櫎瑙嗛鏂规硶
+    deleteVideo(row) {
+      this.$Modal.confirm({
+        title: "鎿嶄綔纭",
+        content: "鎮ㄧ‘璁よ鍒犻櫎瑙嗛銆� " + row.title + "銆戝悧? 鍒犻櫎鍚庡皢鏃犳硶鎭㈠!",
+        loading: true,
+        onOk: () => {
+          deleteVideoById(row.id).then(res => {
+            this.$Modal.remove();
+            if (res.code === 200) {
+              this.$Message.success("瑙嗛鍒犻櫎鎴愬姛");
+              this.getDataList();
+            } else {
+              this.$Message.error(res.msg || "鍒犻櫎澶辫触");
+            }
+          }).catch(err => {
+            this.$Modal.remove();
+            this.$Message.error("鍒犻櫎澶辫触");
+          });
+        }
+      });
+    },
   }
 }
 </script>

--
Gitblit v1.8.0