(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-425b0f0c"],{"093a":function(e,t,i){"use strict";i.d(t,"h",(function(){return a})),i.d(t,"n",(function(){return o})),i.d(t,"x",(function(){return r})),i.d(t,"y",(function(){return s})),i.d(t,"b",(function(){return l})),i.d(t,"m",(function(){return c})),i.d(t,"p",(function(){return d})),i.d(t,"r",(function(){return u})),i.d(t,"v",(function(){return m})),i.d(t,"w",(function(){return p})),i.d(t,"g",(function(){return f})),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 g})),i.d(t,"q",(function(){return y})),i.d(t,"f",(function(){return w})),i.d(t,"k",(function(){return k})),i.d(t,"u",(function(){return S})),i.d(t,"c",(function(){return x})),i.d(t,"o",(function(){return V})),i.d(t,"e",(function(){return C})),i.d(t,"t",(function(){return O})),i.d(t,"j",(function(){return j}));var n=i("b775");function a(e){return Object(n["a"])({url:"/api/admin/video/create",method:"post",data:e})}function o(e){return Object(n["a"])({url:"/api/admin/video/video_list",method:"get",params:e})}function r(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 l(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 d(e){return Object(n["a"])({url:"/api/admin/video/push",method:"post",data:e})}function u(e){return Object(n["a"])({url:"/api/admin/video/type_list",method:"get",params:e})}function m(e){return Object(n["a"])({url:"/api/admin/video/update_type",method:"post",data:e})}function p(e){return Object(n["a"])({url:"/api/admin/video/update_type_all",method:"post",data:e})}function f(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 g(e){return Object(n["a"])({url:"/api/admin/video/create_actor",method:"post",data:e})}function y(e){return Object(n["a"])({url:"/api/admin/video/rank_list",method:"get",params:e})}function w(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 S(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 V(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 j(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 r})),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 o(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function r(e,t,i){var r=o(),s=e-r,l=20,c=0;t="undefined"===typeof t?500:t;var d=function e(){c+=l;var o=Math.easeInOutQuad(c,r,s,t);a(o),c<t?n(e):i&&"function"===typeof i&&i()};d()}},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),o=a.ele;if(o){o.style.position="relative",o.style.overflow="hidden";var r=o.getBoundingClientRect(),s=o.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(r.width,r.height)+"px",o.appendChild(s)),a.type){case"center":s.style.top=r.height/2-s.offsetHeight/2+"px",s.style.left=r.width/2-s.offsetWidth/2+"px";break;default:s.style.top=(i.pageY-r.top-s.offsetHeight/2-document.documentElement.scrollTop||document.body.scrollTop)+"px",s.style.left=(i.pageX-r.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 o={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]}},r=function(e){e.directive("waves",o)};window.Vue&&(window.waves=o,Vue.use(r)),o.install=r;t["a"]=o},7314: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:"名字"},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-button",{staticClass:"filter-item",attrs:{type:"primary",icon:"el-icon-search"},on:{click:e.handleFilter}},[e._v(" 搜索 ")]),i("el-button",{staticClass:"filter-item",staticStyle:{"margin-left":"10px"},attrs:{type:"primary",icon:"el-icon-edit"},on:{click:e.handleCreate}},[e._v(" 创建 ")]),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-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(" 创建时间 ")])],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:"状态",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){e.openSort&&e.handleModifyStatus(n,"is_check",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){e.openSort&&e.handleModifyStatus(n,"is_check",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:"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.handleModifyStatus(n,"home_show",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.handleModifyStatus(n,"home_show",1)}}},[e._v(" "+e._s(e._f("homeShowFilter")(n.home_show))+" ")]):e._e()]}}])}),i("el-table-column",{attrs:{width:"70px",label:"推荐",align:"center",prop:"index_order",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.index_order,callback:function(t){e.$set(n,"index_order",t)},expression:"row.index_order"}})]:i("span",[e._v(e._s(n.index_order))])]}}])}),i("el-table-column",{attrs:{label:"推荐",align:"center",width:"80","class-name":"small-padding fixed-width",prop:"is_recommend",sortable:"custom"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[1==n.is_recommend?i("el-button",{attrs:{size:"mini",type:"success"},on:{click:function(t){e.openSort&&e.handleModifyStatus(n,"is_recommend",0)}}},[e._v(" "+e._s(e._f("betterShowFilter")(n.is_recommend))+" ")]):e._e(),0==n.is_recommend?i("el-button",{attrs:{size:"mini",type:"draft"},on:{click:function(t){e.openSort&&e.handleModifyStatus(n,"is_recommend",1)}}},[e._v(" "+e._s(e._f("betterShowFilter")(n.is_recommend))+" ")]):e._e()]}}])}),i("el-table-column",{attrs:{label:"搜索",align:"center",width:"80","class-name":"small-padding fixed-width",prop:"is_search",sortable:"custom"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[1==n.is_search?i("el-button",{attrs:{size:"mini",type:"success"},on:{click:function(t){e.openSort&&e.handleModifyStatus(n,"is_search",0)}}},[e._v(" "+e._s(e._f("homeShowFilter")(n.is_search))+" ")]):e._e(),0==n.is_search?i("el-button",{attrs:{size:"mini",type:"draft"},on:{click:function(t){e.openSort&&e.handleModifyStatus(n,"is_search",1)}}},[e._v(" "+e._s(e._f("homeShowFilter")(n.is_search))+" ")]):e._e()]}}])}),i("el-table-column",{attrs:{width:"70px",label:"搜索",align:"center",prop:"search_order",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.search_order,callback:function(t){e.$set(n,"search_order",t)},expression:"row.search_order"}})]:i("span",[e._v(e._s(n.search_order))])]}}])}),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(),i("el-table-column",{attrs:{label:"操作",align:"center",width:"200","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(" 编辑 ")]),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("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",staticStyle:{width:"400px","margin-left":"50px"},attrs:{rules:e.rules,model:e.newVideo,"label-position":"left","label-width":"70px"}},[i("el-form-item",{attrs:{label:"视频分类",prop:"name"}},[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:"img"}},[i("el-input",{model:{value:e.newVideo.img,callback:function(t){e.$set(e.newVideo,"img",t)},expression:"newVideo.img"}})],1),i("el-form-item",{attrs:{label:"分类大图",prop:"type_img"}},[i("el-input",{model:{value:e.newVideo.type_img,callback:function(t){e.$set(e.newVideo,"type_img",t)},expression:"newVideo.type_img"}})],1),i("el-form-item",{attrs:{label:"是否开启",prop:"is_check"}},[i("el-select",{staticClass:"filter-item",attrs:{placeholder:"是否开启"},model:{value:e.newVideo.is_check,callback:function(t){e.$set(e.newVideo,"is_check",t)},expression:"newVideo.is_check"}},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:"home_show"}},[i("el-select",{staticClass:"filter-item",attrs:{placeholder:"是否首页"},model:{value:e.newVideo.home_show,callback:function(t){e.$set(e.newVideo,"home_show",t)},expression:"newVideo.home_show"}},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:"is_recommend"}},[i("el-select",{staticClass:"filter-item",attrs:{placeholder:"是否推荐"},model:{value:e.newVideo.is_recommend,callback:function(t){e.$set(e.newVideo,"is_recommend",t)},expression:"newVideo.is_recommend"}},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:"is_search"}},[i("el-select",{staticClass:"filter-item",attrs:{placeholder:"是否搜索"},model:{value:e.newVideo.is_search,callback:function(t){e.$set(e.newVideo,"is_search",t)},expression:"newVideo.is_search"}},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:"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)],1),i("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:function(t){e.dialogFormVisible=!1}}},[e._v(" 取消 ")]),i("el-button",{attrs:{type:"primary"},on:{click:function(t){"create"===e.dialogStatus?e.createData():e.updateData()}}},[e._v(" 提交 ")])],1)],1)],1)},a=[],o=(i("c740"),i("a434"),i("093a")),r=i("6724"),s=i("333d"),l=["未通过","已审核"],c=["普通","推荐"],d=["否","是"],u={name:"VideoType",components:{Pagination:s["a"]},directives:{waves:r["a"]},filters:{isCheckFilter:function(e){return l[e]},betterShowFilter:function(e){return c[e]},homeShowFilter:function(e){return d[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,sort:"id desc"},showCreateTime:!1,openSort:!1,newVideo:{},dialogFormVisible:!1,dialogStatus:"",textMap:{update:"编辑",create:"创建"},isVarieties:[{key:0,label:"否"},{key:1,label:"是"}],rules:{name:[{required:!0,message:"请输入分类名称",trigger:"blur"}],img:[{required:!0,message:"请输入分类图片",trigger:"blur"}],varieties:[{required:!0,message:"请选择是否原创",trigger:"blur"}],home_show:[{required:!0,message:"请选择是否上首页",trigger:"blur"}],is_check:[{required:!0,message:"请选择是否上线",trigger:"blur"}],is_recommend:[{required:!0,message:"请选择是否推荐",trigger:"blur"}],is_search:[{required:!0,message:"请选择是否搜索",trigger:"blur"}],type_img:[{required:!0,message:"请输入分类大图",trigger:"blur"}]}}},created:function(){this.getList()},methods:{getList:function(){var e=this;this.listLoading=!0,Object(o["r"])(this.listQuery).then((function(t){e.total=t.data.total,e.list=t.data.list,e.listLoading=!1}))},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.dialogStatus="update",this.dialogFormVisible=!0,this.$nextTick((function(){t.$refs["dataForm"].clearValidate()}))},updateData:function(){var e=this;this.$refs["dataForm"].validate((function(t){if(t){var i=Object.assign({},e.newVideo);Object(o["v"])(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(o["l"])(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:"已取消删除"})}))},handleCreate:function(e,t){var i=this;this.newVideo={},this.dialogStatus="create",this.dialogFormVisible=!0,this.$nextTick((function(){i.$refs["dataForm"].clearValidate()}))},createData:function(){var e=this;this.$refs["dataForm"].validate((function(t){t&&Object(o["g"])(e.newVideo).then((function(){e.dialogFormVisible=!1,e.getList(),e.$notify({title:"Success",message:"创建成功",type:"success",duration:2e3})}))}))},getSortClass:function(){var e=this.listQuery.sort;return"id"===e?"ascending":"descending"},handleModifyStatus:function(e,t,i){this.$set(e,t,i)},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(o["w"])(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}))}}}},m=u,p=i("2877"),f=Object(p["a"])(m,n,a,!1,null,null,null);t["default"]=f.exports},"8d41":function(e,t,i){}}]);