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
a002094c
Commit
a002094c
authored
Jan 22, 2021
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
43470dd5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
164 additions
and
95 deletions
+164
-95
lessonPreparation.vue
src/pages/course/lessonPreparation.vue
+164
-95
No files found.
src/pages/course/lessonPreparation.vue
View file @
a002094c
...
...
@@ -42,6 +42,7 @@
display
:
inline-block
;
cursor
:
pointer
;
}
.lessonPreparation
.beikeBtn
{
padding
:
6px
30px
;
background-color
:
#2961FE
;
...
...
@@ -51,72 +52,114 @@
margin-left
:
20px
;
cursor
:
pointer
;
}
.lessonPreparation
.beikeModule
{
padding
:
6
px
15px
;
padding
:
9
px
15px
;
background-color
:
#FFFFFF
;
color
:
#A1AAB2
;
font-size
:
13px
;
border-radius
:
5px
;
margin-
lef
t
:
20px
;
margin-
righ
t
:
20px
;
cursor
:
pointer
;
border
:
1px
solid
#A1AAB2
;
border
:
1px
solid
#A1AAB2
;
}
.teach_Lessback
{
width
:
64.5%
;
height
:
50px
;
min-width
:
908px
;
text-align
:
right
;
line-height
:
50px
;
padding-right
:
20px
;
background-color
:
#F0F5FB
;
}
.Less_Delete
{
width
:
30px
;
height
:
30px
;
background-color
:
red
;
color
:
#fff
;
text-align
:
center
;
line-height
:
30px
;
border-radius
:
50%
;
display
:
inline-block
;
cursor
:
pointer
;
margin-top
:
5px
;
}
.Less_Delete
:hover
{
opacity
:
0.6
;
}
</
style
>
<
template
>
<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
style=
"width:70%;min-width:908px;"
>
<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>
<span
style=
"margin-left:30px;"
>
第几课:
</span>
<el-input
v-model=
"addMsg.CourseNum"
placeholder=
"第几课"
class=
"w180"
></el-input>
</div>
<div
style=
"margin-left:200px;"
>
<span
class=
"less_Time"
>
担当者:
</span>
<span>
张三丰
</span>
<div
style=
"display:flex;"
>
<div>
<span
class=
"less_Time"
style=
"margin-left:30px;"
>
时间:
</span>
<span>
{{
WorkDate
}}
</span>
</div>
<div
style=
"margin-left:188px;"
>
<span
class=
"less_Time"
>
担当者:
</span>
<span>
{{
TeacherName
}}
</span>
</div>
</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
class=
"teach_Content"
>
教案详情
</div>
<div>
<span
class=
"add_Lesson"
style=
"margin-top:70px;"
@
click=
"addPlanDetailsList(index)"
>
<div
class=
"teach_Lessback"
>
<q-btn
color=
"accent"
size=
"sm"
class=
"q-mr-md"
icon=
"add"
label=
"新增教案"
@
click=
"addPlanList()"
/>
<!--
<q-btn
label=
"新增教案"
color=
"accent q-px-md"
style=
"font-weight:400 !important"
@
click=
"addPlanList()"
/>
-->
<!--
<span
class=
"add_Lesson"
@
click=
"addPlanList()"
title=
"新增教案"
>
<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=
"时长"
/>
</span>
-->
</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
style=
"margin-top:20px;"
v-for=
"(item,index) in addMsg.LessonPlanList"
>
<div
class=
"row"
style=
"width:908px;"
>
<q-input
filled
stack-label
maxlength=
"20"
v-model=
"item.CourseName"
:dense=
"false"
class=
"col-3 q-pr-lg q-pb-lg"
label=
"课程名称"
/>
<q-input
filled
stack-label
maxlength=
"50"
v-model=
"item.CourseTitle"
:dense=
"false"
class=
"col-8 q-pb-lg"
label=
"课程标题"
/>
<span
class=
"Less_Delete"
style=
"margin:10px 0 0 20px;"
title=
"删除详情"
@
click=
"delLessOne(index)"
>
<i
class=
"iconfont icon-shanchu"
></i>
</span>
</div>
<div
class=
"teach_Lessback"
style=
"min-width:832px;"
>
<span
class=
"add_Lesson"
@
click=
"addPlanDetailsList(index)"
title=
"新增教案详情"
>
<i
class=
"iconfont icon-add"
></i>
</span>
</div>
<div
class=
"row"
v-for=
"(subItem,subIndex) in item.LessonPlanDetailsList"
style=
"margin-top:20px;align-items: self-end;"
>
<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;margin-top:5px;"
:dense=
"false"
class=
"col-2 q-pr-lg q-pb-lg"
label=
"时长"
/>
<span
class=
"Less_Delete"
title=
"删除详情"
@
click=
"delLessInfo(index,subIndex)"
>
<i
class=
"iconfont icon-shanchu"
></i>
</span>
</div>
<div
style=
"margin-top:20px;border-bottom:1px dashed #d1d1d1;padding-bottom:20px;margin-right:90px;"
>
<el-tag
:key=
"tag"
style=
"margin-right:10px;"
v-for=
"tag in item.LessonPlanProjectsList[0].ProjectContentList"
closable
:disable-transitions=
"false"
@
close=
"handleClose(tag,index)"
>
{{
tag
}}
</el-tag>
<el-input
class=
"input-new-tag w260"
v-if=
"item.isShow"
v-model=
"item.isValue"
ref=
"saveTagInput"
size=
"small"
@
keyup
.
enter
.
native=
"handleInputConfirm(item,index)"
@
blur=
"handleInputConfirm(item,index)"
>
</el-input>
<el-button
v-else
class=
"button-new-tag"
size=
"small"
@
click=
"showInput(item)"
>
新增教案项目
</el-button>
</div>
</div>
</div>
<div
style=
"margin-top:30px;"
>
<div
style=
"margin-top:30px;"
>
<span
class=
"beikeModule"
@
click=
"saveInfo(1)"
>
存为模板
</span>
<span
class=
"beikeBtn"
@
click=
"saveInfo(0)"
>
提交
</span>
<q-btn
label=
"提交"
size=
"md"
color=
"accent q-px-md"
@
click=
"saveInfo()"
/>
<!--
<span
class=
"beikeBtn"
@
click=
"saveInfo(0)"
>
提交
</span>
-->
</div>
</div>
</div>
</
template
>
...
...
@@ -137,10 +180,10 @@
},
data
()
{
return
{
msg
:{
ClassId
:
0
,
School_Id
:
0
,
ClassPlanId
:
0
msg
:
{
ClassId
:
0
,
School_Id
:
0
,
ClassPlanId
:
0
},
addMsg
:
{
CourseNum
:
''
,
//第几课
...
...
@@ -151,6 +194,8 @@
IsTemplate
:
0
,
//是否设置成模板0-否,1-是
LessonPlanList
:
[]
//老师教案详情
},
TeacherName
:
''
,
//教师名字
WorkDate
:
''
,
//时间
config
:
{
initialFrameWidth
:
null
,
initialFrameHeight
:
150
,
...
...
@@ -171,65 +216,89 @@
methods
:
{
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
;
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
;
if
(
data
.
LessonPlanList
==
null
)
{
this
.
addMsg
.
LessonPlanList
=
[];
}
else
{
this
.
addMsg
.
LessonPlanList
=
data
.
LessonPlanList
;
}
this
.
TeacherName
=
data
.
TeacherName
;
this
.
WorkDate
=
data
.
WorkDate
;
}
})
},
handleClose
(
tag
,
index
)
{
this
.
addMsg
.
LessonPlanList
[
index
].
LessonPlanProjectsList
.
splice
(
this
.
addMsg
.
LessonPlanList
[
index
].
LessonPlanProjectsList
.
indexOf
(
tag
),
1
);
handleClose
(
tag
,
index
)
{
this
.
addMsg
.
LessonPlanList
[
index
].
LessonPlanProjectsList
[
0
].
ProjectContentList
.
splice
(
this
.
addMsg
.
LessonPlanList
[
index
].
LessonPlanProjectsList
[
0
].
ProjectContentList
.
indexOf
(
tag
),
1
);
},
showInput
()
{
this
.
inputVisible
=
true
;
showInput
(
item
)
{
item
.
isShow
=
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
);
handleInputConfirm
(
item
,
index
)
{
if
(
item
.
isValue
)
{
this
.
addMsg
.
LessonPlanList
[
index
].
LessonPlanProjectsList
[
0
].
ProjectContentList
.
push
(
item
.
isValue
);
}
this
.
inputVisible
=
false
;
this
.
input
Value
=
''
;
item
.
isShow
=
false
;
item
.
is
Value
=
''
;
},
//新增教案
addPlanList
(){
let
obj
=
{
CourseName
:
''
,
//课程名称(活动篇/理解篇)
CourseTitle
:
''
,
//课程标题
LessonPlanDetailsList
:[],
//老师教案详情
LessonPlanProjectsList
:[]
//老师教案详情
}
this
.
addMsg
.
LessonPlanList
.
push
(
obj
);
addPlanList
()
{
let
obj
=
{
CourseName
:
''
,
//课程名称(活动篇/理解篇)
CourseTitle
:
''
,
//课程标题
LessonPlanDetailsList
:
[],
//老师教案详情
LessonPlanProjectsList
:
[{
ProjectContentList
:
[]
}],
//老师教案详情
isShow
:
false
,
isValue
:
''
}
this
.
addMsg
.
LessonPlanList
.
push
(
obj
);
},
//添加老师教案详情
addPlanDetailsList
(
index
){
var
obj
=
{
ProjectContent
:
''
,
Duration
:
''
}
this
.
addMsg
.
LessonPlanList
[
index
].
LessonPlanDetailsList
.
push
(
obj
);
addPlanDetailsList
(
index
)
{
var
obj
=
{
ProjectContent
:
''
,
Duration
:
''
}
this
.
addMsg
.
LessonPlanList
[
index
].
LessonPlanDetailsList
.
push
(
obj
);
},
//删除教案详情
delLessInfo
(
index
,
subIndex
){
this
.
addMsg
.
LessonPlanList
[
index
].
LessonPlanDetailsList
.
splice
(
subIndex
,
1
);
},
//删除整个教案
delLessOne
(
index
){
this
.
addMsg
.
LessonPlanList
.
splice
(
index
,
1
);
},
//提交
saveInfo
(
num
){
this
.
addMsg
.
IsTemplate
=
num
;
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'
})
if
(
res
.
Code
==
1
){
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'数据保存成功!'
,
position
:
'top'
})
var
tempStr
=
'/course/teacherLesson'
;
this
.
$router
.
push
({
path
:
tempStr
});
}
})
},
},
...
...
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