1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0da44243"],{"14d7":function(t,e,a){},2648:function(t,e,a){"use strict";a("9b77")},"4b51":function(t,e,a){},"4d5e":function(t,e,a){"use strict";a.r(e);var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("div",{staticClass:"title"},[a("el-row",[a("el-col",{staticClass:"left",attrs:{span:6}},[a("div",{staticClass:"searchBox"},[a("div",{staticClass:"searchTitle"},[t._v("资讯题目")]),a("el-input",{attrs:{placeholder:"请输入资讯名称"},model:{value:t.message_name,callback:function(e){t.message_name=e},expression:"message_name"}})],1)]),a("el-col",{staticClass:"left",attrs:{span:6}},[a("div",{staticClass:"searchBox"},[a("div",{staticClass:"searchTitle"},[t._v("来源")]),a("el-input",{attrs:{placeholder:"请输入来源"},model:{value:t.message_from,callback:function(e){t.message_from=e},expression:"message_from"}})],1)]),a("el-col",{staticClass:"left",attrs:{span:6}},[a("div",{staticClass:"searchBox"},[a("div",{staticClass:"searchTitle"},[t._v("导入状态")]),a("el-select",{attrs:{placeholder:"请选择导入状态"},model:{value:t.message_state,callback:function(e){t.message_state=e},expression:"message_state"}},t._l(t.statusOptions,(function(t){return a("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1)],1)]),a("el-col",{staticClass:"right",attrs:{span:6}},[a("div",{staticClass:"btnList"},[a("button",{staticClass:"search",on:{click:t.goSearch}},[t._v("搜索")]),a("button",{staticClass:"reset",on:{click:t.goReset}},[t._v("重置")])])])],1)],1),a("div",{staticClass:"layerBox"},[a("tableTitle",{attrs:{name:t.tableDivTitle}}),a("div",{staticClass:"btnList"},[a("button",{staticClass:"navigation",on:{click:t.toNavigation}},[t._v("关联导航池")]),a("button",{staticClass:"consultList",on:{click:t.importMessage}},[t._v("导入资讯列表")])]),a("el-row",[[a("el-table",{staticClass:"my-table",staticStyle:{width:"100%"},attrs:{data:t.tableData}},[a("el-table-column",{attrs:{fixed:"",prop:"id",label:"编号",width:"80"}}),a("el-table-column",{attrs:{prop:"title",label:"资讯题目",width:"230"}}),a("el-table-column",{attrs:{prop:"oldtitle",label:"原始资讯题目",width:"230"}}),a("el-table-column",{attrs:{prop:"category.name",label:"导航池名称",width:"90"}}),a("el-table-column",{attrs:{prop:"source",label:"来源",width:"180"}}),a("el-table-column",{attrs:{label:"导入状态",width:"80",prop:"state"}}),a("el-table-column",{attrs:{prop:"author",label:"作者",width:"80"}}),a("el-table-column",{attrs:{prop:"created_at",label:"采集时间",width:"160"}}),a("el-table-column",{attrs:{prop:"updated_at",label:"修改时间",width:"160"}}),a("el-table-column",{attrs:{fixed:"right",label:"操作",width:"200"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"listBtnBox"},[a("div",{staticClass:"listDeleteBtn",on:{click:function(a){return t.deleteRow(e.row.id,e.row)}}},[a("i",{staticClass:"el-icon-delete"}),t._v("删除")]),a("div",{staticClass:"listEditBtn",on:{click:function(a){return t.goEdit(e.row.id,e.row)}}},[a("i",{staticClass:"el-icon-edit-outline"}),t._v("编辑")])])]}}])})],1)]],2)],1),a("div",{staticClass:"alignBox"},[a("el-row",[a("el-col",{attrs:{span:24}},[a("el-pagination",{attrs:{background:"","current-page":t.page,"page-size":t.pageSize,layout:"total, prev, pager, next, jumper",total:t.total},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1)],1)],1),a("el-dialog",{attrs:{title:"关联导航池",visible:t.dialogTableVisible,width:"50%","close-on-click-modal":!1},on:{"update:visible":function(e){t.dialogTableVisible=e}}},[a("el-form",{ref:"ruleForm",staticClass:"demo-ruleForm",attrs:{model:t.ruleForm,rules:t.rules,"label-width":"120px"}},[a("div",{staticClass:"dialogText"},[a("el-form-item",{attrs:{label:"关联导航池:",prop:"name"}},[a("el-select",{attrs:{placeholder:"请选择关联的导航池名称"},model:{value:t.ruleForm.name,callback:function(e){t.$set(t.ruleForm,"name",e)},expression:"ruleForm.name"}},t._l(t.options,(function(t){return a("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})})),1)],1)],1),a("div",{staticClass:"dialogBtn"},[a("button",{staticClass:"cancel",on:{click:t.cancelForm}},[t._v("取消")]),a("button",{staticClass:"submit",on:{click:t.submitForm}},[t._v("提交")])])])],1)],1)},l=[],o=a("b85c"),n=(a("b0c0"),a("d4a5")),r=(a("4b51"),a("8ba2")),i={components:{tableTitle:n["default"]},data:function(){return{tableDivTitle:"任务规则列表",ruleId:"",source:"",state:0,message_name:"",message_from:"",message_state:"",page:1,pageSize:10,total:20,tableData:[],dialogTableVisible:!1,ruleForm:{name:""},rules:{name:[{required:!0,message:"请选择关联的导航池名称",trigger:"blur"}]},options:[],statusOptions:[{value:"0",label:"未导入"},{value:"1",label:"已导入"}]}},mounted:function(){this.ruleId=this.$route.query.id,this.source=this.$route.query.source,this.getData()},methods:{getData:function(){var t=this;Object(r["h"])({rule_id:this.ruleId,page:this.page,pageSize:this.pageSize}).then((function(e){console.log(e),t.total=e.data.count,t.tableData=e.data.rep;var a,s=Object(o["a"])(t.tableData);try{for(s.s();!(a=s.n()).done;){var l=a.value;1==l.state?l.state="已导入":l.state="未导入"}}catch(n){s.e(n)}finally{s.f()}}))},deleteRow:function(t,e){var a=this;this.$confirm("注意:删除后,该条信息及其绑定关系全部删除","是否确认删除该条信息?",{confirmButtonText:"确定",cancelButtonText:"取消"}).then((function(){Object(r["e"])({art_id:t}).then((function(e){console.log(e),200==e.code?(a.$message({type:"success",message:"删除成功!"}),a.getData(),console.log("当前删除:"+t)):0==e.code&&a.$message({type:"error",message:e.message})}))})).catch((function(){a.$message({type:"warning",message:"已取消删除"})}))},handleSizeChange:function(t){this.page=t,this.getData()},handleCurrentChange:function(t){this.page=t,this.getData()},goSearch:function(){var t=this;Object(r["h"])({rule_id:this.ruleId,page:this.page,pageSize:this.pageSize,title:this.message_name,source:this.message_from,state:this.message_state}).then((function(e){console.log(e),t.total=e.data.count,t.tableData=e.data.rep}))},goReset:function(){this.message_name="",this.message_from="",this.message_state="",this.getData()},goEdit:function(t,e){console.log(t,e),this.$router.push({path:"/webCrawlerListEdit",query:{ruleId:this.ruleId,source:this.source,id:t}})},toNavigation:function(){var t=this;Object(r["b"])({rule_id:this.ruleId}).then((function(e){console.log(e),200==e.code&&(t.dialogTableVisible=!0,t.options=e.data),0==e.code&&t.$message({message:e.message,type:"error"}),t.getData()}))},cancelForm:function(){this.dialogTableVisible=!1},submitForm:function(){var t=this;Object(r["b"])({rule_id:this.ruleId,catid:this.ruleForm.name}).then((function(e){console.log(t.ruleForm.name),console.log(e),200==e.code&&(t.dialogTableVisible=!1,t.$message({message:"关联成功!",type:"success"}),t.getData()),0==e.code&&(t.$message({message:e.message,type:"error"}),t.getData())}))},importMessage:function(){var t,e=this,a=Object(o["a"])(this.tableData);try{for(a.s();!(t=a.n()).done;){var s=t.value;""==s.category.name?this.$message({message:"还未关联导航池,请先关联导航池",type:"error"}):this.$confirm("","是否确认将所有未导入的信息导入资讯列表?",{confirmButtonText:"确定",cancelButtonText:"取消"}).then((function(){Object(r["a"])({rule_id:e.ruleId}).then((function(t){console.log(t),200==t.code&&(e.$message({message:"导入成功",type:"success"}),e.getData()),0==t.code&&e.$message({message:t.message,type:"error"})}))})).catch((function(){e.$message({type:"warning",message:"已取消"})}))}}catch(l){a.e(l)}finally{a.f()}}}},c=i,u=(a("2648"),a("2877")),d=Object(u["a"])(c,s,l,!1,null,"98a8590a",null);e["default"]=d.exports},"83e7":function(t,e,a){"use strict";a("14d7")},"8ba2":function(t,e,a){"use strict";a.d(e,"d",(function(){return l})),a.d(e,"k",(function(){return o})),a.d(e,"o",(function(){return n})),a.d(e,"g",(function(){return r})),a.d(e,"c",(function(){return i})),a.d(e,"j",(function(){return c})),a.d(e,"n",(function(){return u})),a.d(e,"f",(function(){return d})),a.d(e,"l",(function(){return m})),a.d(e,"h",(function(){return g})),a.d(e,"i",(function(){return b})),a.d(e,"m",(function(){return h})),a.d(e,"e",(function(){return p})),a.d(e,"b",(function(){return f})),a.d(e,"a",(function(){return v}));var s=a("b775"),l=function(t){return Object(s["a"])({url:"/collector/addWeb",method:"post",data:t})},o=function(t){return Object(s["a"])({url:"/collector/getWeb",method:"post",data:t})},n=function(t){return Object(s["a"])({url:"/collector/upWeb",method:"post",data:t})},r=function(t){return Object(s["a"])({url:"/collector/delWeb",method:"get",params:t})},i=function(t){return Object(s["a"])({url:"/collector/addRule",method:"post",data:t})},c=function(t){return Object(s["a"])({url:"/collector/getRule",method:"post",data:t})},u=function(t){return Object(s["a"])({url:"/collector/upRule",method:"post",data:t})},d=function(t){return Object(s["a"])({url:"/collector/delRule",method:"get",params:t})},m=function(t){return Object(s["a"])({url:"/collector/sendCrawler",method:"post",data:t})},g=function(t){return Object(s["a"])({url:"/collector/getInfo",method:"post",data:t})},b=function(t){return Object(s["a"])({url:"/collector/getOneInfo",method:"get",params:t})},h=function(t){return Object(s["a"])({url:"/collector/upInfo",method:"post",data:t})},p=function(t){return Object(s["a"])({url:"/collector/delInfo",method:"get",params:t})},f=function(t){return Object(s["a"])({url:"/collector/addCatid",method:"post",data:t})},v=function(t){return Object(s["a"])({url:"/collector/addArt",method:"get",params:t})}},"9b77":function(t,e,a){},d4a5:function(t,e,a){"use strict";a.r(e);var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"tableTitle"},[a("span",{staticClass:"tableFloatLine"}),t._v(" "+t._s(t.name)+" ")])},l=[],o={props:{name:{type:String,required:!0}},data:function(){return{someData:""}}},n=o,r=(a("83e7"),a("2877")),i=Object(r["a"])(n,s,l,!1,null,"7a99bbeb",null);e["default"]=i.exports}}]);
|