Commit 196ac3db authored by Mac's avatar Mac

增加班号

parent 9c30a446
......@@ -36,8 +36,8 @@
</template>
<template v-slot:body-cell-ClassName="props">
<q-td :props="props" class="text-negative">
<q-select dense standout behavior="menu" filled v-model="props.row.ClassId" ref="class"
:options="classList" option-label="ClassName" option-value="ClassId" emit-value map-options
<q-select dense standout behavior="menu" filled v-model="props.row.ClassId" ref="class" use-input
:options="classList" option-label="allName" option-value="ClassId" emit-value map-options @filter="classfilter"
:rules="[val => !!val || '请选择班级']" @input ='filterCourseFn($event,props.rowIndex)'/>
</q-td>
</template>
......@@ -376,6 +376,7 @@ import {
courseList: [], //课程列表
schoolList:[],
classList:[],
allclassList:[],
dataList_class:[
{
SchoolName:"",
......@@ -528,14 +529,30 @@ import {
if (!tempArray) {
tempArray = [];
}
tempArray.forEach(x=>{
x.allName = x.ClassName+'('+x.ClassNo+')'
})
tempArray.unshift({
ClassId: 0,
ClassName: "不限"
})
ClassName: "不限",
allName:'不限'
})
this.classList = tempArray;
this.allclassList = JSON.parse(JSON.stringify(tempArray))
}
})
},
classfilter(val, update) {//课程的栓选
update(() => {
if (val === '') {
this.classList = this.allclassList
}
else {
const needle = val.toLowerCase();
this.classList = this.allclassList.filter(v => v.allName.toLowerCase().indexOf(needle) > -1);
}
})
},
filterSchoolFn(val,index) {
let school=this.schoolList.filter(item=>{
return item.SId==val
......@@ -634,6 +651,7 @@ import {
delhaocai(index){
this.dataList.splice(index, 1);
},
//翻页
changePage(val) {
this.haochaimsg.pageIndex = val;
......
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