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
57d2dd83
Commit
57d2dd83
authored
Dec 08, 2020
by
罗超
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/luochao/confucius
parents
7f25057f
bace4e44
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
157 additions
and
20 deletions
+157
-20
class.js
src/api/course/class.js
+12
-0
lesson-form.vue
src/components/course/lesson-form.vue
+144
-19
classManage.vue
src/pages/course/classManage.vue
+1
-1
No files found.
src/api/course/class.js
View file @
57d2dd83
...
...
@@ -46,3 +46,15 @@ export function quertClassPlan(data) {
data
});
}
/**
* 新增修改课程安排
*/
export
function
setClassPlan
(
data
)
{
return
request
({
url
:
'/Class/SetClassPlan'
,
method
:
'post'
,
data
});
}
src/components/course/lesson-form.vue
View file @
57d2dd83
...
...
@@ -31,31 +31,43 @@
justify-content
:
space-between
;
padding
:
0
20px
;
}
.calendarTop
{
.calendarTop
{
display
:
flex
;
justify-content
:
space-between
;
font-size
:
12px
;
margin-left
:
-7px
;
font-size
:
12px
;
margin-left
:
-7px
;
align-items
:
center
;
transform
:
scale
(
0.9
);
}
.calendarInner
{
font-size
:
12px
;
margin
:
-4px
0
0
-7px
;
.calendarInner
{
font-size
:
12px
;
margin
:
-4px
0
0
-7px
;
transform
:
scale
(
0.9
);
}
.lesson_Form
.el-calendar-table
.el-calendar-day
{
.lesson_Form
.el-calendar-table
.el-calendar-day
{
padding
:
5px
;
}
.caldendarTeacher
{
.caldendarTeacher
{
display
:
flex
;
font-size
:
12px
;
margin-left
:
40
px
;
font-size
:
12px
;
right
:
3
px
;
justify-content
:
space-between
;
align-items
:
center
;
margin-top
:
-2px
;
margin-top
:
-2px
;
transform
:
scale
(
0.9
);
position
:
absolute
;
bottom
:
2px
;
}
.calenderDialog
{
width
:
300px
;
height
:
auto
;
}
</
style
><
template
>
<div
class=
"lesson_Form"
>
<div
class=
"calenderHeader"
>
...
...
@@ -67,7 +79,50 @@
</el-radio-group>
</div>
<div>
<q-btn
color=
"primary"
class=
"q-mr-md"
icon=
"add"
size=
"12px"
label=
"新增日程"
@
click=
"addTrip()"
/>
<q-btn
color=
"accent q-px-md"
class=
"q-mr-md"
icon=
"add"
size=
"12px"
label=
"新增日程"
@
click=
"isShowMenu=true"
>
<q-popup-proxy>
<q-banner
v-if=
"isShowMenu"
>
<div
class=
"calenderDialog"
>
<div
style=
"margin:10px 0 15px 0;"
>
新增课程安排
</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
/>
<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"
>
<q-date
v-model=
"addMsg.ClassDate"
@
input=
"() => $refs.qDateProxy1.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=
"isSetMore"
/>
<
template
v-if=
"isSetMore==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=
"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>
</q-banner>
</q-popup-proxy>
</q-btn>
</div>
</div>
<el-calendar
v-model=
"value"
id=
"calendar"
>
...
...
@@ -88,7 +143,7 @@
<div
v-if=
"item.ClassDateStr==data.day"
>
<div
class=
"calendarTop"
>
<div>
{{
item
.
RoomName
}}
</div>
<div><i
class=
"iconfont icon-edit"
></i></div>
<div><i
class=
"iconfont icon-edit"
@
click
.
stop=
"getInfo(item)"
></i></div>
</div>
<div
class=
"calendarInner"
>
<div
v-for=
"(subItem,subIndex) in item.TimeList"
>
...
...
@@ -96,7 +151,7 @@
</div>
</div>
<div
class=
"caldendarTeacher"
>
<div>
{{
item
.
TeacherName
}}
</div>
<div
style=
"margin-right:5px;"
>
{{
item
.
TeacherName
}}
</div>
<div>
<q-avatar
size=
"sm"
v-if=
"item.UserIcon"
>
<img
:src=
"item.UserIcon"
/>
...
...
@@ -117,7 +172,13 @@
<
script
>
import
{
quertClassPlan
,
setClassPlan
}
from
'../../api/course/class'
;
import
{
getTeacherDropDownList
,
queryClassRoomList
}
from
'../../api/school/index'
export
default
{
props
:
{
setingObj
:
{
...
...
@@ -130,7 +191,27 @@
return
{
calendarData
:
[],
value
:
new
Date
(),
checkedDays
:
'月'
checkedDays
:
'月'
,
TeacherList
:
[],
//老师下拉数据
addMsg
:
{
ClassPlanId
:
0
,
ClassId
:
1
,
ClassDate
:
""
,
ClassDateStr
:
""
,
ClassRoomId
:
1
,
RoomName
:
""
,
TeacherId
:
1
,
TeacherName
:
""
,
UserIcon
:
""
,
PlanTimeList
:
[{
ClassTimeId
:
0
,
StartTime
:
""
,
EndTime
:
""
,
}]
},
isSetMore
:
1
,
//是否显示更多设置
ClassRoomList
:
[],
//教室下拉数据
isShowMenu
:
false
,
//是否显示弹出
}
},
created
()
{
...
...
@@ -139,8 +220,13 @@
mounted
()
{
var
day2
=
new
Date
();
day2
.
setTime
(
day2
.
getTime
());
var
s2
=
day2
.
getFullYear
()
+
"-"
+
(
day2
.
getMonth
()
+
1
);
var
s2
=
day2
.
getFullYear
()
+
"-"
+
(
day2
.
getMonth
()
+
1
);
this
.
getClassPlan
(
s2
);
this
.
GetTeacherList
();
this
.
getClassRoomList
();
this
.
addMsg
.
TeacherId
=
this
.
setingObj
.
Teacher_Id
;
this
.
addMsg
.
ClassDate
=
this
.
setingObj
.
OpenTime
;
console
.
log
(
this
.
setingObj
,
'setingObj'
);
},
methods
:
{
//获取第一个字
...
...
@@ -157,19 +243,58 @@
};
quertClassPlan
(
msg
).
then
(
res
=>
{
console
.
log
(
"res"
,
res
);
if
(
res
.
Code
==
1
)
{
if
(
res
.
Code
==
1
)
{
this
.
calendarData
=
res
.
Data
;
}
})
},
//获取教师下拉
GetTeacherList
()
{
getTeacherDropDownList
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
TeacherList
=
res
.
Data
;
console
.
log
(
this
.
TeacherList
,
'this.TeacherList'
);
}
})
},
//获取教室下拉
getClassRoomList
()
{
queryClassRoomList
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
ClassRoomList
=
res
.
Data
;
}
})
},
//点击新增
addStep
()
{
var
obj
=
{
ClassTimeId
:
0
,
StartTime
:
''
,
EndTime
:
''
}
this
.
addMsg
.
PlanTimeList
.
push
(
obj
);
},
//保存新增修改
saveSteps
(){
setClassPlan
(
this
.
addMsg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
isShowMenu
=
false
;
this
.
getClassPlan
();
}
})
},
//点击修改
getInfo
(
item
){
console
.
log
(
item
,
'数据来了'
);
}
},
watch
:
{
'value'
:
{
handler
(
newValue
)
{
var
d
=
new
Date
(
newValue
);
var
datetime
=
d
.
getFullYear
()
+
'-'
+
(
d
.
getMonth
()
+
1
);
var
datetime
=
d
.
getFullYear
()
+
'-'
+
(
d
.
getMonth
()
+
1
);
this
.
getClassPlan
(
datetime
);
console
.
log
(
datetime
,
'newwww'
);
console
.
log
(
datetime
,
'newwww'
);
},
deep
:
true
},
...
...
src/pages/course/classManage.vue
View file @
57d2dd83
...
...
@@ -28,7 +28,7 @@
</div>
</div>
<div
class=
"page-content"
>
<q-table
:pagination=
"msg"
:loading=
"loading"
no-data-label=
"暂无相关数据"
flat
class=
"sticky-
tow-
column-table"
<q-table
:pagination=
"msg"
:loading=
"loading"
no-data-label=
"暂无相关数据"
flat
class=
"sticky-column-table"
separator=
"none"
title=
"班级信息"
:data=
"data"
:columns=
"columns"
row-key=
"name"
>
<template
v-slot:body-cell-ClassName=
"props"
>
<q-td
auto-width
:props=
"props"
>
...
...
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