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