Pārlūkot izejas kodu

采集-广告订单

Jing 4 mēneši atpakaļ
vecāks
revīzija
6b49915fe8

+ 66 - 0
src/api/advertise.js

@@ -0,0 +1,66 @@
+// 广告
+import request from '@/utils/request'
+
+//获取状态
+export const getStatus=()=> {
+  return request({
+    url: '/order/getStauts',
+    method: 'get',
+  })
+}
+// 获取订单列表
+export const getOrderListAdmin=(data)=> {
+  return request({
+    url: '/order/getOrderListAdmin',
+    method: 'post',
+    data
+  })
+}
+// 获取订单详情
+export const getOrderDetailAdmin=(data)=> {
+  return request({
+    url: '/order/getOrderDetailAdmin',
+    method: 'post',
+    data
+  })
+}
+// 审核订单状态
+export const applyOrderStatusAdmin=(data)=> {
+  return request({
+    url: '/order/applyOrderStatusAdmin',
+    method: 'post',
+    data
+  })
+}
+// 修改订单价格
+export const editOrderAdmin=(data)=> {
+  return request({
+    url: '/order/editPriceOrderAdmin',
+    method: 'post',
+    data
+  })
+}
+// 驳回订单
+export const rejectOrderAdmin=(data)=> {
+  return request({
+    url: '/order/rejectOrderAdmin',
+    method: 'post',
+    data
+  })
+}
+// 结束订单
+export const endOrderAdmin=(data)=> {
+  return request({
+    url: '/order/endOrderAdmin',
+    method: 'post',
+    data
+  })
+}
+// 删除订单
+export const delOrderAdmin=(data)=> {
+  return request({
+    url: '/order/delOrderAdmin',
+    method: 'post',
+    data
+  })
+}

+ 138 - 0
src/api/crawler.js

@@ -0,0 +1,138 @@
+// 采集器
+import request from '@/utils/request'
+
+// 建立网站  start------------------------------------------------------------
+// 添加网站
+export const addWeb = (data) => {
+    return request({
+        url: '/collector/addWeb',
+        method: 'post',
+        data
+    })
+}
+// 获取并搜索网站
+export const getWeb = (data) => {
+    return request({
+        url: '/collector/getWeb',
+        method: 'post',
+        data
+    })
+}
+// 修改网站
+export const updateWeb = (data) => {
+    return request({
+        url: '/collector/upWeb',
+        method: 'post',
+        data
+    })
+}
+//删除网站
+export const delWeb=(params)=>{
+    return request({
+        url: '/collector/delWeb',
+        method: 'get',
+        params
+    })
+}
+
+
+// 规则列表  start-------------------------------------------------------------
+// 添加规则任务
+export const addRule = (data) => {
+    return request({
+        url: '/collector/addRule',
+        method: 'post',
+        data
+    })
+}
+// 获取并搜索规则任务
+export const getRule = (data) => {
+    return request({
+        url: '/collector/getRule',
+        method: 'post',
+        data
+    })
+}
+// 获取某一个规则任务
+export const getOneRule = (params) => {
+    return request({
+        url: '/collector/getOneRule',
+        method: 'get',
+        params
+    })
+}
+// 修改采集规则
+export const updateRule = (data) => {
+    return request({
+        url: '/collector/upRule',
+        method: 'post',
+        data
+    })
+}
+// 删除规则任务
+export const delRule = (params) => {
+    return request({
+        url: '/collector/delRule',
+        method: 'get', 
+        params
+    })
+}
+// 开始采集
+export const sendCrawler = (data) => {
+    return request({
+        url: '/collector/sendCrawler',
+        method: 'post',
+        data
+    })
+}
+
+
+// 采集列表  start-------------------------------------------------------------
+// 获取病搜索资讯
+export const getInfo = (data) => {
+    return request({
+        url: '/collector/getInfo',
+        method: 'post',
+        data
+    })
+}
+//获取某个资讯  
+export const getOneInfo = (params) => {
+    return request({
+        url: '/collector/getOneInfo',
+        method: 'get',
+        params
+    })
+}
+//修改资讯  
+export const updateInfo = (data) => {
+    return request({
+        url: '/collector/upInfo',
+        method: 'post',
+        data
+    })
+}
+//删除资讯 
+export const delInfo = (params) => {
+    return request({
+        url: '/collector/delInfo',
+        method: 'get',
+        params
+    })
+}
+//关联导航池  
+export const addCatid = (data) => {
+    return request({
+        url: '/collector/addCatid',
+        method: 'post',
+        data
+    })
+}
+// 导入文章
+export const addArt = (params) => {
+    return request({
+        url: '/collector/addArt',
+        method: 'get',
+        params
+    })
+}

BIN
src/assets/advertise/404.png


BIN
src/assets/advertise/Graph.png


BIN
src/assets/advertise/Info Circle.png


BIN
src/assets/advertise/Shield.png


BIN
src/assets/advertise/guanggaowei1.png


BIN
src/assets/advertise/guanggaowei2.png


BIN
src/assets/advertise/loading.png


+ 100 - 0
src/router/index.js

@@ -325,12 +325,30 @@ export const constantRoutes = [
         component: () => import('@/views/chat/contacts'),
         meta: {
           title: '通讯录',
+
           hidden: true,
           breadcrumb: true
         }
       }
     ]
   },
+  {
+        path: '/webCrawler',
+        component: Layout,
+        children: [
+          {
+            name: '',
+            path: '',
+            component: () => import('@/views/crawler/webCrawler'),
+            meta: {
+              title: '建立网站',
+              hidden: true,
+              breadcrumb: true
+            }
+          }
+        ]
+      },
+
   {
     path: '/topic',
     component: Layout,
@@ -348,6 +366,23 @@ export const constantRoutes = [
     ]
   },
   {
+        path: '/webRule',
+        component: Layout,
+        children: [
+          {
+            name: '',
+            path: '',
+            component: () => import('@/views/crawler/webRule'),
+            meta: {
+              title: '规则列表',
+              hidden: true,
+              breadcrumb: true
+            }
+          }
+        ]
+      },
+  {
+
     path: '/creatTopic',
     component: Layout,
     children: [
@@ -363,6 +398,71 @@ export const constantRoutes = [
       }
     ]
   },
+  {
+        path: '/webCrawlerList',
+        component: Layout,
+        children: [
+          {
+            name: '',
+            path: '',
+            component: () => import('@/views/crawler/webCrawlerList'),
+            meta: {
+              title: '采集列表',
+              hidden: true,
+              breadcrumb: true
+            }
+          }
+        ]
+      },
+
+  {
+    path: '/webCrawlerListEdit',
+    component: Layout,
+    children: [
+      {
+        name: '',
+        path: '',
+        component: () => import('@/views/crawler/webCrawlerListEdit'),
+        meta: {
+          title: '编辑资讯',
+          hidden: true,
+          breadcrumb: true
+        }
+      }
+    ]
+  },
+  {
+    path: '/adList',
+    component: Layout,
+    children: [
+      {
+        name: '',
+        path: '',
+        component: () => import('@/views/advertise/advertiseList'),
+        meta: {
+          title: '广告列表',
+          hidden: true,
+          breadcrumb: true
+        }
+      }
+    ]
+  },
+  {
+    path: '/adPlaceList',
+    component: Layout,
+    children: [
+      {
+        name: '',
+        path: '',
+        component: () => import('@/views/advertise/adPlaceList'),
+        meta: {
+          title: '广告位管理',
+          hidden: true,
+          breadcrumb: true
+        }
+      }
+    ]
+  },
   // {
   //   path: '/documentation',
   //   component: Layout,

+ 8 - 7
src/utils/baseUrl.js

@@ -1,10 +1,11 @@
 const URL = {
-  testUrl: 'http://192.168.1.201:9501',//刘佳伟的电脑
-  liuUrl: 'http://192.168.1.127:9501',//刘剑的电脑
-  baseUrl: 'http://183.131.25.186:9501',//测试服务器
-  servUrl: 'https://admin.bjzxtw.org.cn/zxtapi',//服务端
-  //WebsocketUrl: 'ws://192.168.1.201:9506',//老刘websocket地址
-  //WebsocketUrl: 'ws://183.131.25.186:9506'//测试服务器websocket地址
+  //baseUrl: 'https://admin.bjzxtw.org.cn/zxtapi',//正式环境
+  baseUrl: 'http://183.131.25.186:9501',//测试环境
+  //baseUrl: 'http://192.168.1.201:9501',//刘佳伟本地环境
+  //baseUrl:'http://192.168.1.115:9501',//冯蕊的本地环境
+  //baseUrl: 'http://192.168.1.127:9501',//刘剑的本地环境
+  //WebsocketUrl: 'ws://192.168.1.201:9506',//刘佳伟websocket地址
+  WebsocketUrl: 'ws://192.168.1.127:9506'//刘剑websocket地址
 }
 
-export default URL;
+export default URL;

+ 89 - 0
src/utils/requestMock.js

@@ -0,0 +1,89 @@
+import axios from 'axios'
+import { MessageBox, Message } from 'element-ui'
+import store from '@/store'
+import { getToken } from '@/utils/auth'
+import URL from '@/utils/baseUrl';
+
+// create an axios instance
+const service = axios.create({
+  //千万不能在这里使用绝对地址,这会导致webpack的devserve不生效
+  //baseURL: URL.testUrl, //老刘服务器
+  // baseURL: URL.baseUrl, //测试服务器
+  baseURL: "http://127.0.0.1:4523/m1/4987755-4646495-default/", //冯蕊服务器
+  //baseURL: process.env.VUE_APP_BASE_API, // url = base url + request url
+  //withCredentials: true, // send cookies when cross-domain requests
+  timeout: 50000 // request timeout
+})
+
+// request interceptor
+service.interceptors.request.use(
+  config => {
+    // do something before request is sent
+    if (store.getters.token) {
+      // let each request carry token
+      // ['X-Token'] is a custom headers key
+      // please modify it according to the actual situation
+      config.headers['token'] = getToken()
+    }
+    return config
+  },
+  error => {
+    // do something with request error
+    console.log(error) // for debug
+    return Promise.reject(error)
+  }
+)
+
+// response interceptor
+service.interceptors.response.use(
+  /**
+   * If you want to get http information such as headers or status
+   * Please return  response => response
+  */
+
+  /**
+   * Determine the request status by custom code
+   * Here is just an example
+   * You can also judge the status by HTTP Status Code
+   */
+  response => {
+    const res = response.data
+    return res
+    // if the custom code is not 20000, it is judged as an error.
+    // if (res.code !== 20000) {
+    //   Message({
+    //     message: res.message || 'Error',
+    //     type: 'error',
+    //     duration: 5 * 1000
+    //   })
+
+    //   // 50008: Illegal token; 50012: Other clients logged in; 50014: Token expired;
+    //   if (res.code === 50008 || res.code === 50012 || res.code === 50014) {
+    //     // to re-login
+    //     MessageBox.confirm('You have been logged out, you can cancel to stay on this page, or log in again', 'Confirm logout', {
+    //       confirmButtonText: 'Re-Login',
+    //       cancelButtonText: 'Cancel',
+    //       type: 'warning'
+    //     }).then(() => {
+    //       store.dispatch('user/resetToken').then(() => {
+    //         location.reload()
+    //       })
+    //     })
+    //   }
+    //   return Promise.reject(new Error(res.message || 'Error'))
+    // } else {
+    //   return res
+    // }
+  },
+  error => {
+    console.log('err' + error) // for debug
+    Message({
+      message: error.message,
+      type: 'error',
+      duration: 5 * 10000
+    })
+    return Promise.reject(error)
+  }
+)
+
+export default service

+ 835 - 0
src/views/advertise/adPlaceList.vue

@@ -0,0 +1,835 @@
+<template>
+    <!-- 广告列表 -->
+    <div>
+        <!-- 提示信息 -->
+        <div class="tips">
+            <el-row>
+                <el-col :span="12">
+                    <i class="tipsIcon"></i>
+                    <span class="tipsText">7个工作日内,若运营没有操作用户的申请,则用户申请的时间、信息等将会释放。</span>
+                </el-col>
+            </el-row>
+        </div>
+        <!-- 头部搜索框部分 -->
+        <div class="title">
+            <el-row>
+                <el-col :span="6" class="left">
+                    <div class="searchBox">
+                        <div class="searchTitle">工单编号</div>
+                        <el-input class="input" v-model="order_code" placeholder="请输入工单编号"></el-input>
+                    </div>
+                </el-col>
+                <el-col :span="6" class="left">
+                    <div class="searchBox">
+                        <div class="searchTitle">审核状态</div>
+                        <el-select v-model="status" placeholder="请选择审核状态">
+                            <el-option v-for="item in order" :key="item.value" :label="item.label" :value="item.value">
+                            </el-option>
+                        </el-select>
+                    </div>
+                </el-col>
+                <el-col :span="6" class="left">
+                    <div class="searchBox">
+                        <div class="searchTitle">广告状态</div>
+                        <el-select v-model="ad_status" placeholder="请选择广告状态">
+                            <el-option v-for="item in order_ad" :key="item.value" :label="item.label"
+                                :value="item.value">
+                            </el-option>
+                        </el-select>
+                    </div>
+                </el-col>
+                <el-col :span="6" class="right">
+                    <div class="btnList">
+                        <button class="search" @click="goSearch">搜索</button>
+                        <button class="reset" @click="goReset">重置</button>
+                    </div>
+                </el-col>
+            </el-row>
+        </div>
+        <!--表格内容 start------------------------------------------------------------>
+        <div class="layerBox">
+            <tableTitle :name="tableDivTitle" />
+            <el-row>
+                <template>
+                    <el-table class="my-table" :data="tableData" style="width: 100%">
+                        <el-table-column fixed prop="id" label="编号" width="90">
+                        </el-table-column>
+                        <el-table-column prop="order_num" label="工单编号" width="120">
+                        </el-table-column>
+                        <el-table-column prop="user_name" label="广告名称" width="255">
+                        </el-table-column>
+                        <el-table-column prop="status" label="审核状态" width="90" algin="center">
+                        </el-table-column>
+                        <el-table-column prop="ad_status" label="广告状态" width="90">
+                        </el-table-column>
+                        <el-table-column prop="sttime" label="开始时间" width="120">
+                        </el-table-column>
+                        <el-table-column prop="edtime" label="结束时间" width="120">
+                        </el-table-column>
+                        <el-table-column prop="cttime" label="创建时间" width="">
+                        </el-table-column>
+                        <el-table-column prop="admin_user_name" label="操作人" width="100">
+                        </el-table-column>
+                        <el-table-column fixed="right" label="操作" width="330">
+                            <template slot-scope="scope">
+                                <div class="listBtnBox">
+                                    <div class="listDeleteBtn" @click="deleteRow(scope.row.id)"><i
+                                            class="el-icon-delete"></i>删除</div>
+                                    <div class="listEditBtn" @click="goEdit(scope.row.id, scope.row)"><i
+                                            class="el-icon-edit-outline"></i>编辑</div>
+                                    <div class="listReviewBtn" @click="goReview(scope.row.id, scope.row)"><i
+                                            class="review"></i>审核</div>
+                                </div>
+                            </template>
+                        </el-table-column>
+                    </el-table>
+                </template>
+            </el-row>
+        </div>
+        <!--分页 start------------------------------------------------------------>
+        <div class="alignBox">
+            <el-row>
+                <el-col :span="24">
+                    <el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange"
+                        :current-page="page" :page-size="pageSize" layout="total, prev, pager, next, jumper"
+                        :total="total">
+                    </el-pagination>
+                </el-col>
+            </el-row>
+        </div>
+        <!--分页 end------------------------------------------------------------>
+        <!--表格内容 end------------------------------------------------------------>
+
+        <!-- 弹出框 编辑 start----------------------------------------------------------->
+        <el-dialog :title="dialogName" :visible.sync="dialogTableVisible" width="56%" top="8vh">
+            <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
+                <div class="dialogText">
+                    <el-form-item label="广告名称:" prop="">
+                        <el-input v-model="ruleForm.name" disabled placeholder="请输入网站名称"></el-input>
+                    </el-form-item>
+                    <el-form-item label="广告网址:" prop="">
+                        <el-input v-model="ruleForm.name" disabled placeholder="请输入网站名称"></el-input>
+                    </el-form-item>
+                    <el-form-item label="广告图:" prop="">
+                        <div class="adImage">
+                            <img src="../../assets/advertise/404.png" alt="">
+                        </div>
+                    </el-form-item>
+                    <el-form-item label="持续时间:" prop="">
+                        <el-date-picker v-model="ruleForm.startTime" type="datetime" disabled placeholder="选择日期时间">
+                        </el-date-picker> 至
+                        <el-date-picker v-model="ruleForm.endTime" type="datetime" disabled placeholder="选择日期时间">
+                        </el-date-picker>
+                    </el-form-item>
+                    <el-form-item label="广告尺寸:" prop="">
+                        <el-radio v-model="ruleForm.radio" label="1">1200x90px</el-radio>
+                        <el-radio v-model="ruleForm.radio" label="2">420x560px</el-radio>
+                    </el-form-item>
+
+                    <el-form-item label="价格:" prop="price">
+                        <div class="price">
+                            <el-input v-model="ruleForm.price" placeholder="请输入价格"></el-input> 元 x
+                            <el-input v-model="ruleForm.days" disabled placeholder="请输入天数"></el-input> 天 x
+                            <el-input v-model="ruleForm.num" disabled placeholder="请输入个数"></el-input> 个
+                        </div>
+                    </el-form-item>
+                    <el-form-item label="广告位置:" prop="">
+                        <span class="example" @click="goGraph">查看示例图</span>
+                        <div>
+                            <el-button disabled v-for="item in 12" class="el_btnList">中农兴业网 一号广告位</el-button>
+                        </div>
+                    </el-form-item>
+                </div>
+                <div class="dialogBtn">
+                    <button class="cancel" @click="cancelForm">取消</button>
+                    <button class="submit" @click="submitForm">提交</button>
+                </div>
+            </el-form>
+        </el-dialog>
+        <!-- 弹出框 编辑 end----------------------------------------------------------->
+
+        <!-- 弹出框 广告位示例图 start----------------------------------------------------------->
+        <el-dialog title="审核状态" :visible.sync="dialogVisible" width="50%" top="25vh">
+            <ul class="graph">
+                <li>
+                    <h3>首页:</h3>
+                    <img src="../../assets/advertise/guanggaowei2.png" alt="">
+                </li>
+                <li>
+                    <h3>列表页:</h3>
+                    <img src="../../assets/advertise/guanggaowei1.png" alt="">
+                </li>
+            </ul>
+            <div slot="footer" class="dialog-footer">
+                <el-button @click="dialogVisible = false">取 消</el-button>
+                <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
+            </div>
+        </el-dialog>
+        <!-- 弹出框 广告位示例图 end----------------------------------------------------------->
+
+        <!-- 弹出框 审核 start----------------------------------------------------------->
+        <el-dialog title="审核状态" :visible.sync="dialogFormVisible" width="35%" top="25vh">
+            <el-form ref="form" :model="form" label-width="80px">
+                <div class="radioGroup">
+                    <el-radio-group v-model="status_radio">
+                        <el-radio :label="3">通过</el-radio>
+                        <el-radio :label="6">驳回</el-radio>
+                    </el-radio-group>
+                    <el-form-item v-show="this.status_radio == 6" label="驳回原因:" :label-width="formLabelWidth"
+                        prop="name">
+                        <el-input v-model="textarea" type="textarea" resize="none" :rows="3" placeholder="请输入内容">
+                        </el-input>
+                    </el-form-item>
+                </div>
+
+            </el-form>
+            <div slot="footer" class="dialog-footer">
+                <el-button @click="dialogFormVisible = false">取 消</el-button>
+                <el-button type="primary" @click="subimtStatus">确 定</el-button>
+            </div>
+        </el-dialog>
+        <!-- 弹出框 审核 end----------------------------------------------------------->
+    </div>
+
+</template>
+
+<script>
+//表格标题
+import tableTitle from './components/tableTitle.vue';
+
+//引入公用样式
+import '@/styles/global.less';
+import { getStatus, getOrderListAdmin, getOrderDetailAdmin, applyOrderStatusAdmin, editOrderAdmin, rejectOrderAdmin, endOrderAdmin, delOrderAdmin } from '@/api/advertise'
+export default {
+    components: {
+        tableTitle,//表格标题-
+    },
+    data() {
+        return {
+            tableDivTitle: "广告列表",  //列表标题
+            dialogTableVisible: false,      //编辑弹框
+            dialogName: '编辑', //编辑弹窗名称
+            dialogFormVisible: false,     //审核弹框
+            dialogVisible: false,  //示例图弹窗
+
+            form: {},  //审核状态的ref属性名称
+
+
+            tableData: [],//表格数据
+
+            // 搜索框相关
+            order_code: '', //工单编号 
+            status: '',//审核状态
+            ad_status: '',//广告状态
+            order: [ //审核状态数据
+                {
+                    value: 1,
+                    label: '已通过'
+                },
+                {
+                    value: 2,
+                    label: '已驳回'
+                },
+                {
+                    value: 5,
+                    label: '待审核'
+                },
+            ],
+            order_ad: [ //广告状态数据
+                {
+                    value: 1,
+                    label: '待投放'
+                },
+                {
+                    value: 2,
+                    label: '已驳回'
+                },
+                {
+                    value: 3,
+                    label: '已撤回'
+                },
+                {
+                    value: 4,
+                    label: '已修改'
+                },
+                {
+                    value: 5,
+                    label: '已过期'
+                },
+                {
+                    value: 6,
+                    label: '待审核'
+                },
+                {
+                    value: 7,
+                    label: '已结束'
+                },
+                {
+                    value: 8,
+                    label: '投放中'
+                }
+            ],
+
+            //活动id
+            activeid: "",
+
+            // 分页相关
+            page: 1,
+            pageSize: 10,
+            total: '',
+
+            // 审核弹窗相关
+            status_radio: "",   //审核状态
+            textarea: '',    //驳回原因
+
+            formLabelWidth: '',
+
+            ruleForm: {
+                name: '', //广告名称
+                ad_url: '', //广告网址
+                radio: '',//广告尺寸
+                startTime: '', //开始时间
+                endTime: '',   //结束时间
+                price: '',  //价格
+                days: '',   //天数
+                num: '',   //个数
+            },
+            rules: {
+                name: [
+                    { required: true, message: '请输入网站名称', trigger: 'blur' },
+                ],
+                price: [
+                    { required: true, message: '请输入要修改的价格', trigger: 'change' }
+                ]
+            }
+        }
+    },
+    watch: {
+        status_radio: {
+            handler(newVal, oldVal) {
+                // console.log(newVal);
+            },
+            deep: true,
+            immediate: true
+        }
+    },
+    methods: {
+        //1.列表和分页相关 start ------------------------------------------------------------>
+        //1.1 开始请求列表信息方法
+        getData() {
+            let data = new FormData()
+            data.append('page', this.page)
+            data.append('pageSize', this.pageSize)
+            console.log(data);
+
+            getOrderListAdmin(data).then(data => {
+                console.log("全部数据", data);
+                console.log(data.data.rows);
+                this.tableData = data.data.rows
+                this.total = data.data.count
+                for (let item of this.tableData) {
+                    if (item.status == 1) {
+                        item.status = "已通过"
+                    } else if (item.status == 2) {
+                        item.status = "已驳回"
+                    } else if (item.status == 6) {
+                        item.status = "待审核"
+                    }
+
+                    if (item.ad_status == 1) {
+                        item.ad_status = "待投放"
+                    } else if (item.ad_status == 2) {
+                        item.ad_status = "已驳回"
+                    } else if (item.ad_status == 3) {
+                        item.ad_status = "已撤回"
+                    } else if (item.ad_status == 4) {
+                        item.ad_status = "已修改"
+                    } else if (item.ad_status == 5) {
+                        item.ad_status = "已过期"
+                    } else if (item.ad_status == 6) {
+                        item.ad_status = "待审核"
+                    } else if (item.ad_status == 7) {
+                        item.ad_status = "已结束"
+                    } else if (item.ad_status == 8) {
+                        item.ad_status = "待投放"
+                    }
+                }
+            })
+        },
+
+        //1.2 删除内容
+        deleteRow(id) {
+            console.log(id);
+            let data = new FormData()
+            data.append('id', id)
+
+            this.$confirm('注意:删除后,该条信息及其绑定关系全部删除', '是否确认删除该条信息?', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+            }).then(() => {
+                console.log("当前删除:" + id)
+                let data = new FormData()
+                data.append('id', id)
+                console.log(data);
+
+                delOrderAdmin(data).then(data => {
+                    console.log(data);
+                    if (data.code == 0) {
+                        this.$message({
+                            message: data.message,
+                            type: 'error'
+                        })
+                    }
+                    if (data.code == 200) {
+                        this.$message({
+                            type: 'success',
+                            message: '删除成功!'
+                        });
+                    }
+                    this.getData()
+                })
+            }).catch(() => {
+                this.$message({
+                    type: 'warning',
+                    message: '已取消删除'
+                });
+            });
+        },
+        //1.3 查看示例图
+        goGraph() {
+            this.dialogVisible = true
+        },
+
+        //1.4 列表内容分页
+        //直接跳转
+        handleSizeChange(val) {
+            this.page = val;
+            this.getData();
+        },
+        //1.5 点击分页
+        handleCurrentChange(val) {
+            this.page = val;
+            this.getData();
+        },
+        // 1.6 搜索按钮
+        goSearch() {
+            console.log(this.status);
+            
+            let data = new FormData()
+            data.append('page', this.page)
+            data.append('pageSize', this.pageSize)
+            data.append('status', this.status)
+            data.append('ad_status', this.ad_status)
+            data.append('order_num', this.order_code)
+            data.append('sttime', "")
+            data.append('edtime', "")
+            console.log(data);
+
+            getOrderListAdmin(data).then(data => {
+                console.log(data);
+                console.log(data.data.rows);
+                this.tableData = data.data.rows
+                this.total = data.data.count
+                for (let item of this.tableData) {
+                    if (item.status == 1) {
+                        item.status = "已通过"
+                    } else if (item.status == 2) {
+                        item.status = "已驳回"
+                    } else if (item.status == 6) {
+                        item.status = "待审核"
+                    }
+
+                    if (item.ad_status == 1) {
+                        item.ad_status = "待投放"
+                    } else if (item.ad_status == 2) {
+                        item.ad_status = "已驳回"
+                    } else if (item.ad_status == 3) {
+                        item.ad_status = "已撤回"
+                    } else if (item.ad_status == 4) {
+                        item.ad_status = "已修改"
+                    } else if (item.ad_status == 5) {
+                        item.ad_status = "已过期"
+                    } else if (item.ad_status == 6) {
+                        item.ad_status = "待审核"
+                    } else if (item.ad_status == 7) {
+                        item.ad_status = "已结束"
+                    } else if (item.ad_status == 8) {
+                        item.ad_status = "待投放"
+                    }
+                }
+            })
+        },
+        //1.7 重置按钮
+        goReset() {
+            this.order_code = '',
+                this.status = ''
+            this.ad_status = ''
+            this.getData();
+        },
+        //列表和分页相关 end ------------------------------------------------------------>
+
+        //1.9 编辑
+        goEdit(id, val) {
+            console.log(id);
+
+            this.activeid = id
+            this.dialogTableVisible = true
+            console.log(id, val);
+            this.ruleForm.name = val.user_name
+            this.ruleForm.ad_url = val.ad_url
+            // this.ruleForm.radio = val.width
+            this.ruleForm.startTime = val.sttime
+            this.ruleForm.endTime = val.edtime
+            this.ruleForm.price = val.price
+            this.ruleForm.days = val.days
+        },
+
+        //2.0 审核
+        goReview(id, val) {
+            this.activeid = id
+            this.dialogFormVisible = true
+        },
+
+        //审核中的确定
+        subimtStatus() {
+            if (this.status_radio == '3') {
+                let data = new FormData()
+                data.append('id', this.activeid)
+                applyOrderStatusAdmin(data).then(data => {
+                    console.log(data);
+                    if (data.code == 200) {
+                        this.$message({
+                            message: '已修改审核状态',
+                            type: 'success'
+                        })
+                        this.dialogFormVisible = false
+                        this.getData()
+                    }
+                    if (data.code == 0) {
+                        this.$message({
+                            message: data.message,
+                            type: 'error'
+                        })
+                    }
+                })
+            }
+            if (this.status_radio == '6') {
+                let data = new FormData()
+                data.append('id', this.activeid)
+                data.append('reason', this.textarea)
+                rejectOrderAdmin(data).then(data=>{
+                    console.log(data);
+                    if(data.code==200){
+                        this.$message({
+                            message:'修改成功',
+                            type:'success'
+                        })
+                        this.dialogFormVisible = false
+                        this.getData()
+                    }
+                    if(data.code==0){
+                        this.$message({
+                            message:data.message,
+                            type:'error'
+                        })
+                    }
+                })
+            }
+
+        },
+        // 弹出层相关方法
+        // 提交表单
+        submitForm() {
+            let data = new FormData()
+            data.append('id', this.activeid)
+            data.append('price', this.ruleForm.price)
+            editOrderAdmin(data).then(data => {
+                console.log(data);
+                if (data.code == 200) {
+                    this.dialogTableVisible = false
+                    this.$message({
+                        message: '修改成功',
+                        type: 'success'
+                    })
+                }
+                if (data.code == 0) {
+                    this.$message({
+                        message: data.message + ',需要保留两位小数',
+                        type: 'error'
+                    })
+                    this.dialogTableVisible = true
+                }
+            })
+        },
+        //取消添加或编辑
+        cancelForm() {
+            this.dialogTableVisible = false
+        },
+
+    },
+    mounted() {
+        this.getData()
+    },
+}
+</script>
+
+<style scoped lang="less">
+// 提示信息
+.tips {
+    margin: 30px;
+    background-color: #e9ecf9;
+    border-radius: 11px;
+
+    .tipsIcon {
+        margin: 10px 15px;
+        display: inline-block;
+        width: 24px;
+        height: 24px;
+        background: url("../../assets/advertise/Info Circle.png") no-repeat;
+        vertical-align: middle;
+    }
+
+    .tipsText {
+        font-size: 14px;
+        color: #666666;
+    }
+}
+
+// 头部
+.title {
+    margin: 30px 30px 20px 30px;
+    padding: 30px 30px 40px 30px;
+    background-color: #fff;
+    border-radius: 20px 20px 20px 20px;
+    border: 1px solid #E9EDF7;
+
+    .left {
+        float: left;
+    }
+
+    .right {
+        float: right;
+    }
+
+
+    .searchBox {
+        ::v-deep .el-input {
+            position: relative;
+            font-size: 14px;
+            display: inline-block;
+            width: 73%;
+        }
+
+        .searchTitle {
+            padding-bottom: 10px;
+            font-family: Microsoft YaHei, Microsoft YaHei;
+            font-weight: 400;
+            font-size: 14px;
+            color: #999999;
+            line-height: 16px;
+        }
+
+        .el-select {
+            width: 100%;
+            display: inline-block;
+            position: relative;
+        }
+    }
+
+
+    .btnList {
+        float: right;
+        padding-top: 28px;
+
+        button {
+            height: 38px;
+            border: none;
+            border-radius: 8px;
+            padding: 0 20px;
+        }
+
+        .search {
+            background-color: #5570f1;
+            color: #fff;
+            margin-right: 20px;
+        }
+
+        .reset {
+            font-family: Microsoft YaHei, Microsoft YaHei;
+            font-weight: 400;
+            font-size: 16px;
+            color: #333333;
+            background: #F5F7FB;
+            border-radius: 8px 8px 8px 8px;
+            border: 1px solid rgba(85, 112, 241, 0.11);
+        }
+    }
+}
+
+.layerBox {
+    padding: 30px 20px;
+    position: relative;
+
+    .btn {
+        position: absolute;
+        top: 30px;
+        right: 20px;
+        height: 38px;
+        color: #fff;
+        background-color: #5570f1;
+        border: none;
+        border-radius: 8px;
+        padding: 8px 28px 9px;
+        box-sizing: border-box;
+    }
+
+    .listBtnBox {
+        justify-content: left;
+    }
+
+
+    .listDeleteBtn,
+    .listEditBtn,
+    .listReviewBtn {
+        margin-left: 0px;
+        padding-left: 0px;
+        margin-right: 20px;
+        width: 76px;
+        height: 36px;
+        line-height: 36px;
+    }
+
+
+    .listReviewBtn {
+        text-align: center;
+        border-radius: 8px;
+        cursor: pointer;
+        color: #519C66;
+        background-color: rgba(81, 156, 102, 0.16);
+
+        >.review {
+            display: inline-block;
+            width: 20px;
+            height: 20px;
+            background: url("../../assets/advertise/Shield.png");
+            margin-right: 6px;
+            vertical-align: -6px;
+        }
+    }
+
+    ::v-deep .el-form-item {
+        margin-bottom: 50px;
+    }
+
+    ::v-deep .el-select {
+        width: 100%;
+    }
+
+    ::v-deep .el-input--medium,
+    ::v-deep .el-form-item__label {
+        line-height: 36px;
+        font-size: 16px;
+    }
+}
+
+// 弹出层内容
+.dialogText {
+    margin: 0 7px 0 3px;
+    padding-bottom: 1px;
+    padding: 0px 60px 1px 20px;
+
+    .adImage {
+        width: 140px;
+        height: 140px;
+        line-height: 210px;
+        border-radius: 12px;
+        border: 1px solid rgba(85, 112, 241, 0.11);
+
+        img {
+            width: 140px;
+            height: 80px;
+        }
+    }
+
+    .price {
+        ::v-deep .el-input {
+            width: 29%;
+        }
+    }
+
+    .example {
+        font-family: Microsoft YaHei;
+        color: #5570F1;
+    }
+
+    .el_btnList {
+        margin-right: 15px;
+        margin-top: 20px;
+    }
+
+    //日期时间选择器的宽
+    ::v-deep .el-date-editor.el-input {
+        width: 48%;
+    }
+
+    ::v-deep .el-button+.el-button {
+        margin-left: 0px;
+    }
+}
+
+// 弹出层按钮
+.dialogBtn {
+    text-align: center;
+    margin: 50px auto 20px;
+
+    button {
+        width: 184px;
+        padding: 16px;
+        font-family: Microsoft YaHei, Microsoft YaHei;
+        font-weight: 400;
+        font-size: 20px;
+        border: none;
+        border-radius: 12px 12px 12px 12px;
+    }
+
+    // 取消
+    .cancel {
+        color: #333333;
+        background-color: #f5f7fb;
+        border: 2px solid rgba(85, 112, 241, 0.11);
+    }
+
+    // 提交
+    .submit {
+        color: #fff;
+        background-color: #5570F1;
+        margin-left: 40px;
+    }
+}
+
+//审核弹出框
+.radioGroup {
+    ::v-deep .el-form-item {
+        margin-top: 40px;
+        margin-bottom: 0;
+    }
+}
+
+.graph {
+    background-color: #f5f7fb;
+    padding: 60px 100px;
+    overflow: hidden;
+
+    li {
+        float: left;
+    }
+
+    >li:first-child {
+        margin-right: 100px;
+    }
+}
+
+.dialog-footer {
+    margin: 0 auto;
+}
+</style>

+ 835 - 0
src/views/advertise/advertiseList.vue

@@ -0,0 +1,835 @@
+<template>
+    <!-- 广告列表 -->
+    <div>
+        <!-- 提示信息 -->
+        <div class="tips">
+            <el-row>
+                <el-col :span="12">
+                    <i class="tipsIcon"></i>
+                    <span class="tipsText">7个工作日内,若运营没有操作用户的申请,则用户申请的时间、信息等将会释放。</span>
+                </el-col>
+            </el-row>
+        </div>
+        <!-- 头部搜索框部分 -->
+        <div class="title">
+            <el-row>
+                <el-col :span="6" class="left">
+                    <div class="searchBox">
+                        <div class="searchTitle">工单编号</div>
+                        <el-input class="input" v-model="order_code" placeholder="请输入工单编号"></el-input>
+                    </div>
+                </el-col>
+                <el-col :span="6" class="left">
+                    <div class="searchBox">
+                        <div class="searchTitle">审核状态</div>
+                        <el-select v-model="status" placeholder="请选择审核状态">
+                            <el-option v-for="item in order" :key="item.value" :label="item.label" :value="item.value">
+                            </el-option>
+                        </el-select>
+                    </div>
+                </el-col>
+                <el-col :span="6" class="left">
+                    <div class="searchBox">
+                        <div class="searchTitle">广告状态</div>
+                        <el-select v-model="ad_status" placeholder="请选择广告状态">
+                            <el-option v-for="item in order_ad" :key="item.value" :label="item.label"
+                                :value="item.value">
+                            </el-option>
+                        </el-select>
+                    </div>
+                </el-col>
+                <el-col :span="6" class="right">
+                    <div class="btnList">
+                        <button class="search" @click="goSearch">搜索</button>
+                        <button class="reset" @click="goReset">重置</button>
+                    </div>
+                </el-col>
+            </el-row>
+        </div>
+        <!--表格内容 start------------------------------------------------------------>
+        <div class="layerBox">
+            <tableTitle :name="tableDivTitle" />
+            <el-row>
+                <template>
+                    <el-table class="my-table" :data="tableData" style="width: 100%">
+                        <el-table-column fixed prop="id" label="编号" width="90">
+                        </el-table-column>
+                        <el-table-column prop="order_num" label="工单编号" width="120">
+                        </el-table-column>
+                        <el-table-column prop="user_name" label="广告名称" width="255">
+                        </el-table-column>
+                        <el-table-column prop="status" label="审核状态" width="90" algin="center">
+                        </el-table-column>
+                        <el-table-column prop="ad_status" label="广告状态" width="90">
+                        </el-table-column>
+                        <el-table-column prop="sttime" label="开始时间" width="120">
+                        </el-table-column>
+                        <el-table-column prop="edtime" label="结束时间" width="120">
+                        </el-table-column>
+                        <el-table-column prop="cttime" label="创建时间" width="">
+                        </el-table-column>
+                        <el-table-column prop="admin_user_name" label="操作人" width="100">
+                        </el-table-column>
+                        <el-table-column fixed="right" label="操作" width="330">
+                            <template slot-scope="scope">
+                                <div class="listBtnBox">
+                                    <div class="listDeleteBtn" @click="deleteRow(scope.row.id)"><i
+                                            class="el-icon-delete"></i>删除</div>
+                                    <div class="listEditBtn" @click="goEdit(scope.row.id, scope.row)"><i
+                                            class="el-icon-edit-outline"></i>编辑</div>
+                                    <div class="listReviewBtn" @click="goReview(scope.row.id, scope.row)"><i
+                                            class="review"></i>审核</div>
+                                </div>
+                            </template>
+                        </el-table-column>
+                    </el-table>
+                </template>
+            </el-row>
+        </div>
+        <!--分页 start------------------------------------------------------------>
+        <div class="alignBox">
+            <el-row>
+                <el-col :span="24">
+                    <el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange"
+                        :current-page="page" :page-size="pageSize" layout="total, prev, pager, next, jumper"
+                        :total="total">
+                    </el-pagination>
+                </el-col>
+            </el-row>
+        </div>
+        <!--分页 end------------------------------------------------------------>
+        <!--表格内容 end------------------------------------------------------------>
+
+        <!-- 弹出框 编辑 start----------------------------------------------------------->
+        <el-dialog :title="dialogName" :visible.sync="dialogTableVisible" width="56%" top="8vh">
+            <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
+                <div class="dialogText">
+                    <el-form-item label="广告名称:" prop="">
+                        <el-input v-model="ruleForm.name" disabled placeholder="请输入网站名称"></el-input>
+                    </el-form-item>
+                    <el-form-item label="广告网址:" prop="">
+                        <el-input v-model="ruleForm.name" disabled placeholder="请输入网站名称"></el-input>
+                    </el-form-item>
+                    <el-form-item label="广告图:" prop="">
+                        <div class="adImage">
+                            <img src="../../assets/advertise/404.png" alt="">
+                        </div>
+                    </el-form-item>
+                    <el-form-item label="持续时间:" prop="">
+                        <el-date-picker v-model="ruleForm.startTime" type="datetime" disabled placeholder="选择日期时间">
+                        </el-date-picker> 至
+                        <el-date-picker v-model="ruleForm.endTime" type="datetime" disabled placeholder="选择日期时间">
+                        </el-date-picker>
+                    </el-form-item>
+                    <el-form-item label="广告尺寸:" prop="">
+                        <el-radio v-model="ruleForm.radio" label="1">1200x90px</el-radio>
+                        <el-radio v-model="ruleForm.radio" label="2">420x560px</el-radio>
+                    </el-form-item>
+
+                    <el-form-item label="价格:" prop="price">
+                        <div class="price">
+                            <el-input v-model="ruleForm.price" placeholder="请输入价格"></el-input> 元 x
+                            <el-input v-model="ruleForm.days" disabled placeholder="请输入天数"></el-input> 天 x
+                            <el-input v-model="ruleForm.num" disabled placeholder="请输入个数"></el-input> 个
+                        </div>
+                    </el-form-item>
+                    <el-form-item label="广告位置:" prop="">
+                        <span class="example" @click="goGraph">查看示例图</span>
+                        <div>
+                            <el-button disabled v-for="item in 12" class="el_btnList">中农兴业网 一号广告位</el-button>
+                        </div>
+                    </el-form-item>
+                </div>
+                <div class="dialogBtn">
+                    <button class="cancel" @click="cancelForm">取消</button>
+                    <button class="submit" @click="submitForm">提交</button>
+                </div>
+            </el-form>
+        </el-dialog>
+        <!-- 弹出框 编辑 end----------------------------------------------------------->
+
+        <!-- 弹出框 广告位示例图 start----------------------------------------------------------->
+        <el-dialog title="审核状态" :visible.sync="dialogVisible" width="50%" top="25vh">
+            <ul class="graph">
+                <li>
+                    <h3>首页:</h3>
+                    <img src="../../assets/advertise/guanggaowei2.png" alt="">
+                </li>
+                <li>
+                    <h3>列表页:</h3>
+                    <img src="../../assets/advertise/guanggaowei1.png" alt="">
+                </li>
+            </ul>
+            <div slot="footer" class="dialog-footer">
+                <el-button @click="dialogVisible = false">取 消</el-button>
+                <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
+            </div>
+        </el-dialog>
+        <!-- 弹出框 广告位示例图 end----------------------------------------------------------->
+
+        <!-- 弹出框 审核 start----------------------------------------------------------->
+        <el-dialog title="审核状态" :visible.sync="dialogFormVisible" width="35%" top="25vh">
+            <el-form ref="form" :model="form" label-width="80px">
+                <div class="radioGroup">
+                    <el-radio-group v-model="status_radio">
+                        <el-radio :label="3">通过</el-radio>
+                        <el-radio :label="6">驳回</el-radio>
+                    </el-radio-group>
+                    <el-form-item v-show="this.status_radio == 6" label="驳回原因:" :label-width="formLabelWidth"
+                        prop="name">
+                        <el-input v-model="textarea" type="textarea" resize="none" :rows="3" placeholder="请输入内容">
+                        </el-input>
+                    </el-form-item>
+                </div>
+
+            </el-form>
+            <div slot="footer" class="dialog-footer">
+                <el-button @click="dialogFormVisible = false">取 消</el-button>
+                <el-button type="primary" @click="subimtStatus">确 定</el-button>
+            </div>
+        </el-dialog>
+        <!-- 弹出框 审核 end----------------------------------------------------------->
+    </div>
+
+</template>
+
+<script>
+//表格标题
+import tableTitle from './components/tableTitle.vue';
+
+//引入公用样式
+import '@/styles/global.less';
+import { getStatus, getOrderListAdmin, getOrderDetailAdmin, applyOrderStatusAdmin, editOrderAdmin, rejectOrderAdmin, endOrderAdmin, delOrderAdmin } from '@/api/advertise'
+export default {
+    components: {
+        tableTitle,//表格标题-
+    },
+    data() {
+        return {
+            tableDivTitle: "广告列表",  //列表标题
+            dialogTableVisible: false,      //编辑弹框
+            dialogName: '编辑', //编辑弹窗名称
+            dialogFormVisible: false,     //审核弹框
+            dialogVisible: false,  //示例图弹窗
+
+            form: {},  //审核状态的ref属性名称
+
+
+            tableData: [],//表格数据
+
+            // 搜索框相关
+            order_code: '', //工单编号 
+            status: '',//审核状态
+            ad_status: '',//广告状态
+            order: [ //审核状态数据
+                {
+                    value: 1,
+                    label: '已通过'
+                },
+                {
+                    value: 2,
+                    label: '已驳回'
+                },
+                {
+                    value: 5,
+                    label: '待审核'
+                },
+            ],
+            order_ad: [ //广告状态数据
+                {
+                    value: 1,
+                    label: '待投放'
+                },
+                {
+                    value: 2,
+                    label: '已驳回'
+                },
+                {
+                    value: 3,
+                    label: '已撤回'
+                },
+                {
+                    value: 4,
+                    label: '已修改'
+                },
+                {
+                    value: 5,
+                    label: '已过期'
+                },
+                {
+                    value: 6,
+                    label: '待审核'
+                },
+                {
+                    value: 7,
+                    label: '已结束'
+                },
+                {
+                    value: 8,
+                    label: '投放中'
+                }
+            ],
+
+            //活动id
+            activeid: "",
+
+            // 分页相关
+            page: 1,
+            pageSize: 10,
+            total: '',
+
+            // 审核弹窗相关
+            status_radio: "",   //审核状态
+            textarea: '',    //驳回原因
+
+            formLabelWidth: '',
+
+            ruleForm: {
+                name: '', //广告名称
+                ad_url: '', //广告网址
+                radio: '',//广告尺寸
+                startTime: '', //开始时间
+                endTime: '',   //结束时间
+                price: '',  //价格
+                days: '',   //天数
+                num: '',   //个数
+            },
+            rules: {
+                name: [
+                    { required: true, message: '请输入网站名称', trigger: 'blur' },
+                ],
+                price: [
+                    { required: true, message: '请输入要修改的价格', trigger: 'change' }
+                ]
+            }
+        }
+    },
+    watch: {
+        status_radio: {
+            handler(newVal, oldVal) {
+                // console.log(newVal);
+            },
+            deep: true,
+            immediate: true
+        }
+    },
+    methods: {
+        //1.列表和分页相关 start ------------------------------------------------------------>
+        //1.1 开始请求列表信息方法
+        getData() {
+            let data = new FormData()
+            data.append('page', this.page)
+            data.append('pageSize', this.pageSize)
+            console.log(data);
+
+            getOrderListAdmin(data).then(data => {
+                console.log("全部数据", data);
+                console.log(data.data.rows);
+                this.tableData = data.data.rows
+                this.total = data.data.count
+                for (let item of this.tableData) {
+                    if (item.status == 1) {
+                        item.status = "已通过"
+                    } else if (item.status == 2) {
+                        item.status = "已驳回"
+                    } else if (item.status == 6) {
+                        item.status = "待审核"
+                    }
+
+                    if (item.ad_status == 1) {
+                        item.ad_status = "待投放"
+                    } else if (item.ad_status == 2) {
+                        item.ad_status = "已驳回"
+                    } else if (item.ad_status == 3) {
+                        item.ad_status = "已撤回"
+                    } else if (item.ad_status == 4) {
+                        item.ad_status = "已修改"
+                    } else if (item.ad_status == 5) {
+                        item.ad_status = "已过期"
+                    } else if (item.ad_status == 6) {
+                        item.ad_status = "待审核"
+                    } else if (item.ad_status == 7) {
+                        item.ad_status = "已结束"
+                    } else if (item.ad_status == 8) {
+                        item.ad_status = "待投放"
+                    }
+                }
+            })
+        },
+
+        //1.2 删除内容
+        deleteRow(id) {
+            console.log(id);
+            let data = new FormData()
+            data.append('id', id)
+
+            this.$confirm('注意:删除后,该条信息及其绑定关系全部删除', '是否确认删除该条信息?', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+            }).then(() => {
+                console.log("当前删除:" + id)
+                let data = new FormData()
+                data.append('id', id)
+                console.log(data);
+
+                delOrderAdmin(data).then(data => {
+                    console.log(data);
+                    if (data.code == 0) {
+                        this.$message({
+                            message: data.message,
+                            type: 'error'
+                        })
+                    }
+                    if (data.code == 200) {
+                        this.$message({
+                            type: 'success',
+                            message: '删除成功!'
+                        });
+                    }
+                    this.getData()
+                })
+            }).catch(() => {
+                this.$message({
+                    type: 'warning',
+                    message: '已取消删除'
+                });
+            });
+        },
+        //1.3 查看示例图
+        goGraph() {
+            this.dialogVisible = true
+        },
+
+        //1.4 列表内容分页
+        //直接跳转
+        handleSizeChange(val) {
+            this.page = val;
+            this.getData();
+        },
+        //1.5 点击分页
+        handleCurrentChange(val) {
+            this.page = val;
+            this.getData();
+        },
+        // 1.6 搜索按钮
+        goSearch() {
+            console.log(this.status);
+            
+            let data = new FormData()
+            data.append('page', this.page)
+            data.append('pageSize', this.pageSize)
+            data.append('status', this.status)
+            data.append('ad_status', this.ad_status)
+            data.append('order_num', this.order_code)
+            data.append('sttime', "")
+            data.append('edtime', "")
+            console.log(data);
+
+            getOrderListAdmin(data).then(data => {
+                console.log(data);
+                console.log(data.data.rows);
+                this.tableData = data.data.rows
+                this.total = data.data.count
+                for (let item of this.tableData) {
+                    if (item.status == 1) {
+                        item.status = "已通过"
+                    } else if (item.status == 2) {
+                        item.status = "已驳回"
+                    } else if (item.status == 6) {
+                        item.status = "待审核"
+                    }
+
+                    if (item.ad_status == 1) {
+                        item.ad_status = "待投放"
+                    } else if (item.ad_status == 2) {
+                        item.ad_status = "已驳回"
+                    } else if (item.ad_status == 3) {
+                        item.ad_status = "已撤回"
+                    } else if (item.ad_status == 4) {
+                        item.ad_status = "已修改"
+                    } else if (item.ad_status == 5) {
+                        item.ad_status = "已过期"
+                    } else if (item.ad_status == 6) {
+                        item.ad_status = "待审核"
+                    } else if (item.ad_status == 7) {
+                        item.ad_status = "已结束"
+                    } else if (item.ad_status == 8) {
+                        item.ad_status = "待投放"
+                    }
+                }
+            })
+        },
+        //1.7 重置按钮
+        goReset() {
+            this.order_code = '',
+                this.status = ''
+            this.ad_status = ''
+            this.getData();
+        },
+        //列表和分页相关 end ------------------------------------------------------------>
+
+        //1.9 编辑
+        goEdit(id, val) {
+            console.log(id);
+
+            this.activeid = id
+            this.dialogTableVisible = true
+            console.log(id, val);
+            this.ruleForm.name = val.user_name
+            this.ruleForm.ad_url = val.ad_url
+            // this.ruleForm.radio = val.width
+            this.ruleForm.startTime = val.sttime
+            this.ruleForm.endTime = val.edtime
+            this.ruleForm.price = val.price
+            this.ruleForm.days = val.days
+        },
+
+        //2.0 审核
+        goReview(id, val) {
+            this.activeid = id
+            this.dialogFormVisible = true
+        },
+
+        //审核中的确定
+        subimtStatus() {
+            if (this.status_radio == '3') {
+                let data = new FormData()
+                data.append('id', this.activeid)
+                applyOrderStatusAdmin(data).then(data => {
+                    console.log(data);
+                    if (data.code == 200) {
+                        this.$message({
+                            message: '已修改审核状态',
+                            type: 'success'
+                        })
+                        this.dialogFormVisible = false
+                        this.getData()
+                    }
+                    if (data.code == 0) {
+                        this.$message({
+                            message: data.message,
+                            type: 'error'
+                        })
+                    }
+                })
+            }
+            if (this.status_radio == '6') {
+                let data = new FormData()
+                data.append('id', this.activeid)
+                data.append('reason', this.textarea)
+                rejectOrderAdmin(data).then(data=>{
+                    console.log(data);
+                    if(data.code==200){
+                        this.$message({
+                            message:'修改成功',
+                            type:'success'
+                        })
+                        this.dialogFormVisible = false
+                        this.getData()
+                    }
+                    if(data.code==0){
+                        this.$message({
+                            message:data.message,
+                            type:'error'
+                        })
+                    }
+                })
+            }
+
+        },
+        // 弹出层相关方法
+        // 提交表单
+        submitForm() {
+            let data = new FormData()
+            data.append('id', this.activeid)
+            data.append('price', this.ruleForm.price)
+            editOrderAdmin(data).then(data => {
+                console.log(data);
+                if (data.code == 200) {
+                    this.dialogTableVisible = false
+                    this.$message({
+                        message: '修改成功',
+                        type: 'success'
+                    })
+                }
+                if (data.code == 0) {
+                    this.$message({
+                        message: data.message + ',需要保留两位小数',
+                        type: 'error'
+                    })
+                    this.dialogTableVisible = true
+                }
+            })
+        },
+        //取消添加或编辑
+        cancelForm() {
+            this.dialogTableVisible = false
+        },
+
+    },
+    mounted() {
+        this.getData()
+    },
+}
+</script>
+
+<style scoped lang="less">
+// 提示信息
+.tips {
+    margin: 30px;
+    background-color: #e9ecf9;
+    border-radius: 11px;
+
+    .tipsIcon {
+        margin: 10px 15px;
+        display: inline-block;
+        width: 24px;
+        height: 24px;
+        background: url("../../assets/advertise/Info Circle.png") no-repeat;
+        vertical-align: middle;
+    }
+
+    .tipsText {
+        font-size: 14px;
+        color: #666666;
+    }
+}
+
+// 头部
+.title {
+    margin: 30px 30px 20px 30px;
+    padding: 30px 30px 40px 30px;
+    background-color: #fff;
+    border-radius: 20px 20px 20px 20px;
+    border: 1px solid #E9EDF7;
+
+    .left {
+        float: left;
+    }
+
+    .right {
+        float: right;
+    }
+
+
+    .searchBox {
+        ::v-deep .el-input {
+            position: relative;
+            font-size: 14px;
+            display: inline-block;
+            width: 73%;
+        }
+
+        .searchTitle {
+            padding-bottom: 10px;
+            font-family: Microsoft YaHei, Microsoft YaHei;
+            font-weight: 400;
+            font-size: 14px;
+            color: #999999;
+            line-height: 16px;
+        }
+
+        .el-select {
+            width: 100%;
+            display: inline-block;
+            position: relative;
+        }
+    }
+
+
+    .btnList {
+        float: right;
+        padding-top: 28px;
+
+        button {
+            height: 38px;
+            border: none;
+            border-radius: 8px;
+            padding: 0 20px;
+        }
+
+        .search {
+            background-color: #5570f1;
+            color: #fff;
+            margin-right: 20px;
+        }
+
+        .reset {
+            font-family: Microsoft YaHei, Microsoft YaHei;
+            font-weight: 400;
+            font-size: 16px;
+            color: #333333;
+            background: #F5F7FB;
+            border-radius: 8px 8px 8px 8px;
+            border: 1px solid rgba(85, 112, 241, 0.11);
+        }
+    }
+}
+
+.layerBox {
+    padding: 30px 20px;
+    position: relative;
+
+    .btn {
+        position: absolute;
+        top: 30px;
+        right: 20px;
+        height: 38px;
+        color: #fff;
+        background-color: #5570f1;
+        border: none;
+        border-radius: 8px;
+        padding: 8px 28px 9px;
+        box-sizing: border-box;
+    }
+
+    .listBtnBox {
+        justify-content: left;
+    }
+
+
+    .listDeleteBtn,
+    .listEditBtn,
+    .listReviewBtn {
+        margin-left: 0px;
+        padding-left: 0px;
+        margin-right: 20px;
+        width: 76px;
+        height: 36px;
+        line-height: 36px;
+    }
+
+
+    .listReviewBtn {
+        text-align: center;
+        border-radius: 8px;
+        cursor: pointer;
+        color: #519C66;
+        background-color: rgba(81, 156, 102, 0.16);
+
+        >.review {
+            display: inline-block;
+            width: 20px;
+            height: 20px;
+            background: url("../../assets/advertise/Shield.png");
+            margin-right: 6px;
+            vertical-align: -6px;
+        }
+    }
+
+    ::v-deep .el-form-item {
+        margin-bottom: 50px;
+    }
+
+    ::v-deep .el-select {
+        width: 100%;
+    }
+
+    ::v-deep .el-input--medium,
+    ::v-deep .el-form-item__label {
+        line-height: 36px;
+        font-size: 16px;
+    }
+}
+
+// 弹出层内容
+.dialogText {
+    margin: 0 7px 0 3px;
+    padding-bottom: 1px;
+    padding: 0px 60px 1px 20px;
+
+    .adImage {
+        width: 140px;
+        height: 140px;
+        line-height: 210px;
+        border-radius: 12px;
+        border: 1px solid rgba(85, 112, 241, 0.11);
+
+        img {
+            width: 140px;
+            height: 80px;
+        }
+    }
+
+    .price {
+        ::v-deep .el-input {
+            width: 29%;
+        }
+    }
+
+    .example {
+        font-family: Microsoft YaHei;
+        color: #5570F1;
+    }
+
+    .el_btnList {
+        margin-right: 15px;
+        margin-top: 20px;
+    }
+
+    //日期时间选择器的宽
+    ::v-deep .el-date-editor.el-input {
+        width: 48%;
+    }
+
+    ::v-deep .el-button+.el-button {
+        margin-left: 0px;
+    }
+}
+
+// 弹出层按钮
+.dialogBtn {
+    text-align: center;
+    margin: 50px auto 20px;
+
+    button {
+        width: 184px;
+        padding: 16px;
+        font-family: Microsoft YaHei, Microsoft YaHei;
+        font-weight: 400;
+        font-size: 20px;
+        border: none;
+        border-radius: 12px 12px 12px 12px;
+    }
+
+    // 取消
+    .cancel {
+        color: #333333;
+        background-color: #f5f7fb;
+        border: 2px solid rgba(85, 112, 241, 0.11);
+    }
+
+    // 提交
+    .submit {
+        color: #fff;
+        background-color: #5570F1;
+        margin-left: 40px;
+    }
+}
+
+//审核弹出框
+.radioGroup {
+    ::v-deep .el-form-item {
+        margin-top: 40px;
+        margin-bottom: 0;
+    }
+}
+
+.graph {
+    background-color: #f5f7fb;
+    padding: 60px 100px;
+    overflow: hidden;
+
+    li {
+        float: left;
+    }
+
+    >li:first-child {
+        margin-right: 100px;
+    }
+}
+
+.dialog-footer {
+    margin: 0 auto;
+}
+</style>

+ 43 - 0
src/views/advertise/components/tableTitle.vue

@@ -0,0 +1,43 @@
+<template>
+  <div class="tableTitle">
+    <span class="tableFloatLine"></span>
+    {{name}}
+  </div>
+</template>
+
+<script>
+export default {
+  props: {
+    name: {
+      type: String,
+      required: true,
+    },
+  },
+  data() {
+    return {
+      someData: '',
+    };
+  },
+};
+</script>
+
+<style scoped lang="less">
+  .tableTitle {
+    height: 38px;
+    line-height: 38px;
+    color:#333333;
+    position: relative;
+    margin-bottom: 30px;
+    .tableFloatLine {
+      // display: inline-block;
+      width: 3px;
+      height:16px;
+      background:#5570F1;
+      display: block;
+      position: absolute;
+      left:-20px;
+      top:10px;
+      // vertical-align: middle;
+    }
+  }
+</style>

+ 41 - 0
src/views/crawler/components/tableTitle.vue

@@ -0,0 +1,41 @@
+<template>
+  <div class="tableTitle">
+    <span class="tableFloatLine"></span>
+    {{name}}
+  </div>
+</template>
+
+<script>
+export default {
+  props: {
+    name: {
+      type: String,
+      required: true,
+    },
+  },
+  data() {
+    return {
+      someData: '',
+    };
+  },
+};
+</script>
+
+<style scoped lang="less">
+  .tableTitle {
+    height: 38px;
+    line-height: 38px;
+    color:#333333;
+    position: relative;
+    margin-bottom: 30px;
+    .tableFloatLine {
+      width: 3px;
+      height:16px;
+      background:#5570F1;
+      display: block;
+      position: absolute;
+      left:-20px;
+      top:10px;
+    }
+  }
+</style>

+ 549 - 0
src/views/crawler/webCrawler.vue

@@ -0,0 +1,549 @@
+<template>
+    <!-- 建立网站 -->
+    <div>
+        <div class="title">
+            <el-row>
+                <el-col :span="6" class="left">
+                    <div class="searchBox">
+                        <div class="searchTitle">网站名称:</div>
+                        <el-input v-model="webName" placeholder="请输入网站名称"></el-input>
+                    </div>
+                </el-col>
+                <el-col :span="10" class="right">
+                    <div class="btnList">
+                        <button class="search" @click="goSearch">搜索</button>
+                        <button class="reset" @click="reset">重置</button>
+                    </div>
+                </el-col>
+            </el-row>
+        </div>
+        <!--表格内容 start------------------------------------------------------------>
+        <div class="layerBox">
+            <tableTitle :name="tableDivTitle" />
+            <button class="btn" @click="addWebsite">添加网站</button>
+            <el-row>
+                <template>
+                    <el-table class="my-table" :data="tableData" style="width: 100%">
+                        <el-table-column fixed prop="id" label="编号" width="100">
+                        </el-table-column>
+                        <el-table-column prop="name" label="网站名称" width="">
+                        </el-table-column>
+                        <el-table-column prop="url" label="网站网址" width="">
+                        </el-table-column>
+                        <el-table-column prop="created_at" label="创建时间" width="">
+                        </el-table-column>
+                        <el-table-column prop="updated_at" label="修改时间" width="">
+                        </el-table-column>
+                        <el-table-column fixed="right" label="操作" width="330">
+                            <template slot-scope="scope">
+                                <div class="listBtnBox">
+                                    <div class="listDeleteBtn" @click="deleteRow(scope.row.id, scope.row)"><i
+                                            class="el-icon-delete"></i>删除</div>
+                                    <div class="listEditBtn" @click="goEdit(scope.row.id, scope.row)"><i
+                                            class="el-icon-edit-outline"></i>编辑</div>
+                                    <div class="listLookBtn" @click="goLook(scope.row.id, scope.row)"><i
+                                            class="el-icon-view"></i>查看</div>
+                                </div>
+                            </template>
+                        </el-table-column>
+                    </el-table>
+                </template>
+            </el-row>
+        </div>
+        <!--分页 start------------------------------------------------------------>
+        <div class="alignBox">
+            <el-row>
+                <el-col :span="24">
+                    <el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange"
+                        :current-page="page" :page-size="pageSize" layout="total, prev, pager, next, jumper"
+                        :total="total">
+                    </el-pagination>
+                </el-col>
+            </el-row>
+        </div>
+        <!--分页 end------------------------------------------------------------>
+        <!--表格内容 end------------------------------------------------------------>
+
+        <!-- 弹出框 start------------------------------------------------------------>
+        <el-dialog :title="dialogName" :visible.sync="dialogTableVisible" width="50%" :close-on-click-modal="false">
+            <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
+                <div class="dialogText">
+                    <el-form-item label="网站名称:" prop="name">
+                        <el-input v-model="ruleForm.name" :disabled="this.dialogName == '查看' ? true : false"
+                            placeholder="请输入采集的源网站名称"></el-input>
+                    </el-form-item>
+                    <el-form-item label="网站地址:" prop="url">
+                        <el-input v-model="ruleForm.url" :disabled="this.dialogName == '查看' ? true : false"
+                            placeholder="请输入网站地址(即网站首页URL)"></el-input>
+                    </el-form-item>
+                    <el-form-item label="规则类型:" prop="ruleType" class="keywords">
+                        <el-select v-model="ruleForm.ruleType" placeholder="请选择规则类型" :disabled="disabledType">
+                            <el-option label="一般规则" value="1"></el-option>
+                            <el-option label="接口规则" value="2"></el-option>
+                            <el-option label="自定义规则" value="3"></el-option>
+                        </el-select>
+                        <el-tooltip class="item" effect="dark" content="列表翻页后,网址变化的为一般接口;列表翻页后,网址没变化的为接口规则。"
+                            placement="top-start">
+                            <i class="el-icon-warning"></i>
+                        </el-tooltip>
+                    </el-form-item>
+                </div>
+                <div class="dialogBtn">
+                    <button class="cancel" @click="cancelForm">取消</button>
+                    <button class="submit" @click="submitForm">提交</button>
+                </div>
+            </el-form>
+        </el-dialog>
+        <!-- 弹出框 end------------------------------------------------------------>
+    </div>
+
+</template>
+
+<script>
+//表格标题
+import tableTitle from './components/tableTitle.vue';
+//引入公用样式
+import '@/styles/global.less';
+// 引入api
+import { addWeb, getWeb, updateWeb, delWeb } from '@/api/crawler'
+
+export default {
+    components: {
+        tableTitle,//表格标题
+    },
+    data() {
+        return {
+            tableDivTitle: "网站列表",  //表格标题
+            webName: '', // 网站名称
+            activeId: '', // 被编辑的网站的id
+            activeType: '', //被编辑网站的type
+            disabled: true, //是否禁用
+
+
+            // 分页器相关
+            total: 0,
+            page: 1,
+            pageSize: 10,
+
+            //表格相关
+            tableData: [],
+
+            //弹出框相关
+            dialogTableVisible: false,  //是否显示
+            dialogName: '',     //弹框标题名
+            disabledType: true,  // 编辑的时候类型不可以改变
+
+            //表单相关
+            ruleForm: {
+                name: '',
+                url: '',
+                ruleType: "",
+            },
+            rules: {   //规则
+                name: [
+                    { required: true, message: '请输入采集的源网站名称', trigger: 'blur' },
+                ],
+                url: [
+                    { required: true, message: '请输入网站地址(即网站首页URL)', trigger: 'blur' }
+                ],
+                ruleType: [
+                    { required: true, message: '请选择规则类型', trigger: 'blur' }
+                ]
+            },
+
+        }
+    },
+    methods: {
+        //1.列表和分页相关 start ------------------------------------------------------------>
+        //1.1 获取网站列表数据
+        getData() {
+            getWeb({
+                page: this.page,
+                pageSize: this.pageSize,
+            }).then(data => {
+                console.log(data);
+                this.tableData = data.data.rep
+                this.total = data.data.count
+            })
+        },
+        //1.2 删除内容
+        deleteRow(id, val) {
+            this.activeId = id
+            this.activeType = val.type
+            this.$confirm('注意:删除后,该条信息及其绑定关系全部删除', '是否确认删除该条信息?', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+            }).then(() => {
+                console.log("当前删除:" + id)
+                delWeb({
+                    // id:12,
+                    id: this.activeId,
+                    type: this.activeType,
+                }).then(data => {
+                    console.log(data);
+                    if (data.code == 200) {
+                        this.$message({
+                            type: 'success',
+                            message: '删除成功!'
+                        });
+                        this.getData()
+                    } else if (data.code == 0) {
+                        this.$message({
+                            type: 'error',
+                            message: data.message
+                        });
+                    }
+                })
+            }).catch(() => {
+                this.$message({
+                    type: 'warning',
+                    message: '已取消'
+                });
+            });
+        },
+
+        //1.3 列表内容分页
+        //直接跳转
+        handleSizeChange(val) {
+            this.page = val;
+            this.getData();
+        },
+        //1.4 点击分页
+        handleCurrentChange(val) {
+            this.page = val;
+            this.getData();
+        },
+
+        // 1.5 搜索按钮
+        goSearch() {
+            if (this.webName) {
+                getWeb({
+                    page: this.page,
+                    pageSize: this.pageSize,
+                    keyWord: this.webName
+                }).then(data => {
+                    // console.log(data);
+                    this.total = data.data.count
+                    this.tableData = data.data.rep
+                })
+            } else {
+                getWeb({
+                    page: this.page,
+                    pageSize: this.pageSize,
+                    keyWord: this.webName
+                }).then(data => {
+                    // console.log(data.message);
+                    this.$message.error(data.message);
+                })
+            }
+        },
+        //1.6 重置按钮
+        reset() {
+            this.webName = ''
+            this.getData()
+        },
+        //列表和分页相关 end ------------------------------------------------------------>
+
+        //1.7 添加
+        addWebsite() {
+            this.dialogTableVisible = true
+            this.dialogName = "添加"
+            this.disabledType = false //添加的时候类型可以选择
+            this.ruleForm.name = ""
+            this.ruleForm.url = ""
+            this.ruleForm.ruleType = ""
+        },
+        //1.8 编辑
+        goEdit(id, val) {
+            this.dialogTableVisible = true //弹框显示
+            this.dialogName = "编辑"    //弹框名字
+            this.disabledType = true //编辑的时候类型不可以改变
+            this.activeId = id
+            this.activeType = val.type
+            this.ruleForm.name = val.name
+            this.ruleForm.url = val.url
+            if (val.type == 1) {
+                this.ruleForm.ruleType = "规则类"
+            } else if (val.type == 2) {
+                this.ruleForm.ruleType = "接口类"
+            } else if (val.type == 3) {
+                this.ruleForm.ruleType = "自定义"
+            }
+        },
+        //1.9 查看
+        goLook(id, val) {
+            // console.log(id);
+            // console.log(val.type);
+            // console.log(val.name);
+            console.log(this.ruleForm.ruleType);
+
+
+            //跳转到规则列表页
+            this.$router.push({
+                path: '/webRule',
+                query: {
+                    id: id,
+                    type: val.type,
+                    name: val.name
+                }
+            })
+        },
+
+        // 弹出层相关方法
+        // 提交表单
+        submitForm() {
+            if (!this.ruleForm.name) {
+                this.$message.error("请将数据填写完整");
+                return
+            }
+            if (!this.ruleForm.url) {
+                this.$message.error("请将数据填写完整");
+                return
+            }
+            if (!this.ruleForm.ruleType) {
+                this.$message.error('请将数据填写完整')
+                return
+            }
+            if (this.dialogName == "添加") {
+                //添加
+                addWeb({
+                    name: this.ruleForm.name,
+                    url: this.ruleForm.url,
+                    type: this.ruleForm.ruleType
+                }).then(data => {
+                    console.log(data);
+                    if (data.code == 0) {
+                        this.$message.error(data.message)
+                        this.dialogTableVisible = false
+                    } else if (data.code == 200) {
+                        this.$message({
+                            message: data.data,
+                            type: 'success'
+                        });
+                        this.dialogTableVisible = false
+                        this.getData()
+                    }
+                })
+            } else if (this.dialogName == "编辑") {
+                updateWeb({
+                    name: this.ruleForm.name,
+                    url: this.ruleForm.url,
+                    id: this.activeId,
+                }).then(data => {
+                    console.log(data);
+                    if (data.code == 0) {
+                        this.$message({
+                            message: data.message,
+                            type: 'error'
+                        })
+                    } else if (data.code == 200) {
+                        this.$message({
+                            message: "修改成功",
+                            type: 'success'
+                        })
+                        this.dialogTableVisible = false
+                        this.getData()
+                    }
+                })
+            } else if (this.dialogName == "查看") {
+                this.dialogTableVisible = false
+            }
+        },
+        //取消添加或编辑
+        cancelForm() {
+            this.dialogTableVisible = false
+        },
+    },
+    mounted() {
+        //获取网站列表数据
+        this.getData()
+
+    }
+}
+</script>
+
+<style scoped lang="less">
+.title {
+    margin: 30px 30px 20px 30px;
+    padding: 30px 30px 40px 30px;
+    background-color: #fff;
+    border-radius: 20px 20px 20px 20px;
+    border: 1px solid #E9EDF7;
+
+    .left {
+        float: left;
+    }
+
+    .right {
+        float: right;
+    }
+
+    .searchBox {
+        .searchTitle {
+            padding-bottom: 10px;
+            font-family: Microsoft YaHei, Microsoft YaHei;
+            font-weight: 400;
+            font-size: 14px;
+            color: #999999;
+            line-height: 16px;
+        }
+
+        .el-select {
+            width: 300px;
+            display: inline-block;
+            position: relative;
+        }
+    }
+
+    .btnList {
+        float: right;
+        padding-top: 28px;
+
+        button {
+            width: 120px;
+            height: 38px;
+            border: none;
+            border-radius: 8px;
+            // padding: 0 30px;
+        }
+
+        .search {
+            background-color: #5570f1;
+            color: #fff;
+            margin-right: 20px;
+        }
+
+        .reset {
+            font-family: Microsoft YaHei, Microsoft YaHei;
+            font-weight: 400;
+            font-size: 16px;
+            color: #333333;
+            background: #F5F7FB;
+            border-radius: 8px 8px 8px 8px;
+            border: 1px solid rgba(85, 112, 241, 0.11);
+        }
+    }
+}
+
+.layerBox {
+    padding: 30px 20px;
+    position: relative;
+
+    .btn {
+        position: absolute;
+        top: 30px;
+        right: 20px;
+        height: 38px;
+        color: #fff;
+        background-color: #5570f1;
+        border: none;
+        border-radius: 8px;
+        padding: 8px 28px 9px;
+        box-sizing: border-box;
+    }
+
+    .listBtnBox {
+        justify-content: left;
+    }
+
+
+    .listDeleteBtn,
+    .listEditBtn,
+    .listLookBtn {
+        margin-left: 0px;
+        padding-left: 0px;
+        margin-right: 20px;
+        width: 76px;
+        height: 36px;
+        line-height: 36px;
+    }
+
+
+    .listLookBtn {
+        text-align: center;
+        border-radius: 8px;
+        cursor: pointer;
+        color: #55b5f1;
+        background-color: rgba(85, 181, 241, 0.16);
+
+        >i {
+            padding-right: 8px;
+        }
+    }
+
+    // from表单中每条数据的下外边距
+    ::v-deep .el-form-item {
+        margin-bottom: 50px;
+    }
+
+    //下拉框宽度
+    ::v-deep .el-select {
+        width: 100%;
+    }
+
+    ::v-deep .el-input--medium,
+    ::v-deep .el-form-item__label {
+        line-height: 36px;
+        font-size: 16px;
+    }
+}
+
+// 弹出层内容
+.dialogText {
+    margin: 0 7px 0 3px;
+    padding-top: 20px;
+    padding-bottom: 1px;
+    padding: 20px 60px 1px 20px;
+    background-color: #f5f7fb;
+
+    // from表单中每条数据的下外边距
+    ::v-deep .el-form-item {
+        margin-bottom: 50px;
+    }
+
+    //下拉框宽度
+    ::v-deep .el-select {
+        width: 100%;
+    }
+
+    .keywords {
+        position: relative;
+
+        i {
+            position: absolute;
+            top: 0;
+            left: -15px;
+        }
+    }
+}
+
+// 弹出层按钮
+.dialogBtn {
+    text-align: center;
+    margin: 50px auto 20px;
+
+    button {
+        width: 184px;
+        padding: 16px;
+        font-family: Microsoft YaHei, Microsoft YaHei;
+        font-weight: 400;
+        font-size: 20px;
+        border: none;
+        border-radius: 12px 12px 12px 12px;
+    }
+
+    // 取消
+    .cancel {
+        color: #333333;
+        background-color: #f5f7fb;
+        border: 2px solid rgba(85, 112, 241, 0.11);
+    }
+
+    // 提交
+    .submit {
+        color: #fff;
+        background-color: #5570F1;
+        margin-left: 40px;
+    }
+}
+</style>

+ 559 - 0
src/views/crawler/webCrawlerList.vue

@@ -0,0 +1,559 @@
+<template>
+    <!-- 采集列表 -->
+    <div>
+        <div class="title">
+            <el-row>
+                <el-col :span="6" class="left">
+                    <div class="searchBox">
+                        <div class="searchTitle">资讯题目</div>
+                        <el-input v-model="message_name" placeholder="请输入资讯名称"></el-input>
+                    </div>
+                </el-col>
+                <el-col :span="6" class="left">
+                    <div class="searchBox">
+                        <div class="searchTitle">来源</div>
+                        <el-input v-model="message_from" placeholder="请输入来源"></el-input>
+                    </div>
+                </el-col>
+                <el-col :span="6" class="left">
+                    <div class="searchBox">
+                        <div class="searchTitle">导入状态</div>
+                        <el-select v-model="message_state" placeholder="请选择导入状态">
+                            <el-option v-for="item in statusOptions" :key="item.value" :label="item.label"
+                                :value="item.value">
+                            </el-option>
+                        </el-select>
+                    </div>
+                </el-col>
+                <el-col :span="6" class="right">
+                    <div class="btnList">
+                        <button class="search" @click="goSearch">搜索</button>
+                        <button class="reset" @click="goReset">重置</button>
+                    </div>
+                </el-col>
+            </el-row>
+        </div>
+        <!--表格内容 start------------------------------------------------------------>
+        <div class="layerBox">
+            <tableTitle :name="tableDivTitle" />
+            <div class="btnList">
+                <button class="navigation" @click="toNavigation">关联导航池</button>
+                <button class="consultList" @click="importMessage">导入资讯列表</button>
+            </div>
+
+            <el-row>
+                <template>
+                    <el-table class="my-table" :data="tableData" style="width: 100%">
+                        <el-table-column fixed prop="id" label="编号" width="80">
+                        </el-table-column>
+                        <el-table-column prop="title" label="资讯题目" width="230">
+                        </el-table-column>
+                        <el-table-column prop="oldtitle" label="原始资讯题目" width="230">
+                        </el-table-column>
+                        <el-table-column prop="category.name" label="导航池名称" width="90">
+                        </el-table-column>
+                        <el-table-column prop="source" label="来源" width="180">
+                        </el-table-column>
+                        <el-table-column label="导入状态" width="80" prop="state">
+                        </el-table-column>
+                        <el-table-column prop="author" label="作者" width="80">
+                        </el-table-column>
+                        <el-table-column prop="created_at" label="采集时间" width="160">
+                        </el-table-column>
+                        <el-table-column prop="updated_at" label="修改时间" width="160">
+                        </el-table-column>
+                        <el-table-column fixed="right" label="操作" width="200">
+                            <template slot-scope="scope">
+                                <div class="listBtnBox">
+                                    <div class="listDeleteBtn" @click="deleteRow(scope.row.id, scope.row)"><i
+                                            class="el-icon-delete"></i>删除</div>
+                                    <div class="listEditBtn" @click="goEdit(scope.row.id, scope.row)"><i
+                                            class="el-icon-edit-outline"></i>编辑</div>
+                                </div>
+                            </template>
+                        </el-table-column>
+                    </el-table>
+                </template>
+            </el-row>
+        </div>
+        <!--分页 start------------------------------------------------------------>
+        <div class="alignBox">
+            <el-row>
+                <el-col :span="24">
+                    <el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange"
+                        :current-page="page" :page-size="pageSize" layout="total, prev, pager, next, jumper"
+                        :total="total">
+                    </el-pagination>
+                </el-col>
+            </el-row>
+        </div>
+        <!--分页 end------------------------------------------------------------>
+        <!--表格内容 end------------------------------------------------------------>
+
+        <!-- 弹出框 start------------------------------------------------------------>
+        <el-dialog title="关联导航池" :visible.sync="dialogTableVisible" width="50%" :close-on-click-modal="false">
+            <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="120px" class="demo-ruleForm">
+                <div class="dialogText">
+                    <el-form-item label="关联导航池:" prop="name">
+                        <el-select v-model="ruleForm.name" placeholder="请选择关联的导航池名称">
+                            <el-option v-for="item in options" :key="item.id" :label="item.name" :value="item.id">
+                            </el-option>
+                        </el-select>
+                    </el-form-item>
+                </div>
+                <div class="dialogBtn">
+                    <button class="cancel" @click="cancelForm">取消</button>
+                    <button class="submit" @click="submitForm">提交</button>
+                </div>
+            </el-form>
+        </el-dialog>
+        <!-- 弹出框 end------------------------------------------------------------>
+    </div>
+
+</template>
+
+<script>
+//表格标题
+import tableTitle from './components/tableTitle.vue';
+//引入公用样式
+import '@/styles/global.less';
+import { getInfo, updateInfo, delInfo, addCatid, addArt } from '@/api/crawler'
+
+export default {
+    components: {
+        tableTitle,//表格标题
+    },
+    data() {
+        return {
+            tableDivTitle: "任务规则列表",//表格标题
+            // searchWebName: "", //搜索网站名称
+            // dialogName:'关联导航池',
+
+            //跳转传递的参数
+            ruleId: "", //规则id
+            source: "", //规则来源
+            state: 0,  //导入状态
+
+            //搜索框
+            message_name: '',//资讯名称
+            message_from: '', //来源
+            message_state: '', //导入状态
+
+            //分页相关
+            page: 1,
+            pageSize: 10,
+            total: 20,
+
+            tableData: [], //表格内数据
+            // currentPage: 4,
+            dialogTableVisible: false,
+            // dialogName: '',
+            ruleForm: {
+                name: '',
+            },
+            rules: {   //规则
+                name: [
+                    { required: true, message: '请选择关联的导航池名称', trigger: 'blur' },
+                ]
+            },
+
+            // dialog 关联导航池
+            options: [],
+
+            statusOptions: [
+                {
+                    value: '0',
+                    label: '未导入'
+                },
+                {
+                    value: '1',
+                    label: '已导入'
+                },
+            ]
+        }
+    },
+    mounted() {
+        // 接收跳转传递的参数
+        this.ruleId = this.$route.query.id
+        this.source = this.$route.query.source
+        //请求数据
+        this.getData()
+    },
+    methods: {
+        //1.列表和分页相关 start ------------------------------------------------------------>
+        //1.1 开始请求列表信息方法
+        getData() {
+            getInfo({
+                // rule_id: 12,
+                rule_id: this.ruleId,
+                page: this.page,
+                pageSize: this.pageSize
+            }).then(data => {
+                console.log(data);
+                this.total = data.data.count
+                this.tableData = data.data.rep
+
+                for (let item of this.tableData) {
+                    if (item.state == 1) {
+                        item.state = "已导入"
+                    } else {
+                        item.state = "未导入"
+                    }
+                }
+
+
+            })
+        },
+        //1.2 删除内容
+        deleteRow(id, val) {
+            this.$confirm('注意:删除后,该条信息及其绑定关系全部删除', '是否确认删除该条信息?', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+            }).then(() => {
+                delInfo({
+                    art_id: id
+                }).then(data => {
+                    console.log(data);
+                    if (data.code == 200) {
+                        this.$message({
+                            type: 'success',
+                            message: '删除成功!'
+                        });
+                        this.getData()
+                        console.log("当前删除:" + id)
+                    } else if (data.code == 0) {
+                        this.$message({
+                            type: 'error',
+                            message: data.message
+                        });
+                    }
+                })
+            }).catch(() => {
+                this.$message({
+                    type: 'warning',
+                    message: '已取消删除'
+                });
+            });
+        },
+        //1.3 修改网站状态
+
+        //1.4 列表内容分页
+        //直接跳转
+        handleSizeChange(val) {
+            this.page = val;
+            this.getData();
+        },
+        //1.5 点击分页
+        handleCurrentChange(val) {
+            this.page = val;
+            this.getData();
+        },
+        // 1.6 搜索按钮
+        goSearch() {
+            getInfo({
+                rule_id: this.ruleId,
+                page: this.page,
+                pageSize: this.pageSize,
+                title: this.message_name,
+                source: this.message_from,
+                state: this.message_state
+            }).then(data => {
+                console.log(data);
+                this.total = data.data.count
+                this.tableData = data.data.rep
+            })
+        },
+        //1.7 重置按钮
+        goReset() {
+            this.message_name = '',
+                this.message_from = '',
+                this.message_state = ''
+            this.getData()
+        },
+        //列表和分页相关 end ------------------------------------------------------------>
+
+        //1.8 编辑
+        goEdit(id, val) {
+            console.log(id, val);
+            // this.$router.push('/webCrawlerListEdit')
+            this.$router.push({
+                path: '/webCrawlerListEdit',
+                query: {
+                    ruleId: this.ruleId,
+                    source: this.source,
+                    id: id,
+                    // data: val
+                }
+            })
+        },
+        //1.9 关联导航池
+        toNavigation() {
+            addCatid({
+                rule_id: this.ruleId,
+            }).then(data => {
+                console.log(data);
+                if (data.code == 200) {
+                    this.dialogTableVisible = true
+                    this.options = data.data
+                }
+                if (data.code == 0) {
+                    this.$message({
+                        message: data.message,
+                        type: 'error'
+                    })
+                }
+                this.getData()
+            })
+        },
+
+        //关联导航池的取消按钮
+        cancelForm() {
+            this.dialogTableVisible = false
+        },
+
+
+        //关联导航池的提交按钮
+        submitForm() {
+            addCatid({
+                rule_id: this.ruleId,//任务规则id
+                catid: this.ruleForm.name,//导航池栏目id
+            }).then(data => {
+                console.log(this.ruleForm.name);
+                console.log(data);
+                if (data.code == 200) {
+                    this.dialogTableVisible = false
+                    this.$message({
+                        message: '关联成功!',
+                        type: 'success'
+                    })
+                    this.getData()
+                }
+                if (data.code == 0) {
+                    this.$message({
+                        message: data.message,
+                        type: 'error'
+                    })
+                    this.getData()
+                }
+            })
+        },
+
+
+        //2.0 导入资讯列表
+        importMessage() {
+            for (let item of this.tableData) {
+                if (item.category.name == '') {
+                    this.$message({
+                        message: '还未关联导航池,请先关联导航池',
+                        type: 'error'
+                    })
+                } else {
+                    this.$confirm('', '是否确认将所有未导入的信息导入资讯列表?', {
+                        confirmButtonText: '确定',
+                        cancelButtonText: '取消',
+                    }).then(() => {
+                        addArt({
+                            rule_id: this.ruleId
+                        }).then(data => {
+                            console.log(data);
+                            if (data.code == 200) {
+                                this.$message({
+                                    message: '导入成功',
+                                    type: 'success'
+                                })
+                                this.getData()
+                            }
+                            if (data.code == 0) {
+                                this.$message({
+                                    message: data.message,
+                                    type: 'error'
+                                })
+                            }
+                        })
+                    }).catch(() => {
+                        this.$message({
+                            type: 'warning',
+                            message: '已取消'
+                        });
+                    });
+                }
+            }
+
+
+        }
+    },
+}
+</script>
+
+<style scoped lang="less">
+.title {
+    margin: 30px 30px 20px 30px;
+    padding: 30px 30px 40px 30px;
+    background-color: #fff;
+    border-radius: 20px 20px 20px 20px;
+    border: 1px solid #E9EDF7;
+
+    .left {
+        float: left;
+    }
+
+    .right {
+        float: right;
+    }
+
+    .searchBox {
+        margin-right: 100px;
+
+        .searchTitle {
+            padding-bottom: 10px;
+            font-family: Microsoft YaHei, Microsoft YaHei;
+            font-weight: 400;
+            font-size: 14px;
+            color: #999999;
+            line-height: 16px;
+        }
+
+        .el-select {
+            // width: 300px;
+            display: inline-block;
+            position: relative;
+        }
+    }
+
+    .btnList {
+        float: right;
+        padding-top: 28px;
+
+        button {
+            // width: 120px;
+            height: 38px;
+            border: none;
+            border-radius: 8px;
+            padding: 0 30px;
+        }
+
+        .search {
+            background-color: #5570f1;
+            color: #fff;
+            margin-right: 20px;
+        }
+
+        .reset {
+            font-family: Microsoft YaHei, Microsoft YaHei;
+            font-weight: 400;
+            font-size: 16px;
+            color: #333333;
+            background: #F5F7FB;
+            border-radius: 8px 8px 8px 8px;
+            border: 1px solid rgba(85, 112, 241, 0.11);
+        }
+    }
+}
+
+.layerBox {
+    padding: 30px 20px;
+    position: relative;
+
+
+    .btnList {
+        position: absolute;
+        top: 30px;
+        right: 20px;
+        height: 38px;
+
+        >button {
+            color: #fff;
+            background-color: #5570f1;
+            border: none;
+            border-radius: 8px;
+            padding: 8px 28px 9px;
+            box-sizing: border-box;
+        }
+
+        >button:first-child {
+            margin-right: 30px;
+        }
+    }
+
+    .listBtnBox {
+        justify-content: left;
+    }
+
+
+    .listDeleteBtn,
+    .listEditBtn,
+    .listLookBtn {
+        margin-left: 0px;
+        padding-left: 0px;
+        margin-right: 20px;
+        width: 76px;
+        height: 36px;
+        line-height: 36px;
+    }
+
+    .listLookBtn {
+        text-align: center;
+        border-radius: 8px;
+        cursor: pointer;
+        color: #999999;
+        background-color: rgba(153, 153, 153, 0.16);
+
+        >i {
+            padding-right: 8px;
+        }
+    }
+}
+
+// 弹出层内容
+.dialogText {
+    margin: 0 7px 0 3px;
+    padding-top: 20px;
+    padding-bottom: 1px;
+    padding: 20px 60px 1px 20px;
+    background-color: #f5f7fb;
+}
+
+// 弹出层按钮
+.dialogBtn {
+    text-align: center;
+    margin: 50px auto 20px;
+
+    button {
+        width: 184px;
+        padding: 16px;
+        font-family: Microsoft YaHei, Microsoft YaHei;
+        font-weight: 400;
+        font-size: 20px;
+        border: none;
+        border-radius: 12px 12px 12px 12px;
+    }
+
+    // 取消
+    .cancel {
+        color: #333333;
+        background-color: #f5f7fb;
+        border: 2px solid rgba(85, 112, 241, 0.11);
+    }
+
+    // 提交
+    .submit {
+        color: #fff;
+        background-color: #5570F1;
+        margin-left: 40px;
+    }
+}
+
+::v-deep .el-form-item {
+    margin-bottom: 50px;
+}
+
+::v-deep .el-select {
+    width: 100%;
+}
+
+::v-deep .el-input--medium,
+::v-deep .el-form-item__label {
+    line-height: 36px;
+    font-size: 16px;
+}
+</style>

+ 564 - 0
src/views/crawler/webCrawlerListEdit.vue

@@ -0,0 +1,564 @@
+<template>
+    <!-- 采集咨询 -->
+    <div>
+        <!--表格内容 start------------------------------------------------------------>
+        <div class="layerBox">
+            <tableTitle :name="tableDivTitle" />
+            <el-row class="formContent">
+                <el-checkbox v-model="checked" class="links">引用外链</el-checkbox>
+                <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
+                    <el-form-item label="资讯题目:" prop="title">
+                        <el-input v-model="ruleForm.title" placeholder="请输入资讯题目" maxlength="500"
+                            show-word-limit></el-input>
+                    </el-form-item>
+                    <el-form-item v-show="this.checked" label="外链地址:" prop="title">
+                        <el-input v-model="ruleForm.url" placeholder="请输入外链地址(即外链网站URL链接)" maxlength="50"
+                            show-word-limit></el-input>
+                    </el-form-item>
+                    <el-form-item label="导航池名称:" prop="name">
+                        <el-select v-model="ruleForm.name" disabled placeholder="请选择导航池名称">
+                            <el-option label="区域一" value="shanghai"></el-option>
+                            <el-option label="区域二" value="beijing"></el-option>
+                        </el-select>
+                    </el-form-item>
+                    <el-form-item label="推荐等级:" prop="grade">
+                        <el-select v-model="ruleForm.grade" placeholder="请选择推荐等级">
+                            <el-option v-for="item in options" :key="item.value" :label="item.label"
+                                :value="item.value">
+                            </el-option>
+
+                        </el-select>
+                    </el-form-item>
+                    <!-- 缩略图 -->
+                    <el-form-item label="缩略图:" prop="imgSrc">
+                        <div class="uploaderBox">
+                            <div class="avatar-upload-container" @mouseenter="hovering = true"
+                                @mouseleave="hovering = false">
+                                <!-- 上传组件 -->
+                                <el-upload class="avatar-uploader" action="#" :show-file-list="false"
+                                    :before-upload="beforeAvatarUpload">
+                                    <!-- 预览图片 -->
+                                    <img v-if="imgSrc" :src="imgSrc" class="avatar">
+                                    <div v-else class="chooseImgDiv">
+                                        <div>
+                                            <img src="@/assets/public/upload/noImage.png">
+                                            <div>请选择缩略图</div>
+                                        </div>
+                                    </div>
+                                </el-upload>
+                                <!-- 删除按钮,当鼠标悬浮时显示 -->
+                                <div v-if="hovering && iconSrc" class="delete-button" @click="handleDelete">
+                                    <i class="el-icon-delete"></i>
+                                </div>
+                            </div>
+                            <p class="imgTips">图片长宽比例为16:9, 大小不能超过500K。</p>
+                        </div>
+                    </el-form-item>
+                    <el-form-item label="资讯关键词:" prop="keywords" class="keywords">
+                        <el-input v-model="ruleForm.keywords" placeholder="请输入资讯的关键词"></el-input>
+                        <el-tooltip class="item" effect="dark"
+                            content="  资讯关键词,如:三农市场网,最大的三农市场交易平台—全国三农信息一体化应用平台—中农兴业工程指定网站-农业百强网站。"
+                            placement="top-start">
+                            <i class="el-icon-warning"></i>
+                        </el-tooltip>
+                    </el-form-item>
+                    <el-form-item label="资讯描述:" prop="desc" class="desc">
+                        <el-input type="textarea" v-model="ruleForm.desc" placeholder="请输入资讯的描述..." maxlength="500"
+                            resize="none" show-word-limit></el-input>
+                        <el-tooltip placement="top-start">
+                            <div slot="content">
+                                资讯描述,如:2020年,我们取得了脱贫攻坚的伟大胜利,如期全面建成小康社会,未来五年湖南在统筹推进乡村振兴、加快农业农村现代化建设方面有什么样的目标和具体措施?<br />
+                                省第十二次党代会代表,省委农村工作领导小组办公室主任,省农业农村厅党组书记、厅长袁延文在党代表通道,三农市场网,最大的三农市场交易平台—全国三农信息一体化应用平台—中农兴业工程指定网站-农业百强网站。
+                            </div>
+                            <i class="el-icon-warning"></i>
+                        </el-tooltip>
+                    </el-form-item>
+                    <!-- 富文本 -->
+                    <!-- <div class="QuillTitle">
+                        <span>* </span>资讯内容:
+                        <div @click="toggleSourceMode" class="QuillModelBtn">
+                            {{ showHtml ? '切换到编辑模式' : '切换到源码模式' }}
+                        </div>
+                    </div>
+                    <el-form-item label="" prop="content">
+                        <div class="editor-container">
+                            <div v-if="showHtml">
+                                <textarea v-model="editorHtml" style="width: 100%; height: 400px;"></textarea>
+                            </div>
+                            <div v-else>
+                                <quill-editor ref="quillEditor" v-model="form.content" :options="editorOptions"
+                                    class="my-quill-editor" />
+                            </div> -->
+                            <!-- 多图上传隐藏的input -->
+                            <!-- <input type="file" ref="multiFileInput" @change="handleMultipleFiles" multiple hidden
+                                accept="image/jpeg, image/png" />
+                        </div>
+                    </el-form-item> -->
+                    <el-form-item label="资讯内容:" prop="content">
+                        <el-input type="textarea" v-model="ruleForm.content" placeholder="请输入资讯内容..."
+                            maxlength="5000"></el-input>
+                    </el-form-item>
+                    <el-form-item label="作者:" prop="author">
+                        <el-input v-model="ruleForm.author" placeholder="请输入发布资讯的作者"></el-input>
+                    </el-form-item>
+                    <el-form-item label="浏览量:" prop="">
+                        <el-input-number v-model="ruleForm.count" @change="handleChange" :min="1" :max="10"
+                            label="描述文字"></el-input-number>
+                    </el-form-item>
+                    <el-form-item label="是否原创:" prop="original">
+                        <el-radio v-model="ruleForm.original" label="true">是</el-radio>
+                        <el-radio v-model="ruleForm.original" label="false">否</el-radio>
+                    </el-form-item>
+                    <!-- 浏览量 -->
+
+                    <el-form-item v-show="this.ruleForm.original == 'false'" label="来源链接:" prop="link">
+                        <el-input v-model="ruleForm.link" placeholder="请输入完整的资讯来源链接。"></el-input>
+                    </el-form-item>
+                    <el-form-item v-show="this.ruleForm.original == 'false'" label=" 来源:" prop="source">
+                        <el-input v-model="ruleForm.source" placeholder="请输入资讯来源,如:XX市农业农村局。"></el-input>
+                    </el-form-item>
+                    <div class="disclaimerBox" v-show="this.ruleForm.original == 'false'">
+                        <div class="disclaimerTitle">
+                            <img src="@/assets/public/check.png" />同意《免责声明》:
+                            <!-- <el-checkbox v-model="disclaimer" disabled="disabled"></el-checkbox> -->
+                        </div>
+                        <div class="disclaimerText">
+                            本文来源于网络转载,仅供学习交流使用,不构成商业目的。版权归作者所有,如涉及原作者所有,如涉及作品内容、版权和其他问题,请在30日内与本站联系,我们将在第一时间处理。</div>
+                    </div>
+                </el-form>
+            </el-row>
+            <div class="btn">
+                <button class="cancel" @click="goCancel">取消</button>
+                <button class="sure" @click="goSubmit">确定</button>
+            </div>
+        </div>
+        <!--表格内容 end------------------------------------------------------------>
+
+    </div>
+</template>
+
+<script>
+//表格标题
+import tableTitle from './webCrawlerListEdit/tableTitle.vue';
+//引入公用样式
+import '@/styles/global.less';
+
+import { updateInfo, getOneInfo } from '@/api/crawler'
+
+import { quillEditor } from 'vue-quill-editor';
+import 'quill/dist/quill.snow.css';
+import ImageResize from 'quill-image-resize-module';
+import Quill from 'quill';  // 引入 Quill
+import Delta from 'quill-delta'; // 引入 Delta,用于手动修改文档
+import { options } from 'dropzone';
+
+export default {
+    components: {
+        quillEditor,
+        tableTitle,  //表格标题
+    },
+    data() {
+        return {
+            tableDivTitle: "编辑资讯",
+            num: 1,
+            checked: false,
+            iconSrc: '',
+            data: '',
+
+            activeid: '',  //当前被选中的id
+
+            ruleId: '',
+            source: '',
+
+            // beforeAvatarUpload: '',
+            imgSrc: '',
+            hovering: '',
+            options: [
+                {
+                    value: 0,
+                    label: '未分类'
+                },
+                {
+                    value: 1,
+                    label: '头条'
+                },
+                {
+                    value: 2,
+                    label: '轮播图'
+                },
+                {
+                    value: 3,
+                    label: '推荐图'
+                },
+                {
+                    value: 4,
+                    label: '热点资讯'
+                },
+                {
+                    value: 5,
+                    label: '资讯推荐'
+                },
+            ],
+
+            ruleForm: {
+                title: '',     // 资讯题目
+                url: '',       // 外链地址      
+                name: '',      // 导航池名称
+                grade: [],     // 推荐等级
+                imgSrc: '',    // 缩略图  
+                keywords: '',  // 关键词 
+                desc: '',      // 描述
+                content: '',   // 内容
+                author: '',    // 作者
+                count: 1,     // 浏览量
+                original: 'false',  // 原创
+                source: '',    // 来源
+                link: ''       // 来源链接
+            },
+            rules: {
+                title: [
+                    { required: true, message: '请输入资讯题目', trigger: 'blur' }
+                ],
+                url: [
+                    { required: true, message: '请输入外链地址', trigger: 'blur' }
+                ],
+                name: [
+                    { required: true, message: '请选择导航池名称', trigger: 'blur' }
+                ],
+                grade: [
+                    { required: true, message: '请选择推荐等级', trigger: 'blur' }
+                ],
+                imgSrc: [
+                    { required: true, message: '请选择缩略图', trigger: 'blur' }
+                ],
+                keywords: [
+                    { required: true, message: '请输入资讯关键词', trigger: 'blur' }
+                ],
+                desc: [
+                    { required: true, message: '请输入资讯描述', trigger: 'blur' }
+                ],
+                content: [
+                    { required: true, message: '请输入资讯内容', trigger: 'blur' }
+                ],
+                author: [
+                    { required: true, message: '请输入发布资讯的作者', trigger: 'blur' }
+                ],
+                count: [
+                    { required: true, message: '请选择资讯推荐等级', trigger: 'blur' }
+                ],
+                original: [
+                    { required: true, message: '请选择资讯推荐等级', trigger: 'blur' }
+                ],
+                link: [
+                    { required: true, message: '请输入完整的资讯来源链接', trigger: 'blur' }
+                ],
+                source: [
+                    { required: true, message: '请输入资讯来源', trigger: 'blur' }
+                ]
+
+            },
+            //富文本编辑器配置
+            showHtml: false, //用于保存源码内容
+            editorHtml: '',
+            editorOptions: {
+                placeholder: '请输入内容...',
+                theme: 'snow',  // 主题样式
+                modules: {
+                    toolbar: {
+                        container: [
+                            [{ 'font': [] }],                                // 字体
+                            [{ 'header': [1, 2, 3, 4, 5, 6, false] }],       // 标题
+                            [{ 'size': ['small', false, 'large', 'huge'] }],  // 字体大小
+                            ['bold', 'italic', 'underline', 'strike'],        // 加粗、斜体、下划线、删除线
+                            [{ 'color': [] }, { 'background': [] }],          // 文字颜色、背景颜色
+                            [{ 'script': 'sub' }, { 'script': 'super' }],     // 上标、下标
+                            [{ 'list': 'ordered' }, { 'list': 'bullet' }],     // 列表
+                            [{ 'indent': '-1' }, { 'indent': '+1' }],          // 缩进
+                            [{ 'align': [] }],                                // 对齐方式
+                            ['blockquote', 'code-block'],                     // 引用、代码块
+                            ['link', 'image', 'video'],                       // 链接、图片、视频
+                            ['clean'],
+                            [{ 'html': true }]  // 添加自定义按钮的占位符
+                        ],
+                        handlers: {
+                            image: () => {
+                                this.handleImageClick();
+                            },
+                            showHtml: function () {
+                                this.$emit('toggleSourceMode');
+                            }
+                        }
+                    },
+                    imageResize: {
+                        displayStyles: {
+                            backgroundColor: 'black',
+                            border: 'none',
+                            color: 'white'
+                        },
+                        modules: ['Resize', 'DisplaySize', 'Toolbar']  // 启用不同的调整方式
+                    }
+                }
+            },
+            //1.4图片上传
+            imgUrl: "",//在页面上显示缩略图
+            //获取父级导航池
+            parentKey: 0,//获取父级导航
+            parentData: {
+                checkStrictly: true,
+                lazy: true,
+                async lazyLoad(node, resolve) {
+                    const { level, data } = node;
+                    if (data && data.children && data.children.length !== 0) {
+                        return resolve(node)
+                    }
+                    console.log(level)
+                    let parentId = level == 0 ? 0 : data.value
+                    let parames = {
+                        'pid': parentId
+                    }
+                    self.$store.dispatch('pool/categoryList', parames).then(res => {
+                        if (res.data) {
+                            const nodes = res.data.map(item => ({
+                                value: item.id,
+                                label: item.name,
+                                leaf: level >= 3,
+                                children: []
+                            }))
+                            resolve(nodes)
+                        }
+                    })
+                }
+            },
+        }
+    },
+    methods: {
+
+        beforeAvatarUpload(file) {
+            const isJPG = file.type === 'image/jpeg';
+            const isPNG = file.type === 'image/png';
+            const isLt2M = file.size / 1024 / 1024 < 2;
+
+            if (!isJPG && !isPNG) {
+                this.$message.error('上传缩略图只能是 JPG 或 PNG 格式!');
+                return false;
+            }
+            if (!isLt2M) {
+                this.$message.error('上传缩略图大小不能超过 2MB!');
+                return false;
+            }
+
+            const formData = new FormData();
+            formData.append('file', file);
+
+            this.$store.dispatch('pool/uploadFile', formData).then(res => {
+                this.imgUrl = res.data.imgUrl;//显示缩略图
+                this.form.imgurl = res.data.imgUrl;//提供表单地址
+                console.log(res.data.imgUrl)
+            }).catch(() => {
+                this.$message({
+                    type: 'info',
+                    message: '网络错误,请重试!'
+                });
+            })
+
+            // 阻止默认的上传行为
+            return false;
+        },
+        // 提交表单
+        goSubmit() {
+            updateInfo({
+                art_id: this.activeid,
+                title: this.ruleForm.title,
+                level: this.ruleForm.grade,
+                imgurl: this.ruleForm.imgSrc,
+                keyword: this.ruleForm.keywords,
+                introduce: this.ruleForm.desc,
+                content: this.ruleForm.content,
+                author: this.ruleForm.author,
+                hits: this.ruleForm.count,
+                is_original: this.ruleForm.original == 'false' ? 0 : 1, //是否原创
+                fromurl: this.ruleForm.link, //来源链接
+                copyfrom: this.ruleForm.source, //来源
+                islink: this.checked == false ? 0 : 1,
+                linkurl: this.ruleForm.url,
+            }).then(data => {
+                console.log(data);
+                if (data.code == 200) {
+                    this.$message({
+                        message: "修改成功",
+                        type: "success"
+                    })
+                    this.$router.push(`/webCrawlerList?id=${this.ruleId}&source=${this.source}`)
+                }
+                if (data.code == 0) {
+                    this.$message({
+                        message: data.message,
+                        type: "error"
+                    })
+                }
+            })
+        },
+        //取消添加或编辑
+        goCancel() {
+            this.$message({
+                message: "已取消修改",
+                type: "error"
+            })
+            this.$router.push(`/webCrawlerList?id=${this.ruleId}&source=${this.source}`)
+        },
+        //浏览量
+        handleChange(value) {
+            console.log(value);
+            this.ruleForm.count = value
+        }
+    },
+    mounted() {
+        this.ruleId = this.$route.query.ruleId
+        this.source = this.$route.query.source
+
+        this.activeid = this.$route.query.id
+        console.log(this.$route.query.id);
+
+
+        getOneInfo({
+            art_id: this.activeid
+        }).then(data => {
+            console.log(data);
+            this.ruleForm.title = data.data.title
+            this.ruleForm.url = data.data.linkurl
+            this.ruleForm.name = data.data.category //导航池名称
+            this.ruleForm.grade = data.data.level
+            this.ruleForm.imgSrc = data.data.imgurl
+            this.ruleForm.keywords = data.data.keyword
+            this.ruleForm.desc = data.data.introduce
+            this.ruleForm.content = data.data.content  //内容
+            this.ruleForm.author = data.data.author
+            this.ruleForm.count = data.data.hits
+            this.ruleForm.source = data.data.source
+            this.ruleForm.link = data.data.copyfrom
+        })
+    }
+}
+</script>
+
+<style scoped lang="less">
+p {
+    padding: 0;
+    margin: 0;
+}
+
+.layerBox {
+    padding: 30px 20px;
+    position: relative;
+
+    .listBtnBox {
+        justify-content: left;
+    }
+
+    // 表单内容
+    .formContent {
+        background-color: #f5f7fb;
+        padding: 30px 225px 0px 25px;
+        position: relative;
+
+        // 顶部引用外链
+        .links {
+            position: absolute;
+            top: 37px;
+            right: 97px;
+        }
+
+        //底部免责声明提示文字
+        .tips {
+            margin: 0 auto;
+            font-size: 13px;
+            color: #666666;
+        }
+
+        // 图片上传提示文字
+        .imgTips {
+            color: #8B8D97;
+            font-size: 14px;
+        }
+
+        // 资讯关键词 和 资讯描述 的 文字提示 
+        .keywords,
+        .desc {
+            position: relative;
+
+            i {
+                position: absolute;
+                top: 0;
+                left: -15px;
+            }
+        }
+
+        // 文字提示用到的图标的颜色
+        .el-icon-warning {
+            color: #a9a9a9;
+        }
+
+        // input框右下角数字颜色
+        ::v-deep .el-input__count {
+            color: #999;
+        }
+
+        // 多行文本框的高度
+        ::v-deep .el-textarea__inner {
+            height: 100px;
+        }
+
+        // 表单元素的下外边距
+        ::v-deep .el-form-item {
+            margin-bottom: 50px;
+        }
+
+        // 下拉框
+        ::v-deep .el-select {
+            width: 100%;
+            display: inline-block;
+            position: relative;
+        }
+
+    }
+
+    //按钮
+    .btn {
+        width: 440px;
+        margin: 50px auto 20px;
+
+        button {
+            width: 180px;
+            height: 58px;
+            border-radius: 12px;
+            border: none;
+            font-size: 20px;
+        }
+
+        .cancel {
+            color: #333;
+            background-color: #f5f7fb;
+            border: 2px solid #e3e8fa;
+            margin-right: 80px;
+        }
+
+        .sure {
+            background-color: #5570f1;
+            color: #fff;
+        }
+    }
+
+    //缩略图
+    .uploaderBox {
+
+        .chooseImgDiv {
+            background-color: #fff;
+
+            img {
+                display: inline-block;
+            }
+        }
+    }
+
+}
+</style>

+ 41 - 0
src/views/crawler/webCrawlerListEdit/tableTitle.vue

@@ -0,0 +1,41 @@
+<template>
+  <div class="tableTitle">
+    <span class="tableFloatLine"></span>
+    {{ name }}
+  </div>
+</template>
+
+<script>
+export default {
+  props: {
+    name: {
+      type: String,
+      required: true,
+    },
+  },
+  data() {
+    return {
+      someData: '',
+    };
+  },
+};
+</script>
+
+<style scoped lang="less">
+.tableTitle {
+  color: #333333;
+  position: relative;
+  margin-bottom: 30px;
+  margin-top: 2px;
+
+  .tableFloatLine {
+    width: 3px;
+    height: 16px;
+    background: #5570F1;
+    display: block;
+    position: absolute;
+    left: -20px;
+    top: 1px;
+  }
+}
+</style>

+ 1292 - 0
src/views/crawler/webRule.vue

@@ -0,0 +1,1292 @@
+<template>
+    <!-- 规则列表 -->
+    <div>
+        <div class="title">
+            <el-row>
+                <el-col :span="6" class="left">
+                    <div class="searchBox">
+                        <div class="searchTitle">任务规则名:</div>
+                        <el-input v-model="searchRuleName" placeholder="请输入任务规则名"></el-input>
+                    </div>
+                </el-col>
+                <el-col :span="10" class="right">
+                    <div class="btnList">
+                        <button class="search" @click="goSearch">搜索</button>
+                        <button class="reset" @click="goReset">重置</button>
+                    </div>
+                </el-col>
+            </el-row>
+        </div>
+        <!--表格内容 start------------------------------------------------------------>
+        <div class="layerBox">
+            <tableTitle :name="tableDivTitle" />
+            <button class="btn" @click="addCrawlerRule">设置采集规则</button>
+            <el-row>
+                <template>
+                    <el-table class="my-table" :data="tableData" style="width: 100%">
+                        <el-table-column fixed prop="id" label="编号" width="100">
+                        </el-table-column>
+                        <el-table-column prop="name" label="任务规则名" width="">
+                        </el-table-column>
+                        <el-table-column prop="arts_count" label="采集个数" width="">
+                        </el-table-column>
+                        <el-table-column prop="created_at" label="创建时间" width="">
+                        </el-table-column>
+                        <el-table-column prop="updated_at" label="修改时间" width="">
+                        </el-table-column>
+                        <el-table-column fixed="right" label="操作" width="385">
+                            <template slot-scope="scope">
+                                <div class="listBtnBox">
+                                    <div class="listDeleteBtn" @click="deleteRow(scope.row.id)"><i
+                                            class="el-icon-delete"></i>删除</div>
+                                    <div class="listEditBtn" @click="goEdit(scope.row.id, scope.row)"><i
+                                            class="el-icon-edit-outline"></i>编辑</div>
+
+                                    <div class="collector" @click="goCollect(scope.row.id, scope.row.status)"
+                                        v-if="scope.row.status == 0 || scope.row.status == 2">
+                                        <i class="collectorIcon"></i>采集
+                                    </div>
+                                    <div class="collector" @click="toast" v-if="scope.row.status == 4">
+                                        <i class="collectorIcon"></i>采集
+                                    </div>
+                                    <div class="loadingBtn" v-if="scope.row.status == 1">
+                                        <i class="collectorIcon1 el-icon-loading"></i><span>采集</span>
+                                    </div>
+
+                                    <div class="listLookBtn" @click="goLook(scope.row.id, scope.row)"><i
+                                            class="el-icon-view"></i>查看</div>
+                                </div>
+                            </template>
+                        </el-table-column>
+                    </el-table>
+                </template>
+            </el-row>
+        </div>
+        <!--分页 start------------------------------------------------------------>
+        <div class="alignBox" v-show="disabled">
+            <el-row>
+                <el-col :span="24">
+                    <el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange"
+                        :current-page="page" :page-size="pageSize" layout="total, prev, pager, next, jumper"
+                        :total="total">
+                    </el-pagination>
+                </el-col>
+            </el-row>
+        </div>
+        <!--分页 end------------------------------------------------------------>
+        <!--表格内容 end------------------------------------------------------------>
+
+        <!-- 弹出框 -->
+        <el-dialog :title="dialogName" :visible.sync="dialogTableVisible" width="50%" :close-on-click-modal="false">
+            <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="120px" class="demo-ruleForm">
+                <div class="one" v-show="this.webType == 1">
+                    <div class="dialogText">
+                        <el-form-item label="任务规则名:" prop="ruleName" class="keywords">
+                            <el-input v-model="ruleForm.ruleName" placeholder="请输入任务规则名"></el-input>
+                            <el-tooltip class="item" effect="dark" content="任务规则名,如中国农村网-时政要闻" placement="top-start">
+                                <i class="el-icon-warning"></i>
+                            </el-tooltip>
+                        </el-form-item>
+                        <el-form-item label="第1页网址:" prop="first_url" class="keywords">
+                            <el-input v-model="ruleForm.first_url" placeholder="请输入第一页网址"></el-input>
+                            <el-tooltip placement="top-start">
+                                <div slot="content">
+                                    一般为网站的栏目页网址,也是文章列表页网址。<br />
+                                    若网站内页数为多页,第1页网址如:http://politics.people.com.cn/GB/1024/index1.html(第1页的数字)
+                                </div>
+                                <i class="el-icon-warning"></i>
+                            </el-tooltip>
+                        </el-form-item>
+                        <div class="pageTwo">
+                            <el-form-item label="第2页网址:" required class="keywords">
+                                <el-col :span="6">
+                                    <el-form-item prop="second_start">
+                                        <el-input v-model="ruleForm.second_start" placeholder="请输入网址开头"></el-input>
+                                    </el-form-item>
+                                </el-col>
+                                <el-col :span="6">
+                                    <el-form-item prop="second_num">
+                                        <el-input v-model="ruleForm.second_num" placeholder="请输入代码页数"></el-input>
+                                    </el-form-item>
+                                </el-col>
+                                <el-col :span="6" class="el_col_6_end">
+                                    <el-form-item prop="second_end">
+                                        <el-input v-model="ruleForm.second_end" placeholder="请输入网址结束字符串"
+                                            class="lastInput"></el-input>
+                                    </el-form-item>
+                                </el-col>
+                                <el-tooltip placement="top-start">
+                                    <div slot="content">
+                                        网址如:http://politics.people.com.cn/GB/1024/index2.html<br />
+                                        输入为 http://politics.people.com.cn/GB/1024/index 2 .html分别埴入输入框内
+                                    </div>
+                                    <i class="el-icon-warning"></i>
+                                </el-tooltip>
+                                <!-- <p class="tips" v-show="!this.ruleForm.second_start">请输入第2页网址</p>
+                                <p class="tips" v-show="!this.ruleForm.second_num">请输入第2页网址</p>
+                                <p class="tips" v-show="!this.ruleForm.second_end">请输入第2页网址</p> -->
+                            </el-form-item>
+                        </div>
+                        <el-form-item label="起始代码:" prop="startCode" class="keywords">
+                            <el-input v-model="ruleForm.startCode" placeholder="请输入起始代码"></el-input>
+                            <el-tooltip placement="top-start">
+                                <div slot="content">
+                                    起始代码为文章列表第一篇文章上面几行代码中一段代码<br />
+                                    如<'div class="ej list box clear">,输入为 .ej list box clear 埴入输入框内<br />
+                                        如<'ul class="ej list box clear">,输入为 .ej list box clearul 埴入输入框内
+                                </div>
+                                <i class="el-icon-warning"></i>
+                            </el-tooltip>
+                        </el-form-item>
+                        <el-form-item label="结束页数:" prop="endPage" class="keywords">
+                            <el-input v-model="ruleForm.endPage" placeholder="请输入结束页数"></el-input>
+                        </el-form-item>
+                    </div>
+
+                    <div class="dialogText">
+                        <el-form-item label="标题字符串:" prop="title" class="keywords">
+                            <el-input v-model="ruleForm.title" placeholder="请输入网站名称"></el-input>
+                            <el-tooltip placement="top-start">
+                                <div slot="content">
+                                    如标题代码:<'h1 class='news_art'>红枣滞销喂羊 电商帮忙促销</'h1>,标题字符串为 .news_art 填入输入框内<br />
+                                    如标题代码:<'h1 id='news at'>红枣滞销喂羊 电商帮忙促销</'h1>,标题字符串为 #news art 填入输入框内
+                                </div>
+                                <i class="el-icon-warning"></i>
+                            </el-tooltip>
+                        </el-form-item>
+                        <el-form-item label="内容字符串:" prop="content" class="keywords">
+                            <el-input v-model="ruleForm.content" placeholder="请输入标题字符串"></el-input>
+                            <el-tooltip placement="top-start">
+                                <div slot="content">
+                                    如内容代码:<'h1 class='news box'>
+                                        <' /h1>,内容字符串为.news box 填入输入框内<br />
+                                            如内容代码:<'h1 id='news_box'>
+                                                <' /h1>,内容字符串为 #news_box 填入输入框内
+                                </div>
+                                <i class="el-icon-warning"></i>
+                            </el-tooltip>
+                        </el-form-item>
+                        <el-form-item label="来源字符串:" prop="" class="keywords">
+                            <el-input v-model="ruleForm.source" placeholder="请输入来源字符串"></el-input>
+                        </el-form-item>
+                        <el-form-item label="作者字符串:" prop="" class="keywords">
+                            <el-input v-model="ruleForm.author" placeholder="请输入作者字符串"></el-input>
+                        </el-form-item>
+                        <el-form-item label="作者替换名称:" prop="authorName" class="keywords">
+                            <el-input v-model="ruleForm.authorName" placeholder="请输入作者替换名称"></el-input>
+                        </el-form-item>
+                    </div>
+                </div>
+
+                <div class="two" v-show="this.webType == 2">
+                    <div class="dialogText">
+                        <el-form-item label="任务规则名:" prop="ruleName" class="keywords">
+                            <el-input v-model="ruleForm.ruleName" placeholder="请输入任务规则名"></el-input>
+                            <el-tooltip class="item" effect="dark" content="任务规则名,如中国农村网-时政要闻" placement="top-start">
+                                <i class="el-icon-warning"></i>
+                            </el-tooltip>
+                        </el-form-item>
+                        <el-form-item label="请求网址:" prop="collect" class="keywords">
+                            <el-input v-model="ruleForm.collect" placeholder="请输入请求网址(请求URL)"></el-input>
+                            <el-tooltip placement="top-start">
+                                <div slot="content">
+                                    请求网址:网络(Network)-名称(Name)找名称 - <br />
+                                    找到请求网址(Request URL):https://www.ndcpa.gov.cn/queryList,该网址填入输入框。
+                                </div>
+                                <i class="el-icon-warning"></i>
+                            </el-tooltip>
+                        </el-form-item>
+                        <el-form-item label="接口参数:" prop="parameter" class="keywords">
+                            <el-input v-model="ruleForm.parameter" placeholder="请输入接口参数"></el-input>
+                            <el-tooltip placement="top-start">
+                                <div slot="content">
+                                    接口参数:网络(Network)-名称(Name)找名称 - Payload<br />
+                                    current=1,pageSize:25,webSiteCode[]:jbkzzx,channelCode[]:c100008<br />
+                                    填入为{"current"=1,"pageSize":25,"webSiteCode":"[jbkzzx]","channelCode":"[c100008]"},中间用","隔开。
+                                </div>
+                                <i class="el-icon-warning"></i>
+                            </el-tooltip>
+                        </el-form-item>
+                        <el-form-item label="列表开始标签:" prop="startLabel" class="keywords">
+                            <el-input v-model="ruleForm.startLabel" placeholder="请输入列表开始标签"></el-input>
+                            <el-tooltip placement="top-start">
+                                <div slot="content">
+                                    如包含本网页内所有的数据(data)下含有本网页内所有新闻的数据标签(resut),输入为 [data][result] 填入输入框。
+                                </div>
+                                <i class="el-icon-warning"></i>
+                            </el-tooltip>
+                        </el-form-item>
+                        <el-form-item label="标题字符串:" prop="title" class="keywords">
+                            <el-input v-model="ruleForm.title" placeholder="请输入标题字符串"></el-input>
+                            <el-tooltip class="item" effect="dark" content="如(标题)是title=“xXX应急演习”,输入为 [title]埴入输入框。"
+                                placement="top-start">
+                                <i class="el-icon-warning"></i>
+                            </el-tooltip>
+                        </el-form-item>
+                        <el-form-item label="内容字符串:" prop="content" class="keywords">
+                            <el-input v-model="ruleForm.content" placeholder="请输入内容字符串"></el-input>
+                            <el-tooltip placement="top-start">
+                                <div slot="content">
+                                    如内容(content)下含有本网页内所有新闻的详细数据(content),输入为[content][content] 填入输入框。
+                                </div>
+                                <i class="el-icon-warning"></i>
+                            </el-tooltip>
+                        </el-form-item>
+                        <el-form-item label="来源字符串:" prop="" class="keywords">
+                            <el-input v-model="ruleForm.source" placeholder="请输入来源字符串"></el-input>
+                            <el-tooltip placement="top-start">
+                                <div slot="content">
+                                    如(来源)是contentSource="XXX应急处置部门",输入为[contentSource]埴入输入框。
+                                </div>
+                                <i class="el-icon-warning"></i>
+                            </el-tooltip>
+                        </el-form-item>
+                        <el-form-item label="是否有作者:" prop="name" class="keywords">
+                            <el-radio v-model="radio" label="true">是</el-radio>
+                            <el-radio v-model="radio" label="false">否</el-radio>
+                        </el-form-item>
+                        <el-form-item label="作者字符串:" prop="author" class="keywords" v-show="this.radio == 'true'">
+                            <el-input v-model="ruleForm.author" placeholder="请输入作者字符串"></el-input>
+                            <el-tooltip placement="top-start">
+                                <div slot="content">
+                                    如作者(author)是author=“张三”,输入为 [author] 埴入输入框。
+                                </div>
+                                <i class="el-icon-warning"></i>
+                            </el-tooltip>
+                        </el-form-item>
+                        <el-form-item label="作者替换名称:" prop="authorName" class="keywords" v-show="this.radio == 'false'">
+                            <el-input v-model="ruleForm.authorName" placeholder="请输入作者替换名称"></el-input>
+                        </el-form-item>
+                    </div>
+                </div>
+
+                <div class="three" v-show="this.webType == 3">
+                    <div class="dialogText">
+                        <el-form-item label="任务规则名:" prop="ruleName" class="keywords">
+                            <el-input v-model="ruleForm.ruleName" placeholder="请输入任务规则名"></el-input>
+                            <el-tooltip class="item" effect="dark" content="任务规则名,如中国农村网-时政要闻" placement="top-start">
+                                <i class="el-icon-warning"></i>
+                            </el-tooltip>
+                        </el-form-item>
+                        <el-form-item label="自定义规则:" prop="name" class="keywords">
+                            <el-input v-model="ruleForm.diy_rule" type="textarea" :rows="8" resize="none"
+                                placeholder="">
+                            </el-input>
+                        </el-form-item>
+                    </div>
+                </div>
+
+                <div class="dialogBtn">
+                    <button class="cancel" @click="saveForm">保存</button>
+                    <button class="submit" @click="submitForm">确定</button>
+                </div>
+            </el-form>
+        </el-dialog>
+    </div>
+
+</template>
+
+<script>
+//表格标题
+import tableTitle from './components/tableTitle.vue';
+//引入公用样式
+import '@/styles/global.less';
+// 引入api
+import { addRule, getRule, updateRule, delRule, sendCrawler } from '@/api/crawler'
+
+export default {
+    components: {
+        tableTitle,//表格标题
+    },
+    data() {
+        const validateCollect = (rule, value, callback) => {
+            if (/\s/.test(value)) {
+                callback(new Error('输入的文字包含空格,请删除空格'))
+            }
+            else if (value.length == 0) {
+                callback(new Error('请输入请求网址'))
+            } else {
+                callback()
+            }
+        }
+        const validateStartLabel = (rule, value, callback) => {
+            // const value = input.value;
+            if (/\s/.test(value)) {
+                callback(new Error('输入的文字包含空格,请删除空格'))
+            } else if (value.length == 0) {
+                callback(new Error('请输入列表开始标签'))
+            } else {
+                callback()
+            }
+        }
+        const validateRuleName = (rule, value, callback) => {
+            // const value = input.value;
+            if (/\s/.test(value)) {
+                callback(new Error('输入的文字包含空格,请删除空格'))
+            } else if (value.length == 0) {
+                callback(new Error('请输入任务规则名'))
+            } else {
+                callback()
+            }
+        }
+        const validateFirst_url = (rule, value, callback) => {
+            // const value = input.value;
+            if (/\s/.test(value)) {
+                callback(new Error('输入的文字包含空格,请删除空格'))
+            } else if (value.length == 0) {
+                callback(new Error('请输入第1页网址'))
+            } else {
+                callback()
+            }
+        }
+        const validateStartCode = (rule, value, callback) => {
+            // const value = input.value;
+            if (/\s/.test(value)) {
+                callback(new Error('输入的文字包含空格,请删除空格'))
+            } else if (value.length == 0) {
+                callback(new Error('请输入起始代码'))
+            } else {
+                callback()
+            }
+        }
+        const validateEndCode = (rule, value, callback) => {
+            // const value = input.value;
+            if (/\s/.test(value)) {
+                callback(new Error('输入的文字包含空格,请删除空格'))
+            } else if (value.length == 0) {
+                callback(new Error('请输入结束页数'))
+            } else {
+                callback()
+            }
+        }
+        const validatTitle = (rule, value, callback) => {
+            // const value = input.value;
+            if (/\s/.test(value)) {
+                callback(new Error('输入的文字包含空格,请删除空格'))
+            } else if (value.length == 0) {
+                callback(new Error('请输入标题字符串'))
+            } else {
+                callback()
+            }
+        }
+        const validatcontent = (rule, value, callback) => {
+            // const value = input.value;
+            if (/\s/.test(value)) {
+                callback(new Error('输入的文字包含空格,请删除空格'))
+            } else if (value.length == 0) {
+                callback(new Error('请输入内容字符串'))
+            } else {
+                callback()
+            }
+        }
+        const validatsource = (rule, value, callback) => {
+            // const value = input.value;
+            if (/\s/.test(value)) {
+                callback(new Error('输入的文字包含空格,请删除空格'))
+            } else if (value.length == 0) {
+                callback(new Error('请输入来源字符串'))
+            } else {
+                callback()
+            }
+        }
+        const validatauthor = (rule, value, callback) => {
+            // const value = input.value;
+            if (/\s/.test(value)) {
+                callback(new Error('输入的文字包含空格,请删除空格'))
+            } else if (value.length == 0) {
+                callback(new Error('请输入作者字符串'))
+            } else {
+                callback()
+            }
+        }
+        const validatauthorName = (rule, value, callback) => {
+            // const value = input.value;
+            if (/\s/.test(value)) {
+                callback(new Error('输入的文字包含空格,请删除空格'))
+            } else if (value.length == 0) {
+                callback(new Error('请输入作者替换名称'))
+            } else {
+                callback()
+            }
+        }
+        const validatparameter = (rule, value, callback) => {
+            // const value = input.value;
+            if (/\s/.test(value)) {
+                callback(new Error('输入的文字包含空格,请删除空格'))
+            } else if (value.length == 0) {
+                callback(new Error('请输入接口参数'))
+            } else {
+                callback()
+            }
+        }
+        const validatsecondWeb = (rule, value, callback) => {
+            // const value = input.value;
+            if (value.length == 0) {
+                callback(new Error('请输入第2页网址'))
+            } else {
+                callback()
+            }
+        }
+        return {
+            tableDivTitle: "任务规则列表",  //表格标题
+            dialogTableVisible: false, //弹窗是否显示
+            dialogName: '设置采集规则', //弹窗名称
+            dialogBoo: 'add',//判断当前是添加还是编辑
+            searchRuleName: '',  //任务规则名
+
+            // 建立网站页面传递的参数
+            webId: '',
+            webType: '',
+            webName: '',
+
+            disabled: '',
+
+            //分页相关数据
+            page: 1,
+            pageSize: 10,
+            total: 40,
+
+            activeId: '',
+            value: '',
+            radio: 'true',
+            // 表格相关
+            tableData: [], //表格中的数据
+
+            ruleForm: {
+                ruleName: '', //任务规则名
+                first_url: '', //第1页网址  接口类的开始采集地址
+                collect: '',//接口类 采集地址
+                second_start: '', //第2页网址开头
+                second_num: '', //第2页代码页数
+                second_end: '', //第2页网址结束字符串
+                startCode: '', //起始代码
+                startLabel: '', //列表开始标签
+                endPage: '', //结束页数
+                title: '',  //标题字符串
+                content: '', //内容字符串
+                source: '', // 来源字符串
+                author: '', // 作者字符串
+                authorName: '', // 作者替换名称
+                parameter: '',  //接口类2 接口参数
+                diy_rule: '' //自定义类
+            },
+
+            rules: {  //规则
+                collect: [{ required: true, trigger: 'blur', validator: validateCollect }],
+                startLabel: [{ required: true, trigger: 'blur', validator: validateStartLabel }],
+                ruleName: [{ required: true, trigger: 'blur', validator: validateRuleName }],
+                first_url: [{ required: true, trigger: 'blur', validator: validateFirst_url }],
+                secondWeb: [{ required: true, trigger: 'blur', validator: validatsecondWeb }],
+                // second_start:[{ required: true, trigger: 'blur', validator: validatsecondWeb }],
+                // second_num:[{ required: true, trigger: 'blur', validator: validatsecondWeb }],
+                // second_end:[{ required: true, trigger: 'blur', validator: validatsecondWeb }],
+                second_start:[{ required: true, trigger: 'blur', message: '请输入网址开头' }],
+                second_num:[{ required: true, trigger: 'blur', message: '请输入代码页数' }],
+                second_end:[{ required: true, trigger: 'blur', message: '请输入网址结束字符串' }],
+
+                startCode: [{ required: true, trigger: 'blur', validator: validateStartCode }],
+                endPage: [{ required: true, trigger: 'blur', validator: validateEndCode }],
+                title: [{ required: true, trigger: 'blur', validator: validatTitle }],
+                content: [{ required: true, trigger: 'blur', validator: validatcontent }],
+                source: [{ required: true, trigger: 'blur', validator: validatsource }],
+                author: [{ required: true, trigger: 'blur', validator: validatauthor }],
+                authorName: [{ required: true, trigger: 'blur', validator: validatauthorName }],
+                parameter: [{ required: true, trigger: 'blur', validator: validatparameter }]
+            }
+        }
+    },
+    methods: {
+        //1.列表和分页相关 start ------------------------------------------------------------>
+        //1.1 开始请求列表信息方法
+        getData() {
+            getRule({
+                web_id: this.webId,
+                pageSize: this.pageSize,
+                page: this.page,
+            }).then(data => {
+                console.log(data.data.rep);
+                this.tableData = data.data.rep
+                this.total = data.data.count
+
+                let ifRun = false;
+                let runButtonId = "";
+                for (let item of this.tableData) {
+                    if (item.status == 1) {
+                        ifRun = true;
+                        runButtonId = item.id;
+                    }
+                }
+                if (ifRun == true) {
+                    this.pdStatus(runButtonId)
+                }
+                if (ifRun == true) {
+                    this.disabled = false
+                    // this.pdStatus(runButtonId)
+                } else {
+                    this.disabled = true
+                }
+
+
+            })
+        },
+        //1.2 删除内容
+        deleteRow(id) {
+            this.$confirm('注意:删除后,该条信息及其绑定关系全部删除', '是否确认删除该条信息?', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+            }).then(() => {
+                delRule({
+                    rule_id: id
+                }).then(data => {
+                    console.log(data);
+                    this.$message({
+                        type: 'success',
+                        message: '删除成功!'
+                    });
+                    this.getData()
+                })
+                console.log("当前删除:" + id)
+            }).catch(() => {
+                this.$message({
+                    type: 'warning',
+                    message: '已取消删除'
+                });
+            });
+        },
+        // // 1.3
+        // handleClose() {
+        //     this.dialogTableVisible = true
+
+        // },
+        //1.4 列表内容分页
+        //直接跳转
+        handleSizeChange(val) {
+            this.page = val;
+            this.getData();
+        },
+        //1.5 点击分页
+        handleCurrentChange(val) {
+            this.page = val;
+            this.getData();
+        },
+        // 1.6 搜索按钮
+        goSearch() {
+            getRule({
+                web_id: this.webId,
+                pageSize: this.pageSize,
+                page: this.page,
+                keyWord: this.searchRuleName,
+                type: this.webType,
+            }).then(data => {
+                this.tableData = data.data.rep
+                this.total = data.data.count
+            })
+        },
+        //1.7 重置按钮
+        goReset() {
+            this.searchRuleName = ""
+            this.getData()
+        },
+        //列表和分页相关 end ------------------------------------------------------------>
+
+        //1.8 设置采集规则
+        addCrawlerRule() {
+            if (!this.webType) {
+                this.dialogTableVisible = false
+                this.$message({
+                    message: '当前不可设置采集规则',
+                    type: 'error'
+                })
+                return
+            }
+            if (this.webType) {
+                this.dialogTableVisible = true
+                this.ruleForm.ruleName = ''
+                this.ruleForm.first_url = ''
+                this.ruleForm.collect = ''
+                this.ruleForm.second_start = ''
+                this.ruleForm.second_num = ''
+                this.ruleForm.second_end = ''
+                this.ruleForm.startCode = ''
+                this.ruleForm.startLabel = ''
+                this.ruleForm.endPage = ''
+                this.ruleForm.title = ''
+                this.ruleForm.content = ''
+                this.ruleForm.source = ''
+                this.ruleForm.author = ''
+                this.ruleForm.authorName = ''
+                this.ruleForm.parameter = ''
+                this.ruleForm.diy_rule = ''
+            }
+        },
+        //1.9 编辑采集规则
+        goEdit(id, val) {
+            console.log(id);
+            this.activeId = id
+            console.log(val);
+            if (!this.webType) {
+                this.dialogTableVisible = false
+                this.$message({
+                    message: '当前不可修改采集规则',
+                    type: 'error'
+                })
+                return
+            } else if (this.webType == 1) {
+                this.dialogBoo = "update"
+                this.dialogTableVisible = true
+                this.ruleForm.ruleName = val.name
+                this.ruleForm.first_url = val.first_url
+                this.ruleForm.collect = val.first_url
+                this.ruleForm.second_start = val.second_start
+                this.ruleForm.second_num = val.second_num
+                this.ruleForm.second_end = val.second_end
+                this.ruleForm.startCode = val.start
+                this.ruleForm.startLabel = val.start
+                this.ruleForm.endPage = val.end_pagenum
+                this.ruleForm.title = val.title
+                this.ruleForm.content = val.content
+                this.ruleForm.source = val.source
+                this.ruleForm.author = val.writer_class
+                this.ruleForm.authorName = val.writer
+                this.ruleForm.parameter = val.parameter
+                this.ruleForm.diy_rule = val.diy_rule
+
+            } else if (this.webType == 2) {
+                this.dialogBoo = "update"
+                this.dialogTableVisible = true
+                this.ruleForm.ruleName = val.name
+                this.ruleForm.first_url = val.first_url
+                this.ruleForm.collect = val.first_url
+                this.ruleForm.second_start = val.second_start
+                this.ruleForm.second_num = val.second_num
+                this.ruleForm.second_end = val.second_end
+                this.ruleForm.startCode = val.start
+                this.ruleForm.startLabel = val.start
+                this.ruleForm.endPage = val.end_pagenum
+                this.ruleForm.title = val.title
+                this.ruleForm.content = val.content
+                this.ruleForm.source = val.source
+                this.ruleForm.parameter = val.parameter
+                this.ruleForm.diy_rule = val.diy_rule
+                if (this.radio == 'true') {
+                    this.ruleForm.authorName = ''
+                    this.ruleForm.author = val.writer_class
+                }
+                if (this.radio == 'false') {
+                    this.ruleForm.author = ''
+                    this.ruleForm.authorName = val.writer
+                }
+            } else if (this.webType == 3) {
+                this.dialogBoo = "update"
+                this.dialogTableVisible = true
+                this.ruleForm.ruleName = val.name
+                this.ruleForm.diy_rule=val.diy_rule
+            }
+
+
+        },
+        //采集
+        goCollect(id, status) {
+            for (let item of this.tableData) {
+                if (item.id == id) {
+                    item.status = 1;
+                }
+            }
+            sendCrawler({
+                id: id
+            }).then(data => {
+                console.log(data);
+                this.$message({
+                    message: '采集中',
+                    type: 'success',
+                    iconClass: 'el-icon-refresh'
+                });
+            })
+        },
+        //修改按钮状态
+        pdStatus(id) {
+            console.log(id)
+            for (let item of this.tableData) {
+                if (item.id == id) {
+                    item.status = 1
+                } else {
+                    item.status = 4
+                }
+            }
+
+            console.log(this.tableData)
+        },
+        toast() {
+            this.$message({
+                message: '一次只能采集一个任务规则',
+                type: 'error'
+            })
+        },
+
+        // 弹出层相关方法
+        // 提交表单
+        submitForm() {
+            //添加
+            if (this.dialogBoo == 'add') {
+                if (this.webType == 1) {
+                    if (this.ruleForm.author == "") {
+                        addRule({
+                            name: this.ruleForm.ruleName,
+                            web_id: this.webId,
+                            type: this.webType,
+                            first_url: this.ruleForm.first_url,//规则型1:第1页网址  接口型2:开始采集地址
+                            second_start: this.ruleForm.second_start,//规则型1:第2页网址开头
+                            second_num: this.ruleForm.second_num,//规则型1:第2页代码页数
+                            second_end: this.ruleForm.second_end,//规则型1:第2页网址结束字符串
+                            start: this.ruleForm.startCode, //规则型1:列表标签类名  接口型2:列表标签
+                            title: this.ruleForm.title, //规则型1:标题标签类名  接口型2:标题标签
+                            content: this.ruleForm.content,//规则型1:内容标签类名  接口型2:内容标签
+                            source: this.ruleForm.source, //规则型1:来源标签类名  接口型2:来源标签
+                            // writer_class: this.ruleForm.author,//规则型1:作者标签类名  接口型2:作者标签
+                            writer: this.ruleForm.authorName,//规则型1:接口型2:作者默认名称(若未采集到则设置默认作者)
+                            end_pagenum: this.ruleForm.endPage//规则型1:列表页结束页码
+                        }).then(data => {
+                            this.getData()
+                            console.log(data);
+                            if (data.code == 200) {
+                                this.dialogTableVisible = false
+                                this.$message({
+                                    message: '添加成功',
+                                    type: 'success'
+                                })
+                            } else if (data.code == 0) {
+                                this.$message({
+                                    message: data.message,
+                                    type: 'error'
+                                })
+                            }
+                        })
+                    } else {
+                        addRule({
+                            name: this.ruleForm.ruleName,
+                            web_id: this.webId,
+                            type: this.webType,
+                            first_url: this.ruleForm.first_url,//规则型1:第1页网址  接口型2:开始采集地址
+                            second_start: this.ruleForm.second_start,//规则型1:第2页网址开头
+                            second_num: this.ruleForm.second_num,//规则型1:第2页代码页数
+                            second_end: this.ruleForm.second_end,//规则型1:第2页网址结束字符串
+                            start: this.ruleForm.startCode, //规则型1:列表标签类名  接口型2:列表标签
+                            title: this.ruleForm.title, //规则型1:标题标签类名  接口型2:标题标签
+                            content: this.ruleForm.content,//规则型1:内容标签类名  接口型2:内容标签
+                            source: this.ruleForm.source, //规则型1:来源标签类名  接口型2:来源标签
+                            writer_class: this.ruleForm.author,//规则型1:作者标签类名  接口型2:作者标签
+                            writer: this.ruleForm.authorName,//规则型1:接口型2:作者默认名称(若未采集到则设置默认作者)
+                            end_pagenum: this.ruleForm.endPage//规则型1:列表页结束页码
+                        }).then(data => {
+                            this.getData()
+                            console.log(data);
+                            if (data.code == 200) {
+                                this.dialogTableVisible = false
+                                this.$message({
+                                    message: '添加成功',
+                                    type: 'success'
+                                })
+                            } else if (data.code == 0) {
+                                this.$message({
+                                    message: data.message,
+                                    type: 'error'
+                                })
+                            }
+                        })
+                    }
+
+                } else if (this.webType == 2 && this.radio == 'true') {
+                    addRule({
+                        name: this.ruleForm.ruleName,
+                        web_id: this.webId,
+                        type: this.webType,
+                        first_url: this.ruleForm.collect,//规则型1:第1页网址  接口型2:开始采集地址
+                        parameter: this.ruleForm.parameter,//接口型2:接口参数
+                        start: this.ruleForm.startLabel, //规则型1:列表标签类名  接口型2:列表标签
+                        title: this.ruleForm.title, //规则型1:标题标签类名  接口型2:标题标签
+                        content: this.ruleForm.content,//规则型1:内容标签类名  接口型2:内容标签
+                        source: this.ruleForm.source, //规则型1:来源标签类名  接口型2:来源标签
+                        writer_class: this.ruleForm.author,//规则型1:作者标签类名  接口型2:作者标签
+                        // writer: this.ruleForm.authorName,//规则型1:接口型2:作者默认名称(若未采集到则设置默认作者)
+                    }).then(data => {
+                        this.getData()
+                        console.log(data);
+                        if (data.code == 200) {
+                            this.dialogTableVisible = false
+                            this.$message({
+                                message: '添加成功',
+                                type: 'success'
+                            })
+                            this.ruleForm.authorName = ''
+                        } else if (data.code == 0) {
+                            this.$message({
+                                message: data.message,
+                                type: 'error'
+                            })
+                        }
+                    })
+
+                } else if (this.webType == 2 && this.radio == 'false') {
+                    addRule({
+                        name: this.ruleForm.ruleName,
+                        web_id: this.webId,
+                        type: this.webType,
+                        first_url: this.ruleForm.collect,//规则型1:第1页网址  接口型2:开始采集地址
+                        parameter: this.ruleForm.parameter,//接口型2:接口参数
+                        start: this.ruleForm.startLabel, //规则型1:列表标签类名  接口型2:列表标签
+                        title: this.ruleForm.title, //规则型1:标题标签类名  接口型2:标题标签
+                        content: this.ruleForm.content,//规则型1:内容标签类名  接口型2:内容标签
+                        source: this.ruleForm.source, //规则型1:来源标签类名  接口型2:来源标签
+                        // writer_class: this.ruleForm.author,//规则型1:作者标签类名  接口型2:作者标签
+                        writer: this.ruleForm.authorName,//规则型1:接口型2:作者默认名称(若未采集到则设置默认作者)
+                    }).then(data => {
+                        this.getData()
+                        console.log(data);
+                        if (data.code == 200) {
+                            this.dialogTableVisible = false
+                            this.$message({
+                                message: '添加成功',
+                                type: 'success'
+                            })
+                            this.ruleForm.author = ''
+                        } else if (data.code == 0) {
+                            this.$message({
+                                message: data.message,
+                                type: 'error'
+                            })
+                        }
+                    })
+
+                } else if (this.webType == 3) {
+                    addRule({
+                        name: this.ruleForm.ruleName,
+                        web_id: this.webId,
+                        type: this.webType,
+                        diy_rule: this.ruleForm.diy_rule, //自定义3:规则
+                    }).then(data => {
+                        console.log(data);
+                        this.getData()
+                        if (data.code == 200) {
+                            this.dialogTableVisible = false
+                            this.$message({
+                                message: '添加成功',
+                                type: 'success'
+                            })
+                        } else if (data.code == 0) {
+                            this.$message({
+                                message: data.message,
+                                type: 'error'
+                            })
+                        }
+
+                    })
+                }
+            }
+            //编辑
+            if (this.dialogBoo == 'update') {
+                if (this.webType == '') {
+                    this.dialogTableVisible = false
+                    this.$message({
+                        message: '当前不可设置采集规则',
+                        type: 'error'
+                    })
+                    return
+                }
+                if (this.webType == 1) {
+                    updateRule({
+                        name: this.ruleForm.ruleName,
+                        id: this.activeId,
+                        type: this.webType,
+                        first_url: this.ruleForm.first_url,//规则型1:第1页网址  接口型2:开始采集地址
+                        second_start: this.ruleForm.second_start,//规则型1:第2页网址开头
+                        second_num: this.ruleForm.second_num,//规则型1:第2页代码页数
+                        second_end: this.ruleForm.second_end,//规则型1:第2页网址结束字符串
+                        start: this.ruleForm.startCode, //规则型1:列表标签类名  接口型2:列表标签
+                        title: this.ruleForm.title, //规则型1:标题标签类名  接口型2:标题标签
+                        content: this.ruleForm.content,//规则型1:内容标签类名  接口型2:内容标签
+                        source: this.ruleForm.source, //规则型1:来源标签类名  接口型2:来源标签
+                        writer_class: this.ruleForm.author,//规则型1:作者标签类名  接口型2:作者标签
+                        writer: this.ruleForm.authorName,//规则型1:接口型2:作者默认名称(若未采集到则设置默认作者)
+                        end_pagenum: this.ruleForm.endPage//规则型1:列表页结束页码
+                    }).then(data => {
+                        this.getData()
+                        console.log(data);
+                        if (data.code == 200) {
+                            this.dialogTableVisible = false
+                            this.$message({
+                                message: '修改成功',
+                                type: 'success'
+                            })
+                        } else if (data.code == 0) {
+                            this.$message({
+                                message: data.message,
+                                type: 'error'
+                            })
+                        }
+                    })
+                } else if (this.webType == 2 && this.radio == 'true') {
+                    updateRule({
+                        name: this.ruleForm.ruleName,
+                        id: this.activeId,
+                        type: this.webType,
+                        first_url: this.ruleForm.collect,//规则型1:第1页网址  接口型2:开始采集地址
+                        parameter: this.ruleForm.parameter,//接口型2:接口参数
+                        start: this.ruleForm.startCode, //规则型1:列表标签类名  接口型2:列表标签
+                        title: this.ruleForm.title, //规则型1:标题标签类名  接口型2:标题标签
+                        content: this.ruleForm.content,//规则型1:内容标签类名  接口型2:内容标签
+                        source: this.ruleForm.source, //规则型1:来源标签类名  接口型2:来源标签
+                        writer_class: this.ruleForm.author,//规则型1:作者标签类名  接口型2:作者标签
+                        // writer: this.ruleForm.authorName,//规则型1:接口型2:作者默认名称(若未采集到则设置默认作者)
+                    }).then(data => {
+                        this.getData()
+                        console.log(data);
+                        if (data.code == 200) {
+                            this.dialogTableVisible = false
+                            this.$message({
+                                message: '修改成功',
+                                type: 'success'
+                            })
+                            this.ruleForm.authorName = ""
+                        } else if (data.code == 0) {
+                            this.$message({
+                                message: data.message,
+                                type: 'error'
+                            })
+                        }
+                    })
+                } else if (this.webType == 2 && this.radio == 'false') {
+                    this.ruleForm.author = ""
+                    updateRule({
+                        name: this.ruleForm.ruleName,
+                        id: this.activeId,
+                        type: this.webType,
+                        first_url: this.ruleForm.collect,//规则型1:第1页网址  接口型2:开始采集地址
+                        parameter: this.ruleForm.parameter,//接口型2:接口参数
+                        start: this.ruleForm.startCode, //规则型1:列表标签类名  接口型2:列表标签
+                        title: this.ruleForm.title, //规则型1:标题标签类名  接口型2:标题标签
+                        content: this.ruleForm.content,//规则型1:内容标签类名  接口型2:内容标签
+                        source: this.ruleForm.source, //规则型1:来源标签类名  接口型2:来源标签
+                        // writer_class: this.ruleForm.author,//规则型1:作者标签类名  接口型2:作者标签
+                        writer: this.ruleForm.authorName,//规则型1:接口型2:作者默认名称(若未采集到则设置默认作者)
+                    }).then(data => {
+                        this.getData()
+                        console.log(data);
+                        if (data.code == 200) {
+                            this.dialogTableVisible = false
+                            this.$message({
+                                message: '修改成功',
+                                type: 'success'
+                            })
+                            this.ruleForm.author = ""
+                        } else if (data.code == 0) {
+                            this.$message({
+                                message: data.message,
+                                type: 'error'
+                            })
+                        }
+                    })
+                } else if (this.webType == 3) {
+                    updateRule({
+                        name: this.ruleForm.ruleName,
+                        id: this.activeId,
+                        type: this.webType,
+                        diy_rule: this.ruleForm.diy_rule, //自定义3:规则
+                    }).then(data => {
+                        console.log(data);
+                        this.getData()
+                        if (data.code == 200) {
+                            this.dialogTableVisible = false
+                            this.$message({
+                                message: '修改成功',
+                                type: 'success'
+                            })
+                        } else if (data.code == 0) {
+                            this.$message({
+                                message: data.message,
+                                type: 'error'
+                            })
+                        }
+                    })
+                }
+            }
+        },
+        //保存
+        saveForm() {
+            this.dialogTableVisible = false
+        },
+        // 查看
+        goLook(id, val) {
+            console.log(id);
+            console.log(val);
+            console.log(val.name);
+
+            //跳转到规则列表页
+            this.$router.push({
+                path: '/webCrawlerList',
+                query: {
+                    id: id,
+                    source: val.name
+                }
+            })
+        },
+    },
+    mounted() {
+        this.webId = this.$route.query.id
+        this.webType = this.$route.query.type
+        this.webName = this.$route.query.name
+
+        //获取数据
+        this.getData()
+
+    },
+}
+</script>
+
+<style scoped lang="less">
+.title {
+    margin: 30px 30px 20px 30px;
+    padding: 30px 30px 40px 30px;
+    background-color: #fff;
+    border-radius: 20px 20px 20px 20px;
+    border: 1px solid #E9EDF7;
+
+    .left {
+        float: left;
+    }
+
+    .right {
+        float: right;
+    }
+
+    .searchBox {
+        .searchTitle {
+            padding-bottom: 10px;
+            font-family: Microsoft YaHei, Microsoft YaHei;
+            font-weight: 400;
+            font-size: 14px;
+            color: #999999;
+            line-height: 16px;
+        }
+
+        .el-select {
+            width: 300px;
+            display: inline-block;
+            position: relative;
+        }
+    }
+
+    .btnList {
+        float: right;
+        padding-top: 28px;
+
+        button {
+            width: 120px;
+            height: 38px;
+            border: none;
+            border-radius: 8px;
+            // padding: 0 30px;
+        }
+
+        .search {
+            background-color: #5570f1;
+            color: #fff;
+            margin-right: 20px;
+        }
+
+        .reset {
+            font-family: Microsoft YaHei, Microsoft YaHei;
+            font-weight: 400;
+            font-size: 16px;
+            color: #333333;
+            background: #F5F7FB;
+            border-radius: 8px 8px 8px 8px;
+            border: 1px solid rgba(85, 112, 241, 0.11);
+        }
+    }
+}
+
+.layerBox {
+    padding: 30px 20px;
+    position: relative;
+
+    .btn {
+        position: absolute;
+        top: 30px;
+        right: 20px;
+        height: 38px;
+        color: #fff;
+        background-color: #5570f1;
+        border: none;
+        border-radius: 8px;
+        padding: 8px 28px 9px;
+        box-sizing: border-box;
+    }
+
+    .listBtnBox {
+        justify-content: left;
+    }
+
+
+    .listDeleteBtn,
+    .listEditBtn,
+    .listLookBtn,
+    .loadingBtn,
+    .collector {
+        margin-left: 0px;
+        padding-left: 0px;
+        margin-right: 20px;
+        width: 76px;
+        height: 36px;
+        line-height: 36px;
+        position: relative;
+
+        .collectorIcon {
+            display: inline-block;
+            width: 20px;
+            height: 20px;
+            background: url("../../assets/advertise/Graph.png");
+            vertical-align: middle;
+            margin-right: 6px;
+        }
+
+        .collectorIcon1 {
+            position: absolute;
+            top: 12px;
+            left: 8px;
+        }
+
+    }
+
+
+    .collector {
+        text-align: center;
+        border-radius: 8px;
+        cursor: pointer;
+        color: #519C66;
+        background-color: rgba(81, 156, 102, 0.16);
+
+        >i {
+            padding-right: 8px;
+        }
+    }
+
+    .loadingBtn {
+        text-align: center;
+        border-radius: 8px;
+        cursor: pointer;
+        color: rgb(153, 153, 153);
+        background-color: rgba(153, 153, 153, 0.16);
+
+        >i {
+            padding-right: 0px;
+        }
+
+        >span {
+            padding-left: 12px;
+        }
+    }
+
+    .listLookBtn {
+        text-align: center;
+        border-radius: 8px;
+        cursor: pointer;
+        color: #55b5f1;
+        background-color: rgba(85, 181, 241, 0.16);
+
+        >i {
+            padding-right: 8px;
+        }
+    }
+}
+
+// 弹出层内容
+.dialogText {
+    margin: 0 7px 30px 3px;
+    padding-top: 20px;
+    padding-bottom: 1px;
+    padding: 20px 60px 1px 20px;
+    background-color: #f5f7fb;
+
+    .pageTwo {
+        ::v-deep .el-col-6 {
+            width: 31%;
+            height: 32px;
+            margin-right: 24px;
+        }
+        .el_col_6_end{
+            margin-right: 0;
+        }
+
+        .keywords {
+            ::v-deep .el-input {
+                position: relative;
+                font-size: 14px;
+                display: inline-block;
+                // width: 32%;
+                margin-right: 10px;
+            }
+
+            .lastInput {
+                margin: 0;
+            }
+
+        }
+    }
+
+    // 资讯关键词 和 资讯描述 的 文字提示 
+    .keywords,
+    .desc {
+        position: relative;
+
+        i {
+            position: absolute;
+            top: 0;
+            left: -15px;
+        }
+    }
+}
+
+// 弹出层按钮
+.dialogBtn {
+    text-align: center;
+    margin: 50px auto 20px;
+
+    button {
+        width: 184px;
+        padding: 16px;
+        font-family: Microsoft YaHei, Microsoft YaHei;
+        font-weight: 400;
+        font-size: 20px;
+        border: none;
+        border-radius: 12px 12px 12px 12px;
+    }
+
+    // 取消
+    .cancel {
+        color: #333333;
+        background-color: #f5f7fb;
+        border: 2px solid rgba(85, 112, 241, 0.11);
+    }
+
+    // 提交
+    .submit {
+        color: #fff;
+        background-color: #5570F1;
+        margin-left: 40px;
+    }
+}
+
+::v-deep .el-form-item {
+    margin-bottom: 50px;
+}
+
+::v-deep .el-select {
+    width: 100%;
+}
+
+::v-deep .el-input--medium,
+::v-deep .el-form-item__label {
+    line-height: 36px;
+    // font-size: 16px;
+}
+</style>