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
4f84a181
Commit
4f84a181
authored
Jan 21, 2021
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
s
parent
b727bc27
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
241 additions
and
10 deletions
+241
-10
class.js
src/api/course/class.js
+25
-1
lessonPreparation.vue
src/pages/course/lessonPreparation.vue
+211
-5
teacherLesson.vue
src/pages/course/teacherLesson.vue
+5
-4
No files found.
src/api/course/class.js
View file @
4f84a181
...
...
@@ -309,4 +309,28 @@ export function saveClassStatus(data) {
method
:
'post'
,
data
})
}
}
/**
* 获取老师教案
*/
export
function
GetClassLessPlan
(
data
)
{
return
request
({
url
:
'/Class/GetClassLessPlan'
,
method
:
'post'
,
data
});
}
/**
* 新增老师教案
*/
export
function
SetClassLessPlan
(
data
)
{
return
request
({
url
:
'/Class/SetClassLessPlan'
,
method
:
'post'
,
data
});
}
\ No newline at end of file
src/pages/course/lessonPreparation.vue
View file @
4f84a181
<
style
>
.lessTop
{
color
:
#000000
;
font-weight
:
bold
;
font-size
:
14px
;
}
.Less_LeftIcon
{
background-color
:
#3FC4FF
;
width
:
2px
;
height
:
10px
;
}
.w260
{
width
:
260px
!important
;
}
.w180
{
width
:
180px
!important
;
}
.less_Time
{
color
:
#999999
;
font-size
:
13px
;
}
.teach_Content
{
color
:
#111111
;
font-size
:
14px
;
margin
:
20px
0
;
font-weight
:
bold
;
}
.add_Lesson
{
width
:
30px
;
height
:
30px
;
background-color
:
#2961FE
;
color
:
#fff
;
text-align
:
center
;
line-height
:
30px
;
border-radius
:
50%
;
display
:
inline-block
;
cursor
:
pointer
;
}
.lessonPreparation
.beikeBtn
{
padding
:
6px
30px
;
background-color
:
#2961FE
;
color
:
#fff
;
font-size
:
13px
;
border-radius
:
5px
;
margin-left
:
20px
;
cursor
:
pointer
;
}
.lessonPreparation
.beikeModule
{
padding
:
6px
15px
;
background-color
:
#FFFFFF
;
color
:
#A1AAB2
;
font-size
:
13px
;
border-radius
:
5px
;
margin-left
:
20px
;
cursor
:
pointer
;
border
:
1px
solid
#A1AAB2
;
}
</
style
>
<
template
>
<div
class=
"page-body"
>
<div
class=
"page-body lessonPreparation"
>
<div
class=
"lessTop"
>
备课编辑
</div>
<div
style=
"margin:20px 0;"
>
<span
class=
"Less_LeftIcon"
></span>
<el-input
v-model=
"addMsg.LessonPlan"
placeholder=
"教案名称"
class=
"w260"
></el-input>
<el-input
v-model=
"addMsg.CourseNum"
style=
"margin-left:20px;"
placeholder=
"第几课"
class=
"w180"
></el-input>
</div>
<div
style=
"display:flex;"
>
<div>
<span
class=
"less_Time"
>
时间:
</span>
<span>
2016年4月18日
</span>
</div>
<div
style=
"margin-left:200px;"
>
<span
class=
"less_Time"
>
担当者:
</span>
<span>
张三丰
</span>
</div>
</div>
<div
class=
"teach_Content"
>
上课内容
</div>
<div>
<span
class=
"add_Lesson"
@
click=
"addPlanList()"
>
<i
class=
"iconfont icon-add"
></i>
</span>
</div>
<div
style=
"margin-top:20px;"
v-for=
"(item,index) in addMsg.LessonPlanList"
>
<div
class=
"row"
>
<q-input
filled
stack-label
maxlength=
"20"
v-model=
"item.CourseName"
:dense=
"false"
class=
"col-2 q-pr-lg q-pb-lg"
label=
"课程名称"
/>
<q-input
filled
stack-label
maxlength=
"20"
v-model=
"item.CourseTitle"
:dense=
"false"
class=
"col-8 q-pr-lg q-pb-lg"
label=
"课程标题"
/>
</div>
<div>
<span
class=
"add_Lesson"
style=
"margin-top:70px;"
@
click=
"addPlanDetailsList(index)"
>
<i
class=
"iconfont icon-add"
></i>
</span>
</div>
<div
class=
"row"
v-for=
"(subItem,subIndex) in item.LessonPlanDetailsList"
>
<UeEditor
class=
"col-8"
v-model=
"subItem.ProjectContent"
:config=
"config"
></UeEditor>
<q-input
filled
stack-label
maxlength=
"20"
v-model=
"subItem.Duration"
style=
"margin-left:10px;"
:dense=
"false"
class=
"col-2 q-pr-lg q-pb-lg"
label=
"时长"
/>
</div>
<div
style=
"margin-top:20px;"
>
<el-tag
:key=
"tag"
v-for=
"tag in item.LessonPlanProjectsList"
closable
:disable-transitions=
"false"
@
close=
"handleClose(tag,index)"
>
{{
tag
}}
</el-tag>
<el-input
class=
"input-new-tag w260"
v-if=
"inputVisible"
v-model=
"inputValue"
ref=
"saveTagInput"
size=
"small"
@
keyup
.
enter
.
native=
"handleInputConfirm(index)"
@
blur=
"handleInputConfirm(index)"
>
</el-input>
<el-button
v-else
class=
"button-new-tag"
size=
"small"
@
click=
"showInput"
>
新增教案项目
</el-button>
</div>
</div>
<div
style=
"margin-top:30px;"
>
<span
class=
"beikeModule"
@
click=
"saveInfo(1)"
>
存为模板
</span>
<span
class=
"beikeBtn"
@
click=
"saveInfo(0)"
>
提交
</span>
</div>
</div>
</
template
>
<
script
>
import
UeEditor
from
'../../components/editor/UeEditor'
import
{
SetClassLessPlan
,
GetClassLessPlan
}
from
'../../api/course/class'
;
export
default
{
meta
:
{
title
:
"备课编辑"
},
props
:
{},
components
:
{
UeEditor
},
data
()
{
return
{
msg
:{
ClassId
:
0
,
School_Id
:
0
,
ClassPlanId
:
0
},
addMsg
:
{
CourseNum
:
''
,
//第几课
ClassId
:
0
,
//班级
School_Id
:
0
,
ClassPlanId
:
0
,
//排课id
LessonPlan
:
''
,
//教案名称
IsTemplate
:
0
,
//是否设置成模板0-否,1-是
LessonPlanList
:
[]
//老师教案详情
},
config
:
{
initialFrameWidth
:
null
,
initialFrameHeight
:
150
,
},
inputVisible
:
false
,
inputValue
:
''
}
},
created
()
{},
mounted
()
{
if
(
this
.
$route
.
query
)
{
this
.
msg
.
ClassId
=
this
.
$route
.
query
.
ClassId
;
this
.
msg
.
School_Id
=
this
.
$route
.
query
.
School_Id
;
this
.
msg
.
ClassPlanId
=
this
.
$route
.
query
.
ClassPlanId
;
}
this
.
getList
();
},
methods
:
{
getList
(){
getList
()
{
GetClassLessPlan
(
this
.
msg
).
then
(
res
=>
{
console
.
log
(
res
,
'数据来了'
);
if
(
res
.
Code
==
1
){
let
data
=
res
.
Data
;
this
.
addMsg
.
CourseNum
=
data
.
CourseNum
;
this
.
addMsg
.
ClassId
=
data
.
ClassId
;
this
.
addMsg
.
School_Id
=
data
.
School_Id
;
this
.
addMsg
.
ClassPlanId
=
data
.
ClassPlanId
;
this
.
addMsg
.
LessonPlan
=
data
.
LessonPlan
;
this
.
addMsg
.
IsTemplate
=
data
.
IsTemplate
;
this
.
addMsg
.
LessonPlanList
=
data
.
IsTemplate
;
}
})
},
handleClose
(
tag
,
index
)
{
this
.
addMsg
.
LessonPlanList
[
index
].
LessonPlanProjectsList
.
splice
(
this
.
addMsg
.
LessonPlanList
[
index
].
LessonPlanProjectsList
.
indexOf
(
tag
),
1
);
},
showInput
()
{
this
.
inputVisible
=
true
;
this
.
$nextTick
(()
=>
{
this
.
$refs
.
saveTagInput
[
0
].
$refs
.
input
.
focus
();
});
},
handleInputConfirm
(
index
)
{
let
inputValue
=
this
.
inputValue
;
if
(
inputValue
)
{
this
.
addMsg
.
LessonPlanList
[
index
].
LessonPlanProjectsList
.
push
(
inputValue
);
}
this
.
inputVisible
=
false
;
this
.
inputValue
=
''
;
},
//新增教案
addPlanList
(){
let
obj
=
{
CourseName
:
''
,
//课程名称(活动篇/理解篇)
CourseTitle
:
''
,
//课程标题
LessonPlanDetailsList
:[],
//老师教案详情
LessonPlanProjectsList
:[]
//老师教案详情
}
this
.
addMsg
.
LessonPlanList
.
push
(
obj
);
},
//添加老师教案详情
addPlanDetailsList
(
index
){
var
obj
=
{
ProjectContent
:
''
,
Duration
:
''
}
this
.
addMsg
.
LessonPlanList
[
index
].
LessonPlanDetailsList
.
push
(
obj
);
},
//提交
saveInfo
(
num
){
this
.
addMsg
.
IsTemplate
=
num
;
SetClassLessPlan
(
this
.
addMsg
).
then
(
res
=>
{
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'数据保存成功!'
,
position
:
'top'
})
})
},
},
}
...
...
src/pages/course/teacherLesson.vue
View file @
4f84a181
...
...
@@ -383,10 +383,11 @@
},
//跳转至备课
goBeike
(
item
){
var
tempStr
=
'/course/studentClass?ClassId='
+
item
.
ClassId
+
'&School_Id='
+
item
.
School_Id
;
this
.
$router
.
push
({
path
:
tempStr
});
console
.
log
(
item
,
'item'
);
var
tempStr
=
'/course/lessonPreparation?ClassId='
+
item
.
ClassId
+
'&School_Id='
+
item
.
School_Id
+
'&ClassPlanId='
+
item
.
ClassPlanId
;
this
.
$router
.
push
({
path
:
tempStr
});
},
goyibeike
(
item
){
var
tempStr
=
'/course/prepareclassDetails?ClassId='
+
item
.
ClassId
+
'&ClassPlanId='
+
item
.
ClassPlanId
;
...
...
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