Commit 1249f642 authored by 黄奎's avatar 黄奎

页面修改

parent a6644d90
......@@ -4,70 +4,7 @@ import request from '../../utils/request'
* 获取富文本编辑器Toolbar
*/
export function getToolBarConfig() {
// return [
// [{
// label: '对齐',
// icon: this.$q.iconSet.editor.align,
// fixedLabel: true,
// list: 'only-icons',
// options: ['left', 'center', 'right', 'justify']
// }],
// ['bold', 'italic', 'strike', 'underline', 'subscript', 'superscript'],
// [{
// label: '格式',
// icon: this.$q.iconSet.editor.formatting,
// list: 'no-icons',
// fixedLabel: true,
// fixedIcon: true,
// options: [
// 'p',
// 'h1',
// 'h2',
// 'h3',
// 'h4',
// 'h5',
// 'h6',
// 'code'
// ]
// },
// {
// label: '字号',
// icon: this.$q.iconSet.editor.fontSize,
// fixedLabel: true,
// fixedIcon: true,
// list: 'no-icons',
// options: [
// 'size-1',
// 'size-2',
// 'size-3',
// 'size-4',
// 'size-5',
// 'size-6',
// 'size-7'
// ]
// },
// {
// label: '字体',
// icon: this.$q.iconSet.editor.font,
// fixedLabel: true,
// fixedIcon: true,
// list: 'no-icons',
// options: [
// 'default_font',
// 'arial',
// 'arial_black',
// 'comic_sans',
// 'courier_new',
// 'impact',
// 'lucida_grande',
// 'times_new_roman',
// 'verdana'
// ]
// },
// 'removeFormat'
// ],
// ['ordered', 'outdent', 'indent'],
// ];
return [];
}
......
......@@ -15,8 +15,8 @@
tipText="课程分类" @getChild="getChild"></selectTree>
</div>
<div class="col-6 q-pb-lg upload-assiatant-box">
<q-uploader :style="{backgroundImage:'url(' + objOption.CoverImg + ')'}" flat hide-upload-btn max-files="1" label="课程封面" :max-file-size="512*1024" accept=".jpg, image/*"
:factory="uploadFile" auto-upload>
<q-uploader :style="{backgroundImage:'url(' + objOption.CoverImg + ')'}" flat hide-upload-btn max-files="1"
label="课程封面" :max-file-size="512*1024" accept=".jpg, image/*" :factory="uploadFile" auto-upload>
</q-uploader>
</div>
</div>
......@@ -83,7 +83,70 @@
},
methods: {
initToolBar() {
this.toolbar = getToolBarConfig();
this.toolbar = [
[{
label: '对齐',
icon: this.$q.iconSet.editor.align,
fixedLabel: true,
list: 'only-icons',
options: ['left', 'center', 'right', 'justify']
}],
['bold', 'italic', 'strike', 'underline', 'subscript', 'superscript'],
[{
label: '格式',
icon: this.$q.iconSet.editor.formatting,
list: 'no-icons',
fixedLabel: true,
fixedIcon: true,
options: [
'p',
'h1',
'h2',
'h3',
'h4',
'h5',
'h6',
'code'
]
},
{
label: '字号',
icon: this.$q.iconSet.editor.fontSize,
fixedLabel: true,
fixedIcon: true,
list: 'no-icons',
options: [
'size-1',
'size-2',
'size-3',
'size-4',
'size-5',
'size-6',
'size-7'
]
},
{
label: '字体',
icon: this.$q.iconSet.editor.font,
fixedLabel: true,
fixedIcon: true,
list: 'no-icons',
options: [
'default_font',
'arial',
'arial_black',
'comic_sans',
'courier_new',
'impact',
'lucida_grande',
'times_new_roman',
'verdana'
]
},
'removeFormat'
],
['ordered', 'outdent', 'indent'],
];
this.fonts = getFontConfig();
},
getChild(obj) {
......@@ -114,7 +177,7 @@
this.objOption.CourseName = res.Data.CourseName;
this.objOption.CourseIntro = res.Data.CourseIntro;
this.objOption.CateId = res.Data.CateId;
this.returnString=res.Data.CateId;
this.returnString = res.Data.CateId;
})
this.optionTitle = "修改课程信息"
} else {
......
......@@ -3,7 +3,7 @@
<div class="page-search row items-center">
<div class="col row wrap q-mr-lg q-col-gutter-md">
<div class="col-3">
<q-input @change="resetSearch" clearable standout="bg-primary text-white" v-model="msg.MenuName"
<q-input @change="resetSearch" clearable standout="bg-primary text-white" v-model="msg.CourseName"
label="课程名称" />
</div>
<div class="col-3">
......@@ -30,6 +30,11 @@
</q-avatar>
</q-td>
</template>
<template v-slot:body-cell-CourseIntro="props">
<q-td :props="props">
<span v-html="props.value"></span>
</q-td>
</template>
<template v-slot:body-cell-Status="props">
<q-td :props="props">
<q-badge :color="props.value==1?'negative':'primary'" :label="props.value==0?'正常':'禁用'" />
......@@ -41,6 +46,8 @@
</template>
<template v-slot:body-cell-optioned="props">
<q-td :props="props">
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="教案"
@click="EditCourse(props.row)"></q-btn>
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="编辑"
@click="EditCourse(props.row)" />
</q-td>
......@@ -148,10 +155,8 @@
pageIndex: 1,
pageSize: 12,
rowsPerPage: 12,
MenuName: "",
MenuUrl: "",
MenuLevel: -1,
MenuType: -1,
CourseName: "",
QCateIds: "",
Status: "-1",
},
//课程分类树形列表
......@@ -168,8 +173,20 @@
this.getcourselist();
},
methods: {
getChild(obj) {
console.log("obj", obj);
//分类改变
getChild(cateArray) {
var tempStr = "";
if (cateArray && Array.isArray(cateArray) && cateArray.length > 0) {
cateArray.forEach(item => {
tempStr += "," + item;
})
}
if (tempStr != '') {
tempStr = tempStr.substring(1, tempStr.length);
}
this.msg.QCateIds = tempStr;
this.msg.pageIndex = 1;
this.getcourselist();
},
getCategorytree() {
this.TreeCategoryList = [];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment