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
e669e61e
Commit
e669e61e
authored
Dec 09, 2020
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
b9572d58
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
130 additions
and
25 deletions
+130
-25
lesson-form.vue
src/components/course/lesson-form.vue
+130
-25
No files found.
src/components/course/lesson-form.vue
View file @
e669e61e
...
...
@@ -54,20 +54,24 @@
.caldendarTeacher
{
display
:
flex
;
font-size
:
12px
;
right
:
3px
;
right
:
3px
;
justify-content
:
space-between
;
align-items
:
center
;
margin-top
:
-2px
;
transform
:
scale
(
0.9
);
position
:
absolute
;
bottom
:
2px
;
bottom
:
2px
;
}
.calenderDialog
{
width
:
300px
;
height
:
auto
;
}
.calenderClassDate
{
display
:
flex
;
justify-content
:
space-between
;
margin-bottom
:
5px
;
}
</
style
><
template
>
<div
class=
"lesson_Form"
>
<div
class=
"calenderHeader"
>
...
...
@@ -79,7 +83,7 @@
</el-radio-group>
</div>
<div>
<q-btn
color=
"accent q-px-md"
class=
"q-mr-md"
icon=
"add"
size=
"12px"
label=
"新增日程"
@
click=
"
isShowMenu=true
"
>
<q-btn
color=
"accent q-px-md"
class=
"q-mr-md"
icon=
"add"
size=
"12px"
label=
"新增日程"
@
click=
"
addNew()
"
>
<q-popup-proxy>
<q-banner
v-if=
"isShowMenu"
>
<div
class=
"calenderDialog"
>
...
...
@@ -87,7 +91,7 @@
<q-select
filled
stack-label
option-value=
"TId"
option-label=
"TeacherName"
v-model=
"addMsg.TeacherId"
ref=
"Teacher_Id"
:options=
"TeacherList"
label=
"关联教师"
:dense=
"false"
class=
"col-6 q-pb-lg"
emit-value
map-options
/>
<q-input
filled
v-model=
"addMsg.ClassDate"
class=
"col-6 q-pb-lg"
mask=
"date"
label=
"
开班
时间"
>
<q-input
filled
v-model=
"addMsg.ClassDate"
class=
"col-6 q-pb-lg"
mask=
"date"
label=
"
上课
时间"
>
<template
v-slot:append
>
<q-icon
name=
"event"
class=
"cursor-pointer"
>
<q-popup-proxy
ref=
"qDateProxy1"
transition-show=
"scale"
transition-hide=
"scale"
>
...
...
@@ -116,7 +120,7 @@
</div>
</
template
>
<q-card-actions
align=
"right"
class=
"bg-white"
>
<q-btn
label=
"取消"
flat
color=
"grey-10"
@
click=
"isShowMenu=false"
style=
"font-weight:400 !important"
/>
<q-btn
label=
"取消"
flat
color=
"grey-10"
@
click=
"isShowMenu=false"
style=
"font-weight:400 !important"
/>
<q-btn
label=
"确认"
color=
"accent q-px-md"
style=
"font-weight:400 !important"
@
click=
"saveSteps"
/>
</q-card-actions>
</div>
...
...
@@ -131,19 +135,67 @@
<!--自定义内容-->
<div
class=
"calendar-day"
>
{{
data
.
day
.
split
(
'-'
).
slice
(
2
).
join
(
'-'
)
}}
</div>
<div
v-for=
"item in calendarData"
>
<!--
<div
v-if=
"(item.months).indexOf(data.day.split('-').slice(1)[0])!=-1"
>
<div
v-if=
"(item.days).indexOf(data.day.split('-').slice(2).join('-'))!=-1"
>
<el-tooltip
class=
"item"
effect=
"dark"
:content=
"item.things"
placement=
"right"
>
<div
class=
"is-selected"
>
{{
item
.
things
}}
</div>
</el-tooltip>
</div>
<div
v-else
></div>
</div>
<div
v-else
></div>
-->
<div
v-if=
"item.ClassDateStr==data.day"
>
<div
class=
"calendarTop"
>
<div>
{{
item
.
RoomName
}}
</div>
<div><i
class=
"iconfont icon-edit"
@
click
.
stop=
"getInfo(item)"
></i></div>
<div>
<i
class=
"iconfont icon-edit"
@
click
.
stop=
"getInfo(item)"
>
<q-popup-proxy>
<q-banner
v-if=
"isShowEdit"
>
<div
class=
"calenderDialog"
>
<div
style=
"margin:10px 0 15px 0;"
>
{{
item
.
ClassDateStr
}}
课程安排
</div>
<q-select
filled
stack-label
option-value=
"TId"
option-label=
"TeacherName"
v-model=
"addMsg.TeacherId"
ref=
"Teacher_Id"
:options=
"TeacherList"
label=
"关联教师"
:dense=
"false"
class=
"col-6 q-pb-lg"
emit-value
map-options
/>
<div
class=
"calenderClassDate"
>
<div>
上课时间:
{{
item
.
ClassDateStr
}}
</div>
<div>
<i
class=
"iconfont icon-zhuanhuan1"
></i><span
style=
"color:#2961fe;cursor:pointer;"
@
click=
"isShowCanlder=true;"
>
变更时间
</span>
</div>
</div>
<q-input
v-if=
"isShowCanlder"
filled
v-model=
"addMsg.ClassDate"
class=
"col-6 q-pb-lg"
mask=
"date"
label=
"上课时间"
>
<template
v-slot:append
>
<q-icon
name=
"event"
class=
"cursor-pointer"
>
<q-popup-proxy
ref=
"qDateProxy2"
transition-show=
"scale"
transition-hide=
"scale"
>
<q-date
v-model=
"addMsg.ClassDate"
@
input=
"getCanlder(),() => $refs.qDateProxy2.hide()"
/>
</q-popup-proxy>
</q-icon>
</
template
>
</q-input>
<q-toggle
size=
"md"
label=
"更多设置"
left-label
color=
"primary"
:false-value=
"0"
:true-value=
"1"
v-model=
"isSetMoreTwo"
/>
<
template
v-if=
"isSetMoreTwo==1"
>
<q-select
filled
stack-label
option-value=
"RoomId"
option-label=
"RoomName"
v-model=
"addMsg.ClassRoomId"
ref=
"ClassRoomId"
:options=
"ClassRoomList"
label=
"关联教室"
:dense=
"false"
class=
"col-6 q-pb-lg"
emit-value
map-options
/>
<div
class=
"row wrap"
style=
"position:relative;"
v-for=
"(subItem,subIndex) in addMsg.PlanTimeList"
>
<div
class=
"col-6"
>
<q-input
filled
stack-label
maxlength=
"20"
:dense=
"false"
v-model=
"subItem.StartTime"
ref=
"StartTime"
class=
"col-6 q-pr-lg q-pb-lg"
label=
""
:rules=
"[val => !!val || '请填写开始时间']"
/>
</div>
<div
class=
"col-6"
>
<q-input
filled
stack-label
maxlength=
"20"
:dense=
"false"
v-model=
"subItem.EndTime"
ref=
"EndTime"
class=
"col-6 q-pr-lg q-pb-lg"
label=
""
:rules=
"[val => !!val || '请填写开始时间']"
/>
</div>
<q-btn
v-if=
"subIndex==0"
style=
"margin-left:10px;position:absolute;right:-10px;top:15px;"
@
click=
"addStep()"
size=
"10px"
round
color=
"primary"
icon=
"iconfont icon-img_haha"
/>
</div>
</
template
>
<q-card-actions
align=
"right"
class=
"bg-white"
>
<q-btn
label=
"取消"
flat
color=
"grey-10"
@
click=
"isShowEdit=false"
style=
"font-weight:400 !important"
/>
<q-btn
label=
"确认"
color=
"accent q-px-md"
style=
"font-weight:400 !important"
@
click=
"saveSteps"
/>
</q-card-actions>
</div>
</q-banner>
</q-popup-proxy>
</i>
<i
class=
"iconfont icon-guanbi"
style=
"margin-left:5px;"
@
click
.
stop=
"delInfo(item)"
></i>
</div>
</div>
<div
class=
"calendarInner"
>
<div
v-for=
"(subItem,subIndex) in item.TimeList"
>
...
...
@@ -162,7 +214,6 @@
</div>
</div>
<div
v-else
></div>
</div>
</template>
</el-calendar>
...
...
@@ -172,7 +223,8 @@
<
script
>
import
{
quertClassPlan
,
setClassPlan
setClassPlan
,
RemoveClassPlan
}
from
'../../api/course/class'
;
import
{
getTeacherDropDownList
,
...
...
@@ -210,8 +262,11 @@
}]
},
isSetMore
:
1
,
//是否显示更多设置
isSetMoreTwo
:
1
,
ClassRoomList
:
[],
//教室下拉数据
isShowMenu
:
false
,
//是否显示弹出
isShowMenu
:
false
,
//是否显示弹出
isShowEdit
:
false
,
//是否显示修改弹出
isShowCanlder
:
false
,
//是否显示日历修改日期
}
},
created
()
{
...
...
@@ -266,6 +321,12 @@
})
},
//点击新增
addNew
(){
this
.
isShowMenu
=
true
;
this
.
addMsg
.
ClassPlanId
=
0
;
console
.
log
(
this
.
addMsg
,
'addMsg'
);
},
//点击新增
addStep
()
{
var
obj
=
{
ClassTimeId
:
0
,
...
...
@@ -275,18 +336,62 @@
this
.
addMsg
.
PlanTimeList
.
push
(
obj
);
},
//保存新增修改
saveSteps
(){
saveSteps
()
{
setClassPlan
(
this
.
addMsg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
isShowMenu
=
false
;
this
.
isShowMenu
=
false
;
this
.
isShowEdit
=
false
;
this
.
getClassPlan
();
this
.
addMsg
.
PlanTimeList
=
[{
ClassTimeId
:
0
,
StartTime
:
""
,
EndTime
:
""
,
}]
}
})
},
//点击修改
getInfo
(
item
){
console
.
log
(
item
,
'数据来了'
);
}
//日历点击修改
getInfo
(
item
)
{
this
.
isShowEdit
=
true
;
var
Obj
=
JSON
.
parse
(
JSON
.
stringify
(
item
));
this
.
addMsg
.
ClassPlanId
=
Obj
.
ClassPlanId
;
this
.
addMsg
.
ClassId
=
Obj
.
ClassId
;
this
.
addMsg
.
ClassDate
=
Obj
.
ClassDate
;
// this.addMsg.ClassDateStr = Obj.ClassDateStr;
this
.
addMsg
.
ClassRoomId
=
Obj
.
ClassRoomId
;
this
.
addMsg
.
TeacherId
=
Obj
.
TeacherId
;
this
.
addMsg
.
PlanTimeList
=
Obj
.
TimeList
;
console
.
log
(
item
,
'数据来了'
);
},
//日历点击删除
delInfo
(
item
)
{
this
.
$q
.
dialog
({
title
:
"删除课程"
,
message
:
''
,
cancel
:
{
label
:
"取消"
,
flat
:
true
},
ok
:
{
label
:
"确认"
,
flat
:
true
,
focus
:
true
}
}).
onOk
(()
=>
{
let
msg
=
{
ClassPlanId
:
item
.
ClassPlanId
}
RemoveClassPlan
(
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
getClassPlan
();
}
})
});
},
getCanlder
(){
// this.isShowEdit=true;
// this.isShowCanlder=false;
},
},
watch
:
{
'value'
:
{
...
...
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