chunk-0af06729.4f1caa4a.js 7.5 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0af06729"],{"09f4":function(t,e,n){"use strict";n.d(e,"a",function(){return i}),Math.easeInOutQuad=function(t,e,n,r){return t/=r/2,t<1?n/2*t*t+e:(t--,-n/2*(t*(t-2)-1)+e)};var r=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 i(t,e,n){var i=o(),s=t-i,u=20,c=0;e="undefined"===typeof e?500:e;var l=function t(){c+=u;var o=Math.easeInOutQuad(c,i,s,e);a(o),c<e?r(t):n&&"function"===typeof n&&n()};l()}},"3a73":function(t,e,n){"use strict";n.d(e,"c",function(){return a}),n.d(e,"b",function(){return o}),n.d(e,"a",function(){return i}),n.d(e,"d",function(){return s}),n.d(e,"g",function(){return u}),n.d(e,"f",function(){return c}),n.d(e,"h",function(){return l}),n.d(e,"e",function(){return m});var r=n("b775");function a(t){return Object(r["a"])({url:"/api-web/luckDrawGroup/list",method:"get",headers:{"content-type":"application/x-www-form-urlencoded"},data:{},params:t})}function o(t){return Object(r["a"])({url:"/api-web/luckDrawGroup/findAll",method:"get",headers:{"content-type":"application/x-www-form-urlencoded"},data:{},params:t})}function i(t){return Object(r["a"])({url:"/api-web/luckDrawGroup/add",method:"post",data:t})}function s(t){return Object(r["a"])({url:"/api-web/luckDrawGroup/update",method:"post",data:t})}function u(t){return Object(r["a"])({url:"/api-web/luckDrawPrize/list",method:"get",headers:{"content-type":"application/x-www-form-urlencoded"},data:{},params:t})}function c(t){return Object(r["a"])({url:"/api-web/luckDrawPrize/batchAdd",method:"post",data:t})}function l(t){return Object(r["a"])({url:"/api-web/luckDrawPrize/update",method:"post",data:t})}function m(t){return Object(r["a"])({url:"/api-web/luckDrawLog/rewardlist",method:"get",headers:{"content-type":"application/x-www-form-urlencoded"},data:{},params:t})}},9647:function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"m-container"},[t._m(0),t._v(" "),n("div",{directives:[{name:"permission",rawName:"v-permission",value:"luckDrawGroup/add",expression:"'luckDrawGroup/add'"}],staticClass:"newBand",on:{click:function(e){return t.onOperationLottery("create")}}},[t._v("添加")]),t._v(" "),n("el-form",{staticClass:"searchForm",attrs:{inline:!0},model:{value:t.searchForm,callback:function(e){t.searchForm="string"===typeof e?e.trim():e},expression:"searchForm"}},[n("el-form-item",[n("el-input",{attrs:{placeholder:"请输入活动名称"},model:{value:t.searchForm.search,callback:function(e){t.$set(t.searchForm,"search","string"===typeof e?e.trim():e)},expression:"searchForm.search"}})],1),t._v(" "),n("el-form-item",[n("el-button",{attrs:{type:"danger"},on:{click:t.getList}},[t._v("搜索")])],1)],1),t._v(" "),n("div",{staticClass:"tableWrap"},[n("el-table",{attrs:{data:t.tableList,"header-cell-style":{background:"#EDEEF0",color:"#444"}}},[n("el-table-column",{attrs:{align:"center",prop:"name",label:"活动名称"}}),t._v(" "),n("el-table-column",{attrs:{align:"center",prop:"startTime",label:"活动开始时间"}}),t._v(" "),n("el-table-column",{attrs:{align:"center",prop:"endTime",label:"活动结束时间"}}),t._v(" "),n("el-table-column",{attrs:{align:"center",label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"luckDrawGroup/update",expression:"'luckDrawGroup/update'"}],attrs:{type:"text"},on:{click:function(n){return t.onOperationLottery("update",e.row)}}},[t._v("修改")]),t._v(" "),n("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"/trophyManager",expression:"'/trophyManager'"}],attrs:{type:"text"},on:{click:function(n){return t.onLook(e.row)}}},[t._v("查看奖品")])]}}])})],1),t._v(" "),n("pagination",{attrs:{total:t.pageInfo.total,page:t.pageInfo.page,limit:t.pageInfo.limit,"page-sizes":t.pageInfo.page_size},on:{"update:page":function(e){return t.$set(t.pageInfo,"page",e)},"update:limit":function(e){return t.$set(t.pageInfo,"limit",e)},pagination:t.getList}})],1),t._v(" "),n("el-dialog",{attrs:{title:t.formTitle[t.formActionTitle],visible:t.lotteryStatus,width:"550px"},on:{"update:visible":function(e){t.lotteryStatus=e},close:function(e){return t.onFormClose("ruleForm")}}},[n("el-form",{ref:"ruleForm",attrs:{model:t.form,rules:t.rules,"label-width":"100PX"}},[n("el-form-item",{attrs:{label:"活动名称",prop:"name"}},[n("el-input",{attrs:{autocomplete:"off",placeholder:"请输入活动名称"},model:{value:t.form.name,callback:function(e){t.$set(t.form,"name","string"===typeof e?e.trim():e)},expression:"form.name"}})],1),t._v(" "),n("el-form-item",{attrs:{label:"活动时间",prop:"time"}},[n("el-date-picker",{staticStyle:{width:"100%"},attrs:{"picker-options":{firstDayOfWeek:1},type:"datetimerange","range-separator":"至","start-placeholder":"活动开始日期","end-placeholder":"活动结束日期"},model:{value:t.form.time,callback:function(e){t.$set(t.form,"time",e)},expression:"form.time"}})],1)],1),t._v(" "),n("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{on:{click:function(e){t.lotteryStatus=!1}}},[t._v("取 消")]),t._v(" "),n("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.onSubmit("ruleForm")}}},[t._v("确 定")])],1)],1)],1)},a=[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("h2",[n("div",{staticClass:"squrt"}),t._v("抽奖活动管理\n ")])}],o=(n("7f7f"),n("333d")),i=n("5a0c"),s=n.n(i),u=n("e3eb"),c=n.n(u),l=n("3a73"),m={components:{pagination:o["a"]},data:function(){return{searchForm:{search:null},formTitle:{create:"添加活动",update:"修改活动"},formActionTitle:"create",lotteryStatus:!1,tableList:[],form:{name:null,time:null},rules:{name:[{required:!0,message:"请输入活动名称",trigger:"blur"}],time:[{required:!0,message:"请选择活动时间",trigger:"change"}]},pageInfo:{limit:10,page:1,total:1,page_size:[10,20,40,50]}}},created:function(){},mounted:function(){this.getList()},activated:function(){this.getList()},methods:{onOperationLottery:function(t,e){var n=this;this.formActionTitle=t,"update"==t&&this.$nextTick(function(){n.form={id:e.id,name:e.name,time:[e.startTime,e.endTime]}}),this.lotteryStatus=!0},onSubmit:function(t){var e=this;this.$refs[t].validate(function(t){if(t){console.log(e.form);var n=Object.assign({},e.form),r={name:n.name,consumeType:"TIMES",consumeValue:1,startTime:s()(n.time[0]).format("YYYY-MM-DD HH:mm:ss"),endTime:s()(n.time[1]).format("YYYY-MM-DD HH:mm:ss")};"create"==e.formActionTitle?Object(l["a"])(r).then(function(t){e.messageTips("添加",t)}):"update"==e.formActionTitle&&(r.id=n.id,Object(l["d"])(r).then(function(t){e.messageTips("修改",t)}))}})},onFormClose:function(t){this.$refs[t].resetFields()},messageTips:function(t,e){200==e.code?(this.$message.success(t+"成功"),this.lotteryStatus=!1,this.getList()):this.$message.error(e.msg)},getList:function(){var t=this,e=Object.assign({},this.searchForm);e.rows=this.pageInfo.limit,e.page=this.pageInfo.page,Object(l["c"])(c()(e)).then(function(e){200==e.code&&e.data&&(t.tableList=e.data.rows,t.pageInfo.total=e.data.total)})},onLook:function(t){this.$router.push({path:"/luckyDraw/trophyManager",query:{groupId:t.id}})}}},p=m,d=n("2877"),f=Object(d["a"])(p,r,a,!1,null,null,null);e["default"]=f.exports}}]);