From 6933522e3f1ffe8f8b1b7e169e2c54a7d24f0443 Mon Sep 17 00:00:00 2001 From: zxl <763096477@qq.com> Date: 星期二, 02 九月 2025 14:55:50 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev --- manager/src/views/health/HealthVideoList.vue | 91 ++++++++++++++++++++++++++++++++++++++------- 1 files changed, 77 insertions(+), 14 deletions(-) diff --git a/manager/src/views/health/HealthVideoList.vue b/manager/src/views/health/HealthVideoList.vue index 97aa47d..9402815 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" @@ -283,8 +285,30 @@ <Button type="success" size="small" style="margin-right: 5px" @click="deleteHealthVideo(row)">鍒犻櫎 </Button> + <Button type="error" size="small" style="margin-right: 5px" v-if="row.status === '1'" + @click="generalQrCode(row)">鐢熸垚浜岀淮鐮� + </Button> + </template> </Table> + <Modal + v-model="showGeneralQrCode" + title="浜岀淮鐮�" + width="800" + :mask-closable="false" + > + <vue-qr + :text="QRCodeUrl" + :margin="0" + colorDark="#000" + colorLight="#fff" + :size="150" + ></vue-qr> + <div slot="footer"> + <Button type="text" @click="closeGeneralQrCode">鍏抽棴</Button> + <!-- <Button type="primary" @click="generalQrCode">纭</Button>--> + </div> + </Modal> <Row type="flex" justify="end" class="mt_10"> <Page @@ -312,12 +336,18 @@ import Editor from '@/components/editor/index.vue' import COS from 'cos-js-sdk-v5'; import {getFileKey} from "@/utils/file.js"; +import vueQr from "vue-qr"; export default { name: "VideoList", - components: {Editor}, + components: {Editor,"vue-qr": vueQr}, data() { return { + showGeneralQrCode:false, + codeUrl: this.QRcodeBaseUrl+ '/scanpage/health', + QRCodeUrl:'', + + videoDownForm: { id: '', reason: '' @@ -424,18 +454,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", @@ -519,6 +549,22 @@ this.getTags('') }, methods: { + closeGeneralQrCode(){ + this.showGeneralQrCode = false; + + }, + generalQrCode(row){ + this.QRCodeUrl = ''; + this.showGeneralQrCode = true; + console.log('-------------------->',row); + //shareType鍙兘浼氭槸鍔ㄦ�佺殑锛屼細鍔犲垽鏂棰戞潵婧� + + + this.QRCodeUrl = this.codeUrl + '?shareType=health' + '&videoId='+ row.id + '&source=' + 'system'; + //TODO 鏍规嵁瑙嗛淇℃伅涓殑 锛屼綔鑰卛d鑾峰緱鐢ㄦ埛 鍒ゆ柇 鏉ユ簮 锛岀敤鎴蜂綔鑰呯殑uniid涓簄ull鍒欐槸绯荤粺涓婁紶锛屼笉涓虹┖鍒欐槸鐢ㄦ埛涓婁紶; + + // console.log(this.QRCodeUrl) + }, // 绉掕浆x鍒唜绉� formatSeconds(seconds) { if (isNaN(seconds) || seconds < 0) return '0绉�'; @@ -660,6 +706,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 +722,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