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
51b7815f
Commit
51b7815f
authored
Feb 15, 2022
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
22
parent
a75ba11d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
375 additions
and
124 deletions
+375
-124
subscribeForm.vue
src/components/stuMan/subscribe/subscribeForm.vue
+278
-91
subscribe.vue
src/pages/studyAbroad/subscribe.vue
+97
-33
No files found.
src/components/stuMan/subscribe/subscribeForm.vue
View file @
51b7815f
<
template
>
<div>
<q-dialog
v-model=
"show"
content-class=
"bg-grey-1"
persistent
transition-show=
"scale"
transition-hide=
"scale"
@
input=
"changeDig"
>
<!-- content-class="bg-grey-1" -->
<q-card
style=
"width: 800px;max-width:900px;"
>
<q-card-section>
<div
class=
"text-h6"
>
编辑
</div>
...
...
@@ -33,10 +34,24 @@
emit-value
map-options
@
filter=
"filterCourse"
@
input=
"getCanTeacherClassTimeList(),getStu
()"
@
input=
"getCanTeacherTimeList(), getStu(), getChapterTree
()"
/>
<q-field
filled
label=
"章节"
stack-label
class=
"col-12"
>
<
template
v-slot:control
>
<select-tree
:treeData=
"chapterList"
:defaultArray=
"returnString"
nodeKey=
"ChapterId"
labelKey=
"ChapterName"
childrenKey=
"ChildList"
tipText=
"课程系列"
@
getChild=
"getChild"
></select-tree>
</
template
>
</q-field>
<q-select
v-if=
"teaClassMsg.CourseId>
0"
v-if=
"teaClassMsg.CourseId >
0"
filled
v-model=
"teaClassMsg.TeacherId"
option-value=
"TId"
...
...
@@ -46,15 +61,75 @@
map-options
label=
"老师"
class=
"col-12"
@
input=
"getCanTeacherClass
TimeList()"
@
input=
"getCanTeacher
TimeList()"
/>
<q-field
filled
label=
"上课时段"
stack-label
class=
"col-12"
v-if=
"teaClassMsg.TeacherId>0"
>
<q-field
filled
label=
"上课时段"
stack-label
class=
"col-12"
v-if=
"teaClassMsg.TeacherId > 0"
>
<
template
v-slot:control
>
<div
v-if=
"teacherTimeList.length > 0"
>
<div
v-for=
"(item, index) in teacherTimeList"
:key=
"index"
>
<div>
<!--
{{
teacherTimeList
}}
-->
<div
v-for=
"(item,index) in teacherTimeList"
:key=
"index"
>
<div
v-for=
"(_item,_index) in item.CourseTimeList"
:key=
"_index"
class=
"timeItem"
>
{{
item
.
SchoolName
}}
{{
item
.
RoomName
}}
{{
_item
.
StartTime
}}
-
{{
_item
.
EndTime
}}
<div
v-for=
"(_item, _index) in item.CourseTimeList"
:key=
"_index"
class=
"timeItem"
>
<q-checkbox
v-model=
"courseCheckList"
:val=
"_item"
>
{{
item
.
SchoolName
}}
{{
item
.
RoomName
}}
{{
_item
.
StartTime
}}
-
{{
_item
.
EndTime
}}
</q-checkbox>
</div>
</div>
</div>
</div>
<div
v-else
>
暂无可约课程
</div>
</
template
>
</q-field>
{{ courseCheckList }}
<q-field
filled
label=
"学生列表"
stack-label
class=
"col-12"
v-if=
"teaClassMsg.CourseId > 0 && stuList.length > 0"
>
<
template
v-slot:control
>
<div
class=
"q-gutter-sm"
>
<div
v-for=
"(item, index) in checkStuList"
:key=
"index"
class=
"q-my-sm"
>
<div>
<span>
{{
item
.
StuName
}}
</span>
(
<span>
当前课章节:
{{
item
.
CourseChapterNo
}}
,
</span>
<span>
下次课章节:
{{
item
.
NextChapterNo
}}
,
</span>
<span>
已约次数:
{{
item
.
AppointNum
}}
,
</span>
<span
v-if=
"item.AppointDate"
>
已约至:
{{
item
.
AppointDate
}}
</span>
)
</div>
</div>
<div
class=
"full-width"
>
<div
@
click=
"showAddStu"
>
<q-chip
icon=
"add"
label=
"添加学员"
color=
"primary"
text-color=
"white"
size=
"sm"
/>
</div>
</div>
</div>
...
...
@@ -82,6 +157,52 @@
</q-card-actions>
</q-card>
</q-dialog>
<q-dialog
v-model=
"showStu"
persistent
content-class=
"bg-grey-1"
transition-show=
"scale"
transition-hide=
"scale"
>
<q-card
style=
"width: 600px;max-width:600px;"
>
<q-card-section>
<div
class=
"text-h6"
>
选择学员
</div>
</q-card-section>
<q-card-section>
<q-select
filled
stack-label
use-input
option-value=
"StuId"
option-label=
"StuName"
v-model=
"stuInfo"
ref=
"CourseId"
:options=
"stuList"
label=
"选择学员"
:dense=
"false"
class=
"col-12"
@
filter=
"filterStu"
/>
</q-card-section>
<q-card-actions
align=
"right"
class=
"bg-white"
>
<q-btn
label=
"取消"
flat
color=
"grey-10"
style=
"font-weight:400 !important"
@
click=
"showStu = false"
/>
<q-btn
label=
"添加"
color=
"accent"
class=
"q-px-md"
style=
"font-weight:400 !important"
@
click=
"addStu"
/>
</q-card-actions>
</q-card>
</q-dialog>
</div>
</template>
<
script
>
import
{
...
...
@@ -90,8 +211,15 @@ import {
GetStuAppointmentInfo
,
SetAdminScrollAppointment
}
from
"../../../api/studyabroad/subscribe.js"
;
import
{
queryCourseDropdownList
}
from
"../../../api/course/index"
;
import
{
queryCourseDropdownList
,
queryChapterTree
}
from
"../../../api/course/index"
;
import
selectTree
from
"../../../components/common/select-tree"
;
export
default
{
components
:
{
selectTree
},
model
:
{
prop
:
"show"
,
event
:
"changeshow"
...
...
@@ -133,6 +261,7 @@ export default {
CourseId
:
0
},
stuList
:
[],
allStuList
:
[],
stuMsg
:
{
CourseId
:
0
,
NextChapterNo
:
0
...
...
@@ -150,7 +279,13 @@ export default {
GuestId
:
0
,
CourseId
:
0
,
ChapterNo
:
0
}
},
showStu
:
false
,
stuInfo
:
""
,
checkStuList
:
[],
courseCheckList
:
[],
chapterList
:
[],
returnString
:
[],
//默认值
};
},
created
()
{},
...
...
@@ -180,35 +315,87 @@ export default {
});
},
//筛选课程
filter
Course
(
val
,
update
)
{
filter
Stu
(
val
,
update
)
{
update
(()
=>
{
if
(
val
===
""
)
{
this
.
CourseList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
AllCourseList
));
}
else
{
const
needle
=
val
.
toLowerCase
();
this
.
CourseList
=
this
.
AllCourseList
.
filter
(
v
=>
v
.
Course
Name
.
toLowerCase
().
indexOf
(
needle
)
>
-
1
v
=>
v
.
Stu
Name
.
toLowerCase
().
indexOf
(
needle
)
>
-
1
);
}
});
},
//获取老师的空闲上课时段
getCanTeacher
Class
TimeList
()
{
this
.
teaClassMsg
.
Date
=
this
.
dateObj
.
date
if
(
this
.
teaClassMsg
.
TeacherId
==
0
)
return
GetCanTeacherClassTimeList
(
this
.
teaClassMsg
).
then
(
res
=>
{
console
.
log
(
187
,
res
)
this
.
teacherTimeList
=
res
.
Data
getCanTeacherTimeList
()
{
this
.
teaClassMsg
.
Date
=
this
.
dateObj
.
date
;
if
(
this
.
teaClassMsg
.
TeacherId
==
0
)
return
;
GetCanTeacherClassTimeList
(
this
.
teaClassMsg
).
then
(
res
=>
{
console
.
log
(
187
,
res
);
this
.
teacherTimeList
=
res
.
Data
;
});
},
getStu
(){
this
.
stuMsg
.
CourseId
=
this
.
GetCanAppointmentStuList
(
this
.
stuMsg
).
then
(
res
=>
{
console
.
log
(
199
,
res
)
})
getStu
()
{
this
.
stuMsg
.
CourseId
=
this
.
teaClassMsg
.
CourseId
;
GetCanAppointmentStuList
(
this
.
stuMsg
).
then
(
res
=>
{
console
.
log
(
199
,
res
);
this
.
stuList
=
JSON
.
parse
(
JSON
.
stringify
(
res
.
Data
));
this
.
allStuList
=
JSON
.
parse
(
JSON
.
stringify
(
res
.
Data
));
});
},
//筛选学员
filterCourse
(
val
,
update
)
{
update
(()
=>
{
if
(
val
===
""
)
{
this
.
stuList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
allStuList
));
}
else
{
const
needle
=
val
.
toLowerCase
();
this
.
stuList
=
this
.
allStuList
.
filter
(
v
=>
v
.
CourseName
.
toLowerCase
().
indexOf
(
needle
)
>
-
1
);
}
});
},
getStuDetail
(
item
)
{
const
msg
=
{
StuId
:
item
.
StuId
,
GuestId
:
item
.
GuestId
};
console
.
log
(
msg
);
return
;
GetStuAppointmentInfo
(
msg
).
then
(
res
=>
{
console
.
log
(
res
);
});
},
showAddStu
()
{
this
.
showStu
=
true
;
this
.
stuInfo
=
""
;
},
addStu
()
{
this
.
showStu
=
false
;
if
(
this
.
stuInfo
)
{
console
.
log
(
this
.
stuInfo
);
this
.
checkStuList
.
push
(
this
.
stuInfo
);
}
},
//获取章节
getChapterTree
()
{
if
(
this
.
teaClassMsg
.
CourseId
==
0
)
return
;
const
msg
=
{
CourseId
:
this
.
teaClassMsg
.
CourseId
};
queryChapterTree
(
msg
).
then
(
res
=>
{
console
.
log
(
387
,
res
);
this
.
chapterList
=
res
.
Data
});
},
//章节选择
getChild
(
data
)
{
console
.
log
(
data
)
},
},
watch
:
{}
};
</
script
>
...
...
@@ -249,7 +436,7 @@ export default {
.upload-assiatant-box
.q-uploader
{
width
:
auto
;
}
.timeItem
{
.timeItem
{
margin
:
10px
0
;
}
</
style
>
src/pages/studyAbroad/subscribe.vue
View file @
51b7815f
...
...
@@ -12,6 +12,7 @@
emit-value
map-options
label=
"老师"
@
input=
"getData"
/>
</div>
<div
class=
"col-2"
>
...
...
@@ -25,6 +26,7 @@
emit-value
map-options
label=
"教室"
@
input=
"getData"
/>
</div>
<div
class=
"col-2"
>
...
...
@@ -38,6 +40,7 @@
emit-value
map-options
label=
"课程类型"
@
input=
"getData"
/>
</div>
<div
class=
"col-2"
>
...
...
@@ -51,13 +54,14 @@
emit-value
map-options
label=
"约课状态"
@
input=
"getData"
/>
</div>
<
!--
<
div
class=
"col-2"
>
<q-field
filled
dense
label=
"
开始
日期"
stack-label
>
<div
class=
"col-2"
>
<q-field
filled
dense
label=
"
选择
日期"
stack-label
>
<template
v-slot:control
>
<el-date-picker
v-model=
"
msg.Start
Date"
v-model=
"
selected
Date"
type=
"date"
size=
"mini"
placeholder=
"开始日期"
...
...
@@ -68,21 +72,6 @@
</
template
>
</q-field>
</div>
<div
class=
"col-2"
>
<q-field
filled
dense
label=
"结束日期"
stack-label
>
<
template
v-slot:control
>
<el-date-picker
v-model=
"msg.EndDate"
type=
"date"
size=
"mini"
placeholder=
"结束日期"
format=
"yyyy-MM-dd"
value-format=
"yyyy-MM-dd"
>
>
</el-date-picker>
</
template
>
</q-field>
</div>
-->
<div
class=
"col-2"
>
<q-select
filled
...
...
@@ -97,10 +86,24 @@
/>
</div>
</div>
<div
class=
"row justify-center items-center"
>
<q-btn
dense
flat
label=
"上一周"
@
click=
"calendarPrev"
/>
<div
class=
"row justify-center items-center q-mt-sm"
>
<q-btn
dense
text-color=
"primary"
flat
unelevated
:label=
"viewType == 'day' ? '上一天' : '上一周'"
@
click=
"calendarPrev"
/>
<q-separator
vertical
/>
<q-btn
dense
flat
label=
"下一周"
@
click=
"calendarNext"
/>
<q-btn
dense
text-color=
"primary"
flat
unelevated
:label=
"viewType == 'day' ? '下一天' : '下一周'"
@
click=
"calendarNext"
/>
</div>
<q-calendar
v-model=
"selectedDate"
...
...
@@ -147,7 +150,6 @@
:key=
"__index"
class=
"my-event justify-center ellipsis courseItem"
:class=
"badgeClasses(__item, 'body', _item.TeacherId)"
style=
"overflow:auto"
:style=
"
badgeStyles(
__item,
...
...
@@ -160,28 +162,84 @@
"
@
click
.
stop=
"showDetail(__item)"
>
<div
v-if=
"viewType == 'day'"
>
<div
v-if=
"viewType == 'day'
|| item.RList.length == 1
"
>
<div
class=
"itemRow"
>
{{
_item
.
TeacherName
}}
</div>
<div
class=
"itemRow"
>
{{
__item
.
CourseName
}}
</div>
<div>
{{
__item
.
ClassName
}}
</div>
<div>
班级:
{{
__item
.
ClassName
}}
</div>
<div>
{{
__item
.
StartTime
}}
-
{{
__item
.
EndTime
}}
</div>
<div>
类型:
{{
__item
.
ClassType
}}
</div>
<div>
进度:
{{
__item
.
TotalPlanNum
<
0
?
0
:
__item
.
TotalPlanNum
}}
%
</div>
<div>
学员名单:
{{
__item
.
GuestList
}}
</div>
</div>
<el-popover
placement=
"top-start"
width=
"200"
trigger=
"hover"
v-if=
"viewType == 'week'"
>
<el-popover
placement=
"top-start"
width=
"200"
trigger=
"hover"
v-if=
"viewType == 'week' && item.RList.length > 1"
>
<div
slot=
"reference"
style=
"height:100vh"
></div>
<div>
<div
class=
"itemRow"
>
{{
_item
.
TeacherName
}}
</div>
<div
class=
"itemRow"
>
{{
__item
.
CourseName
}}
</div>
<div>
{{
__item
.
ClassName
}}
</div>
<div>
{{
__item
.
StartTime
}}
-
{{
__item
.
EndTime
}}
</div>
<div
class=
"flex"
>
<span
class=
"detailLabel"
>
老师:
</span
><span>
{{
_item
.
TeacherName
}}
</span>
</div>
<div
class=
"flex"
>
<span
class=
"detailLabel"
>
教室:
</span
>
{{
__item
.
RoomName
}}
</div>
<div
class=
"flex no-wrap"
>
<span
class=
"detailLabel"
>
课程:
</span
><span>
{{
__item
.
CourseName
}}
</span>
</div>
<div
class=
"flex no-wrap"
>
<span
class=
"detailLabel"
>
班级:
</span
><span>
{{
__item
.
ClassName
}}
</span>
</div>
<div
class=
"flex no-wrap"
>
<span
class=
"detailLabel"
>
时间:
</span
><span>
{{
__item
.
StartTime
}}
-
{{
__item
.
EndTime
}}
</span>
</div>
<div
class=
"flex no-wrap"
>
<span
class=
"detailLabel"
>
类型:
<span></span
><span
v-if=
"__item.ClassType == 1"
>
跟班
</span
><span
v-if=
"__item.ClassType == 2"
>
试听课
</span
><span
v-if=
"__item.ClassType == 3"
>
约课
</span></span
>
</div>
<div
class=
"flex no-wrap"
>
<span
class=
"detailLabel"
>
进度:
</span
><span>
{{
__item
.
Ranks
}}
/
{{
__item
.
TotalPlanNum
}}
</span>
</div>
<div
class=
"flex no-wrap"
>
<span
class=
"detailLabel"
>
学员:
</span
><span>
{{
__item
.
GuestList
.
map
(
e
=>
e
.
GuestName
).
toString
()
}}
</span>
</div>
<div
class=
"flex no-wrap"
v-if=
"__item.ClassType == 3"
>
<span
class=
"detailLabel"
>
预约状态:
<span></span
><span
v-if=
"__item.AppointState == 1"
>
待确认
</span
><span
v-if=
"__item.AppointState == 2"
>
已确认
</span
></span
>
</div>
<div
class=
"flex no-wrap"
>
<span
class=
""
>
最小成班人数:
</span
><span>
{{
__item
.
ScrollMinNum
}}
</span>
</div>
<div
class=
"flex no-wrap"
>
<span
class=
""
>
最大成班人数:
</span
><span>
{{
__item
.
ScrollMaxNum
}}
</span>
</div>
<div>
进度:
{{
__item
.
TotalPlanNum
<
0
?
0
:
__item
.
TotalPlanNum
}}
%
</div>
</div>
</el-popover>
...
...
@@ -201,13 +259,14 @@
<
script
>
import
{
GetAppointmentPlanStat
}
from
"../../api/studyabroad/subscribe.js"
;
import
{
queryChapterTree
}
from
"../../api/course/index"
;
import
{
date
}
from
"quasar"
;
import
{
getTeacherDropDownList
,
queryClassRoomList
}
from
"../../api/school/index"
;
import
SubscribeForm
from
"../../components/stuMan/subscribe/subscribeForm"
;
//
import QCalendar from "@quasar/quasar-ui-qcalendar";
import
QCalendar
from
"@quasar/quasar-ui-qcalendar"
;
export
default
{
data
()
{
...
...
@@ -305,6 +364,7 @@ export default {
},
mounted
()
{
// console.log(336, this.$refs.calendar);
this
.
selectedDate
=
QCalendar
.
today
();
this
.
getTeacherList
();
this
.
getclassroom
();
this
.
msg
.
StartDate
=
this
.
$refs
.
calendar
.
lastStart
;
...
...
@@ -492,4 +552,8 @@ export default {
border-radius
:
0
;
background
:
rgba
(
0
,
0
,
0
,
0
.1
);
}
.detailLabel
{
width
:
40px
;
white-space
:
nowrap
;
}
</
style
>
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