20200529-zlp-3
优化代码生成 新增评分评价后台代码
This commit is contained in:
parent
e31e7b6c0d
commit
ca14b6f89e
53
ruoyi-ui/src/api/benyi_train/feedback.js
Normal file
53
ruoyi-ui/src/api/benyi_train/feedback.js
Normal file
@ -0,0 +1,53 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询培训视频评价反馈列表
|
||||
export function listFeedback(query) {
|
||||
return request({
|
||||
url: '/benyi/feedback/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询培训视频评价反馈详细
|
||||
export function getFeedback(id) {
|
||||
return request({
|
||||
url: '/benyi/feedback/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增培训视频评价反馈
|
||||
export function addFeedback(data) {
|
||||
return request({
|
||||
url: '/benyi/feedback',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改培训视频评价反馈
|
||||
export function updateFeedback(data) {
|
||||
return request({
|
||||
url: '/benyi/feedback',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除培训视频评价反馈
|
||||
export function delFeedback(id) {
|
||||
return request({
|
||||
url: '/benyi/feedback/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 导出培训视频评价反馈
|
||||
export function exportFeedback(query) {
|
||||
return request({
|
||||
url: '/benyi/feedback/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
53
ruoyi-ui/src/api/benyi_train/score.js
Normal file
53
ruoyi-ui/src/api/benyi_train/score.js
Normal file
@ -0,0 +1,53 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询培训视频评分列表
|
||||
export function listScore(query) {
|
||||
return request({
|
||||
url: '/benyi/score/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询培训视频评分详细
|
||||
export function getScore(id) {
|
||||
return request({
|
||||
url: '/benyi/score/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增培训视频评分
|
||||
export function addScore(data) {
|
||||
return request({
|
||||
url: '/benyi/score',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改培训视频评分
|
||||
export function updateScore(data) {
|
||||
return request({
|
||||
url: '/benyi/score',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除培训视频评分
|
||||
export function delScore(id) {
|
||||
return request({
|
||||
url: '/benyi/score/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 导出培训视频评分
|
||||
export function exportScore(query) {
|
||||
return request({
|
||||
url: '/benyi/score/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
83
ruoyi-ui/src/views/benyi_train/video_study/detail.vue
Normal file
83
ruoyi-ui/src/views/benyi_train/video_study/detail.vue
Normal file
@ -0,0 +1,83 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-row>
|
||||
<el-col :xs="24" :sm="12" style="padding: 10px;">
|
||||
<el-card>
|
||||
<video-player
|
||||
class="vjs-custom-skin"
|
||||
:playsinline="true"
|
||||
:options="playerOptions"
|
||||
ref="videoPlayer"
|
||||
></video-player>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :xs="24" :sm="12" style="padding: 10px;">
|
||||
<el-card>
|
||||
内容介绍
|
||||
<br />标题:{{title}}
|
||||
<br />讲师:{{lecturername}}
|
||||
<br />简介:{{information}}
|
||||
<br />评分:
|
||||
<el-rate v-model="value"></el-rate>留言:
|
||||
<el-input type="textarea" placeholder="请输入内容" />
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getVideo } from "@/api/benyi_train/video";
|
||||
|
||||
export default {
|
||||
name: "detail",
|
||||
data() {
|
||||
return {
|
||||
title: "",
|
||||
lecturername: "",
|
||||
information: "",
|
||||
//视频播放参数
|
||||
playerOptions: {},
|
||||
value: null
|
||||
};
|
||||
},
|
||||
created() {
|
||||
const id = this.$route.params && this.$route.params.id;
|
||||
//console.log(id);
|
||||
this.getVideoById(id);
|
||||
},
|
||||
methods: {
|
||||
/** 查询培训列表 */
|
||||
getVideoById(id) {
|
||||
getVideo(id).then(response => {
|
||||
this.title=response.data.title;
|
||||
this.lecturername=response.data.lecturername;
|
||||
this.information=response.data.information;
|
||||
//console.log(response.data);
|
||||
this.playerOptions = {
|
||||
autoplay: true,
|
||||
muted: true,
|
||||
language: "zh-CN",
|
||||
playbackRates: [0.7, 1.0, 1.5, 2.0],
|
||||
fluid: true,
|
||||
sources: [
|
||||
{
|
||||
type: response.data.filetype,
|
||||
// mp4
|
||||
src: "https://files.benyiedu.com/" + response.data.videourl
|
||||
}
|
||||
],
|
||||
notSupportedMessage: "此视频暂无法播放,请稍后再试",
|
||||
poster: "",
|
||||
controlBar: {
|
||||
timeDivider: true,
|
||||
durationDisplay: false,
|
||||
remainingTimeDisplay: false,
|
||||
fullscreenToggle: true //全屏按钮
|
||||
}
|
||||
};
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
Loading…
x
Reference in New Issue
Block a user