chunk-34720fc9.99593ce6.js 12 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-34720fc9"],{"0914":function(t,e,a){a("3f91")},"3f91":function(t,e,a){},7864:function(t,e,a){a.r(e),a("4e82"),a("b0c0");var i=a("c14f"),n=a("1da1"),s=a("5530"),o=(a("c740"),a("a15b"),a("d81d"),a("14d9"),a("a434"),a("e9f5"),a("7d54"),a("ab43"),a("d3b7"),a("159b"),a("2f62")),r=a("90e7");s={name:"index",filters:{typeFilter:function(t){return{wechat:"微信用户",routine:"小程序用户"}[t]}},computed:Object(s.a)(Object(s.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(r.Hb)().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(r.Ib)()).then((function(){return t.getUserLabelAll()}))},labelEdit:function(t){var e=this;this.$modalForm(Object(r.Jb)(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((()=>{var e=Object(n.a)(Object(i.a)().m((function e(a){var n,s;return Object(i.a)().w((function(e){for(;;)switch(e.n){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 1:return e.a(2)}}),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((()=>{var e=Object(n.a)(Object(i.a)().m((function e(a){var n;return Object(i.a)().w((function(e){for(;;)switch(e.n){case 0:n=a.data,t.tableList5=n.list,t.total5=n.count,t.loading5=!1;case 1:return e.a(2)}}),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((()=>{var e=Object(n.a)(Object(i.a)().m((function e(a){var n;return Object(i.a)().w((function(e){for(;;)switch(e.n){case 0:n=a.data,t.tableList3=n.list||[],t.total3=n.count,t.loading3=!1;case 1:return e.a(2)}}),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(r.Gb)(t.id)).then((function(){return e.getList()}))},add:function(){var t=this;this.$modalForm(Object(r.Fb)()).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((()=>{var e=Object(n.a)(Object(i.a)().m((function e(a){var n;return Object(i.a)().w((function(e){for(;;)switch(e.n){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 1:return e.a(2)}}),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(r.mc)(this.tableFrom).then((()=>{var e=Object(n.a)(Object(i.a)().m((function e(a){var n;return Object(i.a)().w((function(e){for(;;)switch(e.n){case 0:n=a.data,t.tableList=n.list,t.total=a.data.count,t.loading=!1;case 1:return e.a(2)}}),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((()=>{var t=Object(n.a)(Object(i.a)().m((function t(a){return Object(i.a)().w((function(t){for(;;)switch(t.n){case 0:e.$message.success(a.msg);case 1:return t.a(2)}}),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((()=>{var e=Object(n.a)(Object(i.a)().m((function e(a){return Object(i.a)().w((function(e){for(;;)switch(e.n){case 0:t.$message.success(a.msg),t.modals=!1,t.getList();case 1:return e.a(2)}}),e)})));return function(t){return e.apply(this,arguments)}})()).catch((function(e){t.loading=!1,t.$message.error(e.msg)}))}}},a("0914"),o=a("2877"),o=Object(o.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",{directives:[{name:"db-click",rawName:"v-db-click"}],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("div",{staticClass:"file-name"},[n.pid?t._e():e("img",{staticClass:"icon",attrs:{src:a("c583")}}),e("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:n.name,placement:"top"}},[e("div",{staticClass:"text line1"},[t._v("\n "+t._s(n.name)+"\n ")])])],1),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']"},{name:"db-click",rawName:"v-db-click"}],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",{directives:[{name:"db-click",rawName:"v-db-click"}],on:{click:function(e){return t.edit(a.row)}}},[t._v("编辑")]),e("el-divider",{attrs:{direction:"vertical"}}),e("a",{directives:[{name:"db-click",rawName:"v-db-click"}],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,"6f491911",null);e.default=o.exports}}]);