提交代码
parent
c7dd2063a6
commit
f618dee734
|
@ -19,7 +19,7 @@ public class BusTrainingVideoUser extends BaseEntity
|
|||
private Long id;
|
||||
|
||||
/** 公司主键 */
|
||||
private Long deptId;
|
||||
private Long comId;
|
||||
|
||||
/** 公司名称 */
|
||||
@Excel(name = "公司名称")
|
||||
|
@ -60,6 +60,26 @@ public class BusTrainingVideoUser extends BaseEntity
|
|||
@Excel(name = "删除标识")
|
||||
private Long isDel;
|
||||
|
||||
/** 培训名称 */
|
||||
@Excel(name = "培训名称")
|
||||
private String trainTitle;
|
||||
|
||||
/** 培训类型 */
|
||||
@Excel(name = "培训类型")
|
||||
private String trainType;
|
||||
|
||||
/** 培训级别 */
|
||||
@Excel(name = "培训级别")
|
||||
private String trainLevel;
|
||||
|
||||
/** 培训文件地址 */
|
||||
@Excel(name = "培训文件地址")
|
||||
private String trainFilePath;
|
||||
|
||||
/** 培训文件主图 */
|
||||
@Excel(name = "培训文件主图")
|
||||
private String trainFileImage;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
|
@ -69,15 +89,15 @@ public class BusTrainingVideoUser extends BaseEntity
|
|||
{
|
||||
return id;
|
||||
}
|
||||
public void setDeptId(Long deptId)
|
||||
{
|
||||
this.deptId = deptId;
|
||||
|
||||
public Long getComId() {
|
||||
return comId;
|
||||
}
|
||||
|
||||
public Long getDeptId()
|
||||
{
|
||||
return deptId;
|
||||
public void setComId(Long comId) {
|
||||
this.comId = comId;
|
||||
}
|
||||
|
||||
public void setProjectId(Long projectId)
|
||||
{
|
||||
this.projectId = projectId;
|
||||
|
@ -165,11 +185,51 @@ public class BusTrainingVideoUser extends BaseEntity
|
|||
this.userName = userName;
|
||||
}
|
||||
|
||||
public String getTrainTitle() {
|
||||
return trainTitle;
|
||||
}
|
||||
|
||||
public void setTrainTitle(String trainTitle) {
|
||||
this.trainTitle = trainTitle;
|
||||
}
|
||||
|
||||
public String getTrainType() {
|
||||
return trainType;
|
||||
}
|
||||
|
||||
public void setTrainType(String trainType) {
|
||||
this.trainType = trainType;
|
||||
}
|
||||
|
||||
public String getTrainLevel() {
|
||||
return trainLevel;
|
||||
}
|
||||
|
||||
public void setTrainLevel(String trainLevel) {
|
||||
this.trainLevel = trainLevel;
|
||||
}
|
||||
|
||||
public String getTrainFilePath() {
|
||||
return trainFilePath;
|
||||
}
|
||||
|
||||
public void setTrainFilePath(String trainFilePath) {
|
||||
this.trainFilePath = trainFilePath;
|
||||
}
|
||||
|
||||
public String getTrainFileImage() {
|
||||
return trainFileImage;
|
||||
}
|
||||
|
||||
public void setTrainFileImage(String trainFileImage) {
|
||||
this.trainFileImage = trainFileImage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("deptId", getDeptId())
|
||||
.append("comId", getComId())
|
||||
.append("projectId", getProjectId())
|
||||
.append("userId", getUserId())
|
||||
.append("videoId", getVideoId())
|
||||
|
|
|
@ -14,6 +14,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="userNick" column="user_nick" />
|
||||
<result property="userName" column="user_name" />
|
||||
<result property="videoId" column="video_id" />
|
||||
<result property="trainTitle" column="train_title" />
|
||||
<result property="trainType" column="train_type" />
|
||||
<result property="trainLevel" column="train_level" />
|
||||
<result property="trainFilePath" column="train_file_path" />
|
||||
<result property="trainFileImage" column="train_file_image" />
|
||||
<result property="playStatus" column="play_status" />
|
||||
<result property="sortBy" column="sort_by" />
|
||||
<result property="isDel" column="is_del" />
|
||||
|
@ -25,7 +30,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</resultMap>
|
||||
|
||||
<sql id="selectBusTrainingVideoUserVo">
|
||||
select btvu.id, btvu.com_id, sd.dept_name as com_name, btvu.project_id, pi.project_name, btvu.user_id, su.nick_name as user_nick, su.user_name, btvu.video_id, btvu.play_status, btvu.sort_by, btvu.is_del, btvu.create_by, btvu.create_time, btvu.update_by, btvu.update_time, btvu.remark from bus_training_video_user btvu
|
||||
select btvu.id, btvu.com_id, sd.dept_name as com_name, btvu.project_id, pi.project_name, btvu.user_id, su.nick_name as user_nick, su.user_name, btvu.video_id, btv.train_title,
|
||||
btv.train_type, btv.train_level, btv.train_file_path, btv.train_file_image,
|
||||
btvu.play_status, btvu.sort_by, btvu.is_del, btvu.create_by, btvu.create_time, btvu.update_by, btvu.update_time, btvu.remark from bus_training_video_user btvu
|
||||
left join bus_training_video btv on btv.id = btvu.video_id
|
||||
left join pro_project_info pi on pi.id = btvu.project_id
|
||||
left join sys_dept sd on sd.com_id = btvu.com_id
|
||||
left join sys_user su on su.user_id = btvu.user_id
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 5.7 KiB |
|
@ -118,6 +118,11 @@
|
|||
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="播放" align="center" width="80">
|
||||
<template #default="scope">
|
||||
<el-button type="primary" link icon="VideoPlay" @click="handlePlayVideo(scope.row)">播放</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" fixed="right" width="150" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-button v-if="!scope.row.disabledState" link type="primary" icon="Edit" @click="handleUpdate(scope.row)"
|
||||
|
@ -185,10 +190,23 @@
|
|||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<!--培训视频播放对话框 -->
|
||||
<el-dialog :title="videoTitle" v-model="videoOpen" width="680px" append-to-body modal-class="video-play-dlg">
|
||||
<video
|
||||
ref="videoRef"
|
||||
:src="videoSrc"
|
||||
controls="controls"
|
||||
autoplay="autoplay"
|
||||
:poster="videoPoster?videoPoster:poster"
|
||||
style="width: 100%;max-height: 550px"
|
||||
/>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="BusTrainingVideo">
|
||||
import poster from '@/assets/images/poster.gif'
|
||||
import { listBusTrainingVideo, findBusTrainingVideo, getBusTrainingVideo, delBusTrainingVideo, addBusTrainingVideo, updateBusTrainingVideo } from "@/api/manage/busTrainingVideo";
|
||||
import useUserStore from '@/store/modules/user'
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
@ -207,6 +225,11 @@ const tabs = ref({'gsj':0,'xmj':0,'bzj':0});
|
|||
const activeName = ref("gsj");
|
||||
const craftPostOptions = ref([]);
|
||||
|
||||
const videoSrc = ref("");
|
||||
const videoPoster = ref("");
|
||||
const videoOpen = ref(false);
|
||||
const videoTitle = ref("");
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
|
@ -441,6 +464,14 @@ function handleExport() {
|
|||
}, `busTrainingVideo_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
|
||||
/** 播放视频操作 */
|
||||
function handlePlayVideo(row) {
|
||||
videoSrc.value = row.trainFilePath;
|
||||
videoPoster.value = row.trainFileImage;
|
||||
videoOpen.value = true;
|
||||
videoTitle.value = "视频播放 #"+row.trainTitle;
|
||||
}
|
||||
|
||||
/** 初始化行标识 */
|
||||
function initRowDisabled(row) {
|
||||
let roles = userStore.roles;
|
||||
|
@ -513,4 +544,9 @@ getList();
|
|||
}
|
||||
}
|
||||
}
|
||||
.video-play-dlg{
|
||||
.el-dialog__body{
|
||||
padding: 10px;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -69,14 +69,29 @@
|
|||
<el-table-column label="所属公司" align="center" prop="comName" />
|
||||
<el-table-column label="项目名称" align="center" prop="projectName" />
|
||||
<el-table-column label="用户账号" align="center" prop="userName" />
|
||||
<el-table-column label="培训名称" align="center" prop="trainTitle"/>
|
||||
<el-table-column label="培训类型" align="center" prop="trainType" width="120">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="edu_train_type" :value="scope.row.trainType" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="培训级别" align="center" prop="trainLevel" width="100">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="edu_train_level" :value="scope.row.trainLevel" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="培训状态" align="center" prop="playStatus" />
|
||||
<el-table-column label="培训排序" align="center" prop="sortBy" />
|
||||
|
||||
<el-table-column label="培训顺序" align="center" prop="sortBy" />
|
||||
<el-table-column label="培训时间" align="center" prop="createTime" width="120">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="播放" align="center" width="80">
|
||||
<template #default="scope">
|
||||
<el-button type="primary" link icon="VideoPlay" @click="handlePlayVideo(scope.row)">播放</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-button v-if="false" link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['manage:busTrainingVideoUser:edit']">修改</el-button>
|
||||
|
@ -126,13 +141,28 @@
|
|||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<!--培训视频播放对话框 -->
|
||||
<el-dialog :title="videoTitle" v-model="videoOpen" width="680px" append-to-body modal-class="video-play-user-dlg">
|
||||
<video
|
||||
ref="videoRef"
|
||||
:src="videoSrc"
|
||||
controls="controls"
|
||||
autoplay="autoplay"
|
||||
:poster="videoPoster?videoPoster:poster"
|
||||
style="width: 100%;max-height: 550px"
|
||||
/>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="BusTrainingVideoUser">
|
||||
import poster from '@/assets/images/poster.gif'
|
||||
import { listBusTrainingVideoUser, getBusTrainingVideoUser, delBusTrainingVideoUser, addBusTrainingVideoUser, updateBusTrainingVideoUser } from "@/api/manage/busTrainingVideoUser";
|
||||
import useUserStore from '@/store/modules/user'
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { edu_train_level, edu_train_type} = proxy.useDict('edu_train_level', 'edu_train_type');
|
||||
|
||||
const busTrainingVideoUserList = ref([]);
|
||||
const open = ref(false);
|
||||
|
@ -144,6 +174,11 @@ const multiple = ref(true);
|
|||
const total = ref(0);
|
||||
const title = ref("");
|
||||
|
||||
const videoSrc = ref("");
|
||||
const videoPoster = ref("");
|
||||
const videoOpen = ref(false);
|
||||
const videoTitle = ref("");
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
|
@ -162,6 +197,7 @@ const data = reactive({
|
|||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
const userStore = useUserStore()
|
||||
|
||||
/** 查询用户培训视频列表 */
|
||||
function getList() {
|
||||
|
@ -275,5 +311,20 @@ function handleExport() {
|
|||
}, `busTrainingVideoUser_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
|
||||
/** 播放视频操作 */
|
||||
function handlePlayVideo(row) {
|
||||
videoSrc.value = row.trainFilePath;
|
||||
videoPoster.value = row.trainFileImage;
|
||||
videoOpen.value = true;
|
||||
videoTitle.value = "视频播放 #"+row.trainTitle;
|
||||
}
|
||||
|
||||
getList();
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.video-play-user-dlg{
|
||||
.el-dialog__body{
|
||||
padding: 10px;
|
||||
}
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue