协议加超链接
This commit is contained in:
@@ -1,71 +1,68 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog :title="!dataForm.id ? '新增' : '修改'" :close-on-click-modal="false" :visible.sync="visible"
|
<div style="height: 100%;">
|
||||||
@close="handlereset">
|
<div style="height: calc(100% - 120px);margin-bottom: 80px;">
|
||||||
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" label-width="120px">
|
<el-upload
|
||||||
<el-form-item label="课程说明名称" prop="title">
|
class="chapter-avatar-uploader"
|
||||||
<el-input v-model="dataForm.title" placeholder="章节名"></el-input>
|
:action="baseUrl + '/oss/fileoss'"
|
||||||
</el-form-item>
|
accept=".jpeg,.jpg,.gif,.png"
|
||||||
|
:show-file-list="false"
|
||||||
<el-form-item label="插图" prop="imgUrl">
|
:on-success="contentUploadSuccess"
|
||||||
<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-upload>
|
||||||
<el-dialog :visible.sync="dialogVisible" :append-to-body="true">
|
<quill-editor
|
||||||
<img width="100%" :src="dataForm.imgUrl" alt="">
|
v-model="dataForm.content"
|
||||||
</el-dialog>
|
ref="myQuillEditor"
|
||||||
</el-form-item>
|
:options="editorOption"
|
||||||
<el-form-item label="排序" prop="sort">
|
@blur="onEditorBlur($event)"
|
||||||
<el-input v-model="dataForm.sort" placeholder="排序"></el-input>
|
@focus="onEditorFocus($event)"
|
||||||
</el-form-item>
|
@ready="onEditorReady($event)"
|
||||||
<el-form-item label="内容" prop="content" class="custom-chapter-height">
|
class="chapter_editor"
|
||||||
<!-- <el-input v-model="dataForm.content" placeholder="内容"></el-input> -->
|
style="height: 100%;"
|
||||||
<el-upload class="chapter-avatar-uploader" :action="baseUrl + '/oss/fileoss'" accept=".jpeg,.jpg,.gif,.png" :show-file-list="false" :on-success="contentUploadSuccess" >
|
>
|
||||||
</el-upload>
|
|
||||||
<quill-editor v-model="dataForm.content" ref="myQuillEditor" :options="editorOption"
|
|
||||||
@blur="onEditorBlur($event)" @focus="onEditorFocus($event)"
|
|
||||||
@ready="onEditorReady($event)" class="chapter_editor">
|
|
||||||
</quill-editor>
|
</quill-editor>
|
||||||
</el-form-item>
|
</div>
|
||||||
|
<!-- <el-input v-model="dataForm.content" placeholder="内容"></el-input> -->
|
||||||
|
|
||||||
<!-- <el-form-item label="排序" prop="sort">
|
<!-- <el-button @click="handlereset">取消</el-button> -->
|
||||||
<el-input v-model="dataForm.sort" placeholder="排序"></el-input>
|
<el-button type="primary" @click="dataFormSubmit()" style="float: right;">保存</el-button>
|
||||||
</el-form-item> -->
|
</div>
|
||||||
</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>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import global from '../../common/common.vue' //引入共用组间
|
import global from "../../common/common.vue"; //引入共用组间
|
||||||
import {
|
import { quillEditor } from "vue-quill-editor";
|
||||||
quillEditor
|
import "quill/dist/quill.core.css";
|
||||||
} from 'vue-quill-editor'
|
import "quill/dist/quill.snow.css";
|
||||||
import 'quill/dist/quill.core.css'
|
import "quill/dist/quill.bubble.css";
|
||||||
import 'quill/dist/quill.snow.css'
|
|
||||||
import 'quill/dist/quill.bubble.css'
|
|
||||||
const toolbarOptions = [
|
const toolbarOptions = [
|
||||||
['bold', 'italic', 'underline', 'strike'], // 加粗,斜体,下划线,删除线
|
["bold", "italic", "underline", "strike"], // 加粗,斜体,下划线,删除线
|
||||||
['blockquote', 'code-block'], //引用,代码块
|
["blockquote", "code-block"], //引用,代码块
|
||||||
[{ 'header': 1 }, { 'header': 2 }], // 几级标题
|
[{ header: 1 }, { header: 2 }], // 几级标题
|
||||||
[{ 'list': 'ordered' }, { 'list': 'bullet' }], // 有序列表,无序列表
|
[{ list: "ordered" }, { list: "bullet" }], // 有序列表,无序列表
|
||||||
[{ 'script': 'sub' }, { 'script': 'super' }], // 下角标,上角标
|
[{ script: "sub" }, { script: "super" }], // 下角标,上角标
|
||||||
[{ 'indent': '-1' }, { 'indent': '+1' }], // 缩进
|
[{ indent: "-1" }, { indent: "+1" }], // 缩进
|
||||||
[{ 'direction': 'rtl' }], // 文字输入方向
|
[{ direction: "rtl" }], // 文字输入方向
|
||||||
[{ 'size': ['small', false, 'large', 'huge'] }], // 字体大小
|
[{ size: ["small", false, "large", "huge"] }], // 字体大小
|
||||||
[{ 'header': [1, 2, 3, 4, 5, 6, false] }],// 标题
|
[{ header: [1, 2, 3, 4, 5, 6, false] }], // 标题
|
||||||
[{ 'color': [] }, { 'background': [] }], // 颜色选择
|
[{ color: [] }, { background: [] }], // 颜色选择
|
||||||
[{ 'font': ['SimSun', 'SimHei', 'Microsoft-YaHei', 'KaiTi', 'FangSong', 'Arial'] }],// 字体
|
[
|
||||||
[{ 'align': [] }], // 居中
|
{
|
||||||
['clean'], // 清除样式,
|
font: [
|
||||||
['link', 'image'], // 上传图片、上传视频
|
"SimSun",
|
||||||
|
"SimHei",
|
||||||
|
"Microsoft-YaHei",
|
||||||
|
"KaiTi",
|
||||||
|
"FangSong",
|
||||||
|
"Arial"
|
||||||
]
|
]
|
||||||
|
}
|
||||||
|
], // 字体
|
||||||
|
[{ align: [] }], // 居中
|
||||||
|
["clean"], // 清除样式,
|
||||||
|
["link", "image"] // 上传图片、上传视频
|
||||||
|
];
|
||||||
export default {
|
export default {
|
||||||
|
props:['dataInfo'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
baseUrl: global.baseUrl,
|
baseUrl: global.baseUrl,
|
||||||
@@ -83,69 +80,65 @@
|
|||||||
image: function(value) {
|
image: function(value) {
|
||||||
if (value) {
|
if (value) {
|
||||||
// 调用element的图片上传组件
|
// 调用element的图片上传组件
|
||||||
document.querySelector('.chapter-avatar-uploader input').click()
|
document
|
||||||
|
.querySelector(".chapter-avatar-uploader input")
|
||||||
|
.click();
|
||||||
} else {
|
} else {
|
||||||
this.quill.format('image', false)
|
this.quill.format("image", false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
placeholder: "请输入"+this.dataInfo.label
|
||||||
placeholder: '请输入正文',
|
|
||||||
},
|
},
|
||||||
visible: false,
|
visible: false,
|
||||||
props: {
|
props: {
|
||||||
dictType: '',
|
dictType: "",
|
||||||
dictValue: ''
|
dictValue: ""
|
||||||
},
|
},
|
||||||
gushuList: [],
|
gushuList: [],
|
||||||
authorList: [],
|
authorList: [],
|
||||||
restaurants: [],
|
restaurants: [],
|
||||||
author: '',
|
author: "",
|
||||||
publisherList: [],
|
publisherList: [],
|
||||||
fileList: [],
|
fileList: [],
|
||||||
fileListNovel: [],
|
fileListNovel: [],
|
||||||
dialogImageUrl: '',
|
dialogImageUrl: "",
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
dataForm: {
|
dataForm: {
|
||||||
"courseId": 0,
|
courseId: 0,
|
||||||
"catalogueId": 0,
|
catalogueId: 0,
|
||||||
"title": "",
|
title: "",
|
||||||
"imgUrl": "",
|
imgUrl: "",
|
||||||
"content": "",
|
content: "",
|
||||||
"sort": 1,
|
sort: 1
|
||||||
},
|
},
|
||||||
splitsTypeList: [],
|
splitsTypeList: [],
|
||||||
dataRule: {
|
dataRule: {}
|
||||||
|
};
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
quillEditor
|
quillEditor
|
||||||
},
|
},
|
||||||
created() {
|
created() {},
|
||||||
},
|
mounted() {},
|
||||||
mounted() {
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
contentUploadSuccess(res, file) {
|
contentUploadSuccess(res, file) {
|
||||||
// console.log(res)
|
// console.log(res)
|
||||||
let quill = this.$refs.myQuillEditor.quill
|
let quill = this.$refs.myQuillEditor.quill;
|
||||||
// 如果上传成功
|
// 如果上传成功
|
||||||
if (res) {
|
if (res) {
|
||||||
// 获取光标所在位置
|
// 获取光标所在位置
|
||||||
let length = quill.getSelection().index;
|
let length = quill.getSelection().index;
|
||||||
// 插入图片,res为服务器返回的图片链接地址
|
// 插入图片,res为服务器返回的图片链接地址
|
||||||
quill.insertEmbed(length, 'image', res.url)
|
quill.insertEmbed(length, "image", res.url);
|
||||||
// 调整光标到最后
|
// 调整光标到最后
|
||||||
quill.setSelection(length + 1)
|
quill.setSelection(length + 1);
|
||||||
} else {
|
} else {
|
||||||
// 提示信息,需引入Message
|
// 提示信息,需引入Message
|
||||||
this.$message.error('图片插入失败!')
|
this.$message.error("图片插入失败!");
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
// 失去焦点事件
|
// 失去焦点事件
|
||||||
onEditorBlur(quill) {
|
onEditorBlur(quill) {
|
||||||
@@ -160,59 +153,62 @@
|
|||||||
// console.log('editor ready!', quill)
|
// console.log('editor ready!', quill)
|
||||||
},
|
},
|
||||||
init(row, catalogue_id, courseid) {
|
init(row, catalogue_id, courseid) {
|
||||||
console.log('row21', row)
|
console.log("row21", row);
|
||||||
this.dataForm =row? JSON.parse(JSON.stringify(row)): {}
|
this.dataForm = row ? JSON.parse(JSON.stringify(row)) : {};
|
||||||
this.dataForm.courseId = courseid?courseid : ''
|
this.dataForm.courseId = courseid ? courseid : "";
|
||||||
this.dataForm.catalogueId = catalogue_id?catalogue_id : ''
|
this.dataForm.catalogueId = catalogue_id ? catalogue_id : "";
|
||||||
this.visible = true
|
this.visible = true;
|
||||||
if (this.dataForm.imgUrl && this.dataForm.imgUrl != "") {
|
if (this.dataForm.imgUrl && this.dataForm.imgUrl != "") {
|
||||||
var img = {
|
var img = {
|
||||||
name: '',
|
name: "",
|
||||||
url: this.dataForm.imgUrl
|
url: this.dataForm.imgUrl
|
||||||
}
|
};
|
||||||
var attr = []
|
var attr = [];
|
||||||
attr.push(img)
|
attr.push(img);
|
||||||
this.fileList = attr
|
this.fileList = attr;
|
||||||
} else {
|
} else {
|
||||||
this.fileList = []
|
this.fileList = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
// 表单提交
|
// 表单提交
|
||||||
dataFormSubmit() {
|
dataFormSubmit() {
|
||||||
this.$refs['dataForm'].validate((valid) => {
|
this.$refs["dataForm"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$http({
|
this.$http({
|
||||||
url: this.$http.adornUrl(`${!this.dataForm.id ? '/master/course/addCourseCatalogueChapter' : '/master/course/editCourseCatalogueChapter'}`),
|
url: this.$http.adornUrl(
|
||||||
method: 'post',
|
`${
|
||||||
|
!this.dataForm.id
|
||||||
|
? "/master/course/addCourseCatalogueChapter"
|
||||||
|
: "/master/course/editCourseCatalogueChapter"
|
||||||
|
}`
|
||||||
|
),
|
||||||
|
method: "post",
|
||||||
data: this.$http.adornData({
|
data: this.$http.adornData({
|
||||||
"id": this.dataForm.id || undefined,
|
id: this.dataForm.id || undefined,
|
||||||
'courseId': this.dataForm.courseId || undefined,
|
courseId: this.dataForm.courseId || undefined,
|
||||||
'catalogueId': this.dataForm.catalogueId || undefined,
|
catalogueId: this.dataForm.catalogueId || undefined,
|
||||||
'title': this.dataForm.title,
|
title: this.dataForm.title,
|
||||||
"imgUrl": this.dataForm.imgUrl,
|
imgUrl: this.dataForm.imgUrl,
|
||||||
"content": this.dataForm.content,
|
content: this.dataForm.content,
|
||||||
"sort": this.dataForm.sort,
|
sort: this.dataForm.sort
|
||||||
})
|
})
|
||||||
}).then(({
|
}).then(({ data }) => {
|
||||||
data
|
|
||||||
}) => {
|
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
this.$message({
|
this.$message({
|
||||||
message: '操作成功',
|
message: "操作成功",
|
||||||
type: 'success',
|
type: "success",
|
||||||
duration: 1500,
|
duration: 1500,
|
||||||
onClose: () => {
|
onClose: () => {
|
||||||
this.visible = false
|
this.visible = false;
|
||||||
this.$emit('refreshDataList')
|
this.$emit("refreshDataList");
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(data.msg)
|
this.$message.error(data.msg);
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
handlePicSuccess(res, file) {
|
handlePicSuccess(res, file) {
|
||||||
if (res.msg == "success") {
|
if (res.msg == "success") {
|
||||||
@@ -223,35 +219,37 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleRemove(file) {
|
handleRemove(file) {
|
||||||
this.dataForm.imgUrl = '';
|
this.dataForm.imgUrl = "";
|
||||||
},
|
},
|
||||||
handlePictureCardPreview(file) {
|
handlePictureCardPreview(file) {
|
||||||
this.dataForm.imgUrl = file.url;
|
this.dataForm.imgUrl = file.url;
|
||||||
this.dialogVisible = true;
|
this.dialogVisible = true;
|
||||||
},
|
},
|
||||||
handleDownload(file) {
|
handleDownload(file) {
|
||||||
console.log(file)
|
console.log(file);
|
||||||
},
|
},
|
||||||
handlereset() {
|
handlereset() {
|
||||||
this.fileList = [],
|
(this.fileList = []), (this.fileListNovel = []), (this.visible = false);
|
||||||
this.fileListNovel = [],
|
|
||||||
this.visible = false
|
|
||||||
},
|
},
|
||||||
handlePreview(file) {
|
handlePreview(file) {
|
||||||
console.log(file);
|
console.log(file);
|
||||||
},
|
},
|
||||||
handleExceed(files, fileList) {
|
handleExceed(files, fileList) {
|
||||||
this.$message.warning(`当前限制选择 3 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`);
|
this.$message.warning(
|
||||||
|
`当前限制选择 3 个文件,本次选择了 ${
|
||||||
|
files.length
|
||||||
|
} 个文件,共选择了 ${files.length + fileList.length} 个文件`
|
||||||
|
);
|
||||||
},
|
},
|
||||||
beforeRemove(file, fileList) {
|
beforeRemove(file, fileList) {
|
||||||
return this.$confirm(`确定移除 ${file.name}?`);
|
return this.$confirm(`确定移除 ${file.name}?`);
|
||||||
},
|
},
|
||||||
handleRemoveNovel(file) {
|
handleRemoveNovel(file) {
|
||||||
this.dataForm.novel = '';
|
this.dataForm.novel = "";
|
||||||
},
|
},
|
||||||
handleNovelSuccess(file) {
|
handleNovelSuccess(file) {
|
||||||
this.dataForm.novel = file.url
|
this.dataForm.novel = file.url;
|
||||||
},
|
}
|
||||||
// querySearch(queryString, cb) {
|
// querySearch(queryString, cb) {
|
||||||
// var restaurants = this.restaurants;
|
// var restaurants = this.restaurants;
|
||||||
// var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
|
// var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
|
||||||
@@ -269,6 +267,5 @@
|
|||||||
// console.log(item);
|
// console.log(item);
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
};
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,127 +1,17 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="mod-config">
|
<div class="mod-config" style="height: calc(100vh - 180px)">
|
||||||
<el-form
|
<el-tabs tab-position="left" style="height: 100%;">
|
||||||
:inline="true"
|
<el-tab-pane :label="v.label" v-for="(v, i) in setList" :key="i" style="height: 100%;">
|
||||||
: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>
|
|
||||||
<!-- <el-button
|
|
||||||
@click="
|
|
||||||
pageIndex = 1;
|
|
||||||
getDataList();
|
|
||||||
"
|
|
||||||
>查询</el-button
|
|
||||||
> -->
|
|
||||||
<el-button type="primary" @click="addOrUpdateHandle()">新增</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</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="图片">
|
|
||||||
<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="内容"
|
|
||||||
>
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<div class="hidden1">
|
|
||||||
{{ scope.row.content }}
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="sort"
|
|
||||||
width="100"
|
|
||||||
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 }
|
|
||||||
}"
|
|
||||||
>
|
|
||||||
<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
|
<add-or-update
|
||||||
v-if="addOrUpdateVisible"
|
:dataInfo="v"
|
||||||
|
style="height: calc(100vh - 180px)"
|
||||||
ref="addOrUpdate"
|
ref="addOrUpdate"
|
||||||
@refreshDataList="getDataList"
|
@refreshDataList="getDataList"
|
||||||
></add-or-update>
|
></add-or-update>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
|
||||||
|
<!-- 弹窗, 新增 / 修改 -->
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -130,6 +20,12 @@ import AddOrUpdate from "./chapter-add-or-update";
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
setList: [
|
||||||
|
{ label: "购买须知", id: 1 },
|
||||||
|
{ label: "使用须知", id: 2 },
|
||||||
|
{ label: "学习次序", id: 3 },
|
||||||
|
{ label: "超V用户", id: 4 }
|
||||||
|
],
|
||||||
dataForm: {
|
dataForm: {
|
||||||
key: ""
|
key: ""
|
||||||
},
|
},
|
||||||
@@ -348,4 +244,7 @@ export default {
|
|||||||
|
|
||||||
-webkit-box-orient: vertical;
|
-webkit-box-orient: vertical;
|
||||||
}
|
}
|
||||||
|
::v-deep .mod-config .el-tabs .el-tabs__content {
|
||||||
|
height: 100% !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,127 +1,17 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="mod-config">
|
<div class="mod-config" style="height: calc(100vh - 180px)">
|
||||||
<el-form
|
<el-tabs tab-position="left" style="height: 100%;">
|
||||||
:inline="true"
|
<el-tab-pane :label="v.label" v-for="(v, i) in setList" :key="i" style="height: 100%;">
|
||||||
: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>
|
|
||||||
<!-- <el-button
|
|
||||||
@click="
|
|
||||||
pageIndex = 1;
|
|
||||||
getDataList();
|
|
||||||
"
|
|
||||||
>查询</el-button
|
|
||||||
> -->
|
|
||||||
<el-button type="primary" @click="addOrUpdateHandle()">新增</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</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="图片">
|
|
||||||
<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="内容"
|
|
||||||
>
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<div class="hidden1">
|
|
||||||
{{ scope.row.content }}
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="sort"
|
|
||||||
width="100"
|
|
||||||
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 }
|
|
||||||
}"
|
|
||||||
>
|
|
||||||
<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
|
<add-or-update
|
||||||
v-if="addOrUpdateVisible"
|
:dataInfo="v"
|
||||||
|
style="height: calc(100vh - 180px)"
|
||||||
ref="addOrUpdate"
|
ref="addOrUpdate"
|
||||||
@refreshDataList="getDataList"
|
@refreshDataList="getDataList"
|
||||||
></add-or-update>
|
></add-or-update>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
|
||||||
|
<!-- 弹窗, 新增 / 修改 -->
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -130,6 +20,12 @@ import AddOrUpdate from "./chapter-add-or-update";
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
setList: [
|
||||||
|
{ label: "购买须知", id: 1 },
|
||||||
|
{ label: "使用须知", id: 2 },
|
||||||
|
{ label: "学习次序", id: 3 },
|
||||||
|
{ label: "超V用户", id: 4 }
|
||||||
|
],
|
||||||
dataForm: {
|
dataForm: {
|
||||||
key: ""
|
key: ""
|
||||||
},
|
},
|
||||||
@@ -348,4 +244,7 @@ export default {
|
|||||||
|
|
||||||
-webkit-box-orient: vertical;
|
-webkit-box-orient: vertical;
|
||||||
}
|
}
|
||||||
|
::v-deep .mod-config .el-tabs .el-tabs__content {
|
||||||
|
height: 100% !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -40,7 +40,33 @@
|
|||||||
import {
|
import {
|
||||||
quillEditor
|
quillEditor
|
||||||
} from 'vue-quill-editor'
|
} from 'vue-quill-editor'
|
||||||
|
const toolbarOptions = [
|
||||||
|
["bold", "italic", "underline", "strike"], // 加粗,斜体,下划线,删除线
|
||||||
|
["blockquote", "code-block"], //引用,代码块
|
||||||
|
[{ header: 1 }, { header: 2 }], // 几级标题
|
||||||
|
[{ list: "ordered" }, { list: "bullet" }], // 有序列表,无序列表
|
||||||
|
[{ script: "sub" }, { script: "super" }], // 下角标,上角标
|
||||||
|
[{ indent: "-1" }, { indent: "+1" }], // 缩进
|
||||||
|
[{ direction: "rtl" }], // 文字输入方向
|
||||||
|
[{ size: ["small", false, "large", "huge"] }], // 字体大小
|
||||||
|
[{ header: [1, 2, 3, 4, 5, 6, false] }], // 标题
|
||||||
|
[{ color: [] }, { background: [] }], // 颜色选择
|
||||||
|
[
|
||||||
|
{
|
||||||
|
font: [
|
||||||
|
"SimSun",
|
||||||
|
"SimHei",
|
||||||
|
"Microsoft-YaHei",
|
||||||
|
"KaiTi",
|
||||||
|
"FangSong",
|
||||||
|
"Arial"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
], // 字体
|
||||||
|
[{ align: [] }], // 居中
|
||||||
|
["clean"], // 清除样式,
|
||||||
|
["link", "image"] // 上传图片、上传视频
|
||||||
|
];
|
||||||
import 'quill/dist/quill.core.css'
|
import 'quill/dist/quill.core.css'
|
||||||
import 'quill/dist/quill.snow.css'
|
import 'quill/dist/quill.snow.css'
|
||||||
import 'quill/dist/quill.bubble.css'
|
import 'quill/dist/quill.bubble.css'
|
||||||
@@ -88,50 +114,10 @@
|
|||||||
],
|
],
|
||||||
editorOption: {
|
editorOption: {
|
||||||
modules: {
|
modules: {
|
||||||
toolbar: [
|
toolbar: {
|
||||||
['bold', 'italic', 'underline', 'strike'], // 加粗 斜体 下划线 删除线
|
container: toolbarOptions,
|
||||||
['blockquote', 'code-block'], // 引用 代码块
|
|
||||||
[{
|
}
|
||||||
header: 1
|
|
||||||
}, {
|
|
||||||
header: 2
|
|
||||||
}], // 1、2 级标题
|
|
||||||
[{
|
|
||||||
list: 'ordered'
|
|
||||||
}, {
|
|
||||||
list: 'bullet'
|
|
||||||
}], // 有序、无序列表
|
|
||||||
[{
|
|
||||||
script: 'sub'
|
|
||||||
}, {
|
|
||||||
script: 'super'
|
|
||||||
}], // 上标/下标
|
|
||||||
[{
|
|
||||||
indent: '-1'
|
|
||||||
}, {
|
|
||||||
indent: '+1'
|
|
||||||
}], // 缩进
|
|
||||||
[{
|
|
||||||
direction: 'rtl'
|
|
||||||
}], // 文本方向
|
|
||||||
[{
|
|
||||||
size: ['12', '14', '16', '18', '20', '22', '24', '28', '32', '36']
|
|
||||||
}], // 字体大小
|
|
||||||
[{
|
|
||||||
header: [1, 2, 3, 4, 5, 6]
|
|
||||||
}], // 标题
|
|
||||||
[{
|
|
||||||
color: []
|
|
||||||
}, {
|
|
||||||
background: []
|
|
||||||
}], // 字体颜色、字体背景颜色
|
|
||||||
// [{ font: ['songti'] }], // 字体种类
|
|
||||||
[{
|
|
||||||
align: []
|
|
||||||
}], // 对齐方式
|
|
||||||
['clean'], // 清除文本格式
|
|
||||||
['image', 'video'] // 链接、图片、视频
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
placeholder: '请输入正文'
|
placeholder: '请输入正文'
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user