|
@@ -1,7 +1,14 @@
|
|
<template>
|
|
<template>
|
|
<div id="remind-detail">
|
|
<div id="remind-detail">
|
|
<detail-frame :title="pageTitle" returns="/train/plan/remind">
|
|
<detail-frame :title="pageTitle" returns="/train/plan/remind">
|
|
- <data-table :fields="fields" :data="list" :opera="opera" :usePage="false"></data-table>
|
|
|
|
|
|
+ <el-tabs v-model="activeName" type="card">
|
|
|
|
+ <el-tab-pane label="学生" name="first">
|
|
|
|
+ <data-table :fields="fields" :data="stuList" :opera="opera" :usePage="false"></data-table>
|
|
|
|
+ </el-tab-pane>
|
|
|
|
+ <el-tab-pane label="非学生" name="second">
|
|
|
|
+ <data-table :fields="fields" :data="nostuList" :opera="opera" :usePage="false"></data-table>
|
|
|
|
+ </el-tab-pane>
|
|
|
|
+ </el-tabs>
|
|
<!-- @msg="toSendMsg" @view="toView" -->
|
|
<!-- @msg="toSendMsg" @view="toView" -->
|
|
</detail-frame>
|
|
</detail-frame>
|
|
</div>
|
|
</div>
|
|
@@ -19,7 +26,10 @@ export default {
|
|
components: { detailFrame, dataTable },
|
|
components: { detailFrame, dataTable },
|
|
data: function() {
|
|
data: function() {
|
|
return {
|
|
return {
|
|
- list: [],
|
|
|
|
|
|
+ // 学生
|
|
|
|
+ stuList: [],
|
|
|
|
+ // 非学生
|
|
|
|
+ nostuList: [],
|
|
opera: [
|
|
opera: [
|
|
{
|
|
{
|
|
label: '发送确认通知',
|
|
label: '发送确认通知',
|
|
@@ -37,6 +47,7 @@ export default {
|
|
{ label: '电话', prop: 'phone' },
|
|
{ label: '电话', prop: 'phone' },
|
|
{ label: '邮箱', prop: 'email' },
|
|
{ label: '邮箱', prop: 'email' },
|
|
],
|
|
],
|
|
|
|
+ activeName: 'first',
|
|
};
|
|
};
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
@@ -46,13 +57,14 @@ export default {
|
|
...notice({ getNoticeList: 'query', getClassInfo: 'classList' }),
|
|
...notice({ getNoticeList: 'query', getClassInfo: 'classList' }),
|
|
async search() {
|
|
async search() {
|
|
let t = await this.getNoticeList();
|
|
let t = await this.getNoticeList();
|
|
- console.log(t);
|
|
|
|
let res = await this.getClassInfo(this.id);
|
|
let res = await this.getClassInfo(this.id);
|
|
if (this.$checkRes(res)) {
|
|
if (this.$checkRes(res)) {
|
|
let studList = _.get(res.data, `students`, []);
|
|
let studList = _.get(res.data, `students`, []);
|
|
let teaList = _.get(res.data, `teachers`, []);
|
|
let teaList = _.get(res.data, `teachers`, []);
|
|
- let arr = [...studList, ...teaList];
|
|
|
|
- this.$set(this, `list`, _.uniqBy(arr, '_id'));
|
|
|
|
|
|
+ this.$set(this, `stuList`, _.uniqBy(studList, '_id'));
|
|
|
|
+ this.$set(this, `nostuList`, _.uniqBy(teaList, '_id'));
|
|
|
|
+ // let arr = [...studList, ...teaList];
|
|
|
|
+ // this.$set(this, `list`, _.uniqBy(arr, '_id'));
|
|
}
|
|
}
|
|
},
|
|
},
|
|
},
|
|
},
|