Commit 7d525ae8 authored by 黄奎's avatar 黄奎

页面修改

parent 9f6265b4
......@@ -232,6 +232,17 @@ export function saveClass(data) {
})
}
/**
* 批量添加上课计划
* @param {JSON数据} data
*/
export function batchSaveClassPlan(data) {
return request({
url: '/Class/BatchSetClassPlan',
method: 'post',
data
})
}
/**
......
......@@ -66,11 +66,12 @@
font-size: 12px;
margin-bottom: 20px;
}
.planTimeLi2 tbody::before{
.planTimeLi2 tbody::before {
content: '';
display: table-row;
height: 20px;
}
}
</style>
<template>
......@@ -350,15 +351,15 @@
</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="对内备注" />
<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="立即提交" color="accent q-px-md" style="font-weight:400 !important" :loading="saveCourseLoading"
<q-btn :label="BtnStr" color="accent q-px-md" style="font-weight:400 !important" :loading="saveCourseLoading"
@click="saveCourse" />
</q-card-actions>
</q-card>
......@@ -376,6 +377,7 @@
getTeacherDropDownList,
getSchoolDropdown,
saveClass,
batchSaveClassPlan,
getClassInfo,
queryClassRoomList
} from '../../api/school/index'
......@@ -489,6 +491,7 @@
checkedDays: [],
//默认上课时间数组
DefaultPlanTimeList: [],
BtnStr: "立即提交",
}
},
created() {
......@@ -598,7 +601,7 @@
saveCourse() {
this.$refs.ClassName.validate();
this.$refs.ClassPersion.validate();
if (!this.$refs.ClassName.hasError && !this.$refs.ClassPersion.hasError) {
if (this.objOption.IsOpenCommission == 1) {
if (this.objOption.CommissionValue == '') {
......@@ -610,6 +613,7 @@
return;
}
}
this.BtnStr = "正在保存班级信息";
this.objOption.ClassStepPriceList = this.ladderPriceList;
//选中的日期或星期
this.objOption.WeekDayList = this.checkedDays;
......@@ -617,16 +621,41 @@
this.objOption.DefaultPlanTimeList = this.DefaultPlanTimeList;
this.saveCourseLoading = true;
saveClass(this.objOption).then(res => {
this.saveCourseLoading = false
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '数据保存成功!',
position: 'top'
})
this.$emit("success")
this.closeSaveForm()
if (res.Code == 1) {
//有上课计划
if (res.Data && res.Data.ClassPlanList && res.Data.ClassPlanList.length > 0) {
this.BtnStr = "正在检查排班是否存在冲突";
var newMsg = {
ClassId: res.Data.ClassId,
PlanList: res.Data.ClassPlanList,
}
batchSaveClassPlan(newMsg).then(res => {
this.saveCourseLoading = false
if (res.Code == 1) {
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '数据保存成功!',
position: 'top'
})
this.$emit("success")
this.closeCourseForm()
}
})
} else {
this.saveCourseLoading = false
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '数据保存成功!',
position: 'top'
})
this.$emit("success")
this.closeCourseForm()
}
}
}).catch(() => {
this.saveCourseLoading = false
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment