|
@@ -3,7 +3,14 @@
|
|
|
<list-frame :title="mainTitle" @query="search" :total="total" :needFilter="false" :needAdd="false">
|
|
|
<el-col :span="24" class="printingBtn">
|
|
|
<!-- <el-button type="primary" size="mini" @click="toPrint()">打印名牌</el-button> -->
|
|
|
- <el-button type="primary" size="mini" @click="toComputIsFine()" :disabled="this.defaultOption.classid ? false : true">设置优秀学员</el-button>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-input placeholder="请输入学生姓名" v-model="stuname" class="input-with-select">
|
|
|
+ <el-button slot="append" icon="el-icon-search" @click="search()"></el-button>
|
|
|
+ </el-input>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-button type="primary" size="mini" @click="toComputIsFine()" :disabled="this.defaultOption.classid ? false : true">设置优秀学员</el-button>
|
|
|
+ </el-col>
|
|
|
</el-col>
|
|
|
<data-table :fields="fields" :data="list" :opera="opera" @edit="toEdit" @delete="toDelete" @post="toPost"></data-table>
|
|
|
</list-frame>
|
|
@@ -70,7 +77,7 @@ export default {
|
|
|
// },
|
|
|
],
|
|
|
fields: [
|
|
|
- { label: '姓名', prop: 'name' },
|
|
|
+ { label: '姓名', prop: 'name', filter: 'input' },
|
|
|
{ label: '性别', prop: 'gender' },
|
|
|
{ label: '民族', prop: 'nation' },
|
|
|
{ label: '学校', prop: 'school_name' },
|
|
@@ -92,6 +99,9 @@ export default {
|
|
|
rules: {},
|
|
|
// 组
|
|
|
groupList: [],
|
|
|
+ // 查询
|
|
|
+ // 学生姓名
|
|
|
+ stuname: '',
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
@@ -111,10 +121,13 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
async search({ skip = 0, limit = 10, ...info } = {}) {
|
|
|
- const res = await this.query({ skip, limit, ...info, classid: this.id });
|
|
|
- if (this.$checkRes(res)) {
|
|
|
- this.$set(this, `list`, res.data);
|
|
|
- this.$set(this, `total`, res.total);
|
|
|
+ if (this.id) {
|
|
|
+ if (this.stuname) info.name = this.stuname;
|
|
|
+ const res = await this.query({ skip, limit, ...info, classid: this.id });
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$set(this, `list`, res.data);
|
|
|
+ this.$set(this, `total`, res.total);
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
toEdit({ data }) {
|