|
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-09e7b21a"],{"093a":function(e,t,i){"use strict";i.d(t,"h",(function(){return a})),i.d(t,"n",(function(){return l})),i.d(t,"x",(function(){return o})),i.d(t,"y",(function(){return s})),i.d(t,"b",(function(){return r})),i.d(t,"m",(function(){return c})),i.d(t,"p",(function(){return u})),i.d(t,"r",(function(){return d})),i.d(t,"v",(function(){return p})),i.d(t,"w",(function(){return f})),i.d(t,"g",(function(){return m})),i.d(t,"l",(function(){return h})),i.d(t,"a",(function(){return b})),i.d(t,"s",(function(){return _})),i.d(t,"i",(function(){return v})),i.d(t,"d",(function(){return y})),i.d(t,"q",(function(){return w})),i.d(t,"f",(function(){return g})),i.d(t,"k",(function(){return k})),i.d(t,"u",(function(){return V})),i.d(t,"c",(function(){return x})),i.d(t,"o",(function(){return S})),i.d(t,"e",(function(){return C})),i.d(t,"t",(function(){return O})),i.d(t,"j",(function(){return $}));var n=i("b775");function a(e){return Object(n["a"])({url:"/api/admin/video/create",method:"post",data:e})}function l(e){return Object(n["a"])({url:"/api/admin/video/video_list",method:"get",params:e})}function o(e){return Object(n["a"])({url:"/api/admin/video/update",method:"post",data:e})}function s(e){return Object(n["a"])({url:"/api/admin/video/update_all",method:"post",data:e})}function r(e){return Object(n["a"])({url:"/api/admin/video/check_video",method:"post",data:e})}function c(e){return Object(n["a"])({url:"/api/admin/video/delete",method:"post",data:e})}function u(e){return Object(n["a"])({url:"/api/admin/video/push",method:"post",data:e})}function d(e){return Object(n["a"])({url:"/api/admin/video/type_list",method:"get",params:e})}function p(e){return Object(n["a"])({url:"/api/admin/video/update_type",method:"post",data:e})}function f(e){return Object(n["a"])({url:"/api/admin/video/update_type_all",method:"post",data:e})}function m(e){return Object(n["a"])({url:"/api/admin/video/create_type",method:"post",data:e})}function h(e){return Object(n["a"])({url:"/api/admin/video/delete_type",method:"post",data:e})}function b(e){return Object(n["a"])({url:"/api/admin/video/actor_list",method:"post",data:e})}function _(e){return Object(n["a"])({url:"/api/admin/video/update_actor",method:"post",data:e})}function v(e){return Object(n["a"])({url:"/api/admin/video/delete_actor",method:"post",data:e})}function y(e){return Object(n["a"])({url:"/api/admin/video/create_actor",method:"post",data:e})}function w(e){return Object(n["a"])({url:"/api/admin/video/rank_list",method:"get",params:e})}function g(e){return Object(n["a"])({url:"/api/admin/video/create_rank",method:"post",data:e})}function k(e){return Object(n["a"])({url:"/api/admin/video/delete_rank",method:"post",data:e})}function V(e){return Object(n["a"])({url:"/api/admin/video/update_rank",method:"post",data:e})}function x(e){return Object(n["a"])({url:"/api/admin/cache/clearVideoCache",method:"get",params:e})}function S(e){return Object(n["a"])({url:"/api/admin/video/label_list",method:"get",params:e})}function C(e){return Object(n["a"])({url:"/api/admin/video/create_label",method:"post",data:e})}function O(e){return Object(n["a"])({url:"/api/admin/video/update_label",method:"post",data:e})}function $(e){return Object(n["a"])({url:"/api/admin/video/delete_label",method:"post",data:e})}},"09f4":function(e,t,i){"use strict";i.d(t,"a",(function(){return o})),Math.easeInOutQuad=function(e,t,i,n){return e/=n/2,e<1?i/2*e*e+t:(e--,-i/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 l(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function o(e,t,i){var o=l(),s=e-o,r=20,c=0;t="undefined"===typeof t?500:t;var u=function e(){c+=r;var l=Math.easeInOutQuad(c,o,s,t);a(l),c<t?n(e):i&&"function"===typeof i&&i()};u()}},6724:function(e,t,i){"use strict";i("8d41");var n="@@wavesContext";function a(e,t){function i(i){var n=Object.assign({},t.value),a=Object.assign({ele:e,type:"hit",color:"rgba(0, 0, 0, 0.15)"},n),l=a.ele;if(l){l.style.position="relative",l.style.overflow="hidden";var o=l.getBoundingClientRect(),s=l.querySelector(".waves-ripple");switch(s?s.className="waves-ripple":(s=document.createElement("span"),s.className="waves-ripple",s.style.height=s.style.width=Math.max(o.width,o.height)+"px",l.appendChild(s)),a.type){case"center":s.style.top=o.height/2-s.offsetHeight/2+"px",s.style.left=o.width/2-s.offsetWidth/2+"px";break;default:s.style.top=(i.pageY-o.top-s.offsetHeight/2-document.documentElement.scrollTop||document.body.scrollTop)+"px",s.style.left=(i.pageX-o.left-s.offsetWidth/2-document.documentElement.scrollLeft||document.body.scrollLeft)+"px"}return s.style.backgroundColor=a.color,s.className="waves-ripple z-active",!1}}return e[n]?e[n].removeHandle=i:e[n]={removeHandle:i},i}var l={bind:function(e,t){e.addEventListener("click",a(e,t),!1)},update:function(e,t){e.removeEventListener("click",e[n].removeHandle,!1),e.addEventListener("click",a(e,t),!1)},unbind:function(e){e.removeEventListener("click",e[n].removeHandle,!1),e[n]=null,delete e[n]}},o=function(e){e.directive("waves",l)};window.Vue&&(window.waves=l,Vue.use(o)),l.install=o;t["a"]=l},"8d41":function(e,t,i){},ad5c:function(e,t,i){"use strict";i.r(t);var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"app-container"},[i("div",{staticClass:"filter-container"},[i("el-input",{staticClass:"filter-item",staticStyle:{width:"200px"},attrs:{placeholder:"ID"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleFilter(t)}},model:{value:e.listQuery.id,callback:function(t){e.$set(e.listQuery,"id",t)},expression:"listQuery.id"}}),i("el-input",{staticClass:"filter-item",staticStyle:{width:"200px"},attrs:{placeholder:"片名"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleFilter(t)}},model:{value:e.listQuery.name,callback:function(t){e.$set(e.listQuery,"name",t)},expression:"listQuery.name"}}),i("el-select",{staticClass:"filter-item",staticStyle:{width:"90px"},attrs:{placeholder:"类型",clearable:""},model:{value:e.listQuery.view_type,callback:function(t){e.$set(e.listQuery,"view_type",t)},expression:"listQuery.view_type"}},e._l(e.viewTypeOptions,(function(e){return i("el-option",{key:e.key,attrs:{label:e.display_name,value:e.key}})})),1),i("el-select",{staticClass:"filter-item",staticStyle:{width:"130px"},attrs:{placeholder:"分类",clearable:""},model:{value:e.listQuery.video_type,callback:function(t){e.$set(e.listQuery,"video_type",t)},expression:"listQuery.video_type"}},e._l(e.typesOptions,(function(e){return i("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1),i("el-button",{staticClass:"filter-item",attrs:{type:"primary",icon:"el-icon-search"},on:{click:e.handleFilter}},[e._v(" 搜索 ")]),0==e.listQuery.varieties?i("el-button",{staticClass:"filter-item",staticStyle:{"margin-left":"10px"},attrs:{type:"primary",icon:"el-icon-edit"},on:{click:function(t){return e.handleVarieties(1)}}},[e._v(" 视频 ")]):e._e(),1==e.listQuery.varieties?i("el-button",{staticClass:"filter-item",staticStyle:{"margin-left":"10px"},attrs:{type:"warning",icon:"el-icon-edit"},on:{click:function(t){return e.handleVarieties(0)}}},[e._v(" 点播 ")]):e._e(),e.openSort?e._e():i("el-button",{staticClass:"filter-item",staticStyle:{"margin-left":"10px"},attrs:{type:"primary",icon:"el-icon-edit"},on:{click:e.handleSort}},[e._v(" 排序 ")]),e.openSort?i("el-button",{staticClass:"filter-item",staticStyle:{"margin-left":"10px"},attrs:{type:"success",icon:"el-icon-edit"},on:{click:e.handleSortConfirm}},[e._v(" 确认 ")]):e._e(),e.openSort?i("el-button",{staticClass:"filter-item",staticStyle:{"margin-left":"10px"},attrs:{type:"danger",icon:"el-icon-edit"},on:{click:e.handleSortCancel}},[e._v(" 取消 ")]):e._e(),i("el-button",{staticClass:"filter-item",staticStyle:{"margin-left":"10px"},attrs:{type:"primary",icon:"el-icon-edit"},on:{click:e.handleCreate}},[e._v(" 创建 ")]),i("el-button",{staticClass:"filter-item",staticStyle:{"margin-left":"10px"},attrs:{type:"danger",icon:"el-icon-delete"},on:{click:e.handleClearCache}},[e._v(" 清除缓存 ")]),i("el-checkbox",{staticClass:"filter-item",staticStyle:{"margin-left":"15px"},on:{change:function(t){e.tableKey=e.tableKey+1}},model:{value:e.showPlays,callback:function(t){e.showPlays=t},expression:"showPlays"}},[e._v(" 播放 ")]),i("el-checkbox",{staticClass:"filter-item",staticStyle:{"margin-left":"15px"},on:{change:function(t){e.tableKey=e.tableKey+1}},model:{value:e.showLikes,callback:function(t){e.showLikes=t},expression:"showLikes"}},[e._v(" 点赞 ")]),i("el-checkbox",{staticClass:"filter-item",staticStyle:{"margin-left":"15px"},on:{change:function(t){e.tableKey=e.tableKey+1}},model:{value:e.showDislikes,callback:function(t){e.showDislikes=t},expression:"showDislikes"}},[e._v(" 差评 ")]),i("el-checkbox",{staticClass:"filter-item",staticStyle:{"margin-left":"15px"},on:{change:function(t){e.tableKey=e.tableKey+1}},model:{value:e.showTariffUsr,callback:function(t){e.showTariffUsr=t},expression:"showTariffUsr"}},[e._v(" 用户价格 ")]),i("el-checkbox",{staticClass:"filter-item",staticStyle:{"margin-left":"15px"},on:{change:function(t){e.tableKey=e.tableKey+1}},model:{value:e.showTariffVip,callback:function(t){e.showTariffVip=t},expression:"showTariffVip"}},[e._v(" VIP价格 ")]),i("el-checkbox",{staticClass:"filter-item",staticStyle:{"margin-left":"15px"},on:{change:function(t){e.tableKey=e.tableKey+1}},model:{value:e.showCreateTime,callback:function(t){e.showCreateTime=t},expression:"showCreateTime"}},[e._v(" 创建时间 ")]),i("el-checkbox",{staticClass:"filter-item",staticStyle:{"margin-left":"15px"},on:{change:function(t){e.tableKey=e.tableKey+1}},model:{value:e.showReleaseTime,callback:function(t){e.showReleaseTime=t},expression:"showReleaseTime"}},[e._v(" 上线时间 ")])],1),i("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.listLoading,expression:"listLoading"}],key:e.tableKey,staticStyle:{width:"100%"},attrs:{data:e.list,border:"",fit:"","highlight-current-row":""},on:{"sort-change":e.sortChange}},[i("el-table-column",{attrs:{label:"ID",prop:"id",sortable:"custom",align:"center",width:"80","class-name":e.getSortClass()},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[i("span",[e._v(e._s(n.id))])]}}])}),i("el-table-column",{attrs:{width:"70px",label:"排序",align:"center",prop:"listorder",sortable:"custom"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[e.openSort?[i("el-input",{staticClass:"edit-input",attrs:{size:"small"},model:{value:n.listorder,callback:function(t){e.$set(n,"listorder",t)},expression:"row.listorder"}})]:i("span",[e._v(e._s(n.listorder))])]}}])}),i("el-table-column",{attrs:{label:"片名","min-width":"150px",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[i("span",[e._v(e._s(n.name))])]}}])}),i("el-table-column",{attrs:{label:"图片",width:"80px",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[i("el-tag",{attrs:{effect:"dark"},on:{click:function(t){return e.handleOpenImg3(n.img3,n.media_url)}}},[e._v("预览")])]}}])}),i("el-table-column",{attrs:{label:"类型",width:"80px"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[i("el-tag",[e._v(e._s(e._f("typeFilter")(n.view_type)))])]}}])}),i("el-table-column",{attrs:{label:"状态",align:"center",width:"80","class-name":"small-padding fixed-width",prop:"is_check",sortable:"custom"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[1==n.is_check?i("el-button",{attrs:{size:"mini",type:"success"},on:{click:function(t){return e.handleCheckStatus(n,0)}}},[e._v(" "+e._s(e._f("isCheckFilter")(n.is_check))+" ")]):e._e(),0==n.is_check?i("el-button",{attrs:{size:"mini",type:"draft"},on:{click:function(t){return e.handleCheckStatus(n,1)}}},[e._v(" "+e._s(e._f("isCheckFilter")(n.is_check))+" ")]):e._e()]}}])}),i("el-table-column",{attrs:{label:"推荐",align:"center",width:"80","class-name":"small-padding fixed-width",prop:"better_show",sortable:"custom"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[1==n.better_show?i("el-button",{attrs:{size:"mini",type:"success"},on:{click:function(t){e.openSort&&e.handleBetterStatus(n,0)}}},[e._v(" "+e._s(e._f("betterShowFilter")(n.better_show))+" ")]):e._e(),0==n.better_show?i("el-button",{attrs:{size:"mini",type:"draft"},on:{click:function(t){e.openSort&&e.handleBetterStatus(n,1)}}},[e._v(" "+e._s(e._f("betterShowFilter")(n.better_show))+" ")]):e._e()]}}])}),i("el-table-column",{attrs:{width:"70px",label:"推荐",align:"center",prop:"better_sort",sortable:"custom"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[e.openSort?[i("el-input",{staticClass:"edit-input",attrs:{size:"small"},model:{value:n.better_sort,callback:function(t){e.$set(n,"better_sort",t)},expression:"row.better_sort"}})]:i("span",[e._v(e._s(n.better_sort))])]}}])}),i("el-table-column",{attrs:{label:"首页",align:"center",width:"80","class-name":"small-padding fixed-width",prop:"home_show",sortable:"custom"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[1==n.home_show?i("el-button",{attrs:{size:"mini",type:"success"},on:{click:function(t){e.openSort&&e.handleHomeStatus(n,0)}}},[e._v(" "+e._s(e._f("homeShowFilter")(n.home_show))+" ")]):e._e(),0==n.home_show?i("el-button",{attrs:{size:"mini",type:"draft"},on:{click:function(t){e.openSort&&e.handleHomeStatus(n,1)}}},[e._v(" "+e._s(e._f("homeShowFilter")(n.home_show))+" ")]):e._e()]}}])}),i("el-table-column",{attrs:{width:"70px",label:"首页",align:"center",prop:"home_sort",sortable:"custom"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[e.openSort?[i("el-input",{staticClass:"edit-input",attrs:{size:"small"},model:{value:n.home_sort,callback:function(t){e.$set(n,"home_sort",t)},expression:"row.home_sort"}})]:i("span",[e._v(e._s(n.home_sort))])]}}])}),e.showReleaseTime?i("el-table-column",{attrs:{label:"发布时间",width:"150px",align:"center",prop:"release_time",sortable:"custom"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[i("span",[e._v(e._s(e._f("parseTime")(n.release_time,"{y}-{m}-{d} {h}:{i}")))])]}}],null,!1,4105490431)}):e._e(),e.showCreateTime?i("el-table-column",{attrs:{label:"创建时间",width:"150px",align:"center",prop:"create_time",sortable:"custom"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[i("span",[e._v(e._s(e._f("parseTime")(n.create_time,"{y}-{m}-{d} {h}:{i}")))])]}}],null,!1,122434386)}):e._e(),e.showPlays?i("el-table-column",{attrs:{label:"播放次数",width:"110px",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[i("span",[e._v(e._s(n.plays))])]}}],null,!1,1439868467)}):e._e(),e.showLikes?i("el-table-column",{attrs:{label:"点赞",width:"110px",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[i("span",[e._v(e._s(n.likes))])]}}],null,!1,1707849404)}):e._e(),e.showDislikes?i("el-table-column",{attrs:{label:"差评",width:"110px",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[i("span",[e._v(e._s(n.dislikes))])]}}],null,!1,188983394)}):e._e(),e.showTariffUsr?i("el-table-column",{attrs:{label:"用户价格",width:"110px",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[i("span",[e._v(e._s(n.tariff_usr))])]}}],null,!1,1703465697)}):e._e(),e.showTariffVip?i("el-table-column",{attrs:{label:"VIP价格",width:"110px",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[i("span",[e._v(e._s(n.tariff_vip))])]}}],null,!1,86508666)}):e._e(),i("el-table-column",{attrs:{label:"操作",align:"center",width:"300","class-name":"small-padding fixed-width"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row,a=t.$index;return[i("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(t){return e.handleUpdate(n)}}},[e._v(" 编辑 ")]),i("el-button",{attrs:{size:"mini"},on:{click:function(t){return e.handlePushVideo(n)}}},[e._v(" 推送 ")]),i("el-button",{attrs:{type:"warning",size:"mini"},on:{click:function(t){return e.handleRank(n)}}},[e._v(" 加入排行 ")]),0!=n.status?i("el-button",{attrs:{size:"mini",type:"danger"},on:{click:function(t){return e.handleDelete(n,a)}}},[e._v(" 删除 ")]):e._e()]}}])})],1),i("el-dialog",{attrs:{visible:e.dialogVisible,center:""},on:{"update:visible":function(t){e.dialogVisible=t},close:e.closeDialog}},[e.dialogVisible?i("videoPlayer",{ref:"videoPlayer",attrs:{url:e.dialogVideo,poster:e.dialogImg3}}):e._e()],1),i("pagination",{directives:[{name:"show",rawName:"v-show",value:e.total>0,expression:"total>0"}],attrs:{total:e.total,page:e.listQuery.page,limit:e.listQuery.limit},on:{"update:page":function(t){return e.$set(e.listQuery,"page",t)},"update:limit":function(t){return e.$set(e.listQuery,"limit",t)},pagination:e.getList}}),i("el-dialog",{attrs:{title:e.textMap[e.dialogStatus],visible:e.dialogFormVisible,"close-on-click-modal":!1},on:{"update:visible":function(t){e.dialogFormVisible=t}}},[i("el-form",{ref:"dataForm",attrs:{rules:e.rules,model:e.newVideo,"label-position":"top","label-width":"70px",inline:!0,size:"mini"}},[i("el-form-item",{attrs:{label:"片名",prop:"nam",size:"mini"}},[i("el-input",{model:{value:e.newVideo.name,callback:function(t){e.$set(e.newVideo,"name",t)},expression:"newVideo.name"}})],1),i("el-form-item",{attrs:{label:"是否点播",prop:"varieties"}},[i("el-select",{staticClass:"filter-item",attrs:{placeholder:"是否点播"},model:{value:e.newVideo.varieties,callback:function(t){e.$set(e.newVideo,"varieties",t)},expression:"newVideo.varieties"}},e._l(e.isVarieties,(function(e){return i("el-option",{key:e.key,attrs:{label:e.label,value:e.key}})})),1)],1),i("el-form-item",{attrs:{label:"类型",prop:"view_type"}},[i("el-select",{staticClass:"filter-item",attrs:{placeholder:"选择一个类型"},on:{change:function(t){return e.$forceUpdate()}},model:{value:e.newVideo.view_type,callback:function(t){e.$set(e.newVideo,"view_type",t)},expression:"newVideo.view_type"}},e._l(e.viewTypeOptions,(function(e){return i("el-option",{key:e.key,attrs:{label:e.display_name,value:e.key}})})),1)],1),i("el-form-item",{attrs:{label:"分类",prop:"tid"}},[i("el-checkbox-group",{model:{value:e.newVideo.tid,callback:function(t){e.$set(e.newVideo,"tid",t)},expression:"newVideo.tid"}},e._l(e.typesOptions,(function(t){return i("el-checkbox",{key:t.id,attrs:{label:t.id,"true-label":""}},[e._v(e._s(t.name))])})),1)],1),i("el-form-item",{attrs:{label:"视频标签",prop:"video_labels"}},[i("el-input",{model:{value:e.newVideo.video_labels,callback:function(t){e.$set(e.newVideo,"video_labels",t)},expression:"newVideo.video_labels"}})],1),i("el-form-item",{attrs:{label:"演员",prop:"actors"}},[i("el-input",{model:{value:e.newVideo.actors,callback:function(t){e.$set(e.newVideo,"actors",t)},expression:"newVideo.actors"}})],1),i("el-form-item",{attrs:{label:"价格",prop:"tariff_usr"}},[i("el-input",{model:{value:e.newVideo.tariff_usr,callback:function(t){e.$set(e.newVideo,"tariff_usr",t)},expression:"newVideo.tariff_usr"}})],1),i("el-form-item",{attrs:{label:"VIP价格",prop:"tariff_vip"}},[i("el-input",{model:{value:e.newVideo.tariff_vip,callback:function(t){e.$set(e.newVideo,"tariff_vip",t)},expression:"newVideo.tariff_vip"}})],1),i("el-form-item",{attrs:{label:"时长",prop:"time_len"}},[i("el-input",{model:{value:e.newVideo.time_len,callback:function(t){e.$set(e.newVideo,"time_len",t)},expression:"newVideo.time_len"}})],1),i("el-form-item",{attrs:{label:"片源",prop:"media_url"}},[i("el-input",{model:{value:e.newVideo.media_url,callback:function(t){e.$set(e.newVideo,"media_url",t)},expression:"newVideo.media_url"}})],1),i("el-form-item",{attrs:{label:"试看片源",prop:"free_media_url"}},[i("el-input",{model:{value:e.newVideo.free_media_url,callback:function(t){e.$set(e.newVideo,"free_media_url",t)},expression:"newVideo.free_media_url"}})],1),i("el-form-item",{attrs:{label:"缩略图",prop:"img3"}},[i("el-input",{model:{value:e.newVideo.img3,callback:function(t){e.$set(e.newVideo,"img3",t)},expression:"newVideo.img3"}}),0!==e.percentage?i("el-progress",{attrs:{percentage:e.percentage}}):e._e(),i("el-upload",{attrs:{action:e.baseUpload+"/upload","list-type":"picture-card","show-file-list":!1,"on-progress":e.handleProgress,"on-success":e.handleSuccess}},[e.newVideo.img3?i("img",{attrs:{width:"150",height:"150",src:e.newVideo.img3,alt:""}}):i("i",{staticClass:"el-icon-plus"})])],1),i("el-form-item",{attrs:{label:"首页大图",prop:"img4"}},[i("el-input",{model:{value:e.newVideo.img4,callback:function(t){e.$set(e.newVideo,"img4",t)},expression:"newVideo.img4"}})],1),i("el-form-item",{attrs:{label:"竖图",prop:"img1"}},[i("el-input",{model:{value:e.newVideo.img1,callback:function(t){e.$set(e.newVideo,"img1",t)},expression:"newVideo.img1"}})],1),i("el-form-item",{attrs:{label:"简介"}},[i("el-input",{attrs:{autosize:{minRows:2,maxRows:4},type:"textarea",placeholder:"输入简介.."},model:{value:e.newVideo.desc,callback:function(t){e.$set(e.newVideo,"desc",t)},expression:"newVideo.desc"}})],1)],1),i("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{attrs:{type:"primary"},on:{click:function(t){"create"===e.dialogStatus?e.createData():e.updateData()}}},[e._v(" 提交 ")]),i("el-button",{on:{click:function(t){e.dialogFormVisible=!1}}},[e._v(" 取消 ")])],1)],1)],1)},a=[],l=(i("c740"),i("13d5"),i("a434"),i("093a")),o=i("6724"),s=i("333d"),r=function(){var e=this,t=e.$createElement;e._self._c;return e._m(0)},c=[function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"video-player"},[i("div",{attrs:{id:"mse"}})])}],u=(i("5392"),i("9000")),d=i.n(u),p={props:{url:{default:""},poster:{default:""}},data:function(){return{player:null}},mounted:function(){this.player=new d.a({id:"mse",url:this.url,poster:this.poster,playbackRate:[.5,.75,1,1.5,2,10],fluid:!0})},methods:{deleteVideo:function(){this.player.destroy(!0)}}},f=p,m=i("2877"),h=Object(m["a"])(f,r,c,!1,null,"3fe8659a",null),b=h.exports,_=["下线","上线"],v=["普通","推荐"],y=["普通","首页"],w=[{key:1,display_name:"电影"},{key:2,display_name:"电视剧"},{key:3,display_name:"短视频"},{key:4,display_name:"直播"}],g=w.reduce((function(e,t){return e[t.key]=t.display_name,e}),{}),k={name:"VideoList",components:{Pagination:s["a"],videoPlayer:b},directives:{waves:o["a"]},filters:{typeFilter:function(e){return g[e]},isCheckFilter:function(e){return _[e]},betterShowFilter:function(e){return v[e]},homeShowFilter:function(e){return y[e]}},data:function(){return{tableKey:0,list:null,total:0,listLoading:!0,listQuery:{page:1,limit:20,view_type:void 0,video_type:void 0,name:void 0,varieties:0,sort:"id desc"},isVarieties:[{key:0,label:"否"},{key:1,label:"是"}],typesOptions:[],viewTypeOptions:w,showPlays:!1,showLikes:!1,showDislikes:!1,showTariffVip:!1,showTariffUsr:!1,showCreateTime:!1,showReleaseTime:!1,openSort:!1,newVideo:{},dialogFormVisible:!1,dialogStatus:"",textMap:{update:"编辑",create:"创建"},dialogVisible:!1,dialogImg3:"",dialogVideo:"",rules:{name:[{required:!0,message:"请输入片名",trigger:"blur"}],tid:[{required:!0,message:"请选择分类",trigger:"blur"}],img3:[{required:!0,message:"请输入缩略图",trigger:"blur"}],media_url:[{required:!0,message:"请输入试看片源",trigger:"blur"}],free_media_url:[{required:!0,message:"请输入试看片源",trigger:"blur"}],tariff_usr:[{required:!0,message:"请设置一个价格",trigger:"blur"}],tariff_vip:[{required:!0,message:"请设置一个VIP价格",trigger:"blur"}]},percentage:0,baseUpload:""}},created:function(){this.baseUpload=this.$store.state.user.base_upload,this.getList()},methods:{getList:function(){var e=this;this.listLoading=!0,Object(l["n"])(this.listQuery).then((function(t){e.total=t.data.total,e.typesOptions=t.data.types,e.list=t.data.list,e.listLoading=!1}))},takeViewType:function(e){return g[e]},handleFilter:function(){this.listQuery.page=1,this.getList()},sortChange:function(e){var t=e.prop,i=e.order;this.listQuery.sort="ascending"===i?t:t+" desc",this.handleFilter()},handleUpdate:function(e){var t=this;this.newVideo=Object.assign({},e),this.newVideo.release_time=new Date(this.newVideo.release_time),this.newVideo.view_type=parseInt(this.newVideo.view_type),this.dialogStatus="update",this.dialogFormVisible=!0,this.percentage=0,this.$nextTick((function(){t.$refs["dataForm"].clearValidate()}))},handleRank:function(e){var t=this;this.listLoading=!0,Object(l["f"])(e).then((function(){t.listLoading=!1,t.$notify({title:"Success",message:"操作成功",type:"success",duration:2e3})})).catch((function(){t.listLoading=!1}))},updateData:function(){var e=this;this.$refs["dataForm"].validate((function(t){if(t){var i=Object.assign({},e.newVideo);i.release_time=+new Date(i.release_time),Object(l["x"])(i).then((function(){var t=e.list.findIndex((function(t){return t.id===e.newVideo.id}));e.list.splice(t,1,e.newVideo),e.dialogFormVisible=!1,e.$notify({title:"Success",message:"操作成功",type:"success",duration:2e3})}))}}))},handleDelete:function(e,t){var i=this;this.$confirm("此操作将回收该视频, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){i.listLoading=!0,Object(l["m"])(e).then((function(){i.list.splice(t,1),i.listLoading=!1,i.$notify({title:"Success",message:"操作成功",type:"success",duration:2e3})})).catch((function(){i.listLoading=!1}))})).catch((function(){i.$message({type:"info",message:"已取消删除"})}))},getSortClass:function(){var e=this.listQuery.sort;return"id"===e?"ascending":"descending"},handleCheckStatus:function(e,t){var i=this;this.listLoading=!0,e.is_check=t,Object(l["b"])(e).then((function(){i.listLoading=!1,i.$notify({title:"Success",message:"操作成功",type:"success",duration:2e3})})).catch((function(){i.listLoading=!1}))},handleBetterStatus:function(e,t){e.better_show=t},handleHomeStatus:function(e,t){e.home_show=t},handleSort:function(){this.openSort=!0},handleSortCancel:function(){this.getList(),this.openSort=!1},handleSortConfirm:function(){var e=this;if(this.listLoading=!0,this.list){var t=Object.assign({},this.list);Object(l["y"])(t).then((function(t){e.openSort=!1,e.listLoading=!1,e.$notify({title:"成功",message:t.message,type:"success",duration:2e3})})).catch((function(){e.listLoading=!1}))}},handleVarieties:function(e){this.listQuery.varieties=e,this.getList()},handleCreate:function(e,t){var i=this;this.newVideo={tid:[],view_type:1},this.dialogStatus="create",this.dialogFormVisible=!0,this.percentage=0,this.$nextTick((function(){i.$refs["dataForm"].clearValidate()}))},createData:function(){var e=this;this.$refs["dataForm"].validate((function(t){t&&Object(l["h"])(e.newVideo).then((function(){e.dialogFormVisible=!1,e.getList(),e.$notify({title:"Success",message:"创建成功",type:"success",duration:2e3})}))}))},handleClearCache:function(){var e=this;Object(l["c"])().then((function(){e.$notify({title:"Success",message:"清除成功",type:"success",duration:2e3})}))},handleOpenImg3:function(e,t){this.dialogImg3="",this.dialogVisible=!0,this.dialogImg3=e,this.dialogVideo=t},closeDialog:function(){this.dialogVisible=!1,this.$refs.videoPlayer.deleteVideo()},handleSuccess:function(e){var t=this.baseUpload+e.url;this.$set(this.newVideo,"img3",t)},handleProgress:function(e){this.percentage=e.percent},handlePushVideo:function(e,t){var i=this;this.$confirm("此操作将推送视频, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){i.listLoading=!0,Object(l["p"])(e).then((function(){i.listLoading=!1,i.$notify({title:"Success",message:"操作成功",type:"success",duration:2e3})})).catch((function(){i.listLoading=!1}))})).catch((function(){i.$message({type:"info",message:"已取消删除"})}))}}},V=k,x=Object(m["a"])(V,n,a,!1,null,null,null);t["default"]=x.exports}}]); |