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
4458daf1
Commit
4458daf1
authored
Oct 16, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
7601d90b
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
120 additions
and
77 deletions
+120
-77
index.js
src/api/course/index.js
+29
-7
ext-editor.vue
src/components/common/ext-editor.vue
+15
-5
select-tree.vue
src/components/common/select-tree.vue
+6
-7
course-form.vue
src/components/course/course-form.vue
+7
-3
teachplan-form.vue
src/components/course/teachplan-form.vue
+51
-41
course.vue
src/pages/course/course.vue
+2
-1
teachplan.vue
src/pages/course/teachplan.vue
+10
-13
No files found.
src/api/course/index.js
View file @
4458daf1
...
@@ -135,11 +135,33 @@ export function updateCourseTeacher(data) {
...
@@ -135,11 +135,33 @@ export function updateCourseTeacher(data) {
* 获取课程教案分页
* 获取课程教案分页
* @param {JSON对象} data
* @param {JSON对象} data
*/
*/
export
function
queryTeachPlanPage
(
data
)
export
function
queryTeachPlanPage
(
data
)
{
{
return
request
({
return
request
({
url
:
"/Course/GetCourseTeachPlanPage"
,
url
:
"/Course/GetCourseTeachPlanPage"
,
method
:
'post'
,
method
:
'post'
,
data
data
})
})
}
/**
* 获取课程教案信息
*/
export
function
queryTeachPlanInfo
(
data
)
{
return
request
({
url
:
"/Course/GetTeachPlan"
,
method
:
'post'
,
data
})
}
/**
* 保存课程教案
* @param {JSON数据} data
*/
export
function
saveTeachPlanInfo
(
data
)
{
return
request
({
url
:
"/Course/SetTeachPlan"
,
method
:
'post'
,
data
})
}
}
src/components/common/editor.vue
→
src/components/common/e
xt-e
ditor.vue
View file @
4458daf1
<
template
>
<
template
>
<q-editor
:toolbar=
"toolbar"
:fonts=
"fonts"
v-model=
"
defaul
tMsg"
:class=
"classStr"
<q-editor
:toolbar=
"toolbar"
:fonts=
"fonts"
v-model=
"
edi
tMsg"
:class=
"classStr"
:definitions=
"
{bold: {label: 'Bold', icon: null, tip: 'My bold tooltip'}}" />
:definitions=
"
{bold: {label: 'Bold', icon: null, tip: 'My bold tooltip'}}"
@input="getEditorValue"
/>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
import
{
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
}
from
'../../api/common/common'
}
from
'../../api/common/common'
export
default
{
export
default
{
props
:
{
props
:
{
//
树形结构列表
//
默认数据
defaultMsg
:
{
defaultMsg
:
{
type
:
String
,
type
:
String
,
default
:
""
default
:
""
...
@@ -20,17 +20,28 @@
...
@@ -20,17 +20,28 @@
},
},
data
()
{
data
()
{
return
{
return
{
editMsg
:
""
,
toolbar
:
[],
toolbar
:
[],
fonts
:
{},
fonts
:
{},
}
}
},
},
watch
:
{
watch
:
{
defaultMsg
:
{
handler
(
newValue
)
{
this
.
editMsg
=
this
.
defaultMsg
;
},
immediate
:
true
}
},
},
mounted
()
{
mounted
()
{
this
.
initToolBar
();
this
.
initToolBar
();
},
},
methods
:
{
methods
:
{
//获取编辑器值
getEditorValue
()
{
this
.
$emit
(
'getEditValue'
,
this
.
editMsg
);
},
//初始化配置
initToolBar
()
{
initToolBar
()
{
this
.
toolbar
=
[
this
.
toolbar
=
[
[{
[{
...
@@ -98,7 +109,6 @@
...
@@ -98,7 +109,6 @@
];
];
this
.
fonts
=
getFontConfig
();
this
.
fonts
=
getFontConfig
();
},
},
}
}
}
}
...
...
src/components/common/select-tree.vue
View file @
4458daf1
...
@@ -42,7 +42,6 @@
...
@@ -42,7 +42,6 @@
defaultArray
:
{
defaultArray
:
{
type
:
Array
,
type
:
Array
,
required
:
true
,
required
:
true
,
},
},
//节点Key
//节点Key
nodeKey
:
{
nodeKey
:
{
...
@@ -95,9 +94,9 @@
...
@@ -95,9 +94,9 @@
}
}
this
.
setTreeCheckNode
()
this
.
setTreeCheckNode
()
},
},
defaultArray
(
val
)
{
defaultArray
:
{
if
(
val
)
{
handler
(
newValue
)
{
if
(
this
.
defaultArray
&&
Array
.
isArray
(
this
.
defaultArray
)
&&
this
.
defaultArray
.
length
>
0
)
{
if
(
this
.
defaultArray
&&
this
.
defaultArray
.
length
>
0
)
{
this
.
defaultArray
.
forEach
(
item
=>
{
this
.
defaultArray
.
forEach
(
item
=>
{
if
(
item
!=
''
)
{
if
(
item
!=
''
)
{
if
(
this
.
multiple
)
{
if
(
this
.
multiple
)
{
...
@@ -109,11 +108,11 @@
...
@@ -109,11 +108,11 @@
})
})
}
}
this
.
setTreeCheckNode
();
this
.
setTreeCheckNode
();
}
},
immediate
:
true
}
}
},
},
mounted
()
{
mounted
()
{},
},
methods
:
{
methods
:
{
//全选
//全选
checkAll
()
{
checkAll
()
{
...
...
src/components/course/course-form.vue
View file @
4458daf1
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
</div>
</div>
<div
class=
"text-caption q-my-md q-px-xs text-grey-6"
>
课程介绍
<div
class=
"text-caption q-my-md q-px-xs text-grey-6"
>
课程介绍
</div>
</div>
<e
ditor
:defaultMsg=
"objOption.CourseIntro"
classStr=
"col-12"
></
editor>
<e
xt-editor
:defaultMsg=
"objOption.CourseIntro"
classStr=
"col-12"
@
getEditValue=
"getEditValue"
></ext-
editor>
</q-card-section>
</q-card-section>
<q-separator
/>
<q-separator
/>
<q-card-actions
align=
"right"
class=
"bg-white"
>
<q-card-actions
align=
"right"
class=
"bg-white"
>
...
@@ -45,11 +45,11 @@
...
@@ -45,11 +45,11 @@
UploadSelfFile
UploadSelfFile
}
from
'../../api/common/common'
}
from
'../../api/common/common'
import
selectTree
from
'../common/select-tree'
import
selectTree
from
'../common/select-tree'
import
e
ditor
from
'../common/
editor'
import
e
xtEditor
from
'../common/ext-
editor'
export
default
{
export
default
{
components
:
{
components
:
{
selectTree
,
selectTree
,
editor
,
e
xtE
ditor
,
},
},
props
:
{
props
:
{
saveObj
:
{
saveObj
:
{
...
@@ -78,6 +78,10 @@
...
@@ -78,6 +78,10 @@
this
.
initObj
()
this
.
initObj
()
},
},
methods
:
{
methods
:
{
//获取编辑器值
getEditValue
(
obj
)
{
this
.
objOption
.
CourseIntro
=
obj
;
},
getChild
(
obj
)
{
getChild
(
obj
)
{
this
.
objOption
.
CateId
=
obj
;
this
.
objOption
.
CateId
=
obj
;
},
},
...
...
src/components/course/teachplan-form.vue
View file @
4458daf1
...
@@ -7,18 +7,21 @@
...
@@ -7,18 +7,21 @@
<q-card-section
class=
"q-pt-none scroll"
style=
"max-height: 70vh"
>
<q-card-section
class=
"q-pt-none scroll"
style=
"max-height: 70vh"
>
<div
class=
"text-caption q-mb-lg q-px-md text-grey-6"
>
教案信息
</div>
<div
class=
"text-caption q-mb-lg q-px-md text-grey-6"
>
教案信息
</div>
<div
class=
"row wrap"
>
<div
class=
"row wrap"
>
<q-input
filled
stack-label
maxlength=
"20"
:dense=
"false"
v-model=
"objOption.
CourseName"
ref=
"Course
Name"
<q-input
filled
stack-label
maxlength=
"20"
:dense=
"false"
v-model=
"objOption.
PlanName"
ref=
"Plan
Name"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"教案名称"
:rules=
"[val => !!val || '请填写教案名称']"
/>
class=
"col-6 q-pr-lg q-pb-lg"
label=
"教案名称"
:rules=
"[val => !!val || '请填写教案名称']"
/>
<!--
<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>
</div>
-->
</div>
</div>
<div
class=
"text-caption q-my-md q-px-xs text-grey-6"
>
课前
<editor
:defaultMsg=
"objOption.CourseIntro"
classStr=
"col-12"
>
</div>
</editor>
<ext-editor
:defaultMsg=
"objOption.ClassBefore"
classStr=
"col-12"
@
getEditValue=
"getEditValue1"
>
</ext-editor>
<div
class=
"text-caption q-my-md q-px-xs text-grey-6"
>
课中
</div>
<ext-editor
:defaultMsg=
"objOption.ClassIn"
classStr=
"col-12"
@
getEditValue=
"getEditValue2"
>
</ext-editor>
<div
class=
"text-caption q-my-md q-px-xs text-grey-6"
>
课后
</div>
<ext-editor
:defaultMsg=
"objOption.ClassAfter"
classStr=
"col-12"
@
getEditValue=
"getEditValue3"
>
</ext-editor>
</q-card-section>
</q-card-section>
<q-separator
/>
<q-separator
/>
<q-card-actions
align=
"right"
class=
"bg-white"
>
<q-card-actions
align=
"right"
class=
"bg-white"
>
...
@@ -32,15 +35,14 @@
...
@@ -32,15 +35,14 @@
<
script
>
<
script
>
import
{
import
{
queryCourseCategoryTree
,
queryTeachPlanInfo
,
saveCourseInfo
,
saveTeachPlanInfo
queryCourseInfo
,
}
from
'../../api/course/index'
}
from
'../../api/course/index'
import
e
ditor
from
'../common/
editor'
import
e
xtEditor
from
'../common/ext-
editor'
export
default
{
export
default
{
components
:
{
components
:
{
editor
e
xtE
ditor
},
},
props
:
{
props
:
{
saveObj
:
{
saveObj
:
{
...
@@ -53,18 +55,17 @@
...
@@ -53,18 +55,17 @@
persistent
:
true
,
persistent
:
true
,
objOption
:
{
objOption
:
{
PlanId
:
0
,
//教案编号
PlanId
:
0
,
//教案编号
CourseId
:
0
,
//课程编辑
CourseId
:
0
,
//课程编辑
PlanName
:
""
,
//教案名称
PlanName
:
""
,
//教案名称
ClassBefore
:
""
,
//课前
ClassBefore
:
""
,
//课前
ClassIn
:
""
,
//课中
ClassIn
:
""
,
//课中
ClassAfter
:
""
,
//课后
ClassAfter
:
""
,
//课后
ParentPlanId
:
0
,
//父级节点编号
ParentPlanId
:
0
,
//父级节点编号
SourceUrl
:
""
,
//源文件路径
SourceUrl
:
""
,
//源文件路径
PlanFileExtension
:
""
,
//文件后缀名
PlanFileExtension
:
""
,
//文件后缀名
PlanNodeType
:
0
,
//节点类型(0-文件,1-文件夹)
PlanNodeType
:
0
,
//节点类型(0-文件,1-文件夹)
ExtUrl
:
""
,
//上传生成文件路径
ExtUrl
:
""
,
//上传生成文件路径
Remark
:
""
,
//备注
Remark
:
""
,
//备注
CateId
:
0
,
//课程编号
},
},
optionTitle
:
""
,
optionTitle
:
""
,
saveCourseLoading
:
false
,
saveCourseLoading
:
false
,
...
@@ -75,6 +76,15 @@
...
@@ -75,6 +76,15 @@
this
.
initObj
()
this
.
initObj
()
},
},
methods
:
{
methods
:
{
getEditValue1
(
obj
)
{
this
.
objOption
.
ClassBefore
=
obj
;
},
getEditValue2
(
obj
)
{
this
.
objOption
.
ClassIn
=
obj
;
},
getEditValue3
(
obj
)
{
this
.
objOption
.
ClassAfter
=
obj
;
},
uploadFile
(
files
)
{
uploadFile
(
files
)
{
UploadSelfFile
(
'course'
,
files
[
0
],
res
=>
{
UploadSelfFile
(
'course'
,
files
[
0
],
res
=>
{
if
(
res
.
resultCode
==
1
)
{
if
(
res
.
resultCode
==
1
)
{
...
@@ -82,28 +92,28 @@
...
@@ -82,28 +92,28 @@
}
}
})
})
},
},
//初始化表单
//初始化表单
initObj
()
{
initObj
()
{
if
(
this
.
saveObj
&&
this
.
saveObj
.
Course
Id
>
0
)
{
if
(
this
.
saveObj
&&
this
.
saveObj
.
Plan
Id
>
0
)
{
query
Course
Info
({
query
TeachPlan
Info
({
CourseId
:
this
.
saveObj
.
Course
Id
PlanId
:
this
.
saveObj
.
Plan
Id
}).
then
(
res
=>
{
}).
then
(
res
=>
{
this
.
objOption
.
PlanName
=
res
.
Data
.
PlanName
;
this
.
objOption
.
PlanId
=
res
.
Data
.
PlanId
;
this
.
objOption
.
CourseId
=
res
.
Data
.
CourseId
;
this
.
objOption
.
CourseId
=
res
.
Data
.
CourseId
;
this
.
objOption
.
CoverImg
=
res
.
Data
.
CoverImg
;
this
.
objOption
.
ClassBefore
=
res
.
Data
.
ClassBefore
;
this
.
objOption
.
CourseName
=
res
.
Data
.
CourseName
;
this
.
objOption
.
ClassIn
=
res
.
Data
.
ClassIn
;
this
.
objOption
.
CourseIntro
=
res
.
Data
.
CourseIntro
;
this
.
objOption
.
ClassAfter
=
res
.
Data
.
ClassAfter
;
this
.
objOption
.
CateId
=
res
.
Data
.
CateId
;
this
.
objOption
.
ParentPlanId
=
res
.
Data
.
ParentPlanId
;
this
.
returnString
=
res
.
Data
.
CateId
;
this
.
objOption
.
SourceUrl
=
res
.
Data
.
SourceUrl
;
this
.
objOption
.
PlanFileExtension
=
res
.
Data
.
PlanFileExtension
;
this
.
objOption
.
PlanNodeType
=
res
.
Data
.
PlanNodeType
;
this
.
objOption
.
ExtUrl
=
res
.
Data
.
ExtUrl
;
this
.
objOption
.
Remark
=
res
.
Data
.
Remark
;
})
})
this
.
optionTitle
=
"修改
课程
信息"
this
.
optionTitle
=
"修改
教案
信息"
}
else
{
}
else
{
this
.
optionTitle
=
"新增课程"
this
.
optionTitle
=
"新增教案"
this
.
objOption
.
CourseId
=
0
;
this
.
objOption
.
CoverImg
=
""
;
this
.
objOption
.
CourseName
=
""
;
this
.
objOption
.
CourseIntro
=
""
;
this
.
objOption
.
CateId
=
0
;
}
}
},
},
//关闭弹窗
//关闭弹窗
...
@@ -114,7 +124,7 @@
...
@@ -114,7 +124,7 @@
//保存菜单
//保存菜单
saveCourse
()
{
saveCourse
()
{
this
.
saveCourseLoading
=
true
this
.
saveCourseLoading
=
true
save
Course
Info
(
this
.
objOption
).
then
(
res
=>
{
save
TeachPlan
Info
(
this
.
objOption
).
then
(
res
=>
{
this
.
saveCourseLoading
=
false
this
.
saveCourseLoading
=
false
this
.
$q
.
notify
({
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
icon
:
'iconfont icon-chenggong'
,
...
...
src/pages/course/course.vue
View file @
4458daf1
...
@@ -53,7 +53,8 @@
...
@@ -53,7 +53,8 @@
</q-td>
</q-td>
</
template
>
</
template
>
</q-table>
</q-table>
<course-form
v-if=
"isShowCourseForm"
:save-obj=
"courseObjOption"
@
close=
"closeMenuSaveForm"
@
success=
"refreshPage"
>
<course-form
v-if=
"isShowCourseForm"
:save-obj=
"courseObjOption"
@
close=
"closeMenuSaveForm"
@
success=
"refreshPage"
>
</course-form>
</course-form>
</div>
</div>
</div>
</div>
...
...
src/pages/course/teachplan.vue
View file @
4458daf1
...
@@ -53,7 +53,8 @@
...
@@ -53,7 +53,8 @@
</q-td>
</q-td>
</
template
>
</
template
>
</q-table>
</q-table>
<teachplan-form
v-if=
"isShowMenuForm"
:save-obj=
"menuObjOption"
@
close=
"closeMenuSaveForm"
@
success=
"refreshPage"
>
<teachplan-form
v-if=
"IsShowTeachForm"
:save-obj=
"teachPlanObj"
@
close=
"closeTeachSaveForm"
@
success=
"refreshPage"
>
</teachplan-form>
</teachplan-form>
</div>
</div>
</div>
</div>
...
@@ -88,7 +89,6 @@
...
@@ -88,7 +89,6 @@
align
:
'left'
,
align
:
'left'
,
field
:
row
=>
row
.
PlanName
field
:
row
=>
row
.
PlanName
},
},
{
{
name
:
'CreateByName'
,
name
:
'CreateByName'
,
label
:
'创建人'
,
label
:
'创建人'
,
...
@@ -121,12 +121,9 @@
...
@@ -121,12 +121,9 @@
rowsPerPage
:
12
,
rowsPerPage
:
12
,
CourseId
:
1
,
CourseId
:
1
,
},
},
//课程分类树形列表
TreeCategoryList
:
[],
returnString
:
""
,
//返回字符串
pageCount
:
0
,
pageCount
:
0
,
isShowMenu
Form
:
false
,
IsShowTeach
Form
:
false
,
menuObjOption
:
null
,
teachPlanObj
:
null
,
}
}
},
},
mounted
()
{
mounted
()
{
...
@@ -157,21 +154,21 @@
...
@@ -157,21 +154,21 @@
},
},
//刷新页面
//刷新页面
refreshPage
()
{
refreshPage
()
{
this
.
isShowMenu
Form
=
false
;
this
.
IsShowTeach
Form
=
false
;
this
.
getteachplanList
();
this
.
getteachplanList
();
},
},
//新增修改菜单
//新增修改菜单
EditTeachPlan
(
obj
)
{
EditTeachPlan
(
obj
)
{
if
(
obj
)
{
if
(
obj
)
{
this
.
menuObjOption
=
obj
this
.
teachPlanObj
=
obj
}
else
{
}
else
{
this
.
menuObjOption
=
null
this
.
teachPlanObj
=
null
}
}
this
.
isShowMenu
Form
=
true
this
.
IsShowTeach
Form
=
true
},
},
//关闭弹窗
//关闭弹窗
close
Menu
SaveForm
()
{
close
Teach
SaveForm
()
{
this
.
isShowMenu
Form
=
false
this
.
IsShowTeach
Form
=
false
}
}
}
}
}
}
...
...
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