Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ElectricitySheep
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
黄媛媛
ElectricitySheep
Commits
d0c21c4b
Commit
d0c21c4b
authored
Feb 01, 2021
by
Mac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
71021c4c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
948 additions
and
6 deletions
+948
-6
addclassify.vue
src/components/education/addclassify.vue
+17
-6
addteacherCourse.vue
src/components/education/addteacherCourse.vue
+380
-0
educationIndex.vue
src/components/education/educationIndex.vue
+3
-0
teacherCourseList.vue
src/components/education/teacherCourseList.vue
+536
-0
index.js
src/router/index.js
+12
-0
No files found.
src/components/education/addclassify.vue
View file @
d0c21c4b
...
...
@@ -19,18 +19,18 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"是否为公开课"
>
<el-radio
v-model=
"addMsg.IsPublic"
:label=
"0"
>
否
</el-radio>
<el-radio
v-model=
"addMsg.IsPublic"
:label=
"1"
>
是
</el-radio>
<el-form-item
label=
"是否为公开课"
>
<el-radio
v-model=
"addMsg.IsPublic"
:label=
"0"
@
change=
"getgongkai()"
>
否
</el-radio>
<el-radio
v-model=
"addMsg.IsPublic"
:label=
"1"
@
change=
"getgongkai()"
>
是
</el-radio>
</el-form-item>
<el-form-item
label=
"是否免费"
>
<el-radio
v-model=
"addMsg.IsFree"
:label=
"0"
>
否
</el-radio>
<el-radio
v-model=
"addMsg.IsFree"
:label=
"1"
>
是
</el-radio>
<el-radio
v-model=
"addMsg.IsFree"
:label=
"0"
:disabled=
"gkshow"
>
否
</el-radio>
<el-radio
v-model=
"addMsg.IsFree"
:label=
"1"
:disabled=
"gkshow"
>
是
</el-radio>
</el-form-item>
<el-form-item
label=
"点数"
prop=
"PointNum"
class=
"is-required"
size=
"small"
>
<el-input
v-model=
"addMsg.PointNum"
placeholder=
"请输入点数"
class=
"w400"
type=
"number"
:min=
"0"
/>
<el-input
v-model=
"addMsg.PointNum"
placeholder=
"请输入点数"
class=
"w400"
type=
"number"
:min=
"0"
:disabled=
"gkshow"
/>
</el-form-item>
<el-form-item
label=
"时长"
prop=
"Duration"
class=
"is-required"
size=
"small"
>
<el-input
v-model=
"addMsg.Duration"
placeholder=
"请输入时长"
class=
"w400"
type=
"number"
:min=
"0"
/>
...
...
@@ -101,6 +101,7 @@
CourseClassList
:[],
DurationList
:[],
StudentList
:[],
gkshow
:
false
};
},
created
()
{
...
...
@@ -113,6 +114,16 @@
this
.
getStudentList
()
//上课人数枚举
},
methods
:
{
getgongkai
(){
if
(
this
.
addMsg
.
IsPublic
==
1
){
this
.
addMsg
.
PointNum
=
0
;
this
.
addMsg
.
IsFree
=
1
;
this
.
gkshow
=
true
;
}
else
{
this
.
gkshow
=
false
}
},
Save
(
formName
)
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
...
...
src/components/education/addteacherCourse.vue
0 → 100644
View file @
d0c21c4b
<
template
>
<div
v-loading=
"loading"
class=
"addteacherCourse"
>
<div
class=
"head-title"
>
<span
@
click=
"CommonJump('teacherCourseList')"
class=
"blue point"
>
排课管理
</span>
/ 编辑排课管理
</div>
<div
class=
"content"
>
<el-form
:model=
"addMsg"
:rules=
"rules"
ref=
"addMsg"
label-width=
"150px"
style=
"width:50%"
>
<el-form-item
label=
"课程名称"
prop=
"CourseName"
class=
"is-required"
size=
"small"
>
<el-input
v-model=
"addMsg.CourseName"
placeholder=
"请输入课程名称"
class=
"w400"
/>
</el-form-item>
<el-form-item
label=
"课程分类"
prop=
"CourseClassId"
class=
"is-required"
>
<el-select
class=
"w400"
style=
"margin-right: 10px;"
v-model=
"addMsg.CourseClassId"
size=
"small"
@
change=
"getCoursedata(addMsg.CourseClassId)"
placeholder=
"请选择"
>
<el-option
v-for=
"item in CourseClassList"
:key=
"item.ID"
:label=
"item.ClassName"
:value=
"item.ID"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"老师"
prop=
"TeacherId"
class=
"is-required"
>
<el-select
class=
"w400"
style=
"margin-right: 10px;"
v-model=
"addMsg.TeacherId"
size=
"small"
placeholder=
"请选择"
>
<el-option
v-for=
"item in teacherList"
:key=
"item.ID"
:label=
"item.Name"
:value=
"item.ID"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"排课日期"
prop=
"StudyDate"
class=
"is-required"
>
<el-date-picker
v-model=
"addMsg.StudyDate"
type=
"date"
value-format=
"yyyy-MM-dd"
placeholder=
"选择日期"
>
</el-date-picker>
</el-form-item>
<el-form-item
label=
"开始时间"
prop=
"StudyStartDate"
class=
"is-required"
>
<el-time-picker
v-model=
"addMsg.StudyStartDate"
format=
"HH:mm"
value-format=
"HH:mm"
@
change=
"getTime()"
:picker-options=
"
{
selectableRange: '00:00:00 - 23:59:00'
}"
placeholder="选择开始时间">
</el-time-picker>
</el-form-item>
<el-form-item
label=
"结束时间"
prop=
"StudyEndDate"
class=
"is-required"
>
<el-time-picker
:disabled=
"jiesushow"
v-model=
"addMsg.StudyEndDate"
format=
"HH:mm"
value-format=
"HH:mm"
:picker-options=
"
{
selectableRange: '00:00:00 - 23:59:00',
minTime: addMsg.StudyStartDate
}"
placeholder="选择结束时间">
</el-time-picker>
</el-form-item>
<el-form-item
label=
"点数"
prop=
"PointNum"
class=
"is-required"
size=
"small"
>
<el-input
v-model=
"addMsg.PointNum"
placeholder=
"请输入点数"
class=
"w400"
type=
"number"
:min=
"0"
:disabled=
'dianshushow'
/>
</el-form-item>
<el-form-item
label=
"最少约课时长"
prop=
"MinDuration"
class=
"is-required"
size=
"small"
>
<el-input
v-model=
"addMsg.MinDuration"
placeholder=
"请输入时长"
class=
"w400"
type=
"number"
:min=
"0"
:disabled=
"jiesushow"
/>
</el-form-item>
<el-form-item
label=
"每课时长"
prop=
"StudyDuration"
class=
"is-required"
size=
"small"
>
<el-input
v-model=
"addMsg.StudyDuration"
placeholder=
"请输入时长"
class=
"w400"
type=
"number"
:min=
"0"
@
blur=
"getTime()"
/>
</el-form-item>
<el-form-item
label=
"时长单位"
prop=
"DurationUnit"
class=
"is-required"
>
<el-select
class=
"w400"
style=
"margin-right: 10px;"
v-model=
"addMsg.DurationUnit"
size=
"small"
@
change=
"getTime()"
placeholder=
"请选择"
>
<el-option
v-for=
"item in DurationList"
:key=
"item.Id"
:label=
"item.Name"
:value=
"item.Id"
>
</el-option>
</el-select>
</el-form-item>
</el-form>
</div>
<div
style=
"margin-top:20px"
>
<el-button
size=
"small"
type=
"primary"
@
click=
"Save('addMsg')"
>
保存
</el-button>
</div>
</div>
</
template
>
<
script
>
export
default
{
components
:
{
},
data
()
{
return
{
addMsg
:
{
ID
:
0
,
CourseClassId
:
''
,
TeacherId
:
''
,
StudyDate
:
''
,
StudyStartDate
:
'08:00'
,
StudyEndDate
:
'08:00'
,
PointNum
:
0
,
CourseName
:
''
,
MinDuration
:
0
,
StudyDuration
:
0
,
DurationUnit
:
''
,
IsPublic
:
0
},
rules
:
{
CourseName
:[{
required
:
true
,
message
:
'请选择课程名称'
,
trigger
:
'blur'
}],
CourseClassId
:
[{
required
:
true
,
message
:
'请选择课程分类'
,
trigger
:
'blur'
}],
StudyDuration
:
[{
required
:
true
,
message
:
'请输入最少每课时长'
,
trigger
:
'blur'
}],
MinDuration
:
[{
required
:
true
,
message
:
'请输入最少约课时长'
,
trigger
:
'blur'
}],
StudyDate
:[{
required
:
true
,
message
:
'请选择课排课日期'
,
trigger
:
'blur'
}],
PointNum
:
[{
required
:
true
,
message
:
'请输入点数'
,
trigger
:
'blur'
}],
TeacherId
:
[{
required
:
true
,
message
:
'请选择老师'
,
trigger
:
'blur'
}],
Duration
:
[{
required
:
true
,
message
:
'时长不能为空'
,
trigger
:
'blur'
}],
DurationUnit
:
[{
required
:
true
,
message
:
'请选择时长单位'
,
trigger
:
'blur'
}],
StudyStartDate
:
[{
required
:
true
,
message
:
'请选择开始时间'
,
trigger
:
'blur'
}],
StudyEndDate
:
[{
required
:
true
,
message
:
'请选择结束时间'
,
trigger
:
'blur'
}],
},
loading
:
false
,
CourseClassList
:[],
DurationList
:[],
teacherList
:[],
dianshushow
:
false
,
jiesushow
:
false
,
selectdata
:{},
};
},
created
()
{
if
(
this
.
$route
.
query
.
ID
){
this
.
getData
(
this
.
$route
.
query
.
ID
)
}
this
.
getCourseClassList
()
//课程分类枚举
this
.
getDurationList
()
//课程时长单位枚举
this
.
getTeacherList
()
},
methods
:
{
Save
(
formName
)
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
this
.
addMsg
.
PointNum
=
Number
(
this
.
addMsg
.
PointNum
)
this
.
addMsg
.
MinDuration
=
Number
(
this
.
addMsg
.
MinDuration
)
this
.
addMsg
.
StudyDuration
=
Number
(
this
.
addMsg
.
StudyDuration
)
this
.
apipost
(
"/api/Point/GetSetTeacherCourse"
,
this
.
addMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
CommonJump
(
'teacherCourseList'
);
this
.
Success
(
res
.
data
.
message
);
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
})
}
else
{
return
false
;
}
});
},
getTeacherList
()
{
this
.
apipost
(
"/api/Education/GetTeacherList"
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
teacherList
=
res
.
data
.
data
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
})
},
getCourseClassList
(){
this
.
apipost
(
"/api/Point/GetPointCourseClassList"
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
){
this
.
CourseClassList
=
res
.
data
.
data
}
else
{
this
.
Info
(
res
.
data
.
message
);
}
})
},
getDurationList
(){
this
.
apipost
(
"/api/Point/GetDurationUnitEnumList"
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
){
this
.
DurationList
=
res
.
data
.
data
}
else
{
this
.
Info
(
res
.
data
.
message
);
}
})
},
getCoursedata
(
item
){
this
.
CourseClassList
.
forEach
(
x
=>
{
if
(
x
.
ID
==
item
){
this
.
selectdata
=
x
this
.
addMsg
.
PointNum
=
x
.
PointNum
;
this
.
addMsg
.
StudyDuration
=
x
.
Duration
;
this
.
addMsg
.
DurationUnit
=
x
.
DurationUnit
;
this
.
addMsg
.
IsPublic
=
x
.
IsPublic
;
if
(
x
.
IsPublic
==
1
){
//免费课程和公开课 不要点数
this
.
addMsg
.
PointNum
=
0
;
this
.
dianshushow
=
true
}
else
{
this
.
dianshushow
=
false
}
if
(
x
.
StudentNumType
==
2
){
//一对多的处理
this
.
jiesushow
=
true
;
this
.
addMsg
.
MinDuration
=
x
.
Duration
;
this
.
getTime
()
}
else
{
this
.
jiesushow
=
false
}
}
})
},
getTime
(){
let
select
=
this
.
selectdata
if
(
select
.
StudentNumType
&&
select
.
StudentNumType
==
2
){
//判断是否存在并且等于2
let
start1
=
this
.
addMsg
.
StudyStartDate
.
split
(
":"
);
let
startAll
=
parseInt
(
start1
[
0
]
*
60
)
+
parseInt
(
start1
[
1
]);
let
end
=
0
if
(
this
.
addMsg
.
DurationUnit
==
1
){
//分钟的时候
end
=
startAll
+
Number
(
this
.
addMsg
.
StudyDuration
)
}
else
{
//小时的时候
end
=
startAll
+
Number
(
this
.
addMsg
.
StudyDuration
*
60
)
}
this
.
addMsg
.
StudyEndDate
=
((
Math
.
floor
(
end
/
60
)).
toString
().
length
<
2
?
"0"
+
(
Math
.
floor
(
end
/
60
)).
toString
()
:
(
Math
.
floor
(
end
/
60
)).
toString
())
+
":"
+
((
end
%
60
).
toString
().
length
<
2
?
"0"
+
(
end
%
60
).
toString
()
:
(
end
%
60
).
toString
());
}
},
getData
(
ID
)
{
this
.
loading
=
true
;
this
.
apipost
(
"/api/Point/GetTeacherCourseModel"
,
{
ID
:
ID
},
res
=>
{
this
.
loading
=
false
;
this
.
addMsg
=
res
.
data
.
data
;
})
},
},
mounted
()
{
}
};
</
script
>
<
style
>
.app-add-cat
.el-checkbox-group
{
font-size
:
14px
!important
;
}
.app-add-cat
.el-checkbox
{
margin-right
:
0
;
}
.app-add-cat
.el-dialog__body
{
padding
:
10px
20px
!important
;
}
.app-add-cat
.tag-box
.tag-item
{
margin-right
:
5px
;
}
.app-add-cat
.tag-box
{
margin
:
20px
0
;
}
.app-add-cat
.app-goods-cat-list
.active
{
background
:
#FAFAFA
;
}
.app-add-cat
.app-goods-cat-list
.cat-item
{
cursor
:
pointer
;
padding
:
5px
10px
;
}
.app-add-cat
.app-goods-cat-list
{
border
:
1px
solid
#E8EAEE
;
border-radius
:
5px
;
margin-top
:
-5px
;
padding
:
10px
0
;
overflow
:
scroll
;
height
:
400px
;
}
.addteacherCourse
.blue
{
color
:
#409EFF
;
}
.addteacherCourse
.content
{
background
:
#fff
;
margin-top
:
10px
;
padding
:
20px
;
box-sizing
:
border-box
;
}
.addteacherCourse
.gez_list
{
/*width: 650px;*/
margin-bottom
:
12px
;
padding
:
20px
;
border
:
1px
solid
#EBEEF5
;
background-color
:
#FFF
;
color
:
#303133
;
}
.addteacherCourse
.quyu
{
background-color
:
#f4f4f5
;
color
:
#909399
;
padding
:
10px
;
line-height
:
30px
;
height
:
30px
;
font-size
:
12px
;
border-radius
:
4px
;
white-space
:
nowrap
;
margin
:
5px
;
}
.addteacherCourse
.el-tag
+
.el-tag
{
margin-left
:
10px
;
}
.addteacherCourse
.button-new-tag
{
margin-left
:
10px
;
height
:
32px
;
line-height
:
30px
;
padding-top
:
0
;
padding-bottom
:
0
;
}
.addteacherCourse
.input-new-tag
{
width
:
90px
;
margin-left
:
10px
;
vertical-align
:
bottom
;
}
</
style
>
src/components/education/educationIndex.vue
View file @
d0c21c4b
...
...
@@ -202,6 +202,9 @@
<li
class=
"menu_item"
:class=
"
{'Fchecked':isChecked=='/onlineclassifyList'}" @click="isChecked='/onlineclassifyList',CommonJump('onlineclassifyList')">
<i
class=
"el-icon-menu"
></i><span>
在线分类列表
</span>
</li>
<li
class=
"menu_item"
:class=
"
{'Fchecked':isChecked=='/teacherCourseList'}" @click="isChecked='/teacherCourseList',CommonJump('teacherCourseList')">
<i
class=
"el-icon-menu"
></i><span>
老师排课
</span>
</li>
</ul>
</div>
</div>
...
...
src/components/education/teacherCourseList.vue
0 → 100644
View file @
d0c21c4b
<
template
>
<div
class=
"teacherCourseList"
>
<div
class=
"el-card__header"
>
<span>
老师排课
</span>
<div
style=
"display: flex;flex-direction: row;align-items: center"
>
<el-button
type=
"primary"
class=
"el-button--small"
@
click=
"addRecharge"
>
新增
</el-button>
</div>
</div>
<div
class=
"page-body teacherLesson"
style=
"background: white;margin-top: 15px;padding: 15px"
>
<div
class=
"block"
>
<span>
老师
</span>
<el-select
class=
"w200"
@
change=
"getList()"
style=
"margin-right: 10px;"
v-model=
"msg.TeacherId"
size=
"small"
placeholder=
"请选择"
>
<el-option
label=
"不限"
:value=
"0"
></el-option>
<el-option
v-for=
"item in teacherList"
:key=
"item.ID"
:label=
"item.Name"
:value=
"item.ID"
>
</el-option>
</el-select>
</div>
<div
class=
"TeacherTop"
>
<div
class=
"Teacher_Left"
>
<div
class=
"Teacher_Inner"
>
{{
tYear
}}
年
</div>
<div
class=
"Cal_Bottom"
>
{{
tMonth
}}
</div>
</div>
<div
class=
"Cal_List flex"
>
<div
class=
"Cal_Qiehuan"
@
click=
"getBeforeMonth()"
>
<div
class=
"Cal_Icon"
>
<i
class=
"el-icon-arrow-left"
></i></div>
<div>
上个月
</div>
</div>
<div
class=
"Cal_Content col"
>
<div
class=
"Cal_Inner"
v-for=
"(item,index) in dataNum"
:class=
"
{'checkedPlan':ckedIndex==item}" @click="getItem(item)">
{{
item
}}
<!--
<div
class=
"beikeStatus beike1"
v-if=
"getLessonStatus(item)=='未备课'"
>
-->
<!--
<span>
{{
getLessonStatus
(
item
)
}}
</span>
-->
<!--
</div>
-->
<!--
<div
class=
"beikeStatus beike2"
v-if=
"getLessonStatus(item)=='部分'"
>
-->
<!--
<span>
{{
getLessonStatus
(
item
)
}}
</span>
-->
<!--
</div>
-->
<!--
<div
class=
"beikeStatus beike3"
v-if=
"getLessonStatus(item)=='已备课'"
>
-->
<!--
<span>
{{
getLessonStatus
(
item
)
}}
</span>
-->
<!--
</div>
-->
</div>
</div>
<div
class=
"Cal_Qiehuan"
@
click=
"getNextMonth()"
>
<div
class=
"Cal_Icon"
>
<i
class=
"el-icon-arrow-right"
></i></div>
<div>
下个月
</div>
</div>
</div>
</div>
<div
class=
"TeacherYarr"
>
{{
tYear
}}
年
{{
tMonth
}}
月
{{
ckedIndex
}}
日
</div>
<div
style=
"margin-top:30px;"
>
<div
class=
"TeacherInfo_List"
v-for=
"(item,index) in newDataList"
>
<div
class=
"timeleft"
>
<div
style=
"width: 45px;"
>
{{
item
.
StartTime
}}
</div>
</div>
<div
class=
"timeright"
>
<div
class=
"record_List"
>
<div
class=
"TeacherNameList"
>
{{
item
.
ClassName
}}
<span
class=
"TeacherName"
>
{{
item
.
TeacherName
}}
</span>
<li
class=
"cicle1"
>
<img
:src=
"item.TeacherLogo"
alt=
""
style=
"width: 100%;height: 100%;border-radius: 50%"
>
</li>
</div>
<div
class=
"TeacherContent"
>
<div>
课程名称:
{{
item
.
CourseName
}}
</div>
<div>
上课时间:
{{
item
.
StudyStartDate
}}
-
{{
item
.
StudyEndDate
}}
</div>
<div>
上课时长:
{{
item
.
StudyDuration
}}{{
item
.
DurationUnitName
}}
</div>
<div>
最少约课时长:
{{
item
.
MinDuration
}}
</div>
<div>
需要点数:
{{
item
.
PointNum
}}
</div>
<div>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"编辑"
placement=
"top"
>
<img
src=
"../../assets/img/setup/edit.png"
alt=
""
class=
"imgstyle"
@
click=
"Edit(item)"
>
</el-tooltip>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"删除"
placement=
"top"
>
<img
src=
"../../assets/img/setup/del.png"
alt=
""
class=
"imgstyle"
@
click=
"delete_b(item)"
>
</el-tooltip>
</div>
</div>
<div
style=
"margin:20px 0 30px 0;"
>
<span
class=
"beikeBtn"
v-if=
"item.LessonPlanNum>0"
style=
"background:#3FC4FF;"
@
click=
"goyibeike(item)"
>
已备课
</span>
<span
class=
"beikeBtn"
v-if=
"item.LessonPlanNum==0"
@
click=
"goBeike(item)"
>
备课
</span>
<span
class=
"beikeBtn"
v-if=
"item.LessonPlanNum>0"
@
click=
"goBeike(item)"
>
修改
</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</
template
>
<
script
>
export
default
{
name
:
"teacherCourseList"
,
data
(){
return
{
msg
:{
SelectStartTime
:
''
,
SelectEndTime
:
''
,
TeacherId
:
0
,
},
changeState
:
false
,
dateList
:[],
newDataList
:[],
tableData
:[],
count
:
0
,
loading
:
false
,
dataNum
:[],
EnableMsg
:{
Ids
:
''
,
TeacherStatus
:
0
,
},
teacherList
:[],
}
},
created
(){
var
myDate
=
new
Date
();
this
.
tYear
=
myDate
.
getFullYear
();
this
.
tMonth
=
myDate
.
getMonth
()
+
1
;
this
.
tDay
=
myDate
.
getDate
();
this
.
ckedIndex
=
this
.
tDay
;
this
.
dataNum
=
this
.
mGetDate
(
this
.
tYear
,
this
.
tMonth
);
this
.
msg
.
SelectStartTime
=
this
.
tYear
+
'-'
+
this
.
tMonth
+
'-'
+
'01'
;
this
.
msg
.
SelectEndTime
=
this
.
tYear
+
'-'
+
this
.
tMonth
+
'-'
+
this
.
dataNum
;
this
.
getList
();
this
.
getTeacherList
()
},
methods
:{
getList
(){
this
.
loading
=
true
;
this
.
apipost
(
"/api/Point/GetTeacherCourseList"
,
this
.
msg
,
res
=>
{
this
.
loading
=
false
;
if
(
res
.
data
.
resultCode
==
1
){
this
.
dataList
=
res
.
data
.
data
;
var
month
=
this
.
tMonth
;
var
day
=
this
.
ckedIndex
;
if
(
month
<
10
){
month
=
'0'
+
month
;
}
if
(
day
<
10
){
day
=
'0'
+
day
;
}
if
(
this
.
dataList
.
length
>
0
){
this
.
dataList
.
forEach
(
x
=>
{
if
(
x
.
DateYear
==
this
.
tYear
&&
x
.
DateMonth
==
month
&&
x
.
DateDay
==
day
){
this
.
newDataList
=
x
.
PlanList
;
}
})
}
}
else
{
this
.
Info
(
res
.
data
.
message
);
}
})
},
getTeacherList
()
{
this
.
apipost
(
"/api/Education/GetTeacherList"
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
teacherList
=
res
.
data
.
data
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
})
},
mGetDate
(
year
,
month
)
{
var
d
=
new
Date
(
year
,
month
,
0
);
return
d
.
getDate
();
},
getBeforeMonth
()
{
if
(
this
.
tMonth
==
1
)
{
this
.
tYear
=
this
.
tYear
-
1
;
this
.
tMonth
=
12
;
}
else
{
this
.
tMonth
=
this
.
tMonth
-
1
;
}
this
.
dataNum
=
this
.
mGetDate
(
this
.
tYear
,
this
.
tMonth
);
this
.
msg
.
SelectStartTime
=
this
.
tYear
+
'-'
+
this
.
tMonth
+
'-'
+
'01'
;
this
.
msg
.
SelectEndTime
=
this
.
tYear
+
'-'
+
this
.
tMonth
+
'-'
+
this
.
dataNum
;
this
.
getList
();
},
//点击下个月
getNextMonth
()
{
if
(
this
.
tMonth
==
12
)
{
this
.
tYear
=
this
.
tYear
+
1
;
this
.
tMonth
=
1
;
}
else
{
this
.
tMonth
=
this
.
tMonth
+
1
;
}
this
.
dataNum
=
this
.
mGetDate
(
this
.
tYear
,
this
.
tMonth
);
this
.
msg
.
SelectStartTime
=
this
.
tYear
+
'-'
+
this
.
tMonth
+
'-'
+
'01'
;
this
.
msg
.
SelectEndTime
=
this
.
tYear
+
'-'
+
this
.
tMonth
+
'-'
+
this
.
dataNum
;
this
.
getList
();
},
//获取备课状态
getLessonStatus
(
num
){
if
(
num
<
10
){
num
=
'0'
+
num
}
var
Str
=
''
;
this
.
dataList
.
forEach
(
x
=>
{
if
(
parseInt
(
x
.
DateDay
)
==
parseInt
(
num
)){
if
(
x
.
IsLessonStatus
==
0
){
Str
=
'未备课'
}
if
(
x
.
IsLessonStatus
==
1
){
Str
=
'部分'
}
if
(
x
.
IsLessonStatus
==
2
){
Str
=
'已备课'
}
if
(
x
.
IsLessonStatus
==-
1
){
Str
=
''
}
}
})
return
Str
;
},
//点击
getItem
(
item
){
this
.
ckedIndex
=
item
;
var
month
=
this
.
tMonth
;
var
day
=
item
;
if
(
month
<
10
){
month
=
'0'
+
month
;
}
if
(
day
<
10
){
day
=
'0'
+
day
;
}
this
.
dataList
.
forEach
(
x
=>
{
if
(
x
.
DateYear
==
this
.
tYear
&&
x
.
DateMonth
==
month
&&
x
.
DateDay
==
day
){
this
.
newDataList
=
x
.
PlanList
;
}
})
},
addRecharge
(){
this
.
$router
.
push
(
'/addteacherCourse'
);
},
Edit
(
row
){
this
.
$router
.
push
({
name
:
'addteacherCourse'
,
query
:
{
ID
:
row
.
ID
,
blank
:
"y"
}
});
},
delete_b
(
row
){
let
that
=
this
;
that
.
Confirm
(
"是否删除?"
,
function
()
{
that
.
apipost
(
"/api/Point/DeleteTeacherCourse"
,
{
Id
:
row
.
ID
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
that
.
Success
(
res
.
data
.
message
);
that
.
getList
();
}
else
{
that
.
Error
(
res
.
data
.
message
);
}
},
);
});
},
handleCurrentChange
(
val
)
{
this
.
msg
.
pageIndex
=
val
;
this
.
getList
();
},
},
}
</
script
>
<
style
>
.teacherCourseList
.el-card__header
{
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
justify-content
:
space-between
;
background
:
#fff
;
}
.teacherCourseList
.el-button--small
{
padding
:
9px
15px
;
}
.teacherCourseList
.content
.searchInput
{
border
:
1px
solid
#DCDFE6
;
border-radius
:
4px
;
/*margin-left: 10px;*/
}
.teacherCourseList
.content
.searchInput
.el-input__inner
{
border
:
none
;
outline
:
none
;
height
:
30px
;
line-height
:
30px
;
}
.teacherCourseList
.content
.searchInput
{
line-height
:
normal
;
display
:
inline-table
;
border-collapse
:
separate
;
border-spacing
:
0
;
width
:
250px
;
}
.teacherCourseList
.content
{
background
:
#fff
;
margin-top
:
10px
;
padding
:
15px
;
box-sizing
:
border-box
;
}
.teacherCourseList
.el-tag
{
margin-right
:
5px
;
}
.teacherCourseList
.app-image
{
background-position
:
center
center
;
width
:
50px
;
height
:
50px
;
border-radius
:
0%
;
float
:
left
;
margin-right
:
8px
;
}
.teacherLesson
.TeacherTop
{
display
:
flex
;
min-width
:
1200px
;
margin-top
:
15px
;
}
.teacherLesson
.Teacher_Left
{
width
:
55px
;
height
:
60px
;
background-color
:
#fff
;
border
:
1px
solid
#4C4F4E
;
margin-right
:
20px
;
}
.teacherLesson
.Teacher_Inner
{
width
:
100%
;
height
:
25px
;
line-height
:
25px
;
background-color
:
#D46964
;
text-align
:
center
;
color
:
#fff
;
font-size
:
12px
;
}
.teacherLesson
.Cal_Bottom
{
width
:
100%
;
height
:
33px
;
line-height
:
33px
;
text-align
:
center
;
color
:
#111111
;
}
.teacherLesson
.Cal_List
{
display
:
flex
;
width
:
95%
;
}
.teacherLesson
.Cal_Qiehuan
{
color
:
#999999
;
font-size
:
12px
;
width
:
45px
;
text-align
:
center
;
height
:
60px
;
background-color
:
#F1F6FB
;
border-radius
:
5px
;
display
:
inline-block
;
cursor
:
pointer
;
display
:
inline-block
;
}
.teacherLesson
.Cal_Icon
{
margin
:
8px
0
;
}
.teacherLesson
.Cal_Inner
{
width
:
45px
;
height
:
60px
;
border-radius
:
5px
;
background-color
:
#F1F6FB
;
color
:
#2D2D2D
;
text-align
:
center
;
margin
:
0
0
10px
10px
;
font-weight
:
bold
;
padding-top
:
10px
;
float
:
left
;
cursor
:
pointer
;
}
.teacherLesson
.Cal_Content
{
min-width
:
880px
;
width
:
90%
;
display
:
inline-block
;
margin-left
:
10px
;
}
.teacherLesson
.beikeStatus
{
padding
:
2px
3px
;
margin-top
:
5px
;
background-color
:
#2961FE
;
color
:
#fff
;
font-size
:
12px
;
border-radius
:
5px
;
-webkit-transform
:
scale
(
0.8
);
}
.teacherLesson
.TeacherYarr
{
color
:
#111111
;
font-size
:
14px
;
font-weight
:
bold
;
margin
:
10px
0
0
10px
;
}
.teacherLesson
.record_List
{
margin-bottom
:
10px
;
}
.teacherLesson
.record_List
:last-child
{
margin-bottom
:
0
;
}
.teacherLesson
.TeacherNameList
{
position
:
relative
;
color
:
#111111
;
}
.teacherLesson
.cicle1
{
position
:
absolute
;
left
:
-15px
;
border-radius
:
50%
;
list-style
:
none
;
width
:
30px
;
height
:
30px
;
background
:
#ffffff
;
text-align
:
center
;
line-height
:
30px
;
color
:
#fff
;
position
:
absolute
;
top
:
0
;
left
:
-41px
;
}
.TeacherInfo_List
:nth-child
(
odd
)
.cicle1
{
color
:
#2961FE
;
background-color
:
#D4DFFF
;
}
.TeacherInfo_List
:nth-child
(
even
)
.cicle1
{
color
:
#3FC4FF
;
background-color
:
#D9F3FF
;
}
.teacherLesson
.cicle1
:first-child
{
top
:
-5px
!important
;
}
.teacherLesson
.TeacherContent
{
line-height
:
30px
;
margin-top
:
10px
;
border-radius
:
2px
;
font-size
:
12px
;
padding
:
10px
20px
;
background-color
:
#F0F5FB
;
}
.teacherLesson
.saveModule
{
padding
:
5px
10px
;
background-color
:
#fff
;
color
:
#000000
;
font-size
:
13px
;
border
:
1px
solid
#A1AAB2
;
border-radius
:
5px
;
cursor
:
pointer
;
}
.teacherLesson
.TeacherInfo_List
{
display
:
flex
;
}
.TeacherInfo_List
:last-child
.timeright
{
border-left
:
0
!important
;
}
.teacherLesson
.timeright
{
padding-left
:
25px
;
margin-left
:
25px
;
width
:
90%
;
border-left
:
1px
solid
#d1d1d1
;
}
.teacherLesson
.beikeBtn
{
padding
:
6px
20px
;
background-color
:
#2961FE
;
color
:
#fff
;
font-size
:
13px
;
border-radius
:
5px
;
margin-left
:
20px
;
cursor
:
pointer
;
}
.teacherLesson
.timeleft
{
margin-left
:
12px
;
}
.checkedPlan
{
background-color
:
#2961FE
!important
;
color
:
#fff
!important
;
}
/*.checkedPlan .beikeStatus{*/
/* background-color: #fff;*/
/* color:#2961FE!important;*/
/*}*/
.Cal_Content
.beike1
{
background
:
var
(
--q-color-negative
);
}
.Cal_Content
.beike2
{
background
:
var
(
--q-color-warning
);
}
.Cal_Content
.beike3
{
background
:
var
(
--q-color-dark
);
}
.teacherLesson
.TeacherName
{
color
:
var
(
--q-color-primary
);
margin-left
:
10px
;
}
</
style
>
src/router/index.js
View file @
d0c21c4b
...
...
@@ -409,6 +409,18 @@ export default new Router({
path
:
'/addclassify'
,
name
:
'addclassify'
,
component
:
resolve
=>
require
([
'@/components/education/addclassify'
],
resolve
),
},
//网课 老师排课
{
path
:
'/teacherCourseList'
,
name
:
'teacherCourseList'
,
component
:
resolve
=>
require
([
'@/components/education/teacherCourseList'
],
resolve
),
},
//网课 新增/修改老师排课
{
path
:
'/addteacherCourse'
,
name
:
'addteacherCourse'
,
component
:
resolve
=>
require
([
'@/components/education/addteacherCourse'
],
resolve
),
}
]
},
...
...
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