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
eb633a6d
Commit
eb633a6d
authored
Jul 08, 2021
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
a2a7ae3d
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
2481 additions
and
7 deletions
+2481
-7
schedu.js
src/api/scheduling/schedu.js
+48
-0
student.js
src/api/teacher/student.js
+14
-0
vacationPlan-form.vue
src/components/schedul/vacationPlan-form.vue
+106
-0
Work.vue
src/pages/Work.vue
+1
-1
makeAd.vue
src/pages/activity/makeAd.vue
+1
-1
useRecord.vue
src/pages/classroom/useRecord.vue
+0
-5
vacationPlan.vue
src/pages/scheduling/vacationPlan.vue
+213
-0
lessonTimeStatistics.vue
src/pages/teacher/lessonTimeStatistics.vue
+321
-0
myPrepareLessons.vue
src/pages/teacher/myPrepareLessons.vue
+551
-0
studentManager.vue
src/pages/teacher/studentManager.vue
+366
-0
studentsClassSee.vue
src/pages/teacher/studentsClassSee.vue
+418
-0
teacherclassSee.vue
src/pages/teacher/teacherclassSee.vue
+412
-0
routes.js
src/router/routes.js
+30
-0
No files found.
src/api/scheduling/schedu.js
View file @
eb633a6d
...
...
@@ -290,4 +290,52 @@ export function GetHandoverShiftList() {
method
:
'post'
,
data
:
""
})
}
/**
* 获取节假日计划分页列表
* @param {JSON参数} data
*/
export
function
getHolidayPlanList
(
data
)
{
return
request
({
url
:
'/Holiday/GetHolidayList'
,
method
:
'post'
,
data
:
data
})
}
/**
* 获取节假日计划详情
* @param {JSON参数} data
*/
export
function
getHolidayInfo
(
data
)
{
return
request
({
url
:
'/Holiday/GetHolidayInfo'
,
method
:
'post'
,
data
:
data
})
}
/**
* 新增节假日计划
* @param {JSON参数} data
*/
export
function
setHolidayPlan
(
data
)
{
return
request
({
url
:
'/Holiday/SetHoliday '
,
method
:
'post'
,
data
:
data
})
}
/**
* 删除节假日计划
* @param {JSON参数} data
*/
export
function
delHolidayPlan
(
data
)
{
return
request
({
url
:
'/Holiday/DelHoliday '
,
method
:
'post'
,
data
:
data
})
}
\ No newline at end of file
src/api/teacher/student.js
0 → 100644
View file @
eb633a6d
import
request
from
'../../utils/request'
/**
* 获取学员管理列表
* @param {JSON参数} data
*/
export
function
GetStuPageList
(
data
)
{
return
request
({
url
:
'/TeacherClass/GetClassStudent'
,
method
:
'post'
,
data
})
}
src/components/schedul/vacationPlan-form.vue
0 → 100644
View file @
eb633a6d
<
template
>
<q-dialog
v-model=
"persistent"
persistent
content-class=
"bg-grey-1"
transition-show=
"scale"
transition-hide=
"scale"
>
<q-card
style=
"width: 480px;max-width:480px;"
>
<q-card-section>
<div
class=
"text-h6"
>
{{
addMsg
.
HolidayId
>
0
?
"修改计划表"
:
"新增计划表"
}}
</div>
</q-card-section>
<q-card-section
class=
"q-pt-none scroll"
style=
"max-height: 70vh"
>
<div
class=
"row wrap"
>
<q-select
filled
class=
"col-12"
option-value=
"value"
option-label=
"label"
ref=
"DayType"
v-model=
"addMsg.DayType"
:options=
"typeOpts"
:rules=
"[val => !!val || '请选择计划类型']"
emit-value
map-options
label=
"计划类型"
/>
</div>
<div
class=
"row wrap"
>
<div
class=
"col-12 Sysuser_Date"
>
<q-field
filled
>
<template
v-slot:control
>
<el-date-picker
v-model=
"date"
value-format=
"yyyy-MM-dd"
type=
"daterange"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
>
</el-date-picker>
</
template
>
</q-field>
</div>
</div>
</q-card-section>
<q-separator
/>
<q-card-actions
align=
"right"
class=
"bg-white"
>
<q-btn
label=
"取消"
flat
color=
"grey-10"
style=
"font-weight:400 !important"
@
click=
"closeVisitForm"
/>
<q-btn
label=
"保存"
color=
"accent q-px-md"
style=
"font-weight:400 !important"
:loading=
"saveCourseLoading"
@
click=
"saveCourse"
/>
</q-card-actions>
</q-card>
</q-dialog>
</template>
<
script
>
import
{
setHolidayPlan
,
}
from
'../../api/scheduling/schedu'
export
default
{
components
:
{},
props
:
{
saveObj
:
{
type
:
Object
,
default
:
null
}
},
data
()
{
return
{
persistent
:
true
,
addMsg
:
{
HolidayId
:
0
,
DayType
:
1
,
//类型
StartTime
:
""
,
//开始时间
EndTime
:
""
,
//结束时间
},
date
:
[],
typeOpts
:
[{
label
:
'节假日'
,
value
:
1
},
{
label
:
'工作日'
,
value
:
2
}
],
saveCourseLoading
:
false
,
};
},
created
()
{
if
(
this
.
saveObj
&&
this
.
saveObj
.
HolidayId
>
0
)
{
this
.
addMsg
=
this
.
saveObj
this
.
date
[
0
]
=
this
.
saveObj
.
StartTime
this
.
date
[
1
]
=
this
.
saveObj
.
EndTime
}
},
methods
:
{
//关闭弹窗
closeVisitForm
()
{
this
.
$emit
(
"close"
);
this
.
persistent
=
false
;
},
//保存菜单
saveCourse
()
{
console
.
log
(
this
.
date
)
this
.
addMsg
.
StartTime
=
this
.
date
[
0
]
this
.
addMsg
.
EndTime
=
this
.
date
[
1
]
if
(
this
.
addMsg
.
StartTime
==
""
||
this
.
addMsg
.
EndTime
==
""
){
this
.
Success
(
'请选择时间'
)
return
}
setHolidayPlan
(
this
.
addMsg
).
then
(
res
=>
{
if
(
res
.
Code
===
1
){
this
.
Success
(
res
.
Message
)
this
.
closeVisitForm
();
this
.
$emit
(
"success"
)
}
})
},
}
};
</
script
>
src/pages/Work.vue
View file @
eb633a6d
...
...
@@ -32,7 +32,7 @@
</q-list>
</q-menu>
</q-btn>
<
q-btn
@
click=
"changeMenu(2)"
v-if=
"AccountType==2 || ispower==true"
flat
:color=
"chosenMenu==2?'primary':'blue-grey-14'"
:class=
"[chosenMenu==2?'text-weight-bold':'']"
label=
"备课管理"
>
<
!--
<q-btn
@
click=
"changeMenu(2)"
v-if=
"AccountType==2 || ispower==true"
flat
:color=
"chosenMenu==2?'primary':'blue-grey-14'"
:class=
"[chosenMenu==2?'text-weight-bold':'']"
label=
"备课管理"
>
--
>
</q-btn>
<q-btn
flat
@
click=
"changeMenu(3)"
:color=
"chosenMenu==3?'primary':'blue-grey-14'"
:class=
"[chosenMenu==3?'text-weight-bold':'']"
label=
"我的排班计划"
></q-btn>
<q-btn
flat
@
click=
"changeMenu(4)"
v-if=
"AccountType==2"
:color=
"chosenMenu==4?'primary':'blue-grey-14'"
:class=
"[chosenMenu==4?'text-weight-bold':'']"
label=
"我的上课计划"
></q-btn>
...
...
src/pages/activity/makeAd.vue
View file @
eb633a6d
...
...
@@ -1301,7 +1301,7 @@
showQRcode
(
path
)
{
this
.
apipostDS
(
"/api/user/GetWeiXinQRCodeForHT"
,
{
Path
:
"/pages/"
+
path
+
'?JumpType=17'
,
With
:
212
},
{
Path
:
"/pages/"
+
path
,
With
:
212
},
(
res
)
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
if
(
res
.
data
.
data
)
{
...
...
src/pages/classroom/useRecord.vue
View file @
eb633a6d
...
...
@@ -113,7 +113,6 @@
}
else
{
const
needle
=
val
.
toLowerCase
();
this
.
classroomopt
=
this
.
classroomopt
.
filter
(
v
=>
v
.
RoomName
.
toLowerCase
().
indexOf
(
needle
)
>
-
1
);
}
})
},
...
...
@@ -126,10 +125,6 @@
if
(
!
this
.
$route
.
query
.
key
)
{
this
.
msg
.
SchoolId
=
res
.
Data
[
0
].
Key
}
this
.
schoolopt
.
unshift
({
SchoolName
:
"不限"
,
Key
:
-
1
})
this
.
schoolChange2
(
this
.
msg
.
SchoolId
)
}
}).
catch
(()
=>
{
...
...
src/pages/scheduling/vacationPlan.vue
0 → 100644
View file @
eb633a6d
<
template
>
<div
class=
"page-body"
>
<div
class=
"page-search row items-center"
>
<div
class=
"col row wrap q-mr-lg q-col-gutter-md"
>
<div
class=
"col-3"
>
<q-select
@
input=
"resetSearch"
standout=
"bg-primary text-white"
v-model=
"msg.DayType"
:options=
"typeOpts"
option-value=
"value"
option-label=
"label"
label=
"节假日类型"
emit-value
map-options
/>
</div>
<div
class=
"col-3 Sysuser_Date"
>
<q-field
filled
>
<template
v-slot:control
>
<el-date-picker
v-model=
"dateList"
@
change=
"resetSearch()"
value-format=
"yyyy-MM-dd"
type=
"daterange"
style=
"border:none;"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
>
</el-date-picker>
</
template
>
</q-field>
</div>
</div>
</div>
<div
class=
"page-content"
>
<q-table
:pagination=
"msg"
:loading=
"loading"
no-data-label=
"暂无相关数据"
flat
class=
"sticky-column-table"
separator=
"none"
:data=
"data"
:columns=
"columns"
row-key=
"name"
>
<
template
v-slot:top=
"props"
>
<div
class=
"col-2 q-table__title"
>
节假日计划表
</div>
<q-space
/>
<div
class=
"page-option"
>
<q-btn
color=
"accent"
size=
"sm"
icon=
"add"
label=
"新增计划"
@
click=
"EditSchool(null)"
/>
</div>
</
template
>
<!-- <template v-slot:body-cell-time="props">
<q-td :props="props">
{{props.row.StartTime}}/{{props.row.EndTime}}
</q-td>
</template> -->
<
template
v-slot:body-cell-type=
"props"
>
<q-td
:props=
"props"
>
<span
v-if=
"props.row.DayType===1"
>
节假日
</span>
<span
v-if=
"props.row.DayType===2"
>
工作日
</span>
</q-td>
</
template
>
<
template
v-slot:body-cell-optioned=
"props"
>
<q-td
:props=
"props"
>
<q-btn
flat
size=
"xs"
icon=
"edit"
color=
"accent"
style=
"font-family:perfectFont"
label=
"编辑"
@
click=
"EditSchool(props.row)"
/>
<q-btn
flat
size=
"xs"
icon=
"delete"
color=
"accent"
style=
"font-family:perfectFont"
label=
"删除"
@
click=
"EditSchool(props.row)"
/>
</q-td>
</
template
>
<
template
v-slot:bottom
>
<q-pagination
class=
"full-width justify-end"
v-model=
"msg.pageIndex"
color=
"primary"
:max=
"pageCount"
:input=
"true"
@
input=
"changePage"
/>
</
template
>
</q-table>
<VacationPlanForm
v-if=
"isShowSchoolForm"
:save-obj=
"objOption"
@
close=
"closeSchoolForm"
@
success=
"resetSearch"
>
</VacationPlanForm>
</div>
</div>
</template>
<
script
>
import
{
getHolidayPlanList
,
}
from
'../../api/scheduling/schedu'
import
VacationPlanForm
from
'../../components/schedul/vacationPlan-form'
export
default
{
meta
:
{
title
:
"节假日计划表"
},
components
:
{
VacationPlanForm
},
data
()
{
return
{
columns
:
[{
name
:
'HolidayId'
,
label
:
'编号'
,
field
:
'HolidayId'
,
align
:
'left'
,
},
{
name
:
'StartTime'
,
label
:
'开始时间'
,
align
:
'left'
,
field
:
'StartTime'
},
{
name
:
'EndTime'
,
label
:
'结束时间'
,
align
:
'left'
,
field
:
'EndTime'
},
{
name
:
'type'
,
label
:
'计划类型'
,
align
:
'left'
,
field
:
''
},
{
name
:
'optioned'
,
label
:
'操作'
,
field
:
'SId'
},
],
data
:
[],
loading
:
true
,
typeOpts
:
[{
label
:
'不限'
,
value
:
0
},
{
label
:
'节假日'
,
value
:
1
},
{
label
:
'工作日'
,
value
:
2
}
],
dateList
:
[],
msg
:
{
pageIndex
:
1
,
pageSize
:
12
,
rowsPerPage
:
12
,
DayType
:
0
,
//类型
StartTime
:
""
,
//开始时间
EndTime
:
""
,
//结束时间
},
pageCount
:
0
,
objOption
:
{
DayType
:
0
,
//类型
StartTime
:
""
,
//开始时间
EndTime
:
""
,
//结束时间
},
isShowSchoolForm
:
false
,
//是否显示校区弹窗
}
},
created
()
{
},
mounted
()
{
this
.
getList
()
},
methods
:
{
getList
()
{
this
.
msg
.
StartTime
=
this
.
dateList
[
0
]
this
.
msg
.
EndTime
=
this
.
dateList
[
1
]
this
.
loading
=
true
getHolidayPlanList
(
this
.
msg
).
then
(
res
=>
{
this
.
loading
=
false
console
.
log
(
185
,
res
)
if
(
res
.
Code
===
1
)
{
this
.
data
=
res
.
Data
.
PageData
this
.
pageCount
=
res
.
Data
.
PageCount
}
}).
catch
(
err
=>
{
this
.
loading
=
false
})
},
//重新查询
resetSearch
()
{
this
.
msg
.
pageIndex
=
1
;
this
.
getList
();
},
//分页改变
changePage
(
val
)
{
this
.
msg
.
pageIndex
=
val
;
this
.
getList
()
},
//关闭校区弹窗
closeSchoolForm
()
{
this
.
isShowSchoolForm
=
false
;
},
//新增、修改校区
EditSchool
(
obj
)
{
console
.
log
(
obj
)
if
(
obj
)
{
this
.
objOption
=
obj
;
}
else
{
this
.
objOption
=
null
;
}
this
.
isShowSchoolForm
=
true
;
},
}
}
</
script
>
<
style
lang=
"sass"
>
@import
url('~assets/css/table.sass')
</
style
>
<
style
>
.Sysuser_Date
.el-range-editor
.el-range-input
{
background-color
:
transparent
;
width
:
100%
;
border
:
none
;
}
.Sysuser_Date
.el-range-editor.el-input__inner
{
background-color
:
transparent
;
width
:
100%
;
border
:
none
;
}
.el-date-range-picker
{
z-index
:
9999
!important
;
}
</
style
>
src/pages/teacher/lessonTimeStatistics.vue
0 → 100644
View file @
eb633a6d
<
style
>
.baseSet_Title
{
width
:
120px
!important
;
padding
:
18px
0
0
16px
;
text-align
:
right
;
}
.lessonCostStatistics
.border-bottom
{
/* border-bottom: 1px dashed #EEE; */
padding-bottom
:
5px
;
margin-bottom
:
5px
;
}
.lessonCostStatistics
.text-bottom
{
height
:
32px
;
line-height
:
32px
;
margin-bottom
:
10px
;
}
.lessonCostStatistics
._icon_btn
.icon-xueyuan
{
background-color
:
#47BF8C
;
}
.lessonCostStatistics
._icon_btn
.icon-jiaoshi
{
background-color
:
#47BF8C
;
}
.lessonCostStatistics
._icon_btn
i
{
width
:
26px
;
height
:
26px
;
display
:
inline-block
;
color
:
white
!important
;
border-radius
:
50%
;
text-align
:
center
;
line-height
:
26px
;
margin-right
:
10px
;
cursor
:
pointer
;
outline
:
none
;
}
.lessonCostStatistics
.el-table
td
,
.el-table
th
{
padding
:
5px
0
;
}
.lessonCostStatistics
.el-input
{
width
:
100%
;
border
:
none
;
background-color
:
transparent
;
}
.lessonCostStatistics
.items-center
.el-input__inner
{
width
:
100%
;
border
:
none
;
background-color
:
transparent
;
}
</
style
>
<
template
>
<div
class=
"page-body lessonCostStatistics"
>
<div
class=
"page-search row items-center"
>
<div
class=
"col row wrap q-mr-lg q-col-gutter-md"
>
<div
class=
"col-3"
>
<q-select
filled
stack-label
@
input=
"handleCurrentChanges(1)"
option-value=
"SId"
option-label=
"SName"
v-model=
"msg.SchoolId"
ref=
"SId"
:options=
"CompanyList"
label=
"校区"
:dense=
"false"
emit-value
map-options
/>
</div>
<!--
<div
class=
"col-3"
>
<q-select
filled
stack-label
@
input=
"handleCurrentChanges(1)"
option-value=
"TId"
option-label=
"TeacherName"
v-model=
"msg.TeacherId"
ref=
"TId"
:options=
"TeacherList"
label=
"老师"
:dense=
"false"
emit-value
map-options
/>
</div>
-->
<div
class=
"col-3"
>
<q-select
filled
stack-label
@
input=
"handleCurrentChanges(1)"
option-value=
"Id"
option-label=
"Name"
v-model=
"datetype"
ref=
"Id"
:options=
"datetypelist"
label=
"日期类型"
:dense=
"false"
emit-value
map-options
/>
</div>
<div
class=
"col-3"
v-if=
'datetype==1'
>
<q-field
filled
>
<template
v-slot:control
>
<el-date-picker
v-model=
"valueyear"
type=
"year"
placeholder=
"选择年份"
value-format=
"yyyy"
:clearable=
'false'
@
change=
"handleCurrentChanges(1)"
>
</el-date-picker>
</
template
>
</q-field>
</div>
<div
class=
"col-3"
v-if=
'datetype==2'
>
<q-field
filled
>
<
template
v-slot:control
>
<!--
<el-date-picker
v-model=
"valuemonth"
type=
"month"
placeholder=
"选择月份"
value-format=
"yyyy-MM"
@
change=
"handleCurrentChanges(1)"
>
</el-date-picker>
-->
<el-date-picker
v-model=
"msg.StartMonth"
type=
"month"
placeholder=
"开始月份"
size=
"small"
style=
"width:47%;"
value-format=
"yyyy-MM"
:clearable=
'false'
@
change=
"choicemonth(1)"
clear-icon=
"iconfont icon-guanbi"
>
</el-date-picker>
至
<el-date-picker
v-model=
"msg.EndMonth"
type=
"month"
placeholder=
"结束月份"
size=
"small"
style=
"width:47%;"
value-format=
"yyyy-MM"
:clearable=
'false'
@
change=
"choicemonth(2)"
clear-icon=
"iconfont icon-guanbi"
>
</el-date-picker>
</
template
>
</q-field>
</div>
</div>
</div>
<div
class=
"page-search row items-center"
style=
"justify-content: space-between;"
>
<span
style=
"font-size: 20px;font-weight: 400;"
>
课时统计
<span
style=
"font-size: 16px;"
></span>
</span>
<!-- <q-btn color="primary" size="11px" label="导出" @click="txexport" style="margin-left:10px" /> -->
</div>
<
template
>
<el-table
ref=
"filterTable"
:data=
"tableData"
v-loading=
'loading'
:header-cell-style=
"
{backgroundColor:'#f5f6f7', color: '#a8a8b3'}" border style="width: 100%">
<el-table-column
prop=
"SchoolName"
label=
"校区"
></el-table-column>
<el-table-column
prop=
"LeaveStatus"
label=
"职务"
>
</el-table-column>
<el-table-column
prop=
"EmployeeName"
label=
"老师名称"
></el-table-column>
<el-table-column
prop=
"KSNum"
label=
"上课课时"
>
</el-table-column>
<el-table-column
prop=
"DKNum"
label=
"基础课时"
></el-table-column>
<el-table-column
prop=
"Hours"
label=
"课时转换/小时"
></el-table-column>
<el-table-column
prop=
"KSMoney"
label=
"课时费"
>
</el-table-column>
<el-table-column
prop=
"StuLearnMoney"
label=
"学生上课金额"
>
</el-table-column>
<el-table-column
label=
"操作"
>
<template
slot-scope=
"scope"
>
<div
class=
"_icon_btn"
>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"查看老师"
placement=
"top"
>
<i
class=
"iconfont icon-jiaoshi"
@
click=
"goUrl('teacherclassSee',scope.row.AccountId)"
></i>
</el-tooltip>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"查看学生"
placement=
"top"
>
<i
class=
"iconfont icon-xueyuan"
@
click=
"goUrl('studentsClassSee',scope.row.AccountId)"
></i>
</el-tooltip>
</div>
</
template
>
</el-table-column>
</el-table>
<div
style=
"margin-top: 10px;text-align: center;"
>
<el-pagination
background
@
current-change=
"handleCurrentChanges"
layout=
"total,prev, pager, next, jumper"
:current-page
.
sync=
"msg.pageIndex"
:page-size=
"msg.pageSize"
:total=
'total'
>
</el-pagination>
</div>
</template>
</div>
</template>
<
script
>
import
{
getSchoolDropdown
,
getTeacherDropDownList
}
from
'../../api/school/index'
import
{
getTeacherConsumptionHoursStatistics
,
}
from
'../../api/finance/index'
import
{
EduDownLoad
,
}
from
'../../api/common/common'
;
export
default
{
meta
:
{
title
:
"课时统计"
},
props
:
{},
components
:
{},
data
()
{
return
{
loading
:
false
,
valuemonth
:
''
,
valueyear
:
''
,
//列表数据参数
msg
:
{
pageIndex
:
1
,
pageSize
:
15
,
TeacherId
:
'-1'
,
SchoolId
:
'-1'
,
StartMonth
:
''
,
EndMonth
:
''
,
},
datetype
:
'2'
,
pageCount
:
0
,
listData
:
{},
tableData
:
[],
total
:
0
,
CompanyList
:
[],
TeacherList
:
[],
datetypelist
:
[
{
Id
:
'2'
,
Name
:
'月份'
},
{
Id
:
'1'
,
Name
:
'年份'
},
]
}
},
created
()
{
let
userinfo
=
this
.
getLocalStorage
();
var
myDate
=
new
Date
();
this
.
msg
.
StartMonth
=
myDate
.
getFullYear
()
+
"-"
+
(
myDate
.
getMonth
()
+
1
)
this
.
msg
.
EndMonth
=
myDate
.
getFullYear
()
+
"-"
+
(
myDate
.
getMonth
()
+
1
)
this
.
valueyear
=
myDate
.
getFullYear
().
toString
()
let
data
=
JSON
.
parse
(
localStorage
.
getItem
(
"loginUserInfo"
))
if
(
data
){
this
.
msg
.
TeacherId
=
data
.
data
.
AccountId
}
},
mounted
()
{
this
.
getList
();
//获取提成周期列表
this
.
getBranchList
()
this
.
GetTeacherList
();
//老师下拉
},
methods
:
{
getList
()
{
if
(
this
.
datetype
==
1
)
{
this
.
msg
.
StartMonth
=
this
.
valueyear
+
'-01'
;
this
.
msg
.
EndMonth
=
this
.
valueyear
+
'-12'
;
}
this
.
loading
=
true
;
getTeacherConsumptionHoursStatistics
(
this
.
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
loading
=
false
;
this
.
tableData
=
res
.
Data
.
PageData
this
.
total
=
res
.
Data
.
Count
}
})
},
//获取教师下拉
GetTeacherList
()
{
getTeacherDropDownList
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
TeacherList
=
res
.
Data
;
var
obj
=
{
TeacherName
:
'全部'
,
TId
:
'-1'
}
this
.
TeacherList
.
unshift
(
obj
);
}
})
},
getBranchList
()
{
//获取校区
getSchoolDropdown
({}).
then
(
res
=>
{
this
.
CompanyList
=
res
.
Data
;
var
obj
=
{
SName
:
'全部'
,
SId
:
'-1'
}
this
.
CompanyList
.
unshift
(
obj
);
}).
catch
(()
=>
{
})
},
goUrl
(
path
,
id
)
{
this
.
OpenNewUrl
(
'/teacher/'
+
path
,
{
id
:
id
,
datetype
:
this
.
datetype
,
valueyear
:
this
.
valueyear
,
StartMonth
:
this
.
msg
.
StartMonth
,
EndMonth
:
this
.
msg
.
EndMonth
,
});
},
handleCurrentChanges
(
val
)
{
this
.
msg
.
pageIndex
=
val
;
this
.
getList
()
},
txexport
()
{
let
text
=
''
;
if
(
this
.
datetype
==
2
)
{
if
(
new
Date
(
this
.
msg
.
StartMonth
).
getTime
()
==
new
Date
(
this
.
msg
.
EndMonth
).
getTime
()){
text
=
this
.
msg
.
StartMonth
+
'课耗统计.xls'
}
else
{
text
=
this
.
msg
.
StartMonth
+
'-'
+
this
.
msg
.
EndMonth
+
'课耗统计.xls'
}
}
else
if
(
this
.
datetype
==
1
)
{
text
=
this
.
valueyear
+
'年课耗统计.xls'
}
var
msg
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
msg
));
EduDownLoad
(
"/finance/GetTeacherConsumptionHoursStatisticsToExcel"
,
msg
,
text
)
},
choicemonth
(
val
){
let
StartMonth
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
msg
.
StartMonth
))
let
EndMonth
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
msg
.
EndMonth
))
if
(
val
==
1
){
//判断选择的时候开始时间大于结束时间的处理
if
(
new
Date
(
StartMonth
).
getTime
()
>
new
Date
(
EndMonth
).
getTime
()){
this
.
msg
.
EndMonth
=
this
.
msg
.
StartMonth
}
}
else
{
if
(
new
Date
(
this
.
msg
.
StartMonth
).
getTime
()
>
new
Date
(
this
.
msg
.
EndMonth
).
getTime
()){
this
.
msg
.
StartMonth
=
this
.
msg
.
EndMonth
}
}
let
diff
=
this
.
dateMinus
(
this
.
msg
.
StartMonth
,
this
.
msg
.
EndMonth
)
if
(
diff
>
11
){
this
.
$q
.
notify
({
type
:
'negative'
,
position
:
"top"
,
message
:
`月份不能超过12个月`
})
if
(
val
==
1
){
//如果超哥12过月的处理
this
.
msg
.
StartMonth
=
this
.
msg
.
EndMonth
}
else
{
this
.
msg
.
EndMonth
=
this
.
msg
.
StartMonth
}
return
}
setTimeout
(()
=>
{
this
.
handleCurrentChanges
(
1
)
},
10
)
},
//两个日期相差几个月
dateMinus
(
d1
,
d2
)
{
var
m1
=
parseInt
(
d1
.
split
(
"-"
)[
1
].
replace
(
/^0+/
,
""
))
+
parseInt
(
d1
.
split
(
"-"
)[
0
])
*
12
;
var
m2
=
parseInt
(
d2
.
split
(
"-"
)[
1
].
replace
(
/^0+/
,
""
))
+
parseInt
(
d2
.
split
(
"-"
)[
0
])
*
12
;
var
diff
=
m2
-
m1
;
return
diff
;
}
},
}
</
script
>
<
style
lang=
"sass"
>
@import
url('~assets/css/table.sass')
</
style
>
\ No newline at end of file
src/pages/teacher/myPrepareLessons.vue
0 → 100644
View file @
eb633a6d
<
style
>
.teacherLesson
.TeacherTop
{
display
:
flex
;
min-width
:
1200px
;
}
.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
:
80%
;
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
;
font-size
:
13px
;
}
.teacherLesson
.TeacherNameList
:last-child
{
height
:
auto
;
}
.teacherLesson
.cicle1
{
position
:
absolute
;
left
:
-15px
;
border-radius
:
50%
;
list-style
:
none
;
width
:
24px
;
height
:
24px
;
background
:
#ffffff
;
text-align
:
center
;
line-height
:
24px
;
color
:
#fff
;
position
:
absolute
;
top
:
-3px
;
left
:
-38px
;
}
.TeacherInfo_List
:nth-child
(
odd
)
.cicle1
{
color
:
#3FC4FF
;
background-color
:
#D9F3FF
;
}
.TeacherInfo_List
:nth-child
(
even
)
.cicle1
{
color
:
#2961FE
;
background-color
:
#D4DFFF
;
}
.teacherLesson
.cicle1
:first-child
{
top
:
-5px
!important
;
}
.teacherLesson
.TeacherContent
{
height
:
40px
;
line-height
:
40px
;
margin-top
:
10px
;
border-radius
:
2px
;
font-size
:
12px
;
padding-left
:
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
;
height
:
60px
;
}
.teacher-box
.TeacherInfo_List
:last-child
{
height
:
auto
;
}
.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
;
/* height:53px; */
}
.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
);
}
.teacherLesson
.teacher-box
{
/* background-color: #f5f5f5; */
padding
:
20px
20px
10px
20px
;
border-radius
:
20px
;
}
.Teacher_Class
{
width
:
95%
;
height
:
45px
;
background-color
:
#F0F5FB
;
padding
:
0
20px
;
color
:
#111111
;
margin-bottom
:
30px
;
font-weight
:
bold
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
}
.Teach_BigSpan
{
font-size
:
18px
;
margin-right
:
20px
;
}
.Teach_MidSpan
{
font-size
:
14px
;
}
.Plan-StartTime
{
width
:
45px
;
font-size
:
14px
;
color
:
#111111
;
font-weight
:
bold
;
}
.Plan_WeiBei
{
color
:
#F44E60
;
font-size
:
12px
;
}
.Teach_Circle
{
color
:
#2961FE
;
background-color
:
#D4DFFF
;
display
:
inline-block
;
width
:
24px
;
height
:
24px
;
margin
:
0
10px
0
30px
;
border-radius
:
50%
;
text-align
:
center
;
line-height
:
24px
;
font-size
:
12px
;
position
:
relative
;
top
:
-2px
;
}
.fankuiBtn
{
padding
:
6px
20px
;
background-color
:
#fff
;
color
:
#2961FE
;
font-size
:
13px
;
border-radius
:
5px
;
margin-left
:
20px
;
cursor
:
pointer
;
border
:
1px
solid
#2961FE
;
}
</
style
>
<
template
>
<div
class=
"page-body teacherLesson"
>
<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>
<div
v-for=
"item1 in newDataListRes"
:key=
"item1.id"
class=
"teacher-box"
>
<div
class=
"Teacher_Class"
>
<div>
<span
class=
"Teach_BigSpan"
>
{{
item1
.
ClassName
}}
</span>
<span
class=
"Teach_MidSpan"
>
第
{{
item1
.
Ranks
}}
次上课
</span>
<span
class=
"Teach_Circle"
>
{{
item1
.
TeacherName
.
substr
(
0
,
1
)
}}
</span>
<span
class=
"Teach_MidSpan"
style=
"position:relative;top:-1px;"
>
{{
item1
.
TeacherName
}}
</span>
</div>
<div>
<span
v-if=
"item1.LessonPlanNum===0"
class=
"Plan_WeiBei"
>
未备课
</span>
<span
v-if=
"item1.LessonPlanNum>0"
@
click=
"goyibeike(item1)"
style=
"color:#2961FE;font-size:12px;margin-right:20px;cursor:pointer;"
>
已备课
</span>
<!--
<span
class=
"beikeBtn"
v-if=
"item1.LessonPlanNum>0"
style=
"backgroundColor:#3FC4FF;margin-right:20px;"
@
click=
"goyibeike(item1)"
>
已备课
</span>
-->
<span
class=
"beikeBtn"
v-if=
"AccountType&&item1.LessonPlanNum===0"
@
click=
"goBeike(item1)"
>
备课
</span>
<span
style=
"color:#3FC4FF;font-size:12px;cursor:pointer"
v-if=
"item1.LessonPlanSummaryNum>0&&item1.LessonPlanNum>0"
@
click=
"goyibeike(item1)"
>
已反馈
</span>
<span
style=
"color:#FFA800;font-size:12px;"
v-if=
"item1.LessonPlanSummaryNum==0&&item1.LessonPlanNum>0"
>
未反馈
</span>
<span
class=
"fankuiBtn"
v-if=
"AccountType&&item1.LessonPlanSummaryNum==0&&item1.LessonPlanNum>0"
@
click=
"goyibeike(item1)"
>
反馈
</span>
</div>
</div>
<div
class=
"TeacherInfo_List"
v-for=
"(item,index) in item1.planListTeacher"
>
<div
class=
"timeleft"
>
<div
class=
"Plan-StartTime"
>
{{
item
.
StartTime
}}
</div>
</div>
<div
class=
"timeright"
>
<div
class=
"record_List"
>
<div
class=
"TeacherNameList"
>
<div>
<span
class=
"TeacherName"
>
学员名单:
</span>
<span
style=
"color:#333333;"
>
{{
item
.
AllGuestStr
}}
</span>
</div>
<div>
<span
class=
"TeacherName"
>
出勤名单:
</span>
<span
style=
"color:#333333;"
>
{{
item
.
GuestStr
}}
</span>
</div>
<li
class=
"cicle1"
>
{{
item
.
TeacherName
.
substr
(
0
,
1
)
}}
</li>
</div>
<!--
<div
class=
"TeacherContent"
>
{{
item
.
GuestStr
}}
</div>
-->
<!--
<div
style=
"margin:20px 0 30px 0;"
>
<span
class=
"beikeBtn"
v-if=
"item.LessonPlanNum>0"
style=
"backgroundColor:#3FC4FF;"
@
click=
"goyibeike(item)"
>
已备课
</span>
<span
class=
"beikeBtn"
v-if=
"AccountType&&item.LessonPlanNum==0"
@
click=
"goBeike(item)"
>
备课
</span>
<span
class=
"beikeBtn"
v-if=
"AccountType&&item.LessonPlanNum>0"
@
click=
"goBeike(item)"
>
修改
</span>
<span
class=
"beikeBtn"
style=
"backgroundColor:#C0C4CC;"
v-if=
"!AccountType&&item.LessonPlanNum===0"
>
未备课
</span>
</div>
-->
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</
template
>
<
script
>
import
{
GetTeacherPlan
}
from
'../../api/course/class'
;
export
default
{
meta
:
{
title
:
"我的备课"
},
props
:
{},
data
()
{
return
{
dataNum
:
0
,
//天数
tYear
:
0
,
//年
tMonth
:
0
,
//月
tDay
:
0
,
//日
ckedIndex
:
0
,
// 选中
msg
:
{
School_Id
:
0
,
//学校
// Teacher_Id: 5, //老师id
StartTime
:
''
,
EndTime
:
''
},
dataList
:
[],
newDataList
:
[],
newDataListRes
:
[],
AccountType
:
true
,
}
},
created
()
{},
mounted
()
{
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
.
StartTime
=
this
.
tYear
+
'-'
+
this
.
tMonth
+
'-'
+
'01'
;
this
.
msg
.
EndTime
=
this
.
tYear
+
'-'
+
this
.
tMonth
+
'-'
+
this
.
dataNum
;
let
userInfo
=
this
.
getLocalStorage
();
this
.
AccountType
=
userInfo
.
AccountType
==
2
?
true
:
false
;
//是否是教师
this
.
getList
();
},
methods
:
{
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
.
StartTime
=
this
.
tYear
+
'-'
+
this
.
tMonth
+
'-'
+
'01'
;
this
.
msg
.
EndTime
=
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
.
StartTime
=
this
.
tYear
+
'-'
+
this
.
tMonth
+
'-'
+
'01'
;
this
.
msg
.
EndTime
=
this
.
tYear
+
'-'
+
this
.
tMonth
+
'-'
+
this
.
dataNum
;
this
.
getList
();
},
//获取数据
getList
()
{
GetTeacherPlan
(
this
.
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
dataList
=
res
.
Data
;
var
month
=
this
.
tMonth
;
var
day
=
this
.
ckedIndex
;
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
;
this
.
newDataListRes
=
x
.
planListResult
;
}
})
}
})
},
//点击
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
;
this
.
newDataListRes
=
x
.
planListResult
;
}
})
},
//获取备课状态
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
;
},
//跳转至备课
goBeike
(
item
)
{
// var tempStr = '/course/lessonPreparation?ClassId=' + item.ClassId + '&School_Id=' + item.School_Id +
// '&ClassPlanId=' + item.ClassPlanId + '&Ranks=' + item.Ranks;
// this.$router.push({
// path: tempStr
// });
this
.
OpenNewUrl
(
"/course/lessonPreparation"
,
{
ClassId
:
item
.
ClassId
,
School_Id
:
item
.
School_Id
,
ClassPlanId
:
item
.
ClassPlanId
,
Ranks
:
item
.
Ranks
});
},
goyibeike
(
item
)
{
this
.
OpenNewUrl
(
"/course/prepareclassDetails"
,
{
ClassId
:
item
.
ClassId
,
ClassPlanId
:
item
.
ClassPlanId
,
LessonPlanNum
:
item
.
LessonPlanNum
,
LessonPlanSummaryNum
:
item
.
LessonPlanSummaryNum
,
TeacherId
:
item
.
TeacherId
});
// var tempStr = '/course/prepareclassDetails?ClassId=' + item.ClassId + '&ClassPlanId=' + item.ClassPlanId +
// '&LessonPlanNum=' + item.LessonPlanNum + '&LessonPlanSummaryNum='+ item.LessonPlanSummaryNum + '&TeacherId=' + item.TeacherId;
// this.$router.push({
// path: tempStr
// });
}
}
}
</
script
>
<
style
lang=
"sass"
>
@import
url('~assets/css/table.sass')
</
style
>
src/pages/teacher/studentManager.vue
0 → 100644
View file @
eb633a6d
<
style
>
.OtherCourseNum
{
display
:
inline-block
;
width
:
25px
;
height
:
25px
;
text-align
:
center
;
line-height
:
25px
;
border
:
1px
solid
#2961FE
;
border-radius
:
50%
;
cursor
:
pointer
;
color
:
#2961FE
;
}
.OCourseTable
{
width
:
400px
;
text-align
:
center
;
}
.OCourseTable
tr
td
{
height
:
40px
;
}
.OCourseTable
tr
th
{
height
:
40px
;
background-color
:
rgb
(
238
,
238
,
239
);
}
</
style
>
<
template
>
<div
class=
"page-body"
>
<div
class=
"page-search row items-center"
>
<div
class=
"col row wrap q-mr-lg q-col-gutter-md"
>
<div
class=
"col-3"
>
<q-input
@
change=
"refreshPage"
clearable
standout=
"bg-primary text-white"
v-model=
"msg.GuestName"
label=
"学员名称"
@
clear=
"refreshPage"
maxlength=
"20"
/>
</div>
<div
class=
"col-3"
>
<q-select
@
input=
"refreshPage"
standout=
"bg-primary text-white"
option-value=
"ClassId"
option-label=
"ClassName"
v-model=
"msg.ClassId"
:options=
"ClassList"
emit-value
map-options
label=
"班级"
use-input
clearable
@
filter=
"filterClass"
/>
</div>
<div
class=
"col-3"
>
<q-select
@
input=
"refreshPage"
standout=
"bg-primary text-white"
option-value=
"CourseId"
option-label=
"CourseName"
v-model=
"msg.CourseId"
:options=
"CourseList"
emit-value
map-options
label=
"课程"
use-input
clearable
@
filter=
"filterCourse"
>
<template
v-slot:no-option
>
<q-item>
<q-item-section
class=
"text-grey"
>
未找到相关数据
</q-item-section>
</q-item>
</
template
>
</q-select>
</div>
<div
class=
"col-3"
>
<q-select
@
input=
"refreshPage"
standout=
"bg-primary text-white"
option-value=
"Id"
option-label=
"EmployeeName"
v-model=
"msg.EnterID"
:options=
"EmployeeList"
emit-value
map-options
label=
"关联销售"
use-input
clearable
@
filter=
"filterFn"
>
<
template
v-slot:no-option
>
<q-item>
<q-item-section
class=
"text-grey"
>
未找到相关数据
</q-item-section>
</q-item>
</
template
>
</q-select>
</div>
</div>
</div>
<div
class=
"page-content"
>
<q-table
:pagination=
"msg"
:loading=
"loading"
no-data-label=
"暂无相关数据"
flat
class=
"sticky-column-table sticky-right-column-table"
separator=
"none"
:data=
"data"
:columns=
"columns"
row-key=
"name"
>
<
template
v-slot:top=
"props"
>
<div
class=
"col-2 q-table__title"
>
学员管理
</div>
<q-space
/>
</
template
>
<!--课时-->
<
template
v-slot:body-cell-TotalPlanNum=
"props"
>
<q-td
:props=
"props"
>
{{
props
.
row
.
Ranks
}}
/
{{
props
.
row
.
TotalPlanNum
}}
</q-td>
</
template
>
<
template
v-slot:body-cell-IsRenewOrder=
"props"
>
<q-td
:props=
"props"
>
<span
v-if=
"props.row.IsRenewOrder===1"
>
是
</span>
<span
v-if=
"props.row.IsRenewOrder===0"
>
否
</span>
</q-td>
</
template
>
<
template
v-slot:bottom
>
<q-pagination
class=
"full-width justify-end"
v-model=
"msg.pageIndex"
color=
"primary"
:max=
"pageCount"
:input=
"true"
@
input=
"changePage"
/>
</
template
>
<
template
v-slot:body-cell-optioned=
"props"
>
<q-td
:props=
"props"
>
<!--
<q-btn
flat
size=
"xs"
color=
"accent"
style=
"font-weight:400"
label=
"停课"
@
click=
""
/>
-->
<q-btn-dropdown
flat
size=
"xs"
color=
"dark"
label=
"更多"
style=
"margin-left:10px;"
>
<q-list>
<q-item
clickable
v-close-popup
@
click=
"goUrl(props.row)"
>
<q-item-section>
<q-item-label>
课耗明细
</q-item-label>
</q-item-section>
</q-item>
</q-list>
</q-btn-dropdown>
</q-td>
</
template
>
</q-table>
</div>
</div>
</template>
<
script
>
//获取校区列表
import
{
getClassDropDownList
,
getSchoolDropdown
,
deleteClass
}
from
'../../api/school/index'
;
import
{
queryEmployee
}
from
'../../api/users/user'
//获取销售下拉列表
import
{
queryCourseDropdownList
,
}
from
'../../api/course/index'
//课程下拉
import
{
GetStuPageList
}
from
"../../api/teacher/student"
// import classForm from '../../components/course/class-form';
// import classinfoForm from '../../components/course/classinfo-form';
// import othercourseForm from '../../components/course/othercourse-form';
export
default
{
meta
:
{
title
:
"班级管理"
},
components
:
{
// classForm,
// classinfoForm,
// othercourseForm
},
data
()
{
return
{
columns
:
[
{
name
:
'GuestName'
,
label
:
'学员名称'
,
field
:
'GuestName'
,
align
:
'left'
,
},
{
name
:
'ClassName'
,
label
:
'班级名称'
,
field
:
'ClassName'
,
align
:
'left'
},
{
name
:
'CourseName'
,
label
:
'课程'
,
field
:
'CourseName'
,
align
:
'left'
},
{
name
:
'TotalPlanNum'
,
label
:
'课程进度'
,
field
:
'TotalPlanNum'
,
align
:
'left'
},
{
name
:
'Mobile'
,
label
:
'电话'
,
field
:
'Mobile'
,
align
:
'left'
},
{
name
:
'IsRenewOrder'
,
label
:
'是否是续课订单'
,
field
:
'IsRenewOrder'
,
align
:
'left'
},
{
name
:
'GuestStateStr'
,
label
:
'学员状态'
,
field
:
'GuestStateStr'
,
align
:
'left'
},
{
name
:
'EnterName'
,
label
:
'销售'
,
field
:
'EnterName'
,
align
:
'left'
},
{
name
:
'optioned'
,
label
:
'操作'
,
field
:
'CourseId'
}
],
data
:
[],
loading
:
false
,
msg
:
{
pageIndex
:
1
,
pageSize
:
12
,
rowsPerPage
:
12
,
Teacher_Id
:
-
1
,
//老师id
GuestName
:
""
,
//学员名称
ClassId
:
0
,
//班级
CourseId
:
0
,
//课程
EnterID
:
0
,
//销售
},
pageCount
:
0
,
EmployeeList
:
[],
//销售下拉列表
AllemployeeList
:
[],
CourseList
:
[],
//关联课程下拉数据
AllCourseList
:
[],
ClassList
:
[],
//班级下拉
allClassList
:
[]
}
},
created
()
{
let
data
=
JSON
.
parse
(
localStorage
.
getItem
(
"loginUserInfo"
))
if
(
data
)
{
this
.
msg
.
Teacher_Id
=
data
.
data
.
AccountId
}
this
.
getEmployee
(
0
);
this
.
getCourseList
();
this
.
getClass
()
},
mounted
()
{
this
.
getStuPageList
();
},
methods
:
{
//获取销售
getEmployee
(
id
)
{
var
qMsg
=
{
Dept_Id
:
0
}
qMsg
.
Dept_Id
=
id
;
queryEmployee
(
qMsg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
EmployeeList
=
res
.
Data
;
let
obj
=
{
Id
:
0
,
EmployeeName
:
"不限"
}
this
.
EmployeeList
.
unshift
(
obj
)
this
.
AllemployeeList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
EmployeeList
));
}
}).
catch
(()
=>
{
})
},
//筛选销售
filterFn
(
val
,
update
)
{
update
(()
=>
{
if
(
val
===
''
)
{
this
.
EmployeeList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
AllemployeeList
))
}
else
{
const
needle
=
val
.
toLowerCase
();
this
.
EmployeeList
=
this
.
AllemployeeList
.
filter
(
v
=>
v
.
EmployeeName
.
toLowerCase
().
indexOf
(
needle
)
>
-
1
);
}
})
},
//获取课程
getCourseList
()
{
queryCourseDropdownList
({
IsQPrice
:
1
}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
CourseList
=
res
.
Data
;
var
obj
=
{
CourseName
:
'不限'
,
CourseId
:
0
}
this
.
CourseList
.
unshift
(
obj
);
this
.
AllCourseList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
CourseList
));
}
})
},
//筛选课程
filterCourse
(
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
.
CourseName
.
toLowerCase
().
indexOf
(
needle
)
>
-
1
);
}
})
},
//获取班级下拉
getClass
()
{
getClassDropDownList
({
CourseId
:
0
,
IsAddDefault
:
0
,
//添加默认选项
}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
var
jsonData
=
res
.
Data
;
jsonData
.
unshift
({
ClassId
:
0
,
ClassName
:
"不限"
})
if
(
jsonData
&&
jsonData
.
length
>
0
)
{
this
.
ClassList
=
JSON
.
parse
(
JSON
.
stringify
(
jsonData
));
this
.
allClassList
=
JSON
.
parse
(
JSON
.
stringify
(
jsonData
));;
}
}
});
},
//筛选班级
filterClass
(
val
,
update
)
{
update
(()
=>
{
if
(
val
===
''
)
{
this
.
ClassList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
allClassList
))
}
else
{
const
needle
=
val
.
toLowerCase
()
this
.
ClassList
=
this
.
allClassList
.
filter
(
v
=>
v
.
ClassName
.
toLowerCase
().
indexOf
(
needle
)
>
-
1
)
}
})
},
//获取学员管理列表
getStuPageList
(){
this
.
loading
=
true
;
GetStuPageList
(
this
.
msg
).
then
(
res
=>
{
this
.
loading
=
false
console
.
log
(
439
,
res
)
if
(
res
.
Code
===
1
){
this
.
data
=
res
.
Data
.
PageData
this
.
pageCount
=
res
.
Data
.
PageCount
}
}).
catch
(
err
=>
{
this
.
loading
=
false
})
},
//翻页
changePage
(
val
)
{
this
.
msg
.
pageIndex
=
val
;
this
.
getStuPageList
()
},
//刷新页面
refreshPage
()
{
this
.
msg
.
pageIndex
=
1
;
this
.
getStuPageList
();
},
goUrl
(
i
){
console
.
log
(
134
,
i
)
this
.
$router
.
push
({
path
:
"/teacher/studentsClassSee"
,
query
:{
StudentId
:
i
.
Id
,
// StudentName:i.GuestName,
// SchoolId:i.School_Id,
TeacherId
:
i
.
Teacher_Id
,
ClassId
:
i
.
ClassId
}
})
}
}
}
</
script
>
<
style
lang=
"sass"
>
@import
url('~assets/css/table.sass')
</
style
>
src/pages/teacher/studentsClassSee.vue
0 → 100644
View file @
eb633a6d
<
style
>
.baseSet_Title
{
width
:
120px
!important
;
padding
:
18px
0
0
16px
;
text-align
:
right
;
}
.studentsClassfee
.border-bottom
{
/* border-bottom: 1px dashed #EEE; */
padding-bottom
:
5px
;
margin-bottom
:
5px
;
}
.studentsClassfee
.text-bottom
{
height
:
32px
;
line-height
:
32px
;
margin-bottom
:
10px
;
}
.studentsClassfee
._icon_btn
i
.icon-sousuo
{
background-color
:
#47BF8C
;
}
.studentsClassfee
._icon_btn
.icon-add
{
background-color
:
#47BF8C
;
}
.studentsClassfee
._icon_btn
i
{
width
:
26px
;
height
:
26px
;
display
:
inline-block
;
color
:
white
!important
;
border-radius
:
50%
;
text-align
:
center
;
line-height
:
26px
;
margin-right
:
10px
;
cursor
:
pointer
;
outline
:
none
;
}
.studentsClassfee
.el-table
td
,
.el-table
th
{
padding
:
5px
0
;
}
.studentsClassfee
.el-input
{
width
:
100%
;
border
:
none
;
background-color
:
transparent
;
}
.studentsClassfee
.items-center
.el-input__inner
{
width
:
100%
;
border
:
none
;
background-color
:
transparent
;
}
</
style
>
<
template
>
<div
class=
"page-body studentsClassfee"
>
<div
class=
"page-search row items-center"
v-if=
"isshowquery"
>
<div
class=
"col row wrap q-mr-lg q-col-gutter-md"
>
<div
class=
"col-3"
>
<q-select
filled
stack-label
@
input=
"handleCurrentChanges(1)"
option-value=
"SId"
option-label=
"SName"
v-model=
"msg.SchoolId"
ref=
"SId"
:options=
"CompanyList"
label=
"校区"
:dense=
"false"
emit-value
map-options
/>
</div>
<!--
<div
class=
"col-3"
>
<q-select
filled
stack-label
@
input=
"handleCurrentChanges(1)"
option-value=
"TId"
option-label=
"TeacherName"
v-model=
"msg.TeacherId"
ref=
"TId"
:options=
"TeacherList"
label=
"老师"
:dense=
"false"
emit-value
map-options
/>
</div>
-->
<div
class=
"col-3"
>
<q-select
filled
stack-label
use-input
input-debounce=
"0"
option-value=
"ClassId"
clearable
@
input=
"getList"
option-label=
"ClassName"
v-model=
"msg.ClassId"
:options=
"ClassList"
label=
"班级"
:dense=
"false"
emit-value
map-options
@
filter=
"filterFn"
>
<template
v-slot:no-option
>
<q-item>
<q-item-section
class=
"text-grey"
>
未找到相关数据
</q-item-section>
</q-item>
</
template
>
</q-select>
</div>
<div
class=
"col-3"
>
<q-input
@
input=
"handleCurrentChanges(1)"
clearable
standout=
"bg-primary text-white"
v-model=
"msg.OrderId"
label=
"订单号"
@
clear=
"handleCurrentChanges(1)"
maxlength=
"20"
/>
</div>
<div
class=
"col-3"
>
<q-input
@
input=
"handleCurrentChanges(1)"
clearable
standout=
"bg-primary text-white"
v-model=
"msg.StudentName"
label=
"学生名称"
@
clear=
"handleCurrentChanges(1)"
maxlength=
"20"
/>
</div>
<div
class=
"col-3"
>
<q-input
@
input=
"handleCurrentChanges(1)"
clearable
standout=
"bg-primary text-white"
v-model=
"msg.ContractNo"
label=
"合同编号"
@
clear=
"handleCurrentChanges(1)"
maxlength=
"20"
/>
</div>
<div
class=
"col-3"
>
<q-select
filled
stack-label
@
input=
"handleCurrentChanges(1)"
option-value=
"Id"
option-label=
"Name"
v-model=
"datetype"
ref=
"Id"
:options=
"datetypelist"
label=
"日期类型"
:dense=
"false"
emit-value
map-options
/>
</div>
<div
class=
"col-3"
v-if=
'datetype==1'
>
<q-field
filled
>
<
template
v-slot:control
>
<el-date-picker
v-model=
"valueyear"
type=
"year"
placeholder=
"选择年份"
value-format=
"yyyy"
:clearable=
'false'
@
change=
"handleCurrentChanges(1)"
>
</el-date-picker>
</
template
>
</q-field>
</div>
<div
class=
"col-3"
v-if=
'datetype==2'
>
<q-field
filled
>
<
template
v-slot:control
>
<el-date-picker
v-model=
"msg.StartMonth"
type=
"month"
placeholder=
"开始月份"
size=
"small"
style=
"width:47%;"
value-format=
"yyyy-MM"
:clearable=
'false'
@
change=
"choicemonth(1)"
clear-icon=
"iconfont icon-guanbi"
>
</el-date-picker>
至
<el-date-picker
v-model=
"msg.EndMonth"
type=
"month"
placeholder=
"结束月份"
size=
"small"
style=
"width:47%;"
value-format=
"yyyy-MM"
:clearable=
'false'
@
change=
"choicemonth(2)"
clear-icon=
"iconfont icon-guanbi"
>
</el-date-picker>
</
template
>
</q-field>
</div>
</div>
</div>
<div
class=
"page-search row items-center"
style=
"justify-content: space-between;"
>
<span
style=
"font-size: 20px;font-weight: 400;"
>
学生课耗明细列表
</span>
<!-- <q-btn color="primary" size="11px" label="导出" @click="txexport" style="margin-left:10px"/> -->
</div>
<
template
>
<el-table
ref=
"filterTable"
:data=
"tableData"
v-loading=
'loading'
:header-cell-style=
"
{backgroundColor:'#f5f6f7', color: '#a8a8b3'}" border style="width: 100%">
<el-table-column
prop=
"OrderId"
label=
"订单号"
width=
'90'
>
<template
slot-scope=
"scope"
>
<div
style=
"text-decoration: underline;cursor: pointer;"
@
click=
'gobaoming(scope.row.OrderId)'
>
{{
scope
.
row
.
OrderId
}}
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"ContractNo"
width=
'150'
label=
"合同号"
></el-table-column>
<el-table-column
prop=
"ClassDate"
label=
"上课日期"
></el-table-column>
<el-table-column
prop=
"TimeBucket"
label=
"上课时间段"
>
</el-table-column>
<el-table-column
prop=
"GuestName"
label=
"学生名称"
>
</el-table-column>
<el-table-column
prop=
"ClassNo"
width=
'120'
label=
"班号"
></el-table-column>
<el-table-column
prop=
"ClassName"
label=
"上课班级"
width=
'200'
>
</el-table-column>
<el-table-column
prop=
"CourseName"
label=
"课程"
width=
'200'
></el-table-column>
<el-table-column
prop=
"TeacherName"
label=
"老师名称"
></el-table-column>
<el-table-column
prop=
"CurrentDeductionHours"
label=
"课时"
width=
'60'
></el-table-column>
<el-table-column
prop=
"UnitPrice"
>
<
template
slot=
"header"
>
<div>
合同单价
</div>
<div>
(元/课时)
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"XHMoney"
label=
"课耗(消耗合同金额)"
>
</el-table-column>
<el-table-column
prop=
"SaleName"
label=
"提成销售"
></el-table-column>
<el-table-column
prop=
"HelpEnterName"
label=
"提成老师"
></el-table-column>
</el-table>
<div
style=
"margin-top: 10px;text-align: center;"
>
<el-pagination
background
@
current-change=
"handleCurrentChanges"
layout=
"total,prev, pager, next, jumper"
:current-page
.
sync=
"msg.pageIndex"
:page-size=
"msg.pageSize"
:total=
'total'
>
</el-pagination>
</div>
</template>
</div>
</template>
<
script
>
import
{
getSchoolDropdown
,
getTeacherDropDownList
,
getClassDropDownList
}
from
'../../api/school/index'
import
{
getStudentConsumptionHoursDetialPageList
,
}
from
'../../api/finance/index'
import
{
EduDownLoad
,
}
from
'../../api/common/common'
;
export
default
{
meta
:
{
title
:
"学生课耗明细列表"
},
props
:
{},
components
:
{},
data
()
{
return
{
loading
:
false
,
valuemonth
:
''
,
valueyear
:
''
,
//列表数据参数
msg
:
{
pageIndex
:
1
,
pageSize
:
15
,
TeacherId
:
'-1'
,
SchoolId
:
'-1'
,
StartMonth
:
''
,
EndMonth
:
''
,
StudentName
:
''
,
OrderId
:
''
,
ContractNo
:
''
,
ClassId
:
0
,
},
datetype
:
'2'
,
pageCount
:
0
,
listData
:
{},
tableData
:
[],
total
:
0
,
CompanyList
:
[],
TeacherList
:
[],
datetypelist
:
[{
Id
:
'2'
,
Name
:
'月份'
},
{
Id
:
'1'
,
Name
:
'年份'
},
],
ClassList
:
[],
allClassList
:
[],
isshowquery
:
true
,
//是否显示筛选栏
}
},
created
()
{
let
userinfo
=
this
.
getLocalStorage
();
var
myDate
=
new
Date
();
this
.
msg
.
StartMonth
=
myDate
.
getFullYear
()
+
"-"
+
(
myDate
.
getMonth
()
+
1
)
this
.
msg
.
EndMonth
=
myDate
.
getFullYear
()
+
"-"
+
(
myDate
.
getMonth
()
+
1
)
this
.
valueyear
=
myDate
.
getFullYear
().
toString
()
if
(
this
.
$route
.
query
&&
this
.
$route
.
query
.
datetype
)
{
this
.
datetype
=
this
.
$route
.
query
.
datetype
}
if
(
this
.
$route
.
query
&&
this
.
$route
.
query
.
valueyear
)
{
this
.
valueyear
=
this
.
$route
.
query
.
valueyear
}
if
(
this
.
$route
.
query
&&
this
.
$route
.
query
.
StartMonth
)
{
this
.
msg
.
StartMonth
=
this
.
$route
.
query
.
StartMonth
}
if
(
this
.
$route
.
query
&&
this
.
$route
.
query
.
EndMonth
)
{
this
.
msg
.
EndMonth
=
this
.
$route
.
query
.
EndMonth
}
if
(
this
.
$route
.
query
&&
this
.
$route
.
query
.
ClassId
)
{
this
.
msg
.
ClassId
=
Number
(
this
.
$route
.
query
.
ClassId
)
}
if
(
this
.
$route
.
query
&&
this
.
$route
.
query
.
SchoolId
)
{
this
.
msg
.
SchoolId
=
Number
(
this
.
$route
.
query
.
SchoolId
)
}
if
(
this
.
$route
.
query
&&
this
.
$route
.
query
.
StudentId
)
{
this
.
msg
.
StudentId
=
this
.
$route
.
query
.
StudentId
this
.
isshowquery
=
false
}
if
(
this
.
$route
.
query
&&
this
.
$route
.
query
.
TeacherId
>=
0
)
{
this
.
msg
.
TeacherId
=
this
.
$route
.
query
.
TeacherId
}
else
{
let
data
=
JSON
.
parse
(
localStorage
.
getItem
(
"loginUserInfo"
))
if
(
data
)
{
this
.
msg
.
TeacherId
=
data
.
data
.
AccountId
}
}
},
mounted
()
{
this
.
getList
();
//获取提成周期列表
this
.
getBranchList
()
this
.
GetTeacherList
();
//老师下拉
this
.
setClass
()
},
methods
:
{
getList
()
{
if
(
this
.
datetype
==
1
)
{
this
.
msg
.
StartMonth
=
this
.
valueyear
+
'-01'
;
this
.
msg
.
EndMonth
=
this
.
valueyear
+
'-12'
;
}
this
.
loading
=
true
;
getStudentConsumptionHoursDetialPageList
(
this
.
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
loading
=
false
;
this
.
tableData
=
res
.
Data
.
PageData
this
.
total
=
res
.
Data
.
Count
}
})
},
//获取教师下拉
GetTeacherList
()
{
getTeacherDropDownList
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
TeacherList
=
res
.
Data
;
var
obj
=
{
TeacherName
:
'全部'
,
TId
:
'-1'
}
this
.
TeacherList
.
unshift
(
obj
);
}
})
},
setClass
(
item
)
{
//班级
this
.
isShowClass
=
true
;
getClassDropDownList
({
CourseId
:
0
,
IsAddDefault
:
1
,
//添加默认选项
}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
var
jsonData
=
res
.
Data
;
if
(
jsonData
&&
jsonData
.
length
>
0
)
{
this
.
ClassList
=
JSON
.
parse
(
JSON
.
stringify
(
jsonData
));
this
.
allClassList
=
JSON
.
parse
(
JSON
.
stringify
(
jsonData
));;
}
}
});
},
//筛选员工
filterFn
(
val
,
update
)
{
update
(()
=>
{
if
(
val
===
''
)
{
this
.
ClassList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
allClassList
))
}
else
{
const
needle
=
val
.
toLowerCase
()
this
.
ClassList
=
this
.
allClassList
.
filter
(
v
=>
v
.
ClassName
.
toLowerCase
().
indexOf
(
needle
)
>
-
1
)
}
})
},
getBranchList
()
{
//获取校区
getSchoolDropdown
({}).
then
(
res
=>
{
this
.
CompanyList
=
res
.
Data
;
var
obj
=
{
SName
:
'全部'
,
SId
:
'-1'
}
this
.
CompanyList
.
unshift
(
obj
);
}).
catch
(()
=>
{
})
},
goUrl
(
path
,
id
)
{
this
.
$router
.
push
({
path
:
'/financial/'
+
path
,
query
:
{
"id"
:
id
,
blank
:
'y'
,
}
})
},
handleCurrentChanges
(
val
)
{
this
.
msg
.
pageIndex
=
val
;
this
.
getList
()
},
txexport
()
{
let
text
=
''
;
if
(
this
.
datetype
==
2
)
{
if
(
new
Date
(
this
.
msg
.
StartMonth
).
getTime
()
==
new
Date
(
this
.
msg
.
EndMonth
).
getTime
())
{
text
=
this
.
msg
.
StartMonth
+
'课耗学生明细.xls'
}
else
{
text
=
this
.
msg
.
StartMonth
+
'-'
+
this
.
msg
.
EndMonth
+
'课耗学生明细.xls'
}
}
else
if
(
this
.
datetype
==
1
)
{
text
=
this
.
valueyear
+
'年课耗学生明细.xls'
}
var
msg
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
msg
));
EduDownLoad
(
"/finance/GetStudentConsumptionHoursDetialPageListToExcel"
,
msg
,
text
)
},
gobaoming
(
Id
)
{
this
.
OpenNewUrl
(
'/sale/orderStatistics'
,
{
OrderId
:
Id
});
},
choicemonth
(
val
)
{
let
StartMonth
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
msg
.
StartMonth
))
let
EndMonth
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
msg
.
EndMonth
))
if
(
val
==
1
)
{
//判断选择的时候开始时间大于结束时间的处理
if
(
new
Date
(
StartMonth
).
getTime
()
>
new
Date
(
EndMonth
).
getTime
())
{
this
.
msg
.
EndMonth
=
this
.
msg
.
StartMonth
}
}
else
{
if
(
new
Date
(
this
.
msg
.
StartMonth
).
getTime
()
>
new
Date
(
this
.
msg
.
EndMonth
).
getTime
())
{
this
.
msg
.
StartMonth
=
this
.
msg
.
EndMonth
}
}
let
diff
=
this
.
dateMinus
(
this
.
msg
.
StartMonth
,
this
.
msg
.
EndMonth
)
if
(
diff
>
11
)
{
this
.
$q
.
notify
({
type
:
'negative'
,
position
:
"top"
,
message
:
`月份不能超过12个月`
})
if
(
val
==
1
)
{
//如果超哥12过月的处理
this
.
msg
.
StartMonth
=
this
.
msg
.
EndMonth
}
else
{
this
.
msg
.
EndMonth
=
this
.
msg
.
StartMonth
}
return
}
setTimeout
(()
=>
{
this
.
handleCurrentChanges
(
1
)
},
10
)
},
//两个日期相差几个月
dateMinus
(
d1
,
d2
)
{
var
m1
=
parseInt
(
d1
.
split
(
"-"
)[
1
].
replace
(
/^0+/
,
""
))
+
parseInt
(
d1
.
split
(
"-"
)[
0
])
*
12
;
var
m2
=
parseInt
(
d2
.
split
(
"-"
)[
1
].
replace
(
/^0+/
,
""
))
+
parseInt
(
d2
.
split
(
"-"
)[
0
])
*
12
;
var
diff
=
m2
-
m1
;
return
diff
;
}
},
}
</
script
>
<
style
lang=
"sass"
>
@import
url('~assets/css/table.sass')
</
style
>
src/pages/teacher/teacherclassSee.vue
0 → 100644
View file @
eb633a6d
<
style
>
.baseSet_Title
{
width
:
120px
!important
;
padding
:
18px
0
0
16px
;
text-align
:
right
;
}
.teacherclassfee
.border-bottom
{
/* border-bottom: 1px dashed #EEE; */
padding-bottom
:
5px
;
margin-bottom
:
5px
;
}
.teacherclassfee
.text-bottom
{
height
:
32px
;
line-height
:
32px
;
margin-bottom
:
10px
;
}
.teacherclassfee
._icon_btn
i
.icon-sousuo
{
background-color
:
#47BF8C
;
}
.teacherclassfee
._icon_btn
.icon-add
{
background-color
:
#47BF8C
;
}
.teacherclassfee
._icon_btn
i
{
width
:
26px
;
height
:
26px
;
display
:
inline-block
;
color
:
white
!important
;
border-radius
:
50%
;
text-align
:
center
;
line-height
:
26px
;
margin-right
:
10px
;
cursor
:
pointer
;
outline
:
none
;
}
.teacherclassfee
.el-table
td
,
.el-table
th
{
padding
:
5px
0
;
}
.teacherclassfee
.el-input
{
width
:
100%
;
border
:
none
;
background-color
:
transparent
;
}
.teacherclassfee
.items-center
.el-input__inner
{
width
:
100%
;
border
:
none
;
background-color
:
transparent
;
}
</
style
>
<
template
>
<div
class=
"page-body teacherclassfee"
>
<div
class=
"page-search row items-center"
>
<div
class=
"col row wrap q-mr-lg q-col-gutter-md"
>
<div
class=
"col-3"
>
<q-select
filled
stack-label
@
input=
"handleCurrentChanges(1)"
option-value=
"SId"
option-label=
"SName"
v-model=
"msg.SchoolId"
ref=
"SId"
:options=
"CompanyList"
label=
"校区"
:dense=
"false"
emit-value
map-options
/>
</div>
<!--
<div
class=
"col-3"
>
<q-select
filled
stack-label
@
input=
"handleCurrentChanges(1)"
option-value=
"TId"
option-label=
"TeacherName"
v-model=
"msg.TeacherId"
ref=
"TId"
:options=
"TeacherList"
label=
"老师"
:dense=
"false"
emit-value
map-options
/>
</div>
-->
<!--
<div
class=
"col-3"
>
<q-select
filled
stack-label
use-input
input-debounce=
"0"
option-value=
"ClassId"
clearable
@
input=
"getList"
option-label=
"ClassName"
v-model=
"msg.ClassId"
:options=
"ClassList"
label=
"班级"
:dense=
"false"
emit-value
map-options
@
filter=
"filterFn"
>
<template
v-slot:no-option
>
<q-item>
<q-item-section
class=
"text-grey"
>
未找到相关数据
</q-item-section>
</q-item>
</
template
>
</q-select>
</div>
-->
<div
class=
"col-3"
>
<q-select
filled
stack-label
@
input=
"handleCurrentChanges(1)"
option-value=
"Id"
option-label=
"Name"
v-model=
"datetype"
ref=
"Id"
:options=
"datetypelist"
label=
"日期类型"
:dense=
"false"
emit-value
map-options
/>
</div>
<div
class=
"col-3"
v-if=
'datetype==1'
>
<q-field
filled
>
<
template
v-slot:control
>
<el-date-picker
v-model=
"valueyear"
type=
"year"
placeholder=
"选择年份"
value-format=
"yyyy"
:clearable=
'false'
@
change=
"handleCurrentChanges(1)"
>
</el-date-picker>
</
template
>
</q-field>
</div>
<div
class=
"col-3"
v-if=
'datetype==2'
>
<q-field
filled
>
<
template
v-slot:control
>
<el-date-picker
v-model=
"msg.StartMonth"
type=
"month"
placeholder=
"开始月份"
size=
"small"
style=
"width:47%;"
value-format=
"yyyy-MM"
:clearable=
'false'
@
change=
"choicemonth(1)"
clear-icon=
"iconfont icon-guanbi"
>
</el-date-picker>
至
<el-date-picker
v-model=
"msg.EndMonth"
type=
"month"
placeholder=
"结束月份"
size=
"small"
style=
"width:47%;"
value-format=
"yyyy-MM"
:clearable=
'false'
@
change=
"choicemonth(2)"
clear-icon=
"iconfont icon-guanbi"
>
</el-date-picker>
</
template
>
</q-field>
</div>
</div>
</div>
<div
class=
"page-search row items-center"
style=
"justify-content: space-between;"
>
<span
style=
"font-size: 20px;font-weight: 400;"
>
老师课耗明细列表
</span>
<!-- <q-btn color="primary" size="11px" label="导出" @click="txexport" style="margin-left:10px"/> -->
</div>
<
template
>
<el-table
ref=
"filterTable"
:data=
"tableData"
v-loading=
'loading'
:header-cell-style=
"
{backgroundColor:'#f5f6f7', color: '#a8a8b3'}" border style="width: 100%">
<el-table-column
prop=
"Date"
label=
"上课日期"
></el-table-column>
<el-table-column
prop=
"TimeBucket"
label=
"上课时间段"
>
</el-table-column>
<el-table-column
prop=
"TeacherName"
label=
"老师名称"
></el-table-column>
<el-table-column
prop=
"ClassNo"
label=
"班号"
></el-table-column>
<el-table-column
prop=
"ClassName"
label=
"上课班级"
width=
'200'
:filters=
'ClassNameList'
:filter-method=
"filterHandler"
:filtered-value=
"ClassName"
>
<template
slot=
"header"
>
<span>
上课班级
<span
style=
"font-size: 10px;color: #409EFF;"
>
(筛选)
</span>
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"CourseName"
label=
"课程"
width=
'230'
></el-table-column>
<el-table-column
prop=
"UnitPrice"
label=
"课时单价"
></el-table-column>
<el-table-column
prop=
"KSNum"
label=
"上课课时"
></el-table-column>
<el-table-column
prop=
"DKNum"
label=
"基础课时"
></el-table-column>
<el-table-column
prop=
"Hours"
label=
"课时转换/小时"
>
</el-table-column>
<el-table-column
prop=
"HourMoney"
label=
"课时费单价元/小时"
></el-table-column>
<el-table-column
prop=
"KSMoney"
label=
"老师课时费"
></el-table-column>
</el-table>
<div
style=
"margin-top: 10px;text-align: center;"
>
<el-pagination
background
@
current-change=
"handleCurrentChanges"
@
size-change=
"handleSizeChange"
layout=
"total,sizes,prev, pager, next, jumper"
:current-page
.
sync=
"msg.pageIndex"
:page-sizes=
"[15, 1000, 10000]"
:page-size=
"msg.pageSize"
:total=
'total'
>
</el-pagination>
</div>
</template>
</div>
</template>
<
script
>
import
{
getSchoolDropdown
,
getClassDropDownList
,
getTeacherDropDownList
}
from
'../../api/school/index'
import
{
getTeacherConsumptionHoursDetialPageList
,
}
from
'../../api/finance/index'
import
{
EduDownLoad
,
}
from
'../../api/common/common'
;
export
default
{
meta
:
{
title
:
"老师课耗明细列表"
},
props
:
{},
components
:
{},
data
()
{
return
{
loading
:
false
,
valuemonth
:
''
,
valueyear
:
''
,
//列表数据参数
msg
:
{
pageIndex
:
1
,
pageSize
:
15
,
TeacherId
:
'-1'
,
SchoolId
:
'-1'
,
StartMonth
:
''
,
EndMonth
:
''
,
ClassId
:
0
,
},
datetype
:
'2'
,
pageCount
:
0
,
listData
:
{},
tableData
:
[],
total
:
0
,
CompanyList
:
[],
TeacherList
:
[],
datetypelist
:
[
{
Id
:
'2'
,
Name
:
'月份'
},
{
Id
:
'1'
,
Name
:
'年份'
},
],
ClassList
:
[],
allClassList
:
[],
ClassNameList
:[],
ClassName
:
''
,
}
},
created
()
{
let
userinfo
=
this
.
getLocalStorage
();
var
myDate
=
new
Date
();
this
.
msg
.
StartMonth
=
myDate
.
getFullYear
()
+
"-"
+
(
myDate
.
getMonth
()
+
1
)
this
.
msg
.
EndMonth
=
myDate
.
getFullYear
()
+
"-"
+
(
myDate
.
getMonth
()
+
1
)
this
.
valueyear
=
myDate
.
getFullYear
().
toString
()
if
(
this
.
$route
.
query
&&
this
.
$route
.
query
.
id
){
this
.
msg
.
TeacherId
=
Number
(
this
.
$route
.
query
.
id
)
}
if
(
this
.
$route
.
query
&&
this
.
$route
.
query
.
datetype
){
this
.
datetype
=
this
.
$route
.
query
.
datetype
}
if
(
this
.
$route
.
query
&&
this
.
$route
.
query
.
valueyear
){
this
.
valueyear
=
this
.
$route
.
query
.
valueyear
}
if
(
this
.
$route
.
query
&&
this
.
$route
.
query
.
StartMonth
){
this
.
msg
.
StartMonth
=
this
.
$route
.
query
.
StartMonth
}
if
(
this
.
$route
.
query
&&
this
.
$route
.
query
.
EndMonth
){
this
.
msg
.
EndMonth
=
this
.
$route
.
query
.
EndMonth
}
if
(
this
.
$route
.
query
&&
this
.
$route
.
query
.
ClassName
){
let
Name
=
decodeURI
(
this
.
$route
.
query
.
ClassName
)
this
.
ClassName
=
[
Name
]
console
.
log
(
Name
)
this
.
msg
.
pageSize
=
1000
}
let
data
=
JSON
.
parse
(
localStorage
.
getItem
(
"loginUserInfo"
))
if
(
data
){
this
.
msg
.
TeacherId
=
data
.
data
.
AccountId
}
},
mounted
()
{
this
.
getList
();
//获取提成周期列表
this
.
getBranchList
()
this
.
GetTeacherList
();
//老师下拉
this
.
setClass
()
},
methods
:
{
getList
()
{
if
(
this
.
datetype
==
1
)
{
this
.
msg
.
StartMonth
=
this
.
valueyear
+
'-01'
;
this
.
msg
.
EndMonth
=
this
.
valueyear
+
'-12'
;
}
this
.
loading
=
true
;
getTeacherConsumptionHoursDetialPageList
(
this
.
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
loading
=
false
;
this
.
tableData
=
res
.
Data
.
PageData
this
.
ClassNameList
=
[],
this
.
tableData
.
forEach
(
x
=>
{
let
obj
=
{
text
:
x
.
ClassName
,
value
:
x
.
ClassName
}
this
.
ClassNameList
.
push
(
obj
)
})
this
.
ClassNameList
=
this
.
unique
(
this
.
ClassNameList
)
this
.
total
=
res
.
Data
.
Count
}
})
},
unique
(
arr
,
Name
)
{
//数组根据字段去重
const
res
=
new
Map
();
return
arr
.
filter
(
(
list
)
=>
!
res
.
has
(
list
.
text
)
&&
res
.
set
(
list
.
text
,
1
)
);
},
setClass
(
item
)
{
//班级
this
.
isShowClass
=
true
;
getClassDropDownList
({
CourseId
:
0
,
IsAddDefault
:
1
,
//添加默认选项
}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
var
jsonData
=
res
.
Data
;
if
(
jsonData
&&
jsonData
.
length
>
0
)
{
this
.
ClassList
=
JSON
.
parse
(
JSON
.
stringify
(
jsonData
));
this
.
allClassList
=
JSON
.
parse
(
JSON
.
stringify
(
jsonData
));;
}
}
});
},
//筛选员工
filterFn
(
val
,
update
)
{
update
(()
=>
{
if
(
val
===
''
)
{
this
.
ClassList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
allClassList
))
}
else
{
const
needle
=
val
.
toLowerCase
()
this
.
ClassList
=
this
.
allClassList
.
filter
(
v
=>
v
.
ClassName
.
toLowerCase
().
indexOf
(
needle
)
>
-
1
)
}
})
},
//获取教师下拉
GetTeacherList
()
{
getTeacherDropDownList
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
TeacherList
=
res
.
Data
;
var
obj
=
{
TeacherName
:
'全部'
,
TId
:
'-1'
}
this
.
TeacherList
.
unshift
(
obj
);
}
})
},
getBranchList
()
{
//获取校区
getSchoolDropdown
({}).
then
(
res
=>
{
this
.
CompanyList
=
res
.
Data
;
var
obj
=
{
SName
:
'全部'
,
SId
:
'-1'
}
this
.
CompanyList
.
unshift
(
obj
);
}).
catch
(()
=>
{
})
},
goUrl
(
path
,
id
)
{
this
.
$router
.
push
({
path
:
'/financial/'
+
path
,
query
:
{
"id"
:
id
,
blank
:
'y'
,
}
})
},
handleCurrentChanges
(
val
)
{
this
.
msg
.
pageIndex
=
val
;
this
.
getList
()
},
handleSizeChange
(
val
){
this
.
msg
.
pageIndex
=
1
;
this
.
msg
.
pageSize
=
val
;
this
.
getList
()
},
txexport
(){
let
text
=
''
;
if
(
this
.
datetype
==
2
)
{
if
(
new
Date
(
this
.
msg
.
StartMonth
).
getTime
()
==
new
Date
(
this
.
msg
.
EndMonth
).
getTime
()){
text
=
this
.
msg
.
StartMonth
+
'课耗老师明细.xls'
}
else
{
text
=
this
.
msg
.
StartMonth
+
'-'
+
this
.
msg
.
EndMonth
+
'课耗老师明细.xls'
}
}
else
if
(
this
.
datetype
==
1
)
{
text
=
this
.
valueyear
+
'年课耗老师明细.xls'
}
var
msg
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
msg
));
EduDownLoad
(
"/finance/GetTeacherConsumptionHoursDetialPageListToExcel"
,
msg
,
text
)
},
choicemonth
(
val
){
let
StartMonth
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
msg
.
StartMonth
))
let
EndMonth
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
msg
.
EndMonth
))
if
(
val
==
1
){
//判断选择的时候开始时间大于结束时间的处理
if
(
new
Date
(
StartMonth
).
getTime
()
>
new
Date
(
EndMonth
).
getTime
()){
this
.
msg
.
EndMonth
=
this
.
msg
.
StartMonth
}
}
else
{
if
(
new
Date
(
this
.
msg
.
StartMonth
).
getTime
()
>
new
Date
(
this
.
msg
.
EndMonth
).
getTime
()){
this
.
msg
.
StartMonth
=
this
.
msg
.
EndMonth
}
}
let
diff
=
this
.
dateMinus
(
this
.
msg
.
StartMonth
,
this
.
msg
.
EndMonth
)
if
(
diff
>
11
){
this
.
$q
.
notify
({
type
:
'negative'
,
position
:
"top"
,
message
:
`月份不能超过12个月`
})
if
(
val
==
1
){
//如果超哥12过月的处理
this
.
msg
.
StartMonth
=
this
.
msg
.
EndMonth
}
else
{
this
.
msg
.
EndMonth
=
this
.
msg
.
StartMonth
}
return
}
setTimeout
(()
=>
{
this
.
handleCurrentChanges
(
1
)
},
10
)
},
//两个日期相差几个月
dateMinus
(
d1
,
d2
)
{
var
m1
=
parseInt
(
d1
.
split
(
"-"
)[
1
].
replace
(
/^0+/
,
""
))
+
parseInt
(
d1
.
split
(
"-"
)[
0
])
*
12
;
var
m2
=
parseInt
(
d2
.
split
(
"-"
)[
1
].
replace
(
/^0+/
,
""
))
+
parseInt
(
d2
.
split
(
"-"
)[
0
])
*
12
;
var
diff
=
m2
-
m1
;
return
diff
;
},
filterHandler
(
value
,
row
,
column
)
{
const
property
=
column
[
'property'
];
return
row
[
property
]
===
value
;
},
},
}
</
script
>
<
style
lang=
"sass"
>
@import
url('~assets/css/table.sass')
</
style
>
\ No newline at end of file
src/router/routes.js
View file @
eb633a6d
...
...
@@ -909,6 +909,11 @@ const routes = [{
component
:
()
=>
import
(
"pages/scheduling/scheduleInfo.vue"
)
},
{
path
:
"/scheduling/vacationPlan"
,
//假期计划表
component
:
()
=>
import
(
"pages/scheduling/vacationPlan"
)
},
{
path
:
"/test"
,
//API测试
component
:
()
=>
...
...
@@ -939,6 +944,31 @@ const routes = [{
component
:
()
=>
import
(
"pages/teacher/teachMonthLessonCost"
)
},
{
path
:
"/teacher/myPrepareLessons"
,
//我的备课
component
:
()
=>
import
(
"pages/teacher/myPrepareLessons"
)
},
{
path
:
"/teacher/lessonTimeStatistics"
,
//课时统计
component
:
()
=>
import
(
"pages/teacher/lessonTimeStatistics"
)
},
{
path
:
"/teacher/teacherclassSee"
,
//课时统计-查看老师
component
:
()
=>
import
(
"pages/teacher/teacherclassSee"
)
},
{
path
:
"/teacher/studentsClassSee"
,
//课时统计-查看学生
component
:
()
=>
import
(
"pages/teacher/studentsClassSee"
)
},
{
path
:
"/teacher/studentManager"
,
//学员管理
component
:
()
=>
import
(
"pages/teacher/studentManager"
)
},
],
},
...
...
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