视频播放器的问题

devtools/2024/9/20 1:17:51/ 标签: 音视频, windows
<template><div class="app-container"><el-form :model="queryParam" ref="queryForm" :inline="true"><el-form-item label="题目ID:"><el-input v-model="queryParam.id" clearable></el-input></el-form-item><el-form-item label="题目内容:"><el-input v-model="queryParam.content" clearable></el-input></el-form-item><el-form-item label="年级:"><el-select v-model="queryParam.level" placeholder="年级" @change="levelChange" clearable><el-option v-for="item in levelEnum" :key="item.key" :value="item.key" :label="item.value"></el-option></el-select></el-form-item><el-form-item label="学科:"><el-select v-model="queryParam.subjectId" clearable><el-option v-for="item in subjectFilter" :key="item.id" :value="item.id":label="item.name + ' ( ' + item.levelName + ' )'"></el-option></el-select></el-form-item><el-form-item label="题型:"><el-select v-model="queryParam.questionType" clearable><el-option v-for="item in questionType" :key="item.key" :value="item.key" :label="item.value"></el-option></el-select></el-form-item><el-form-item><el-button plain type="primary" @click="submitForm">查询</el-button><el-popover placement="bottom" trigger="click"><el-button plain type="warning" size="mini" v-for="item in editUrlEnum" :key="item.key"@click="$router.push({ path: item.value })">{{ item.name }}</el-button><el-button plain slot="reference" type="primary" class="link-left">添加</el-button></el-popover></el-form-item></el-form><div class="content"><muiVideo :src="mySrc" :title="myTitle" :poster="myPoster" @mpVideo="mpVideo"><div class="topicModel" v-if="showTopic"><div class="topicModel-content"><span @click="clickMe">我是视频中的弹窗,点击我触发事件</span></div></div></muiVideo></div><el-table :header-cell-style="{ background: '#eef1f6', color: '#606266' }" v-loading="listLoading" :data="tableData"border fit highlight-current-row style="width: 100%"><el-table-column prop="id" label="Id" width="90px" /><el-table-column prop="subjectId" label="学科" :formatter="subjectFormatter" width="220px" /><el-table-column prop="questionType" label="题型" :formatter="questionTypeFormatter" width="70px" /><el-table-column prop="shortTitle" label="题干" show-overflow-tooltip /><el-table-column prop="score" label="分数" width="60px" /><el-table-column prop="difficult" label="难度" width="60px" /><el-table-column prop="createTime" label="创建时间" width="160px" /><el-table-column label="操作" align="center" width="220px"><template slot-scope="{row}"><el-button plain size="mini" @click="showQuestion(row)">预览</el-button><el-button plain size="mini" @click="editQuestion(row)">编辑</el-button><el-button plain size="mini" type="danger" @click="deleteQuestion(row)" class="link-left">删除</el-button></template></el-table-column></el-table><pagination v-show="total > 0" :total="total" :page.sync="queryParam.pageIndex" :limit.sync="queryParam.pageSize"@pagination="search" /><el-dialog :visible.sync="questionShow.dialog" style="width: 100%;height: 100%"><QuestionShow :qType="questionShow.qType" :question="questionShow.question" :qLoading="questionShow.loading" /></el-dialog></div>
</template><script>
import { mapGetters, mapState, mapActions } from 'vuex'
import Pagination from '@/components/Pagination'
import QuestionShow from './components/Show'
import questionApi from '@/api/question'
import muiVideo from '@/components/muiVideo'export default {components: { Pagination, QuestionShow, muiVideo },data() {return {queryParam: {id: null,questionType: null,level: null,subjectId: null,pageIndex: 1,pageSize: 10},subjectFilter: null,listLoading: true,tableData: [],total: 0,questionShow: {qType: 0,dialog: false,question: null,loading: false},mySrc: "./demo.mp4", 	   	  //播放路径myTitle: '测试', 	  //视频左上角标题myPoster: '', 	  //视频封面showTopic: false  //默认不展示弹题模态窗}},created() {this.initSubject()this.search()let _this = this;setTimeout(function () {      //模拟3秒后弹出模态窗,实际开发中应该是随机时间弹出_this.showTopic = true;	 //展示答题模态窗setTimeout(function () { 	 //弹出模态窗后做一个延迟效果,暂停播放_video.pause();}, 500)}, 3000)},methods: {clickMe() {console.log("点到我了");this.showTopic = false; //关闭答题模态窗},mpVideo(video) {_video = video; 	     //吐出Video原生媒体实例,其他特殊功能可以使用Video来添加原生事件,例如禁用滚动条、禁用快进快退功能等等},submitForm() {this.queryParam.pageIndex = 1this.search()},search() {this.listLoading = truequestionApi.pageList(this.queryParam).then(data => {const re = data.responsethis.tableData = re.listthis.total = re.totalthis.queryParam.pageIndex = re.pageNumthis.listLoading = false})},levelChange() {this.queryParam.subjectId = nullthis.subjectFilter = this.subjects.filter(data => data.level === this.queryParam.level)},addQuestion() {this.$router.push('/exam/question/edit/singleChoice')},showQuestion(row) {let _this = thisthis.questionShow.dialog = truethis.questionShow.loading = truequestionApi.select(row.id).then(re => {_this.questionShow.qType = re.response.questionType_this.questionShow.question = re.response_this.questionShow.loading = false})},editQuestion(row) {let url = this.enumFormat(this.editUrlEnum, row.questionType)this.$router.push({ path: url, query: { id: row.id } })},deleteQuestion(row) {let _this = thisquestionApi.deleteQuestion(row.id).then(re => {if (re.code === 1) {_this.search()_this.$message.success(re.message)} else {_this.$message.error(re.message)}})},questionTypeFormatter(row, column, cellValue, index) {return this.enumFormat(this.questionType, cellValue)},subjectFormatter(row, column, cellValue, index) {return this.subjectEnumFormat(cellValue)},...mapActions('exam', { initSubject: 'initSubject' })},computed: {...mapGetters('enumItem', ['enumFormat']),...mapState('enumItem', {questionType: state => state.exam.question.typeEnum,editUrlEnum: state => state.exam.question.editUrlEnum,levelEnum: state => state.user.levelEnum}),...mapGetters('exam', ['subjectEnumFormat']),...mapState('exam', { subjects: state => state.subjects })}
}
</script>
<style lang="scss">
.content {width: 500px;height: 300px;margin: 300px auto;
}@keyframes fadeIn {0% {opacity: 0;transform: scale(1.2);}100% {opacity: 1;transform: scale(1);}
}.topicModel {padding: 0 10px;width: 100%;height: 100%;position: absolute;top: 0;left: 0;z-index: 9999;background-color: rgba(0, 0, 0, 0.3);display: flex;justify-content: center;align-items: center;animation: fadeIn 0.4s;&-content {width: 60%;height: 60%;background-color: #FFFFFF;}
}
</style>

在这里插入图片描述


http://www.ppmy.cn/devtools/59449.html

相关文章

安全面试经验分享 | 某安全厂商北京安服工程师实习岗

所面试的公司&#xff1a;某安全厂商 所在城市&#xff1a;北京 面试职位&#xff1a;安服工程师实习岗 面试过程&#xff1a; 腾讯会议&#xff08;视频&#xff09; 面试过程&#xff1a;整体流程就是自我介绍加上一些问题问题balabalabala。。。由于面的岗位是安服工程师…

UNiapp微信小程序Ucharts

效果图如下 以上为加载接口所得数据的玫瑰图与折线图 具体步骤如下 1&#xff0c;将插件导入Hbuiler 所需要的项目中&#xff08;插件地址&#xff1a;秋云 ucharts echarts 高性能跨全端图表组件 - DCloud 插件市场&#xff09; 2&#xff0c;导入成功是这样的 3&#xff0c…

Dataset for Stable Diffusion

1.Dataset for Stable Diffusion 笔记来源&#xff1a; 1.Flickr8k数据集处理 2.处理Flickr8k数据集 3.Github&#xff1a;pytorch-stable-diffusion 4.Flickr 8k Dataset 5.dataset_flickr8k.json 6.About Train, Validation and Test Sets in Machine Learning Tarang Shah …

简谈设计模式之桥接模式

桥接模式是一种结构型设计模式, 它将抽象部分和它的实现部分分离, 使它们可以独立变化. 这意味着可以改变它的抽象和它的实现, 而不会相互影响 桥接模式结构 抽象 (Abstraction): 定义抽象类, 并包含一个对实现类对象的引用拓展抽象 (Refined Abstraction): 拓展抽象类, 通过…

堆、栈和队列(数据结构)

堆、栈和队列&#xff08;数据结构&#xff09; 这里写目录标题 堆、栈和队列&#xff08;数据结构&#xff09;**栈****队列**堆&#xff08;Heap&#xff09;&#xff08;&#xff09;队列&#xff08;Queue&#xff09;&#xff08;FIFO&#xff09;栈&#xff08;Stack&…

搜维尔科技:通过 Xsens MVN Link 套装测试动作捕捉动画,由虚幻引擎5渲染

通过Xsens MVN Link套装测试动作捕捉动画&#xff0c;由虚幻引擎5渲染 搜维尔科技&#xff1a;通过 Xsens MVN Link 套装测试动作捕捉动画&#xff0c;由虚幻引擎5渲染

FPGA实训报告DAY 1(Verilog HDL)

实习日志与总结 日期&#xff1a;2024 年 7 月 10 日 星期三 姓名&#xff1a;XXX 一、实习日志 上午 9:00 - 9:30 按时到达工位&#xff0c;参加部门早会&#xff0c;了解了今天的实习任务和目标&#xff0c;即初步学习 FPGA 简介和 Verilog 基础语法知识。 9:30 - 10:30…

Flask 静态文件处理

1. 静态文件目录 Flask 默认会在应用的根目录下寻找一个名为 static 的文件夹&#xff0c;并将其作为静态文件的存储目录。你可以通过 static_folder 参数来指定不同的静态文件目录路径。 from flask import Flask app Flask(__name__, static_foldermy_static) 2. 静态文件 …

图扑低代码数字孪生 Web SCADA 智慧钢厂

2024 年 4 月&#xff0c;中国钢铁工业协会发布了《钢铁行业数字化转型评估报告&#xff08;2023年&#xff09;》&#xff08;以下简称《报告》&#xff09;。《报告》指出&#xff0c;绝大部分钢铁企业建立了数字化转型相关管理组织和团队&#xff0c;并加强其规划落实&#…

LDAPWordlistHarvester:基于LDAP数据的字典生成工具

关于LDAPWordlistHarvester LDAPWordlistHarvester是一款功能强大的字典列表生成工具&#xff0c;该工具可以根据LDAP中的详细信息生成字典列表文件&#xff0c;广大研究人员随后可以利用生成的字典文件测试目标域账号的非随机密码安全性。 工具特征 1、支持根据LDAP中的详细信…

CentOS 7 网络配置

如想了解请查看 虚拟机安装CentOS7 第一步&#xff1a;查看虚拟机网络编辑器、查看NAT设置 &#xff08;子网ID&#xff0c;网关IP&#xff09; 第二步&#xff1a;配置VMnet8 IP与DNS 注意事项&#xff1a;子网掩码与默认网关与 第一步 保持一致 第三步&#xff1a;网络配置…

初学者指南:如何搭建和配置 Nginx 服务器

初学者指南&#xff1a;如何搭建和配置 Nginx 服务器 Nginx 是一个高性能的 HTTP 和反向代理服务器&#xff0c;也是一个 IMAP/POP3/SMTP 代理服务器。本文将详细介绍如何在 Linux 上安装、配置和管理 Nginx 服务器。 一、安装 Nginx Nginx 可以安装在多种操作系统上&#x…

Window -- redis 服务注册、Mysql 服务注册

Windows 服务注册 cd 进入 Redis 主目录 cd /d F:\Redis-x64-5.0.14.1注册 Redis 为系统服务&#xff0c;并指定配置文件 redis-server --service-install redis.windows.conf --loglevel verbose开启服务 redis-server --service-start停止服务 redis-server --service-s…

关于HDFS 和HBase

Apache HBase 被设计为在 Hadoop 分布式文件系统 (HDFS) 上运行的一个特殊类型的数据库。大白话&#xff1a; 想象一下&#xff0c;你有一个巨大的图书馆&#xff0c;这个图书馆就像 HDFS&#xff0c;它的架子上堆满了各种各样的书籍&#xff0c;每本书都非常厚&#xff0c;而…

安防监控视频平台LntonCVS视频融合共享平台智慧消防实现远程集中视频监控方案

近年来&#xff0c;电力系统内变电站着火事件频发&#xff0c;这对消防安全管理提出了严峻挑战。我国消防安全基础设施不完善、管理机制不健全、应急处置能力不足及公众消防安全意识淡薄等问题&#xff0c;严重制约了消防安全的提升。因此&#xff0c;加强变电站的消防安全管理…

HashMap源码解析

目录 一:put方法流程 二&#xff1a;get方法 三&#xff1a;扩容机制 一&#xff1a;put方法流程 public V put(K key, V value) {return putVal(hash(key), key, value, false, true); }final V putVal(int hash, K key, V value, boolean onlyIfAbsent,boolean evict) {No…

Qcom平台通过Hexagon IDE 测试程序性能指导

Qcom平台通过Hexagon IDE 测试程序性能指导 1 安装Hexagon IDE工具2 测试工程2.1 打开Hexagon IDE2.2 新建工程2.3 添加测试案例2.3.1 方法一&#xff1a;新建2.3.2 方法二&#xff1a;拷贝 2.4 配置测试环境2.4.1 包含头文件2.4.2 添加程序优化功能(需先bulid一下)2.4.3 添加g…

79. UE5 RPG 创建技能冷却和消耗

在这一篇里面&#xff0c;我们接着优化技能&#xff0c;现在角色添加的主动技能能够同步到ui上面。我们在这一篇文章里面&#xff0c;完善技能的消耗&#xff08;释放技能减少蓝量&#xff09;和冷却机制。 我们可以看到&#xff0c;在技能类默认值这里&#xff0c;可以设置它的…

分类题解清单

目录 简介MySQL题一、聚合函数二、排序和分组三、高级查询和连接四、子查询五、高级字符串函数 / 正则表达式 / 子句 算法题一、双指针二、滑动窗口三、模拟四、贪心五、矩阵六、排序七、链表八、设计九、前缀和十、哈希表十一、字符串十二、二叉树十三、二分查找十四、回溯十五…

LabVIEW红外热波图像缺陷检

开发使用LabVIEW开发的红外热波图像缺陷检测系统。该系统结合红外热像仪、工业相机和高效的数据采集硬件&#xff0c;实现对工件表面缺陷的自动检测和分析。通过LabVIEW的强大功能&#xff0c;系统能够实时采集、处理和显示红外热波图像&#xff0c;有效提高了检测的精度和效率…