CEES-CMD/src/main/resources/static/web/js/7938-legacy.922261d6.js

1 line
5.6 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"use strict";(self["webpackChunkwx_manage"]=self["webpackChunkwx_manage"]||[]).push([[7938],{17938:function(t,e,a){a.r(e),a.d(e,{default:function(){return d}});var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"mod-config"},[a("el-form",{attrs:{inline:!0,model:t.dataForm},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.getDataList()}}},[a("el-form-item",[a("el-select",{attrs:{placeholder:"时间"},model:{value:t.dataForm.startTime,callback:function(e){t.$set(t.dataForm,"startTime",e)},expression:"dataForm.startTime"}},t._l(t.timeSelections,(function(t,e){return a("el-option",{key:e,attrs:{value:t,label:e}})})),1)],1),a("el-form-item",[a("el-select",{attrs:{placeholder:"消息类型"},model:{value:t.dataForm.msgTypes,callback:function(e){t.$set(t.dataForm,"msgTypes",e)},expression:"dataForm.msgTypes"}},[a("el-option",{attrs:{value:"",label:"不限类型"}}),a("el-option",{attrs:{value:"text,image,voice,shortvideo,video,news,music,location,link",label:"消息"}}),a("el-option",{attrs:{value:"event,transfer_customer_service",label:"事件"}})],1)],1),a("el-form-item",[a("el-button",{on:{click:function(e){return t.getDataList()}}},[t._v("查询")])],1)],1),t._m(0),a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.dataListLoading,expression:"dataListLoading"}]},t._l(t.dataList,(function(e,n){return a("div",{key:n,staticClass:"msg-item"},[a("div",{staticClass:"avatar"},[a("el-avatar",{attrs:{shape:"square",size:60,src:t.getUserInfo(e.openid).headimgurl}})],1),a("div",{staticClass:"item-content"},[a("div",{staticClass:"flex justify-between margin-bottom"},[a("div",{staticClass:"text-cut"},[t._v(t._s(t.getUserInfo(e.openid).nickname||"--"))]),a("div",[t._v(t._s(t.$moment(e.createTime).calendar()))]),a("div",{staticClass:"reply-btn"},[t.canReply(e.createTime)?a("div",{staticClass:"el-icon-s-promotion",on:{click:function(a){return t.replyHandle(e.openid)}}},[t._v("回复")]):t._e()])]),a("wx-msg-preview",{attrs:{msg:e,singleLine:""}})],1)])})),0),a("el-pagination",{attrs:{"current-page":t.pageIndex,"page-sizes":[10,20,50,100],"page-size":t.pageSize,total:t.totalCount,layout:"total, sizes, prev, pager, next, jumper"},on:{"size-change":t.sizeChangeHandle,"current-change":t.currentChangeHandle}}),a("wx-msg-reply",{ref:"wxMsgReply",on:{success:t.onReplyed}})],1)},i=[function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"text-gray"},[t._v(" 24小时内消息可回复。此后台展示消息有一分钟左右延迟如需畅聊请使用 "),a("a",{attrs:{href:"https://mpkf.weixin.qq.com/",target:"_blank"}},[t._v("公众平台客服")])])}],s=(a(41539),a(78783),a(33948),a(57327),a(21249),a(91038),a(70189),a(92222),a(69826),a(30541),"YYYY/MM/DD hh:mm:ss"),r={data:function(){return{timeSelections:{"近24小时":this.$moment().subtract(1,"days").format(s),"近3天":this.$moment().subtract(3,"days").format(s),"近7天":this.$moment().subtract(7,"days").format(s),"近30天":this.$moment().subtract(30,"days").format(s)},dataForm:{startTime:this.$moment().subtract(1,"days").format(s),msgTypes:""},dataList:[],userDataList:[],pageIndex:1,pageSize:20,totalCount:0,dataListLoading:!1,dataListSelections:[]}},components:{WxMsgReply:function(){return a.e(6185).then(a.bind(a,36185))},WxMsgPreview:function(){return a.e(8515).then(a.bind(a,58515))}},activated:function(){this.getDataList()},methods:{getDataList:function(){var t=this;this.dataListLoading=!0,this.$http({url:this.$http.adornUrl("/manage/wxMsg/list"),method:"get",params:this.$http.adornParams({page:this.pageIndex,limit:this.pageSize,msgTypes:this.dataForm.msgTypes,startTime:this.dataForm.startTime,sidx:"create_time",order:"desc"})}).then((function(e){var a=e.data;a&&200===a.code?(t.dataList=a.page.list,t.totalCount=a.page.totalCount,t.refreshUserList(t.dataList)):(t.dataList=[],t.totalCount=0),t.dataListLoading=!1}))},refreshUserList:function(t){var e=this,a=t.map((function(t){return t.openid})).filter((function(t){return!e.userDataList.some((function(e){return e.openid==t}))}));a.length&&(a=Array.from(new Set(a)),this.$http({url:this.$http.adornUrl("/manage/wxUser/listByIds"),method:"post",data:this.$http.adornParams(a,!1)}).then((function(t){var a=t.data;a&&200===a.code&&(e.userDataList=e.userDataList.concat(a.data))})))},getUserInfo:function(t){return this.userDataList.find((function(e){return e.openid==t}))||{nickname:"--",headimgurl:""}},canReply:function(t){return new Date(t).getTime()>(new Date).getTime()-864e5},sizeChangeHandle:function(t){this.pageSize=t,this.pageIndex=1,this.getDataList()},currentChangeHandle:function(t){this.pageIndex=t,this.getDataList()},selectionChangeHandle:function(t){this.dataListSelections=t},replyHandle:function(t){var e=this;this.$nextTick((function(){e.$refs.wxMsgReply.init(t)}))},onReplyed:function(t){this.dataList.unshift({openid:t.openid,msgType:t.replyType,detail:{content:t.replyContent},inOut:1,createTime:new Date})}}},o=r,l=a(1001),c=(0,l.Z)(o,n,i,!1,null,"f1dd88d2",null),d=c.exports},85117:function(t,e,a){var n=a(66330),i=TypeError;t.exports=function(t,e){if(!delete t[e])throw i("Cannot delete property "+n(e)+" of "+n(t))}},30541:function(t,e,a){var n=a(82109),i=a(47908),s=a(26244),r=a(83658),o=a(85117),l=a(7207),c=1!==[].unshift(0),d=function(){try{Object.defineProperty([],"length",{writable:!1}).unshift()}catch(t){return t instanceof TypeError}},u=c||!d();n({target:"Array",proto:!0,arity:1,forced:u},{unshift:function(t){var e=i(this),a=s(e),n=arguments.length;if(n){l(a+n);var c=a;while(c--){var d=c+n;c in e?e[d]=e[c]:o(e,d)}for(var u=0;u<n;u++)e[u]=arguments[u]}return r(e,a+n)}})}}]);