Commit f352d492 authored by 吴春's avatar 吴春

页面修改

parent 0e18f48c
......@@ -87,9 +87,9 @@
ref="ClassHours" class="col-6 q-pr-lg q-pb-lg" label="课时数量" :rules="[(val) => !!val || '请填写课时信息']" />
</div>
<div class="col-6">
<q-select filled stack-label @input="getCourseSubject(objOption.CateId)" option-value="CateId" option-label="CateName" v-model="objOption.CateId"
ref="CateId" :options="TreeCategoryList" label="所属系列" class="col-6 q-pr-lg q-pb-lg" emit-value map-options
:rules="[(val) => !!val || '请选择课程所属系列']" />
<q-select filled stack-label @input="getCourseSubject(objOption.CateId)" option-value="CateId"
option-label="CateName" v-model="objOption.CateId" ref="CateId" :options="TreeCategoryList" label="所属系列"
class="col-6 q-pr-lg q-pb-lg" emit-value map-options :rules="[(val) => !!val || '请选择课程所属系列']" />
</div>
</div>
<div class="row wrap">
......@@ -238,8 +238,8 @@
},
methods: {
//根据系列改变获取所属科目
getCourseSubject(Id){
if(Id>0){
getCourseSubject(Id) {
if (Id > 0) {
let val = this.TreeCategoryList.find(x => x.CateId == Id);
this.objOption.CourseSubject = val.CourseSubject;
}
......@@ -251,12 +251,10 @@
var tempData = res.Data;
if (tempData && tempData.length > 0) {
tempData.forEach(item => {
if ((item.Id >= 2 && item.Id <= 6) || item.Id == 8) {
this.courseLevelList.push({
Id: item.Id,
Name: item.Name.replace(/课程/g, '')
})
}
this.courseLevelList.push({
Id: item.Id,
Name: item.Name.replace(/课程/g, '')
})
})
}
}
......@@ -304,7 +302,7 @@
var qMsg = {};
queryCourseCategoryTree(qMsg).then((res) => {
this.TreeCategoryList = res.Data;
if(this.objOption.CateId>0){
if (this.objOption.CateId > 0) {
let val = this.TreeCategoryList.find(x => x.CourseSubject == this.objOption.CateId);
this.objOption.CourseSubject = val.CourseSubject;
}
......@@ -352,7 +350,7 @@
this.objOption.Saleplat = res.Data.Saleplat;
this.objOption.IsKCourse = res.Data.IsKCourse;
this.objOption.CourseRate = res.Data.CourseRate;
this.objOption.CourseSubject=res.Data.CourseSubject;
this.objOption.CourseSubject = res.Data.CourseSubject;
if (res.Data.StepPriceList && res.Data.StepPriceList.length > 0) {
this.ladderPriceList = res.Data.StepPriceList;
}
......
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