|
@@ -3,6 +3,7 @@
|
|
|
<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>
|
|
|
<data-table :fields="fields" :data="list" :opera="opera" @edit="toEdit" @delete="toDelete" @post="toPost"></data-table>
|
|
|
</list-frame>
|
|
@@ -97,7 +98,7 @@ export default {
|
|
|
this.seachGroup();
|
|
|
},
|
|
|
methods: {
|
|
|
- ...mapActions(['query', 'delete']),
|
|
|
+ ...mapActions(['query', 'delete', 'computedIsFine']),
|
|
|
...group({ groupQuery: 'query' }),
|
|
|
async seachGroup() {
|
|
|
let classid = this.id;
|
|
@@ -139,6 +140,11 @@ export default {
|
|
|
toPrint() {
|
|
|
this.$router.push({ path: '/classes/namCard', query: { id: this.id } });
|
|
|
},
|
|
|
+ // 计算优秀学员
|
|
|
+ async toComputIsFine() {
|
|
|
+ const res = await this.computedIsFine(this.defaultOption.classid);
|
|
|
+ if (this.$checkRes(res, '优秀学员设置成功', res.errmsg || '优秀学员设置失败')) this.search();
|
|
|
+ },
|
|
|
},
|
|
|
computed: {
|
|
|
...mapState(['user', 'defaultOption']),
|