|
@@ -1,6 +1,20 @@
|
|
|
<template>
|
|
<template>
|
|
|
<el-row>
|
|
<el-row>
|
|
|
<el-row>
|
|
<el-row>
|
|
|
|
|
+ <el-form :inline="true" :model="searchForm" class="demo-form-inline">
|
|
|
|
|
+ <el-form-item>
|
|
|
|
|
+ <el-select v-model="searchForm.type" placeholder="查询类型">
|
|
|
|
|
+ <el-option label="稿件标题" value="1" />
|
|
|
|
|
+ <el-option label="用户ID" value="2" />
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item>
|
|
|
|
|
+ <el-input v-model="searchForm.content" placeholder="" />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item>
|
|
|
|
|
+ <el-button size="mini" type="warning" @click="search">查询</el-button>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-form>
|
|
|
<el-table
|
|
<el-table
|
|
|
:data="dataList"
|
|
:data="dataList"
|
|
|
border
|
|
border
|
|
@@ -301,23 +315,29 @@ export default {
|
|
|
videoId: null,
|
|
videoId: null,
|
|
|
scope: '1'
|
|
scope: '1'
|
|
|
},
|
|
},
|
|
|
- videoResources: []
|
|
|
|
|
|
|
+ videoResources: [],
|
|
|
|
|
+ searchForm: {
|
|
|
|
|
+ page: 1,
|
|
|
|
|
+ type: '1',
|
|
|
|
|
+ content: null
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
created() {
|
|
created() {
|
|
|
document.title = '稿件列表'
|
|
document.title = '稿件列表'
|
|
|
- this.getData()
|
|
|
|
|
|
|
+ this.getData(this.searchForm)
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
handleCurrentChange(pageNumber) {
|
|
handleCurrentChange(pageNumber) {
|
|
|
this.currentPage = pageNumber
|
|
this.currentPage = pageNumber
|
|
|
- this.getData()
|
|
|
|
|
|
|
+ this.searchForm.page = this.currentPage
|
|
|
|
|
+ this.getData(this.searchForm)
|
|
|
// 回到顶部
|
|
// 回到顶部
|
|
|
scrollTo(0, 0)
|
|
scrollTo(0, 0)
|
|
|
},
|
|
},
|
|
|
- getData() {
|
|
|
|
|
|
|
+ getData(searchForm) {
|
|
|
this.dataList = []
|
|
this.dataList = []
|
|
|
- getPostList(this.currentPage).then(resp => {
|
|
|
|
|
|
|
+ getPostList(searchForm).then(resp => {
|
|
|
if (resp.code === 0) {
|
|
if (resp.code === 0) {
|
|
|
this.dataList = resp.data.list
|
|
this.dataList = resp.data.list
|
|
|
this.totalSize = resp.data.totalSize
|
|
this.totalSize = resp.data.totalSize
|
|
@@ -439,6 +459,11 @@ export default {
|
|
|
duration: 3000
|
|
duration: 3000
|
|
|
})
|
|
})
|
|
|
})
|
|
})
|
|
|
|
|
+ },
|
|
|
|
|
+ search() {
|
|
|
|
|
+ this.currentPage = 1
|
|
|
|
|
+ this.searchForm.page = this.currentPage
|
|
|
|
|
+ this.getData(this.searchForm)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|