|
@@ -1,7 +1,7 @@
|
|
<template>
|
|
<template>
|
|
<div id="index">
|
|
<div id="index">
|
|
<list-frame title="教师上报" @query="search" :total="total" :needFilter="false">
|
|
<list-frame title="教师上报" @query="search" :total="total" :needFilter="false">
|
|
- <el-row>
|
|
|
|
|
|
+ <el-row :gutter="20">
|
|
<el-col :span="3">
|
|
<el-col :span="3">
|
|
<el-select v-model="form.teacherid" placeholder="搜索教师" size="mini" clearable filterable>
|
|
<el-select v-model="form.teacherid" placeholder="搜索教师" size="mini" clearable filterable>
|
|
<el-option v-for="(i, index) in teacherList" :key="index" :label="i.name" :value="i._id"></el-option>
|
|
<el-option v-for="(i, index) in teacherList" :key="index" :label="i.name" :value="i._id"></el-option>
|
|
@@ -21,7 +21,7 @@
|
|
import listFrame from '@frame/layout/admin/list-frame';
|
|
import listFrame from '@frame/layout/admin/list-frame';
|
|
import dataTable from '@frame/components/data-table';
|
|
import dataTable from '@frame/components/data-table';
|
|
const _ = require('lodash');
|
|
const _ = require('lodash');
|
|
-import { createNamespacedHelpers } from 'vuex';
|
|
|
|
|
|
+import { createNamespacedHelpers, mapState } from 'vuex';
|
|
const { mapActions: teaplan } = createNamespacedHelpers('teaPlan');
|
|
const { mapActions: teaplan } = createNamespacedHelpers('teaPlan');
|
|
const { mapActions: teacher } = createNamespacedHelpers('teacher');
|
|
const { mapActions: teacher } = createNamespacedHelpers('teacher');
|
|
const { mapActions: subject } = createNamespacedHelpers('subject');
|
|
const { mapActions: subject } = createNamespacedHelpers('subject');
|
|
@@ -57,14 +57,17 @@ export default {
|
|
await this.getOtherList();
|
|
await this.getOtherList();
|
|
this.search();
|
|
this.search();
|
|
},
|
|
},
|
|
- computed: {},
|
|
|
|
|
|
+ computed: {
|
|
|
|
+ ...mapState(['defaultOption']),
|
|
|
|
+ },
|
|
methods: {
|
|
methods: {
|
|
...classtype({ getCt: 'query' }),
|
|
...classtype({ getCt: 'query' }),
|
|
...teaplan({ apply: 'create', applyFetch: 'query', applyDelete: 'delete' }),
|
|
...teaplan({ apply: 'create', applyFetch: 'query', applyDelete: 'delete' }),
|
|
...subject({ getSubjectList: 'query' }),
|
|
...subject({ getSubjectList: 'query' }),
|
|
...teacher({ getTeacher: 'query' }),
|
|
...teacher({ getTeacher: 'query' }),
|
|
async search({ skip = 0, limit = 10, ...info } = {}) {
|
|
async search({ skip = 0, limit = 10, ...info } = {}) {
|
|
- const res = await this.applyFetch({ skip, limit, ...info, ...this.form });
|
|
|
|
|
|
+ const defaultCondition = { termid: _.get(this.defaultOption, 'termid') };
|
|
|
|
+ const res = await this.applyFetch({ skip, limit, ...info, ...this.form, ...defaultCondition });
|
|
if (this.$checkRes(res)) {
|
|
if (this.$checkRes(res)) {
|
|
this.$set(this, `list`, res.data);
|
|
this.$set(this, `list`, res.data);
|
|
this.$set(this, `total`, res.total);
|
|
this.$set(this, `total`, res.total);
|
|
@@ -108,6 +111,12 @@ export default {
|
|
},
|
|
},
|
|
deep: true,
|
|
deep: true,
|
|
},
|
|
},
|
|
|
|
+ 'defaultOption.termid': {
|
|
|
|
+ handler(val, oval) {
|
|
|
|
+ this.search();
|
|
|
|
+ },
|
|
|
|
+ deep: true,
|
|
|
|
+ },
|
|
},
|
|
},
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|