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

页面修改

parent a6644d90
...@@ -4,70 +4,7 @@ import request from '../../utils/request' ...@@ -4,70 +4,7 @@ import request from '../../utils/request'
* 获取富文本编辑器Toolbar * 获取富文本编辑器Toolbar
*/ */
export function getToolBarConfig() { 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 []; return [];
} }
......
...@@ -15,8 +15,8 @@ ...@@ -15,8 +15,8 @@
tipText="课程分类" @getChild="getChild"></selectTree> tipText="课程分类" @getChild="getChild"></selectTree>
</div> </div>
<div class="col-6 q-pb-lg upload-assiatant-box"> <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/*" <q-uploader :style="{backgroundImage:'url(' + objOption.CoverImg + ')'}" flat hide-upload-btn max-files="1"
:factory="uploadFile" auto-upload> label="课程封面" :max-file-size="512*1024" accept=".jpg, image/*" :factory="uploadFile" auto-upload>
</q-uploader> </q-uploader>
</div> </div>
</div> </div>
...@@ -83,7 +83,70 @@ ...@@ -83,7 +83,70 @@
}, },
methods: { methods: {
initToolBar() { 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(); this.fonts = getFontConfig();
}, },
getChild(obj) { getChild(obj) {
...@@ -114,7 +177,7 @@ ...@@ -114,7 +177,7 @@
this.objOption.CourseName = res.Data.CourseName; this.objOption.CourseName = res.Data.CourseName;
this.objOption.CourseIntro = res.Data.CourseIntro; this.objOption.CourseIntro = res.Data.CourseIntro;
this.objOption.CateId = res.Data.CateId; this.objOption.CateId = res.Data.CateId;
this.returnString=res.Data.CateId; this.returnString = res.Data.CateId;
}) })
this.optionTitle = "修改课程信息" this.optionTitle = "修改课程信息"
} else { } else {
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div class="page-search row items-center"> <div class="page-search row items-center">
<div class="col row wrap q-mr-lg q-col-gutter-md"> <div class="col row wrap q-mr-lg q-col-gutter-md">
<div class="col-3"> <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="课程名称" /> label="课程名称" />
</div> </div>
<div class="col-3"> <div class="col-3">
...@@ -30,6 +30,11 @@ ...@@ -30,6 +30,11 @@
</q-avatar> </q-avatar>
</q-td> </q-td>
</template> </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"> <template v-slot:body-cell-Status="props">
<q-td :props="props"> <q-td :props="props">
<q-badge :color="props.value==1?'negative':'primary'" :label="props.value==0?'正常':'禁用'" /> <q-badge :color="props.value==1?'negative':'primary'" :label="props.value==0?'正常':'禁用'" />
...@@ -41,6 +46,8 @@ ...@@ -41,6 +46,8 @@
</template> </template>
<template v-slot:body-cell-optioned="props"> <template v-slot:body-cell-optioned="props">
<q-td :props="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="编辑" <q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="编辑"
@click="EditCourse(props.row)" /> @click="EditCourse(props.row)" />
</q-td> </q-td>
...@@ -148,10 +155,8 @@ ...@@ -148,10 +155,8 @@
pageIndex: 1, pageIndex: 1,
pageSize: 12, pageSize: 12,
rowsPerPage: 12, rowsPerPage: 12,
MenuName: "", CourseName: "",
MenuUrl: "", QCateIds: "",
MenuLevel: -1,
MenuType: -1,
Status: "-1", Status: "-1",
}, },
//课程分类树形列表 //课程分类树形列表
...@@ -168,8 +173,20 @@ ...@@ -168,8 +173,20 @@
this.getcourselist(); this.getcourselist();
}, },
methods: { 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() { getCategorytree() {
this.TreeCategoryList = []; 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