(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-f00febf4"],{"09f4":function(t,e,a){"use strict";a.d(e,"a",(function(){return l})),Math.easeInOutQuad=function(t,e,a,n){return t/=n/2,t<1?a/2*t*t+e:(t--,-a/2*(t*(t-2)-1)+e)};var n=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(t){window.setTimeout(t,1e3/60)}}();function i(t){document.documentElement.scrollTop=t,document.body.parentNode.scrollTop=t,document.body.scrollTop=t}function o(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function l(t,e,a){var l=o(),r=t-l,s=20,c=0;e="undefined"===typeof e?500:e;var u=function(){c+=s;var t=Math.easeInOutQuad(c,l,r,e);i(t),c0,expression:"total > 0"}],attrs:{total:t.total,page:t.listQuery.page,limit:t.listQuery.limit},on:{"update:page":function(e){return t.$set(t.listQuery,"page",e)},"update:limit":function(e){return t.$set(t.listQuery,"limit",e)},pagination:t.getList}}),a("el-dialog",{attrs:{title:"修改排班",visible:t.dialogWork},on:{"update:visible":function(e){t.dialogWork=e}}},[a("el-form",{attrs:{"label-width":"120px",model:t.item}},[a("el-form-item",{attrs:{label:"上班时间"}},[a("el-date-picker",{attrs:{type:"datetimerange","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期"},model:{value:t.item.date,callback:function(e){t.$set(t.item,"date",e)},expression:"item.date"}})],1),a("el-form-item",{attrs:{label:"渠道"}},[a("el-checkbox-group",{model:{value:t.item.oss,callback:function(e){t.$set(t.item,"oss",e)},expression:"item.oss"}},t._l(t.oss,(function(e,n,i){return a("el-checkbox",{key:i,attrs:{label:n}},[t._v(t._s(e))])})),1)],1)],1),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.onSave()}}},[t._v("保 存")])],1)],1),a("el-dialog",{attrs:{title:"主播排班表",visible:t.dialogCreate},on:{"update:visible":function(e){t.dialogCreate=e}}},[a("el-form",{attrs:{"label-width":"120px"}},t._l(t.anchors,(function(e){return a("el-row",{key:e.id,staticStyle:{"margin-bottom":"10px"}},[a("el-col",{attrs:{span:2}},[t._v(t._s(e.name))]),a("el-col",{attrs:{span:14}},[a("el-date-picker",{staticStyle:{width:"90%"},attrs:{type:"datetimerange","range-separator":"至","start-placeholder":"开始日期","default-time":["07:00:00","23:59:59"],"end-placeholder":"结束日期"},model:{value:e.times,callback:function(a){t.$set(e,"times",a)},expression:"an.times"}})],1),a("el-col",{attrs:{span:8}},[a("el-checkbox-group",{model:{value:e.os,callback:function(a){t.$set(e,"os",a)},expression:"an.os"}},t._l(t.oss,(function(e,n,i){return a("el-checkbox",{key:i,attrs:{label:n}},[t._v(t._s(e))])})),1)],1)],1)})),1),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],attrs:{type:"primary"},on:{click:function(e){return t.onSaves()}}},[t._v("保 存")])],1)],1)],1)},i=[],o=a("333d"),l={name:"Works",components:{Pagination:o["a"]},data:function(){return{oss:{},list:null,total:0,listLoading:!0,loading:!1,listQuery:{page:1,limit:20},dialogWork:!1,dialogCreate:!1,item:{},anchors:[]}},created:function(){this.getList()},methods:{getList:function(){var t=this;this.$axios.get("/admin/work/index",{params:this.listQuery}).then((function(e){t.list=e.data.data,t.total=e.data.total,t.oss=e.ext.oss,t.listLoading=!1})).catch((function(t){}))},onDel:function(t){var e=this;this.$axios.post("/admin/work/del",{id:t.id}).then((function(t){e.dialogVisible=!1,e.getList()})).catch((function(t){}))},onSave:function(t){var e=this;if(t)return this.$set(t,"date",[new Date(t.start),new Date(t.end)]),this.item=t,this.item.os=t.os+"",void(this.dialogWork=!0);this.$axios.post("/admin/work/save",this.item).then((function(t){e.dialogWork=!1,e.getList()})).catch((function(t){}))},onAdd:function(){var t=this;this.$axios.get("/admin/work/anchor").then((function(e){t.anchors=e.data||[],t.dialogCreate=!0})).catch((function(t){}))},onSaves:function(){var t=this;this.loading||(this.loading=!0,this.$axios.post("/admin/work/save2",this.anchors).then((function(e){t.dialogCreate=!1,t.loading=!1})).catch((function(e){t.loading=!1})))}}},r=l,s=a("2877"),c=Object(s["a"])(r,n,i,!1,null,null,null);e["default"]=c.exports}}]);