Commit 196ac3db authored by Mac's avatar Mac

增加班号

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