企微助手 ,仓库名 短剧

87.65be13a98cb96ee2c98d.js 8.5KB

1
  1. webpackJsonp([87],{fSDg:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=a("Xxa5"),i=a.n(n),s=a("exGp"),r=a.n(s),o=a("fGUm"),l=a("mGJs"),c=a("1b6Z"),u=a("McOJ"),p=a("2Uyi"),d={components:{createMsg:l.a,detail:c.a,selfInput:u.a,selfCustomerservice:o.a},data:function(){return{detialFlag:!1,loading:!1,page:1,pages:0,total:0,page_size:20,tableData:[],resetFlag:!1,height:"",detail_chat_id:"",user_id_list:"",input_keyword:"",uniqueMemberCount:"",uniqueMemberCountLoading:!1}},created:function(){this.height=document.documentElement.clientHeight-260>400?document.documentElement.clientHeight-260:400,this.init(1)},methods:{lookJQUser:function(){var e=this;this.uniqueMemberCountLoading=!0,this.$axios.get(this.URL.BASEURL+this.URL.chatGroup_uniqueMemberCount,{}).then(function(t){t=t.data;e.uniqueMemberCountLoading=!1,t&&0==t.errno?e.uniqueMemberCount=t.rst.member_count:4002!=t.errno&&e.$message({message:t.err,type:"warning"})}).catch(function(t){e.uniqueMemberCountLoading=!1})},detailClose:function(e){"update"==e?this.init(this.page):"update_new"==e&&(this.init(1),this.$refs.multipleTable.bodyWrapper.scrollTop=0),this.detialFlag=!1},goDetail:function(e){this.detail_chat_id=e.chat_id,this.detialFlag=!0},init:function(e,t){var a=this;if("export"!=t)this.page=e||this.page;else if(0==this.total)return void this.$message({message:"暂无数据可导出",type:"warning"});this.loading=!0,this.$axios.get(this.URL.BASEURL+this.URL.chatGroup_groupList,{params:{page:"export"==t?1:this.page,page_size:"export"==t?this.$store.state.exportNumber:this.page_size,owner:this.user_id_list,keyword:this.input_keyword}}).then(function(e){e=e.data;a.loading=!1,e&&0==e.errno?"export"==t?a.exportEvent(e.rst.data):(a.tableData=e.rst.data,a.total=e.rst.pageInfo.total,a.pages=e.rst.pageInfo.pages):4002!=e.errno&&a.$message({message:e.err,type:"warning"})}).catch(function(e){a.loading=!1})},handleCurrentChange:function(e){this.init(e)},exportEvent:function(e){var t=e;t.forEach(function(e){e.self_status=1==e.status?"正常":2==e.status?"解散":""});var a=[{tHeader:["群名称","群主","群人数","群公告","创建时间","群状态"],filterVal:["name","owner_name","member_count","notice","create_time","self_status"],tableDatas:t,sheetName:""}];this.$exportOrder({excelDatas:a,name:"客户群管理(导出时间:"+this.$getDay(0)+")"})},onClickCopyID:function(e){var t=this;return r()(i.a.mark(function a(){return i.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,a.next=3,t.$copyText(e.share_chatid);case 3:t.$message.success("复制成功"),a.next=9;break;case 6:a.prev=6,a.t0=a.catch(0),t.$message.error("复制失败,请重试");case 9:case"end":return a.stop()}},a,t,[[0,6]])}))()},onClickSyncGroup:function(){var e=this;return r()(i.a.mark(function t(){var a,n,s;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,a=Object(p.i)()||{},n=a.corp_name,s=a.corpid,t.next=4,e.$confirm("确定同步"+(n?"【"+n+"】":"当前企微")+"的客户群数据吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"});case 4:e.handleSyncGroup({corp_name:n,corpid:s}),t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log("error => ",t.t0);case 10:case"end":return t.stop()}},t,e,[[0,7]])}))()},handleSyncGroup:function(e){var t=this,a=(e.corp_name,e.corpid);return r()(i.a.mark(function e(){var n,s,r,o,l;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.tagManage_syncCorpChatGroup,s={corpid:a},e.next=6,t.$axios.get(n,{params:s});case 6:r=e.sent,o=r.data,(l=void 0===o?{}:o)&&0==l.errno?t.$message.success({message:"后台数据同步中,请稍候查看",duration:6e3}):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]])}))()}}},g={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"}]},[a("div",{staticClass:"screenBox",staticStyle:{"align-items":"center","padding-right":"16px"}},[a("div",{staticClass:"flex-align-center",staticStyle:{flex:"1","flex-wrap":"wrap"}},[a("self-input",{attrs:{reset:e.resetFlag,labelWidth:!0,label_name:"群聊名称"},on:{inputChange:function(t){e.input_keyword=t,e.init(1)}}}),e._v(" "),a("self-customerservice",{attrs:{source:"chatGroup",title:"群主"},on:{customerDefine:function(t){e.user_id_list=t,e.init(1)}}})],1)]),e._v(" "),a("div",{staticClass:"tableInfo"},[a("div",[a("div",{staticClass:"flex"},[a("div",{staticClass:"totalCustom"},[e._v("共有"),a("span",[e._v(e._s(e.total))]),e._v("个群聊")]),e._v(" "),a("div",{staticClass:"smalLine"}),e._v(" "),a("div",{staticClass:"excludeCustom"},[!e.uniqueMemberCount&&0!=e.uniqueMemberCount||""==e.uniqueMemberCount?a("span",{staticClass:"f14 pointer",on:{click:function(t){return e.lookJQUser()}}},[e.uniqueMemberCountLoading?a("i",{staticClass:"el-icon-loading f16"}):a("i",[e._v("查看")])]):a("span",{staticClass:"f16"},[e._v(e._s(e.uniqueMemberCount))]),e._v("\n 去重进群客户\n "),a("el-tooltip",{staticClass:"disinblock",attrs:{content:"该数据为去重后的进群客户数,若客户进入多个客户群只会统计为1个客户",placement:"top"}},[a("i",{staticClass:"el-icon-question"})])],1)])]),e._v(" "),a("div",{staticClass:"flex"},[a("el-button",{attrs:{type:"primary",size:"mini",icon:"el-icon-refresh"},on:{click:e.onClickSyncGroup}},[e._v("同步企微客户群")]),e._v(" "),a("el-button",{attrs:{type:"primary",plain:"",size:"mini"},on:{click:function(t){return e.init(1,"export")}}},[e._v("导出Excel")])],1)]),e._v(" "),a("el-table",{ref:"multipleTable",staticStyle:{width:"100%"},attrs:{height:e.height,data:e.tableData,"tooltip-effect":"dark"}},[a("el-table-column",{attrs:{prop:"name",label:"群名称","show-overflow-tooltip":"",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{style:t.row.name?"":"color:#bbb"},[e._v(e._s(t.row.name?t.row.name:"未设置群名"))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"群主",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"customerServiceTagBox"},[a("div",{staticClass:"customerServiceTag"},[a("i",{staticClass:"el-icon-user-solid"}),e._v(" "+e._s(t.row.owner_name))])])]}}])}),e._v(" "),a("el-table-column",{attrs:{"min-width":"80",label:"群人数","show-overflow-tooltip":"",align:"center"},scopedSlots:e._u([{key:"header",fn:function(){return[a("div",[e._v("\n 群人数\n "),a("el-tooltip",{attrs:{content:"总人数",placement:"top"}},[a("i",{staticClass:"el-icon-question"})])],1)]},proxy:!0},{key:"default",fn:function(t){return[a("div",[e._v(e._s(t.row.member_count))])]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"notice",label:"群公告","show-overflow-tooltip":"",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{prop:"create_time",label:"创建时间","show-overflow-tooltip":"",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{label:"群状态","show-overflow-tooltip":"",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[2==t.row.status?a("span",{staticClass:"c-666"},[e._v("解散")]):e._e(),e._v(" "),1==t.row.status?a("span",{staticClass:"c-58BCA6"},[e._v("正常")]):e._e()]}}])}),e._v(" "),a("el-table-column",{attrs:{"min-width":"80",label:"操作",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"flex",staticStyle:{"justify-content":"center"}},[a("div",{staticClass:"c-00B38A pointer table_button",on:{click:function(a){return e.goDetail(t.row)}}},[e._v("详情")]),e._v(" "),a("div",{staticClass:"c-00B38A pointer table_button",on:{click:function(a){return e.onClickCopyID(t.row)}}},[e._v("复制ID")])])]}}])})],1),e._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:e.total>0,expression:"total > 0"}],staticClass:"pagination"},[a("el-pagination",{attrs:{background:"","current-page":e.page,layout:"prev, pager, next","page-count":Number(e.pages)},on:{"current-change":e.handleCurrentChange}})],1),e._v(" "),a("el-drawer",{attrs:{size:"1200px",visible:e.detialFlag,"with-header":!1},on:{"update:visible":function(t){e.detialFlag=t}}},[e.detialFlag?a("detail",{attrs:{title:"客户群详情",chat_id:e.detail_chat_id},on:{close:e.detailClose}}):e._e()],1)],1)},staticRenderFns:[]};var v=a("VU/8")(d,g,!1,function(e){a("yOMz")},"data-v-50a8ed34",null);t.default=v.exports},yOMz:function(e,t){}});