|
@@ -136,6 +136,17 @@
|
|
|
</el-dialog>
|
|
|
<!-- 选择课程表格 -->
|
|
|
<el-dialog :title="form.targetType === 'TOPIC' ? '选择专题' : '选择课程' " :visible.sync="dialogTableVisible">
|
|
|
+ <el-form :inline="true" :model="formInline" class="demo-form-inline">
|
|
|
+ <el-form-item label="code">
|
|
|
+ <el-input v-model="formInline.code" placeholder="code" clearable />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="名字">
|
|
|
+ <el-input v-model="formInline.title" placeholder="名字" clearable />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button type="primary" @click="onSubmit">查询</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
<el-table
|
|
|
ref="singleTable"
|
|
|
:data="tableData"
|
|
@@ -216,7 +227,11 @@ export default {
|
|
|
},
|
|
|
tableData: [],
|
|
|
totalSize: 0,
|
|
|
- tablePage: 1
|
|
|
+ tablePage: 1,
|
|
|
+ formInline: {
|
|
|
+ code: '',
|
|
|
+ title: ''
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
@@ -340,6 +355,11 @@ export default {
|
|
|
},
|
|
|
selectList() {
|
|
|
this.dialogTableVisible = true
|
|
|
+ this.formInline = {
|
|
|
+ title: '',
|
|
|
+ code: '',
|
|
|
+ status: ''
|
|
|
+ }
|
|
|
if (this.form.targetType === 'TOPIC') {
|
|
|
this.$store.dispatch('topicList/getTopicLists', {
|
|
|
page: this.tablePage
|
|
@@ -417,7 +437,6 @@ export default {
|
|
|
type: 'success'
|
|
|
})
|
|
|
}
|
|
|
- // this.currentRow = val
|
|
|
},
|
|
|
handleTableChange(val) {
|
|
|
console.log(val)
|
|
@@ -443,6 +462,21 @@ export default {
|
|
|
// this.$store.dispatch('courseList/getCourseLists', {
|
|
|
// page: this.page
|
|
|
// })
|
|
|
+ },
|
|
|
+ onSubmit() {
|
|
|
+ if (this.form.targetType === 'TOPIC') {
|
|
|
+ this.$store.dispatch('topicList/getTopicLists', this.formInline).then(res => {
|
|
|
+ console.log(res)
|
|
|
+ this.tableData = res.list
|
|
|
+ this.totalSize = res.totalSize
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$store.dispatch('courseList/getCourseLists', this.formInline).then(res => {
|
|
|
+ console.log(res)
|
|
|
+ this.tableData = res.list
|
|
|
+ this.totalSize = res.totalSize
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -459,7 +493,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
.el-input {
|
|
|
- width: 280px;
|
|
|
+ width: 260px;
|
|
|
}
|
|
|
.el-select>.el-input {
|
|
|
width: 300px;
|