1 |
- webpackJsonp([75],{BF3J:function(t,e){},fNMT:function(t,e){},mfTA:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=n("Xxa5"),i=n.n(a),o=n("exGp"),r=n.n(o),c=n("//Fk"),s=n.n(c),l={name:"bindAdqDialog",props:{dialogVisible:{type:Boolean,default:function(){return!1}},mpAccountInfo:{type:Object,default:function(){return{}}}},data:function(){return{loading:!1,adqOptions:[],form:{app_id:"",account_id:[]}}},computed:{title:function(){return(this.mpAccountInfo.account_name?this.mpAccountInfo.account_name+"-":"")+"绑定ADQ账号"}},watch:{dialogVisible:function(t){t&&(this.handleGetAdqOptions(),this.handleGetFormData())}},methods:{handleGetAdqOptions:function(){var t=this;return r()(i.a.mark(function e(){var n,a,o;return i.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.$axios.get(t.URL.BASEURL+t.URL.dataBoardHS_adqAccountList,{params:{is_select:1}});case 2:n=e.sent,a=n.data,(o=void 0===a?{}:a)&&0==o.errno?t.adqOptions=o.rst:4002!=o.errno&&t.$message.warning(o.err);case 6:case"end":return e.stop()}},e,t)}))()},handleConfirm:function(){var t=this;return r()(i.a.mark(function e(){var n,a,o,r,c;return i.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.handleFormValidate();case 3:return n=""+t.URL.BASEURL+t.URL.dataBoardHS_bindAdq,a={app_id:t.form.app_id,account_id:t.form.account_id.join(",")},t.loading=!0,e.next=8,t.$axios.post(n,a);case 8:o=e.sent,r=o.data,(c=void 0===r?{}:r)&&0==c.errno?(t.$message.success("操作成功"),t.handleClearFormData(),t.$emit("confirm")):4002!=c.errno&&t.$message.warning(c.err||"操作失败"),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(0),console.log("error => ",e.t0);case 17:return e.prev=17,t.loading=!1,e.finish(17);case 20:case"end":return e.stop()}},e,t,[[0,14,17,20]])}))()},handleCancel:function(){this.handleClearFormData(),this.$emit("cancel")},handleFormValidate:function(){var t=this;return new s.a(function(e,n){t.form.account_id&&t.form.account_id.length?e("表单校验通过"):(t.$message.warning("请选择ADQ账号"),n("表单校验未通过"))})},handleGetFormData:function(){var t=this.mpAccountInfo,e=t.wechat_account_id,n=void 0===e?"":e,a=t.account_id,i=void 0===a?"":a;this.form.app_id=n||"",this.form.account_id=i&&Array.isArray(i)?i:[]},handleClearFormData:function(){this.form.app_id="",this.form.account_id=[]}}},d={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("el-dialog",{staticClass:"bind-dialog",attrs:{visible:t.dialogVisible,"before-close":t.handleCancel,title:t.title,width:"450px","close-on-click-modal":!1},on:{"update:visible":function(e){t.dialogVisible=e}}},[n("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"form-wrap"},[n("div",{staticClass:"form-item"},[n("span",{staticClass:"lable required"},[t._v("ADQ账号")]),t._v(" "),n("el-select",{attrs:{size:"small",placeholder:"请选择ADQ账号",clearable:"",filterable:"",multiple:""},model:{value:t.form.account_id,callback:function(e){t.$set(t.form,"account_id",e)},expression:"form.account_id"}},t._l(t.adqOptions,function(t){return n("el-option",{key:t.account_id,attrs:{label:t.account_id,value:t.account_id}})}),1)],1)]),t._v(" "),n("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{attrs:{size:"mini"},on:{click:t.handleCancel}},[t._v("取 消")]),t._v(" "),n("el-button",{attrs:{size:"mini",type:"primary"},on:{click:t.handleConfirm}},[t._v("确 定")])],1)])},staticRenderFns:[]};var u={components:{bindAdqDialog:n("VU/8")(l,d,!1,function(t){n("BF3J")},"data-v-0d4ed680",null).exports},data:function(){return{heigth:"",loading:!1,page:1,pages:0,total:0,page_size:40,list:[],bindAdqDialogVisible:!1,currentMpAccountInfo:{}}},created:function(){this.height=document.documentElement.clientHeight-220>400?document.documentElement.clientHeight-220:400,this.handleGetList()},methods:{handleCurrentChange:function(t){this.page=t,this.handleGetList(t)},handleGetList:function(){var t=this;return r()(i.a.mark(function e(){var n,a,o,r;return i.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t.loading=!0,n=""+t.URL.BASEURL+t.URL.dataBoardHS_wxAccountList,a={page:t.page,page_size:t.page_size},e.next=6,t.$axios.get(n,{params:a});case 6:o=e.sent,(r=o.data)&&0==r.errno?(r.rst.data.forEach(function(t){t.account_id=t.account_id?t.account_id.split(","):[]}),t.list=r.rst.data,t.total=r.rst.pageInfo.total,t.pages=r.rst.pageInfo.pages):4002!=r.errno&&t.$message.warning(r.err),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(0),console.log("error => ",e.t0);case 14:return e.prev=14,t.loading=!1,e.finish(14);case 17:case"end":return e.stop()}},e,t,[[0,11,14,17]])}))()},onClickBindAdqBtn:function(t){this.currentMpAccountInfo=t,this.bindAdqDialogVisible=!0},onConfirmBindAdq:function(){this.bindAdqDialogVisible=!1,this.handleGetList()},onCancelBindAdq:function(){this.bindAdqDialogVisible=!1}}},f={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}]},[n("div",{staticClass:"screenBox"},[n("div",{staticClass:"totalCustom"},[t._v("已授权"),n("span",[t._v(t._s(t.total))]),t._v("个公众号")])]),t._v(" "),n("el-table",{staticStyle:{width:"100%"},attrs:{height:t.height,data:t.list,"tooltip-effect":"dark"}},[n("el-table-column",{attrs:{prop:"account_name","min-width":"200",label:"公众号","show-overflow-tooltip":"",align:"center",fixed:"left"}}),t._v(" "),n("el-table-column",{attrs:{prop:"created_at","min-width":"200",label:"授权时间","show-overflow-tooltip":"",align:"center"}}),t._v(" "),n("el-table-column",{attrs:{prop:"account_id","min-width":"200",label:"ADQ账号",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){var a=e.row;return[n("div",{staticClass:"customerServiceTagBox biaoqian"},t._l(a.account_id,function(e,a){return n("div",{key:a,staticClass:"customerServiceTag"},[t._v(t._s(e))])}),0)]}}])}),t._v(" "),n("el-table-column",{attrs:{label:"操作","min-width":"220",align:"center",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){var a=e.row;return[n("div",{staticClass:"flex-align-jus-center"},[n("div",{staticClass:"c-00B38A pointer table_button",on:{click:function(e){return t.onClickBindAdqBtn(a)}}},[t._v("绑定ADQ账号")])])]}}])})],1),t._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:t.total>0,expression:"total>0"}],staticClass:"pagination"},[n("el-pagination",{attrs:{background:"","current-page":t.page,layout:"prev, pager, next","page-count":Number(t.pages)},on:{"current-change":t.handleCurrentChange}})],1),t._v(" "),n("bindAdqDialog",{attrs:{dialogVisible:t.bindAdqDialogVisible,mpAccountInfo:t.currentMpAccountInfo},on:{confirm:t.onConfirmBindAdq,cancel:t.onCancelBindAdq}})],1)},staticRenderFns:[]};var p=n("VU/8")(u,f,!1,function(t){n("fNMT")},"data-v-09879fae",null);e.default=p.exports}});
|