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
cebd6f20
Commit
cebd6f20
authored
Feb 17, 2022
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2
parent
9f7ea967
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
232 additions
and
236 deletions
+232
-236
detail.vue
src/components/stuMan/subscribe/detail.vue
+223
-0
subscribeForm.vue
src/components/stuMan/subscribe/subscribeForm.vue
+9
-236
No files found.
src/components/stuMan/subscribe/detail.vue
0 → 100644
View file @
cebd6f20
<
template
>
<div
class=
"row col flex q-col-gutter-md"
>
<q-field
filled
label=
"老师"
stack-label
class=
"col-6"
>
<template
v-slot:control
>
<div>
{{
saveObj
.
TeacherName
}}
</div>
</
template
>
</q-field>
<q-field
filled
label=
"教室"
stack-label
class=
"col-6"
>
<
template
v-slot:control
>
<div>
{{
saveObj
.
RoomName
}}
</div>
</
template
>
</q-field>
<q-field
filled
label=
"课程"
stack-label
class=
"col-6"
>
<
template
v-slot:control
>
<div>
{{
saveObj
.
CourseName
}}
</div>
</
template
>
</q-field>
<q-field
filled
label=
"班级"
stack-label
class=
"col-6"
v-if=
"saveObj.ClassType !== 3"
>
<
template
v-slot:control
>
<div>
{{
saveObj
.
ClassName
}}
</div>
</
template
>
</q-field>
<q-field
filled
label=
"等级"
stack-label
class=
"col-6"
v-if=
"saveObj.ClassType == 3"
>
<
template
v-slot:control
>
<div>
{{
saveObj
.
CourseGradeName
}}
</div>
</
template
>
</q-field>
<q-field
filled
label=
"类型"
stack-label
class=
"col-6"
>
<
template
v-slot:control
>
<div>
<span
v-if=
"saveObj.ClassType == 1"
>
跟班
</span
><span
v-if=
"saveObj.ClassType == 2"
>
试听课
</span
><span
v-if=
"saveObj.ClassType == 3"
>
约课
</span>
</div>
</
template
>
</q-field>
<q-field
filled
label=
"课程时间"
stack-label
class=
"col-6"
>
<
template
v-slot:control
>
<div>
{{
saveObj
.
StartTime
}}
-
{{
saveObj
.
EndTime
}}
</div>
</
template
>
</q-field>
<q-field
filled
label=
"进度"
stack-label
class=
"col-6"
>
<
template
v-slot:control
>
<div>
{{
saveObj
.
CompleteProgress
>
0
?
saveObj
.
CompleteProgress
:
0
}}
%
</div>
</
template
>
</q-field>
<q-field
filled
label=
"预约状态:"
stack-label
class=
"col-6"
v-if=
"saveObj.ClassType == 3"
>
<
template
v-slot:control
>
<div>
<span
v-if=
"saveObj.AppointState == 1"
>
待确认
</span
><span
v-if=
"saveObj.AppointState == 2"
>
已确认
</span>
</div>
<q-btn
color=
"accent"
size=
"xs"
label=
"确认"
v-if=
"saveObj.AppointState == 1"
@
click=
"confirmSub"
class=
"q-ml-md"
/>
</
template
>
</q-field>
<q-field
filled
label=
"最小成班人数:"
stack-label
class=
"col-6"
v-if=
"saveObj.ClassType == 3"
>
<
template
v-slot:control
>
<div>
{{
saveObj
.
ScrollMinNum
}}
</div>
</
template
>
</q-field>
<q-field
filled
label=
"最大成班人数:"
stack-label
class=
"col-6"
v-if=
"saveObj.ClassType == 3"
>
<
template
v-slot:control
>
<div>
{{
saveObj
.
ScrollMaxNum
}}
</div>
</
template
>
</q-field>
<q-field
filled
label=
"已约学员:"
stack-label
class=
"col-12"
v-if=
"saveObj.ClassType == 3"
>
<
template
v-slot:control
>
<div
v-if=
"saveObj.AppointState == 1"
>
<div
class=
"q-mt-sm flex justify-start"
>
<q-btn
color=
"accent"
size=
"xs"
label=
"取消预约"
@
click=
"cancelSub()"
:disable=
"checkStuType2.length == 0"
/>
</div>
<div
class=
"row"
>
<q-checkbox
v-model=
"checkStuType2"
v-for=
"(item, index) in saveObj.GuestList"
:key=
"index"
:label=
"item.GuestName"
:val=
"item.StuId"
/>
</div>
</div>
<div
v-else
>
{{
saveObj
.
GuestList
.
map
(
e
=>
e
.
GuestName
).
toString
()
}}
</div>
</
template
>
</q-field>
<q-field
filled
label=
"学员名单:"
stack-label
class=
"col-12"
v-if=
"saveObj.ClassType !== 3"
>
<
template
v-slot:control
>
<div>
{{
saveObj
.
GuestList
.
map
(
e
=>
e
.
GuestName
).
toString
()
}}
</div>
</
template
>
</q-field>
</div>
</template>
<
script
>
import
{
CancelAppointment
,
SetSureAppointment
}
from
"../../../api/studyabroad/subscribe.js"
;
export
default
{
props
:
{
dateObj
:
{
type
:
Object
,
default
:
null
},
saveObj
:
{
type
:
Object
,
default
:
null
}
},
data
()
{
return
{
checkStuType2
:
[]
//
};
},
methods
:
{
//取消预约
cancelSub
()
{
const
msg
=
{
Date
:
this
.
dateObj
.
date
,
TeacherId
:
this
.
saveObj
.
Tid
,
StuIds
:
this
.
checkStuType2
.
toString
()
};
CancelAppointment
(
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
$q
.
notify
({
message
:
"操作成功"
,
position
:
"top"
});
this
.
changeDig
(
false
);
this
.
$emit
(
"success"
);
}
});
},
//确认约课
confirmSub
()
{
if
(
this
.
saveObj
.
EnrollNum
<
this
.
saveObj
.
ScrollMinNum
)
{
this
.
$q
.
notify
({
message
:
`最小开班人数为
${
this
.
saveObj
.
ScrollMinNum
}
`
,
position
:
"top"
,
type
:
"negative"
});
return
;
}
const
msg
=
{
Date
:
this
.
dateObj
.
date
,
TeacherId
:
this
.
saveObj
.
Tid
,
ShiftSort
:
this
.
saveObj
.
ShiftSort
};
SetSureAppointment
(
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
$q
.
notify
({
message
:
"操作成功"
,
position
:
"top"
,
type
:
"positive"
});
this
.
$emit
(
"success"
);
}
});
}
}
};
</
script
>
src/components/stuMan/subscribe/subscribeForm.vue
View file @
cebd6f20
...
@@ -21,193 +21,10 @@
...
@@ -21,193 +21,10 @@
</
template
>
</
template
>
</q-field>
</q-field>
<!-- 详情显示内容 start-->
<!-- 详情显示内容 start-->
<q-field
<div
class=
"col-12"
v-if=
"editType==2"
>
filled
<Detail
:dateObj=
"dateObj"
:saveObj=
"saveObj"
/>
label=
"老师"
</div>
stack-label
class=
"col-12"
v-if=
"editType == 2"
>
<
template
v-slot:control
>
<div>
{{
saveObj
.
TeacherName
}}
</div>
</
template
>
</q-field>
<q-field
filled
label=
"教室"
stack-label
class=
"col-12"
v-if=
"editType == 2"
>
<
template
v-slot:control
>
<div>
{{
saveObj
.
RoomName
}}
</div>
</
template
>
</q-field>
<q-field
filled
label=
"课程"
stack-label
class=
"col-12"
v-if=
"editType == 2"
>
<
template
v-slot:control
>
<div>
{{
saveObj
.
CourseName
}}
</div>
</
template
>
</q-field>
<q-field
filled
label=
"班级"
stack-label
class=
"col-12"
v-if=
"editType == 2 && saveObj.ClassType !== 3"
>
<
template
v-slot:control
>
<div>
{{
saveObj
.
ClassName
}}
</div>
</
template
>
</q-field>
<q-field
filled
label=
"等级"
stack-label
class=
"col-12"
v-if=
"editType == 2 && saveObj.ClassType == 3"
>
<
template
v-slot:control
>
<div>
{{
saveObj
.
CourseGradeName
}}
</div>
</
template
>
</q-field>
<q-field
filled
label=
"类型"
stack-label
class=
"col-12"
v-if=
"editType == 2"
>
<
template
v-slot:control
>
<div>
<span
v-if=
"saveObj.ClassType == 1"
>
跟班
</span
><span
v-if=
"saveObj.ClassType == 2"
>
试听课
</span
><span
v-if=
"saveObj.ClassType == 3"
>
约课
</span>
</div>
</
template
>
</q-field>
<q-field
filled
label=
"课程时间"
stack-label
class=
"col-12"
v-if=
"editType == 2"
>
<
template
v-slot:control
>
<div>
{{
saveObj
.
StartTime
}}
-
{{
saveObj
.
EndTime
}}
</div>
</
template
>
</q-field>
<q-field
filled
label=
"进度"
stack-label
class=
"col-12"
v-if=
"editType == 2"
>
<
template
v-slot:control
>
<div>
{{
saveObj
.
CompleteProgress
>
0
?
saveObj
.
CompleteProgress
:
0
}}
%
</div>
</
template
>
</q-field>
<q-field
filled
label=
"预约状态:"
stack-label
class=
"col-12"
v-if=
"editType == 2 && saveObj.ClassType == 3"
>
<
template
v-slot:control
>
<div>
<span
v-if=
"saveObj.AppointState == 1"
>
待确认
</span
><span
v-if=
"saveObj.AppointState == 2"
>
已确认
</span>
</div>
<q-btn
color=
"accent"
size=
"xs"
label=
"确认"
v-if=
"saveObj.AppointState == 1"
@
click=
"confirmSub"
class=
"q-ml-md"
/>
</
template
>
</q-field>
<q-field
filled
label=
"最小成班人数:"
stack-label
class=
"col-12"
v-if=
"editType == 2 && saveObj.ClassType == 3"
>
<
template
v-slot:control
>
<div>
{{
saveObj
.
ScrollMinNum
}}
</div>
</
template
>
</q-field>
<q-field
filled
label=
"最大成班人数:"
stack-label
class=
"col-12"
v-if=
"editType == 2 && saveObj.ClassType == 3"
>
<
template
v-slot:control
>
<div>
{{
saveObj
.
ScrollMaxNum
}}
</div>
</
template
>
</q-field>
<q-field
filled
label=
"已约学员:"
stack-label
class=
"col-12"
v-if=
"editType == 2 && saveObj.ClassType == 3"
>
<
template
v-slot:control
>
<div
v-if=
"saveObj.AppointState == 1"
>
<div
class=
"q-mt-sm flex justify-start"
>
<q-btn
color=
"accent"
size=
"xs"
label=
"取消预约"
@
click=
"cancelSub()"
:disable=
"checkStuType2.length == 0"
/>
</div>
<div
class=
"row"
>
<q-checkbox
v-model=
"checkStuType2"
v-for=
"(item, index) in saveObj.GuestList"
:key=
"index"
:label=
"item.GuestName"
:val=
"item.StuId"
/>
</div>
</div>
<div
v-else
>
{{
saveObj
.
GuestList
.
map
(
e
=>
e
.
GuestName
).
toString
()
}}
</div>
</
template
>
</q-field>
<q-field
filled
label=
"学员名单:"
stack-label
class=
"col-12"
v-if=
"editType == 2 && saveObj.ClassType !== 3"
>
<
template
v-slot:control
>
<div>
{{
saveObj
.
GuestList
.
map
(
e
=>
e
.
GuestName
).
toString
()
}}
</div>
</
template
>
</q-field>
<!-- 详情显示内容 end -->
<!-- 详情显示内容 end -->
<q-select
<q-select
filled
filled
...
@@ -373,18 +190,18 @@ import {
...
@@ -373,18 +190,18 @@ import {
GetCanTeacherClassTimeList
,
GetCanTeacherClassTimeList
,
GetCanAppointmentStuList
,
GetCanAppointmentStuList
,
SetAdminScrollAppointment
,
SetAdminScrollAppointment
,
CancelAppointment
,
SetSureAppointment
}
from
"../../../api/studyabroad/subscribe.js"
;
}
from
"../../../api/studyabroad/subscribe.js"
;
import
{
import
{
queryCourseDropdownList
,
queryCourseDropdownList
,
queryChapterTree
queryChapterTree
}
from
"../../../api/course/index"
;
}
from
"../../../api/course/index"
;
import
selectTree
from
"../../../components/common/select-tree"
;
import
selectTree
from
"../../../components/common/select-tree"
;
import
Detail
from
"./detail.vue"
import
QCalendar
from
"@quasar/quasar-ui-qcalendar"
;
import
QCalendar
from
"@quasar/quasar-ui-qcalendar"
;
export
default
{
export
default
{
components
:
{
components
:
{
selectTree
selectTree
,
Detail
},
},
model
:
{
model
:
{
prop
:
"show"
,
prop
:
"show"
,
...
@@ -465,7 +282,7 @@ export default {
...
@@ -465,7 +282,7 @@ export default {
chapterList
:
[],
//章节列表,
chapterList
:
[],
//章节列表,
checkChapter
:
{},
//选择的章节
checkChapter
:
{},
//选择的章节
returnString
:
[],
//章节默认值
returnString
:
[],
//章节默认值
checkStuType2
:
[]
//
};
};
},
},
mounted
()
{
mounted
()
{
...
@@ -619,7 +436,6 @@ export default {
...
@@ -619,7 +436,6 @@ export default {
const
totalTime
=
this
.
courseCheckList
.
reduce
((
pre
,
cur
)
=>
{
const
totalTime
=
this
.
courseCheckList
.
reduce
((
pre
,
cur
)
=>
{
return
(
pre
+=
cur
.
Minutes
);
return
(
pre
+=
cur
.
Minutes
);
},
0
);
},
0
);
console
.
log
(
622
,
totalTime
,
this
.
checkChapter
.
StudyMinutes
)
if
(
this
.
checkChapter
.
StudyMinutes
!==
totalTime
)
{
if
(
this
.
checkChapter
.
StudyMinutes
!==
totalTime
)
{
this
.
$q
.
notify
({
this
.
$q
.
notify
({
message
:
"课时不匹配,请重新上课时段"
,
message
:
"课时不匹配,请重新上课时段"
,
...
@@ -685,50 +501,7 @@ export default {
...
@@ -685,50 +501,7 @@ export default {
}
}
});
});
},
},
//取消预约
cancelSub
()
{
const
msg
=
{
Date
:
this
.
dateObj
.
date
,
TeacherId
:
this
.
saveObj
.
Tid
,
StuIds
:
this
.
checkStuType2
.
toString
()
};
CancelAppointment
(
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
$q
.
notify
({
message
:
"操作成功"
,
position
:
"top"
});
this
.
changeDig
(
false
);
this
.
$emit
(
"success"
);
}
});
},
//确认约课
confirmSub
()
{
if
(
this
.
saveObj
.
EnrollNum
<
this
.
saveObj
.
ScrollMinNum
)
{
this
.
$q
.
notify
({
message
:
`最小开班人数为
${
this
.
saveObj
.
ScrollMinNum
}
`
,
position
:
"top"
,
type
:
"negative"
});
return
;
}
const
msg
=
{
Date
:
this
.
dateObj
.
date
,
TeacherId
:
this
.
saveObj
.
Tid
,
ShiftSort
:
this
.
saveObj
.
ShiftSort
};
SetSureAppointment
(
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
$q
.
notify
({
message
:
"操作成功"
,
position
:
"top"
,
type
:
"positive"
});
this
.
$emit
(
"success"
);
}
});
},
showAddStu
()
{
showAddStu
()
{
if
(
if
(
new
Date
(
this
.
dateObj
.
date
).
getTime
()
<
new
Date
(
this
.
dateObj
.
date
).
getTime
()
<
...
...
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