12 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-536ed74a"],{4380:function(t,e,n){},"7db0":function(t,e,n){"use strict";var s=n("23e7"),a=n("b727").find,r=n("44d2"),i=n("ae40"),c="find",o=!0,l=i(c);c in[]&&Array(1)[c]((function(){o=!1})),s({target:"Array",proto:!0,forced:o||!l},{find:function(t){return a(this,t,arguments.length>1?arguments[1]:void 0)}}),r(c)},"98a1":function(t,e,n){"use strict";n.r(e);var s=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{attrs:{id:"liveList"}},[t._m(0),n("div",{staticClass:"pz_main"},[n("div",{staticClass:"w_0100"},[n("div",{staticClass:"w_1200"},[n("el-col",{staticClass:"hallDetail",attrs:{span:24}},[n("el-col",{staticClass:"left",attrs:{span:18}},[n("el-col",{staticClass:"top",attrs:{span:24}},[t._v(" 图文直播 ")]),n("el-col",{staticClass:"info",staticStyle:{height:"402px",overflow:"auto"},attrs:{span:24,id:"chatSell"}},[t._l(t.mainTalk,(function(e,s){return[n("span",{key:"sellTime"+e.id},[t._v("["+t._s(e.send_time)+"] "+t._s(e.sender_name))]),n("span",{key:"sellContent"+e.id+s,domProps:{innerHTML:t._s(e.content)}})]}))],2)],1),n("el-col",{staticClass:"right",attrs:{span:6}},[n("el-col",{staticClass:"top",attrs:{span:24}},[t._v(" 聊天记录 ")]),n("el-col",{staticClass:"info",staticStyle:{height:"402px",overflow:"auto"},attrs:{span:24,id:"chatBuy"}},[t._l(t.otherTalk,(function(e,s){return[n("span",{key:"buyTime"+e.id+s},[t._v("["+t._s(e.send_time)+"] "+t._s(e.sender_name))]),n("span",{key:"buyContent"+e.id+s,domProps:{innerHTML:t._s(e.content)}})]}))],2)],1),n("el-col",{staticClass:"hallDetailInput",staticStyle:{"text-align":"center"},attrs:{span:24}},[n("wang-editor",{ref:"editor",staticStyle:{height:"130px","padding-bottom":"120px"},model:{value:t.content,callback:function(e){t.content=e},expression:"content"}}),n("el-button",{attrs:{type:"warning"},on:{click:t.fanhui}},[t._v("返回")]),n("el-button",{attrs:{type:"primary"},on:{click:t.sendMessage}},[t._v("发送")])],1)],1)],1)])]),t._m(1)])},a=[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"pz_top"},[n("div",{staticClass:"w_0100"},[n("div",{staticClass:"livetop"},[n("div",{staticClass:"w_1200"},[n("div",{staticClass:"title"},[t._v(" 吉林省计算中心对接直播中心 ")]),n("div",{staticClass:"zhuban"},[n("span",[t._v("主办方:")]),n("span",[t._v("吉林省计算中心直播大厅")])])])])])])},function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"pz_down"},[n("div",{staticClass:"w_0100"},[n("div",{staticClass:"superdown"},[n("div",{staticClass:"w_1200"},[n("p",[t._v("版权所有:吉林省技术算中心")]),n("p",[n("span",[t._v("技术支持:长春福瑞科技有限公司")]),t._v(" "),n("span",[t._v("邮编:130000")]),t._v(" "),n("span",[t._v("传真:239823982")])]),n("p",[n("span",[t._v("地址:吉林省长春市朝阳区前进大街1244号")]),t._v(" "),n("span",[t._v("电话:0134-1234567")]),t._v(" "),n("span",[t._v("邮箱:123456@163.com")])])])])])])}],r=(n("4de4"),n("7db0"),n("b0c0"),n("ac1f"),n("841c"),n("ade3")),i=n("15fd"),c=(n("96cf"),n("1da1")),o=n("5530"),l=n("38d2"),u=n("2f62"),d=Object(u["a"])("dock"),h=d.mapActions,p=Object(u["a"])("roomchat"),f=p.mapActions,m={name:"hallDetail",props:{},components:{wangEditor:l["a"]},data:function(){return{content:"",mainTalk:[],otherTalk:[],info:{},buyerList:[],sellerList:[],text:""}},created:function(){this.search()},mounted:function(){this.channel()},methods:Object(o["a"])({},h(["fetch"]),{},f(["create"]),{search:function(){var t=this;return Object(c["a"])(regeneratorRuntime.mark((function e(){var n,s,a,r,c,o;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.fetch(t.id);case 2:n=e.sent,t.$checkRes(n)&&(s=n.data,a=s.apply,r=Object(i["a"])(s,["apply"]),t.$set(t,"info",r),c=a.filter((function(t){return"0"==t.buyer})),t.$set(t,"buyerList",c),o=a.filter((function(t){return"1"==t.buyer})),t.$set(t,"sellerList",o));case 4:case"end":return e.stop()}}),e)})))()},fanhui:function(){history.back()},sendMessage:function(){var t=this;return Object(c["a"])(regeneratorRuntime.mark((function e(){var n,s;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t.user.uid){e.next=3;break}return t.$message.error("游客不能发言,请先注册"),e.abrupt("return");case 3:if(t.checkUser()){e.next=5;break}return e.abrupt("return");case 5:if(""==t.content){e.next=17;break}return n={number:t.id,sender_name:t.user.name,content:t.content,role:t.user.role},t.user.uid&&(n.sender_id=t.user.uid),e.next=10,t.create(n);case 10:s=e.sent,t.$refs.editor.setContent(),t.$set(t,"content",""),t.$forceUpdate(),t.$checkRes(s,null,s.errmsg||"发言失败"),e.next=18;break;case 17:t.$message.error("请输入信息后发送");case 18:case"end":return e.stop()}}),e)})))()},channel:function(){this.$stomp(Object(r["a"])({},"/exchange/room_chat/".concat(this.id),this.onMessage))},onMessage:function(t){var e=_.get(t,"body");if(e){if(e=JSON.parse(e),"5"==e.role||"1"==e.role)this.mainTalk.push({id:e._id,sender_name:e.sender_name,send_time:e.send_time,content:e.content});else{var n=this.sellerList.find((function(t){return t.user_id==e.sender_id}));n?this.mainTalk.push({id:e._id,sender_name:e.sender_name,send_time:e.send_time,content:e.content}):this.otherTalk.push({id:e._id,sender_name:e.sender_name,send_time:e.send_time,content:e.content})}this.$nextTick((function(){document.getElementById("chatBuy").scrollTop=document.getElementById("chatBuy").scrollHeight+150,document.getElementById("chatSell").scrollTop=document.getElementById("chatSell").scrollHeight+150}))}},checkUser:function(){var t=this,e=!0;if("5"==this.user.role||"1"==this.user.role)return e;var n=this.buyerList.find((function(e){return e.user_id==t.user.uid}));return n?"1"!=n.status&&(this.$message.error("您没有通过审核,无法发言"),e=!1):(n=this.sellerList.find((function(e){return e.user_id==t.user.uid})),n?"1"!=n.status&&(this.$message.error("您没有通过审核,无法发言"),e=!1):(this.$message.error("您没有参与这场对接会,无法发言"),e=!1)),e}}),computed:Object(o["a"])({},Object(u["c"])(["user"]),{pageTitle:function(){return"".concat(this.$route.meta.title)},id:function(){return this.$route.query.id}}),metaInfo:function(){return{title:this.$route.meta.title}}},v=m,b=(n("d881"),n("2877")),g=Object(b["a"])(v,s,a,!1,null,null,null);e["default"]=g.exports},b0c0:function(t,e,n){var s=n("83ab"),a=n("9bf2").f,r=Function.prototype,i=r.toString,c=/^\s*function ([^ (]*)/,o="name";s&&!(o in r)&&a(r,o,{configurable:!0,get:function(){try{return i.call(this).match(c)[1]}catch(t){return""}}})},d881:function(t,e,n){"use strict";var s=n("4380"),a=n.n(s);a.a}}]);
- //# sourceMappingURL=chunk-536ed74a.e4507f1a.js.map
|