chunk-203ac582.3b209d6a.js 12 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-203ac582"],{"34a5":function(t,e,a){},"4e82":function(t,e,a){"use strict";var i=a("23e7"),n=a("e330"),s=a("59ed"),r=a("7b0b"),o=a("07fa"),c=a("083a"),l=a("577e"),u=a("d039"),d=a("addb"),f=a("a640"),h=a("04d1"),m=a("d998"),p=a("2d00"),g=a("512ce"),b=[],v=n(b.sort),w=n(b.push),_=(a=u((function(){b.sort(void 0)})),n=u((function(){b.sort(null)})),f=f("sort"),!u((function(){if(p)return p<70;if(!(h&&3<h)){if(m)return!0;if(g)return g<603;for(var t,e,a,i="",n=65;n<76;n++){switch(t=String.fromCharCode(n),n){case 66:case 69:case 70:case 72:e=3;break;case 68:case 71:e=4;break;default:e=2}for(a=0;a<47;a++)b.push({k:t+a,v:e})}for(b.sort((function(t,e){return e.v-t.v})),a=0;a<b.length;a++)t=b[a].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}})));i({target:"Array",proto:!0,forced:a||!n||!f||!_},{sort:function(t){void 0!==t&&s(t);var e=r(this);if(_)return void 0===t?v(e):v(e,t);for(var a,i,n=[],u=o(e),f=0;f<u;f++)f in e&&w(n,e[f]);for(d(n,(i=t,function(t,e){return void 0===e?-1:void 0===t?1:void 0!==i?+i(t,e)||0:l(t)>l(e)?1:-1})),a=o(n),f=0;f<a;)e[f]=n[f++];for(;f<u;)c(e,f++);return e}})},7864:function(t,e,a){"use strict";a.r(e),a("b0c0"),a("4e82");var i=a("c7eb"),n=a("1da1"),s=a("5530"),r=(a("d3b7"),a("159b"),a("c740"),a("a434"),a("14d9"),a("d81d"),a("a15b"),a("2f62")),o=a("90e7");s={name:"index",filters:{typeFilter:function(t){return{wechat:"微信用户",routine:"小程序用户"}[t]}},computed:Object(s.a)(Object(s.a)({},Object(r.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(o.vb)().then((function(a){a=a.data.data,a.unshift({name:"全部",id:""}),a.forEach((function(t){t.status=!1})),t||(e.sortName=a[0].id,e.tableFrom.cate_id=a[0].id,e.getList()),e.labelSort=a}))},addSort:function(){var t=this;this.$modalForm(Object(o.wb)()).then((function(){return t.getUserLabelAll()}))},labelEdit:function(t){var e=this;this.$modalForm(Object(o.xb)(t.id)).then((function(){return e.getUserLabelAll(1)}))},deleteSort:function(t,e){var a=this,i=this.labelSort.findIndex((function(e){return e.id==t.id}));e={title:e,num:i,url:"app/wechat/speechcraftcate/".concat(t.id),method:"DELETE",ids:""};this.$modalSure(e).then((function(t){a.$message.success(t.msg),a.labelSort.splice(i,1),a.labelSort=[],a.getUserLabelAll()})).catch((function(t){a.$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(n.a)(Object(i.a)().mark((function e(a){var n,s;return Object(i.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0<(n=a.data).list.length)for(s=0;s<n.list.length;s++)t.tableList2.push(n.list[s]);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(n.a)(Object(i.a)().mark((function e(a){var n;return Object(i.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=a.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(n.a)(Object(i.a)().mark((function e(a){var n;return Object(i.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=a.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(o.ub)(t.id)).then((function(){return e.getList()}))},add:function(){var t=this;this.$modalForm(Object(o.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(n.a)(Object(i.a)().mark((function e(a){var n;return Object(i.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=a.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,a){var i=this;e={title:e,num:a,url:"/app/wechat/speechcraft/".concat(t.id),method:"DELETE",ids:""};this.$modalSure(e).then((function(t){i.$message.success(t.msg),i.tableList.splice(a,1)})).catch((function(t){i.$message.error(t.msg)}))},getList:function(){var t=this;this.loading=!0,Object(o.ac)(this.tableFrom).then(function(){var e=Object(n.a)(Object(i.a)().mark((function e(a){var n;return Object(i.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=a.data,t.tableList=n.list,t.total=a.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(n.a)(Object(i.a)().mark((function t(a){return Object(i.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.$message.success(a.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(n.a)(Object(i.a)().mark((function e(a){return Object(i.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.$message.success(a.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)}))}}},a("bf51"),r=a("2877"),r=Object(r.a)(s,(function(){var t=this,e=t._self._c;return e("div",[e("el-row",{staticClass:"ivu-mt box-wrapper"},[e("el-col",t._b({staticClass:"left-wrapper"},"el-col",t.grid1,!1),[e("div",{staticClass:"tree_tit",on:{click:t.addSort}},[e("i",{staticClass:"el-icon-circle-plus"}),t._v("\n 添加分类\n ")]),e("div",{staticClass:"tree"},[e("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(i){var n=i.data;return e("span",{staticClass:"custom-tree-node"},[e("span",{staticClass:"file-name"},[n.pid?t._e():e("img",{staticClass:"icon",attrs:{src:a("c583")}}),t._v("\n "+t._s(n.name))]),e("span",{directives:[{name:"show",rawName:"v-show",value:""!==n.id&&0!==n.id,expression:"data.id !== '' && data.id !== 0"}]},[e("el-dropdown",{on:{command:function(e){return t.clickMenu(n,e)}}},[e("i",{staticClass:"el-icon-more el-icon--right"}),e("template",{slot:"dropdown"},[e("el-dropdown-menu",[e("el-dropdown-item",{attrs:{command:"1"}},[t._v("编辑分类")]),n.id?e("el-dropdown-item",{attrs:{command:"2"}},[t._v("删除分类")]):t._e()],1)],1)],2)],1)])}}])})],1)]),e("el-col",t._b({ref:"rightBox"},"el-col",t.grid2,!1),[e("el-card",{attrs:{bordered:!1,shadow:"never"}},[e("el-row",{staticClass:"mb14"},[e("el-col",{attrs:{span:24}},[e("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),e("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":"暂无筛选结果"}},[e("el-table-column",{attrs:{label:"ID",width:"80"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",[t._v(t._s(a.row.id))])]}}])}),e("el-table-column",{attrs:{label:"分类","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",[t._v(t._s(a.row.cate_name))])]}}])}),e("el-table-column",{attrs:{label:"标题","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-tooltip",{attrs:{placement:"top","open-delay":600}},[e("div",{attrs:{slot:"content"},slot:"content"},[t._v(t._s(a.row.title))]),e("span",{staticClass:"line2"},[t._v(t._s(a.row.title))])])]}}])}),e("el-table-column",{attrs:{label:"详情","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-tooltip",{attrs:{placement:"top","open-delay":600}},[e("div",{attrs:{slot:"content"},slot:"content"},[t._v(t._s(a.row.message))]),e("span",{staticClass:"line2"},[t._v(t._s(a.row.message))])])]}}])}),e("el-table-column",{attrs:{label:"排序","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",[t._v(t._s(a.row.sort))])]}}])}),e("el-table-column",{attrs:{label:"添加时间","min-width":"150"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("span",[t._v(t._s(a.row.add_time))])]}}])}),e("el-table-column",{attrs:{label:"操作",fixed:"right",width:"170"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("a",{on:{click:function(e){return t.edit(a.row)}}},[t._v("编辑")]),e("el-divider",{attrs:{direction:"vertical"}}),e("a",{on:{click:function(e){return t.del(a.row,"删除客服",a.$index)}}},[t._v("删除")])]}}])})],1),e("div",{staticClass:"acea-row row-right page"},[t.total?e("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,"3d22723e",null);e.default=r.exports},bf51:function(t,e,a){"use strict";a("34a5")}}]);