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

页面修改

parent 9f6265b4
...@@ -232,6 +232,17 @@ export function saveClass(data) { ...@@ -232,6 +232,17 @@ export function saveClass(data) {
}) })
} }
/**
* 批量添加上课计划
* @param {JSON数据} data
*/
export function batchSaveClassPlan(data) {
return request({
url: '/Class/BatchSetClassPlan',
method: 'post',
data
})
}
/** /**
......
...@@ -66,7 +66,8 @@ ...@@ -66,7 +66,8 @@
font-size: 12px; font-size: 12px;
margin-bottom: 20px; margin-bottom: 20px;
} }
.planTimeLi2 tbody::before{
.planTimeLi2 tbody::before {
content: ''; content: '';
display: table-row; display: table-row;
height: 20px; height: 20px;
...@@ -350,15 +351,15 @@ ...@@ -350,15 +351,15 @@
</div> </div>
<div class="row wrap"> <div class="row wrap">
<div class="col-12"> <div class="col-12">
<q-input filled type="textarea" :rows="3" stack-label maxlength="2000" v-model="objOption.InnerRemark" :dense="false" <q-input filled type="textarea" :rows="3" stack-label maxlength="2000" v-model="objOption.InnerRemark"
class="col-12 q-pr-lg q-pb-lg" label="对内备注" /> :dense="false" class="col-12 q-pr-lg q-pb-lg" label="对内备注" />
</div> </div>
</div> </div>
</q-card-section> </q-card-section>
<q-separator /> <q-separator />
<q-card-actions align="right" class="bg-white"> <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="取消" 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" /> @click="saveCourse" />
</q-card-actions> </q-card-actions>
</q-card> </q-card>
...@@ -376,6 +377,7 @@ ...@@ -376,6 +377,7 @@
getTeacherDropDownList, getTeacherDropDownList,
getSchoolDropdown, getSchoolDropdown,
saveClass, saveClass,
batchSaveClassPlan,
getClassInfo, getClassInfo,
queryClassRoomList queryClassRoomList
} from '../../api/school/index' } from '../../api/school/index'
...@@ -489,6 +491,7 @@ ...@@ -489,6 +491,7 @@
checkedDays: [], checkedDays: [],
//默认上课时间数组 //默认上课时间数组
DefaultPlanTimeList: [], DefaultPlanTimeList: [],
BtnStr: "立即提交",
} }
}, },
created() { created() {
...@@ -610,6 +613,7 @@ ...@@ -610,6 +613,7 @@
return; return;
} }
} }
this.BtnStr = "正在保存班级信息";
this.objOption.ClassStepPriceList = this.ladderPriceList; this.objOption.ClassStepPriceList = this.ladderPriceList;
//选中的日期或星期 //选中的日期或星期
this.objOption.WeekDayList = this.checkedDays; this.objOption.WeekDayList = this.checkedDays;
...@@ -617,7 +621,17 @@ ...@@ -617,7 +621,17 @@
this.objOption.DefaultPlanTimeList = this.DefaultPlanTimeList; this.objOption.DefaultPlanTimeList = this.DefaultPlanTimeList;
this.saveCourseLoading = true; this.saveCourseLoading = true;
saveClass(this.objOption).then(res => { saveClass(this.objOption).then(res => {
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 this.saveCourseLoading = false
if (res.Code == 1) {
this.$q.notify({ this.$q.notify({
icon: 'iconfont icon-chenggong', icon: 'iconfont icon-chenggong',
color: 'accent', color: 'accent',
...@@ -626,7 +640,22 @@ ...@@ -626,7 +640,22 @@
position: 'top' position: 'top'
}) })
this.$emit("success") this.$emit("success")
this.closeSaveForm() 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(() => { }).catch(() => {
this.saveCourseLoading = false 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