Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
confucius
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
罗超
confucius
Commits
1249f642
Commit
1249f642
authored
Oct 16, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
a6644d90
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
92 additions
and
75 deletions
+92
-75
common.js
src/api/common/common.js
+1
-64
course-form.vue
src/components/course/course-form.vue
+67
-4
course.vue
src/pages/course/course.vue
+24
-7
No files found.
src/api/common/common.js
View file @
1249f642
...
...
@@ -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
[];
}
...
...
src/components/course/course-form.vue
View file @
1249f642
...
...
@@ -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
{
...
...
src/pages/course/course.vue
View file @
1249f642
...
...
@@ -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.
Menu
Name"
<q-input
@
change=
"resetSearch"
clearable
standout=
"bg-primary text-white"
v-model=
"msg.
Course
Name"
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
=
[];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment