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
c83dac3a
Commit
c83dac3a
authored
Apr 07, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
51b001aa
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
940 additions
and
1 deletion
+940
-1
index.js
src/api/teacher/index.js
+11
-1
assessment-form.vue
src/components/teacher/assessment-form.vue
+816
-0
assessmentType.vue
src/pages/teacher/assessmentType.vue
+108
-0
routes.js
src/router/routes.js
+5
-0
No files found.
src/api/teacher/index.js
View file @
c83dac3a
...
...
@@ -446,7 +446,17 @@ export function GetTeacherStaticYearRate(data) {
})
}
/**
* 获取教师端每月成长率统计
* @param {*} data
*/
export
function
queryAssessmentTypeList
(
data
)
{
return
request
({
url
:
'/TeacherAssessment/GetAssessmentTypeList'
,
method
:
'post'
,
data
})
}
...
...
src/components/teacher/assessment-form.vue
0 → 100644
View file @
c83dac3a
<
style
>
</
style
>
<
template
>
<q-dialog
v-model=
"persistent"
content-class=
"bg-grey-1"
persistent
transition-show=
"scale"
>
<q-card
style=
"width: 800px;max-width:900px;"
class=
"CLM-Form"
>
<q-card-section>
<div
class=
"text-h6"
>
{{
optionTitle
}}
</div>
</q-card-section>
<q-card-section
class=
"q-pt-none scroll"
style=
"max-height: 70vh"
>
<div
class=
"EmpLine_title"
>
<div
class=
"Emp_Line"
></div>
<div>
配置信息
</div>
</div>
<div
class=
"row wrap"
>
<div
class=
"col-6"
>
<q-input
filled
stack-label
maxlength=
"20"
:dense=
"false"
v-model=
"objOption.ClassName"
ref=
"ClassName"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"班级名称"
:rules=
"[val => !!val || '请填写班级名称']"
/>
</div>
<div
class=
"col-6"
>
<q-select
filled
stack-label
use-input
option-value=
"CourseId"
option-label=
"CourseName"
v-model=
"objOption.CouseId"
ref=
"CouseId"
:options=
"CourseList"
label=
"关联课程"
:dense=
"false"
class=
"col-6 q-pr-lg q-pb-lg"
emit-value
map-options
@
filter=
"filterCourse"
@
input=
"changeCourse()"
/>
</div>
</div>
<div
class=
"row wrap"
>
<div
class=
"col-6"
>
<q-select
filled
stack-label
option-value=
"TId"
option-label=
"TeacherName"
v-model=
"objOption.Teacher_Id"
ref=
"Teacher_Id"
:options=
"TeacherList"
label=
"关联教师"
:dense=
"false"
class=
"col-6 q-pr-lg q-pb-lg"
emit-value
map-options
/>
</div>
<div
class=
"col-6"
>
<q-input
filled
stack-label
maxlength=
"3"
:dense=
"false"
v-model=
"objOption.ClassPersion"
ref=
"ClassPersion"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"招生人数"
@
keyup
.
native=
"checkInteger(objOption,'ClassPersion')"
:rules=
"[val => !!val || '请填写招生人数']"
/>
</div>
</div>
<div
class=
"row wrap"
>
<div
class=
"col-6"
>
<template
v-if=
"objOption.ClassId>0"
>
<q-input
filled
v-model=
"objOption.OpenTime"
class=
"col-6 q-pr-lg q-pb-lg"
mask=
"date"
label=
"开始报名时间"
>
<template
v-slot:append
>
<q-icon
name=
"event"
class=
"cursor-pointer"
>
<q-popup-proxy
ref=
"qDateProxy1"
transition-show=
"scale"
transition-hide=
"scale"
>
<q-date
v-model=
"objOption.OpenTime"
@
input=
"() => $refs.qDateProxy1.hide()"
/>
</q-popup-proxy>
</q-icon>
</
template
>
</q-input>
</template>
<
template
v-else
>
<q-field
filled
class=
"q-pr-lg"
>
<template
v-slot:control
>
<el-date-picker
type=
"dates"
style=
"width:100%"
v-model=
"objOption.ClassDateList"
value-format=
"yyyy-MM-dd"
placeholder=
"开班时间"
>
</el-date-picker>
</
template
>
</q-field>
</template>
</div>
<div
class=
"col-6"
>
<q-input
filled
v-model=
"objOption.EndOrderTime"
class=
"col-6 q-pr-lg q-pb-lg"
mask=
"date"
label=
"截止报名时间"
>
<
template
v-slot:append
>
<q-icon
name=
"event"
class=
"cursor-pointer"
>
<q-popup-proxy
ref=
"qDateProxy2"
transition-show=
"scale"
transition-hide=
"scale"
>
<q-date
v-model=
"objOption.EndOrderTime"
@
input=
"() => $refs.qDateProxy2.hide()"
/>
</q-popup-proxy>
</q-icon>
</
template
>
</q-input>
</div>
</div>
<div
class=
"row wrap"
style=
"display:none;"
>
<div
class=
"col-6"
>
<q-input
filled
stack-label
maxlength=
"8"
:dense=
"false"
v-model=
"objOption.OriginalPrice"
ref=
"OriginalPrice"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"原价"
@
keyup
.
native=
"checkPrice(objOption,'OriginalPrice')"
:rules=
"[val => !!val || '请填写原价']"
/>
</div>
<div
class=
"col-6"
>
<q-input
filled
stack-label
maxlength=
"8"
:dense=
"false"
v-model=
"objOption.SellPrice"
ref=
"SellPrice"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"卖价"
@
keyup
.
native=
"checkPrice(objOption,'SellPrice')"
:rules=
"[val => !!val || '请填写卖价']"
/>
</div>
</div>
<div
class=
"row wrap"
>
<div
class=
"col-6"
>
<q-select
filled
stack-label
option-value=
"SId"
option-label=
"SName"
v-model=
"objOption.School_Id"
ref=
"School_Id"
:options=
"SchoolList"
label=
"所属校区"
:dense=
"false"
class=
"col-6 q-pr-lg q-pr-lg"
emit-value
map-options
/>
</div>
<div
class=
"col-6"
>
<q-select
filled
stack-label
option-value=
"RoomId"
option-label=
"RoomName"
v-model=
"objOption.ClassRoomId"
ref=
"ClassRoomId"
:options=
"ClassRoomList"
label=
"关联教室"
:dense=
"false"
class=
"col-6 q-pr-lg q-pr-lg"
emit-value
map-options
/>
</div>
</div>
<div
class=
"row wrap"
style=
"margin:20px 0;display:none;"
>
<div
class=
"col-6"
>
阶梯定价
<q-toggle
size=
"md"
label=
""
color=
"primary"
:false-value=
"0"
:true-value=
"1"
v-model=
"objOption.IsStepPrice"
/>
<q-btn
v-if=
"objOption.IsStepPrice==1"
style=
"margin-left:30px;"
size=
"10px"
@
click=
"addStepPrice()"
round
color=
"primary"
icon=
"iconfont icon-img_haha"
/>
</div>
</div>
<
template
v-if=
"objOption.IsStepPrice==1"
style=
"display:none;"
>
<div
class=
"row wrap"
v-for=
"(item,index) in ladderPriceList"
:key=
"index"
>
<div
class=
"col-6"
>
<q-input
filled
stack-label
maxlength=
"3"
v-model=
"item.PersionNum"
@
keyup
.
native=
"checkInteger(item,'PersionNum')"
:dense=
"false"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"人"
/>
</div>
<div
class=
"col-6"
style=
"position:relative;"
>
<q-input
filled
stack-label
maxlength=
"8"
v-model=
"item.PersionPrice"
@
keyup
.
native=
"checkPrice(item,'PersionPrice')"
:dense=
"false"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"价格"
/>
<q-btn
style=
"position:absolute;right:-5px;top:20px;"
size=
"6px"
@
click=
"delStepPrice(index)"
round
color=
"red"
icon=
"iconfont icon-guanbi1"
/>
</div>
</div>
</
template
>
<div
class=
"row wrap"
style=
"display:none;"
>
<div
class=
"col-6"
>
提成设置
<q-toggle
size=
"md"
label=
""
color=
"primary"
:false-value=
"0"
:true-value=
"1"
v-model=
"objOption.IsOpenCommission"
/>
<div
style=
"display:inline-block;margin-left:20px;"
v-if=
"objOption.IsOpenCommission==1"
>
<q-radio
v-model=
"objOption.CommissionType"
:val=
"1"
label=
"按人头"
/>
<q-radio
v-model=
"objOption.CommissionType"
:val=
"2"
label=
"按百分"
/>
</div>
</div>
</div>
<div
class=
"row wrap"
style=
"margin:20px 0;display:none;"
v-if=
"objOption.IsOpenCommission==1"
>
<div
class=
"col-12"
>
<q-field
filled
class=
"col-6 q-pr-lg q-pb-lg"
>
<
template
v-slot:control
>
<el-input
placeholder=
"数值"
maxlength=
"8"
ref=
"CommissionValue"
v-model=
"objOption.CommissionValue"
@
keyup
.
native=
"checkPrice(objOption,'CommissionValue')"
:rules=
"[val => !!val || '请填写数值']"
>
<template
slot=
"append"
>
<span
v-if=
"objOption.CommissionType==1"
>
人
</span>
<span
v-if=
"objOption.CommissionType==2"
>
%
</span>
</
template
>
</el-input>
</template>
</q-field>
</div>
</div>
<div
class=
"EmpLine_title"
style=
"margin-top:20px"
>
<div
class=
"Emp_Line"
></div>
<div>
上课设置
</div>
</div>
<div
class=
"row wrap"
style=
"margin:30px 0;"
>
<div
class=
"col-6"
>
<q-select
filled
stack-label
option-value=
"Id"
option-label=
"Name"
v-model=
"objOption.ClassStyle"
ref=
"ClassStyle"
:options=
"classSetList"
label=
"排课安排"
:dense=
"false"
class=
"col-6 q-pr-lg q-pr-lg"
emit-value
map-options
@
input=
"changeClassStyle(objOption.ClassStyle)"
/>
</div>
<div
class=
"col-6"
>
<q-input
filled
stack-label
maxlength=
"6"
v-model=
"objOption.ClassHours"
:dense=
"false"
class=
"col-6 q-pr-lg q-pb-lg"
label=
"学习课时(课程)"
@
keyup
.
native=
"checkInteger(objOption,'ClassHours')"
disable
/>
</div>
</div>
<div
class=
"row wrap"
v-if=
"objOption.ClassStyle==1"
>
<div
class=
"col-6"
>
<q-select
filled
stack-label
multiple
option-value=
"value"
option-label=
"label"
v-model=
"checkedDays"
ref=
"ClassStyle"
:options=
"weekList"
label=
"选择周几"
:dense=
"false"
class=
"col-6 q-pr-lg q-pr-lg"
emit-value
map-options
>
<
template
v-slot:option=
"{ itemProps, itemEvents, opt, selected, toggleOption }"
>
<q-item
v-bind=
"itemProps"
v-on=
"itemEvents"
>
<q-item-section
avatar
>
<span
v-if=
"opt.icon==1"
class=
"common_Style classForm_monday"
>
月
</span>
<span
v-if=
"opt.icon==2"
class=
"common_Style classForm_tuesday"
>
火
</span>
<span
v-if=
"opt.icon==3"
class=
"common_Style classForm_wednesday"
>
水
</span>
<span
v-if=
"opt.icon==4"
class=
"common_Style classForm_thursday"
>
木
</span>
<span
v-if=
"opt.icon==5"
class=
"common_Style classForm_friday"
>
金
</span>
<span
v-if=
"opt.icon==6"
class=
"common_Style classForm_saturday"
>
土
</span>
<span
v-if=
"opt.icon==7"
class=
"common_Style classForm_sunday"
>
日
</span>
</q-item-section>
<q-item-section>
<q-item-label
v-html=
"opt.label"
/>
</q-item-section>
<q-item-section
side
>
<i
style=
"color:#2961FE"
v-if=
"selected"
class=
"iconfont icon-chenggong"
></i>
</q-item-section>
</q-item>
</
template
>
</q-select>
</div>
</div>
<div
class=
"row wrap"
v-if=
"objOption.ClassStyle==2"
>
<div
class=
"col-12"
>
<q-select
filled
stack-label
multiple
option-value=
"value"
option-label=
"label"
v-model=
"checkedDays"
ref=
"ClassStyle"
:options=
"dayList"
label=
"选择日期"
:dense=
"false"
class=
"col-6 q-pr-lg q-pr-lg"
emit-value
map-options
>
</q-select>
</div>
</div>
<div
class=
"row wrap"
v-if=
"objOption.ClassStyle==3"
>
<div
class=
"col-12"
>
<q-date
v-model=
"checkedDays"
minimal
multiple
style=
"width:100%"
/>
</div>
</div>
<div
class=
"row wrap"
style=
"margin:20px 0;"
>
<div
class=
"col-6"
>
学习时段
<q-btn
style=
"margin-left:30px;"
size=
"10px"
@
click=
"addPlan()"
round
color=
"primary"
icon=
"iconfont icon-img_haha"
/>
</div>
</div>
<
template
v-if=
"DefaultPlanTimeList&&DefaultPlanTimeList.length>0"
>
<table
style=
"width:100%;border-collapse: collapse;"
class=
"planTimeLi2"
>
<thead>
<tr>
<th>
日期/周
</th>
<th
colspan=
"2"
>
时间
</th>
<th>
消耗课时
</th>
<th>
操作
</th>
</tr>
</thead>
<tbody
v-for=
"(nItem,nIndex) in DefaultPlanTimeList"
:key=
"nIndex+10000"
>
<tr
v-for=
"(sItem,sIndex) in nItem.TimeList"
:key=
"sIndex"
>
<td
:rowspan=
"nItem.TimeList.length"
v-if=
"sIndex==0"
style=
"position:relative;"
>
<q-select
filled
style=
"width:220px;"
stack-label
multiple
v-model=
"nItem.DateList"
ref=
"DateList"
:options=
"checkedDays"
:label=
"objOption.ClassStyle==1?'选择周几':'选择日期'"
:dense=
"false"
class=
"col-6"
emit-value
map-options
clearable
>
</q-select>
<a
@
click=
"deletePlan(nIndex)"
style=
"color:blue;cursor:pointer;position:absolute;"
>
删除
</a>
</td>
<td>
<q-input
filled
v-model=
"sItem.StartTime"
class=
"col-6 q-pl-lg"
placeholder=
"开始时间"
mask=
"time"
>
<template
v-slot:append
>
<q-icon
name=
"access_time"
class=
"cursor-pointer"
>
<q-popup-proxy
transition-show=
"scale"
transition-hide=
"scale"
>
<q-time
v-model=
"sItem.StartTime"
>
<div
class=
"row items-center justify-end"
>
<q-btn
v-close-popup
label=
"确定"
color=
"primary"
flat
/>
</div>
</q-time>
</q-popup-proxy>
</q-icon>
</
template
>
</q-input>
</td>
<td>
<q-input
filled
v-model=
"sItem.EndTime"
class=
"col-6 q-pr-lg"
placeholder=
"结束时间"
mask=
"time"
>
<
template
v-slot:append
>
<q-icon
name=
"access_time"
class=
"cursor-pointer"
>
<q-popup-proxy
transition-show=
"scale"
transition-hide=
"scale"
>
<q-time
v-model=
"sItem.EndTime"
>
<div
class=
"row items-center justify-end"
>
<q-btn
v-close-popup
label=
"确定"
color=
"primary"
flat
/>
</div>
</q-time>
</q-popup-proxy>
</q-icon>
</
template
>
</q-input>
</td>
<td>
<q-input
filled
stack-label
maxlength=
"20"
v-model=
"sItem.TimeHour"
@
keyup
.
native=
"checkPrice(sItem,'TimeHour')"
:dense=
"false"
class=
"col-6 q-pr-lg"
label=
"消耗课时"
/>
</td>
<td>
<q-btn
size=
"10px"
v-if=
"sIndex==0"
@
click=
"addPlanTime(nItem)"
round
color=
"primary"
icon=
"iconfont icon-img_haha"
/>
<q-btn
v-if=
"sIndex>0"
size=
"10px"
@
click=
"deletePlanTime(nItem,sIndex)"
round
color=
"red"
icon=
"iconfont icon-guanbi1"
/>
</td>
</tr>
</tbody>
</table>
</template>
<div
class=
"row wrap"
style=
"margin-top:30px;"
>
<div
class=
"col-6"
style=
"display:none"
>
<q-select
label=
"课时分钟数"
filled
stack-label
v-model=
"objOption.ClassHourMinute"
:options=
"ClassHourMinuteArray"
option-value=
"Id"
option-label=
"Name"
:dense=
"false"
class=
"col-6 q-pr-lg q-pb-lg"
emit-value
map-options
>
</q-select>
</div>
</div>
<div
class=
"row wrap"
>
<div
class=
"col-12"
>
<q-input
filled
type=
"textarea"
:rows=
"3"
stack-label
maxlength=
"2000"
v-model=
"objOption.InnerRemark"
:dense=
"false"
class=
"col-12 q-pr-lg q-pb-lg"
label=
"对内备注"
/>
</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=
"closeCourseForm"
/>
<q-btn
:label=
"BtnStr"
color=
"accent q-px-md"
style=
"font-weight:400 !important"
:loading=
"saveCourseLoading"
@
click=
"saveCourse"
>
<
template
v-slot:loading
>
{{
BtnStr
}}
</
template
>
</q-btn>
</q-card-actions>
</q-card>
</q-dialog>
</template>
<
script
>
import
{
queryCourseDropdownList
,
}
from
'../../api/course/index'
import
{
GetClassTypeList
}
from
'../../api/system/index'
import
{
getTeacherDropDownList
,
getSchoolDropdown
,
saveClass
,
batchSaveClassPlan
,
getClassInfo
,
queryClassRoomList
}
from
'../../api/school/index'
export
default
{
components
:
{},
props
:
{
saveObj
:
{
type
:
Object
,
default
:
null
}
},
data
()
{
return
{
persistent
:
true
,
objOption
:
{
ClassId
:
0
,
//班级编号
ClassName
:
""
,
//班级名称
CouseId
:
0
,
//课程Id
Teacher_Id
:
0
,
//讲师Id
Assist_Id
:
0
,
//助教Id
Group_Id
:
0
,
//集团编号
School_Id
:
-
1
,
//学校编号
CreateBy
:
0
,
//创建人
CreateTime
:
''
,
//创建时间
UpdateBy
:
''
,
//修改人
UpdateTime
:
''
,
//更新时间
Status
:
0
,
//0正常 1禁用
ClassPersion
:
''
,
//招生人数
OpenTime
:
''
,
//开学时间
EndOrderTime
:
''
,
//截止报名时间
OriginalPrice
:
''
,
//原价
SellPrice
:
''
,
//售价
IsStepPrice
:
0
,
//是否阶梯价(1-是)
ClassRoomId
:
''
,
//教室编号
IsOpenCommission
:
0
,
//是否开启提成设置(1-是)
CommissionType
:
1
,
//提成类型(1-人头,2-百分比)
CommissionValue
:
''
,
//提成值
ClassHours
:
''
,
//课时
ClassStyle
:
1
,
//排课方式(1-周,2-月,3-固定日期,4-约课)
ClassStatus
:
1
,
//班级状态
InnerRemark
:
''
,
//对内备注
OutRemark
:
''
,
//对外备注
CompleteProgress
:
0
,
//完成进度
ClassType
:
1
,
//班级类型
ClassHourMinute
:
45
,
//课时分钟数
ClassDateList
:
[],
//开班时间
},
optionTitle
:
""
,
saveCourseLoading
:
false
,
CourseList
:
[],
//关联课程下拉数据
AllCourseList
:
[],
//所有课程列表
TeacherList
:
[],
//关联教师下拉数据
SchoolList
:
[],
//关联校区下拉数据
ClassRoomList
:
[],
//教室下拉数据
ladderPriceList
:
[],
//阶梯定价数组
dayList
:
[],
//日期数组1-31
//上课设置
classSetList
:
[{
Name
:
'按周排课'
,
Id
:
1
},
{
Name
:
'按月排课'
,
Id
:
2
},
{
Name
:
'固定日期'
,
Id
:
3
},
{
Name
:
'约课'
,
Id
:
4
}],
//班级类型
classTypeList
:
[],
//周几
weekList
:
[{
label
:
'周一'
,
value
:
'1'
,
icon
:
1
},
{
label
:
'周二'
,
value
:
'2'
,
icon
:
2
},
{
label
:
'周三'
,
value
:
'3'
,
icon
:
3
},
{
label
:
'周四'
,
value
:
'4'
,
icon
:
4
},
{
label
:
'周五'
,
value
:
'5'
,
icon
:
5
},
{
label
:
'周六'
,
value
:
'6'
,
icon
:
6
},
{
label
:
'周日'
,
value
:
'7'
,
icon
:
7
}],
ClassHourMinuteArray
:
[{
Id
:
45
,
Name
:
45
},
{
Id
:
60
,
Name
:
60
},
],
//选中日期/星期
checkedDays
:
[],
//默认上课时间数组
DefaultPlanTimeList
:
[],
BtnStr
:
"立即提交"
}
},
created
()
{
this
.
initDayList
();
this
.
getSchool
();
this
.
getCourseList
();
this
.
getClassRoomList
();
this
.
GetTeacherList
();
this
.
GetClassTypeList
();
},
mounted
()
{
this
.
initObj
()
},
methods
:
{
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
)
}
})
},
//选择课程改变事件
changeCourse
()
{
if
(
this
.
objOption
.
CouseId
>
0
&&
this
.
CourseList
&&
this
.
CourseList
.
length
>
0
)
{
let
val
=
this
.
CourseList
.
find
(
x
=>
x
.
CourseId
==
this
.
objOption
.
CouseId
);
if
(
val
)
{
if
(
val
.
OriginalPrice
)
{
this
.
objOption
.
OriginalPrice
=
val
.
OriginalPrice
;
}
if
(
val
.
SellPrice
)
{
this
.
objOption
.
SellPrice
=
val
.
SellPrice
;
}
if
(
val
.
ClassHours
)
{
this
.
objOption
.
ClassHours
=
val
.
ClassHours
;
}
}
}
},
//初始化日期-天
initDayList
()
{
this
.
dayList
=
[];
for
(
var
i
=
1
;
i
<=
31
;
i
++
)
{
this
.
dayList
.
push
({
label
:
i
,
value
:
i
,
});
}
},
//下拉选择改变
changeClassStyle
(
style
)
{
this
.
checkedDays
=
[];
},
//初始化表单
initObj
()
{
if
(
this
.
saveObj
&&
this
.
saveObj
.
ClassId
>
0
)
{
getClassInfo
({
ClassId
:
this
.
saveObj
.
ClassId
}).
then
(
res
=>
{
var
TempData
=
res
.
Data
;
this
.
objOption
.
ClassId
=
TempData
.
ClassId
;
this
.
objOption
.
ClassName
=
TempData
.
ClassName
;
this
.
objOption
.
CouseId
=
TempData
.
CouseId
;
this
.
objOption
.
Teacher_Id
=
TempData
.
Teacher_Id
;
this
.
objOption
.
Assist_Id
=
TempData
.
Assist_Id
;
this
.
objOption
.
School_Id
=
TempData
.
School_Id
;
this
.
objOption
.
ClassPersion
=
TempData
.
ClassPersion
;
this
.
objOption
.
OpenTime
=
TempData
.
OpenTime
;
//暂无
this
.
objOption
.
EndOrderTime
=
TempData
.
EndOrderTime
;
this
.
objOption
.
OriginalPrice
=
TempData
.
OriginalPrice
;
this
.
objOption
.
SellPrice
=
TempData
.
SellPrice
;
this
.
objOption
.
IsStepPrice
=
TempData
.
IsStepPrice
;
this
.
objOption
.
ClassRoomId
=
TempData
.
ClassRoomId
;
this
.
objOption
.
IsOpenCommission
=
TempData
.
IsOpenCommission
;
this
.
objOption
.
CommissionType
=
TempData
.
CommissionType
;
this
.
objOption
.
CommissionValue
=
TempData
.
CommissionValue
;
this
.
objOption
.
ClassHours
=
TempData
.
ClassHours
;
this
.
objOption
.
ClassStyle
=
TempData
.
ClassStyle
;
this
.
objOption
.
ClassStatus
=
TempData
.
ClassStatus
;
this
.
objOption
.
InnerRemark
=
TempData
.
InnerRemark
;
this
.
objOption
.
ClassType
=
TempData
.
ClassType
;
this
.
objOption
.
ClassHourMinute
=
TempData
.
ClassHourMinute
;
this
.
objOption
.
ClassDateList
=
TempData
.
ClassDateList
;
//默认时间
if
(
TempData
.
DefaultTimeList
&&
TempData
.
DefaultTimeList
.
length
>
0
)
{
this
.
DefaultPlanTimeList
=
TempData
.
DefaultTimeList
;
}
if
(
TempData
.
WeekDayList
&&
TempData
.
WeekDayList
.
length
>
0
)
{
switch
(
this
.
objOption
.
ClassStyle
)
{
//按周排课
case
1
:
this
.
checkedDays
=
TempData
.
WeekDayList
;
break
;
//按月排课
case
2
:
this
.
checkedDays
=
TempData
.
WeekDayList
;
break
;
//固定日期排课
case
3
:
this
.
checkedDays
=
TempData
.
WeekDayList
;
break
;
}
}
if
(
TempData
.
ClassStepPriceList
&&
TempData
.
ClassStepPriceList
.
length
>
0
)
{
this
.
ladderPriceList
=
TempData
.
ClassStepPriceList
;
}
})
this
.
optionTitle
=
"修改班级信息"
}
else
{
this
.
optionTitle
=
"新增班级"
}
},
//关闭弹窗
closeCourseForm
()
{
this
.
$emit
(
'close'
);
this
.
persistent
=
false
;
},
//保存班级
saveCourse
()
{
this
.
$refs
.
ClassName
.
validate
();
this
.
$refs
.
ClassPersion
.
validate
();
if
(
this
.
DefaultPlanTimeList
.
length
==
0
)
{
this
.
$q
.
notify
({
type
:
'negative'
,
position
:
"top"
,
message
:
`请选择学习时段`
})
return
;
}
else
{
for
(
let
i
=
0
;
i
<
this
.
DefaultPlanTimeList
.
length
;
i
++
)
{
if
(
this
.
DefaultPlanTimeList
[
i
].
DateList
.
length
==
0
)
{
this
.
$q
.
notify
({
type
:
'negative'
,
position
:
"top"
,
message
:
`请选择第
${
i
+
1
}
行周几`
})
return
}
for
(
let
j
=
0
;
j
<
this
.
DefaultPlanTimeList
[
i
].
TimeList
.
length
;
j
++
)
{
if
(
this
.
DefaultPlanTimeList
[
i
].
TimeList
[
j
].
StartTime
==
''
)
{
this
.
$q
.
notify
({
type
:
'negative'
,
position
:
"top"
,
message
:
`请填写第
${
i
+
1
}
行,第
${
j
+
1
}
个开始时间`
})
return
}
if
(
this
.
DefaultPlanTimeList
[
i
].
TimeList
[
j
].
EndTime
==
''
)
{
this
.
$q
.
notify
({
type
:
'negative'
,
position
:
"top"
,
message
:
`请填写第
${
i
+
1
}
行,第
${
j
+
1
}
个结束时间`
})
return
}
if
(
this
.
DefaultPlanTimeList
[
i
].
TimeList
[
j
].
TimeHour
==
''
)
{
this
.
$q
.
notify
({
type
:
'negative'
,
position
:
"top"
,
message
:
`请填写第
${
i
+
1
}
行,第
${
j
+
1
}
个的课时`
})
return
}
}
}
}
if
(
!
this
.
$refs
.
ClassName
.
hasError
&&
!
this
.
$refs
.
ClassPersion
.
hasError
)
{
if
(
this
.
objOption
.
IsOpenCommission
==
1
)
{
if
(
this
.
objOption
.
CommissionValue
==
''
)
{
this
.
$q
.
notify
({
type
:
'negative'
,
position
:
"top"
,
message
:
`请填写数值`
})
return
;
}
}
this
.
BtnStr
=
"正在保存班级信息"
;
this
.
objOption
.
ClassStepPriceList
=
this
.
ladderPriceList
;
//选中的日期或星期
this
.
objOption
.
WeekDayList
=
this
.
checkedDays
;
//默认上课时间
this
.
objOption
.
DefaultPlanTimeList
=
this
.
DefaultPlanTimeList
;
this
.
saveCourseLoading
=
true
;
saveClass
(
this
.
objOption
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
var
newClassId
=
res
.
Data
.
ClassId
var
PlanList
=
res
.
Data
.
ClassPlanList
;
this
.
refreshForm
();
}
else
{
this
.
$q
.
notify
({
type
:
'negative'
,
position
:
"top"
,
message
:
`操作失败!`
})
}
}).
catch
(()
=>
{
this
.
BtnStr
=
"立即提交"
this
.
saveCourseLoading
=
false
})
}
},
//检查上课计划是否冲突
checkPlan
(
ClassId
,
ClassPlanList
)
{
this
.
BtnStr
=
"正在检查排班是否存在冲突"
;
var
newMsg
=
{
ClassId
:
ClassId
,
PlanList
:
ClassPlanList
,
}
var
NewClassId
=
ClassId
;
batchSaveClassPlan
(
newMsg
).
then
(
res
=>
{
this
.
saveCourseLoading
=
false
if
(
res
.
Code
==
1
)
{
if
(
res
.
Data
)
{
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'数据保存成功!但存在上课冲突数据,请调整。'
,
position
:
'top'
})
this
.
$emit
(
'getClassFlict'
,
NewClassId
);
}
else
{
this
.
refreshForm
()
}
}
});
},
//刷新表单
refreshForm
()
{
this
.
saveCourseLoading
=
false
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'数据保存成功!'
,
position
:
'top'
})
this
.
$emit
(
"success"
);
this
.
closeCourseForm
();
},
//获取课程
getCourseList
()
{
queryCourseDropdownList
({
IsQPrice
:
1
,
IsQuerySalePlat
:
1
,
}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
CourseList
=
res
.
Data
;
var
obj
=
{
CourseName
:
'请选择'
,
CourseId
:
0
}
this
.
CourseList
.
unshift
(
obj
);
this
.
AllCourseList
=
res
.
Data
;
}
})
},
//获取教师下拉
GetTeacherList
()
{
getTeacherDropDownList
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
TeacherList
=
res
.
Data
;
var
obj
=
{
TeacherName
:
'请选择'
,
TId
:
0
}
this
.
TeacherList
.
unshift
(
obj
);
}
})
},
//获取校区下拉
getSchool
()
{
getSchoolDropdown
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
SchoolList
=
res
.
Data
;
var
obj
=
{
SName
:
'请选择'
,
SId
:
-
1
}
this
.
SchoolList
.
unshift
(
obj
);
}
})
},
//获取教室下拉
getClassRoomList
()
{
queryClassRoomList
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
ClassRoomList
=
res
.
Data
;
var
obj
=
{
RoomName
:
'请选择'
,
RoomId
:
0
}
this
.
ClassRoomList
.
unshift
(
obj
);
}
})
},
//新增阶梯定价
addStepPrice
()
{
var
obj
=
{
ClassStepPriceId
:
0
,
PersionNum
:
2
,
PersionPrice
:
0
}
if
(
this
.
ladderPriceList
&&
this
.
ladderPriceList
.
length
>
0
)
{
var
_index
=
this
.
ladderPriceList
.
length
-
1
;
obj
.
PersionNum
=
parseInt
(
this
.
ladderPriceList
[
_index
].
PersionNum
)
+
1
;
}
this
.
ladderPriceList
.
push
(
obj
);
},
//删除阶梯定价
delStepPrice
(
index
)
{
this
.
ladderPriceList
.
splice
(
index
,
1
);
},
//添加学习时间
addPlan
()
{
var
planObj
=
{
DateList
:
[],
TimeList
:
[{
StartTime
:
""
,
EndTime
:
""
,
TimeHour
:
''
}],
}
this
.
DefaultPlanTimeList
.
push
(
planObj
);
},
//删除学习时间
deletePlan
(
index
)
{
this
.
$q
.
dialog
({
title
:
'提示信息'
,
message
:
"是否要删除"
,
cancel
:
true
,
persistent
:
true
,
ok
:
"确定"
,
cancel
:
"取消"
,
}).
onOk
(()
=>
{
this
.
DefaultPlanTimeList
.
splice
(
index
,
1
);
}).
onCancel
(()
=>
{
});
},
//添加学习时段
addPlanTime
(
item
)
{
var
obj
=
{
StartTime
:
""
,
EndTime
:
""
,
TimeHour
:
''
}
item
.
TimeList
.
push
(
obj
);
},
//删除学习时段
deletePlanTime
(
item
,
index
)
{
this
.
$q
.
dialog
({
title
:
'提示信息'
,
message
:
"是否要删除此学习时间段"
,
cancel
:
true
,
persistent
:
true
,
ok
:
"确定"
,
cancel
:
"取消"
,
}).
onOk
(()
=>
{
item
.
TimeList
.
splice
(
index
,
1
);
}).
onCancel
(()
=>
{
});
},
//获取班级类型下拉
GetClassTypeList
()
{
GetClassTypeList
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
classTypeList
=
res
.
Data
;
}
})
}
},
}
</
script
>
\ No newline at end of file
src/pages/teacher/assessmentType.vue
0 → 100644
View file @
c83dac3a
<
style
>
</
style
>
<
template
>
<div
class=
"page-body"
>
<div
class=
"page-search row items-center"
>
</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=
"dataList"
:columns=
"columns"
row-key=
"name"
>
<template
v-slot:top
>
<div
class=
"col-2 q-table__title"
>
类型配置
</div>
<q-space
/>
<div
class=
"page-option"
>
<q-btn
color=
"accent"
size=
"sm"
class=
"q-mr-md"
icon=
"add"
label=
"新增"
@
click=
"AddMsg(null)"
/>
</div>
</
template
>
<
template
v-slot:body=
"props"
>
<q-tr
:props=
"props"
>
<template
v-for=
"(col,cIndex) in props.cols"
>
<q-td
v-if=
"col.name == 'TypeName'"
:key=
"cIndex"
>
{{
col
.
value
}}
</q-td>
<q-td
v-else-if=
"col.name == 'SubtypeList'"
:key=
"cIndex"
>
<div
v-for=
"(item,sIndex) in col.value"
:key=
"sIndex"
>
<div
class=
"border-bottom"
>
{{
item
.
SubTypeName
}}
</div>
</div>
</q-td>
<q-td
v-else-if=
"col.name == 'Id'"
:key=
"cIndex"
>
<q-btn
flat
size=
"xs"
icon=
"edit"
color=
"accent"
style=
"font-weight:400"
label=
"编辑"
@
click=
"AddMsg(props.row)"
/>
<q-btn
flat
size=
"xs"
icon=
"delete"
color=
"negative"
class=
"q-mr-xs"
label=
"删除"
@
click=
"delConsult(props.row.Id)"
/>
</q-td>
</
template
>
</q-tr>
</template>
<
template
v-slot:bottom
></
template
>
</q-table>
</div>
</div>
</template>
<
script
>
import
{
queryAssessmentTypeList
,
}
from
'../../api/teacher/index'
;
export
default
{
meta
:
{
title
:
"教师考评配置"
},
components
:
{
},
data
()
{
return
{
loading
:
false
,
msg
:
{
rowsPerPage
:
1000
,
},
columns
:
[{
name
:
"TypeName"
,
label
:
"类别"
,
field
:
"TypeName"
,
align
:
"left"
},
{
name
:
"SubtypeList"
,
label
:
"内容"
,
field
:
"SubtypeList"
,
align
:
"left"
},
{
name
:
'Id'
,
label
:
'操作'
,
field
:
row
=>
row
.
Id
}
],
dataList
:
[],
}
},
created
()
{
},
mounted
()
{
this
.
getAssessmentTypeList
()
},
methods
:
{
getAssessmentTypeList
()
{
this
.
loading
=
true
;
queryAssessmentTypeList
(
this
.
msg
).
then
(
res
=>
{
this
.
loading
=
false
;
console
.
log
(
"res"
,
res
);
if
(
res
.
Code
==
1
)
{
this
.
dataList
=
res
.
Data
;
}
})
}
}
}
</
script
>
<
style
lang=
"sass"
>
@import
url('~assets/css/table.sass')
</
style
>
\ No newline at end of file
src/router/routes.js
View file @
c83dac3a
...
...
@@ -1431,6 +1431,11 @@ const routes = [{
component
:
()
=>
import
(
"pages/teacher/yearStatic"
)
},
{
path
:
"/teacher/assessmentType"
,
//教师季度考评配置
component
:
()
=>
import
(
"pages/teacher/assessmentType"
)
},
{
path
:
"/exam/examPaper"
,
//试卷管理
component
:
()
=>
...
...
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