chunk-ec0e4cc2.10d4ad2c.js 21 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-ec0e4cc2"],{"0879":function(t,e,n){"use strict";n.r(e);var a=n("2f62"),r=n("9b41"),o=n("d708");function c(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,a)}return n}function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var s={name:"",data:function(){var t;return i(t={roterPre:o.a.roterPre,loading:!1,formInline:{},channelCateList:[],current:0,sortName:"",codeInfoStatus:!1,clentStatus:!1,branchStatus:!1,columns1:[{type:"selection",width:60},{title:"二维码",slot:"qrcode_url",minWidth:80},{title:"二维码名称",key:"name",minWidth:100},{title:"分类",slot:"category",minWidth:100},{title:"添加好友",slot:"skip_verify",minWidth:80},{title:"类型",slot:"type",minWidth:80},{title:"客户数",key:"client_num",minWidth:80},{title:"创建时间",key:"create_time",minWidth:125},{title:"用户标签",slot:"label_name",minWidth:130},{title:"操作",slot:"action",width:150}],tableData:[],clientList:{count:0,list:[]},infoData:{welcome_words:{attachments:[]}},grid:{xl:7,lg:10,md:12,sm:24,xs:24},tableFrom:{type:"",name:"",cate_id:null,page:1,limit:15},clientColumn:[{title:"ID",key:"client_id",minWidth:60,align:"center"},{title:"头像",slot:"avatar",minWidth:100,align:"center"},{title:"客户名称",slot:"name",minWidth:100,align:"center"},{title:"加入时间",key:"create_time",minWidth:120,align:"center"}],branchCateId:"",branchRow:[]},"loading",!1),i(t,"userLoading",!1),i(t,"clientForm",{id:0,page:1,limit:15}),i(t,"total",0),t},computed:function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?c(n,!0).forEach((function(e){i(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):c(n).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},Object(a.e)("admin/layout",["isMobile"]),{labelWidth:function(){return this.isMobile?void 0:80},labelPosition:function(){return this.isMobile?"top":"left"}}),created:function(){this.getWorkChannelCate(),this.getChannelCode()},methods:{editData:function(t){this.$router.push({path:this.roterPre+"/work/createCode/"+t.id})},move:function(){},changeMenu:function(t,e,n){var a=this;switch(e){case"1":this.branchRow[0]=t,this.branchStatus=!0;break;case"2":var r={title:"删除渠道码",num:n,url:"work/channel/code/".concat(t.id),method:"DELETE",ids:""};this.$modalSure(r).then((function(t){a.$Message.success(t.msg),a.tableData.list.splice(n,1),a.tableData.list.length||(a.tableFrom.page=1==a.tableFrom.page?1:a.tableFrom.page-1),a.getChannelCode()})).catch((function(t){a.$Message.error(t.msg)}));break;case"3":this.clentStatus=!0,this.clientForm.id=t.id,this.getClient()}},codeInfo:function(t){var e=this;Object(r.k)(t.id).then((function(t){e.infoData=t.data})),this.codeInfoStatus=!0},getClient:function(){var t=this;this.userLoading=!0,Object(r.j)(this.clientForm).then((function(e){t.$set(t,"clientList",e.data),t.userLoading=!1})).catch((function(e){t.userLoading=!1,t.$Message.error(e.msg)}))},getWorkChannelCate:function(t){var e=this;Object(r.y)().then((function(n){n.data.unshift({name:"全部",id:""}),n.data.forEach((function(t){t.status=!1})),t||(e.sortName=n.data[0].id),e.channelCateList=n.data}))},bindMenuItem:function(t,e){this.tableFrom.cate_id=t.id,this.current=e,this.channelCateList.forEach((function(t){t.status=!1})),this.branchRow=[],this.getChannelCode()},showMenu:function(t){this.channelCateList.forEach((function(e){e.id==t.id?e.status=!t.status:e.status=!1}))},addChannelCate:function(){var t=this;this.$modalForm(Object(r.v)()).then((function(){t.getWorkChannelCate()}))},delChannelCate:function(t,e,n){var a=this;Object(r.w)(t.id).then((function(t){a.getWorkChannelCate(),a.$Message.success(t.msg)})).catch((function(t){a.$Message.error(t.msg)}))},labelEdit:function(t){var e=this;this.$modalForm(Object(r.x)(t.id)).then((function(){t.status=!1,e.getWorkChannelCate(1)}))},getChannelCode:function(){var t=this;this.loading=!0,Object(r.z)(this.tableFrom).then((function(e){t.tableData=e.data,t.loading=!1})).catch((function(e){t.loading=!1,t.$Message.error(e.msg)}))},branchCate:function(){this.branchStatus=!0},branchCateConfirm:function(){var t=this,e={cate_id:this.branchCateId,ids:this.branchRow.map((function(t){return t.id}))};Object(r.u)(e).then((function(e){t.$Message.success("移动成功"),t.branchRow=[],t.getChannelCode()}))},selectAll:function(t){t.length&&(this.branchRow=t)},handleSelectRow:function(t){this.branchRow=t},codeSearchs:function(){this.tableFrom.page=1,this.getChannelCode()},pageChange:function(t){this.tableFrom.page=t,this.getChannelCode()},clientChange:function(t){this.clientForm.page=t,this.getClient()},downloadCodeImg:function(){var t=document.createElement("a"),e=this.infoData.qrcode_url;fetch(e).then((function(t){return t.blob()})).then((function(e){t.href=URL.createObjectURL(e),t.download="pic",document.body.appendChild(t),t.click()}))},downPic:function(){var t=this,e=function(e){var n=document.createElement("a"),a=t.branchRow[e].qrcode_url;fetch(a).then((function(t){return t.blob()})).then((function(a){n.href=URL.createObjectURL(a),n.download=t.branchRow[e].name,document.body.appendChild(n),n.click()}))};for(var n in this.branchRow)e(n)}}},u=(n("760f"),n("2877")),l=Object(u.a)(s,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":"",padding:0}},[n("div",{staticClass:"new_card_pd"},[n("Alert",{attrs:{closable:"","show-icon":""}},[n("p",[t._v("\r\n 1.可以生成带参数的二维码名片,支持活码功能,即随机选取设置的活码成员推给用户。加企业微信为好友后,可以给微信联系人自动回复相应欢迎消息和打标签。\r\n ")]),n("p",[t._v("\r\n 2.受限于官方,单人类型的渠道码创建后尽量不要再修改成员,否则会造成列表中,该二维码中间的头像与配置的成员头像不一致,但是并不影响功能使用。\r\n ")]),n("p",[t._v("\r\n 3.如果企业在企业微信后台为相关成员配置了可用的欢迎语,使用本系统配置欢迎语,则均不起效,推送的还是企业微信官方的。\r\n ")])]),n("Form",{attrs:{"label-width":96,inline:"","label-colon":!0}},[n("FormItem",{attrs:{label:"二维码搜索"}},[n("Input",{staticClass:"input-add",attrs:{placeholder:"请输入二维码名称"},model:{value:t.tableFrom.name,callback:function(e){t.$set(t.tableFrom,"name",e)},expression:"tableFrom.name"}})],1),n("FormItem",{attrs:{label:"类型选择"}},[n("Select",{staticClass:"input-add mr14",attrs:{clearable:""},model:{value:t.tableFrom.type,callback:function(e){t.$set(t.tableFrom,"type",e)},expression:"tableFrom.type"}},[n("Option",{attrs:{value:"0"}},[t._v("全天在线")]),n("Option",{attrs:{value:"1"}},[t._v("自动上下线")])],1),n("Button",{attrs:{type:"primary"},on:{click:function(e){return t.codeSearchs()}}},[t._v("查询")])],1)],1)],1)]),n("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[n("Row",{attrs:{type:"flex",wrap:!1}},[n("Col",{staticClass:"left-wrapper"},[n("Menu",{attrs:{"active-name":t.sortName}},t._l(t.channelCateList,(function(e,a){return n("MenuItem",{key:a,staticClass:"menu-item",class:a===t.current?"showOn":"",attrs:{name:e.id},nativeOn:{click:function(n){return t.bindMenuItem(e,a)}}},[t._v("\r\n "+t._s(e.name)+"\r\n "),0!=a?n("div",{staticClass:"icon-box"},[n("Icon",{attrs:{type:"ios-more",size:"24"},on:{click:function(n){return n.stopPropagation(),t.showMenu(e)}}})],1):t._e(),0!=a?n("div",{directives:[{name:"show",rawName:"v-show",value:e.status,expression:"item.status"}],staticClass:"right-menu ivu-poptip-inner"},[n("div",{staticClass:"ivu-poptip-body",on:{click:function(n){return t.labelEdit(e)}}},[n("div",{staticClass:"ivu-poptip-body-content"},[n("div",{staticClass:"ivu-poptip-body-content-inner"},[t._v("编辑")])])]),n("div",{staticClass:"ivu-poptip-body",on:{click:function(n){return t.delChannelCate(e,"删除分类",a)}}},[n("div",{staticClass:"ivu-poptip-body-content"},[n("div",{staticClass:"ivu-poptip-body-content-inner"},[t._v("删除")])])])]):t._e()])})),1)],1),n("Col",{staticClass:"auto"},[n("div",{staticClass:"acea-row ml-20 mb-15"},[n("router-link",{attrs:{to:t.roterPre+"/work/createCode"}},[n("Button",{staticClass:"mr-12",attrs:{type:"primary"}},[t._v("添加二维码")])],1),n("Button",{staticClass:"mr-12",attrs:{type:"success"},on:{click:function(e){return t.addChannelCate()}}},[t._v("添加分类")]),n("Button",{staticClass:"mr-12",attrs:{disabled:!t.branchRow.length},on:{click:function(e){return t.branchCate()}}},[t._v("批量移动")]),n("Button",{staticClass:"mr-12",attrs:{disabled:!t.branchRow.length},on:{click:function(e){return t.downPic()}}},[t._v("批量下载")])],1),n("Table",{ref:"selection",attrs:{columns:t.columns1,data:t.tableData.list,loading:t.loading},on:{"on-select-all":t.selectAll,"on-select-all-cancel":t.selectAll,"on-selection-change":t.handleSelectRow},scopedSlots:t._u([{key:"qrcode_url",fn:function(t){var e=t.row;return[n("viewer",{staticClass:"acea-row"},[n("div",{staticClass:"tabBox_img"},[n("img",{directives:[{name:"lazy",rawName:"v-lazy",value:e.qrcode_url,expression:"row.qrcode_url"}]})])])]}},{key:"category",fn:function(e){var a=e.row;return[a.category?n("span",[t._v(t._s(a.category.name))]):t._e()]}},{key:"skip_verify",fn:function(e){var a=e.row;return[n("span",[t._v(t._s(a.skip_verify?"自动添加":"手动添加"))])]}},{key:"type",fn:function(e){var a=e.row;return[n("span",[t._v(t._s(a.type?"自动上线":"全天在线"))])]}},{key:"label_name",fn:function(e){var a=e.row;return t._l(a.label_name,(function(e,a){return n("Tag",{key:a,attrs:{size:"medium"}},[t._v(t._s(e))])}))}},{key:"action",fn:function(e){var a=e.row,r=e.index;return[n("a",{on:{click:function(e){return t.editData(a)}}},[t._v("编辑")]),n("Divider",{attrs:{type:"vertical"}}),n("a",{on:{click:function(e){return t.codeInfo(a)}}},[t._v("详情")]),n("Divider",{attrs:{type:"vertical"}}),[n("Dropdown",{staticStyle:{"z-index":"999"},on:{"on-click":function(e){return t.changeMenu(a,e,r)}}},[n("a",{attrs:{href:"javascript:void(0)"}},[t._v("\r\n 更多\r\n "),n("Icon",{attrs:{type:"ios-arrow-down"}})],1),n("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[n("DropdownItem",{attrs:{name:"1"}},[t._v("移动")]),n("DropdownItem",{attrs:{name:"2"}},[t._v("删除")]),n("DropdownItem",{attrs:{name:"3"}},[t._v("客户列表")])],1)],1)]]}}])}),n("div",{staticClass:"acea-row row-right page"},[n("Page",{attrs:{total:t.tableData.count,current:t.tableFrom.page,"show-elevator":"","show-total":"","page-size":t.tableFrom.limit},on:{"on-change":t.pageChange}})],1)],1)],1)],1),n("Modal",{attrs:{title:"渠道码详情","footer-hide":!0,width:"900"},model:{value:t.codeInfoStatus,callback:function(e){t.codeInfoStatus=e},expression:"codeInfoStatus"}},[n("div",{staticClass:"acea-row"},[n("div",{staticClass:"left_container acea-row row-center"},[n("div",{staticClass:"qrcode_box"},[n("img",{attrs:{src:t.infoData.qrcode_url,alt:""}}),n("p",{staticClass:"qrcode_name"},[t._v(t._s(t.infoData.name))]),n("Button",{attrs:{type:"primary",long:!0},on:{click:function(e){return t.downloadCodeImg()}}},[t._v("下载活码")]),n("Button",{staticClass:"mt12",attrs:{long:!0},on:{click:function(e){return t.editData(t.infoData)}}},[t._v("修改")])],1)]),n("div",{staticClass:"right_container"},[n("p",{staticClass:"base_info"},[t._v("基本信息")]),n("p",{staticClass:"base_cell"},[t._v("创建时间:"+t._s(t.infoData.create_time)+" ")]),n("p",{staticClass:"base_cell"},[t._v("当前使用成员:\r\n "),t._l(t.infoData.presentUseUserList,(function(e,a){return n("span",{key:a},[t._v(t._s(e)+" ")])}))],2),n("p",{staticClass:"base_cell"},[t._v("备用成员:\r\n "),t._l(t.infoData.reserve_user_list,(function(e,a){return n("span",{key:a},[t._v(t._s(e)+" ")])}))],2),1===t.infoData.type?n("p",{staticClass:"base_cell"},[t._v("使用成员:\r\n "),t._l(t.infoData.cycle,(function(e,a){return n("span",{key:a},[t._l(e.userItem,(function(e,a){return n("span",{key:a},[t._v("\r\n "+t._s(e.name)+"\r\n ")])})),t._v("\r\n  ")],2)}))],2):t._e(),0===t.infoData.type?n("p",{staticClass:"base_cell"},[t._v("使用成员:\r\n "),t._l(t.infoData.user_list,(function(e,a){return n("span",{key:a},[t._v(t._s(e.name)+" ")])}))],2):t._e(),n("p",{staticClass:"base_cell"},[t._v("员工添加上限:"+t._s(t.infoData.add_upper_limit?"开启":"关闭"))]),n("p",{staticClass:"base_cell"},[t._v("自动通过好友:"+t._s(t.infoData.skip_verify?"开启":"关闭"))]),n("div",{staticClass:"dashed_line"}),n("p",{staticClass:"base_info"},[t._v("欢迎语设置")]),t._l(t.infoData.welcome_words.attachments,(function(e,a){return n("div",{key:a,staticClass:"welcome_card acea-row"},[n("span",{staticClass:"pr-10"},[t._v("欢迎语"+t._s(a+1)+": ")]),"image"==e.msgtype?n("img",{attrs:{src:e.image.pic_url,alt:""}}):t._e(),"miniprogram"==e.msgtype?n("div",[n("span",{staticClass:"iconfont iconxiaochengxu"}),n("span",[t._v(t._s(e.miniprogram.title))])]):t._e()])}))],2)])]),n("Modal",{attrs:{title:"客户列表","footer-hide":!0,width:"600"},model:{value:t.clentStatus,callback:function(e){t.clentStatus=e},expression:"clentStatus"}},[n("Table",{attrs:{columns:t.clientColumn,data:t.clientList.list,loading:t.userLoading},scopedSlots:t._u([{key:"avatar",fn:function(t){var e=t.row;return[n("viewer",{staticClass:"acea-row row-center"},[n("div",{staticClass:"tabBox_img"},[n("img",{directives:[{name:"lazy",rawName:"v-lazy",value:e.client.avatar,expression:"row.client.avatar"}]})])])]}},{key:"name",fn:function(e){var a=e.row;return[n("span",[t._v(t._s(a.client.name))])]}}])}),n("div",{staticClass:"acea-row row-right page"},[n("Page",{attrs:{total:t.clientList.count,current:t.clientForm.page,"show-elevator":"","show-total":"","page-size":t.clientForm.limit},on:{"on-change":t.clientChange}})],1)],1),n("Modal",{attrs:{title:"移动分类",width:"400","class-name":"vertical-center-modal"},on:{"on-ok":t.branchCateConfirm},model:{value:t.branchStatus,callback:function(e){t.branchStatus=e},expression:"branchStatus"}},[n("Form",{attrs:{"label-width":75,"label-position":"right","label-colon":!0}},[n("FormItem",{attrs:{label:"分类"}},[n("Select",{staticClass:"input-add",model:{value:t.branchCateId,callback:function(e){t.branchCateId=e},expression:"branchCateId"}},t._l(t.channelCateList,(function(e){return n("Option",{key:e.id,attrs:{value:e.id.toString()}},[t._v(t._s(e.name))])})),1)],1)],1)],1)],1)}),[],!1,null,"bed6d578",null);e.default=l.exports},"760f":function(t,e,n){"use strict";var a=n("fc85");n.n(a).a},"9b41":function(t,e,n){"use strict";n.d(e,"V",(function(){return r})),n.d(e,"P",(function(){return o})),n.d(e,"U",(function(){return c})),n.d(e,"y",(function(){return i})),n.d(e,"v",(function(){return s})),n.d(e,"x",(function(){return u})),n.d(e,"w",(function(){return l})),n.d(e,"z",(function(){return d})),n.d(e,"s",(function(){return h})),n.d(e,"k",(function(){return m})),n.d(e,"j",(function(){return f})),n.d(e,"E",(function(){return p})),n.d(e,"u",(function(){return b})),n.d(e,"F",(function(){return g})),n.d(e,"Q",(function(){return _})),n.d(e,"G",(function(){return v})),n.d(e,"J",(function(){return w})),n.d(e,"W",(function(){return C})),n.d(e,"h",(function(){return k})),n.d(e,"g",(function(){return y})),n.d(e,"t",(function(){return O})),n.d(e,"m",(function(){return j})),n.d(e,"c",(function(){return D})),n.d(e,"b",(function(){return F})),n.d(e,"a",(function(){return I})),n.d(e,"i",(function(){return S})),n.d(e,"d",(function(){return L})),n.d(e,"D",(function(){return M})),n.d(e,"H",(function(){return x})),n.d(e,"I",(function(){return P})),n.d(e,"f",(function(){return R})),n.d(e,"N",(function(){return W})),n.d(e,"M",(function(){return $})),n.d(e,"l",(function(){return E})),n.d(e,"T",(function(){return z})),n.d(e,"e",(function(){return q})),n.d(e,"L",(function(){return B})),n.d(e,"K",(function(){return N})),n.d(e,"O",(function(){return U})),n.d(e,"B",(function(){return A})),n.d(e,"r",(function(){return T})),n.d(e,"q",(function(){return J})),n.d(e,"n",(function(){return G})),n.d(e,"o",(function(){return H})),n.d(e,"p",(function(){return K})),n.d(e,"A",(function(){return Q})),n.d(e,"R",(function(){return V})),n.d(e,"S",(function(){return X})),n.d(e,"C",(function(){return Y}));var a=n("b6bd");function r(){return Object(a.a)({url:"work/tree",method:"get"})}function o(){return Object(a.a)({url:"work/label",method:"get"})}function c(){return Object(a.a)({url:"work/synchMember",method:"post"})}function i(){return Object(a.a)({url:"work/channel/cate",method:"get"})}function s(){return Object(a.a)({url:"work/channel/cate/create",method:"get"})}function u(t){return Object(a.a)({url:"/work/channel/cate/".concat(t,"/edit"),method:"get"})}function l(t){return Object(a.a)({url:"/work/channel/cate/".concat(t),method:"delete"})}function d(t){return Object(a.a)({url:"work/channel/code",method:"get",params:t})}function h(t){return Object(a.a)({url:"work/channel/code",method:"post",data:t})}function m(t){return Object(a.a)({url:"work/channel/code/".concat(t),method:"get"})}function f(t){return Object(a.a)({url:"work/channel/code/client",method:"get",params:t})}function p(t,e){return Object(a.a)({url:"work/channel/code/".concat(t),method:"put",data:e})}function b(t){return Object(a.a)({url:"work/channel/code/bactch/cate",method:"post",data:t})}function g(){return Object(a.a)({url:"work/department",method:"get"})}function _(t){return Object(a.a)({url:"work/member",method:"get",params:t})}function v(t){return Object(a.a)({url:"work/group_chat",method:"get",params:t})}function w(){return Object(a.a)({url:"work/group_chat/synch",method:"post"})}function C(t){return Object(a.a)({url:"work/welcome",method:"post",data:t})}function k(t){return Object(a.a)({url:"work/welcome",method:"get",params:t})}function y(t){return Object(a.a)({url:"work/welcome/".concat(t),method:"get"})}function O(t,e){return Object(a.a)({url:"work/welcome/".concat(t),method:"put",data:e})}function j(t){return Object(a.a)({url:"work/group_chat_auth",method:"post",data:t})}function D(t){return Object(a.a)({url:"work/group_chat_auth",method:"get",params:t})}function F(t){return Object(a.a)({url:"work/group_chat_auth/".concat(t),method:"get"})}function I(t,e){return Object(a.a)({url:"work/group_chat_auth/".concat(t),method:"put",data:e})}function S(t){return Object(a.a)({url:"work/client",method:"get",params:t})}function L(t){return Object(a.a)({url:"work/group_chat/member",method:"get",params:t})}function M(){return Object(a.a)({url:"work/client/synch",method:"get"})}function x(t){return Object(a.a)({url:"work/group_chat/statistics",method:"get",params:t})}function P(t){return Object(a.a)({url:"work/group_chat/statisticsList",method:"get",params:t})}function R(t){return Object(a.a)({url:"work/group_template",method:"get",params:t})}function W(t){return Object(a.a)({url:"work/group_template",method:"post",data:t})}function $(t){return Object(a.a)({url:"work/group_template/".concat(t),method:"get"})}function E(t){return Object(a.a)({url:"work/moment",method:"get",params:t})}function z(t){return Object(a.a)({url:"/work/moment",method:"post",data:t})}function q(t){return Object(a.a)({url:"work/group_template_chat",method:"get",params:t})}function B(t){return Object(a.a)({url:"work/group_template_chat",method:"post",data:t})}function N(t){return Object(a.a)({url:"work/group_template_chat/".concat(t),method:"get"})}function U(t){return Object(a.a)({url:"work/group_template/sendMessage",method:"post",data:t})}function A(t){return Object(a.a)({url:"work/client/count",method:"post",data:t})}function T(t,e){return Object(a.a)({url:"work/group_template/memberList/".concat(t),method:"get",params:e})}function J(t,e){return Object(a.a)({url:"work/group_template/clientList/".concat(t),method:"get",params:e})}function G(t,e){return Object(a.a)({url:"work/group_template_chat/groupChatList/".concat(t),method:"get",params:e})}function H(t,e){return Object(a.a)({url:"work/group_template_chat/groupChatOwnerList/".concat(t),method:"get",params:e})}function K(t){return Object(a.a)({url:"work/group_template_chat/getOwnerChatList",method:"get",params:t})}function Q(t){return Object(a.a)({url:"work/client/batchLabel",method:"post",data:t})}function V(t){return Object(a.a)({url:"work/moment/".concat(t),method:"get"})}function X(t){return Object(a.a)({url:"work/moment_list",method:"get",params:t})}function Y(t,e){return Object(a.a)({url:"work/client/".concat(t),method:"put",data:e})}},fc85:function(t,e,n){}}]);