travel/service/public/static/js/chunk-2b905db8.e175341d.js

1 line
6.3 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2b905db8"],{"09f4":function(t,e,n){"use strict";n.d(e,"a",(function(){return l})),Math.easeInOutQuad=function(t,e,n,i){return t/=i/2,t<1?n/2*t*t+e:(t--,-n/2*(t*(t-2)-1)+e)};var i=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(t){window.setTimeout(t,1e3/60)}}();function a(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,n){var l=o(),r=t-l,s=20,u=0;e="undefined"===typeof e?500:e;var c=function(){u+=s;var t=Math.easeInOutQuad(u,l,r,e);a(t),u<e?i(c):n&&"function"===typeof n&&n()};c()}},"0c30":function(t,e,n){"use strict";n("4398")},4398:function(t,e,n){},"5c84":function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"app-container"},[n("div",{staticClass:"mb10"},[n("el-button",{staticClass:"filter-item",attrs:{size:"small",type:"primary"},on:{click:function(e){return t.handleAdd("")}}},[t._v("添加")])],1),n("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":""}},[n("el-table-column",{attrs:{align:"center",fixed:"",width:"200",label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-button",{staticClass:"filter-item",attrs:{size:"small",type:"primary"},on:{click:function(n){return t.handleAdd(e.row)}}},[t._v("编辑")])]}}])}),n("el-table-column",{attrs:{align:"center",fixed:"",label:"标题",prop:"title"}}),n("el-table-column",{attrs:{align:"center",fixed:"",label:"内容",prop:"content"}})],1),n("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}}),n("el-dialog",{attrs:{title:t.dialogTitle,visible:t.dialog2Visible},on:{"update:visible":function(e){t.dialog2Visible=e}}},[n("el-form",{ref:"addForm",attrs:{"label-width":"160px",model:t.form,rules:t.rules}},[n("el-form-item",{attrs:{label:"标题",prop:"title"}},[n("el-input",{attrs:{placeholder:"请输入标题"},model:{value:t.form.title,callback:function(e){t.$set(t.form,"title",e)},expression:"form.title"}})],1),n("el-form-item",{attrs:{label:"内容",prop:"content"}},[n("el-input",{attrs:{placeholder:"请输入内容"},model:{value:t.form.content,callback:function(e){t.$set(t.form,"content",e)},expression:"form.content"}})],1)],1),n("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.onPass(t.form)}}},[t._v("保 存")])],1)],1)],1)},a=[],o=n("67f2"),l={name:"Announlist",components:{Pagination:o["a"]},data:function(){return{active:"follow",order_status:["#9e9f9c","#04bcd9","#fc9904","#1193f4","#48b14b","#eb1662","#9d1cb5"],follow_status:["#9e9f9c","#04bcd9","#fc9904","#1193f4","#48b14b","#eb1662"],options:[],value:null,next_follow:null,list:[],total:0,listLoading:!0,listQuery:{page:1,limit:10,times:[],status:null,admin:null,zhubo:null,os_status:[]},item:{next_follow:"",personnel:{}},follow:[],dialog2Visible:!1,oss:[],dialogTitle:"添加",adminList:[],form:{title:"",content:""},rules:{title:[{required:!0,message:"请输入标题",trigger:"change"}]}}},created:function(){this.listQuery.zhubo=this.$route.query.zhubo||null,this.$route.query.start&&this.$route.query.end&&(this.listQuery.times=[this.$route.query.start,this.$route.query.end]),this.getList()},methods:{getList:function(t){var e=this;this.$axios.get("/admin/announcements/index",{params:this.listQuery}).then((function(t){e.list=t.data.data,e.total=t.data.total,e.listLoading=!1}))},handleAdd:function(t){var e=this;this.dialog2Visible=!0,this.$nextTick((function(){e.$refs["addForm"].resetFields(),t&&(e.dialogTitle="编辑",e.form={title:t.title,content:t.content,id:t.id})}))},onPass:function(){var t=this;this.$refs.addForm.validate((function(e){if(!e)return!1;t.$axios.post("编辑"==t.dialogTitle?"/admin/announcements/edit":"/admin/announcements/add",t.form).then((function(e){t.$message({message:"编辑"==t.dialogTitle?"编辑成功":"添加成功",type:"success"}),t.dialog2Visible=!1,t.getList()}))}))},resetForm:function(t){this.$refs[t].resetFields()}}},r=l,s=(n("0c30"),n("2877")),u=Object(s["a"])(r,i,a,!1,null,"463422f0",null);e["default"]=u.exports},"67f2":function(t,e,n){"use strict";var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"pagination-container",class:{hidden:t.hidden}},[n("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)},a=[],o=(n("a9e3"),n("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=(n("7d30"),n("2877")),u=Object(s["a"])(r,i,a,!1,null,"28fdfbeb",null);e["a"]=u.exports},"7a17":function(t,e,n){},"7d30":function(t,e,n){"use strict";n("7a17")}}]);