|
@@ -10,10 +10,11 @@
|
|
|
clearable>
|
|
|
</el-date-picker>
|
|
|
</el-col>
|
|
|
- <el-col :span="18">
|
|
|
- <el-button type="primary" @click="queryBtn">搜索</el-button>
|
|
|
+ <el-col :span="14">
|
|
|
+
|
|
|
</el-col>
|
|
|
- <el-col :span="2">
|
|
|
+ <el-col :span="3">
|
|
|
+ <el-button type="primary" @click="queryBtn">搜索</el-button>
|
|
|
<el-button type="primary" @click="pushBtn">一键推送</el-button>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -28,18 +29,22 @@
|
|
|
type="selection"
|
|
|
width="55">
|
|
|
</el-table-column>
|
|
|
-<!-- <el-table-column-->
|
|
|
-<!-- prop="id"-->
|
|
|
-<!-- label="序号"-->
|
|
|
-<!-- width="120">-->
|
|
|
-<!-- </el-table-column>-->
|
|
|
- <el-table-column label="序号"
|
|
|
- width="120">
|
|
|
+ <el-table-column
|
|
|
+ label="序号"
|
|
|
+ width="55">
|
|
|
<template slot-scope="scope">
|
|
|
{{scope.$index+1}}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
+ prop="newDate"
|
|
|
+ label="日期"
|
|
|
+ width="120">
|
|
|
+ <template #default="scope">
|
|
|
+ {{scope.row.newDate.split(' ')[0]}}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
prop="newsSource"
|
|
|
label="新闻来源"
|
|
|
width="120">
|
|
@@ -48,10 +53,6 @@
|
|
|
prop="title"
|
|
|
label="标题">
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="newDate"
|
|
|
- label="日期">
|
|
|
- </el-table-column>
|
|
|
</el-table>
|
|
|
<el-pagination
|
|
|
@size-change="handleSizeChange"
|
|
@@ -74,17 +75,14 @@ export default {
|
|
|
this.getData()
|
|
|
},
|
|
|
handleSizeChange(val) {
|
|
|
- console.log(`每页 ${val} 条`);
|
|
|
this.queryParams.pageSize = val
|
|
|
this.getData()
|
|
|
},
|
|
|
handleCurrentChange(val) {
|
|
|
- console.log(`当前页: ${val}`);
|
|
|
this.queryParams.pageNum = val
|
|
|
this.getData()
|
|
|
},
|
|
|
getData(){
|
|
|
- console.log(this.queryParams)
|
|
|
list(this.queryParams).then(res =>{
|
|
|
this.dataList = res.rows
|
|
|
this.total=res.total
|
|
@@ -92,13 +90,12 @@ export default {
|
|
|
},
|
|
|
handleSelectionChange(val) {
|
|
|
this.form = val;
|
|
|
- console.log(this.form)
|
|
|
-
|
|
|
},
|
|
|
pushBtn(){
|
|
|
- console.log(this.form)
|
|
|
push(this.form).then(res =>{
|
|
|
-
|
|
|
+ if(res.code ==200){
|
|
|
+ this.$message.success("推送成功")
|
|
|
+ }
|
|
|
})
|
|
|
}
|
|
|
},
|