From e81eae6c8446bbd91c162b5ef3e42051b5523bf1 Mon Sep 17 00:00:00 2001
From: zxl <763096477@qq.com>
Date: 星期五, 11 七月 2025 09:39:56 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev

---
 manager/src/views/health/HealthVideoList.vue |   45 ++++++++++++++++++++++++++++++++-------------
 1 files changed, 32 insertions(+), 13 deletions(-)

diff --git a/manager/src/views/health/HealthVideoList.vue b/manager/src/views/health/HealthVideoList.vue
index 97aa47d..1ec0739 100644
--- a/manager/src/views/health/HealthVideoList.vue
+++ b/manager/src/views/health/HealthVideoList.vue
@@ -19,7 +19,8 @@
             style="width: 160px"
           />
         </Form-item>
-        <Form-item label="鏍囩" prop="tagList">
+<!--      todo  鏆傛椂闅愯棌澶у仴搴蜂竴鏈熸病瀹氫箟鏍囩-->
+        <Form-item v-if="false" label="鏍囩" prop="tagList">
           <Select
             v-model="searchForm.tagList"
             clearable
@@ -111,6 +112,7 @@
               <FormItem label="瑙嗛">
                 <video style="width: 150px;height: 150px"
                        controls
+                       @loadedmetadata="getVideoDuration"
                        :poster="uploadVideoForm.showCoverUrl"
                        :autoplay="false"
                        id="remoteVideo" :src="uploadVideoForm.showVideoUrl"
@@ -424,18 +426,18 @@
           minWidth: 240,
           tooltip: true,
         },
-        {
-          title: "浣滆��",
-          key: "authorName",
-          width: 130,
-          tooltip: true,
-        },
-        {
-          title: "瑙嗛鏍囩",
-          key: "tagList",
-          width: 180,
-          slot: "tagList",
-        },
+        // {
+        //   title: "浣滆��",
+        //   key: "authorName",
+        //   width: 130,
+        //   tooltip: true,
+        // },
+        // {
+        //   title: "瑙嗛鏍囩",
+        //   key: "tagList",
+        //   width: 180,
+        //   slot: "tagList",
+        // },
         {
           title: "瑙嗛鍐呭",
           key: "videoFileKey",
@@ -660,6 +662,12 @@
       this.detail = {}
       this.auditingShow = false
     },
+    calculateVideoFit(width, height) {
+      const videoRatio = width / height;
+      // 瑙勫垯2锛氱珫灞忚棰戯紙濡�9:16锛�
+      if (videoRatio < 0.8) return 'cover';
+      return 'contain';
+    },
     // 鎵撳紑瀹℃牳寮圭獥
     openAuditing(row) {
       this.auditingShow = true
@@ -670,6 +678,17 @@
         this.auditingLoading = false
       })
     },
+    getVideoDuration(e){
+      const duration = this.$refs.healthVideoInfo.duration;
+      const videoWidth = this.$refs.healthVideoInfo.videoWidth;
+      const videoHeight = this.$refs.healthVideoInfo.videoHeight;
+      // 鏍规嵁瀹介珮姣旈�夋嫨瑙嗛濉厖妯″紡
+     const fitType = this.calculateVideoFit(videoWidth, videoHeight)
+      this.uploadVideoForm.videoFit = fitType
+      console.log('------瑙嗛淇℃伅3------------>', videoWidth,videoHeight,fitType)
+
+      this.uploadVideoForm.videoDuration = Math.floor(duration);
+    },
     // 鎵撳紑缂栬緫寮圭獥
     deleteHealthVideo(row) {
       console.log('鍒犻櫎娴嬭瘯', row)

--
Gitblit v1.8.0