Commit cb1d3119 authored by zhengke's avatar zhengke

增加筛选

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