CRMEB/crmeb/public/admin/system_static/js/chunk-3dd0d8ea.6665deac.js
2023-09-19 17:39:39 +08:00

1 line
19 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-3dd0d8ea"],{"0fe3":function(t,e,n){"use strict";var r=n("33c0");n.n(r).a},"33c0":function(t,e,n){},b90a:function(t,e,n){"use strict";n.r(e),n("a4d3"),n("e01a"),n("d28b"),n("3ca3"),n("ddb0"),n("b636"),n("944a"),n("0c47"),n("23dc"),n("3410"),n("d9e2"),n("159b"),n("b0c0"),n("131a"),n("fb6a");var r=n("0122"),a=n("c964"),i=n("f3f3"),o=(n("d3b7"),n("d81d"),n("a15b"),n("a434"),n("2f62")),s=n("c276"),l=n("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,n=e.hasOwnProperty,a=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(e){u=function(t,e,n){return t[e]=n}}function d(t,e,n,r){var i,o,s,l;e=e&&e.prototype instanceof m?e:m,e=Object.create(e.prototype),r=new L(r||[]);return a(e,"_invoke",{value:(i=t,o=n,s=r,l="suspendedStart",function(t,e){if("executing"===l)throw new Error("Generator is already running");if("completed"===l){if("throw"===t)throw e;return j()}for(s.method=t,s.arg=e;;){var n=s.delegate;if(n&&(n=function t(e,n){var r=n.method,a=e.iterator[r];return void 0===a?(n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h):(r=f(a,e.iterator,n.arg),"throw"===r.type?(n.method="throw",n.arg=r.arg,n.delegate=null,h):(a=r.arg,a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,h):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)))}(n,s),n)){if(n===h)continue;return n}if("next"===s.method)s.sent=s._sent=s.arg;else if("throw"===s.method){if("suspendedStart"===l)throw l="completed",s.arg;s.dispatchException(s.arg)}else"return"===s.method&&s.abrupt("return",s.arg);if(l="executing",n=f(i,o,s),"normal"===n.type){if(l=s.done?"completed":"suspendedYield",n.arg===h)continue;return{value:n.arg,done:s.done}}"throw"===n.type&&(l="completed",s.method="throw",s.arg=n.arg)}})}),e}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=d;var h={};function m(){}function p(){}function g(){}i={};var v=(u(i,o,(function(){return this})),Object.getPrototypeOf),w=(v=v&&v(v(k([]))),v&&v!==e&&n.call(v,o)&&(i=v),g.prototype=m.prototype=Object.create(i));function b(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function y(t,e){var i;a(this,"_invoke",{value:function(a,o){function s(){return new e((function(i,s){!function a(i,o,s,l){var c;i=f(t[i],t,o);if("throw"!==i.type)return(o=(c=i.arg).value)&&"object"==Object(r.a)(o)&&n.call(o,"__await")?e.resolve(o.__await).then((function(t){a("next",t,s,l)}),(function(t){a("throw",t,s,l)})):e.resolve(o).then((function(t){c.value=t,s(c)}),(function(t){return a("throw",t,s,l)}));l(i.arg)}(a,o,i,s)}))}return i=i?i.then(s,s):s()}})}function _(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 x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function k(t){if(t){var e,r=t[o];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length))return e=-1,(r=function r(){for(;++e<t.length;)if(n.call(t,e))return r.value=t[e],r.done=!1,r;return r.value=void 0,r.done=!0,r}).next=r}return{next:j}}function j(){return{value:void 0,done:!0}}return a(w,"constructor",{value:p.prototype=g,configurable:!0}),a(g,"constructor",{value:p,configurable:!0}),p.displayName=u(g,l,"GeneratorFunction"),t.isGeneratorFunction=function(t){return t="function"==typeof t&&t.constructor,!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,u(t,l,"GeneratorFunction")),t.prototype=Object.create(w),t},t.awrap=function(t){return{__await:t}},b(y.prototype),u(y.prototype,s,(function(){return this})),t.AsyncIterator=y,t.async=function(e,n,r,a,i){void 0===i&&(i=Promise);var o=new y(d(e,n,r,a),i);return t.isGeneratorFunction(n)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},b(w),u(w,l,"Generator"),u(w,o,(function(){return this})),u(w,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e,n=Object(t),r=[];for(e in n)r.push(e);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},t.values=k,L.prototype={constructor:L,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(x),!t)for(var e in this)"t"===e.charAt(0)&&n.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 r(n,r){return o.type="throw",o.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var a=this.tryEntries.length-1;0<=a;--a){var i=this.tryEntries[a],o=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(s&&l){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;0<=r;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var i=a;break}}var o=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):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),h},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),h}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n,r,a=this.tryEntries[e];if(a.tryLoc===t)return"throw"===(n=a.completion).type&&(r=n.arg,x(a)),r}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:k(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},t}i={name:"index",filters:{typeFilter:function(t){return{wechat:"微信用户",routine:"小程序用户"}[t]}},computed:Object(i.a)(Object(i.a)(Object(i.a)({},Object(o.d)("media",["isMobile"])),Object(o.d)("userLevel",["categoryId"])),{},{labelWidth:function(){return this.isMobile?void 0:"80px"},labelPosition:function(){return this.isMobile?"top":"right"}}),data:function(){return{isChat:!0,formValidate3:{page:1,limit:15},total3:0,loading3:!1,modals3:!1,tableList3:[],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},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:[],loading2:!1,total2:0,addFrom:{uids:[]},selections:[],rows:{},rowRecord:{}}},created:function(){this.getList()},methods:{goChat:function(t){var e=this;Object(l.D)(t.id).then((function(t){var n,r="";t.data.token&&(n=e.getExpiresTime(t.data.exp_time),Object(s.o)("kefu_token",t.data.token,n),Object(s.o)("kefu_uuid",t.data.kefuInfo.uid,n),Object(s.o)("kefu_expires_time",t.data.exp_time,n),Object(s.o)("kefuInfo",t.data.kefuInfo,n),r=e.$store.state.media.isMobile?window.location.protocol+"//"+window.location.host+"/kefu/mobile_list":window.location.protocol+"//"+window.location.host+"/kefu/pc_list",window.open(r,"_blank"))})).catch((function(t){e.$message.error(t.msg)}))},getExpiresTime:function(t){var e=Math.round(new Date/1e3);return parseFloat(parseFloat(parseFloat((t-e)/60)/60)/24)},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(){Object(l.G)(t.formValidate).then(function(){var e=Object(a.a)(c().mark((function e(n){var r,a;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0<(r=n.data).list.length)for(a=0;a<r.list.length;a++)t.tableList2.push(r.list[a]);t.total2=r.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,Object(l.y)(this.formValidate5).then(function(){var e=Object(a.a)(c().mark((function e(n){var r;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=n.data,t.tableList5=r.list,t.total5=r.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)}))},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,Object(l.E)(this.formValidate3,this.rows.id).then(function(){var e=Object(a.a)(c().mark((function e(n){var r;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=n.data,t.tableList3=r.list||[],t.total3=r.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)}))},edit:function(t){var e=this;this.$modalForm(Object(l.z)(t.id)).then((function(){return e.getList()}))},add:function(){var t=this;this.$modalForm(Object(l.F)()).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?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)(this.formValidate).then(function(){var e=Object(a.a)(c().mark((function e(n){var r;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=n.data,t.tableList2=r.list,t.total2=r.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){tkefucreateApihis.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,n){var r=this;e={title:e,num:n,url:"app/wechat/kefu/".concat(t.id),method:"DELETE",ids:""};this.$modalSure(e).then((function(t){r.$message.success(t.msg),r.tableList.splice(n,1)})).catch((function(t){r.$message.error(t.msg)}))},getList:function(){var t=this;this.loading=!0,Object(l.C)(this.tableFrom).then(function(){var e=Object(a.a)(c().mark((function e(n){var r;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=n.data,t.tableList=r.list,t.total=n.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)}))},onchangeIsShow:function(t){var e=this;t={id:t.id,status:t.status};Object(l.H)(t).then(function(){var t=Object(a.a)(c().mark((function t(n){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.$message.success(n.msg),e.getList();case 2: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("请选择要添加的客服");Object(l.x)(this.addFrom).then(function(){var e=Object(a.a)(c().mark((function e(n){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.$message.success(n.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)}))}}},n("0fe3"),o=n("2877"),n=Object(o.a)(i,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("el-card",{staticClass:"ivu-mt",attrs:{bordered:!1,shadow:"never"}},[n("el-row",{staticClass:"mb20"},[n("el-col",{attrs:{span:24}},[n("el-button",{directives:[{name:"auth",rawName:"v-auth",value:["setting-store_service-add"],expression:"['setting-store_service-add']"}],staticClass:"mr10",attrs:{type:"primary"},on:{click:t.add}},[t._v("添加客服")])],1)],1),n("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],attrs:{data:t.tableList,"highlight-current-row":"","no-userFrom-text":"暂无数据","no-filtered-userFrom-text":"暂无筛选结果"}},[n("el-table-column",{attrs:{label:"ID",width:"80"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("span",[t._v(t._s(e.row.id))])]}}])}),n("el-table-column",{attrs:{label:"客服头像","min-width":"90"},scopedSlots:t._u([{key:"default",fn:function(t){return[n("div",{directives:[{name:"viewer",rawName:"v-viewer"}],staticClass:"tabBox_img"},[n("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.row.avatar,expression:"scope.row.avatar"}]})])]}}])}),n("el-table-column",{attrs:{label:"客服名称","min-width":"130"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("span",[t._v(t._s(e.row.wx_name))])]}}])}),n("el-table-column",{attrs:{label:"客服状态","min-width":"130"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-switch",{staticClass:"defineSwitch",attrs:{"active-value":1,"inactive-value":0,value:e.row.status,size:"large","active-text":"开启","inactive-text":"关闭"},on:{change:function(n){return t.onchangeIsShow(e.row)}},model:{value:e.row.status,callback:function(n){t.$set(e.row,"status",n)},expression:"scope.row.status"}})]}}])}),n("el-table-column",{attrs:{label:"添加时间","min-width":"130"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("span",[t._v(t._s(e.row.add_time))])]}}])}),n("el-table-column",{attrs:{label:"操作",fixed:"right",width:"170"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("a",{on:{click:function(n){return t.edit(e.row)}}},[t._v("编辑")]),n("el-divider",{attrs:{direction:"vertical"}}),n("a",{on:{click:function(n){return t.del(e.row,"删除客服",e.$index)}}},[t._v("删除")]),e.row.status?n("el-divider",{attrs:{direction:"vertical"}}):t._e(),e.row.status?n("a",{on:{click:function(n){return t.goChat(e.row)}}},[t._v("进入工作台")]):t._e()]}}])})],1),n("div",{staticClass:"acea-row row-right page"},[t.total?n("pagination",{attrs:{total:t.total,page:t.tableFrom.page,limit:t.tableFrom.limit},on:{"update:page":function(e){return t.$set(t.tableFrom,"page",e)},"update:limit":function(e){return t.$set(t.tableFrom,"limit",e)},pagination:t.getList}}):t._e()],1)],1),n("el-dialog",{attrs:{visible:t.modals3,title:"聊天记录",width:"720px"},on:{"update:visible":function(e){t.modals3=e}}},[t.isChat?n("div",{staticClass:"modelBox"},[n("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading3,expression:"loading3"}],attrs:{"highlight-current-row":"","no-userFrom-text":"暂无数据","no-filtered-userFrom-text":"暂无筛选结果",data:t.tableList3}},[n("el-table-column",{attrs:{label:"用户名称",width:"200"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("span",[t._v(t._s(e.row.nickname))])]}}],null,!1,611505262)}),n("el-table-column",{attrs:{label:"客服头像","min-width":"90"},scopedSlots:t._u([{key:"default",fn:function(t){return[n("div",{directives:[{name:"viewer",rawName:"v-viewer"}],staticClass:"tabBox_img"},[n("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.row.headimgurl,expression:"scope.row.headimgurl"}]})])]}}],null,!1,3422487116)}),n("el-table-column",{attrs:{label:"操作",fixed:"right",width:"170"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("a",{on:{click:function(n){return t.look(e.row)}}},[t._v("查看对话")])]}}],null,!1,1528424256)})],1),n("div",{staticClass:"acea-row row-right page"},[t.total3?n("pagination",{attrs:{total:t.total3,page:t.formValidate3.page,limit:t.formValidate3.limit},on:{"update:page":function(e){return t.$set(t.formValidate3,"page",e)},"update:limit":function(e){return t.$set(t.formValidate3,"limit",e)},pagination:t.getListRecord}}):t._e()],1)],1):t._e(),t.isChat?t._e():n("div",[n("el-button",{attrs:{type:"primary"},on:{click:function(e){t.isChat=!0}}},[t._v("返回聊天记录")]),n("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading5,expression:"loading5"}],staticClass:"mt14",attrs:{"highlight-current-row":"","no-userFrom-text":"暂无数据","no-filtered-userFrom-text":"暂无筛选结果",data:t.tableList5}},[n("el-table-column",{attrs:{label:"用户名称","min-width":"200"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("span",[t._v(t._s(e.row.nickname))])]}}],null,!1,611505262)}),n("el-table-column",{attrs:{label:"用户头像","min-width":"90"},scopedSlots:t._u([{key:"default",fn:function(t){return[n("div",{directives:[{name:"viewer",rawName:"v-viewer"}],staticClass:"tabBox_img"},[n("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.row.avatar,expression:"scope.row.avatar"}]})])]}}],null,!1,3475710540)}),n("el-table-column",{attrs:{label:"发送消息","min-width":"200"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("span",[t._v(t._s(e.row.msn))])]}}],null,!1,2342793974)}),n("el-table-column",{attrs:{label:"发送时间","min-width":"200"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("span",[t._v(t._s(e.row.add_time))])]}}],null,!1,1404972237)})],1),n("div",{staticClass:"acea-row row-right page"},[t.total5?n("pagination",{attrs:{total:t.total5,page:t.formValidate5.page,limit:t.formValidate5.limit},on:{"update:page":function(e){return t.$set(t.formValidate5,"page",e)},"update:limit":function(e){return t.$set(t.formValidate5,"limit",e)},pagination:t.getChatlist}}):t._e()],1)],1)])],1)}),[],!1,null,"58df5033",null),e.default=n.exports}}]);