bug和国学标签

This commit is contained in:
liqianyouyou
2024-04-02 21:36:37 +08:00
parent 537df5dfb5
commit ab2bb21c3a
7 changed files with 754 additions and 16 deletions

View File

@@ -63,6 +63,7 @@ const mainRoutes = {
{ path: '/course-courseCatalogue', component: _import('modules/course/courseCatalogue'), name: 'course-courseCatalogue', meta: { title: '课程目录列表', isTab: true } },
{ path: '/course-courseChapter', component: _import('modules/course/courseChapter'), name: 'course-courseChapter', meta: { title: '课程目录章节列表', isTab: true } },
{ path: '/course-courseVideo', component: _import('modules/course/courseVideo'), name: 'course-courseVideo', meta: { title: '课程目录章节视频列表', isTab: true } },
{ path: '/course-sociologyList', component: _import('modules/course/sociologyList'), name: 'course-sociologyList', meta: { title: '国学标签列表', isTab: true } },
],
beforeEnter (to, from, next) {
let token = Vue.cookie.get('token')

View File

@@ -5,7 +5,9 @@
<el-form-item label="课程名" prop="title">
<el-input v-model="dataForm.title" placeholder="课程名"></el-input>
</el-form-item>
<el-form-item label="排序" prop="sort">
<el-input v-model="dataForm.sort" placeholder="排序"></el-input>
</el-form-item>
<!-- <el-row>
<el-col :span="12">
<el-form-item label="作者" prop="authorId">
@@ -308,6 +310,7 @@
data: this.$http.adornData({
'id': this.dataForm.id || undefined,
'title': this.dataForm.title,
'sort': this.dataForm.sort,
// 'authorId': this.dataForm.authorId.join(','),
// 'description': this.dataForm.description,
// 'title': this.dataForm.title,

View File

@@ -11,26 +11,30 @@
</el-form>
<el-table :data="dataList" border v-loading="dataListLoading"
style="width: 100%;">
<el-table-column prop="title" header-align="center" align="center" label="视频名称">
</el-table-column>
<el-table-column prop="createTime" header-align="center" align="center" label="创建日期">
</el-table-column>
<el-table-column header-align="center" align="center" label="视频">
<el-table-column header-align="center" align="center" label="视频类型">
<template slot-scope="scope">
<img v-if="scope.row.imgUrl != ''" :src="scope.row.imgUrl" width="70" height="100" class="tableImg" />
<span v-if="scope.row.type != '0'">加密</span>
<span v-else>普通</span>
</template>
</el-table-column>
<el-table-column prop="content" header-align="center" align="center" label="内容">
<el-table-column prop="createTime" header-align="center" align="center" label="上传时间">
</el-table-column>
<el-table-column prop="video" header-align="center" align="center" label="视频">
<!-- <template slot-scope="scope">
<img v-if="scope.row.imgUrl != ''" :src="scope.row.imgUrl" width="70" height="100" class="tableImg" />
</template> -->
</el-table-column>
<!-- <el-table-column prop="content" header-align="center" align="center" label="内容">
</el-table-column> -->
<el-table-column fixed="right" header-align="center" align="center" width="250" label="操作">
<template slot-scope="scope">
<div>
<router-link :to="{path: 'course-courseVideo' , query:{ id : scope.row.id , pageIndex} }">
<!-- <router-link :to="{path: 'course-courseVideo' , query:{ id : scope.row.id , pageIndex} }">
<el-button type="text" size="small">视频管理</el-button>
</router-link>
</router-link> -->
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row)">修改</el-button>
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
</div>

View File

@@ -0,0 +1,359 @@
<template>
<el-dialog :title="!dataForm.id ? '新增' : '修改'" :close-on-click-modal="false" :visible.sync="visible"
@close="handlereset">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" label-width="80px">
<el-form-item label="加密类型" prop="type">
<el-select v-model="dataForm.type" filterable
placeholder="请选择类型">
<el-option v-for="item in typeList" :key="item.dictType" :label="item.dictValue" :value="item.dictType">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="视频" prop="video">
<el-input v-model="dataForm.video" placeholder="视频"></el-input>
<!-- <el-upload
:limit="1"
:on-preview="handlePictureCardPreview"
class="el-uploadfeng"
ref="files"
action="#"
:file-list="fileList"
:on-change="changeData"
accept=".mp3,.mp4,.gif,.mpeg,.mpg"
:http-request="handleRequest"
:before-remove="handleBeforeRemove"
:on-remove="handleRemove"
>
<i
class="el-icon-plus"
v-if="fileList.length == 0 && !isUpload"
></i>
</el-upload> -->
<div class="newpro">
<el-progress
v-if="isUpload"
:stroke-width="10"
:percentage="progressPercent"
style="width: 100%"
></el-progress>
</div>
<!-- <el-upload :action="baseUrl + '/oss/fileoss'" list-type="picture-card" :on-preview="handlePictureCardPreview"
:file-list="fileList" :on-success="handlePicSuccess" :on-remove="handleRemove">
<i class="el-icon-plus"></i>
</el-upload>
<el-dialog :visible.sync="dialogVisible" :append-to-body="true">
<img width="100%" :src="dataForm.video" alt="">
</el-dialog> -->
</el-form-item>
<!-- <el-form-item label="内容" prop="content">
<el-input v-model="dataForm.content" placeholder="内容"></el-input>
</el-form-item> -->
<el-form-item label="排序" prop="sort">
<el-input v-model="dataForm.sort" placeholder="排序"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="handlereset">取消</el-button>
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
</span>
</el-dialog>
</template>
<script>
import global from '../../common/common.vue' //引入共用组间
import axios from "axios";
export default {
data() {
return {
baseUrl: global.baseUrl,
progressPercent: 0,
curPercentage: 0,
isUpload: false,
uploadTimer: null,
visible: false,
typeList: [ //类型0普通1加密
{
dictType: 0,
dictValue: "普通"
},
{
dictType: 1,
dictValue: "加密"
}
],
props: {
dictType: '',
dictValue: ''
},
gushuList:[],
authorList: [],
restaurants: [],
author: '',
publisherList: [],
fileList: [],
fileListNovel: [],
dialogImageUrl: '',
dialogVisible: false,
dataForm: {
"pid": null,
"id": null,
"isLast": 0,
"title": "",
"sort": 1,
},
splitsTypeList: [],
dataRule: {
video: [
{ required: true, message: '请填写本项', trigger: 'blur' }
],
}
}
},
created() {
},
mounted() {
},
watch: {
isUpload: {
handler(val, oldVal) {
if (this.isUpload) {
this.uploadTimer = setInterval(async () => {
//需要定时执行的代码
this.progressPercent = await this.getProgress(this.currentFile);
}, 1000);
} else {
//this.uploadTimer = null;
clearInterval(this.uploadTimer);
this.currentFile = {};
}
// this.getGoodsTypeList()
},
deep: true,
},
},
methods: {
init(row, chapter_id) {
console.log('row2', row)
this.dataForm = row || {}
this.dataForm.chapterId = chapter_id || ''
this.visible = true
if (this.dataForm.video && this.dataForm.video != "") {
var img = {
name: this.dataForm.video,
url: this.dataForm.video
}
var attr = []
attr.push(img)
this.fileList = attr
}else{
this.fileList = []
}
},
// 表单提交
dataFormSubmit() {
this.$refs['dataForm'].validate((valid) => {
if (valid) {
this.$http({
url: this.$http.adornUrl(`${!this.dataForm.id ? '/master/courseSociology/addCourseSociology' : '/master/courseSociology/editCourseSociology'}`),
method: 'post',
data: this.$http.adornData({
"pid": this.dataForm.pid || undefined,
"id": this.dataForm.id || undefined,
'isLast': this.dataForm.isLast,
'title': this.dataForm.title,
"sort": this.dataForm.sort,
})
}).then(({
data
}) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.visible = false
this.$emit('refreshDataList')
}
})
} else {
this.$message.error(data.msg)
}
})
}
})
},
async getProgress(file) {
var that = this;
console.log("🚀 ~ handleRequest ~ data222:", file.uid);
var progress = 0;
// const config = {
// onUploadProgress: (progressEvent) => {
// // progressEvent.loaded:已上传文件大小
// // progressEvent.total:被上传文件的总大小
// this.progressPercent = Number(
// ((progressEvent.loaded / progressEvent.total) * 100).toFixed(2)
// );
// },
// };
await axios
.get(this.$http.adornUrl(`/oss/fileoss/getSchedule?uid=${file.uid}`))
.then(async (res) => {
console.log("🚀 ~ this.$axios.post ~ res999:", res.data.percent);
progress = Number(res.data.percent);
if (progress == 100) {
this.isUpload = false;
clearInterval(this.uploadTimer);
that.uploadTimer = null;
await that.handlePicSuccess(res.data, file);
this.currentFile = {};
this.$forceUpdate();
}
});
console.log("🚀 ~ .then ~ progress888:", progress);
return progress;
},
handleRequest(option) {
var that = this;
const { onProgress, onSuccess, onError } = option;
this.progressPercent = 0;
this.currentFile = option.file;
let formdata = new FormData();
formdata.append("file", option.file);
formdata.append("fileName", option.file.fileNamee);
formdata.append("uid", option.file.uid);
console.log("🚀 ~ handleRequest ~ formdata:", formdata);
this.isUpload = true;
axios
.post(this.baseUrl + "/oss/fileoss/uploadFileSchedule", formdata)
.then((res) => {
console.log("🚀 ~ this.$axios.post ~ res111:", res);
if (res.data.code == 0) {
that.fileList[that.fileList.length - 1].status = "done";
// clearInterval(that.uploadTimer);
// that.isUpload = false;
// that.currentFile = {};
// await that.handlePicSuccess(res.data, data.file);
onSuccess();
} else {
that.fileList[that.fileList.length - 1].ststus = "error";
onError();
}
});
// var prom = new Promise((resolve, reject) => {});
// prom.abort = () => {};
// return prom;
},
handlePictureCardPreview(file) {
this.dataForm.video = file.url;
this.dialogVisible = true;
},
handlePicSuccess(res, file) {
console.log(res, file, "999999999");
if (res.msg == "success") {
this.dataForm.video = res.url;
this.fileList.push({
name: file.name,
url: res.url,
});
this.$message.success("上传成功");
this.isUpload = false;
} else {
this.$message.error("上传失败");
}
},
handlePicSuccess(res, file) {
if (res.msg == "success") {
this.dataForm.video = res.url;
this.$message.success("上传成功");
} else {
this.$message.error("上传失败");
}
},
changeData(file, fileList) {
// 数据小于0.1M的时候按KB显示
const size =
file.size / 1024 / 1024 > 0.1
? `(${(file.size / 1024 / 1024).toFixed(1)}M)`
: `(${(file.size / 1024).toFixed(1)}KB)`;
file.name.indexOf("M") > -1 || file.name.indexOf("KB") > -1
? file.name
: (file.name += size);
},
handleBeforeRemove(file, fileList) {
console.log(file, fileList, "file, fileListfile, fileListfile, fileList");
this.$refs.files.clearFiles();
clearInterval(this.uploadTimer);
this.isUpload = false;
this.currentFile = {};
this.$forceUpdate();
},
handleRemove(file, fileList) {
this.dataForm.video = "";
this.fileList = fileList;
//this.uploadTimer = null;
clearInterval(this.uploadTimer);
this.isUpload = false;
this.currentFile = {};
this.$forceUpdate();
// this.dataForm.noneBtnImg = fileList.length >= this.dataForm.limitCountImg;
},
handleDownload(file) {
console.log(file)
},
handlereset() {
this.fileList = [],
this.fileListNovel = [],
this.visible = false
},
// handlePreview(file) {
// console.log(file);
// },
// handleExceed(files, fileList) {
// this.$message.warning(`当前限制选择 3 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`);
// },
// beforeRemove(file, fileList) {
// return this.$confirm(`确定移除 ${ file.name }`);
// },
// handleRemoveNovel(file) {
// this.dataForm.novel = '';
// },
// handleNovelSuccess(file) {
// this.dataForm.novel = file.url
// },
// querySearch(queryString, cb) {
// var restaurants = this.restaurants;
// var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
// // 调用 callback 返回建议列表的数据
// console.log(results)
// cb(results);
// },
// createFilter(queryString) {
// return (restaurant) => {
// return (restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0);
// };
// },
// handleSelect(item) {
// this.dataForm.authorId = item.id
// console.log(item);
// }
},
beforeDestroy() {
clearInterval(this.uploadTimer);
},
}
</script>

View File

@@ -0,0 +1,370 @@
<template>
<div class="mod-config">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
<el-form-item label="国学标签名称">
<el-input v-model="query.keywords" placeholder="国学标签名称" clearable></el-input>
</el-form-item>
<!-- <el-form-item label="出版社名称">
<el-input v-model="query.publisherName" placeholder="出版社名称" clearable></el-input>
</el-form-item>
<el-form-item label="作者姓名">
<el-input v-model="query.authorName" placeholder="作者姓名" clearable></el-input>
</el-form-item> -->
<el-form-item>
<el-button @click="pageIndex = 1;getDataList()">查询</el-button>
<el-button type="primary" @click="addOrUpdateHandle()">新增</el-button>
<!-- <el-button v-if="isAuth('book:book:delete')" type="danger" @click="deleteHandle()"
:disabled="dataListSelections.length <= 0">批量删除</el-button> -->
</el-form-item>
</el-form>
<el-table :data="dataList" border v-loading="dataListLoading"
style="width: 100%;">
<!-- <el-table-column min-width="155px
" prop="delFlag" header-align="center" align="center" label="状态">
<template slot-scope="scope">
<el-switch :active-value=1 :inactive-value=0 style="display: block" v-model="scope.row.delFlag" disabled
@change="SwitchChange(scope.row)" active-color="#13ce66" inactive-color="#ff4949" active-text="未删"
inactive-text="已删">
</el-switch>
</template>
</el-table-column> -->
<el-table-column prop="title" header-align="center" align="center" label="课程名">
</el-table-column>
<!-- <el-table-column prop="authorName" header-align="center" align="center" label="作者姓名">
</el-table-column>
<el-table-column header-align="center" align="center" label="插图">
<template slot-scope="scope">
<img v-if="scope.row.images != ''" :src="scope.row.images" width="70" height="100" class="tableImg" />
</template>
</el-table-column> -->
<!-- <el-table-column prop="description" header-align="center" align="center" :show-overflow-tooltip="true" label="简介">
</el-table-column> -->
<!-- <el-table-column
prop="title"
header-align="center"
align="center"
label="序言">
</el-table-column>
<el-table-column
prop="content"
header-align="center"
align="center"
label="内容">
</el-table-column> -->
<!-- <el-table-column prop="type" header-align="center" align="center" label="类型">
</el-table-column>
<el-table-column prop="price" header-align="center" align="center" label="价格">
</el-table-column> -->
<!-- <el-table-column
prop="istop"
header-align="center"
align="center"
label="置顶">
</el-table-column> -->
<!-- <el-table-column prop="publisherName" header-align="center" align="center" label="出版商名称">
</el-table-column> -->
<!-- <el-table-column prop="chapterStatus" header-align="center" align="center" label="章节拆分">
<template slot-scope="scope">
<span v-if="scope.row.chapterStatus == '成功'" style="color:blue">{{scope.row.chapterStatus}}</span>
<span v-if="scope.row.chapterStatus == '失败'" style="color: red">{{scope.row.chapterStatus}}</span>
<span v-if="scope.row.chapterStatus == '处理中'">{{scope.row.chapterStatus}}</span>
<span v-if="scope.row.chapterStatus == '未处理'">{{scope.row.chapterStatus}}</span>
</template>
</el-table-column>
<el-table-column prop="contentStatus" header-align="center" align="center" label="单句拆分">
<template slot-scope="scope">
<span v-if="scope.row.contentStatus == '成功'" style="color:blue">{{scope.row.contentStatus}}</span>
<span v-if="scope.row.contentStatus == '失败'" style="color: red">{{scope.row.contentStatus}}</span>
<span v-if="scope.row.contentStatus == '处理中'">{{scope.row.contentStatus}}</span>
<span v-if="scope.row.contentStatus == '未处理'">{{scope.row.contentStatus}}</span>
</template>
</el-table-column>
<el-table-column prop="voicesStatus" header-align="center" align="center" label="音频处理">
<template slot-scope="scope">
<span v-if="scope.row.voicesStatus == '成功'" style="color:blue">{{scope.row.voicesStatus}}</span>
<span v-if="scope.row.voicesStatus == '失败'" style="color: red">{{scope.row.voicesStatus}}</span>
<span v-if="scope.row.voicesStatus == '处理中'">{{scope.row.voicesStatus}}</span>
<span v-if="scope.row.voicesStatus == '未处理'">{{scope.row.voicesStatus}}</span>
</template>
</el-table-column> -->
<!-- <el-table-column
prop="pid"
header-align="center"
align="center"
label="父id">
</el-table-column>
<el-table-column
prop="level"
header-align="center"
align="center"
label="层级">
</el-table-column> -->
<el-table-column prop="createTime" header-align="center" align="center" label="创建日期">
</el-table-column>
<!-- <el-table-column prop="updateTime" header-align="center" align="center" label="更新日期">
</el-table-column> -->
<!-- <el-table-column
prop="sort"
header-align="center"
align="center"
label="排序">
</el-table-column>
<el-table-column
prop="delFlag"
header-align="center"
align="center"
label="删除标记">
</el-table-column> -->
<el-table-column fixed="right" header-align="center" align="center" width="250" label="操作">
<template slot-scope="scope">
<!-- <el-dropdown style="border: 1px solid #17B3A3; border-radius: 5px; padding: 4px;">
<span class="el-dropdown-link" style="color:#17B3A3">
操作管理<i class="el-icon-arrow-down el-icon--right"></i>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item>
<router-link :to="{path: 'book-comments' , query:{ id : scope.row.id} }">
<el-button type="text" size="small">书评管理</el-button>
</router-link>
</el-dropdown-item>
<el-dropdown-item>
<router-link :to="{path: 'clock' , query:{ id : scope.row.id} }">
<el-button type="text" size="small">打卡管理</el-button>
</router-link>
</el-dropdown-item>
<el-dropdown-item>
<router-link :to="{path: 'book-bookchapter' , query:{ id : scope.row.id , pageIndex} }">
<el-button type="text" size="small">章节管理</el-button>
</router-link>
</el-dropdown-item>
<el-dropdown-item>
<router-link :to="{path: 'talkBook' , query:{ id : scope.row.id , pageIndex} }">
<el-button type="text" size="small">讲书管理</el-button>
</router-link>
</el-dropdown-item>
<el-dropdown-item>
<router-link :to="{path: 'yian' , query:{ id : scope.row.id , pageIndex} }">
<el-button type="text" size="small">医案管理</el-button>
</router-link>
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown> -->
<!-- <el-button v-if="scope.row.chapterStatus == '未处理' || scope.row.chapterStatus == '失败'" type="text" size="small" @click="chapterHandle(scope.row.id,scope.row)">章节拆分</el-button> -->
<!-- <el-button v-if="scope.row.chapterStatus == '成功' && (scope.row.contentStatus == '未处理' || scope.row.contentStatus == '失败') " type="text" size="small" @click="contentHandle(scope.row.id)">单句拆分</el-button> -->
<!-- <el-button v-if="scope.row.contentStatus == '成功' && (scope.row.voicesStatus == '未处理' || scope.row.voicesStatus == '失败') " type="text" size="small" @click="voicesHandle(scope.row.id)">音频处理</el-button> -->
<div>
<router-link :to="{path: 'course-courseCatalogue' , query:{ id : scope.row.id , pageIndex} }">
<el-button type="text" size="small">目录管理</el-button>
</router-link>
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row)">修改</el-button>
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
</div>
</template>
</el-table-column>
</el-table>
<el-pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" :current-page="pageIndex"
:page-sizes="[10, 20, 50, 100]" :page-size="pageSize" :total="totalPage"
style="padding: 30px 0; text-align: center;" layout="total, sizes, prev, pager, next, jumper">
</el-pagination>
<!-- 弹窗, 新增 / 修改 -->
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
</div>
</template>
<script>
import AddOrUpdate from './sociology-add-or-update'
export default {
data() {
return {
dataForm: {
key: ''
},
query:{
type:'',
categoryId:'',
sociologyId:'',
keywords:''
},
dataList: [],
delFlag: false,
pageIndex: 1,
pageSize: 10,
totalPage: 0,
dataListLoading: false,
dataListSelections: [],
addOrUpdateVisible: false
}
},
components: {
AddOrUpdate
},
activated() {
if(this.$route.query.upPageInde != null){
this.pageIndex = this.$route.query.upPageIndex;
console.log(this.pageIndex)
}
this.getDataList()
},
methods: {
// 获取数据列表
getDataList() {
this.dataListLoading = true
this.$http({
url: this.$http.adornUrl('/master/courseSociology/getCourseSociologyList'),
method: 'post',
data: this.$http.adornData({
// 'page': this.pageIndex,
// 'limit': this.pageSize,
// "type": this.query.type||0, //类型0全部1医学2国学
// "categoryId": this.query.categoryId, //医学类型id当type为1时为必填项;为0时代表全部
// "sociologyId": this.query.sociologyId, //国学类型id,当type为2时为必填项为0代表全部
// "keywords": this.query.keywords //关键字
})
}).then(({ data }) => {
if (data && data.code === 0) {
this.dataList = data.page.records
this.totalPage = data.page.total
} else {
this.dataList = []
this.totalPage = 0
}
this.dataListLoading = false
})
},
// 每页数
sizeChangeHandle(val) {
this.pageSize = val
this.pageIndex = 1
this.getDataList()
},
// 当前页
currentChangeHandle(val) {
this.pageIndex = val
this.getDataList()
},
// 多选
selectionChangeHandle(val) {
this.dataListSelections = val
},
// 新增 / 修改
addOrUpdateHandle(row) {
this.addOrUpdateVisible = true
this.$nextTick(() => {
this.$refs.addOrUpdate.init(row)
})
},
// 删除
deleteHandle(id) {
var ids = id ? [id] : this.dataListSelections.map(item => {
return item.id
})
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http({
url: this.$http.adornUrl('/master/course/delCourse?id='+ ids),
method: 'post',
// data: this.$http.adornData(ids, false)
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.getDataList()
}
})
} else {
this.$message.error(data.msg)
}
})
})
},
// 开关变化
SwitchChange(event) {
/*点击时他会自动把你绑定的值变更,直接去请求数据就可以了*/
var parms = {
delFlag: event.delFlag,
id: event.id
}
this.$http({
url: this.$http.adornUrl('/book/book/update'),
method: 'post',
data: parms
}).then(res => {
this.$message({
message: '成功',
type: 'success'
})
this.loading = false
this.getDataList()
}).catch(error => {
this.loading = false
console.log(error)
})
console.log(event)
},
chapterHandle(id, row) {
if (row.novel == '') {
this.$alert('请上传电子书文件后在进行此操作', '提示', {
confirmButtonText: '好的',
});
return false
}
this.$http({
url: this.$http.adornUrl('/book/book/getChapter'),
method: 'get',
params: this.$http.adornParams({
'id':id
})
}).then(res => {
this.$message({
message: '成功',
type: 'success'
})
this.loading = false
this.getDataList()
})
},
contentHandle(id){
this.$http({
url: this.$http.adornUrl('/book/bookchaptercontent/getBookVoices'),
method: 'get',
params: this.$http.adornParams({
'id':id
})
}).then(res => {
this.$message({
message: '成功',
type: 'success'
})
this.loading = false
this.getDataList()
})
},
voicesHandle(id){
//allVoices
this.$http({
// url: this.$http.adornUrl('/book/bookchaptercontent/allVoices'),
url: this.$http.adornUrl('/book/bookchaptercontent/AllVOices'),
method: 'get',
params: this.$http.adornParams({
'id':id
})
}).then(res => {
console.log('book/bookchaptercontent/AllVOices')
this.$message({
message: '成功',
type: 'success'
})
this.loading = false
this.getDataList()
})
}
}
}
</script>

View File

@@ -10,7 +10,8 @@
</el-select>
</el-form-item>
<el-form-item label="视频" prop="video">
<el-upload
<el-input v-model="dataForm.video" placeholder="视频"></el-input>
<!-- <el-upload
:limit="1"
:on-preview="handlePictureCardPreview"
class="el-uploadfeng"
@@ -23,12 +24,11 @@
:before-remove="handleBeforeRemove"
:on-remove="handleRemove"
>
<!-- <el-button class="btn upload-btn">上传附件</el-button> -->
<i
class="el-icon-plus"
v-if="fileList.length == 0 && !isUpload"
></i>
</el-upload>
</el-upload> -->
<div class="newpro">
<el-progress
v-if="isUpload"
@@ -109,8 +109,9 @@
},
splitsTypeList: [],
dataRule: {
video: [
{ required: true, message: '请填写本项', trigger: 'blur' }
],
}
}
},