(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-665ffc30"],{"14d7":function(e,t,r){},"4b51":function(e,t,r){},"83e7":function(e,t,r){"use strict";r("14d7")},"8ba2":function(e,t,r){"use strict";r.d(t,"d",(function(){return a})),r.d(t,"k",(function(){return o})),r.d(t,"o",(function(){return l})),r.d(t,"g",(function(){return i})),r.d(t,"c",(function(){return n})),r.d(t,"j",(function(){return c})),r.d(t,"n",(function(){return u})),r.d(t,"f",(function(){return m})),r.d(t,"l",(function(){return d})),r.d(t,"h",(function(){return h})),r.d(t,"i",(function(){return p})),r.d(t,"m",(function(){return b})),r.d(t,"e",(function(){return g})),r.d(t,"b",(function(){return f})),r.d(t,"a",(function(){return w}));var s=r("b775"),a=function(e){return Object(s["a"])({url:"/collector/addWeb",method:"post",data:e})},o=function(e){return Object(s["a"])({url:"/collector/getWeb",method:"post",data:e})},l=function(e){return Object(s["a"])({url:"/collector/upWeb",method:"post",data:e})},i=function(e){return Object(s["a"])({url:"/collector/delWeb",method:"get",params:e})},n=function(e){return Object(s["a"])({url:"/collector/addRule",method:"post",data:e})},c=function(e){return Object(s["a"])({url:"/collector/getRule",method:"post",data:e})},u=function(e){return Object(s["a"])({url:"/collector/upRule",method:"post",data:e})},m=function(e){return Object(s["a"])({url:"/collector/delRule",method:"get",params:e})},d=function(e){return Object(s["a"])({url:"/collector/sendCrawler",method:"post",data:e})},h=function(e){return Object(s["a"])({url:"/collector/getInfo",method:"post",data:e})},p=function(e){return Object(s["a"])({url:"/collector/getOneInfo",method:"get",params:e})},b=function(e){return Object(s["a"])({url:"/collector/upInfo",method:"post",data:e})},g=function(e){return Object(s["a"])({url:"/collector/delInfo",method:"get",params:e})},f=function(e){return Object(s["a"])({url:"/collector/addCatid",method:"post",data:e})},w=function(e){return Object(s["a"])({url:"/collector/addArt",method:"get",params:e})}},"9f3a":function(e,t,r){"use strict";r("fe9d")},ad06:function(e,t,r){"use strict";r.r(t);var s=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("div",{staticClass:"title"},[r("el-row",[r("el-col",{staticClass:"left",attrs:{span:6}},[r("div",{staticClass:"searchBox"},[r("div",{staticClass:"searchTitle"},[e._v("任务规则名:")]),r("el-input",{attrs:{placeholder:"请输入任务规则名"},model:{value:e.searchRuleName,callback:function(t){e.searchRuleName=t},expression:"searchRuleName"}})],1)]),r("el-col",{staticClass:"right",attrs:{span:10}},[r("div",{staticClass:"btnList"},[r("button",{staticClass:"search",on:{click:e.goSearch}},[e._v("搜索")]),r("button",{staticClass:"reset",on:{click:e.goReset}},[e._v("重置")])])])],1)],1),r("div",{staticClass:"layerBox"},[r("tableTitle",{attrs:{name:e.tableDivTitle}}),r("button",{staticClass:"btn",on:{click:e.addCrawlerRule}},[e._v("设置采集规则")]),r("el-row",[[r("el-table",{staticClass:"my-table",staticStyle:{width:"100%"},attrs:{data:e.tableData}},[r("el-table-column",{attrs:{fixed:"",prop:"id",label:"编号",width:"100"}}),r("el-table-column",{attrs:{prop:"name",label:"任务规则名",width:""}}),r("el-table-column",{attrs:{prop:"arts_count",label:"采集个数",width:""}}),r("el-table-column",{attrs:{prop:"created_at",label:"创建时间",width:""}}),r("el-table-column",{attrs:{prop:"updated_at",label:"修改时间",width:""}}),r("el-table-column",{attrs:{fixed:"right",label:"操作",width:"385"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("div",{staticClass:"listBtnBox"},[r("div",{staticClass:"listDeleteBtn",on:{click:function(r){return e.deleteRow(t.row.id)}}},[r("i",{staticClass:"el-icon-delete"}),e._v("删除")]),r("div",{staticClass:"listEditBtn",on:{click:function(r){return e.goEdit(t.row.id,t.row)}}},[r("i",{staticClass:"el-icon-edit-outline"}),e._v("编辑")]),0==t.row.status||2==t.row.status?r("div",{staticClass:"collector",on:{click:function(r){return e.goCollect(t.row.id,t.row.status)}}},[r("i",{staticClass:"collectorIcon"}),e._v("采集 ")]):e._e(),4==t.row.status?r("div",{staticClass:"collector",on:{click:e.toast}},[r("i",{staticClass:"collectorIcon"}),e._v("采集 ")]):e._e(),1==t.row.status?r("div",{staticClass:"loadingBtn"},[r("i",{staticClass:"collectorIcon1 el-icon-loading"}),r("span",[e._v("采集")])]):e._e(),r("div",{staticClass:"listLookBtn",on:{click:function(r){return e.goLook(t.row.id,t.row)}}},[r("i",{staticClass:"el-icon-view"}),e._v("查看")])])]}}])})],1)]],2)],1),r("div",{directives:[{name:"show",rawName:"v-show",value:e.disabled,expression:"disabled"}],staticClass:"alignBox"},[r("el-row",[r("el-col",{attrs:{span:24}},[r("el-pagination",{attrs:{background:"","current-page":e.page,"page-size":e.pageSize,layout:"total, prev, pager, next, jumper",total:e.total},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1)],1)],1),r("el-dialog",{attrs:{title:e.dialogName,visible:e.dialogTableVisible,width:"50%","close-on-click-modal":!1},on:{"update:visible":function(t){e.dialogTableVisible=t}}},[r("el-form",{ref:"ruleForm",staticClass:"demo-ruleForm",attrs:{model:e.ruleForm,rules:e.rules,"label-width":"120px"}},[r("div",{directives:[{name:"show",rawName:"v-show",value:1==this.webType,expression:"this.webType == 1"}],staticClass:"one"},[r("div",{staticClass:"dialogText"},[r("el-form-item",{staticClass:"keywords",attrs:{label:"任务规则名:",prop:"ruleName"}},[r("el-input",{attrs:{placeholder:"请输入任务规则名"},model:{value:e.ruleForm.ruleName,callback:function(t){e.$set(e.ruleForm,"ruleName",t)},expression:"ruleForm.ruleName"}}),r("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:"任务规则名,如中国农村网-时政要闻",placement:"top-start"}},[r("i",{staticClass:"el-icon-warning"})])],1),r("el-form-item",{staticClass:"keywords",attrs:{label:"第1页网址:",prop:"first_url"}},[r("el-input",{attrs:{placeholder:"请输入第一页网址"},model:{value:e.ruleForm.first_url,callback:function(t){e.$set(e.ruleForm,"first_url",t)},expression:"ruleForm.first_url"}}),r("el-tooltip",{attrs:{placement:"top-start"}},[r("div",{attrs:{slot:"content"},slot:"content"},[e._v(" 一般为网站的栏目页网址,也是文章列表页网址。"),r("br"),e._v(" 若网站内页数为多页,第1页网址如:http://politics.people.com.cn/GB/1024/index1.html(第1页的数字) ")]),r("i",{staticClass:"el-icon-warning"})])],1),r("div",{staticClass:"pageTwo"},[r("el-form-item",{staticClass:"keywords",attrs:{label:"第2页网址:",prop:"secondWeb"}},[r("el-input",{attrs:{placeholder:"请输入网站开头"},model:{value:e.ruleForm.second_start,callback:function(t){e.$set(e.ruleForm,"second_start",t)},expression:"ruleForm.second_start"}}),r("el-input",{attrs:{placeholder:"请输入代码页数"},model:{value:e.ruleForm.second_num,callback:function(t){e.$set(e.ruleForm,"second_num",t)},expression:"ruleForm.second_num"}}),r("el-input",{staticClass:"lastInput",attrs:{placeholder:"请输入网址结束字符串"},model:{value:e.ruleForm.second_end,callback:function(t){e.$set(e.ruleForm,"second_end",t)},expression:"ruleForm.second_end"}}),r("el-tooltip",{attrs:{placement:"top-start"}},[r("div",{attrs:{slot:"content"},slot:"content"},[e._v(" 网址如:http://politics.people.com.cn/GB/1024/index2.html"),r("br"),e._v(" 输入为 http://politics.people.com.cn/GB/1024/index 2 .html分别埴入输入框内 ")]),r("i",{staticClass:"el-icon-warning"})])],1)],1),r("el-form-item",{staticClass:"keywords",attrs:{label:"起始代码:",prop:"startCode"}},[r("el-input",{attrs:{placeholder:"请输入起始代码"},model:{value:e.ruleForm.startCode,callback:function(t){e.$set(e.ruleForm,"startCode",t)},expression:"ruleForm.startCode"}}),r("el-tooltip",{attrs:{placement:"top-start"}},[r("div",{attrs:{slot:"content"},slot:"content"},[e._v(" 起始代码为文章列表第一篇文章上面几行代码中一段代码"),r("br"),e._v(' 如<\'div class="ej list box clear">,输入为 .ej list box clear 埴入输入框内'),r("br"),e._v(' 如<\'ul class="ej list box clear">,输入为 .ej list box clearul 埴入输入框内 ')]),r("i",{staticClass:"el-icon-warning"})])],1),r("el-form-item",{staticClass:"keywords",attrs:{label:"结束页数:",prop:"endPage"}},[r("el-input",{attrs:{placeholder:"请输入结束页数"},model:{value:e.ruleForm.endPage,callback:function(t){e.$set(e.ruleForm,"endPage",t)},expression:"ruleForm.endPage"}})],1)],1),r("div",{staticClass:"dialogText"},[r("el-form-item",{staticClass:"keywords",attrs:{label:"标题字符串:",prop:"title"}},[r("el-input",{attrs:{placeholder:"请输入网站名称"},model:{value:e.ruleForm.title,callback:function(t){e.$set(e.ruleForm,"title",t)},expression:"ruleForm.title"}}),r("el-tooltip",{attrs:{placement:"top-start"}},[r("div",{attrs:{slot:"content"},slot:"content"},[e._v(" 如标题代码:<'h1 class='news_art'>红枣滞销喂羊 电商帮忙促销,标题字符串为 .news_art 填入输入框内"),r("br"),e._v(" 如标题代码:<'h1 id='news at'>红枣滞销喂羊 电商帮忙促销,标题字符串为 #news art 填入输入框内 ")]),r("i",{staticClass:"el-icon-warning"})])],1),r("el-form-item",{staticClass:"keywords",attrs:{label:"内容字符串:",prop:"content"}},[r("el-input",{attrs:{placeholder:"请输入标题字符串"},model:{value:e.ruleForm.content,callback:function(t){e.$set(e.ruleForm,"content",t)},expression:"ruleForm.content"}}),r("el-tooltip",{attrs:{placement:"top-start"}},[r("div",{attrs:{slot:"content"},slot:"content"},[e._v(" 如内容代码:<'h1 class='news box'> <' /h1>,内容字符串为.news box 填入输入框内"),r("br"),e._v(" 如内容代码:<'h1 id='news_box'> <' /h1>,内容字符串为 #news_box 填入输入框内 ")]),r("i",{staticClass:"el-icon-warning"})])],1),r("el-form-item",{staticClass:"keywords",attrs:{label:"来源字符串:",prop:""}},[r("el-input",{attrs:{placeholder:"请输入来源字符串"},model:{value:e.ruleForm.source,callback:function(t){e.$set(e.ruleForm,"source",t)},expression:"ruleForm.source"}})],1),r("el-form-item",{staticClass:"keywords",attrs:{label:"作者字符串:",prop:""}},[r("el-input",{attrs:{placeholder:"请输入作者字符串"},model:{value:e.ruleForm.author,callback:function(t){e.$set(e.ruleForm,"author",t)},expression:"ruleForm.author"}})],1),r("el-form-item",{staticClass:"keywords",attrs:{label:"作者替换名称:",prop:"authorName"}},[r("el-input",{attrs:{placeholder:"请输入作者替换名称"},model:{value:e.ruleForm.authorName,callback:function(t){e.$set(e.ruleForm,"authorName",t)},expression:"ruleForm.authorName"}})],1)],1)]),r("div",{directives:[{name:"show",rawName:"v-show",value:2==this.webType,expression:"this.webType == 2"}],staticClass:"two"},[r("div",{staticClass:"dialogText"},[r("el-form-item",{staticClass:"keywords",attrs:{label:"任务规则名:",prop:"ruleName"}},[r("el-input",{attrs:{placeholder:"请输入任务规则名"},model:{value:e.ruleForm.ruleName,callback:function(t){e.$set(e.ruleForm,"ruleName",t)},expression:"ruleForm.ruleName"}}),r("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:"任务规则名,如中国农村网-时政要闻",placement:"top-start"}},[r("i",{staticClass:"el-icon-warning"})])],1),r("el-form-item",{staticClass:"keywords",attrs:{label:"请求网址:",prop:"collect"}},[r("el-input",{attrs:{placeholder:"请输入请求网址(请求URL)"},model:{value:e.ruleForm.collect,callback:function(t){e.$set(e.ruleForm,"collect",t)},expression:"ruleForm.collect"}}),r("el-tooltip",{attrs:{placement:"top-start"}},[r("div",{attrs:{slot:"content"},slot:"content"},[e._v(" 请求网址:网络(Network)-名称(Name)找名称 - "),r("br"),e._v(" 找到请求网址(Request URL):https://www.ndcpa.gov.cn/queryList,该网址填入输入框。 ")]),r("i",{staticClass:"el-icon-warning"})])],1),r("el-form-item",{staticClass:"keywords",attrs:{label:"接口参数:",prop:"parameter"}},[r("el-input",{attrs:{placeholder:"请输入接口参数"},model:{value:e.ruleForm.parameter,callback:function(t){e.$set(e.ruleForm,"parameter",t)},expression:"ruleForm.parameter"}}),r("el-tooltip",{attrs:{placement:"top-start"}},[r("div",{attrs:{slot:"content"},slot:"content"},[e._v(" 接口参数:网络(Network)-名称(Name)找名称 - Payload"),r("br"),e._v(" current=1,pageSize:25,webSiteCode[]:jbkzzx,channelCode[]:c100008"),r("br"),e._v(' 填入为{"current"=1,"pageSize":25,"webSiteCode":"[jbkzzx]","channelCode":"[c100008]"},中间用","隔开。 ')]),r("i",{staticClass:"el-icon-warning"})])],1),r("el-form-item",{staticClass:"keywords",attrs:{label:"列表开始标签:",prop:"startLabel"}},[r("el-input",{attrs:{placeholder:"请输入列表开始标签"},model:{value:e.ruleForm.startLabel,callback:function(t){e.$set(e.ruleForm,"startLabel",t)},expression:"ruleForm.startLabel"}}),r("el-tooltip",{attrs:{placement:"top-start"}},[r("div",{attrs:{slot:"content"},slot:"content"},[e._v(" 如包含本网页内所有的数据(data)下含有本网页内所有新闻的数据标签(resut),输入为 [data][result] 填入输入框。 ")]),r("i",{staticClass:"el-icon-warning"})])],1),r("el-form-item",{staticClass:"keywords",attrs:{label:"标题字符串:",prop:"title"}},[r("el-input",{attrs:{placeholder:"请输入标题字符串"},model:{value:e.ruleForm.title,callback:function(t){e.$set(e.ruleForm,"title",t)},expression:"ruleForm.title"}}),r("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:"如(标题)是title=“xXX应急演习”,输入为 [title]埴入输入框。",placement:"top-start"}},[r("i",{staticClass:"el-icon-warning"})])],1),r("el-form-item",{staticClass:"keywords",attrs:{label:"内容字符串:",prop:"content"}},[r("el-input",{attrs:{placeholder:"请输入内容字符串"},model:{value:e.ruleForm.content,callback:function(t){e.$set(e.ruleForm,"content",t)},expression:"ruleForm.content"}}),r("el-tooltip",{attrs:{placement:"top-start"}},[r("div",{attrs:{slot:"content"},slot:"content"},[e._v(" 如内容(content)下含有本网页内所有新闻的详细数据(content),输入为[content][content] 填入输入框。 ")]),r("i",{staticClass:"el-icon-warning"})])],1),r("el-form-item",{staticClass:"keywords",attrs:{label:"来源字符串:",prop:""}},[r("el-input",{attrs:{placeholder:"请输入来源字符串"},model:{value:e.ruleForm.source,callback:function(t){e.$set(e.ruleForm,"source",t)},expression:"ruleForm.source"}}),r("el-tooltip",{attrs:{placement:"top-start"}},[r("div",{attrs:{slot:"content"},slot:"content"},[e._v(' 如(来源)是contentSource="XXX应急处置部门",输入为[contentSource]埴入输入框。 ')]),r("i",{staticClass:"el-icon-warning"})])],1),r("el-form-item",{staticClass:"keywords",attrs:{label:"是否有作者:",prop:"name"}},[r("el-radio",{attrs:{label:"true"},model:{value:e.radio,callback:function(t){e.radio=t},expression:"radio"}},[e._v("是")]),r("el-radio",{attrs:{label:"false"},model:{value:e.radio,callback:function(t){e.radio=t},expression:"radio"}},[e._v("否")])],1),r("el-form-item",{directives:[{name:"show",rawName:"v-show",value:"true"==this.radio,expression:"this.radio == 'true'"}],staticClass:"keywords",attrs:{label:"作者字符串:",prop:"author"}},[r("el-input",{attrs:{placeholder:"请输入作者字符串"},model:{value:e.ruleForm.author,callback:function(t){e.$set(e.ruleForm,"author",t)},expression:"ruleForm.author"}}),r("el-tooltip",{attrs:{placement:"top-start"}},[r("div",{attrs:{slot:"content"},slot:"content"},[e._v(" 如作者(author)是author=“张三”,输入为 [author] 埴入输入框。 ")]),r("i",{staticClass:"el-icon-warning"})])],1),r("el-form-item",{directives:[{name:"show",rawName:"v-show",value:"false"==this.radio,expression:"this.radio == 'false'"}],staticClass:"keywords",attrs:{label:"作者替换名称:",prop:"authorName"}},[r("el-input",{attrs:{placeholder:"请输入作者替换名称"},model:{value:e.ruleForm.authorName,callback:function(t){e.$set(e.ruleForm,"authorName",t)},expression:"ruleForm.authorName"}})],1)],1)]),r("div",{directives:[{name:"show",rawName:"v-show",value:3==this.webType,expression:"this.webType == 3"}],staticClass:"three"},[r("div",{staticClass:"dialogText"},[r("el-form-item",{staticClass:"keywords",attrs:{label:"任务规则名:",prop:"ruleName"}},[r("el-input",{attrs:{placeholder:"请输入任务规则名"},model:{value:e.ruleForm.ruleName,callback:function(t){e.$set(e.ruleForm,"ruleName",t)},expression:"ruleForm.ruleName"}}),r("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:"任务规则名,如中国农村网-时政要闻",placement:"top-start"}},[r("i",{staticClass:"el-icon-warning"})])],1),r("el-form-item",{staticClass:"keywords",attrs:{label:"自定义规则:",prop:"name"}},[r("el-input",{attrs:{type:"textarea",rows:8,resize:"none",placeholder:""},model:{value:e.ruleForm.diy_rule,callback:function(t){e.$set(e.ruleForm,"diy_rule",t)},expression:"ruleForm.diy_rule"}})],1)],1)]),r("div",{staticClass:"dialogBtn"},[r("button",{staticClass:"cancel",on:{click:e.saveForm}},[e._v("保存")]),r("button",{staticClass:"submit",on:{click:e.submitForm}},[e._v("确定")])])])],1)],1)},a=[],o=r("b85c"),l=(r("b0c0"),r("ac1f"),r("00b4"),r("d4a5")),i=(r("4b51"),r("8ba2")),n={components:{tableTitle:l["default"]},data:function(){var e=function(e,t,r){/\s/.test(t)?r(new Error("输入的文字包含空格,请删除空格")):0==t.length?r(new Error("请输入请求网址")):r()},t=function(e,t,r){/\s/.test(t)?r(new Error("输入的文字包含空格,请删除空格")):0==t.length?r(new Error("请输入列表开始标签")):r()},r=function(e,t,r){/\s/.test(t)?r(new Error("输入的文字包含空格,请删除空格")):0==t.length?r(new Error("请输入任务规则名")):r()},s=function(e,t,r){/\s/.test(t)?r(new Error("输入的文字包含空格,请删除空格")):0==t.length?r(new Error("请输入第1页网址")):r()},a=function(e,t,r){/\s/.test(t)?r(new Error("输入的文字包含空格,请删除空格")):0==t.length?r(new Error("请输入起始代码")):r()},o=function(e,t,r){/\s/.test(t)?r(new Error("输入的文字包含空格,请删除空格")):0==t.length?r(new Error("请输入起始代码")):r()},l=function(e,t,r){/\s/.test(t)?r(new Error("输入的文字包含空格,请删除空格")):0==t.length?r(new Error("请输入标题字符串")):r()},i=function(e,t,r){/\s/.test(t)?r(new Error("输入的文字包含空格,请删除空格")):0==t.length?r(new Error("请输入内容字符串")):r()},n=function(e,t,r){/\s/.test(t)?r(new Error("输入的文字包含空格,请删除空格")):0==t.length?r(new Error("请输入来源字符串")):r()},c=function(e,t,r){/\s/.test(t)?r(new Error("输入的文字包含空格,请删除空格")):0==t.length?r(new Error("请输入作者字符串")):r()},u=function(e,t,r){/\s/.test(t)?r(new Error("输入的文字包含空格,请删除空格")):0==t.length?r(new Error("请输入作者替换名称")):r()},m=function(e,t,r){/\s/.test(t)?r(new Error("输入的文字包含空格,请删除空格")):0==t.length?r(new Error("请输入接口参数")):r()};return{tableDivTitle:"任务规则列表",dialogTableVisible:!1,dialogName:"设置采集规则",dialogBoo:"add",searchRuleName:"",webId:"",webType:"",webName:"",disabled:"",page:1,pageSize:10,total:40,activeId:"",value:"",radio:"true",tableData:[],ruleForm:{ruleName:"",first_url:"",collect:"",second_start:"",second_num:"",second_end:"",startCode:"",startLabel:"",endPage:"",title:"",content:"",source:"",author:"",authorName:"",parameter:"",diy_rule:""},rules:{collect:[{required:!0,trigger:"blur",validator:e}],startLabel:[{required:!0,trigger:"blur",validator:t}],ruleName:[{required:!0,trigger:"blur",validator:r}],first_url:[{required:!0,trigger:"blur",validator:s}],secondWeb:[],startCode:[{required:!0,trigger:"blur",validator:a}],endPage:[{required:!0,trigger:"blur",validator:o}],title:[{required:!0,trigger:"blur",validator:l}],content:[{required:!0,trigger:"blur",validator:i}],source:[{required:!0,trigger:"blur",validator:n}],author:[{required:!0,trigger:"blur",validator:c}],authorName:[{required:!0,trigger:"blur",validator:u}],parameter:[{required:!0,trigger:"blur",validator:m}]}}},methods:{getData:function(){var e=this;Object(i["j"])({web_id:this.webId,pageSize:this.pageSize,page:this.page}).then((function(t){console.log(t.data.rep),e.tableData=t.data.rep,e.total=t.data.count;var r,s=!1,a="",l=Object(o["a"])(e.tableData);try{for(l.s();!(r=l.n()).done;){var i=r.value;1==i.status&&(s=!0,a=i.id)}}catch(n){l.e(n)}finally{l.f()}1==s&&e.pdStatus(a),e.disabled=1!=s}))},deleteRow:function(e){var t=this;this.$confirm("注意:删除后,该条信息及其绑定关系全部删除","是否确认删除该条信息?",{confirmButtonText:"确定",cancelButtonText:"取消"}).then((function(){Object(i["f"])({rule_id:e}).then((function(e){console.log(e),t.$message({type:"success",message:"删除成功!"}),t.getData()})),console.log("当前删除:"+e)})).catch((function(){t.$message({type:"warning",message:"已取消删除"})}))},handleSizeChange:function(e){this.page=e,this.getData()},handleCurrentChange:function(e){this.page=e,this.getData()},goSearch:function(){var e=this;Object(i["j"])({web_id:this.webId,pageSize:this.pageSize,page:this.page,keyWord:this.searchRuleName,type:this.webType}).then((function(t){e.tableData=t.data.rep,e.total=t.data.count}))},goReset:function(){this.searchRuleName="",this.getData()},addCrawlerRule:function(){if(!this.webType)return this.dialogTableVisible=!1,void this.$message({message:"当前不可设置采集规则",type:"error"});this.webType&&(this.dialogTableVisible=!0,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="")},goEdit:function(e,t){if(console.log(e),this.activeId=e,console.log(t),!this.webType)return this.dialogTableVisible=!1,void this.$message({message:"当前不可修改采集规则",type:"error"});this.webType&&(this.dialogBoo="update",this.dialogTableVisible=!0,this.ruleForm.ruleName=t.name,this.ruleForm.first_url=t.first_url,this.ruleForm.collect=t.first_url,this.ruleForm.second_start=t.second_start,this.ruleForm.second_num=t.second_num,this.ruleForm.second_end=t.second_end,this.ruleForm.startCode=t.start,this.ruleForm.startLabel=t.start,this.ruleForm.endPage=t.end_pagenum,this.ruleForm.title=t.title,this.ruleForm.content=t.content,this.ruleForm.source=t.source,this.ruleForm.author=t.writer,this.ruleForm.authorName=t.writer_class,this.ruleForm.parameter=t.parameter,this.ruleForm.diy_rule=t.diy_rule)},goCollect:function(e,t){var r,s=this,a=Object(o["a"])(this.tableData);try{for(a.s();!(r=a.n()).done;){var l=r.value;l.id==e&&(l.status=1)}}catch(n){a.e(n)}finally{a.f()}Object(i["l"])({id:e}).then((function(e){console.log(e),s.$message({message:"采集中",type:"success",iconClass:"el-icon-refresh"})}))},pdStatus:function(e){console.log(e);var t,r=Object(o["a"])(this.tableData);try{for(r.s();!(t=r.n()).done;){var s=t.value;s.id==e?s.status=1:s.status=4}}catch(a){r.e(a)}finally{r.f()}console.log(this.tableData)},toast:function(){this.$message({message:"一次只能采集一个任务规则",type:"error"})},submitForm:function(){var e=this;if("add"==this.dialogBoo&&(1==this.webType?Object(i["c"])({name:this.ruleForm.ruleName,web_id:this.webId,type:this.webType,first_url:this.ruleForm.first_url,second_start:this.ruleForm.second_start,second_num:this.ruleForm.second_num,second_end:this.ruleForm.second_end,start:this.ruleForm.startCode,title:this.ruleForm.title,content:this.ruleForm.content,source:this.ruleForm.source,writer_class:this.ruleForm.author,writer:this.ruleForm.authorName,end_pagenum:this.ruleForm.endPage}).then((function(t){e.getData(),console.log(t),200==t.code?(e.dialogTableVisible=!1,e.$message({message:"添加成功",type:"success"})):0==t.code&&e.$message({message:t.message,type:"error"})})):2==this.webType&&"true"==this.radio?Object(i["c"])({name:this.ruleForm.ruleName,web_id:this.webId,type:this.webType,first_url:this.ruleForm.collect,parameter:this.ruleForm.parameter,start:this.ruleForm.startLabel,title:this.ruleForm.title,content:this.ruleForm.content,source:this.ruleForm.source,writer_class:this.ruleForm.author}).then((function(t){e.getData(),console.log(t),200==t.code?(e.dialogTableVisible=!1,e.$message({message:"添加成功",type:"success"})):0==t.code&&e.$message({message:t.message,type:"error"})})):2==this.webType&&"false"==this.radio?Object(i["c"])({name:this.ruleForm.ruleName,web_id:this.webId,type:this.webType,first_url:this.ruleForm.collect,parameter:this.ruleForm.parameter,start:this.ruleForm.startLabel,title:this.ruleForm.title,content:this.ruleForm.content,source:this.ruleForm.source,writer:this.ruleForm.authorName}).then((function(t){e.getData(),console.log(t),200==t.code?(e.dialogTableVisible=!1,e.$message({message:"添加成功",type:"success"})):0==t.code&&e.$message({message:t.message,type:"error"})})):3==this.webType&&Object(i["c"])({name:this.ruleForm.ruleName,web_id:this.webId,type:this.webType,diy_rule:this.ruleForm.diy_rule}).then((function(t){console.log(t),e.getData(),200==t.code?(e.dialogTableVisible=!1,e.$message({message:"添加成功",type:"success"})):0==t.code&&e.$message({message:t.message,type:"error"})}))),"update"==this.dialogBoo){if(""==this.webType)return this.dialogTableVisible=!1,void this.$message({message:"当前不可设置采集规则",type:"error"});1==this.webType?Object(i["n"])({name:this.ruleForm.ruleName,id:this.activeId,type:this.webType,first_url:this.ruleForm.first_url,second_start:this.ruleForm.second_start,second_num:this.ruleForm.second_num,second_end:this.ruleForm.second_end,start:this.ruleForm.startCode,title:this.ruleForm.title,content:this.ruleForm.content,source:this.ruleForm.source,writer_class:this.ruleForm.author,writer:this.ruleForm.authorName,end_pagenum:this.ruleForm.endPage}).then((function(t){e.getData(),console.log(t),200==t.code?(e.dialogTableVisible=!1,e.$message({message:"修改成功",type:"success"})):0==t.code&&e.$message({message:t.message,type:"error"})})):2==this.webType&&"true"==this.radio?Object(i["n"])({name:this.ruleForm.ruleName,id:this.activeId,type:this.webType,first_url:this.ruleForm.collect,parameter:this.ruleForm.parameter,start:this.ruleForm.startCode,title:this.ruleForm.title,content:this.ruleForm.content,source:this.ruleForm.source,writer_class:this.ruleForm.author}).then((function(t){e.getData(),console.log(t),200==t.code?(e.dialogTableVisible=!1,e.$message({message:"修改成功",type:"success"})):0==t.code&&e.$message({message:t.message,type:"error"})})):2==this.webType&&"false"==this.radio?Object(i["n"])({name:this.ruleForm.ruleName,id:this.activeId,type:this.webType,first_url:this.ruleForm.collect,parameter:this.ruleForm.parameter,start:this.ruleForm.startCode,title:this.ruleForm.title,content:this.ruleForm.content,source:this.ruleForm.source,writer:this.ruleForm.authorName}).then((function(t){e.getData(),console.log(t),200==t.code?(e.dialogTableVisible=!1,e.$message({message:"修改成功",type:"success"})):0==t.code&&e.$message({message:t.message,type:"error"})})):3==this.webType&&Object(i["n"])({name:this.ruleForm.ruleName,id:this.activeId,type:this.webType,diy_rule:this.ruleForm.diy_rule}).then((function(t){console.log(t),e.getData(),200==t.code?(e.dialogTableVisible=!1,e.$message({message:"修改成功",type:"success"})):0==t.code&&e.$message({message:t.message,type:"error"})}))}},saveForm:function(){this.dialogTableVisible=!1},goLook:function(e,t){console.log(e),console.log(t),console.log(t.name),this.$router.push({path:"/webCrawlerList",query:{id:e,source:t.name}})}},mounted:function(){this.webId=this.$route.query.id,this.webType=this.$route.query.type,this.webName=this.$route.query.name,this.getData()}},c=n,u=(r("9f3a"),r("2877")),m=Object(u["a"])(c,s,a,!1,null,"1c7c6a40",null);t["default"]=m.exports},d4a5:function(e,t,r){"use strict";r.r(t);var s=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"tableTitle"},[r("span",{staticClass:"tableFloatLine"}),e._v(" "+e._s(e.name)+" ")])},a=[],o={props:{name:{type:String,required:!0}},data:function(){return{someData:""}}},l=o,i=(r("83e7"),r("2877")),n=Object(i["a"])(l,s,a,!1,null,"7a99bbeb",null);t["default"]=n.exports},fe9d:function(e,t,r){}}]);