chunk-29cb7e28.999407b2.js 16 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-29cb7e28"],{"09f4":function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),Math.easeInOutQuad=function(e,t,r,n){return e/=n/2,e<1?r/2*e*e+t:(e--,-r/2*(e*(e-2)-1)+t)};var n=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)}}();function a(e){document.documentElement.scrollTop=e,document.body.parentNode.scrollTop=e,document.body.scrollTop=e}function i(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function o(e,t,r){var o=i(),s=e-o,c=20,l=0;t="undefined"===typeof t?500:t;var u=function e(){l+=c;var i=Math.easeInOutQuad(l,o,s,t);a(i),l<t?n(e):r&&"function"===typeof r&&r()};u()}},"3b02":function(e,t,r){},"64ca":function(e,t,r){"use strict";r.d(t,"c",(function(){return a})),r.d(t,"f",(function(){return i})),r.d(t,"d",(function(){return o})),r.d(t,"g",(function(){return s})),r.d(t,"h",(function(){return c})),r.d(t,"l",(function(){return l})),r.d(t,"e",(function(){return u})),r.d(t,"m",(function(){return d})),r.d(t,"b",(function(){return p})),r.d(t,"k",(function(){return m})),r.d(t,"i",(function(){return h})),r.d(t,"a",(function(){return f})),r.d(t,"j",(function(){return b})),r.d(t,"n",(function(){return v}));var n=r("829b"),a=function(e){return Object(n["a"])({url:"/api-web/imLiveBroadcastRoom/add",method:"post",data:e,requestType:"json"})},i=function(e){return Object(n["a"])({url:"/api-web/imLiveBroadcastRoom/queryPage",method:"post",data:e,requestType:"json"})},o=function(e){return Object(n["a"])({url:"/api-web/imLiveBroadcastRoom/delete",method:"post",data:e,requestType:"json"})},s=function(e){return Object(n["a"])({url:"/api-web/imLiveBroadcastRoomMember/queryRoomDetail",method:"post",data:e})},c=function(e){return Object(n["a"])({url:"/api-web/imLiveBroadcastRoomMember/queryRoomMember",method:"post",data:e})},l=function(e){return Object(n["a"])({url:"/api-web/imLiveBroadcastRoom/update",method:"post",data:e,requestType:"json"})},u=function(e){return Object(n["a"])({url:"/api-web/imGroup/queryGroupList",method:"get",data:e,params:e})},d=function(e){return Object(n["a"])({url:"/api-web/imLiveBroadcastRoom/shareGroup",method:"get",data:e,params:e})},p=function(e){return Object(n["a"])({url:"/api-web/imLiveBroadcastRoom/roomDestroy/"+e,method:"get",data:e,params:e})},m=function(e){return Object(n["a"])({url:"/api-web/imLiveBroadcastRoom/opsPopularize",method:"get",data:e,params:e})},h=function(e){return Object(n["a"])({url:"/api-web/liveGoodsMapper/page",method:"post",data:e,requestType:"form"})},f=function(e){return Object(n["a"])({url:"/api-web/liveGoodsMapper/add",method:"post",data:e,requestType:"form"})},b=function(e){return Object(n["a"])({url:"/api-web/imLiveBroadcastRoom/queryRoomInfo",method:"get",data:e,params:e})},v=function(e){return Object(n["a"])({url:"/api-web/liveGoodsMapper/updateStatus",method:"post",data:e,requestType:"form"})}},"87ec":function(e,t,r){},ba5c:function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"m-container"},[r("h2",[r("el-page-header",{attrs:{content:e.detail.roomTitle||""},on:{back:e.onCancel}})],1),e._v(" "),r("div",{staticClass:"m-core"},[r("el-alert",{attrs:{title:"直播课信息",closable:!1,type:"info"}}),e._v(" "),r("descriptions",{attrs:{column:4}},[r("descriptions-item",{attrs:{label:"直播课标题:"}},[e._v(e._s(e.detail.roomTitle||""))]),e._v(" "),r("descriptions-item",{attrs:{label:"主讲人:"}},[e._v(e._s(e.detail.speakerName||""))]),e._v(" "),r("descriptions-item",{attrs:{label:"直播开始时间:"}},[e._v(e._s(e._f("dateForMinFormat")(e.detail.liveStartTime)))]),e._v(" "),r("descriptions-item",{attrs:{label:"状态:"}},[e._v(e._s(e._f("liveState")(e.detail.liveState)))])],1),e._v(" "),r("el-alert",{staticStyle:{margin:"20px 0"},attrs:{title:"直播商品",closable:!1,type:"info"}}),e._v(" "),r("save-form",{attrs:{inline:!0,model:e.searchForm},on:{submit:e.search,reset:e.onReSet}},[r("el-form-item",[r("el-input",{attrs:{clearable:"",placeholder:"商品编号/名称"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null: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(" "),r("el-form-item",{attrs:{prop:"status"}},[r("el-select",{attrs:{clearable:"",filterable:"",placeholder:"状态"},model:{value:e.searchForm.status,callback:function(t){e.$set(e.searchForm,"status","string"===typeof t?t.trim():t)},expression:"searchForm.status"}},[r("el-option",{attrs:{label:"上架",value:1}}),e._v(" "),r("el-option",{attrs:{label:"下架",value:0}})],1)],1),e._v(" "),r("el-form-item",[r("el-button",{attrs:{"native-type":"submit",type:"primary"}},[e._v("搜索")]),e._v(" "),r("el-button",{attrs:{"native-type":"reset",type:"danger"}},[e._v("重置")])],1)],1),e._v(" "),r("auth",{attrs:{auths:"liveGoodsMapper/add"}},[r("el-button",{staticStyle:{"margin-bottom":"20px"},attrs:{type:"primary"},on:{click:e.addShop}},[e._v("添加")])],1),e._v(" "),r("div",{staticClass:"tableWrap"},[r("el-table",{staticStyle:{width:"100%"},attrs:{"header-cell-style":{background:"#EDEEF0",color:"#444"},data:e.tableList}},[r("el-table-column",{attrs:{align:"center",prop:"id",label:"商品编号"}}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"name",label:"商品名称"}}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"originalPrice",label:"原价"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("div",[e._v("\n "+e._s(e._f("moneyFormat")(t.row.originalPrice,!0))+"\n ")])]}}])}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"currentPrice",label:"直播价"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("div",[e._v("\n "+e._s(e._f("moneyFormat")(t.row.currentPrice,!0))+"\n ")])]}}])}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"stockCount",label:"库存"}}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"status",label:"状态"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("div",[e._v("\n "+e._s(t.row.status?"上架":"下架")+"\n ")])]}}])}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"studentId",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("div",[r("auth",{attrs:{auths:"liveGoodsMapper/updateStatus"}},[r("el-button",{attrs:{type:"text"},on:{click:function(r){return e.resetShop(t.row)}}},[e._v("\n "+e._s(t.row.status?"下架":"上架"))])],1)],1)]}}])})],1),e._v(" "),r("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)],1),e._v(" "),r("addLiveShop",{ref:"addLiveShop",on:{getList:e.getList}})],1)},a=[],i=(r("7f7f"),r("386d"),r("5530")),o=(r("96cf"),r("1da1")),s=(r("5f87"),r("64ca")),c=r("333d"),l=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("el-dialog",{attrs:{width:"1000px",title:"添加商品",visible:e.lookVisible,"before-close":e.onClose,"append-to-body":""},on:{"update:visible":function(t){e.lookVisible=t}}},[r("div",[r("el-form",{attrs:{inline:!0,model:e.searchForm}},[r("el-form-item",[r("el-input",{attrs:{clearable:"",placeholder:"商品名称"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null: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(" "),r("el-form-item",[r("el-button",{attrs:{type:"primary"},on:{click:e.search}},[e._v("搜索")]),e._v(" "),r("el-button",{attrs:{type:"danger"},on:{click:e.onReSet}},[e._v("重置")])],1)],1),e._v(" "),r("div",{staticClass:"tableWrap"},[r("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}},[r("el-table-column",{attrs:{type:"selection",width:"55"}}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"id",label:"商品编号"}}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"name",label:"商品名称"}}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"originalPrice",label:"原价"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("div",[e._v("\n "+e._s(e._f("moneyFormat")(t.row.originalPrice,!0))+"\n ")])]}}])}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"currentPrice",label:"直播价"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("div",[e._v("\n "+e._s(e._f("moneyFormat")(t.row.currentPrice,!0))+"\n ")])]}}])}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"stockCount",label:"库存"}})],1),e._v(" "),r("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)],1),e._v(" "),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{attrs:{type:"primary"},on:{click:e.submit}},[e._v("确 定")])],1)])],1)},u=[],d=(r("ac6a"),r("ff39")),p={name:"eidtPostMsg",components:{pagination:c["a"]},data:function(){return{searchForm:{search:""},tableList:[],organList:[],rules:{limit:10,page:1,total:0,page_size:[10,20,40,50]},addMuiscVisible:!1,multipleSelection:[],chioseIdList:[],isNewPage:!1,lookVisible:!1,activeRow:{sendFlag:!1}}},mounted:function(){},methods:{getList:function(){var e=Object(o["a"])(regeneratorRuntime.mark((function e(){var t,r,n=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(d["c"])(Object(i["a"])(Object(i["a"])({},this.searchForm),{},{page:this.rules.page,rows:this.rules.limit,liveId:this.activeRow.roomUid}));case 3:t=e.sent,this.tableList=t.data.rows,this.rules.total=t.data.total,r=this.chioseIdList.map((function(e){return e.id})),this.isNewPage=!0,this.$nextTick((function(){n.tableList.forEach((function(e){-1!=r.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.clearCom(),this.search()},submit:function(){var e=Object(o["a"])(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(this.chioseIdList&&!(this.chioseIdList.length<=0)){e.next=3;break}return this.$message.error("请至少选择一件商品"),e.abrupt("return");case 3:return e.prev=3,t=this.chioseIdList.map((function(e){return e.id})).join(","),e.next=7,Object(s["a"])({liveGoodsIds:t,liveId:this.activeRow.roomUid});case 7:e.sent,this.$message.success("添加成功"),this.$emit("getList"),this.onClose(),e.next=16;break;case 13:e.prev=13,e.t0=e["catch"](3),console.log(e.t0);case 16:console.log(this.chioseIdList);case 17:case"end":return e.stop()}}),e,this,[[3,13]])})));function t(){return e.apply(this,arguments)}return t}(),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 r=this.chioseIdList.map((function(e){return e.id}));this.$nextTick((function(){var e=[];t.tableList.forEach((function(n){e.push(n.id),-1!=r.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 r=this.chioseIdList.map((function(e){return e.id}));-1!=r.indexOf(t.id)&&(this.chioseIdList.splice(r.indexOf(t.id),1),this.chioseIdList.length<=0&&this.clearCom())},onClose:function(){this.clearCom(),this.lookVisible=!1},openDioag:function(e){this.activeRow=e,this.lookVisible=!0,console.log(e),this.getList()}}},m=p,h=(r("e5a3"),r("2877")),f=Object(h["a"])(m,l,u,!1,null,"4482a1de",null),b=f.exports,v={components:{pagination:c["a"],addLiveShop:b},data:function(){return{detail:{roomTitle:"",speakerName:"",liveStartTime:"",liveState:""},searchForm:{search:"",status:""},tableList:[],organList:[],rules:{limit:10,page:1,total:0,page_size:[10,20,40,50]}}},mounted:function(){this.getDetail(),this.getList()},methods:{getList:function(){var e=Object(o["a"])(regeneratorRuntime.mark((function e(){var t,r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=Object(i["a"])(Object(i["a"])({},this.searchForm),{},{page:this.rules.page,rows:this.rules.limit,liveId:this.$route.query.roomUid}),e.prev=1,e.next=4,Object(s["i"])(Object(i["a"])({},t));case 4:r=e.sent,this.tableList=r.data.rows,this.rules.total=r.data.total,e.next=12;break;case 9:e.prev=9,e.t0=e["catch"](1),console.log(e.t0);case 12:case"end":return e.stop()}}),e,this,[[1,9]])})));function t(){return e.apply(this,arguments)}return t}(),search:function(){this.rules.page=1,this.getList()},onReSet:function(){this.searchForm.search="",this.searchForm.status="",this.search()},onCancel:function(){this.$store.dispatch("delVisitedViews",this.$route),this.$router.push("/liveClassManager")},getDetail:function(){var e=Object(o["a"])(regeneratorRuntime.mark((function e(){var t,r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,t={roomUid:this.$route.query.roomUid},e.next=4,Object(s["j"])(t);case 4:r=e.sent,this.detail=Object(i["a"])({},r.data),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}(),addShop:function(){this.$refs.addLiveShop.openDioag({roomUid:this.$route.query.roomUid})},resetShop:function(e){var t=this,r="";r=e.status?"下架":"上架",this.$confirm("您是否".concat(r,'商品"').concat(e.name,'"'),"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(Object(o["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,Object(s["n"])({liveGoodsId:e.id,liveId:t.$route.query.roomUid,status:e.status?0:1}).then((function(e){t.$message.success("".concat(r,"成功")),t.getList()}));case 2:case"end":return n.stop()}}),n)})))).catch((function(){}))}}},g=v,y=(r("c3a0"),Object(h["a"])(g,n,a,!1,null,"fb23885c",null));t["default"]=y.exports},c3a0:function(e,t,r){"use strict";r("3b02")},e5a3:function(e,t,r){"use strict";r("87ec")},ff39:function(e,t,r){"use strict";r.d(t,"c",(function(){return a})),r.d(t,"a",(function(){return i})),r.d(t,"d",(function(){return o})),r.d(t,"b",(function(){return s}));var n=r("829b"),a=function(e){return Object(n["a"])({url:"/api-web/liveGoods/page",method:"post",data:e,requestType:"form"})},i=function(e){return Object(n["a"])({url:"/api-web/liveGoods/add",method:"post",data:e,requestType:"json"})},o=function(e){return Object(n["a"])({url:"/api-web/liveGoods/update",method:"post",data:e,requestType:"json"})},s=function(e){return Object(n["a"])({url:"/api-web/liveGoods/delete",method:"post",data:e,requestType:"form"})}}}]);