Commit cb1d3119 authored by zhengke's avatar zhengke

增加筛选

parent cab6ec1d
...@@ -16,16 +16,23 @@ ...@@ -16,16 +16,23 @@
<template> <template>
<div class="page-body"> <div class="page-body">
<div class="col row wrap q-mb-lg" style="justify-content:space-between;"> <div class="col row wrap q-mb-lg" style="justify-content:space-between;">
<div class="col-3 Sysuser_Date q-mr-lg"> <div class="col row wrap">
<div class="col-2 Sysuser_Date q-mr-lg">
<q-field filled dense> <q-field filled dense>
<template v-slot:control> <template v-slot:control>
<el-date-picker v-model="myDate" style="width:100%" value-format="yyyy-MM" @change="getCheckDate()" <el-date-picker v-model="myDate" style="width:100%" value-format="yyyy-MM" @change="getCheckDate()"
size="small" type="month" placeholder="选择年月"> size="mini" type="month" placeholder="选择年月">
</el-date-picker> </el-date-picker>
</template> </template>
</q-field> </q-field>
</div> </div>
<div> <div class="col-2" style="display:none;">
<q-select filled dense stack-label @input="getList" option-value="TId" @filter="filterTeacherFn" use-input option-label="TeacherName" v-model="msg.TeacherId"
ref="Teacher_Id" :options="TeacherList" label="教师团队" class="col-6 q-pr-lg q-pb-lg" emit-value
map-options />
</div>
</div>
<div style="float:right;">
<q-btn color="accent" class="q-mr-md" size="sm" icon="download" style="margin-top:15px;" <q-btn color="accent" class="q-mr-md" size="sm" icon="download" style="margin-top:15px;"
@click="downloadStudentStatic" label="下载" /> @click="downloadStudentStatic" label="下载" />
</div> </div>
...@@ -108,6 +115,9 @@ ...@@ -108,6 +115,9 @@
import { import {
GetTeacherDay GetTeacherDay
} from '../../api/teacher/index'; } from '../../api/teacher/index';
import {
getTeacherDropDownList
} from "../../api/school/index";
import { import {
EduDownLoad EduDownLoad
} from "../../api/common/common"; } from "../../api/common/common";
...@@ -266,8 +276,12 @@ ...@@ -266,8 +276,12 @@
msg: { msg: {
YearStr: '', YearStr: '',
MonthStr: '', MonthStr: '',
TeacherId:'',
rowsPerPage: 0 rowsPerPage: 0
}, },
teacher:0,
AllTeacherList:[],
TeacherList:[] //教师数据
} }
}, },
created() { created() {
...@@ -280,9 +294,27 @@ ...@@ -280,9 +294,27 @@
this.msg.YearStr = d.getFullYear().toString(); this.msg.YearStr = d.getFullYear().toString();
this.msg.MonthStr = (d.getMonth() + 1).toString(); this.msg.MonthStr = (d.getMonth() + 1).toString();
this.myDate = this.msg.YearStr + '-' + this.msg.MonthStr this.myDate = this.msg.YearStr + '-' + this.msg.MonthStr
this.GetTeacherList();
this.getList(); this.getList();
}, },
methods: { methods: {
//获取教师下拉
GetTeacherList() {
getTeacherDropDownList({}).then(res => {
if (res.Code == 1) {
this.TeacherList = res.Data;
this.AllTeacherList = res.Data;
}
});
},
//课程教师
filterTeacherFn(val, update, abort) {
update(() => {
this.TeacherList = this.AllTeacherList.filter(
v => v.TeacherName.indexOf(val) > -1
);
});
},
//下载数据 //下载数据
downloadStudentStatic() { downloadStudentStatic() {
this.loading = true; this.loading = true;
......
...@@ -7,15 +7,22 @@ ...@@ -7,15 +7,22 @@
<template> <template>
<div> <div>
<div class="col row wrap q-mb-lg" style="justify-content:space-between;"> <div class="col row wrap q-mb-lg" style="justify-content:space-between;">
<div class="col-3 Sysuser_Date q-mr-lg"> <div class="col row wrap">
<div class="col-2 Sysuser_Date q-mr-lg">
<q-field filled dense> <q-field filled dense>
<template v-slot:control> <template v-slot:control>
<el-date-picker v-model="msg.YearStr" @change="getList" style="width:100%" value-format="yyyy" size="small" <el-date-picker v-model="msg.YearStr" @change="getList" style="width:100%" value-format="yyyy" size="mini"
type="year" placeholder="选择年"> type="year" placeholder="选择年">
</el-date-picker> </el-date-picker>
</template> </template>
</q-field> </q-field>
</div> </div>
<div class="col-2" style="display:none;">
<q-select filled dense stack-label @input="getList" option-value="TId" @filter="filterTeacherFn" use-input option-label="TeacherName" v-model="msg.TeacherId"
ref="Teacher_Id" :options="TeacherList" label="教师团队" class="col-6 q-pr-lg q-pb-lg" emit-value
map-options />
</div>
</div>
<div> <div>
<q-btn color="accent" class="q-mr-md" size="sm" icon="download" style="margin-top:15px;" <q-btn color="accent" class="q-mr-md" size="sm" icon="download" style="margin-top:15px;"
@click="downloadStudentStaticMonth" label="下载" /> @click="downloadStudentStaticMonth" label="下载" />
...@@ -102,6 +109,10 @@ ...@@ -102,6 +109,10 @@
import { import {
EduDownLoad EduDownLoad
} from "../../api/common/common"; } from "../../api/common/common";
import {
getTeacherDropDownList
} from "../../api/school/index";
export default { export default {
props: {}, props: {},
meta: { meta: {
...@@ -255,8 +266,11 @@ ...@@ -255,8 +266,11 @@
tableHeight: 500, tableHeight: 500,
msg: { msg: {
YearStr: '', YearStr: '',
TeacherId:'',
rowsPerPage: 0 rowsPerPage: 0
}, },
TeacherList:[],
AllTeacherList:[]
} }
}, },
created() { created() {
...@@ -267,9 +281,27 @@ ...@@ -267,9 +281,27 @@
mounted() { mounted() {
let d = new Date(); let d = new Date();
this.msg.YearStr = d.getFullYear().toString(); this.msg.YearStr = d.getFullYear().toString();
this.GetTeacherList();
this.getList(); this.getList();
}, },
methods: { methods: {
//获取教师下拉
GetTeacherList() {
getTeacherDropDownList({}).then(res => {
if (res.Code == 1) {
this.TeacherList = res.Data;
this.AllTeacherList = res.Data;
}
});
},
//课程教师
filterTeacherFn(val, update, abort) {
update(() => {
this.TeacherList = this.AllTeacherList.filter(
v => v.TeacherName.indexOf(val) > -1
);
});
},
downloadStudentStaticMonth() { downloadStudentStaticMonth() {
this.loading = true; this.loading = true;
var msg = JSON.parse(JSON.stringify(this.msg)); var msg = JSON.parse(JSON.stringify(this.msg));
......
...@@ -11,15 +11,22 @@ ...@@ -11,15 +11,22 @@
<template> <template>
<div> <div>
<div class="col row wrap q-mb-lg" style="justify-content:space-between;"> <div class="col row wrap q-mb-lg" style="justify-content:space-between;">
<div class="col-3 Sysuser_Date q-mr-lg"> <div class="col row wrap">
<div class="col-2 Sysuser_Date q-mr-lg">
<q-field filled dense> <q-field filled dense>
<template v-slot:control> <template v-slot:control>
<el-date-picker v-model="msg.YearStr" @change="getList" style="width:100%" value-format="yyyy" size="small" <el-date-picker v-model="msg.YearStr" @change="getList" style="width:100%" value-format="yyyy" size="mini"
type="year" placeholder="选择年"> type="year" placeholder="选择年">
</el-date-picker> </el-date-picker>
</template> </template>
</q-field> </q-field>
</div> </div>
<div class="col-2" style="display:none;">
<q-select filled dense stack-label @input="getList" option-value="TId" @filter="filterTeacherFn" use-input option-label="TeacherName" v-model="msg.TeacherId"
ref="Teacher_Id" :options="TeacherList" label="教师团队" class="col-6 q-pr-lg q-pb-lg" emit-value
map-options />
</div>
</div>
<div> <div>
<q-btn color="accent" class="q-mr-md" size="sm" icon="download" style="margin-top:15px;" label="下载" <q-btn color="accent" class="q-mr-md" size="sm" icon="download" style="margin-top:15px;" label="下载"
@click="downloadStudentStaticMonthRate" /> @click="downloadStudentStaticMonthRate" />
...@@ -107,6 +114,9 @@ ...@@ -107,6 +114,9 @@
import { import {
EduDownLoad EduDownLoad
} from "../../api/common/common"; } from "../../api/common/common";
import {
getTeacherDropDownList
} from "../../api/school/index";
export default { export default {
props: {}, props: {},
meta: { meta: {
...@@ -121,6 +131,7 @@ ...@@ -121,6 +131,7 @@
tableHeight: 500, tableHeight: 500,
msg: { msg: {
YearStr: '', YearStr: '',
TeacherId:'',
rowsPerPage: 0 rowsPerPage: 0
}, },
columns: [{ columns: [{
...@@ -208,6 +219,8 @@ ...@@ -208,6 +219,8 @@
align: 'left' align: 'left'
} }
], ],
TeacherList:[],
AllTeacherList:[]
} }
}, },
created() { created() {
...@@ -218,9 +231,28 @@ ...@@ -218,9 +231,28 @@
mounted() { mounted() {
let d = new Date(); let d = new Date();
this.msg.YearStr = d.getFullYear().toString(); this.msg.YearStr = d.getFullYear().toString();
this.GetTeacherList();
this.getList(); this.getList();
}, },
methods: { methods: {
//获取教师下拉
GetTeacherList() {
getTeacherDropDownList({}).then(res => {
if (res.Code == 1) {
this.TeacherList = res.Data;
this.AllTeacherList = res.Data;
}
});
},
//课程教师
filterTeacherFn(val, update, abort) {
update(() => {
this.TeacherList = this.AllTeacherList.filter(
v => v.TeacherName.indexOf(val) > -1
);
});
},
//下载文件 //下载文件
downloadStudentStaticMonthRate() { downloadStudentStaticMonthRate() {
this.loading = true; this.loading = true;
......
...@@ -4,16 +4,23 @@ ...@@ -4,16 +4,23 @@
<q-tab :ripple="false" :name="1" label="年份统计" /> <q-tab :ripple="false" :name="1" label="年份统计" />
<q-tab :ripple="false" :name="2" label="成长率" /> <q-tab :ripple="false" :name="2" label="成长率" />
</q-tabs> </q-tabs>
<div class="col row wrap q-mb-lg"> <div class="col row wrap q-mb-lg" style="justify-content:space-between;">
<div class="col-3 Sysuser_Date q-mr-lg" style="display:none;"> <div class="col row wrap" style="display:none;">
<div class="col-2 Sysuser_Date q-mr-lg">
<q-field filled dense> <q-field filled dense>
<template v-slot:control> <template v-slot:control>
<el-date-picker v-model="msg.YearStr" @change="getList" style="width:100%" value-format="yyyy" size="small" <el-date-picker v-model="msg.YearStr" @change="getList" style="width:100%" value-format="yyyy" size="mini"
type="year" placeholder="选择年"> type="year" placeholder="选择年">
</el-date-picker> </el-date-picker>
</template> </template>
</q-field> </q-field>
</div> </div>
<div class="col-2">
<q-select filled dense stack-label @input="getList" option-value="TId" @filter="filterTeacherFn" use-input option-label="TeacherName" v-model="msg.TeacherId"
ref="Teacher_Id" :options="TeacherList" label="教师团队" class="col-6 q-pr-lg q-pb-lg" emit-value
map-options />
</div>
</div>
<div> <div>
<q-btn color="accent" class="q-mr-md" size="sm" icon="download" style="margin-top:15px;" label="下载" <q-btn color="accent" class="q-mr-md" size="sm" icon="download" style="margin-top:15px;" label="下载"
@click="downloadStudentStaticYear" /> @click="downloadStudentStaticYear" />
...@@ -31,6 +38,9 @@ ...@@ -31,6 +38,9 @@
GetTeacherStaticYear, GetTeacherStaticYear,
GetTeacherStaticYearRate GetTeacherStaticYearRate
} from '../../api/teacher/index'; } from '../../api/teacher/index';
import {
getTeacherDropDownList
} from "../../api/school/index";
export default { export default {
props: {}, props: {},
...@@ -46,8 +56,11 @@ ...@@ -46,8 +56,11 @@
dataList: [], dataList: [],
msg: { msg: {
YearStr: '', YearStr: '',
TeacherId:'',
rowsPerPage: 0 rowsPerPage: 0
} },
TeacherList:[],
AllTeacherList:[]
} }
}, },
created() { created() {
...@@ -56,9 +69,27 @@ ...@@ -56,9 +69,27 @@
mounted() { mounted() {
let d = new Date(); let d = new Date();
this.msg.YearStr = d.getFullYear().toString(); this.msg.YearStr = d.getFullYear().toString();
this.GetTeacherList();
this.getList(); this.getList();
}, },
methods: { methods: {
//获取教师下拉
GetTeacherList() {
getTeacherDropDownList({}).then(res => {
if (res.Code == 1) {
this.TeacherList = res.Data;
this.AllTeacherList = res.Data;
}
});
},
//课程教师
filterTeacherFn(val, update, abort) {
update(() => {
this.TeacherList = this.AllTeacherList.filter(
v => v.TeacherName.indexOf(val) > -1
);
});
},
//下载文件 //下载文件
downloadStudentStaticYear() { downloadStudentStaticYear() {
this.loading = true; this.loading = true;
......
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