Commit 7275a305 authored by zhengke's avatar zhengke

修改

parent 324da8b8
......@@ -19,7 +19,7 @@
<div class="row wrap">
<div class="col-6 q-pb-lg">
<q-uploader :style="{backgroundImage:'url(' + objOption.CoverImg + ')'}" flat hide-upload-btn max-files="1"
label="课程封面" accept=".jpg, image/*" :factory="uploadFile" auto-upload>
label="课程封面" accept=".jpg, image/*" :factory="uploadFile" auto-upload>
</q-uploader>
</div>
<div class="col-6 q-pr-lg q-pb-lg">
......@@ -179,11 +179,6 @@
getTeacherDropDownList({}).then(res => {
if (res.Code == 1) {
this.TeacherList = res.Data;
var obj = {
TeacherName: '请选择',
TId: 0
}
this.TeacherList.unshift(obj);
}
})
},
......@@ -297,42 +292,45 @@
},
//保存菜单
saveCourse() {
this.saveCourseLoading = true;
var Teacher_Ids = "";
if (this.chooseTeacher && this.chooseTeacher.length > 0) {
this.chooseTeacher.forEach(item => {
Teacher_Ids += "," + item;
this.$refs.CourseName.validate();
if (!this.$refs.CourseName.hasError) {
this.saveCourseLoading = true;
var Teacher_Ids = "";
if (this.chooseTeacher && this.chooseTeacher.length > 0) {
this.chooseTeacher.forEach(item => {
Teacher_Ids += "," + item;
})
}
if (Teacher_Ids != '') {
Teacher_Ids = Teacher_Ids.substring(1);
}
var salePlat = "";
if (this.choosePlat && this.choosePlat.length > 0) {
this.choosePlat.forEach(item => {
salePlat += "," + item;
});
}
if (salePlat != '') {
salePlat = salePlat.substring(1);
}
this.objOption.StepPriceList = this.ladderPriceList;
this.objOption.Teacher_Ids = Teacher_Ids;
this.objOption.Saleplat = salePlat;
saveCourseInfo(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()
}).catch(() => {
this.saveCourseLoading = false
})
}
if (Teacher_Ids != '') {
Teacher_Ids = Teacher_Ids.substring(1);
}
var salePlat = "";
if (this.choosePlat && this.choosePlat.length > 0) {
this.choosePlat.forEach(item => {
salePlat += "," + item;
});
}
if (salePlat != '') {
salePlat = salePlat.substring(1);
}
this.objOption.StepPriceList = this.ladderPriceList;
this.objOption.Teacher_Ids = Teacher_Ids;
this.objOption.Saleplat = salePlat;
saveCourseInfo(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()
}).catch(() => {
this.saveCourseLoading = false
})
}
},
}
......
......@@ -5,8 +5,8 @@
<div class="text-h6">{{(questionBankObj&&questionBankObj.BankId>0)?"修改题库":"创建题库"}}</div>
</q-card-section>
<q-card-section class="q-pt-none scroll" style="max-height: 70vh">
<q-input filled stack-label :dense="false" class="col-6 q-pb-lg" v-model="msg.BankName" label="请输入题库名称"
maxlength="20" />
<q-input filled stack-label :dense="false" class="col-6 q-pb-lg" ref="BankName" v-model="msg.BankName" label="请输入题库名称"
maxlength="20" :rules="[val => !!val || '请输入题库名称']" />
</q-card-section>
<q-card-actions align="right" class="bg-white">
<q-btn label="取消" flat color="grey-10" style="font-weight:400 !important" @click="closeQuestionForm" />
......@@ -63,12 +63,15 @@
},
//创建
saveQuestion() {
SetQuestionBank(this.msg).then(res => {
if (res.Code==1) {
this.$emit('success');
this.closeQuestionForm();
}
});
this.$refs.BankName.validate()
if(!this.$refs.BankName.hasError){
SetQuestionBank(this.msg).then(res => {
if (res.Code==1) {
this.$emit('success');
this.closeQuestionForm();
}
});
}
},
//取消
closeQuestionForm() {
......
......@@ -2,18 +2,18 @@
<q-dialog v-model="persistent" content-class="bg-grey-1" persistent transition-show="scale" transition-hide="scale">
<q-card style="width: 500px;max-width:600px;">
<q-card-section>
<div class="text-h6">{{objOption.TId==0?'新增教室信息':'修改教室信息'}}</div>
<div class="text-h6">{{objOption.RoomId==0?'新增教室信息':'修改教室信息'}}</div>
</q-card-section>
<q-card-section class="q-pt-none scroll" style="max-height: 70vh">
<div class="text-caption q-mb-lg q-px-md text-grey-6">教室信息</div>
<div class="row wrap">
<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-12 q-pb-lg q-pr-lg" emit-value
ref="School_Id" :options="schoolList" label="所属校区" :dense="false" class="col-12 q-pb-lg" emit-value
map-options :rules="[val => !!val || '请选择所属校区']" />
</div>
<div class="row wrap">
<q-input filled stack-label maxlength="20" :dense="false" v-model="objOption.RoomName" ref="RoomName"
class="col-12 q-pr-lg" label="教室名称" :rules="[val => !!val || '请填写教室名称']" />
class="col-12" label="教室名称" :rules="[val => !!val || '请填写教室名称']" />
</div>
</q-card-section>
<q-separator />
......
......@@ -23,9 +23,9 @@
ref="Post_Id" :options="PostList" label="岗位" :dense="false" class="col-6 q-pr-lg q-pb-lg" emit-value
map-options />
<q-input filled stack-label maxlength="5" :dense="false" v-model="objOption.BaseStuNum" ref="BaseStuNum"
class="col-6 q-pr-lg q-pb-lg" label="带班基础人数" @keyup.native="checkInteger(objOption,'BaseStuNum')" />
class="col-6 q-pb-lg" label="带班基础人数" @keyup.native="checkInteger(objOption,'BaseStuNum')" />
<q-input filled stack-label maxlength="5" :dense="false" v-model="objOption.BaseHourFee" ref="BaseHourFee"
class="col-6 q-pb-lg" label="基础课时费" @keyup.native="checkPrice(objOption,'BaseHourFee')" />
class="col-6 q-pr-lg q-pb-lg" label="基础课时费" @keyup.native="checkPrice(objOption,'BaseHourFee')" />
</div>
<div class="row wrap">
<div class="col-6 q-pr-lg q-pb-lg">
......
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