|
@@ -14,13 +14,16 @@
|
|
|
style="width: 120px;">网管课导出</div>
|
|
|
</div>
|
|
|
<div class="m-core">
|
|
|
- <el-form :inline="true"
|
|
|
+ <save-form :inline="true"
|
|
|
class="searchForm"
|
|
|
- v-model.trim="searchForm">
|
|
|
+ @submit="search"
|
|
|
+ @reset="onReSet"
|
|
|
+ :save-key="saveKey"
|
|
|
+ :model.sync="searchForm">
|
|
|
<!-- 状态 指导老师 活动方案-->
|
|
|
<el-form-item>
|
|
|
<el-input v-model.trim="searchForm.search"
|
|
|
- @keyup.enter.native="search"
|
|
|
+ clearable
|
|
|
placeholder="课程组名称"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
@@ -29,7 +32,7 @@
|
|
|
filterable
|
|
|
clearable
|
|
|
placeholder="请选择分部">
|
|
|
- <el-option v-for="(item,index) in organList"
|
|
|
+ <el-option v-for="(item,index) in selects.branchs"
|
|
|
:key="index"
|
|
|
:label="item.name"
|
|
|
:value="item.id"></el-option>
|
|
@@ -63,6 +66,7 @@
|
|
|
<el-select v-model.trim="searchForm.teacherId"
|
|
|
clearable
|
|
|
filterable
|
|
|
+ :filter-method="filterMethod"
|
|
|
placeholder="指导老师">
|
|
|
<el-option v-for="(item,index) in teacherList"
|
|
|
:key="index"
|
|
@@ -95,12 +99,12 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
- <el-button @click="search"
|
|
|
+ <el-button native-type="submit"
|
|
|
type="danger">搜索</el-button>
|
|
|
- <el-button @click="onReSet"
|
|
|
+ <el-button native-type="reset"
|
|
|
type="primary">重置</el-button>
|
|
|
</el-form-item>
|
|
|
- </el-form>
|
|
|
+ </save-form>
|
|
|
<!-- tab -->
|
|
|
<div class="tableWrap">
|
|
|
<el-table style="width: 100%"
|
|
@@ -326,6 +330,11 @@ export default {
|
|
|
}
|
|
|
};
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ saveKey() {
|
|
|
+ return this.$route.path + '/1'
|
|
|
+ }
|
|
|
+ },
|
|
|
created () {
|
|
|
// if (this.$route.query.searchForm) {
|
|
|
// this.$route.query.searchForm instanceof Object
|
|
@@ -356,18 +365,26 @@ export default {
|
|
|
this.init();
|
|
|
},
|
|
|
methods: {
|
|
|
+ filterMethod(inp) {
|
|
|
+ this.teacherList = this.selects.teachers.filter(item => (item.realName || '').indexOf(inp) > -1).slice(0, 49)
|
|
|
+ },
|
|
|
init () {
|
|
|
- getEmployeeOrgan().then(res => {
|
|
|
- if (res.code == 200) {
|
|
|
- this.organList = res.data;
|
|
|
- }
|
|
|
- });
|
|
|
+ // getEmployeeOrgan().then(res => {
|
|
|
+ // if (res.code == 200) {
|
|
|
+ // this.organList = res.data;
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ this.$store.dispatch('setBranchs')
|
|
|
+ this.$store.dispatch('setTeachers')
|
|
|
+ .then(() => {
|
|
|
+ this.teacherList = [...this.selects.teachers].slice(0, 49)
|
|
|
+ })
|
|
|
// <!-- 状态 指导老师 活动方案-->
|
|
|
- getTeacher().then(res => {
|
|
|
- if (res.code == 200) {
|
|
|
- this.teacherList = res.data;
|
|
|
- }
|
|
|
- });
|
|
|
+ // getTeacher().then(res => {
|
|
|
+ // if (res.code == 200) {
|
|
|
+ // this.teacherList = res.data;
|
|
|
+ // }
|
|
|
+ // });
|
|
|
this.getList();
|
|
|
},
|
|
|
permission (str, parent) {
|
|
@@ -536,7 +553,7 @@ export default {
|
|
|
let searchForm = JSON.stringify(this.searchForm);
|
|
|
this.$router.push({
|
|
|
path: "/business/accompanys",
|
|
|
- query: { id: row.id, rules, searchForm, type: row.type }
|
|
|
+ query: { id: row.id, type: row.type }
|
|
|
});
|
|
|
},
|
|
|
closeCrouse (row) {
|
|
@@ -608,4 +625,4 @@ export default {
|
|
|
margin-right: 10px;
|
|
|
}
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|