企微助手 ,仓库名 短剧

74.64baa29b6a09238fc43f.js 11KB

1
  1. webpackJsonp([74],{"40UW":function(e,t){},Xidb:function(e,t){},"oi+E":function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=a("Dd8w"),i=a.n(n),r=a("//Fk"),s=a.n(r),o=a("Xxa5"),c=a.n(o),l=a("exGp"),d=a.n(l),u=a("pdUL"),p={name:"bindPidDialog",props:{dialogVisible:{type:Boolean,default:function(){return!1}},account_id:{type:String|Number,default:function(){return""}}},data:function(){return{loading:!1,sys_group_id:1==this.$cookie.getCookie("isSuperManage")?sessionStorage.getItem("company_session_defaultCorp_level_1").toString():"",form:{pid:"",note:""}}},computed:{dialogTitle:function(){return"绑定推广计划ID"}},watch:{dialogVisible:function(e){e&&this.handleInitData()}},methods:{handleInitData:function(){this.loading=!1,this.form.pid="",this.form.note=""},handleConfirm:function(e){var t=this,a=e.is_confirm;return d()(c.a.mark(function e(){var n,i,r;return c.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t.loading=!0,e.next=4,t.handleFormValidate();case 4:return e.next=6,t.handleSubmitForm({is_confirm:a});case 6:if(n=e.sent,0!=(i=n.res).errno){e.next=13;break}t.$message.success("绑定成功"),t.$emit("confirm"),e.next=18;break;case 13:if(4906!=i.errno){e.next=18;break}return r="推广计划ID("+t.form.pid+")已经绑定了其他投放账号,继续当前操作将先解除已有绑定关系,确定绑定吗?",e.next=17,t.$confirm(r,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"});case 17:t.handleConfirm({is_confirm:1});case 18:e.next=23;break;case 20:e.prev=20,e.t0=e.catch(0),console.log(e.t0);case 23:return e.prev=23,t.loading=!1,e.finish(23);case 26:case"end":return e.stop()}},e,t,[[0,20,23,26]])}))()},handleSubmitForm:function(e){var t=this,a=e.is_confirm;return d()(c.a.mark(function e(){var n,i,r,o,l,d;return c.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,n=""+t.URL.BASEURL+t.URL.adqAccount_adqBindPid,i={sys_group_id:t.sys_group_id,account_id:t.account_id,pid:t.form.pid,note:t.form.note,is_confirm:a},e.next=5,t.$axios.post(n,i);case 5:if(r=e.sent,o=r.data,!(l=void 0===o?{}:o)||0!=l.errno&&4906!=l.errno){e.next=12;break}return e.abrupt("return",s.a.resolve({res:l}));case 12:if(4002==l.error){e.next=16;break}return d=l.err||"操作失败",t.$message.warning(d),e.abrupt("return",s.a.reject(d));case 16:e.next=21;break;case 18:e.prev=18,e.t0=e.catch(0),console.log(e.t0);case 21:case"end":return e.stop()}},e,t,[[0,18]])}))()},handleCancel:function(){this.$emit("cancel")},handleFormValidate:function(){var e=this;return new s.a(function(t,a){e.form.pid?t("表单校验通过"):(e.$message.warning("请输入推广计划ID"),a("表单校验未通过"))})}}},g={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-dialog",{staticClass:"addAccount-dialog",attrs:{visible:e.dialogVisible,"before-close":e.handleCancel,title:e.dialogTitle,width:"450px"},on:{"update:visible":function(t){e.dialogVisible=t}}},[a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"form-wrap"},[a("div",{staticClass:"form-item"},[a("span",{staticClass:"lable"},[a("em",[e._v("*")]),e._v("ADQ账号")]),e._v(" "),a("span",[e._v(e._s(e.account_id))])]),e._v(" "),a("div",{staticClass:"form-item"},[a("span",{staticClass:"lable"},[a("em",[e._v("*")]),e._v("推广计划ID")]),e._v(" "),a("el-input",{attrs:{size:"small",placeholder:"请输入推广计划ID",clearable:""},model:{value:e.form.pid,callback:function(t){e.$set(e.form,"pid",t)},expression:"form.pid"}})],1),e._v(" "),a("div",{staticClass:"form-item"},[a("span",{staticClass:"lable"},[e._v("备注说明")]),e._v(" "),a("el-input",{attrs:{size:"small",placeholder:"请输入备注说明",clearable:""},model:{value:e.form.note,callback:function(t){e.$set(e.form,"note",t)},expression:"form.note"}})],1)]),e._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{size:"mini"},on:{click:e.handleCancel}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{size:"mini",type:"primary",disabled:e.loading},on:{click:function(t){return e.handleConfirm({is_confirm:0})}}},[e._v("确 定")])],1)])},staticRenderFns:[]};var f=a("VU/8")(p,g,!1,function(e){a("Xidb")},"data-v-ed1a5d4a",null).exports,v={name:"adqBindPid",components:{selfInputV2:u.a,bindPidDialog:f},data:function(){return{sys_group_id:1==this.$cookie.getCookie("isSuperManage")?sessionStorage.getItem("company_session_defaultCorp_level_1").toString():"",height:"",loading:!1,pagination:{page:1,page_size:20,pages:0,total:0},filter:{note:""},tableList:[],account_id:decodeURIComponent(this.$route.query.account_id),bindPidDialogVisible:!1}},created:function(){this.height=document.documentElement.clientHeight-200,this.handleGetList()},methods:{handleGetList:function(){var e=this;return d()(c.a.mark(function t(){var a,n,i,r,s;return c.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,e.loading=!0,a=""+e.URL.BASEURL+e.URL.adqAccount_bindPidList,n={sys_group_id:e.sys_group_id,account_id:e.account_id,note:e.filter.note,page:e.pagination.page,page_size:e.pagination.page_size},t.next=6,e.$axios.get(a,{params:n});case 6:i=t.sent,r=i.data,(s=void 0===r?{}:r)&&0==s.errno&&Array.isArray(s.rst.data)?(e.tableList=s.rst.data,e.pagination.total=s.rst.pageInfo.total,e.pagination.pages=s.rst.pageInfo.pages):4002!=s.errno&&(e.$message.warning(s.err),e.tableList=[],e.pagination.total=0,e.pagination.pages=0),t.next=18;break;case 12:t.prev=12,t.t0=t.catch(0),console.log(t.t0),e.tableList=[],e.pagination.total=0,e.pagination.pages=0;case 18:return t.prev=18,e.loading=!1,t.finish(18);case 21:case"end":return t.stop()}},t,e,[[0,12,18,21]])}))()},handleCurrentChange:function(e){this.pagination.page=e,this.handleGetList()},onChangeNote:function(e){this.filter.note=e,this.pagination.page=1,this.handleGetList()},onClickStatus:function(e){var t=this;return d()(c.a.mark(function a(){var n,i,r,s;return c.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(a.prev=0,0!=e.status){a.next=11;break}return a.next=4,t.handleGetBindStatus();case 4:if(n=a.sent,i=n.bind_status,r=void 0!==i&&i,s=n.msg,!r){a.next=11;break}return t.$message.warning(s),a.abrupt("return",!1);case 11:return a.next=13,t.$confirm("确定"+(0==e.status?"启用":"禁用")+"当前推广计划吗?","推广计划("+e.pid+")",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"});case 13:t.handleSetStatus({id:e.id,status:0==e.status?1:0}),a.next=19;break;case 16:a.prev=16,a.t0=a.catch(0),console.log("error => ",a.t0);case 19:case"end":return a.stop()}},a,t,[[0,16]])}))()},handleSetStatus:function(e){var t=this,a=e.id,n=e.status;return d()(c.a.mark(function e(){var i,r,s,o,l;return c.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t.loading=!0,i=""+t.URL.BASEURL+t.URL.adqAccount_pidEditStatus,r={id:String(a),status:n},e.next=6,t.$axios.post(i,r);case 6:s=e.sent,o=s.data,(l=void 0===o?{}:o)&&0==l.errno?(t.$message.success("操作成功"),t.handleGetList()):4002!=l.errno&&t.$message.warning(l.err),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(0),console.log(e.t0);case 15:return e.prev=15,t.loading=!1,e.finish(15);case 18:case"end":return e.stop()}},e,t,[[0,12,15,18]])}))()},onClickBindPid:function(){var e=this;return d()(c.a.mark(function t(){var a,n,i,r;return c.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.handleGetBindStatus();case 2:a=t.sent,n=a.bind_status,i=void 0!==n&&n,r=a.msg,i?e.$message.warning(r):e.bindPidDialogVisible=!0;case 7:case"end":return t.stop()}},t,e)}))()},onConfirmBindPid:function(){this.bindPidDialogVisible=!1,this.pagination.page=1,this.handleGetList()},onCancelBindPid:function(){this.bindPidDialogVisible=!1},handleGetBindStatus:function(){var e=this;return d()(c.a.mark(function t(){var a,n,r,o,l;return c.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,a=""+e.URL.BASEURL+e.URL.adqAccount_checkBindType,n={sys_group_id:e.sys_group_id,account_id:e.account_id,type:2},t.next=5,e.$axios.get(a,{params:n});case 5:if(r=t.sent,o=r.data,!(l=void 0===o?{}:o)||0!=l.errno){t.next=12;break}return t.abrupt("return",s.a.resolve(i()({},l.rst)));case 12:if(4002==l.error){t.next=15;break}return e.$message.warning(l.err),t.abrupt("return",s.a.reject(l.err));case 15:t.next=21;break;case 17:return t.prev=17,t.t0=t.catch(0),console.log(t.t0),t.abrupt("return",s.a.reject(t.t0));case 21:case"end":return t.stop()}},t,e,[[0,17]])}))()}}},m={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"adqBindPid-wrap"},[a("div",{staticClass:"screenBox"},[a("selfInputV2",{attrs:{label_name:"搜索",placeholder:"请输入关键字",labelWidth:""},on:{change:e.onChangeNote},model:{value:e.filter.note,callback:function(t){e.$set(e.filter,"note",t)},expression:"filter.note"}})],1),e._v(" "),a("div",{staticClass:"tableInfo",staticStyle:{height:"60px"}},[a("div",{staticClass:"flex-align-center"},[a("div",{staticClass:"totalCustom flex-align-center"},[e._v("ADQ账号"),a("span",[e._v(e._s(e.account_id))])]),e._v(" "),a("div",{staticClass:"c-FF604D f14 lMar28"},[e._v("重要提示:目前只支持容量平台")])]),e._v(" "),a("div",{staticClass:"flex"},[a("el-button",{attrs:{type:"primary",size:"small"},on:{click:e.onClickBindPid}},[e._v("绑定推广计划")])],1)]),e._v(" "),a("el-table",{staticStyle:{width:"100%","margin-top":"10px"},attrs:{height:e.height,data:e.tableList,"tooltip-effect":"dark"}},[a("el-table-column",{attrs:{label:"推广计划ID",prop:"pid","min-width":"300",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{label:"备注说明",prop:"note","min-width":"300",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{label:"状态","show-overflow-tooltip":"",align:"center","min-width":"120"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[""!==n.status?a("el-switch",{attrs:{"active-value":1,"inactive-value":0,disabled:""},nativeOn:{click:function(t){return e.onClickStatus(n)}},model:{value:n.status,callback:function(t){e.$set(n,"status",t)},expression:"row.status"}}):a("div",[e._v(" - ")])]}}])})],1),e._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:e.pagination.total>0,expression:"pagination.total > 0"}],staticClass:"pagination"},[a("el-pagination",{attrs:{background:"","current-page":e.pagination.page,layout:"prev, pager, next","page-count":Number(e.pagination.pages)},on:{"current-change":e.handleCurrentChange}})],1),e._v(" "),a("bindPidDialog",{attrs:{dialogVisible:e.bindPidDialogVisible,account_id:e.account_id},on:{confirm:e.onConfirmBindPid,cancel:e.onCancelBindPid}})],1)},staticRenderFns:[]};var h=a("VU/8")(v,m,!1,function(e){a("40UW")},"data-v-0c3aae40",null);t.default=h.exports}});