浏览代码

Merge branch 'dev' of http://172.16.100.139/new-business/drp-web into dev

002390 1 年之前
父节点
当前提交
a29f8bcabd
共有 1 个文件被更改,包括 18 次插入21 次删除
  1. 18 21
      src/views/business/newsLink/index.vue

+ 18 - 21
src/views/business/newsLink/index.vue

@@ -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("推送成功")
+        }
       })
     }
   },