Commit ff200dc1 authored by Mac's avatar Mac

11

parent 71ee71a6
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
option-label="TeacherName" v-model="msg.TeacherId" ref="TId" :options="TeacherList" label="老师" option-label="TeacherName" v-model="msg.TeacherId" ref="TId" :options="TeacherList" label="老师"
:dense="false" emit-value map-options /> :dense="false" emit-value map-options />
</div> </div>
<div class="col-3"> <!-- <div class="col-3">
<q-select filled stack-label use-input input-debounce="0" option-value="ClassId" clearable @input="getList" <q-select filled stack-label use-input input-debounce="0" option-value="ClassId" clearable @input="getList"
option-label="ClassName" v-model="msg.ClassId" :options="ClassList" label="班级" :dense="false" emit-value option-label="ClassName" v-model="msg.ClassId" :options="ClassList" label="班级" :dense="false" emit-value
map-options @filter="filterFn"> map-options @filter="filterFn">
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
</q-item> </q-item>
</template> </template>
</q-select> </q-select>
</div> </div> -->
<div class="col-3"> <div class="col-3">
<q-select filled stack-label @input="handleCurrentChanges(1)" option-value="Id" option-label="Name" v-model="datetype" ref="Id" <q-select filled stack-label @input="handleCurrentChanges(1)" option-value="Id" option-label="Name" v-model="datetype" ref="Id"
...@@ -122,7 +122,11 @@ ...@@ -122,7 +122,11 @@
<el-table-column prop="TimeBucket" label="上课时间段"> </el-table-column> <el-table-column prop="TimeBucket" label="上课时间段"> </el-table-column>
<el-table-column prop="TeacherName" label="老师名称"></el-table-column> <el-table-column prop="TeacherName" label="老师名称"></el-table-column>
<el-table-column prop="ClassNo" label="班号"></el-table-column> <el-table-column prop="ClassNo" label="班号"></el-table-column>
<el-table-column prop="ClassName" label="上课班级" width='200'> </el-table-column> <el-table-column prop="ClassName" label="上课班级" width='200' :filters='ClassNameList' :filter-method="filterHandler">
<template slot="header">
<span>上课班级 <span style="font-size: 10px;color: #409EFF;">(筛选)</span> </span>
</template>
</el-table-column>
<el-table-column prop="CourseName" label="课程" width='230'></el-table-column> <el-table-column prop="CourseName" label="课程" width='230'></el-table-column>
<el-table-column prop="UnitPrice" label="课时单价"></el-table-column> <el-table-column prop="UnitPrice" label="课时单价"></el-table-column>
<el-table-column prop="KSNum" label="上课课时"></el-table-column> <el-table-column prop="KSNum" label="上课课时"></el-table-column>
...@@ -133,7 +137,9 @@ ...@@ -133,7 +137,9 @@
</el-table> </el-table>
<div style="margin-top: 10px;text-align: center;"> <div style="margin-top: 10px;text-align: center;">
<el-pagination background @current-change="handleCurrentChanges" <el-pagination background @current-change="handleCurrentChanges"
layout="total,prev, pager, next, jumper" :current-page.sync="msg.pageIndex" @size-change="handleSizeChange"
layout="total,sizes,prev, pager, next, jumper" :current-page.sync="msg.pageIndex"
:page-sizes="[15, 1000, 10000]"
:page-size="msg.pageSize" :total='total'> :page-size="msg.pageSize" :total='total'>
</el-pagination> </el-pagination>
</div> </div>
...@@ -190,6 +196,7 @@ ...@@ -190,6 +196,7 @@
], ],
ClassList: [], ClassList: [],
allClassList: [], allClassList: [],
ClassNameList:[],
} }
}, },
created() { created() {
...@@ -232,10 +239,28 @@ ...@@ -232,10 +239,28 @@
if (res.Code == 1) { if (res.Code == 1) {
this.loading = false; this.loading = false;
this.tableData = res.Data.PageData this.tableData = res.Data.PageData
this.ClassNameList=[],
this.tableData.forEach(x => {
let obj = {
text: x.ClassName,
value: x.ClassName
}
this.ClassNameList.push(obj)
})
this.ClassNameList = this.unique(this.ClassNameList)
this.total = res.Data.Count this.total = res.Data.Count
} }
}) })
}, },
unique(arr, Name) { //数组根据字段去重
const res = new Map();
return arr.filter(
(list) => !res.has(list.text) && res.set(list.text, 1)
);
},
setClass(item) {//班级 setClass(item) {//班级
this.isShowClass = true; this.isShowClass = true;
getClassDropDownList({ getClassDropDownList({
...@@ -301,6 +326,11 @@ ...@@ -301,6 +326,11 @@
this.msg.pageIndex = val; this.msg.pageIndex = val;
this.getList() this.getList()
}, },
handleSizeChange(val){
this.msg.pageIndex = 1;
this.msg.pageSize = val;
this.getList()
},
txexport(){ txexport(){
let text = ''; let text = '';
...@@ -354,7 +384,11 @@ ...@@ -354,7 +384,11 @@
var diff = m2 - m1; var diff = m2 - m1;
return diff; return diff;
} },
filterHandler(value, row, column) {
const property = column['property'];
return row[property] === value;
},
}, },
......
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