travel/service/public/static/js/chunk-f00febf4.8339be8a.js

1 line
8.9 KiB
JavaScript

(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),c<e?n(u):a&&"function"===typeof a&&a()};u()}},"2cbf":function(t,e,a){"use strict";a("73e0")},"333d":function(t,e,a){"use strict";var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"pagination-container",class:{hidden:t.hidden}},[a("el-pagination",t._b({attrs:{background:t.background,"current-page":t.currentPage,"page-size":t.pageSize,layout:t.layout,"page-sizes":t.pageSizes,total:t.total},on:{"update:currentPage":function(e){t.currentPage=e},"update:current-page":function(e){t.currentPage=e},"update:pageSize":function(e){t.pageSize=e},"update:page-size":function(e){t.pageSize=e},"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}},"el-pagination",t.$attrs,!1))],1)},i=[],o=(a("a9e3"),a("09f4")),l={name:"Pagination",props:{total:{required:!0,type:Number},page:{type:Number,default:1},limit:{type:Number,default:20},pageSizes:{type:Array,default:function(){return[10,20,30,50]}},layout:{type:String,default:"total, sizes, prev, pager, next, jumper"},background:{type:Boolean,default:!0},autoScroll:{type:Boolean,default:!0},hidden:{type:Boolean,default:!1}},computed:{currentPage:{get:function(){return this.page},set:function(t){this.$emit("update:page",t)}},pageSize:{get:function(){return this.limit},set:function(t){this.$emit("update:limit",t)}}},methods:{handleSizeChange:function(t){this.$emit("pagination",{page:this.currentPage,limit:t}),this.autoScroll&&Object(o["a"])(0,800)},handleCurrentChange:function(t){this.$emit("pagination",{page:t,limit:this.pageSize}),this.autoScroll&&Object(o["a"])(0,800)}}},r=l,s=(a("2cbf"),a("2877")),c=Object(s["a"])(r,n,i,!1,null,"6af373ef",null);e["a"]=c.exports},"73e0":function(t,e,a){},da0f:function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"app-container"},[a("div",{staticClass:"filter-container"},[a("el-input",{staticClass:"filter-item",staticStyle:{width:"200px","margin-right":"10px"},attrs:{placeholder:"用户名"},model:{value:t.listQuery.username,callback:function(e){t.$set(t.listQuery,"username",e)},expression:"listQuery.username"}}),a("el-button",{staticClass:"filter-item",attrs:{type:"primary",icon:"el-icon-search"},on:{click:t.getList}},[t._v(" 搜索 ")]),a("el-button",{staticClass:"filter-item",attrs:{type:"primary",icon:"el-icon-circle-plus"},on:{click:t.onAdd}},[t._v(" 添加主播排班 ")])],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],staticStyle:{width:"100%"},attrs:{data:t.list,border:"",fit:"","highlight-current-row":""}},[a("el-table-column",{attrs:{align:"center",fixed:"",label:"操作",width:"220"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"danger",size:"small",icon:"el-icon-delete-solid"},on:{click:function(a){return t.onDel(e.row)}}},[t._v(" 删除 ")]),a("el-button",{attrs:{type:"primary",size:"small",icon:"el-icon-edit"},on:{click:function(a){return t.onSave(e.row)}}},[t._v(" 修改 ")])]}}])}),a("el-table-column",{attrs:{align:"center",label:"ID",width:"80"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row.id))])]}}])}),a("el-table-column",{attrs:{align:"center",label:"用户名",width:"160"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row.admin.username))])]}}])}),a("el-table-column",{attrs:{align:"center",label:"姓名",width:"160"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row.admin.name))])]}}])}),a("el-table-column",{attrs:{align:"center",label:"排班时间"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(t._f("parseTime")(e.row.start,"{y}-{m}-{d} {h}:{i}"))+" - "+t._s(t._f("parseTime")(e.row.end,"{y}-{m}-{d} {h}:{i}"))+" ")]}}])}),a("el-table-column",{attrs:{align:"center",label:"平台"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._l(e.row.os,(function(e){return[t._v(" "+t._s(t.oss[e])+" ")]}))]}}])}),a("el-table-column",{attrs:{align:"center",label:"订单金额"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(e.row.total/100)+" ")]}}])}),a("el-table-column",{attrs:{width:"140px",align:"center",label:"创建时间"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t._f("parseTime")(e.row.create_time,"{y}-{m}-{d} {h}:{i}")))])]}}])}),a("el-table-column",{attrs:{width:"140px",align:"center",label:"修改时间"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t._f("parseTime")(e.row.update_time,"{y}-{m}-{d} {h}:{i}")))])]}}])})],1),a("pagination",{directives:[{name:"show",rawName:"v-show",value:t.total>0,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}}]);