| 1 |
- (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-1d99af8b"],{2075:function(t,e,i){"use strict";var n=i("e00b");i.n(n).a},7864:function(t,e,i){"use strict";i.r(e),i("a4d3"),i("e01a"),i("d28b"),i("3ca3"),i("ddb0"),i("b636"),i("944a"),i("0c47"),i("23dc"),i("3410"),i("d9e2"),i("b0c0"),i("131a"),i("fb6a");var n=i("0122"),r=i("c964"),a=i("f3f3"),o=(i("d3b7"),i("159b"),i("a434"),i("d81d"),i("a15b"),i("2f62")),s=i("90e7");function c(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */c=function(){return t};var t={},e=Object.prototype,i=e.hasOwnProperty,r=Object.defineProperty||function(t,e,i){t[e]=i.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(t,e,i){return Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(e){l=function(t,e,i){return t[e]=i}}function h(t,e,i,n){var a,o,s,c;e=e&&e.prototype instanceof p?e:p,e=Object.create(e.prototype),n=new k(n||[]);return r(e,"_invoke",{value:(a=t,o=i,s=n,c="suspendedStart",function(t,e){if("executing"===c)throw new Error("Generator is already running");if("completed"===c){if("throw"===t)throw e;return C()}for(s.method=t,s.arg=e;;){var i=s.delegate;if(i&&(i=function t(e,i){var n=i.method,r=e.iterator[n];return void 0===r?(i.delegate=null,"throw"===n&&e.iterator.return&&(i.method="return",i.arg=void 0,t(e,i),"throw"===i.method)||"return"!==n&&(i.method="throw",i.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f):(n=d(r,e.iterator,i.arg),"throw"===n.type?(i.method="throw",i.arg=n.arg,i.delegate=null,f):(r=n.arg,r?r.done?(i[e.resultName]=r.value,i.next=e.nextLoc,"return"!==i.method&&(i.method="next",i.arg=void 0),i.delegate=null,f):r:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,f)))}(i,s),i)){if(i===f)continue;return i}if("next"===s.method)s.sent=s._sent=s.arg;else if("throw"===s.method){if("suspendedStart"===c)throw c="completed",s.arg;s.dispatchException(s.arg)}else"return"===s.method&&s.abrupt("return",s.arg);if(c="executing",i=d(a,o,s),"normal"===i.type){if(c=s.done?"completed":"suspendedYield",i.arg===f)continue;return{value:i.arg,done:s.done}}"throw"===i.type&&(c="completed",s.method="throw",s.arg=i.arg)}})}),e}function d(t,e,i){try{return{type:"normal",arg:t.call(e,i)}}catch(t){return{type:"throw",arg:t}}}t.wrap=h;var f={};function p(){}function m(){}function g(){}a={};var v=(l(a,o,(function(){return this})),Object.getPrototypeOf),y=(v=v&&v(v(_([]))),v&&v!==e&&i.call(v,o)&&(a=v),g.prototype=p.prototype=Object.create(a));function b(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){var a;r(this,"_invoke",{value:function(r,o){function s(){return new e((function(a,s){!function r(a,o,s,c){var u;a=d(t[a],t,o);if("throw"!==a.type)return(o=(u=a.arg).value)&&"object"==Object(n.a)(o)&&i.call(o,"__await")?e.resolve(o.__await).then((function(t){r("next",t,s,c)}),(function(t){r("throw",t,s,c)})):e.resolve(o).then((function(t){u.value=t,s(u)}),(function(t){return r("throw",t,s,c)}));c(a.arg)}(r,o,a,s)}))}return a=a?a.then(s,s):s()}})}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function _(t){if(t){var e,n=t[o];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length))return e=-1,(n=function n(){for(;++e<t.length;)if(i.call(t,e))return n.value=t[e],n.done=!1,n;return n.value=void 0,n.done=!0,n}).next=n}return{next:C}}function C(){return{value:void 0,done:!0}}return r(y,"constructor",{value:m.prototype=g,configurable:!0}),r(g,"constructor",{value:m,configurable:!0}),m.displayName=l(g,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){return t="function"==typeof t&&t.constructor,!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,u,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},b(w.prototype),l(w.prototype,s,(function(){return this})),t.AsyncIterator=w,t.async=function(e,i,n,r,a){void 0===a&&(a=Promise);var o=new w(h(e,i,n,r),a);return t.isGeneratorFunction(i)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},b(y),l(y,u,"Generator"),l(y,o,(function(){return this})),l(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e,i=Object(t),n=[];for(e in i)n.push(e);return n.reverse(),function t(){for(;n.length;){var e=n.pop();if(e in i)return t.value=e,t.done=!1,t}return t.done=!0,t}},t.values=_,k.prototype={constructor:k,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(L),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(i,n){return o.type="throw",o.arg=t,e.next=i,n&&(e.method="next",e.arg=void 0),!!n}for(var r=this.tryEntries.length-1;0<=r;--r){var a=this.tryEntries[r],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=i.call(a,"catchLoc"),c=i.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var a=r;break}}var o=(a=a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc?null:a)?a.completion:{};return o.type=t,o.arg=e,a?(this.method="next",this.next=a.finallyLoc,f):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),L(i),f}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var i,n,r=this.tryEntries[e];if(r.tryLoc===t)return"throw"===(i=r.completion).type&&(n=i.arg,L(r)),n}throw new Error("illegal catch attempt")},delegateYield:function(t,e,i){return this.delegate={iterator:_(t),resultName:e,nextLoc:i},"next"===this.method&&(this.arg=void 0),f}},t}a={name:"index",filters:{typeFilter:function(t){return{wechat:"微信用户",routine:"小程序用户"}[t]}},computed:Object(a.a)(Object(a.a)({},Object(o.d)("media",["isMobile"])),{},{labelWidth:function(){return this.isMobile?void 0:80},labelPosition:function(){return this.isMobile?"top":"left"}}),data:function(){return{grid1:{xl:4,lg:4,md:6,sm:8,xs:0},grid2:{xl:20,lg:20,md:18,sm:16,xs:24},isChat:!0,formValidate3:{page:1,limit:15},total3:0,loading3:!1,modals3:!1,tableList3:[],columns3:[{title:"用户名称",key:"nickname",width:200},{title:"客服头像",slot:"headimgurl"},{title:"操作",slot:"action"}],formValidate5:{page:1,limit:15,uid:0,to_uid:0,id:0},total5:0,loading5:!1,tableList5:[],FromData:null,formValidate:{page:1,limit:15,data:"",type:"",nickname:""},tableList2:[],modals:!1,total:0,tableFrom:{page:1,limit:15,cate_id:0},timeVal:[],fromList:{title:"选择时间",custom:!0,fromTxt:[{text:"全部",val:""},{text:"今天",val:"today"},{text:"昨天",val:"yesterday"},{text:"最近7天",val:"lately7"},{text:"最近30天",val:"lately30"},{text:"本月",val:"month"},{text:"本年",val:"year"}]},loading:!1,tableList:[],columns1:[{title:"ID",key:"id",width:80},{title:"分类",key:"cate_name",minWidth:120},{title:"标题",key:"title",minWidth:120},{title:"详情",key:"message",minWidth:320},{title:"排序",key:"sort",minWidth:60},{title:"添加时间",slot:"add_time",minWidth:120},{title:"操作",slot:"action",fixed:"right",minWidth:150}],columns4:[{type:"selection",width:60,align:"center"},{title:"ID",key:"uid",width:80},{title:"微信用户名称",key:"nickname",minWidth:160},{title:"客服头像",slot:"headimgurl",minWidth:60},{title:"用户类型",slot:"user_type",width:100},{title:"性别",slot:"sex",minWidth:60},{title:"地区",slot:"country",minWidth:120},{title:"是否关注公众号",slot:"subscribe",minWidth:120}],loading2:!1,total2:0,addFrom:{uids:[]},selections:[],rows:{},rowRecord:{},theme3:"light",labelSort:[],sortName:"",current:0}},created:function(){this.getUserLabelAll()},methods:{getUserLabelAll:function(t){var e=this;Object(s.vb)().then((function(i){i=i.data.data,i.unshift({name:"全部",id:""}),i.forEach((function(t){t.status=!1})),t||(e.sortName=i[0].id,e.tableFrom.cate_id=i[0].id,e.getList()),e.labelSort=i}))},addSort:function(){var t=this;this.$modalForm(Object(s.wb)()).then((function(){return t.getUserLabelAll()}))},labelEdit:function(t){var e=this;this.$modalForm(Object(s.xb)(t.id)).then((function(){return e.getUserLabelAll(1)}))},deleteSort:function(t,e,i){var n=this;e={title:e,num:i,url:"app/wechat/speechcraftcate/".concat(t.id),method:"DELETE",ids:""};this.$modalSure(e).then((function(t){n.$Message.success(t.msg),n.labelSort.splice(i,1),n.labelSort=[],n.getUserLabelAll()})).catch((function(t){n.$Message.error(t.msg)}))},showMenu:function(t){this.labelSort.forEach((function(e){e.id==t.id?e.status=!t.status:e.status=!1}))},bindMenuItem:function(t,e){this.tableFrom.page=1,this.current=e,this.labelSort.forEach((function(t){t.status=!1})),this.tableFrom.cate_id=t.id,this.getList()},cancel:function(){this.formValidate={page:1,limit:10,data:"",type:"",nickname:""}},handleReachBottom:function(){var t=this;return new Promise((function(e){t.formValidate.page=t.formValidate.page+1,setTimeout((function(){kefucreateApi(t.formValidate).then(function(){var e=Object(r.a)(c().mark((function e(i){var n,r;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0<(n=i.data).list.length)for(r=0;r<n.list.length;r++)t.tableList2.push(n.list[r]);t.total2=n.count,t.loading2=!1;case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.loading2=!1,t.$Message.error(e.msg)})),e()}),2e3)}))},look:function(t){this.isChat=!1,this.rowRecord=t,this.getChatlist()},getChatlist:function(){var t=this;this.loading5=!0,this.formValidate5.uid=this.rows.uid,this.formValidate5.to_uid=this.rowRecord.uid,this.formValidate5.id=this.rows.id,kefuChatlistApi(this.formValidate5).then(function(){var e=Object(r.a)(c().mark((function e(i){var n;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=i.data,t.tableList5=n.list,t.total5=n.count,t.loading5=!1;case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.loading5=!1,t.$Message.error(e.msg)}))},pageChange5:function(t){this.formValidate5.page=t,this.getChatlist()},submitFail:function(){this.getList()},record:function(t){this.rows=t,this.modals3=!0,this.isChat=!0,this.getListRecord()},getListRecord:function(){var t=this;this.loading3=!0,kefuRecordApi(this.formValidate3,this.rows.id).then(function(){var e=Object(r.a)(c().mark((function e(i){var n;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=i.data,t.tableList3=n.list||[],t.total3=n.count,t.loading3=!1;case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.loading3=!1,t.$Message.error(e.msg)}))},pageChange3:function(t){this.formValidate3.page=t,this.getListRecord()},edit:function(t){var e=this;this.$modalForm(Object(s.ub)(t.id)).then((function(){return e.getList()}))},add:function(){var t=this;this.$modalForm(Object(s.tb)()).then((function(){return t.getList()}))},onSelectTab:function(t){this.selections=t;var e=[];this.selections.map((function(t){e.push(t.uid)})),this.addFrom.uids=e},onchangeTime:function(t){this.timeVal=t,this.formValidate.data=this.timeVal.join("-"),this.formValidate.page=1,this.getListService()},selectChange:function(t){this.formValidate.data=t,this.timeVal=[],this.formValidate.page=1,this.getListService()},getListService:function(){var t=this;this.loading2=!0,kefucreateApi(this.formValidate).then(function(){var e=Object(r.a)(c().mark((function e(i){var n;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=i.data,t.tableList2=n.list,t.total2=n.count,t.tableList2.map((function(t){t._isChecked=!1})),t.loading2=!1;case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.loading2=!1,t.$Message.error(e.msg)}))},pageChange2:function(t){this.formValidate.page=t,this.getListService(),this.addFrom.uids=[]},userSearchs:function(){this.formValidate.page=1,this.getListService()},del:function(t,e,i){var n=this;e={title:e,num:i,url:"/app/wechat/speechcraft/".concat(t.id),method:"DELETE",ids:""};this.$modalSure(e).then((function(t){n.$Message.success(t.msg),n.tableList.splice(i,1)})).catch((function(t){n.$Message.error(t.msg)}))},getList:function(){var t=this;this.loading=!0,Object(s.ac)(this.tableFrom).then(function(){var e=Object(r.a)(c().mark((function e(i){var n;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=i.data,t.tableList=n.list,t.total=i.data.count,t.loading=!1;case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.loading=!1,t.$Message.error(e.msg)}))},pageChange:function(t){this.tableFrom.page=t,this.getList()},onchangeIsShow:function(t){var e=this;t={id:t.id,status:t.status};kefusetStatusApi(t).then(function(){var t=Object(r.a)(c().mark((function t(i){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.$Message.success(i.msg);case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){e.$Message.error(t.msg)}))},putRemark:function(){var t=this;if(0===this.addFrom.uids.length)return this.$Message.warning("请选择要添加的客服");kefuAddApi(this.addFrom).then(function(){var e=Object(r.a)(c().mark((function e(i){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.$Message.success(i.msg),t.modals=!1,t.getList();case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.loading=!1,t.$Message.error(e.msg)}))}}},i("2075"),o=i("2877"),i=Object(o.a)(a,(function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[i("Row",{staticClass:"ivu-mt box-wrapper"},[i("Col",t._b({staticClass:"left-wrapper"},"Col",t.grid1,!1),[i("Menu",{attrs:{theme:t.theme3,"active-name":t.sortName,width:"auto"}},[i("MenuGroup",t._l(t.labelSort,(function(e,n){return i("MenuItem",{key:n,staticClass:"menu-item",class:n===t.current?"showOn":"",attrs:{name:e.id},nativeOn:{click:function(i){return t.bindMenuItem(e,n)}}},[t._v("\n "+t._s(e.name)+"\n "),0!=e.id?i("div",{staticClass:"icon-box"},[i("Icon",{attrs:{type:"ios-more",size:"24"},on:{click:function(i){return i.stopPropagation(),t.showMenu(e)}}})],1):t._e(),0!=e.id?i("div",{directives:[{name:"show",rawName:"v-show",value:e.status,expression:"item.status"}],staticClass:"right-menu ivu-poptip-inner"},[i("div",{staticClass:"ivu-poptip-body",on:{click:function(i){return t.labelEdit(e)}}},[i("div",{staticClass:"ivu-poptip-body-content"},[i("div",{staticClass:"ivu-poptip-body-content-inner"},[t._v("编辑小组")])])]),i("div",{staticClass:"ivu-poptip-body",on:{click:function(i){return t.deleteSort(e,"删除分类",n)}}},[i("div",{staticClass:"ivu-poptip-body-content"},[i("div",{staticClass:"ivu-poptip-body-content-inner"},[t._v("删除小组")])])])]):t._e()])})),1)],1)],1),i("Col",t._b({ref:"rightBox"},"Col",t.grid2,!1),[i("Card",{attrs:{bordered:!1,"dis-hover":""}},[i("Row",{staticClass:"mb20",attrs:{type:"flex"}},[i("Col",{attrs:{span:"24"}},[i("Button",{directives:[{name:"auth",rawName:"v-auth",value:["setting-store_service-add"],expression:"['setting-store_service-add']"}],staticClass:"mr10",attrs:{type:"primary",icon:"md-add"},on:{click:t.add}},[t._v("添加话术")]),i("Button",{directives:[{name:"auth",rawName:"v-auth",value:["setting-store_service-add"],expression:"['setting-store_service-add']"}],staticStyle:{"margin-left":"10px"},attrs:{type:"success",icon:"md-add"},on:{click:t.addSort}},[t._v("添加分类")])],1)],1),i("Table",{attrs:{columns:t.columns1,data:t.tableList,loading:t.loading,"highlight-row":"","no-userFrom-text":"暂无数据","no-filtered-userFrom-text":"暂无筛选结果"},scopedSlots:t._u([{key:"avatar",fn:function(t){var e=t.row;return t.index,[i("div",{directives:[{name:"viewer",rawName:"v-viewer"}],staticClass:"tabBox_img"},[i("img",{directives:[{name:"lazy",rawName:"v-lazy",value:e.avatar,expression:"row.avatar"}]})])]}},{key:"add_time",fn:function(e){var n=e.row;return e.index,[i("span",[t._v(" "+t._s(n.add_time))])]}},{key:"action",fn:function(e){var n=e.row,r=e.index;return[i("a",{on:{click:function(e){return t.edit(n)}}},[t._v("编辑")]),i("Divider",{attrs:{type:"vertical"}}),i("a",{on:{click:function(e){return t.del(n,"删除客服",r)}}},[t._v("删除")])]}}])}),i("div",{staticClass:"acea-row row-right page"},[i("Page",{attrs:{total:t.total,"show-elevator":"","show-total":"","page-size":t.tableFrom.limit},on:{"on-change":t.pageChange}})],1)],1)],1)],1)],1)}),[],!1,null,"b6a28304",null),e.default=i.exports},e00b:function(t,e,i){}}]);
|