chunk-2d0ab2e7.799aafe6.js 13 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0ab2e7"],{"13d3":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"m-container"},[e._m(0),e._v(" "),a("div",{staticClass:"m-core"},[a("tab-router",{attrs:{type:"card"},on:{"tab-click":e.handleClick},model:{value:e.activeIndex,callback:function(t){e.activeIndex="string"===typeof t?t.trim():t},expression:"activeIndex"}},[a("el-tab-pane",{attrs:{label:"群聊管理",lazy:"",name:"1"}},["1"===e.activeIndex&&e.permission("/chatList")?a("chatList"):e._e()],1),e._v(" "),a("el-tab-pane",{attrs:{label:"群聊消息",lazy:"",name:"2"}},["2"===e.activeIndex&&e.permission("/timingMsgList")?a("timingMsgList"):e._e()],1)],1)],1)])},s=[function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("h2",[a("div",{staticClass:"squrt"}),e._v("\n 群聊管理\n ")])}],r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"m-container"},[a("save-form",{ref:"searchForm",attrs:{inline:!0,model:e.searchForm},on:{submit:e.search,reset:e.onReSet}},[a("el-form-item",[a("el-input",{attrs:{clearable:"",placeholder:"群聊名称"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:function(t){t.target.blur(),e.$refs.searchForm.save(),e.search()}(t)}},model:{value:e.searchForm.search,callback:function(t){e.$set(e.searchForm,"search","string"===typeof t?t.trim():t)},expression:"searchForm.search"}})],1),e._v(" "),a("el-form-item",{attrs:{prop:"groupType"}},[a("el-select",{attrs:{clearable:"",filterable:"",placeholder:"群聊类型"},model:{value:e.searchForm.groupType,callback:function(t){e.$set(e.searchForm,"groupType","string"===typeof t?t.trim():t)},expression:"searchForm.groupType"}},e._l(e.catgGoupTypeList,(function(e,t){return a("el-option",{key:t,attrs:{value:e.value,label:e.label}})})),1)],1),e._v(" "),a("el-form-item",[a("el-button",{attrs:{"native-type":"submit",type:"primary"}},[e._v("搜索")]),e._v(" "),a("el-button",{attrs:{"native-type":"reset",type:"danger"}},[e._v("重置")])],1)],1),e._v(" "),a("div",{staticClass:"btnWraps"},[a("auth",{attrs:{auths:"imSendGroupMessage/send"}},[a("el-button",{staticStyle:{"margin-bottom":"20px"},attrs:{type:"primary"},on:{click:e.postMsg}},[e._v("\n 消息群发\n ")])],1),e._v(" "),a("auth",{attrs:{auths:"imGroup/createGroup"}},[a("el-button",{staticStyle:{"margin-bottom":"20px"},attrs:{type:"primary"},on:{click:e.addChat}},[e._v("\n 创建群聊\n ")])],1)],1),e._v(" "),a("div",{staticClass:"tableWrap"},[a("el-table",{ref:"multipleSelection",staticStyle:{width:"100%"},attrs:{"header-cell-style":{background:"#EDEEF0",color:"#444"},data:e.tableList},on:{"selection-change":e.handleSelectionChange,select:e.onTableSelect}},[a("el-table-column",{attrs:{type:"selection",width:"55"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"id",label:"群聊"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"name",label:"群聊名称"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"memo",label:"群备注"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"groupType",label:"群聊类型"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[e._v("\n "+e._s(e._f("catgGoupType")(t.row.groupType))+"\n ")])]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"groupType",label:"群类型"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[e._v("\n "+e._s(e._f("catType")(t.row.type))+"\n ")])]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"memberNum",label:"人数"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"memberNum",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[a("auth",{attrs:{auths:"/chatDetail"}},[a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.gotoCatDetail(t.row)}}},[e._v("详情")])],1),e._v(" "),a("auth",{attrs:{auths:"imGroup/updateImGroup"}},[a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.cancelCat(t.row)}}},[e._v("解散")])],1)],1)]}}])})],1),e._v(" "),a("pagination",{attrs:{sync:"",total:e.rules.total,page:e.rules.page,limit:e.rules.limit,"page-sizes":e.rules.page_size},on:{"update:total":function(t){return e.$set(e.rules,"total",t)},"update:page":function(t){return e.$set(e.rules,"page",t)},"update:limit":function(t){return e.$set(e.rules,"limit",t)},pagination:e.getList}})],1),e._v(" "),a("eidtPostMsg",{ref:"eidtPostMsg",on:{clear:e.clearCom}}),e._v(" "),a("eidtCatInfo",{ref:"eidtCatInfo",on:{getList:e.getList}}),e._v(" "),a("addChatForm",{ref:"addChatForm",on:{getList:e.getList}})],1)},i=[],o=(a("7f7f"),a("ac6a"),a("5530")),l=(a("96cf"),a("1da1")),c=(a("bc3a"),a("5f87"),a("333d")),u=(a("3908"),a("ed08"),a("2fc8")),p=a("92e3"),d=a("f7cd"),h=a("a339"),m=a("b35e"),f={components:{pagination:c["a"],eidtPostMsg:d["a"],eidtCatInfo:h["a"],addChatForm:m["a"]},data:function(){return{searchForm:{search:null,groupType:""},catgGoupTypeList:p["k"],tableList:[],organList:[],rules:{limit:10,page:1,total:0,page_size:[10,20,40,50]},addMuiscVisible:!1,multipleSelection:[],chioseIdList:[],isNewPage:!1}},created:function(){},mounted:function(){this.init()},methods:{init:function(){this.getList()},getList:function(){var e=Object(l["a"])(regeneratorRuntime.mark((function e(){var t,a,n=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(u["i"])(Object(o["a"])(Object(o["a"])({},this.searchForm),{},{page:this.rules.page,rows:this.rules.limit}));case 3:t=e.sent,this.tableList=t.data.rows,this.rules.total=t.data.total,a=this.chioseIdList.map((function(e){return e.id})),this.isNewPage=!0,this.$nextTick((function(){n.tableList.forEach((function(e){-1!=a.indexOf(e.id)&&n.$refs.multipleSelection.toggleRowSelection(e,!0)})),n.isNewPage=!1})),e.next=14;break;case 11:e.prev=11,e.t0=e["catch"](0),console.log(e.t0);case 14:case"end":return e.stop()}}),e,this,[[0,11]])})));function t(){return e.apply(this,arguments)}return t}(),search:function(){this.rules.page=1,this.getList()},onReSet:function(){this.searchForm.search="",this.searchForm.groupType="",this.rules.page=1,this.getList()},postMsg:function(){!this.chioseIdList||this.chioseIdList.length<=0?this.$message.error("请至少选择一个群聊"):this.$refs.eidtPostMsg.openDioag(this.chioseIdList)},handleSelectionChange:function(e){var t=this;if(e.length>0)this.chioseIdList=this.chioseIdList.concat(e),this.chioseIdList=this.$helpers.lodash.uniqBy(this.chioseIdList,"id");else{if(this.isNewPage)return;var a=this.chioseIdList.map((function(e){return e.id}));this.$nextTick((function(){var e=[];t.tableList.forEach((function(n){e.push(n.id),-1!=a.indexOf(n.id)&&t.$refs.multipleSelection.toggleRowSelection(n,!1)})),t.chioseIdList=t.$helpers.lodash.remove(t.chioseIdList,(function(t){return-1==e.indexOf(t.id)})),t.chioseIdList.length<=0&&t.clearCom()}))}},clearCom:function(){this.chioseIdList=[],this.$refs.multipleSelection.clearSelection()},onTableSelect:function(e,t){var a=this.chioseIdList.map((function(e){return e.id}));-1!=a.indexOf(t.id)&&(this.chioseIdList.splice(a.indexOf(t.id),1),this.chioseIdList.length<=0&&this.clearCom())},resetCat:function(e){this.$refs.eidtCatInfo.openResetDioag(e)},gotoCatDetail:function(e){this.$router.push({path:"/operateManager/chatDetail",query:{imGroupId:e.id,name:e.name}}),console.log(e)},addChat:function(){this.$refs.addChatForm.openDioag()},cancelCat:function(){var e=Object(l["a"])(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.$confirm("是否解散群组"+t.name+"?","提示",{type:"warning"});case 3:return e.next=5,Object(u["f"])({imGroupId:t.id});case 5:e.sent,this.$message.success("取消成功"),this.getList(),e.next=13;break;case 10:e.prev=10,e.t0=e["catch"](0),console.log(e.t0);case 13:case"end":return e.stop()}}),e,this,[[0,10]])})));function t(t){return e.apply(this,arguments)}return t}()}},g=f,v=a("2877"),b=Object(v["a"])(g,r,i,!1,null,"69f907a1",null),_=b.exports,y=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"m-container"},[a("save-form",{attrs:{inline:!0,model:e.searchForm},on:{submit:e.search,reset:e.onReSet}},[a("el-form-item",[a("el-select",{attrs:{placeholder:"消息类型",clearable:""},model:{value:e.searchForm.sendType,callback:function(t){e.$set(e.searchForm,"sendType","string"===typeof t?t.trim():t)},expression:"searchForm.sendType"}},[a("el-option",{attrs:{label:"即时发送",value:"NOW"}}),e._v(" "),a("el-option",{attrs:{label:"定时发送",value:"TIMING"}})],1)],1),e._v(" "),a("el-form-item",[a("el-select",{attrs:{placeholder:"状态",clearable:""},model:{value:e.searchForm.sendFlag,callback:function(t){e.$set(e.searchForm,"sendFlag","string"===typeof t?t.trim():t)},expression:"searchForm.sendFlag"}},[a("el-option",{attrs:{label:"已发送",value:!0}}),e._v(" "),a("el-option",{attrs:{label:"未发送",value:!1}})],1)],1),e._v(" "),a("el-form-item",[a("el-button",{attrs:{"native-type":"submit",type:"primary"}},[e._v("搜索")]),e._v(" "),a("el-button",{attrs:{"native-type":"reset",type:"danger"}},[e._v("重置")])],1)],1),e._v(" "),a("div",{staticClass:"tableWrap"},[a("el-table",{staticStyle:{width:"100%"},attrs:{"header-cell-style":{background:"#EDEEF0",color:"#444"},data:e.tableList}},[a("el-table-column",{attrs:{align:"center",prop:"sendTime",label:"消息类型"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s("NOW"==t.row.sendType?"即时发送":"定时发送")+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"sendTime",label:"发送时间"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(e._f("dayjsFormat")(t.row.sendTime))+"\n "+e._s(e._f("dayjsFormatMinute")(t.row.sendTime))+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"operator",label:"创建人"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"messageContent",label:"发送内容"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"fileName",label:"附件名称"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"sendFlag",label:"状态"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[e._v("\n "+e._s(t.row.sendFlag?"已发送":"未发送")+"\n ")])]}}])}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"id",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[a("auth",{attrs:{auths:"imSendGroupMessage/queryGroupPage1"}},[a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.lookGroup(t.row)}}},[e._v("查看群组")])],1),e._v(" "),t.row.sendFlag?e._e():a("auth",{attrs:{auths:"imSendGroupMessage/update"}},[a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.resetGroup(t.row)}}},[e._v("修改")])],1),e._v(" "),t.row.sendFlag?e._e():a("auth",{attrs:{auths:"imSendGroupMessage/delete"}},[a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.deleteGroup(t.row)}}},[e._v("删除")])],1)],1)]}}])})],1),e._v(" "),a("pagination",{attrs:{sync:"",total:e.rules.total,page:e.rules.page,limit:e.rules.limit,"page-sizes":e.rules.page_size},on:{"update:total":function(t){return e.$set(e.rules,"total",t)},"update:page":function(t){return e.$set(e.rules,"page",t)},"update:limit":function(t){return e.$set(e.rules,"limit",t)},pagination:e.getList}}),e._v(" "),a("lookGroup",{ref:"lookGroup"}),e._v(" "),a("eidtPostMsg",{ref:"eidtPostMsg"})],1)],1)},L=[],k=(a("386d"),a("50cd")),w={components:{pagination:c["a"],lookGroup:k["a"],eidtPostMsg:d["a"]},data:function(){return{searchForm:{sendFlag:null,sendType:""},tableList:[],organList:[],rules:{limit:10,page:1,total:0,page_size:[10,20,40,50]}}},created:function(){},mounted:function(){this.init()},methods:{init:function(){this.getList()},getList:function(){var e=Object(l["a"])(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(u["l"])(Object(o["a"])(Object(o["a"])({},this.searchForm),{},{page:this.rules.page,rows:this.rules.limit}));case 3:t=e.sent,this.tableList=t.data.rows,this.rules.total=t.data.total,e.next=11;break;case 8:e.prev=8,e.t0=e["catch"](0),console.log(e.t0);case 11:case"end":return e.stop()}}),e,this,[[0,8]])})));function t(){return e.apply(this,arguments)}return t}(),search:function(){this.rules.page=1,this.getList()},onReSet:function(){this.searchForm.sendFlag=null,this.searchForm.sendType="",this.search()},lookGroup:function(e){this.$refs.lookGroup.openDioag(e)},resetGroup:function(e){this.$refs.eidtPostMsg.openResetDioag(e)},deleteGroup:function(e){var t=this;this.$confirm("确定删除?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){Object(u["d"])({id:e.id}).then((function(e){200===e.code&&(t.$message.success("删除成功"),t.getList())}))})).catch()}}},x=w,F=Object(v["a"])(x,y,L,!1,null,"f73309a4",null),C=F.exports,$=a("ec8a"),I={components:{chatList:_,timingMsgList:C},data:function(){return{activeIndex:"1"}},created:function(){},mounted:function(){},methods:{permission:$["a"],handleClick:function(e){}}},S=I,T=Object(v["a"])(S,n,s,!1,null,"577a51c1",null);t["default"]=T.exports}}]);