CRMEB/crmeb/public/admin/system_static/js/chunk-bac6fb9e.de7c7e14.js
2023-09-19 17:39:39 +08:00

1 line
18 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-bac6fb9e"],{"62f3":function(t,e,n){},7864: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("b0c0"),n("131a"),n("fb6a");var r=n("0122"),i=n("c964"),a=n("f3f3"),o=(n("d3b7"),n("159b"),n("c740"),n("a434"),n("d81d"),n("a15b"),n("2f62")),s=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,i=Object.defineProperty||function(t,e,n){t[e]=n.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",l=a.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 a,o,s,c;e=e&&e.prototype instanceof m?e:m,e=Object.create(e.prototype),r=new x(r||[]);return i(e,"_invoke",{value:(a=t,o=n,s=r,c="suspendedStart",function(t,e){if("executing"===c)throw new Error("Generator is already running");if("completed"===c){if("throw"===t)throw e;return S()}for(s.method=t,s.arg=e;;){var n=s.delegate;if(n&&(n=function t(e,n){var r=n.method,i=e.iterator[r];return void 0===i?(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")),f):(r=h(i,e.iterator,n.arg),"throw"===r.type?(n.method="throw",n.arg=r.arg,n.delegate=null,f):(i=r.arg,i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,f):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,f)))}(n,s),n)){if(n===f)continue;return n}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",n=h(a,o,s),"normal"===n.type){if(c=s.done?"completed":"suspendedYield",n.arg===f)continue;return{value:n.arg,done:s.done}}"throw"===n.type&&(c="completed",s.method="throw",s.arg=n.arg)}})}),e}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=d;var f={};function m(){}function p(){}function g(){}a={};var v=(u(a,o,(function(){return this})),Object.getPrototypeOf),b=(v=v&&v(v(k([]))),v&&v!==e&&n.call(v,o)&&(a=v),g.prototype=m.prototype=Object.create(a));function w(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function y(t,e){var a;i(this,"_invoke",{value:function(i,o){function s(){return new e((function(a,s){!function i(a,o,s,c){var l;a=h(t[a],t,o);if("throw"!==a.type)return(o=(l=a.arg).value)&&"object"==Object(r.a)(o)&&n.call(o,"__await")?e.resolve(o.__await).then((function(t){i("next",t,s,c)}),(function(t){i("throw",t,s,c)})):e.resolve(o).then((function(t){l.value=t,s(l)}),(function(t){return i("throw",t,s,c)}));c(a.arg)}(i,o,a,s)}))}return a=a?a.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 L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(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:S}}function S(){return{value:void 0,done:!0}}return i(b,"constructor",{value:p.prototype=g,configurable:!0}),i(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(b),t},t.awrap=function(t){return{__await:t}},w(y.prototype),u(y.prototype,s,(function(){return this})),t.AsyncIterator=y,t.async=function(e,n,r,i,a){void 0===a&&(a=Promise);var o=new y(d(e,n,r,i),a);return t.isGeneratorFunction(n)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},w(b),u(b,l,"Generator"),u(b,o,(function(){return this})),u(b,"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,x.prototype={constructor:x,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)&&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 i=this.tryEntries.length-1;0<=i;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;0<=r;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;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 n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),L(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n,r,i=this.tryEntries[e];if(i.tryLoc===t)return"throw"===(n=i.completion).type&&(r=n.arg,L(i)),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),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:"80px"},labelPosition:function(){return this.isMobile?"top":"right"}}),data:function(){return{treeId:"",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:[],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(n){n=n.data.data,n.unshift({name:"全部",id:""}),n.forEach((function(t){t.status=!1})),t||(e.sortName=n[0].id,e.tableFrom.cate_id=n[0].id,e.getList()),e.labelSort=n}))},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){var n=this,r=this.labelSort.findIndex((function(e){return e.id==t.id}));e={title:e,num:r,url:"app/wechat/speechcraftcate/".concat(t.id),method:"DELETE",ids:""};this.$modalSure(e).then((function(t){n.$message.success(t.msg),n.labelSort.splice(r,1),n.labelSort=[],n.getUserLabelAll()})).catch((function(t){n.$message.error(t.msg)}))},clickMenu:function(t,e){1==e?this.labelEdit(t):2==e&&this.deleteSort(t,"删除分类")},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:15,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(i.a)(c().mark((function e(n){var r,i;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0<(r=n.data).list.length)for(i=0;i<r.list.length;i++)t.tableList2.push(r.list[i]);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,kefuChatlistApi(this.formValidate5).then(function(){var e=Object(i.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)}))},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(i.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)}))},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?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(i.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){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,n){var r=this;e={title:e,num:n,url:"/app/wechat/speechcraft/".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(s.ac)(this.tableFrom).then(function(){var e=Object(i.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};kefusetStatusApi(t).then(function(){var t=Object(i.a)(c().mark((function t(n){return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.$message.success(n.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(i.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("bb79"),o=n("2877"),o=Object(o.a)(a,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[r("el-row",{staticClass:"ivu-mt box-wrapper"},[r("el-col",t._b({staticClass:"left-wrapper"},"el-col",t.grid1,!1),[r("div",{staticClass:"tree_tit",on:{click:t.addSort}},[r("i",{staticClass:"el-icon-circle-plus"}),t._v("\n 添加分类\n ")]),r("div",{staticClass:"tree"},[r("el-tree",{attrs:{data:t.labelSort,"node-key":"id","default-expand-all":"","highlight-current":"","expand-on-click-node":!1,"current-node-key":t.treeId},on:{"node-click":t.bindMenuItem},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.data;return r("span",{staticClass:"custom-tree-node"},[r("span",{staticClass:"file-name"},[i.pid?t._e():r("img",{staticClass:"icon",attrs:{src:n("c583")}}),t._v("\n "+t._s(i.name))]),r("span",{directives:[{name:"show",rawName:"v-show",value:""!==i.id&&0!==i.id,expression:"data.id !== '' && data.id !== 0"}]},[r("el-dropdown",{on:{command:function(e){return t.clickMenu(i,e)}}},[r("i",{staticClass:"el-icon-more el-icon--right"}),r("template",{slot:"dropdown"},[r("el-dropdown-menu",[r("el-dropdown-item",{attrs:{command:"1"}},[t._v("编辑分类")]),i.id?r("el-dropdown-item",{attrs:{command:"2"}},[t._v("删除分类")]):t._e()],1)],1)],2)],1)])}}])})],1)]),r("el-col",t._b({ref:"rightBox"},"el-col",t.grid2,!1),[r("el-card",{attrs:{bordered:!1,shadow:"never"}},[r("el-row",{staticClass:"mb14"},[r("el-col",{attrs:{span:24}},[r("el-button",{directives:[{name:"auth",rawName:"v-auth",value:["setting-store_service-add"],expression:"['setting-store_service-add']"}],attrs:{type:"primary"},on:{click:t.add}},[t._v("添加话术")])],1)],1),r("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":"暂无筛选结果"}},[r("el-table-column",{attrs:{label:"ID",width:"80"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("span",[t._v(t._s(e.row.id))])]}}])}),r("el-table-column",{attrs:{label:"分类","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("span",[t._v(t._s(e.row.cate_name))])]}}])}),r("el-table-column",{attrs:{label:"标题","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("el-tooltip",{attrs:{placement:"top","open-delay":600}},[r("div",{attrs:{slot:"content"},slot:"content"},[t._v(t._s(e.row.title))]),r("span",{staticClass:"line2"},[t._v(t._s(e.row.title))])])]}}])}),r("el-table-column",{attrs:{label:"详情","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("el-tooltip",{attrs:{placement:"top","open-delay":600}},[r("div",{attrs:{slot:"content"},slot:"content"},[t._v(t._s(e.row.message))]),r("span",{staticClass:"line2"},[t._v(t._s(e.row.message))])])]}}])}),r("el-table-column",{attrs:{label:"排序","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("span",[t._v(t._s(e.row.sort))])]}}])}),r("el-table-column",{attrs:{label:"添加时间","min-width":"150"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("span",[t._v(t._s(e.row.add_time))])]}}])}),r("el-table-column",{attrs:{label:"操作",fixed:"right",width:"170"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("a",{on:{click:function(n){return t.edit(e.row)}}},[t._v("编辑")]),r("el-divider",{attrs:{direction:"vertical"}}),r("a",{on:{click:function(n){return t.del(e.row,"删除客服",e.$index)}}},[t._v("删除")])]}}])})],1),r("div",{staticClass:"acea-row row-right page"},[t.total?r("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)],1)],1)],1)}),[],!1,null,"2f9ea0dd",null),e.default=o.exports},bb79:function(t,e,n){"use strict";var r=n("62f3");n.n(r).a}}]);