Files
amb_wechatapp/public/assets/vue/courseware.4fd91490.js

2 lines
51 KiB
JavaScript

import{_ as z,C as Y,u as ee}from"./index.76a66f15.js";import te from"./obs.744c2d16.js";import{a$ as w,C as r,D as E,aJ as a,b2 as s,aG as x,aV as o,b4 as T,b1 as f,b3 as v,E as D,bM as se,cf as J,bD as ae,bs as I,bz as le,bw as ie,bP as M,b5 as p,ci as W,bF as j,bn as $,bo as L,c4 as Q,bK as G,bj as V,bE as R,bL as K,bS as N,bU as U,bV as q,bW as ne,bR as ue,bt as oe,cj as re,ck as de,cs as me,bI as X,bJ as Z,bC as he,bT as ce,ct as fe,bu as pe}from"./arco.f3c60d68.js";/* empty css *//* empty css *//* empty css *//* empty css */import{C as ge}from"./course.5023c86a.js";const _e={components:{obs:te},data(){return{data:{},loading:!1,liveType:0}},methods:{getData(){this.loading=!0,this.$request.post("admin/live/room/getPushUrl",{course_id:this.pageParams.id}).then(t=>{t.code==1&&(this.data=t.data.urls||{},this.liveType=t.data.live_type||0),this.loading=!1})}},mounted(){this.pageParams=this.$route.params,this.getData()}};const ye={class:"container"},Ce={style:{"text-align":"center",padding:"40px 0"}};function ke(t,e,d,n,l,i){const B=se,m=w("icon-copy"),g=J,y=ae,C=I,F=le,b=ie,P=w("obs"),k=w("icon-exclamation-circle"),S=M;return r(),E("div",ye,[a(S,{style:{width:"100%"},loading:l.loading,tip:"\u52A0\u8F7D\u4E2D"},{default:s(()=>[l.liveType==1?(r(),E(x,{key:0},[a(B,{orientation:"left"},{default:s(()=>[...e[0]||(e[0]=[o("\u63A8\u6D41\u5730\u5740",-1)])]),_:1}),a(b,{size:"medium",column:1},{default:s(()=>[(r(!0),E(x,null,T(l.data,(u,A)=>(r(),f(F,{label:A+"\u683C\u5F0F"},{default:s(()=>[a(C,{align:"center"},{default:s(()=>[a(y,{copyable:"",style:{marginBottom:"0px"},underline:""},{"copy-icon":s(()=>[a(g,null,{default:s(()=>[a(m)]),_:1})]),default:s(()=>[o(v(u)+" ",1)]),_:2},1024)]),_:2},1024)]),_:2},1032,["label"]))),256))]),_:1}),a(P)],64)):(r(),E(x,{key:1},[a(B,{orientation:"left"},{default:s(()=>[...e[1]||(e[1]=[o("\u63A8\u6D41\u5730\u5740",-1)])]),_:1}),D("div",Ce,[a(k,{style:{color:"#86909c","font-size":"32px","margin-bottom":"12px"}}),e[2]||(e[2]=D("div",{style:{color:"#86909c","font-size":"14px"}},"\u4EC5\u771F\u5B9E\u76F4\u64AD\u652F\u6301\u83B7\u53D6\u63A8\u6D41\u5730\u5740\uFF0C\u4F60\u53EF\u5728\u76F4\u64AD\u8BBE\u7F6E\u4E2D\u5207\u6362\u76F4\u64AD\u7C7B\u578B",-1))])],64))]),_:1},8,["loading"])])}const rt=z(_e,[["render",ke]]),be={components:{},data(){return{form:{discuss_public:0,comment_audit:0,bullet_screen:0,like:0,notice:"",views:0,bantalk:0,goods:0,gift:0},loading:!1,is_install_live_gift:!1}},methods:{checkInstallLiveGift(){this.is_install_live_gift=!1,this.$request.post("admin/app/project/app/isInstall",{tag:"live_gift"}).then(t=>{this.is_install_live_gift=!0,this.refreshGiftOptions()}).catch(t=>{})},validate(){return!0},handleSubmit(){if(!this.validate())return!1;var t=this;this.$request.post("admin/live/room/setConfig",{row:t.form,course_id:this.pageParams.id,type:"operate"}).then(e=>{this.$message.success(e.msg),this.getData()}).catch(e=>{this.$message.error(e.msg)})},getData(){this.loading=!0,this.$request.post("admin/live/room/getConfig",{course_id:this.pageParams.id,type:"operate"}).then(t=>{t.code==1&&(this.form=t.data),this.checkInstallLiveGift(),this.loading=!1}).catch(t=>{this.$message.warning(t.msg)})}},mounted(){this.pageParams=this.$route.params,this.getData()}};const Fe={class:"container"},ve={class:"form-submit-btn"};function De(t,e,d,n,l,i){const B=W,m=j,g=$,y=L,C=I,F=Q,b=G,P=M;return r(),E("div",Fe,[a(P,{loading:l.loading,tip:"\u52A0\u8F7D\u4E2D...",style:{width:"100%"}},{default:s(()=>[a(b,{model:l.form,ref:"formRef",onSubmit:i.handleSubmit},{default:s(()=>[a(m,{field:"name",label:"\u76F4\u64AD\u95F4\u516C\u544A"},{default:s(()=>[a(B,{placeholder:"\u8BF7\u8F93\u5165\u76F4\u64AD\u95F4\u516C\u544A",modelValue:l.form.notice,"onUpdate:modelValue":e[0]||(e[0]=k=>l.form.notice=k),style:{width:"600px"},"show-word-limit":!0,"allow-clear":""},null,8,["modelValue"])]),_:1}),a(m,{field:"name",label:"\u5728\u7EBF\u4EBA\u6570"},{extra:s(()=>[...e[6]||(e[6]=[o(" \u662F\u5426\u5728\u76F4\u64AD\u9875\u9762\u5C55\u793A\u672C\u573A\u76F4\u64AD\u7684\u5728\u7EBF\u4EBA\u6570\uFF0C\u6570\u636E\u6765\u6E90\u4E8E\u6D88\u606F\u670D\u52A1\uFF0C\u9700\u5F00\u542F\u6D88\u606F\u670D\u52A1\u540E\u751F\u6548 ",-1)])]),default:s(()=>[a(g,{size:"mini",modelValue:l.form.views,"onUpdate:modelValue":e[1]||(e[1]=k=>l.form.views=k),"checked-value":"1","unchecked-value":"0"},null,8,["modelValue"])]),_:1}),a(m,{field:"name",label:"\u5168\u5458\u7981\u8A00"},{default:s(()=>[a(g,{size:"mini",modelValue:l.form.bantalk,"onUpdate:modelValue":e[2]||(e[2]=k=>l.form.bantalk=k),"checked-value":"1","unchecked-value":"0"},null,8,["modelValue"])]),_:1}),a(m,{field:"name",label:"\u8BC4\u8BBA\u5BA1\u6838"},{default:s(()=>[a(g,{size:"mini",modelValue:l.form.comment_audit,"onUpdate:modelValue":e[3]||(e[3]=k=>l.form.comment_audit=k),"checked-value":"1","unchecked-value":"0"},null,8,["modelValue"])]),_:1}),a(m,{field:"name",label:"\u76F4\u64AD\u5E26\u8D27"},{extra:s(()=>[...e[7]||(e[7]=[o(" \u662F\u5426\u542F\u7528\u76F4\u64AD\u95F4\u5E26\u8D27 ",-1)])]),default:s(()=>[a(g,{size:"mini",modelValue:l.form.goods,"onUpdate:modelValue":e[4]||(e[4]=k=>l.form.goods=k),"checked-value":"1","unchecked-value":"0"},null,8,["modelValue"])]),_:1}),l.is_install_live_gift?(r(),f(m,{key:0,field:"name",label:"\u9001\u793C\u7269"},{extra:s(()=>[...e[8]||(e[8]=[o(" \u65B0\u5EFA\u76F4\u64AD\u95F4\u9ED8\u8BA4\u5C55\u793A\u793C\u7269\u529F\u80FD ",-1)])]),default:s(()=>[a(g,{size:"mini",modelValue:l.form.gift,"onUpdate:modelValue":e[5]||(e[5]=k=>l.form.gift=k),"checked-value":"1","unchecked-value":"0"},null,8,["modelValue"])]),_:1})):p("",!0),a(F,{offsetBottom:0},{default:s(()=>[D("div",ve,[a(C,null,{default:s(()=>[a(y,{"html-type":"submit",type:"primary"},{default:s(()=>[...e[9]||(e[9]=[o("\u4FDD\u5B58",-1)])]),_:1})]),_:1})])]),_:1})]),_:1},8,["model","onSubmit"])]),_:1},8,["loading"])])}const dt=z(be,[["render",De]]),Ee={components:{Modal:V},data(){return{visibleModal:this.visible,form:{end_time:Date.now(),start_time:Date.now(),status:1,file_name:""}}},props:{playbackId:{type:String},visible:{type:Boolean,default:!1}},methods:{handleEditOk(){var t={row:this.form,ids:this.playbackId};this.$request.post("admin/live/playback/edit",t).then(e=>{this.$message.success(e.msg),this.$emit("ok",!1)}).catch(e=>{this.$message.error(e.msg)})},handleCancel(){this.$emit("cancel",!1)},getData(){this.$request.post("admin/live/playback/detail",{id:this.playbackId}).then(t=>{this.form={end_time:t.data.end_time,start_time:t.data.start_time,status:t.data.status,file_name:t.data.file_name}}).catch(t=>{this.$message.error(t.msg)})}},watch:{visible:function(){this.visibleModal=this.visible,this.visible&&this.getData()}}};function we(t,e,d,n,l,i){const B=R,m=j,g=$,y=G,C=K,F=V;return r(),f(F,{visible:l.visibleModal,onOk:i.handleEditOk,onCancel:i.handleCancel,"title-align":"start",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",unmountOnClose:""},{title:s(()=>[...e[2]||(e[2]=[o(" \u7F16\u8F91\u56DE\u653E ",-1)])]),default:s(()=>[a(C,{bordered:!1},{default:s(()=>[a(y,{model:l.form},{default:s(()=>[a(m,{field:"post",label:"\u89C6\u9891\u540D\u79F0"},{default:s(()=>[a(B,{placeholder:"\u8BF7\u8F93\u5165\u89C6\u9891\u540D\u79F0",modelValue:l.form.file_name,"onUpdate:modelValue":e[0]||(e[0]=b=>l.form.file_name=b),"max-length":50,onPressEnter:i.handleEditOk,"show-word-limit":""},null,8,["modelValue","onPressEnter"])]),_:1}),a(m,{field:"post",label:"\u72B6\u6001"},{default:s(()=>[a(g,{size:"mini",modelValue:l.form.status,"onUpdate:modelValue":e[1]||(e[1]=b=>l.form.status=b),"checked-value":1,"unchecked-value":0},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1})]),_:1},8,["visible","onOk","onCancel"])}const Be=z(Ee,[["render",we]]),Pe={components:{ChangeFileModal:Y,playbackVideoEditModal:Be},data(){return{pageParams:{id:""},attr:{status:[]},modal:{changeFile:!1,playbackVideoEdit:!1},checkedPlaybackId:0,tableLoading:!1,collapsed:!1,rowSelection:{type:"checkbox",showCheckedAll:!0,onlyCurrent:!1},scroll:{x:1600},columns:[{title:"\u89C6\u9891\u540D\u79F0",dataIndex:"file_name"},{title:"\u6765\u6E90",slotName:"source",dataIndex:"source",width:100},{title:"\u72B6\u6001",slotName:"status",dataIndex:"status",width:100},{title:"\u66F4\u65B0\u65F6\u95F4",slotName:"createtime",dataIndex:"createtime",sortable:{sortDirections:["ascend","descend"]},width:200},{title:"\u64CD\u4F5C",dataIndex:"operations",slotName:"operations",align:"right",fixed:"right",width:130}],data:[],dataTotal:0,searchParams:{sort:"",order:"desc",offset:0,limit:10},searchFieldType:{course_id:"="},searchFilter:{course_id:0},tableCheckedList:[],codeId:0}},methods:{edit(t){this.checkedPlaybackId=t,this.modal.playbackVideoEdit=!0},handleChangeFile(t){if(this.modal.changeFile=!1,!t)return!1;this.$request.post("admin/live/playback/add",{row:{course_id:this.$route.params.id,file_path:t[0].url,file_name:t[0].filename,attr_id:t[0].id,source:t[0].storage,status:1}}).then(e=>{this.$message.success(e.msg),this.refresh()}).catch(e=>{this.$message.error(e.msg)})},download(t){window.open(t)},getSearchParams(){this.searchParams.op="",this.searchParams.filter="";var t=this.searchParams,e={},d={};if(this.searchFilter){for(var n in this.searchFilter)this.searchFilter[n]!==""&&((n=="createtime"||n=="start_time"||n=="end_time")&&this.searchFilter[n]&&this.searchFilter[n]?e[n]=this.searchFilter[n].join(" - "):e[n]=this.searchFilter[n],d[n]=this.searchFieldType[n]);JSON.stringify(e)!=="{}"&&(t.op=JSON.stringify(d),t.filter=JSON.stringify(e))}return t},getData(){this.tableLoading=!0,this.$request.post("admin/live/playback/index",this.getSearchParams()).then(t=>{this.data=t.data.rows,this.attr=t.data.attr,this.dataTotal=t.data.total,this.tableLoading=!1})},pageChange(t){this.searchParams.offset=t,this.getData()},pageSizeChange(t){this.searchParams.limit=t,this.refresh()},handleChange(t,e,d){e.type=="sorter"&&e.sorter&&(this.searchParams.order=e.sorter.direction=="ascend"?"asc":"desc",this.searchParams.sort=e.sorter.field,this.refresh())},refresh(){this.searchParams.offset=0,this.getData()},delBatch(){this.del(this.tableCheckedList)},delAlone(t){this.del([t])},del(t){if(!t)return this.$message.warning("\u8BF7\u5148\u9009\u62E9\u8981\u5220\u9664\u7684\u6570\u636E"),!1;V.warning({title:"\u63D0\u793A",titleAlign:"start",content:"\u786E\u5B9A\u8981\u5220\u9664\u9009\u4E2D\u6570\u636E\u5417",hideCancel:!1,onOk:()=>{this.$request.post("admin/live/playback/del",{ids:t}).then(e=>{this.$message.success(e.msg),this.refresh()}).catch(e=>{this.$message.error(e.msg)})}})},statusBatch(t){this.status(this.tableCheckedList,t)},statusAlone(t,e){this.status([t],e)},status(t,e){if(!t)return this.$message.warning("\u8BF7\u5148\u9009\u62E9\u8981\u64CD\u4F5C\u7684\u6570\u636E"),!1;V.warning({title:"\u63D0\u793A",titleAlign:"start",content:"\u786E\u5B9A\u8981\u5207\u6362\u9009\u4E2D\u6570\u636E\u72B6\u6001\u5417",hideCancel:!1,onOk:()=>{this.$request.post("admin/live/playback/status",{ids:t,status:e,course_id:this.$route.params.id}).then(d=>{this.$message.success(d.msg),this.refresh()}).catch(d=>{this.$message.error(d.msg)})}})},tablecheckedChange(t){this.tableCheckedList=t}},mounted(){this.pageParams=this.$route.params,this.searchFilter.course_id=this.$route.params.id,this.getData()}},Ae={class:"container"},Se={key:1},xe={style:{width:"100%"}};function Ve(t,e,d,n,l,i){const B=w("icon-refresh"),m=L,g=I,y=N,C=U,F=w("user-item"),b=J,P=q,k=w("ChangeFileModal"),S=w("playback-video-edit-modal");return r(),E("div",Ae,[a(C,{style:{"margin-bottom":"16px"}},{default:s(()=>[a(y,{span:12},{default:s(()=>[a(g,null,{default:s(()=>[a(m,{type:"primary",onClick:i.refresh},{icon:s(()=>[a(B)]),_:1},8,["onClick"]),a(m,{type:"primary",onClick:e[0]||(e[0]=u=>l.modal.changeFile=!0)},{default:s(()=>[...e[5]||(e[5]=[o(" \u4E0A\u4F20\u89C6\u9891 ",-1)])]),_:1})]),_:1})]),_:1}),a(y,{span:12,style:{display:"flex","align-items":"center","justify-content":"end"}})]),_:1}),a(P,{"row-key":"id",pagination:{total:l.dataTotal,defaultPageSize:l.searchParams.limit,showTotal:!0,showPageSize:!0,showJumper:!0},"row-selection":l.rowSelection,bordered:!1,columns:l.columns,data:l.data,loading:l.tableLoading,onPageChange:i.pageChange,onPageSizeChange:i.pageSizeChange,onChange:i.handleChange,onSelectionChange:i.tablecheckedChange},{user:s(({record:u})=>[u.user.id?(r(),f(F,{key:0,userinfo:u.user},null,8,["userinfo"])):(r(),E("span",Se,"-"))]),status:s(({record:u})=>[u.status==1?(r(),f(b,{key:0,color:"green",bordered:""},{default:s(()=>[...e[6]||(e[6]=[o("\u6B63\u5E38",-1)])]),_:1})):p("",!0),u.status==0?(r(),f(b,{key:1,color:"red",bordered:""},{default:s(()=>[...e[7]||(e[7]=[o("\u7981\u7528",-1)])]),_:1})):p("",!0)]),createtime:s(({record:u})=>[D("span",null,v(t.$format.formatDate(u.createtime)),1)]),start_time:s(({record:u})=>[D("span",null,v(t.$format.formatDate(u.start_time)),1)]),end_time:s(({record:u})=>[D("span",null,v(t.$format.formatDate(u.end_time)),1)]),source:s(({record:u})=>[D("span",null,v(t.$t(u.source)),1)]),operations:s(({record:u})=>[a(g,{size:10},{default:s(()=>[u.status==0?(r(),f(m,{key:0,style:{padding:"0"},type:"text",size:"small",onClick:A=>i.statusAlone(u.id,1)},{default:s(()=>[...e[8]||(e[8]=[o(" \u6062\u590D ",-1)])]),_:1},8,["onClick"])):p("",!0),u.status==1?(r(),f(m,{key:1,style:{padding:"0"},type:"text",size:"small",onClick:A=>i.statusAlone(u.id,0)},{default:s(()=>[...e[9]||(e[9]=[o(" \u7981\u7528 ",-1)])]),_:1},8,["onClick"])):p("",!0),a(m,{disabled:!u.file_path,style:{padding:"0"},type:"text",size:"small",onClick:A=>i.download(u.file_path)},{default:s(()=>[...e[10]||(e[10]=[o(" \u4E0B\u8F7D ",-1)])]),_:1},8,["disabled","onClick"]),a(m,{style:{padding:"0"},type:"text",size:"small",onClick:A=>i.edit(u.id)},{default:s(()=>[...e[11]||(e[11]=[o(" \u7F16\u8F91 ",-1)])]),_:1},8,["onClick"]),a(m,{style:{padding:"0"},type:"text",size:"small",onClick:A=>i.delAlone(u.id)},{default:s(()=>[...e[12]||(e[12]=[o(" \u5220\u9664 ",-1)])]),_:1},8,["onClick"])]),_:2},1024)]),"pagination-left":s(()=>[D("div",xe,[a(C,{gutter:24},{default:s(()=>[a(y,{span:20},{default:s(()=>[a(g,null,{default:s(()=>[a(m,{onClick:e[1]||(e[1]=u=>i.delBatch()),disabled:l.tableCheckedList.length==0},{default:s(()=>[...e[13]||(e[13]=[o(" \u5220\u9664\u9009\u4E2D ",-1)])]),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1})])]),_:1},8,["pagination","row-selection","columns","data","loading","onPageChange","onPageSizeChange","onChange","onSelectionChange"]),a(k,{isShow:l.modal.changeFile,selectionType:"radio",selectFileType:["video"],onOk:i.handleChangeFile,onCancel:e[2]||(e[2]=u=>{l.modal.changeFile=!1})},null,8,["isShow","onOk"]),a(S,{onOk:e[3]||(e[3]=u=>{l.modal.playbackVideoEdit=!1,i.getData()}),onCancel:e[4]||(e[4]=u=>l.modal.playbackVideoEdit=!1),visible:l.modal.playbackVideoEdit,playbackId:l.checkedPlaybackId},null,8,["visible","playbackId"])])}const ze=z(Pe,[["render",Ve]]),Ie={components:{playbackVideoList:ze},data(){return{form:{play_back_validity_time:Date.now(),play_back:0,play_back_record:0,play_back_type:1,play_back_save_type:"oss"},tab:"config",pageParams:{},loading:!1}},methods:{validate(){return!0},handleSubmit(){if(!this.validate())return!1;var t=this;this.loading=!0,this.$request.post("admin/live/room/setConfig",{row:t.form,course_id:this.pageParams.id,type:"play_back"}).then(e=>{this.$message.success(e.msg),this.getData(),this.loading=!1}).catch(e=>{this.loading=!1,this.$message.error(e.msg)})},getData(){this.loading=!0,this.$request.post("admin/live/room/getConfig",{course_id:this.pageParams.id,type:"play_back"}).then(t=>{t.code==1&&(this.form=t.data),this.loading=!1}).catch(t=>{this.loading=!1,this.$message.warning(t.msg)})},tabsChange(t){this.tab=t}},mounted(){this.pageParams=this.$route.params,this.getData()}},Le={class:"form-submit-btn"};function Te(t,e,d,n,l,i){const B=ne,m=ue,g=$,y=oe,C=j,F=re,b=I,P=de,k=me,S=L,u=Q,A=G,O=M,c=w("playback-video-list"),h=K;return r(),E("div",null,[a(h,{"body-style":{padding:"10px"},bordered:!1},{default:s(()=>[a(m,{"hide-content":!0,type:"rounded","default-active-key":l.tab,modelValue:l.tab,"onUpdate:modelValue":e[0]||(e[0]=_=>l.tab=_),onTabClick:i.tabsChange},{default:s(()=>[a(B,{key:"config",title:"\u56DE\u653E\u8BBE\u7F6E"}),a(B,{key:"file",title:"\u56DE\u653E\u6587\u4EF6"})]),_:1},8,["default-active-key","modelValue","onTabClick"]),l.tab=="config"?(r(),f(O,{key:0,loading:l.loading,tip:"\u52A0\u8F7D\u4E2D...",style:{width:"100%"}},{default:s(()=>[a(A,{model:l.form,ref:"formRef",onSubmit:i.handleSubmit,style:{"margin-top":"16px"}},{default:s(()=>[a(C,{field:"name",label:"\u56DE\u653E\u8BBE\u7F6E"},{default:s(()=>[a(g,{size:"mini",modelValue:l.form.play_back,"onUpdate:modelValue":e[1]||(e[1]=_=>l.form.play_back=_),"checked-value":"1","unchecked-value":"0"},null,8,["modelValue"]),a(y,{style:{"margin-left":"8px"},type:"secondary"},{default:s(()=>[...e[6]||(e[6]=[o(" \u65B0\u5EFA\u76F4\u64AD\u95F4\u9ED8\u8BA4\u5F00\u542F\u56DE\u653E ",-1)])]),_:1})]),_:1}),l.form.play_back==1?(r(),f(C,{key:0,field:"name",label:"\u81EA\u52A8\u5F55\u5236\u56DE\u653E"},{default:s(()=>[a(g,{size:"mini",modelValue:l.form.play_back_record,"onUpdate:modelValue":e[2]||(e[2]=_=>l.form.play_back_record=_),"checked-value":"1","unchecked-value":"0"},null,8,["modelValue"])]),_:1})):p("",!0),l.form.play_back==1&&l.form.play_back_record==1?(r(),f(C,{key:1,field:"name",label:"\u56DE\u653E\u4FDD\u5B58\u65B9\u5F0F"},{default:s(()=>[a(P,{direction:"vertical",modelValue:l.form.play_back_save_type,"onUpdate:modelValue":e[3]||(e[3]=_=>l.form.play_back_save_type=_)},{default:s(()=>[a(b,{fill:"",size:"medium"},{default:s(()=>[a(F,{value:"vod"},{default:s(()=>[...e[7]||(e[7]=[o("\u963F\u91CC\u4E91\u70B9\u64AD-VOD",-1)])]),_:1}),a(F,{value:"oss"},{default:s(()=>[...e[8]||(e[8]=[o("\u963F\u91CC\u4E91\u5B58\u50A8-OSS",-1)])]),_:1})]),_:1}),a(y,{style:{"margin-left":"8px"},type:"secondary"},{default:s(()=>[...e[9]||(e[9]=[o("\u9700\u5728[\u7CFB\u7EDF\u914D\u7F6E]-[\u4E91\u5B58\u50A8]\u4E2D\u8BBE\u7F6E\u5BF9\u5E94\u7684\u914D\u7F6E",-1)])]),_:1})]),_:1},8,["modelValue"])]),_:1})):p("",!0),l.form.play_back==1?(r(),f(C,{key:2,field:"name",label:"\u56DE\u653E\u6709\u6548\u671F"},{default:s(()=>[a(P,{direction:"vertical",modelValue:l.form.play_back_type,"onUpdate:modelValue":e[5]||(e[5]=_=>l.form.play_back_type=_)},{default:s(()=>[a(b,{direction:"vertical",fill:"",size:"medium"},{default:s(()=>[a(F,{value:"1"},{default:s(()=>[...e[10]||(e[10]=[o("\u6C38\u4E45",-1)])]),_:1}),a(F,{value:"2"},{default:s(()=>[a(b,{size:"large"},{default:s(()=>[a(y,null,{default:s(()=>[...e[11]||(e[11]=[o("\u9650\u65F6",-1)])]),_:1}),a(k,{modelValue:l.form.play_back_validity_time,"onUpdate:modelValue":e[4]||(e[4]=_=>l.form.play_back_validity_time=_),"show-time":"","time-picker-props":{defaultValue:"00:00:00"},format:"YYYY-MM-DD HH:mm:ss",placeholder:"\u8BF7\u9009\u62E9\u622A\u6B62\u65E5\u671F"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1})):p("",!0),a(u,{offsetBottom:0},{default:s(()=>[D("div",Le,[a(b,null,{default:s(()=>[a(S,{"html-type":"submit",type:"primary"},{default:s(()=>[...e[12]||(e[12]=[o("\u4FDD\u5B58",-1)])]),_:1})]),_:1})])]),_:1})]),_:1},8,["model","onSubmit"])]),_:1},8,["loading"])):p("",!0),l.tab=="file"?(r(),f(c,{key:1})):p("",!0)]),_:1})])}const mt=z(Ie,[["render",Te]]),Oe={components:{},data(){return{modal:{changeFile:!1},fileChangeSelectIds:[],pageParams:{id:""},attr:{statusList:[],typeList:[]},memberId:"",tableLoading:!1,collapsed:!1,rowSelection:{type:"checkbox",showCheckedAll:!0,onlyCurrent:!1},scroll:{x:1600},columns:[{title:"\u7528\u6237",slotName:"user",width:250},{title:"\u5185\u5BB9",slotName:"content",dataIndex:"createtime",width:120,sortable:{sortDirections:["ascend","descend"]}},{title:"\u72B6\u6001",slotName:"status",width:"40"},{title:"\u64CD\u4F5C",dataIndex:"operations",slotName:"operations",align:"right",fixed:"right",width:"100"}],data:[],dataTotal:0,searchParams:{sort:"",order:"desc",offset:0,limit:10},searchFieldType:{"user.username":"LIKE",content:"LIKE",createtime:"RANGE",course_id:"=",status:"=",type:"="},searchFilter:{course_id:0,content:"",type:"","user.username":"",createtime:"",status:""},tableCheckedList:[],codeId:0}},methods:{getSearchParams(){this.searchParams.op="",this.searchParams.filter="";var t=this.searchParams,e={},d={};if(this.searchFilter){for(var n in this.searchFilter)this.searchFilter[n]!==""&&(n=="createtime"&&this.searchFilter[n]&&this.searchFilter[n]?e[n]=this.searchFilter[n].join(" - "):e[n]=this.searchFilter[n],d[n]=this.searchFieldType[n]);JSON.stringify(e)!=="{}"&&(t.op=JSON.stringify(d),t.filter=JSON.stringify(e))}return t},getData(){this.tableLoading=!0,this.$request.post("admin/live/message/index",this.getSearchParams()).then(t=>{this.data=t.data.rows,this.attr=t.data.attr,this.dataTotal=t.data.total,this.fileChangeSelectIds=t.data.ids,this.tableLoading=!1})},pageChange(t){this.searchParams.offset=t,this.getData()},pageSizeChange(t){this.searchParams.limit=t,this.refresh()},handleChange(t,e,d){e.type=="sorter"&&e.sorter&&(this.searchParams.order=e.sorter.direction=="ascend"?"asc":"desc",this.searchParams.sort=e.sorter.field,this.refresh())},refresh(){this.searchParams.offset=0,this.getData()},delBatch(){this.del(this.tableCheckedList)},delAlone(t){this.del([t])},del(t){if(!t)return this.$message.warning("\u8BF7\u5148\u9009\u62E9\u8981\u5220\u9664\u7684\u6570\u636E"),!1;V.warning({title:"\u63D0\u793A",titleAlign:"start",content:"\u786E\u5B9A\u8981\u5220\u9664\u9009\u4E2D\u6570\u636E\u5417",hideCancel:!1,onOk:()=>{this.$request.post("admin/live/message/del",{ids:t}).then(e=>{this.$message.success(e.msg),this.refresh()}).catch(e=>{this.$message.error(e.msg)})}})},statusBatch(t){this.status(this.tableCheckedList,t)},statusAlone(t,e){this.status([t],e)},status(t,e){if(!t)return this.$message.warning("\u8BF7\u5148\u9009\u62E9\u8981\u64CD\u4F5C\u7684\u6570\u636E"),!1;V.warning({title:"\u63D0\u793A",titleAlign:"start",content:"\u786E\u5B9A\u8981\u5207\u6362\u9009\u4E2D\u6570\u636E\u72B6\u6001\u5417",hideCancel:!1,onOk:()=>{this.$request.post("admin/live/message/status",{ids:t,status:e}).then(d=>{this.$message.success(d.msg),this.refresh()}).catch(d=>{this.$message.error(d.msg)})}})},liveUserControl(t,e,d){if(!t)return this.$message.warning("\u8BF7\u5148\u9009\u62E9\u8981\u64CD\u4F5C\u7684\u6570\u636E"),!1;this.$request.post("admin/live/user/control",{ids:t,val:d,type:e,live_id:this.$route.params.id}).then(n=>{this.$message.success(n.msg),this.refresh()}).catch(n=>{this.$message.error(n.msg)})},tablecheckedChange(t){this.tableCheckedList=t}},mounted(){this.pageParams=this.$route.params,this.searchFilter.course_id=this.$route.params.id,this.getData()}},Ne={class:"container"},Ue={key:2},qe={style:{"font-size":"12px",color:"var(--color-neutral-8)"}},Je={style:{width:"100%"}};function Me(t,e,d,n,l,i){const B=w("icon-refresh"),m=L,g=I,y=N,C=R,F=X,b=Z,P=w("icon-search"),k=U,S=J,u=w("user-item"),A=he,O=q;return r(),E("div",Ne,[a(k,{style:{"margin-bottom":"16px"}},{default:s(()=>[a(y,{span:12},{default:s(()=>[a(g,null,{default:s(()=>[a(m,{type:"primary",onClick:i.refresh},{icon:s(()=>[a(B)]),_:1},8,["onClick"])]),_:1})]),_:1}),a(y,{span:12,style:{display:"flex","align-items":"center","justify-content":"end"}},{default:s(()=>[a(g,null,{default:s(()=>[a(C,{placeholder:"\u8BC4\u8BBA\u7528\u6237",modelValue:l.searchFilter["user.username"],"onUpdate:modelValue":e[0]||(e[0]=c=>l.searchFilter["user.username"]=c),onPressEnter:i.refresh},null,8,["modelValue","onPressEnter"]),a(C,{placeholder:"\u8BC4\u8BBA\u5185\u5BB9",modelValue:l.searchFilter.content,"onUpdate:modelValue":e[1]||(e[1]=c=>l.searchFilter.content=c),onPressEnter:i.refresh},null,8,["modelValue","onPressEnter"]),a(b,{modelValue:l.searchFilter.status,"onUpdate:modelValue":e[2]||(e[2]=c=>l.searchFilter.status=c),placeholder:"\u72B6\u6001",onChange:i.refresh},{default:s(()=>[a(F,{value:""},{default:s(()=>[...e[5]||(e[5]=[o("\u5168\u90E8",-1)])]),_:1}),(r(!0),E(x,null,T(l.attr.statusList,(c,h)=>(r(),f(F,{value:h},{default:s(()=>[o(v(c),1)]),_:2},1032,["value"]))),256))]),_:1},8,["modelValue","onChange"]),a(b,{modelValue:l.searchFilter.type,"onUpdate:modelValue":e[3]||(e[3]=c=>l.searchFilter.type=c),placeholder:"\u7C7B\u578B",onChange:i.refresh},{default:s(()=>[a(F,{value:""},{default:s(()=>[...e[6]||(e[6]=[o("\u5168\u90E8",-1)])]),_:1}),(r(!0),E(x,null,T(l.attr.typeList,(c,h)=>(r(),f(F,{value:h},{default:s(()=>[o(v(c),1)]),_:2},1032,["value"]))),256))]),_:1},8,["modelValue","onChange"]),a(m,{type:"primary",onClick:i.refresh},{icon:s(()=>[a(P)]),default:s(()=>[e[7]||(e[7]=o(" \u641C\u7D22 ",-1))]),_:1},8,["onClick"])]),_:1})]),_:1})]),_:1}),a(O,{"row-key":"id",pagination:{total:l.dataTotal,defaultPageSize:l.searchParams.limit,showTotal:!0,showPageSize:!0,showJumper:!0},"row-selection":l.rowSelection,bordered:!1,columns:l.columns,data:l.data,loading:l.tableLoading,onPageChange:i.pageChange,onPageSizeChange:i.pageSizeChange,onChange:i.handleChange,onSelectionChange:i.tablecheckedChange},{status:s(({record:c})=>[c.status==1?(r(),f(S,{key:0,color:"green",bordered:""},{default:s(()=>[...e[8]||(e[8]=[o("\u901A\u8FC7",-1)])]),_:1})):p("",!0),c.status==0?(r(),f(S,{key:1,bordered:""},{default:s(()=>[...e[9]||(e[9]=[o("\u5C4F\u853D",-1)])]),_:1})):p("",!0)]),user:s(({record:c})=>[c.user_id==0?(r(),E(x,{key:0},[o("\u7BA1\u7406\u5458")],64)):(r(),f(u,{key:1,userinfo:c.user,showDetail:!1},null,8,["userinfo"]))]),type:s(({record:c})=>[o(v(l.attr.typeList[c.type]),1)]),content:s(({record:c})=>[a(g,{direction:"vertical",fill:""},{default:s(()=>[c.type=="gift"?(r(),f(S,{key:0,color:"orangered"},{default:s(()=>[o("\u9001\u51FA"+v(c.content),1)]),_:2},1024)):p("",!0),c.type=="text"?(r(),f(S,{key:1},{default:s(()=>[o(v(c.content),1)]),_:2},1024)):p("",!0),c.type=="image"?(r(),E("span",Ue,[a(A,{width:"100",src:c.content},null,8,["src"])])):p("",!0),D("span",qe,v(t.$format.formatDate(c.createtime)),1)]),_:2},1024)]),operations:s(({record:c})=>[a(g,{size:10},{default:s(()=>[c.status==0?(r(),f(m,{key:0,style:{padding:"0"},type:"text",size:"small",onClick:h=>i.statusAlone(c.id,1)},{default:s(()=>[...e[10]||(e[10]=[o(" \u5C55\u793A ",-1)])]),_:1},8,["onClick"])):p("",!0),c.status==1?(r(),f(m,{key:1,style:{padding:"0"},type:"text",size:"small",onClick:h=>i.statusAlone(c.id,0)},{default:s(()=>[...e[11]||(e[11]=[o(" \u9690\u85CF ",-1)])]),_:1},8,["onClick"])):p("",!0),c.user_id!=0&&c.liveuser&&c.liveuser.id?(r(),E(x,{key:2},[c.liveuser.black==0?(r(),f(m,{key:0,style:{padding:"0"},type:"text",size:"small",onClick:h=>i.liveUserControl([c.user_id],"black",1)},{default:s(()=>[...e[12]||(e[12]=[o(" \u62C9\u9ED1 ",-1)])]),_:1},8,["onClick"])):p("",!0),c.liveuser.black==1?(r(),f(m,{key:1,style:{padding:"0"},type:"text",size:"small",onClick:h=>i.liveUserControl([c.user_id],"black",0)},{default:s(()=>[...e[13]||(e[13]=[o(" \u53D6\u6D88\u62C9\u9ED1 ",-1)])]),_:1},8,["onClick"])):p("",!0),c.liveuser.bantalk==0?(r(),f(m,{key:2,style:{padding:"0"},type:"text",size:"small",onClick:h=>i.liveUserControl([c.user_id],"bantalk",1)},{default:s(()=>[...e[14]||(e[14]=[o(" \u7981\u8A00 ",-1)])]),_:1},8,["onClick"])):p("",!0),c.liveuser.bantalk==1?(r(),f(m,{key:3,style:{padding:"0"},type:"text",size:"small",onClick:h=>i.liveUserControl([c.user_id],"bantalk",0)},{default:s(()=>[...e[15]||(e[15]=[o(" \u53D6\u6D88\u7981\u8A00 ",-1)])]),_:1},8,["onClick"])):p("",!0)],64)):p("",!0),a(m,{style:{padding:"0"},type:"text",size:"small",onClick:h=>i.delAlone(c.id)},{default:s(()=>[...e[16]||(e[16]=[o(" \u5220\u9664 ",-1)])]),_:1},8,["onClick"])]),_:2},1024)]),"pagination-left":s(()=>[D("div",Je,[a(k,{gutter:24},{default:s(()=>[a(y,{span:20},{default:s(()=>[a(g,null,{default:s(()=>[a(m,{onClick:e[4]||(e[4]=c=>i.delBatch()),disabled:l.tableCheckedList.length==0},{default:s(()=>[...e[17]||(e[17]=[o(" \u5220\u9664\u9009\u4E2D ",-1)])]),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1})])]),_:1},8,["pagination","row-selection","columns","data","loading","onPageChange","onPageSizeChange","onChange","onSelectionChange"])])}const ht=z(Oe,[["render",Me]]),je={components:{},data(){return{pageParams:{id:""},attr:{status:[]},modal:{remark:!1,addTo:!1},memberId:"",tableLoading:!1,collapsed:!1,rowSelection:!1,scroll:{x:1350},columns:[{title:"\u7528\u6237",dataIndex:"user",slotName:"user",fixed:"left",width:250},{title:"\u662F\u5426\u7981\u8A00",dataIndex:"liveuser.bantalk_text",width:100},{title:"\u662F\u5426\u62C9\u9ED1",dataIndex:"liveuser.black_text",width:100},{title:"\u8BC4\u8BBA\u6B21\u6570",dataIndex:"comment_count",width:100},{title:"\u5546\u54C1\u70B9\u51FB\u6B21\u6570",dataIndex:"goods_click_count",width:130},{title:"\u9996\u6B21\u8FDB\u5165\u65F6\u95F4",slotName:"first_time",dataIndex:"first_time",width:200},{title:"\u6700\u8FD1\u8FDB\u5165\u65F6\u95F4",slotName:"last_time",dataIndex:"last_time",width:200},{title:"\u7D2F\u8BA1\u89C2\u770B\u65F6\u957F",slotName:"total_time",dataIndex:"total_time",sortable:{sortDirections:["ascend","descend"]},width:150},{title:"\u64CD\u4F5C",dataIndex:"operations",slotName:"operations",align:"right",fixed:"right",width:150}],data:[],dataTotal:0,searchParams:{sort:"",order:"desc",offset:0,limit:10},searchFieldType:{"user.username":"LIKE",createtime:"RANGE","liveuser.live_id":"=",status:"=",course_id:"=",code:"LIKE",remark:"LIKE",use_time:"RANGE"},searchFilter:{course_id:0,"user.username":"","liveuser.live_id":0,createtime:"",status:"",code:"",remark:"",use_time:""},tableCheckedList:[],codeId:0}},methods:{download(){this.$request.download("admin/live/member/export",this.getSearchParams())},getSearchParams(){this.searchParams.op="",this.searchParams.filter="";var t=this.searchParams,e={},d={};if(this.searchFilter){for(var n in this.searchFilter)this.searchFilter[n]!==""&&((n=="createtime"||n=="use_time")&&this.searchFilter[n]&&this.searchFilter[n]?e[n]=this.searchFilter[n].join(" - "):e[n]=this.searchFilter[n],d[n]=this.searchFieldType[n]);JSON.stringify(e)!=="{}"&&(t.op=JSON.stringify(d),t.filter=JSON.stringify(e))}return t},getData(){this.tableLoading=!0,this.$request.post("admin/live/member/index",this.getSearchParams()).then(t=>{this.data=t.data.rows,this.attr=t.data.attr,this.dataTotal=t.data.total,this.tableLoading=!1})},liveUserControl(t,e,d){if(!t)return this.$message.warning("\u8BF7\u5148\u9009\u62E9\u8981\u64CD\u4F5C\u7684\u6570\u636E"),!1;this.$request.post("admin/live/user/control",{ids:t,val:d,type:e,live_id:this.$route.params.id}).then(n=>{this.$message.success(n.msg),this.refresh()}).catch(n=>{this.$message.error(n.msg)})},pageChange(t){this.searchParams.offset=t,this.getData()},pageSizeChange(t){this.searchParams.limit=t,this.refresh()},handleChange(t,e,d){e.type=="sorter"&&e.sorter&&(this.searchParams.order=e.sorter.direction=="ascend"?"asc":"desc",this.searchParams.sort=e.sorter.field,this.refresh())},refresh(){this.searchParams.offset=0,this.getData()},download(){this.$request.download("admin/live/member/export",this.getSearchParams())},remark(t){this.codeId=t.id,this.modal.remark=!0},addTo(){this.modal.addTo=!0},delBatch(){this.del(this.tableCheckedList)},delAlone(t){this.del([t])},del(t){if(!t)return this.$message.warning("\u8BF7\u5148\u9009\u62E9\u8981\u5220\u9664\u7684\u6570\u636E"),!1;V.warning({title:"\u63D0\u793A",titleAlign:"start",content:"\u786E\u5B9A\u8981\u5220\u9664\u9009\u4E2D\u6570\u636E\u5417",hideCancel:!1,onOk:()=>{this.$request.post("admin/live/member/del",{ids:t}).then(e=>{this.$message.success(e.msg),this.refresh()}).catch(e=>{this.$message.error(e.msg)})}})},statusBatch(t){this.status(this.tableCheckedList,t)},statusAlone(t,e){this.status([t],e)},status(t,e){if(!t)return this.$message.warning("\u8BF7\u5148\u9009\u62E9\u8981\u64CD\u4F5C\u7684\u6570\u636E"),!1;V.warning({title:"\u63D0\u793A",titleAlign:"start",content:"\u786E\u5B9A\u8981\u5207\u6362\u9009\u4E2D\u6570\u636E\u72B6\u6001\u5417",hideCancel:!1,onOk:()=>{this.$request.post("admin/live/member/status",{ids:t,status:e}).then(d=>{this.$message.success(d.msg),this.refresh()}).catch(d=>{this.$message.error(d.msg)})}})},tablecheckedChange(t){this.tableCheckedList=t}},mounted(){this.pageParams=this.$route.params,this.searchFilter.course_id=this.$route.params.id,this.searchFilter["liveuser.live_id"]=this.$route.params.id,this.refresh()}},$e={class:"container"},Ge={key:1},Re={style:{width:"100%"}};function Ke(t,e,d,n,l,i){const B=w("icon-refresh"),m=L,g=w("icon-download"),y=I,C=N,F=ce,b=U,P=w("user-item"),k=J,S=q;return r(),E("div",$e,[a(b,{style:{"margin-bottom":"16px"}},{default:s(()=>[a(C,{span:12},{default:s(()=>[a(y,null,{default:s(()=>[a(m,{type:"primary",onClick:i.refresh},{icon:s(()=>[a(B)]),_:1},8,["onClick"]),a(m,{onClick:i.download},{icon:s(()=>[a(g)]),default:s(()=>[e[0]||(e[0]=o(" \u5BFC\u51FA\u6570\u636E ",-1))]),_:1},8,["onClick"])]),_:1})]),_:1}),a(C,{span:12,style:{display:"flex","align-items":"center","justify-content":"end"}},{default:s(()=>[a(F,{onPressEnter:i.refresh,style:{width:"320px"},placeholder:"\u8BF7\u8F93\u5165\u7528\u6237\u540D"},null,8,["onPressEnter"]),a(m,{type:"primary",onClick:i.refresh},{default:s(()=>[...e[1]||(e[1]=[o("\u641C\u7D22",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1}),a(S,{"row-key":"id",scroll:l.scroll,pagination:{total:l.dataTotal,defaultPageSize:l.searchParams.limit,showTotal:!0,showPageSize:!0,showJumper:!0},"row-selection":l.rowSelection,bordered:!1,columns:l.columns,data:l.data,loading:l.tableLoading,onPageChange:i.pageChange,onPageSizeChange:i.pageSizeChange,onChange:i.handleChange,onSelectionChange:i.tablecheckedChange},{user:s(({record:u})=>[u.user.id?(r(),f(P,{key:0,userinfo:u.user},null,8,["userinfo"])):(r(),E("span",Ge,"-"))]),status:s(({record:u})=>[u.status==1?(r(),f(k,{key:0,color:"green",bordered:""},{default:s(()=>[...e[2]||(e[2]=[o("\u6B63\u5E38",-1)])]),_:1})):p("",!0),u.status==0?(r(),f(k,{key:1,color:"red",bordered:""},{default:s(()=>[...e[3]||(e[3]=[o("\u7981\u7528",-1)])]),_:1})):p("",!0),u.status==2?(r(),f(k,{key:2,bordered:""},{default:s(()=>[...e[4]||(e[4]=[o("\u5DF2\u4F7F\u7528",-1)])]),_:1})):p("",!0)]),createtime:s(({record:u})=>[D("span",null,v(t.$format.formatDate(u.createtime)),1)]),total_time:s(({record:u})=>[D("span",null,v(t.$format.formatTime(u.total_time)),1)]),last_time:s(({record:u})=>[D("span",null,v(t.$format.formatDate(u.last_time)),1)]),first_time:s(({record:u})=>[D("span",null,v(t.$format.formatDate(u.first_time)),1)]),use_time:s(({record:u})=>[D("span",null,v(u.use_time?t.$format.formatDate(u.use_time):"-"),1)]),remark:s(({record:u})=>[D("span",null,v(u.remark?u.remark:"-"),1)]),operations:s(({record:u})=>[a(y,{size:10},{default:s(()=>[u.user_id!=0&&u.liveuser&&u.liveuser.id?(r(),E(x,{key:0},[u.liveuser.black==0?(r(),f(m,{key:0,style:{padding:"0"},type:"text",size:"small",onClick:A=>i.liveUserControl([u.user_id],"black",1)},{default:s(()=>[...e[5]||(e[5]=[o(" \u62C9\u9ED1 ",-1)])]),_:1},8,["onClick"])):p("",!0),u.liveuser.black==1?(r(),f(m,{key:1,style:{padding:"0"},type:"text",size:"small",onClick:A=>i.liveUserControl([u.user_id],"black",0)},{default:s(()=>[...e[6]||(e[6]=[o(" \u53D6\u6D88\u62C9\u9ED1 ",-1)])]),_:1},8,["onClick"])):p("",!0),u.liveuser.bantalk==0?(r(),f(m,{key:2,style:{padding:"0"},type:"text",size:"small",onClick:A=>i.liveUserControl([u.user_id],"bantalk",1)},{default:s(()=>[...e[7]||(e[7]=[o(" \u7981\u8A00 ",-1)])]),_:1},8,["onClick"])):p("",!0),u.liveuser.bantalk==1?(r(),f(m,{key:3,style:{padding:"0"},type:"text",size:"small",onClick:A=>i.liveUserControl([u.user_id],"bantalk",0)},{default:s(()=>[...e[8]||(e[8]=[o(" \u53D6\u6D88\u7981\u8A00 ",-1)])]),_:1},8,["onClick"])):p("",!0)],64)):p("",!0)]),_:2},1024)]),"pagination-left":s(()=>[D("div",Re,[a(b,{gutter:24},{default:s(()=>[a(C,{span:20},{default:s(()=>[a(y)]),_:1})]),_:1})])]),_:1},8,["scroll","pagination","row-selection","columns","data","loading","onPageChange","onPageSizeChange","onChange","onSelectionChange"])])}const ct=z(je,[["render",Ke]]),He={components:{goodsModal:ge},data(){return{goodsSelectIds:[],isLecturer:!1,modal:{changeFile:!1,goods:!1},fileChangeSelectIds:[],compositeInstalled:!1,pageParams:{id:""},attr:{statusList:[],typeList:[]},memberId:"",tableLoading:!1,collapsed:!1,rowSelection:{type:"checkbox",showCheckedAll:!0,onlyCurrent:!1},scroll:{x:1030},columns:[{title:"\u5546\u54C1",slotName:"goods",width:330,fixed:"left"},{title:"\u63CF\u8FF0",slotName:"description",width:200},{title:"\u663E\u793A\u72B6\u6001",dataIndex:"status_text",width:130},{title:"\u8BB2\u89E3\u72B6\u6001",dataIndex:"explaining_text",width:130},{title:"\u4E0A\u67B6\u72B6\u6001",dataIndex:"sellout_text",width:130},{title:"\u64CD\u4F5C",slotName:"operations",width:230,fixed:"right"}],data:[],dataTotal:0,searchParams:{sort:"",order:"desc",offset:0,limit:10},searchFieldType:{"user.username":"LIKE",content:"LIKE",createtime:"RANGE",live_id:"=",status:"=",explaining:"=",sellout:"="},searchFilter:{live_id:0,content:"",type:"","user.username":"",createtime:"",status:"",explaining:"",sellout:""},tableCheckedList:[]}},props:{},watch:{},computed:{goodsModalDataTypeList(){const t=["column","article","video","audio","live","vipcard","activity","exercises","physical"];return this.compositeInstalled&&t.push("composite"),t}},mounted(){this.pageParams=this.$route.params,this.searchFilter.live_id=this.$route.params.id,ee().is_lecturer&&(this.isLecturer=!0),this.checkCompositeInstall(),this.refresh()},methods:{checkCompositeInstall(){this.$request.post("admin/app/project/app/isInstall",{tag:"composite"}).then(()=>{this.compositeInstalled=!0}).catch(()=>{this.compositeInstalled=!1})},descriptionHandleOk(t){this.control([this.data[t].id],"description",this.data[t].description)},handleGoodsModalOk(t){this.modal.goods=!1;var e=[];if(t)for(var d in t)this.goodsSelectIds&&this.goodsSelectIds.indexOf(t[d].id+"_"+t[d].type)!=-1||e.push({id:t[d].id,type:t[d].type});e.length>0&&(this.tableLoading=!0,this.$request.post("admin/live/goods/add",{row:{goods:e,live_id:this.searchFilter.live_id}}).then(n=>{this.$message.success(n.msg),this.refresh()}).catch(n=>{this.$message.error(n.msg)}))},getSearchParams(){this.searchParams.op="",this.searchParams.filter="";var t=this.searchParams,e={},d={};if(this.searchFilter){for(var n in this.searchFilter)this.searchFilter[n]!==""&&(n=="createtime"&&this.searchFilter[n]&&this.searchFilter[n]?e[n]=this.searchFilter[n].join(" - "):e[n]=this.searchFilter[n],d[n]=this.searchFieldType[n]);JSON.stringify(e)!=="{}"&&(t.op=JSON.stringify(d),t.filter=JSON.stringify(e))}return t},getData(){this.tableLoading=!0,this.$request.post("admin/live/goods/index",this.getSearchParams()).then(t=>{this.data=t.data.rows,this.attr=t.data.attr,this.goodsSelectIds=t.data.select_goods_ids,this.dataTotal=t.data.total,this.tableLoading=!1})},pageChange(t){this.searchParams.offset=t,this.getData()},pageSizeChange(t){this.searchParams.limit=t,this.refresh()},handleChange(t,e,d){e.type=="sorter"&&e.sorter&&(this.searchParams.order=e.sorter.direction=="ascend"?"asc":"desc",this.searchParams.sort=e.sorter.field,this.refresh())},refresh(){this.searchParams.offset=0,this.getData()},delBatch(){this.del(this.tableCheckedList)},delAlone(t){this.del([t])},del(t){if(!t)return this.$message.warning("\u8BF7\u5148\u9009\u62E9\u8981\u5220\u9664\u7684\u6570\u636E"),!1;V.warning({title:"\u63D0\u793A",titleAlign:"start",content:"\u786E\u5B9A\u8981\u5220\u9664\u9009\u4E2D\u6570\u636E\u5417",hideCancel:!1,onOk:()=>{this.$request.post("admin/live/goods/del",{ids:t}).then(e=>{this.$message.success(e.msg),this.refresh()}).catch(e=>{this.$message.error(e.msg)})}})},controlAlone(t,e,d){this.control([t],e,d)},controlBatch(t,e){this.control(this.tableCheckedList,t,e)},control(t,e,d){if(!t)return this.$message.warning("\u8BF7\u5148\u9009\u62E9\u8981\u64CD\u4F5C\u7684\u6570\u636E"),!1;this.$request.post("admin/live/goods/control",{ids:t,val:d,type:e,live_id:this.searchFilter.live_id}).then(n=>{this.$message.success(n.msg),this.refresh()}).catch(n=>{this.$message.error(n.msg)})},tablecheckedChange(t){this.tableCheckedList=t}}};const Ye={style:{width:"100%"}};function We(t,e,d,n,l,i){const B=w("icon-refresh"),m=L,g=I,y=N,C=X,F=Z,b=U,P=w("course-item"),k=w("icon-edit"),S=W,u=fe,A=q,O=K,c=w("goods-modal");return r(),E("div",null,[a(O,{"body-style":{padding:"10px"},bordered:!1},{default:s(()=>[a(b,{style:{"margin-bottom":"16px"}},{default:s(()=>[a(y,{span:12},{default:s(()=>[a(g,null,{default:s(()=>[a(m,{type:"primary",onClick:i.refresh},{icon:s(()=>[a(B)]),_:1},8,["onClick"]),l.isLecturer?p("",!0):(r(),f(m,{key:0,type:"primary",onClick:e[0]||(e[0]=h=>l.modal.goods=!0)},{default:s(()=>[...e[10]||(e[10]=[o(" \u6DFB\u52A0\u5546\u54C1 ",-1)])]),_:1}))]),_:1})]),_:1}),a(y,{span:12,style:{display:"flex","align-items":"center","justify-content":"end"}},{default:s(()=>[a(g,null,{default:s(()=>[a(F,{modelValue:l.searchFilter.status,"onUpdate:modelValue":e[1]||(e[1]=h=>l.searchFilter.status=h),onChange:i.refresh,placeholder:"\u72B6\u6001"},{default:s(()=>[a(C,{value:""},{default:s(()=>[...e[11]||(e[11]=[o("\u72B6\u6001",-1)])]),_:1}),(r(!0),E(x,null,T(l.attr.status,(h,_)=>(r(),f(C,{value:_},{default:s(()=>[o(v(h),1)]),_:2},1032,["value"]))),256))]),_:1},8,["modelValue","onChange"]),a(F,{modelValue:l.searchFilter.explaining,"onUpdate:modelValue":e[2]||(e[2]=h=>l.searchFilter.explaining=h),onChange:i.refresh,placeholder:"\u662F\u5426\u8BB2\u89E3\u4E2D"},{default:s(()=>[a(C,{value:""},{default:s(()=>[...e[12]||(e[12]=[o("\u662F\u5426\u8BB2\u89E3\u4E2D",-1)])]),_:1}),(r(!0),E(x,null,T(l.attr.explaining,(h,_)=>(r(),f(C,{value:_},{default:s(()=>[o(v(h),1)]),_:2},1032,["value"]))),256))]),_:1},8,["modelValue","onChange"]),a(F,{modelValue:l.searchFilter.sellout,"onUpdate:modelValue":e[3]||(e[3]=h=>l.searchFilter.sellout=h),onChange:i.refresh,placeholder:"\u662F\u5426\u552E\u7F44"},{default:s(()=>[a(C,{value:""},{default:s(()=>[...e[13]||(e[13]=[o("\u662F\u5426\u552E\u7F44",-1)])]),_:1}),(r(!0),E(x,null,T(l.attr.sellout,(h,_)=>(r(),f(C,{value:_},{default:s(()=>[o(v(h),1)]),_:2},1032,["value"]))),256))]),_:1},8,["modelValue","onChange"])]),_:1})]),_:1})]),_:1}),a(A,{"row-key":"id",scroll:l.scroll,pagination:{total:l.dataTotal,defaultPageSize:l.searchParams.limit,showTotal:!0,showPageSize:!0,showJumper:!0},"row-selection":l.rowSelection,bordered:!1,columns:l.columns,data:l.data,loading:l.tableLoading,onPageChange:i.pageChange,onPageSizeChange:i.pageSizeChange,onChange:i.handleChange,onSelectionChange:i.tablecheckedChange},{rank:s(({rowIndex:h})=>[o(v(h+1),1)]),goods:s(({rowIndex:h,record:_})=>[a(P,{name:_.goods.name,type:_.goods.type,pay_type:_.goods.pay_type,price:_.goods.price,cover:_.goods.cover},null,8,["name","type","pay_type","price","cover"])]),description:s(({rowIndex:h,record:_})=>[o(v(_.description?_.description:"-")+" ",1),a(u,{style:{width:"200px"},onOk:H=>i.descriptionHandleOk(h),onCancel:i.refresh},{content:s(()=>[a(S,{modelValue:l.data[h].description,"onUpdate:modelValue":H=>l.data[h].description=H,placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u63CF\u8FF0","max-length":30,"allow-clear":"","show-word-limit":""},null,8,["modelValue","onUpdate:modelValue"])]),default:s(()=>[a(k)]),_:2},1032,["onOk","onCancel"])]),operations:s(({record:h})=>[a(g,{size:10},{default:s(()=>[h.status==1?(r(),f(m,{key:0,style:{padding:"0"},type:"text",size:"small",onClick:_=>i.controlAlone(h.id,"status",0)},{default:s(()=>[...e[14]||(e[14]=[o(" \u9690\u85CF ",-1)])]),_:1},8,["onClick"])):p("",!0),h.status==0?(r(),f(m,{key:1,style:{padding:"0"},type:"text",size:"small",onClick:_=>i.controlAlone(h.id,"status",1)},{default:s(()=>[...e[15]||(e[15]=[o(" \u663E\u793A ",-1)])]),_:1},8,["onClick"])):p("",!0),h.explaining==0?(r(),f(m,{key:2,style:{padding:"0"},type:"text",size:"small",onClick:_=>i.controlAlone(h.id,"explaining",1)},{default:s(()=>[...e[16]||(e[16]=[o(" \u8BB2\u89E3 ",-1)])]),_:1},8,["onClick"])):p("",!0),h.explaining==1?(r(),f(m,{key:3,style:{padding:"0"},type:"text",size:"small",onClick:_=>i.controlAlone(h.id,"explaining",0)},{default:s(()=>[...e[17]||(e[17]=[o(" \u53D6\u6D88\u8BB2\u89E3 ",-1)])]),_:1},8,["onClick"])):p("",!0),h.sellout==0?(r(),f(m,{key:4,style:{padding:"0"},type:"text",size:"small",onClick:_=>i.controlAlone(h.id,"sellout",1)},{default:s(()=>[...e[18]||(e[18]=[o(" \u552E\u7F44 ",-1)])]),_:1},8,["onClick"])):p("",!0),h.sellout==1?(r(),f(m,{key:5,style:{padding:"0"},type:"text",size:"small",onClick:_=>i.controlAlone(h.id,"sellout",0)},{default:s(()=>[...e[19]||(e[19]=[o(" \u4E0A\u67B6 ",-1)])]),_:1},8,["onClick"])):p("",!0),l.isLecturer?p("",!0):(r(),f(m,{key:6,style:{padding:"0"},type:"text",onClick:_=>i.delAlone(h.id)},{default:s(()=>[...e[20]||(e[20]=[o(" \u5220\u9664 ",-1)])]),_:1},8,["onClick"]))]),_:2},1024)]),"pagination-left":s(()=>[D("div",Ye,[a(b,{gutter:24},{default:s(()=>[a(y,{span:20},{default:s(()=>[a(g,null,{default:s(()=>[l.isLecturer?p("",!0):(r(),f(m,{key:0,onClick:e[4]||(e[4]=h=>i.delBatch()),disabled:l.tableCheckedList.length==0},{default:s(()=>[...e[21]||(e[21]=[o(" \u5220\u9664\u9009\u4E2D ",-1)])]),_:1},8,["disabled"])),a(m,{onClick:e[5]||(e[5]=h=>i.controlBatch("sellout",1)),disabled:l.tableCheckedList.length==0},{default:s(()=>[...e[22]||(e[22]=[o(" \u552E\u7F44 ",-1)])]),_:1},8,["disabled"]),a(m,{onClick:e[6]||(e[6]=h=>i.controlBatch("sellout",0)),disabled:l.tableCheckedList.length==0},{default:s(()=>[...e[23]||(e[23]=[o(" \u4E0A\u67B6 ",-1)])]),_:1},8,["disabled"]),a(m,{onClick:e[7]||(e[7]=h=>i.controlBatch("status",1)),disabled:l.tableCheckedList.length==0},{default:s(()=>[...e[24]||(e[24]=[o(" \u663E\u793A ",-1)])]),_:1},8,["disabled"]),a(m,{onClick:e[8]||(e[8]=h=>i.controlBatch("status",0)),disabled:l.tableCheckedList.length==0},{default:s(()=>[...e[25]||(e[25]=[o(" \u9690\u85CF ",-1)])]),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1})])]),_:1},8,["scroll","pagination","row-selection","columns","data","loading","onPageChange","onPageSizeChange","onChange","onSelectionChange"])]),_:1}),a(c,{"is-show":l.modal.goods,selectIds:l.goodsSelectIds,onOk:i.handleGoodsModalOk,onCancel:e[9]||(e[9]=h=>l.modal.goods=!1),dataTypeList:i.goodsModalDataTypeList},null,8,["is-show","selectIds","onOk","dataTypeList"])])}const ft=z(He,[["render",We],["__scopeId","data-v-ab4c4143"]]),Qe={components:{ChangeFileModal:Y},data(){return{modal:{changeFile:!1},fileChangeSelectIds:[],pageParams:{id:""},attr:{status:[]},memberId:"",tableLoading:!1,collapsed:!1,rowSelection:{type:"checkbox",showCheckedAll:!0,onlyCurrent:!1},scroll:{x:1600},columns:[{title:"\u6587\u4EF6\u540D\u79F0",dataIndex:"file_name",slotName:"file_name"},{title:"\u5927\u5C0F",dataIndex:"file_size",slotName:"file_size",width:100,sortable:{sortDirections:["ascend","descend"]}},{title:"\u64CD\u4F5C",dataIndex:"operations",slotName:"operations",align:"right",fixed:"right",width:"60"}],data:[],dataTotal:0,searchParams:{sort:"",order:"desc",offset:0,limit:10},searchFieldType:{file_name:"LIKE",createtime:"RANGE",course_id:"="},searchFilter:{course_id:0,file_name:"",createtime:""},tableCheckedList:[],codeId:0}},methods:{getSearchParams(){this.searchParams.op="",this.searchParams.filter="";var t=this.searchParams,e={},d={};if(this.searchFilter){for(var n in this.searchFilter)this.searchFilter[n]!==""&&(n=="createtime"&&this.searchFilter[n]&&this.searchFilter[n]?e[n]=this.searchFilter[n].join(" - "):e[n]=this.searchFilter[n],d[n]=this.searchFieldType[n]);JSON.stringify(e)!=="{}"&&(t.op=JSON.stringify(d),t.filter=JSON.stringify(e))}return t},getData(){this.tableLoading=!0,this.$request.post("admin/live/courseware/index",this.getSearchParams()).then(t=>{this.data=t.data.rows,this.attr=t.data.attr,this.dataTotal=t.data.total,this.fileChangeSelectIds=t.data.ids,this.tableLoading=!1})},pageChange(t){this.searchParams.offset=t,this.getData()},pageSizeChange(t){this.searchParams.limit=t,this.refresh()},handleChange(t,e,d){e.type=="sorter"&&e.sorter&&(this.searchParams.order=e.sorter.direction=="ascend"?"asc":"desc",this.searchParams.sort=e.sorter.field,this.refresh())},refresh(){this.searchParams.offset=0,this.getData()},handleChangeFile(t){if(this.modal.changeFile=!1,!t)return!1;var e=[];for(var d in t)e[d]={file_id:t[d].id,file_type:t[d].filetype,file_name:t[d].filename,file_path:t[d].fullurl,file_size:t[d].filesize};this.$request.post("admin/live/courseware/add",{row:e,course_id:this.$route.params.id}).then(n=>{this.$message.success(n.msg),this.refresh()}).catch(n=>{this.$message.error(n.msg)})},remark(t){this.codeId=t.id,this.modal.remark=!0},addTo(){this.modal.addTo=!0},delBatch(){this.del(this.tableCheckedList)},delAlone(t){this.del([t])},del(t){if(!t)return this.$message.warning("\u8BF7\u5148\u9009\u62E9\u8981\u5220\u9664\u7684\u6570\u636E"),!1;V.warning({title:"\u63D0\u793A",titleAlign:"start",content:"\u786E\u5B9A\u8981\u5220\u9664\u9009\u4E2D\u6570\u636E\u5417",hideCancel:!1,onOk:()=>{this.$request.post("admin/live/courseware/del",{ids:t}).then(e=>{this.$message.success(e.msg),this.refresh()}).catch(e=>{this.$message.error(e.msg)})}})},statusBatch(t){this.status(this.tableCheckedList,t)},statusAlone(t,e){this.status([t],e)},status(t,e){if(!t)return this.$message.warning("\u8BF7\u5148\u9009\u62E9\u8981\u64CD\u4F5C\u7684\u6570\u636E"),!1;V.warning({title:"\u63D0\u793A",titleAlign:"start",content:"\u786E\u5B9A\u8981\u5207\u6362\u9009\u4E2D\u6570\u636E\u72B6\u6001\u5417",hideCancel:!1,onOk:()=>{this.$request.post("admin/live/courseware/status",{ids:t,status:e}).then(d=>{this.$message.success(d.msg),this.refresh()}).catch(d=>{this.$message.error(d.msg)})}})},tablecheckedChange(t){this.tableCheckedList=t}},mounted(){this.pageParams=this.$route.params,this.searchFilter.course_id=this.$route.params.id,this.getData()}},Xe={class:"container"},Ze={style:{width:"100%"}};function et(t,e,d,n,l,i){const B=w("icon-refresh"),m=L,g=I,y=N,C=R,F=w("icon-search"),b=U,P=pe,k=q,S=w("ChangeFileModal");return r(),E("div",Xe,[a(b,{style:{"margin-bottom":"16px"}},{default:s(()=>[a(y,{span:12},{default:s(()=>[a(g,null,{default:s(()=>[a(m,{type:"primary",onClick:i.refresh},{icon:s(()=>[a(B)]),_:1},8,["onClick"]),a(m,{type:"primary",onClick:e[0]||(e[0]=u=>l.modal.changeFile=!0)},{default:s(()=>[...e[4]||(e[4]=[o(" \u6DFB\u52A0\u8BFE\u4EF6 ",-1)])]),_:1})]),_:1})]),_:1}),a(y,{span:12,style:{display:"flex","align-items":"center","justify-content":"end"}},{default:s(()=>[a(g,null,{default:s(()=>[a(C,{placeholder:"\u6587\u4EF6\u540D\u79F0",modelValue:l.searchFilter.file_name,"onUpdate:modelValue":e[1]||(e[1]=u=>l.searchFilter.file_name=u),onPressEnter:i.refresh},null,8,["modelValue","onPressEnter"]),a(m,{type:"primary",onClick:i.getData},{icon:s(()=>[a(F)]),default:s(()=>[e[5]||(e[5]=o(" \u641C\u7D22 ",-1))]),_:1},8,["onClick"])]),_:1})]),_:1})]),_:1}),a(k,{"row-key":"id",pagination:{total:l.dataTotal,defaultPageSize:l.searchParams.limit,showTotal:!0,showPageSize:!0,showJumper:!0},"row-selection":l.rowSelection,bordered:!1,columns:l.columns,data:l.data,loading:l.tableLoading,onPageChange:i.pageChange,onPageSizeChange:i.pageSizeChange,onChange:i.handleChange,onSelectionChange:i.tablecheckedChange},{file_name:s(({record:u})=>[a(g,{align:"center"},{default:s(()=>[u.file_type=="image"?(r(),f(P,{key:0,shape:"square","image-url":u.file_path},null,8,["image-url"])):(r(),f(P,{key:1,shape:"square","image-url":"/assets/vue/assets/images/filetype/"+u.file_type+".png"},null,8,["image-url"])),D("span",null,v(u.file_name),1)]),_:2},1024)]),file_size:s(({record:u})=>[D("span",null,v(t.$format.FormatSize(u.file_size)),1)]),createtime:s(({record:u})=>[D("span",null,v(t.$format.formatDate(u.createtime)),1)]),operations:s(({record:u})=>[a(g,{size:10},{default:s(()=>[a(m,{style:{padding:"0"},type:"text",size:"small",onClick:A=>i.delAlone(u.id)},{default:s(()=>[...e[6]||(e[6]=[o(" \u5220\u9664 ",-1)])]),_:1},8,["onClick"])]),_:2},1024)]),"pagination-left":s(()=>[D("div",Ze,[a(b,{gutter:24},{default:s(()=>[a(y,{span:20},{default:s(()=>[a(g,null,{default:s(()=>[a(m,{onClick:e[2]||(e[2]=u=>i.delBatch()),disabled:l.tableCheckedList.length==0},{default:s(()=>[...e[7]||(e[7]=[o(" \u5220\u9664\u9009\u4E2D ",-1)])]),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1})])]),_:1},8,["pagination","row-selection","columns","data","loading","onPageChange","onPageSizeChange","onChange","onSelectionChange"]),a(S,{isShow:l.modal.changeFile,selectionType:"checkbox",selectFileType:["image","video","audio","document"],disabledIds:l.fileChangeSelectIds,onOk:i.handleChangeFile,onCancel:e[3]||(e[3]=u=>{l.modal.changeFile=!1})},null,8,["isShow","disabledIds","onOk"])])}const pt=z(Qe,[["render",et]]);export{pt as a,ht as c,ft as g,ct as m,dt as o,mt as p,rt as s};