chunk-2595.54c294ce.js 6.8 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-2595"],{"/f1G":function(t,n,e){t.exports={default:e("nhzr"),__esModule:!0}},"3lhM":function(t,n,e){var i=e("WdFS");"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);(0,e("SZ7m").default)("323884ec",i,!0,{})},"501W":function(t,n,e){(t.exports=e("I1BE")(!1)).push([t.i,"\n.pagination-container[data-v-3263d747] {\n background: #fff;\n padding: 32px 16px;\n}\n.pagination-container.hidden[data-v-3263d747] {\n display: none;\n}\n",""])},"8/l1":function(t,n,e){"use strict";var i=e("lRWl");e.n(i).a},AFmF:function(t,n,e){"use strict";var i=e("3lhM");e.n(i).a},E8gZ:function(t,n,e){var i=e("jmDH"),a=e("w6GO"),o=e("NsO/"),r=e("NV0k").f;t.exports=function(t){return function(n){for(var e,l=o(n),s=a(l),c=s.length,u=0,d=[];c>u;)e=s[u++],i&&!r.call(l,e)||d.push(t?[e,l[e]]:l[e]);return d}}},FOy6:function(t,n,e){"use strict";e.r(n);var i=e("QbLZ"),a=e.n(i),o=e("L2JU"),r=e("Y5bG"),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,100,200]}},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)},pager:function(){return this.currentPage}}},methods:{handleSizeChange:function(t){this.$emit("pagination",{page:this.currentPage,limit:t}),this.autoScroll&&Object(r.a)(0,800)},handleCurrentChange:function(t){this.$emit("pagination",{page:t,limit:this.pageSize}),this.autoScroll&&Object(r.a)(0,800)}}},s=(e("8/l1"),e("KHd+")),c=Object(s.a)(l,function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("div",{staticClass:"pagination-container",class:{hidden:t.hidden}},[e("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(n){t.currentPage=n},"update:pageSize":function(n){t.pageSize=n},"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}},"el-pagination",t.$attrs,!1))],1)},[],!1,null,"3263d747",null);c.options.__file="index.vue";var u=c.exports,d=e("wk8/"),p=e("NOnC"),f={name:"ActivityList",components:{Pagination:u},data:function(){return{listLoading:!1,activityList:[],dialogVisible:!1,contractInfo:{},searchForm:{page:1,limit:30},total:0}},computed:a()({},Object(o.b)(["roles","userInfo"])),created:function(){this.DateFormat=p.a,this.loadActivityList()},methods:{loadActivityList:function(){var t=this;this.listLoading=!0,Object(d.c)(this.searchForm).then(function(n){200===n.data.code?(t.activityList=n.data.data.list,t.total=n.data.data.total-0):t.$message.error(n.data.msg),t.listLoading=!1})},handleDel:function(t){var n=this;this.$confirm("此操作将永久删除, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){n.listLoading=!0,Object(d.a)({activity_id:t}).then(function(t){200===t.data.code?(n.$message.success("删除成功"),n.loadActivityList()):(n.listLoading=!1,n.$message.error(t.data.msg))})}).catch(function(){})}}},g=(e("AFmF"),Object(s.a)(f,function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("div",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],staticClass:"app-container"},[e("div",{staticClass:"filter-container"},[-1!=t.roles.indexOf("wxapp")?e("router-link",{staticClass:"link-type",attrs:{to:"/activity/create/"}},[e("el-button",{staticClass:"filter-item",attrs:{type:"primary",icon:"el-icon-plus",size:"mini"}},[t._v("新建活动")])],1):t._e()],1),t._v(" "),e("el-table",{staticStyle:{width:"100%"},attrs:{data:t.activityList,border:"",fit:"","highlight-current-row":""}},[e("el-table-column",{attrs:{prop:"title",label:"标题"},scopedSlots:t._u([{key:"default",fn:function(n){return[e("router-link",{staticClass:"link-type",attrs:{to:"/activity/edit/"+n.row.activity_id}},[e("span",[t._v(t._s(n.row.title))])])]}}])}),t._v(" "),e("el-table-column",{attrs:{width:"180px",align:"center",label:"活动期限"},scopedSlots:t._u([{key:"default",fn:function(n){return[e("span",[t._v(t._s(0==n.row.start_time&&0==n.row.end_time?"长期":t.DateFormat(new Date(1e3*n.row.start_time),"yyyy-MM-dd")+" - "+t.DateFormat(new Date(1e3*n.row.end_time),"yyyy-MM-dd")))])]}}])}),t._v(" "),e("el-table-column",{attrs:{width:"180px",align:"center",label:"创建时间"},scopedSlots:t._u([{key:"default",fn:function(n){return[e("span",[t._v(t._s(t._f("parseTime")(n.row.time,"{y}-{m}-{d} {h}:{i}")))])]}}])}),t._v(" "),e("el-table-column",{attrs:{align:"center",label:"操作",width:"100"},scopedSlots:t._u([{key:"default",fn:function(n){return[e("el-button",{attrs:{type:"danger",icon:"el-icon-delete",circle:""},on:{click:function(e){t.handleDel(n.row.activity_id)}}})]}}])})],1),t._v(" "),e("pagination",{staticStyle:{margin:"0"},attrs:{total:t.total,page:t.searchForm.page,limit:t.searchForm.limit},on:{"update:page":function(n){t.$set(t.searchForm,"page",n)},"update:limit":function(n){t.$set(t.searchForm,"limit",n)},pagination:t.loadActivityList}})],1)},[],!1,null,"c30c0e6a",null));g.options.__file="list.vue";n.default=g.exports},WdFS:function(t,n,e){(t.exports=e("I1BE")(!1)).push([t.i,"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",""])},Y5bG:function(t,n,e){"use strict";e.d(n,"a",function(){return a}),Math.easeInOutQuad=function(t,n,e,i){return(t/=i/2)<1?e/2*t*t+n:-e/2*(--t*(t-2)-1)+n};var i=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(t){window.setTimeout(t,1e3/60)};function a(t,n,e){var a=document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop,o=t-a,r=0;n=void 0===n?500:n;!function t(){r+=20,function(t){document.documentElement.scrollTop=t,document.body.parentNode.scrollTop=t,document.body.scrollTop=t}(Math.easeInOutQuad(r,a,o,n)),r<n?i(t):e&&"function"==typeof e&&e()}()}},fW1p:function(t,n,e){var i=e("Y7ZC"),a=e("E8gZ")(!1);i(i.S,"Object",{values:function(t){return a(t)}})},"gDS+":function(t,n,e){t.exports={default:e("oh+g"),__esModule:!0}},lRWl:function(t,n,e){var i=e("501W");"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);(0,e("SZ7m").default)("f33e33b8",i,!0,{})},nhzr:function(t,n,e){e("fW1p"),t.exports=e("WEpk").Object.values},"oh+g":function(t,n,e){var i=e("WEpk"),a=i.JSON||(i.JSON={stringify:JSON.stringify});t.exports=function(t){return a.stringify.apply(a,arguments)}}}]);