From b57c81c1da4ad71edf2073c21e7cebb38123b961 Mon Sep 17 00:00:00 2001
From: peng <peng.com>
Date: 星期一, 27 十月 2025 17:08:00 +0800
Subject: [PATCH] 页面调整

---
 manager/src/views/video/VideoList.vue |   58 +++++++++++++++++++++++++++++++++++++++++++++-------------
 1 files changed, 45 insertions(+), 13 deletions(-)

diff --git a/manager/src/views/video/VideoList.vue b/manager/src/views/video/VideoList.vue
index a25608f..8dce271 100644
--- a/manager/src/views/video/VideoList.vue
+++ b/manager/src/views/video/VideoList.vue
@@ -80,6 +80,11 @@
               </FormItem>
             </Col>
             <Col span="12">
+              <FormItem label="鏉冮噸:" :label-width="80">
+                <InputNumber v-model="uploadVideoForm.weight" :min="0" :step="0.1" placeholder="璇疯緭鍏ユ潈閲�"></InputNumber>
+              </FormItem>
+            </Col>
+            <Col span="12">
               <FormItem label="涓婁紶绫诲瀷:" :label-width="80" prpo="videoContentType">
                 <Select v-model="uploadVideoForm.videoContentType" style="width:200px">
                   <Option value="img">鍥剧墖</Option>
@@ -180,12 +185,6 @@
                 <Select v-model="chooseTag" filterable multiple allow-create @on-create="createVideoTag">
                   <Option v-for="item in videoTagList" :value="item.tagName" :key="item.id">{{ item.tagName }}</Option>
                 </Select>
-              </FormItem>
-            </Col>
-          </Row>
-          <Row :gutter="24">
-            <Col span="24">
-              <FormItem label="閫変腑鍟嗗搧" :label-width="80">
               </FormItem>
             </Col>
           </Row>
@@ -322,7 +321,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 +428,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 +569,8 @@
   publish,
   updatePublish,
   getCommentPage,
-  removeById
+  removeById,
+  deleteVideoById
 } from "@/api/video";
 import {getVideoTagList, recommend, videoGoodsEsPage} from "@/api/videoTag";
 import {addPrizeNum} from "@/api/activity-prize";
@@ -699,8 +702,8 @@
         showListImages: [],
         tags: [],
         fileInfo: {},
-        goodsList: []
-
+        goodsList: [],
+        weight: 0 // 娣诲姞鏉冮噸瀛楁锛岄粯璁ゅ�间负0
       },
       videoDownForm: {
         id: '',
@@ -987,7 +990,8 @@
         showListImages: [],
         tags: [],
         fileInfo: {},
-        goodsList: []
+        goodsList: [],
+        weight: 0 // 娣诲姞鏉冮噸瀛楁锛岄粯璁ゅ�间负0
       }
 
 
@@ -1006,7 +1010,12 @@
         });
       }
 
-      this.uploadVideoForm = row
+      // 淇濈暀鍘熸湁鐨剅ow鏁版嵁锛屼絾瑕佺‘淇漺eight瀛楁瀛樺湪
+      this.uploadVideoForm = Object.assign(this.uploadVideoForm, row);
+      // 纭繚weight瀛楁鏈夐粯璁ゅ��
+      if (this.uploadVideoForm.weight === undefined || this.uploadVideoForm.weight === null) {
+        this.uploadVideoForm.weight = 0;
+      }
       console.log("鎵撳嵃鍊�",this.uploadVideoForm)
       this.uploadVideoForm.fileInfo= {};
       this.uploadVideoForm.videoImgs = JSON.parse(this.uploadVideoForm.videoImgs)
@@ -1320,7 +1329,8 @@
         showListImages: [],
         tags: [],
         fileInfo: {},
-        goodsList: []
+        goodsList: [],
+        weight: 0 // 娣诲姞鏉冮噸瀛楁锛岄粯璁ゅ�间负0
       }
       recommend({
         searchType: "HOT"
@@ -1576,6 +1586,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