12 |
- webpackJsonp([7],{"0apX":function(t,e){},Uaje:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n={data:function(){return{addFlag:!1,loading:!1,select:"advertiser_id",keyWord:"",time:[],list:[],checkList:[],page:1,page_size:20,total:0}},created:function(){this.getAccountList()},methods:{moreShow:function(){var t=[];this.checkList.length>0&&this.checkList.forEach(function(e){t.push(e.advertiser_id)}),this.$router.push("/manage?advertiser_id="+t.join(","))},moreAdd:function(){var t=this;if(0!=this.checkList.length){var e=[];this.checkList.every(function(a){return e.push(a.advertiser_id),a.user_id==t.checkList[0].user_id})?this.$router.push("/first?id="+e.join(",")):this.$message.error("请选择同一个红人进行批量创建")}else this.$message.error("请选择红人")},toUrl:function(t){this.$router.push("/manage?advertiser_id="+t.advertiser_id)},handleCurrentChange:function(t){this.getAccountList(t)},getAccountList:function(t){var e=this,a=this.page_size;this.page=t,this.loading=!0;var n={page:t,page_size:a};this.keyWord&&(n[this.select]=this.keyWord),this.$axios.get(this.URL.BASEURL+this.URL.accountList,{params:n}).then(function(t){t=t.data;e.loading=!1,t&&0==t.errno?(e.list=t.rst.data,e.total=t.rst.pageInfo.total):e.$message({message:t.err,type:"warning"})}).catch(function(){e.loading=!1})},create:function(){var t=this;this.$axios.get(this.URL.BASEURL+this.URL.getAuthorizeUrl,{}).then(function(e){e=e.data;if(t.loading=!1,e&&0==e.errno){if(!e.rst.url)return void t.$message.error("生成链接失败,请重试!");window.open(e.rst.url)}else t.$message({message:e.err,type:"warning"})}).catch(function(){t.loading=!1})},handleSelectionChange:function(t){this.checkList=t}}},i={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"account"},[a("div",{staticClass:"selectBox"},[a("ul",{staticClass:"left_select"},[a("el-input",{staticClass:"input-with-select",staticStyle:{width:"340px","margin-top":"4px"},attrs:{placeholder:"请输入内容",clearable:"",size:"small"},on:{clear:function(e){return t.getAccountList(1)}},nativeOn:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.getAccountList(1)}},model:{value:t.keyWord,callback:function(e){t.keyWord=e},expression:"keyWord"}},[a("el-select",{attrs:{slot:"prepend",placeholder:"请选择"},slot:"prepend",model:{value:t.select,callback:function(e){t.select=e},expression:"select"}},[a("el-option",{attrs:{label:"广告主ID",value:"advertiser_id"}}),t._v(" "),a("el-option",{attrs:{label:"快手ID",value:"user_id"}}),t._v(" "),a("el-option",{attrs:{label:"快手昵称",value:"user_name"}}),t._v(" "),a("el-option",{attrs:{label:"企业名称",value:"corporation_name"}})],1),t._v(" "),a("el-button",{attrs:{slot:"append",icon:"el-icon-search"},on:{click:function(e){return t.getAccountList(1)}},slot:"append"})],1)],1),t._v(" "),a("div",{staticClass:"btn"},[a("button",{staticClass:"button normal",on:{click:function(e){return t.create()}}},[t._v("添加账户")]),t._v(" "),a("button",{staticClass:"button",on:{click:function(e){return t.moreShow()}}},[t._v("广告计划")]),t._v(" "),a("button",{staticClass:"button",on:{click:function(e){return t.moreAdd()}}},[t._v("批量创建广告")])])]),t._v(" "),a("el-table",{staticClass:"table",staticStyle:{width:"98%",margin:"auto"},attrs:{"header-cell-style":{background:"#f5f7fa"},data:t.list},on:{"selection-change":t.handleSelectionChange}},[a("el-table-column",{attrs:{type:"selection",align:"center",width:"45"}}),t._v(" "),a("el-table-column",{attrs:{prop:"advertiser_id",label:"广告主ID",align:"center"}}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"快手昵称与快手ID"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",{staticStyle:{color:"#2662FF",cursor:"pointer"},on:{click:function(a){return t.toUrl(e.row)}}},[t._v(t._s(e.row.user_name))])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"balance",align:"center",label:"账户余额"}}),t._v(" "),a("el-table-column",{attrs:{prop:"corporation_name",align:"center",label:"企业名称"}}),t._v(" "),a("el-table-column",{attrs:{prop:"primary_industry_name",align:"center",label:"一级行业名称"}}),t._v(" "),a("el-table-column",{attrs:{prop:"industry_name",align:"center",label:"二级行业名称"}})],1),t._v(" "),a("div",{staticClass:"bottom"},[a("el-pagination",{attrs:{background:"","current-page":t.page,"page-size":t.page_size,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1)],1)},staticRenderFns:[]};var r=a("C7Lr")(n,i,!1,function(t){a("0apX"),a("dqH+")},"data-v-f6b04fe6",null);e.default=r.exports},"dqH+":function(t,e){}});
- //# sourceMappingURL=7.e621ef98f5c9585f49c4.js.map
|