| 1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-d4f98b88"],{"0e00":function(t,e,o){},"206d":function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAmCAYAAACoPemuAAAAAXNSR0IArs4c6QAAAJ5JREFUWAnt2DEKwDAMA8Ck9Cl9e/Ko9i8uXrUIBQ8eVMhgUEW4Zggdo+jZe7+5iurGXVUUEU9VV/ZclWWVXd6Yqmkxi6kCat5nzGKqgJr3GbOYKqDm256xmbfO6kueqoP5OefXVgw3ezyvtSLXcQG82FbMG4MvRUeLUSIIWAxA6GgxSgQBiwEIHS1GiSBgMQChY1uxsn+weR2mDELgB3FmFp5YffVrAAAAAElFTkSuQmCC"},4091:function(t,e,o){},"5cc6":function(t,e,o){var a=o("74e8");a("Uint8",(function(t){return function(e,o,a){return t(this,e,o,a)}}))},"798f":function(t,e,o){"use strict";o.r(e);var a=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"ele-body"},[o("el-card",{attrs:{shadow:"never"}},[o("el-form",{staticClass:"ele-form-search",attrs:{model:t.table.where,"label-width":"77px"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.$refs.table.reload()},submit:function(t){t.preventDefault()}}},[o("el-row",{attrs:{gutter:15}},[o("el-col",{attrs:{md:8,sm:12}},[o("el-form-item",{attrs:{label:"关键词:"}},[o("el-input",{attrs:{placeholder:"请输入单号/报名用户昵称/活动名称",clearable:""},model:{value:t.table.where.keyword,callback:function(e){t.$set(t.table.where,"keyword",e)},expression:"table.where.keyword"}})],1)],1),o("el-col",{attrs:{md:6,sm:12}},[o("el-form-item",{attrs:{label:"状态:"}},[o("el-select",{staticClass:"ele-fluid",attrs:{placeholder:"请选择状态"},model:{value:t.table.where.status,callback:function(e){t.$set(t.table.where,"status",e)},expression:"table.where.status"}},[o("el-option",{attrs:{label:"全部",value:"0"}}),o("el-option",{attrs:{label:"待审核",value:"1"}}),o("el-option",{attrs:{label:"已审核",value:"2"}})],1)],1)],1),o("el-col",{attrs:{md:6,sm:12}},[o("div",{staticClass:"ele-form-actions"},[o("el-button",{staticClass:"ele-btn-icon",attrs:{type:"primary",icon:"el-icon-search"},on:{click:function(e){return t.$refs.table.reload()}}},[t._v("查询 ")]),o("el-button",{on:{click:function(e){(t.table.where={status:"0"})&&t.$refs.table.reload()}}},[t._v("重置")])],1)])],1)],1),o("div",{staticClass:"ele-table-tool ele-table-tool-default"},[t.permission.includes("sys:activity_books:add")?o("el-button",{staticClass:"ele-btn-icon",attrs:{type:"primary",icon:"el-icon-plus",size:"small"},on:{click:function(e){t.showEdit=!0}}},[t._v("添加 ")]):t._e(),t.permission.includes("sys:activity_books:dall")?o("el-button",{staticClass:"ele-btn-icon",attrs:{type:"danger",icon:"el-icon-delete",size:"small"},on:{click:function(e){return t.remove()}}},[t._v("批量删除 ")]):t._e()],1),o("ele-data-table",{ref:"table",attrs:{config:t.table,choose:t.choose,height:"calc(100vh - 315px)","highlight-current-row":""},on:{"update:choose":function(e){t.choose=e}},scopedSlots:t._u([{key:"default",fn:function(e){var a=e.index;return[o("el-table-column",{attrs:{type:"selection",width:"45",align:"center",fixed:"left"}}),o("el-table-column",{attrs:{type:"index",index:a,label:"编号",width:"60",align:"center",fixed:"left","show-overflow-tooltip":""}}),o("el-table-column",{attrs:{label:"头像","min-width":"100",align:"center"},scopedSlots:t._u([{key:"default",fn:function(t){var e=t.row;return[o("el-avatar",{attrs:{shape:"square",size:35,src:e.avatar}})]}}],null,!0)}),o("el-table-column",{attrs:{prop:"nickname",label:"用户","show-overflow-tooltip":"",align:"center","min-width":"100"}}),o("el-table-column",{attrs:{prop:"title",label:"活动","show-overflow-tooltip":"",align:"center","min-width":"200"}}),o("el-table-column",{attrs:{prop:"order_sn",label:"单号","show-overflow-tooltip":"",align:"center","min-width":"180"}}),o("el-table-column",{attrs:{prop:"coupon",label:"香花券","show-overflow-tooltip":"",align:"center","min-width":"100"}}),o("el-table-column",{attrs:{prop:"coupon_give",label:"随喜/券","show-overflow-tooltip":"",align:"center","min-width":"100"}}),o("el-table-column",{attrs:{prop:"gd_name",label:"功德主","show-overflow-tooltip":"",align:"center","min-width":"100"}}),o("el-table-column",{attrs:{prop:"xy_content",label:"心愿","show-overflow-tooltip":"",align:"center","min-width":"100"}}),o("el-table-column",{attrs:{prop:"status",label:"状态",resizable:!1,align:"center","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(e){var a=e.row;return[o("el-switch",{attrs:{"active-value":1,"inactive-value":2},on:{change:function(e){return t.editStatus(a)}},model:{value:a.status,callback:function(e){t.$set(a,"status",e)},expression:"row.status"}})]}}],null,!0)}),o("el-table-column",{attrs:{label:"创建时间",sortable:"custom","show-overflow-tooltip":"",align:"center","min-width":"160"},scopedSlots:t._u([{key:"default",fn:function(e){var o=e.row;return[t._v(t._s(t._f("toDateString")(o.create_time)))]}}],null,!0)}),o("el-table-column",{attrs:{label:"操作",width:"130px",align:"center",resizable:!1,fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){var a=e.row;return[t.permission.includes("sys:activity_books:edit")?o("el-link",{attrs:{icon:"el-icon-edit",type:"primary",underline:!1},on:{click:function(e){return t.edit(a)}}},[t._v("详情")]):t._e(),o("el-popconfirm",{staticClass:"ele-action",attrs:{title:"确定要删除此活动报名信息吗?"},on:{confirm:function(e){return t.remove(a)}}},[t.permission.includes("sys:activity_books:delete")?o("el-link",{attrs:{slot:"reference",icon:"el-icon-delete",type:"danger",underline:!1},slot:"reference"},[t._v("删除")]):t._e()],1)]}}],null,!0)})]}}])})],1),o("el-dialog",{attrs:{title:"活动报名信息",visible:t.showEdit,width:"600px","destroy-on-close":!0,"custom-class":"ele-dialog-form","lock-scroll":!1},on:{"update:visible":function(e){t.showEdit=e},closed:function(e){t.editForm={}}}},[o("el-form",{ref:"editForm",attrs:{model:t.editForm,rules:t.editRules,"label-width":"100px"}},[o("el-form-item",{attrs:{label:"头像:"}},[o("uploadImage",{attrs:{limit:1},model:{value:t.editForm.avatar,callback:function(e){t.$set(t.editForm,"avatar",e)},expression:"editForm.avatar"}})],1),o("el-row",{attrs:{gutter:15}},[o("el-col",{attrs:{sm:12}},[o("el-form-item",{attrs:{label:"活动名称:",prop:"title"}},[o("span",{domProps:{textContent:t._s(t.editForm.title)}})]),o("el-form-item",{attrs:{label:"报名用户:",prop:"nickname"}},[o("span",{domProps:{textContent:t._s(t.editForm.nickname)}})]),o("el-form-item",{attrs:{label:"单号:",prop:"order_sn"}},[o("span",{domProps:{textContent:t._s(t.editForm.order_sn)}})]),o("el-form-item",{attrs:{label:"消费香花券:",prop:"coupon"}},[o("span",{domProps:{textContent:t._s(t.editForm.coupon)}}),t._v("券 ")]),o("el-form-item",{attrs:{label:"消费赠送的券:",prop:"coupon_give"}},[o("span",{domProps:{textContent:t._s(t.editForm.coupon_give?t.editForm.coupon_give:0)}}),t._v("券 ")]),o("el-form-item",{attrs:{label:"功德主:",prop:"gd_name"}},[o("span",{domProps:{textContent:t._s(t.editForm.gd_name)}})]),o("el-form-item",{attrs:{label:"心愿内容:",prop:"xy_content"}},[o("span",{domProps:{textContent:t._s(t.editForm.xy_content)}})])],1),o("el-col",{attrs:{sm:12}},[o("el-form-item",{attrs:{label:"状态:"}},[o("el-radio-group",{model:{value:t.editForm.status,callback:function(e){t.$set(t.editForm,"status",e)},expression:"editForm.status"}},[o("el-radio",{attrs:{label:1}},[t._v("有效")]),o("el-radio",{attrs:{label:2}},[t._v("无效")])],1)],1)],1)],1)],1),o("div",{attrs:{slot:"footer"},slot:"footer"},[o("el-button",{on:{click:function(e){t.showEdit=!1}}},[t._v("取消")]),o("el-button",{attrs:{type:"primary"},on:{click:t.save}},[t._v("保存")])],1)],1)],1)},s=[],i=(o("d81d"),o("5530")),l=o("cbc3"),n=o("2f62"),r={name:"SysActivityBooks",components:{uploadImage:l["a"]},data:function(){return{table:{url:"/activitybooks/index",where:{status:"0",on_siyuan:"0"}},choose:[],showEdit:!1,editForm:{status:1,form:1,avatar:""},editRules:{status:[{required:!0,message:"请选择状态",trigger:"blur"}]}}},computed:Object(i["a"])({},Object(n["b"])(["permission"])),mounted:function(){},methods:{edit:function(t){this.editForm=Object.assign({},t),this.showEdit=!0},save:function(){var t=this;this.$refs["editForm"].validate((function(e){if(!e)return!1;var o=t.$loading({lock:!0});t.$http.post("/activitybooks/edit",t.editForm).then((function(e){o.close(),0===e.data.code?(t.showEdit=!1,t.$message({type:"success",message:e.data.msg}),t.$refs.table.reload()):t.$message.error(e.data.msg)})).catch((function(e){o.close(),t.$message.error(e.message)}))}))},remove:function(t){var e=this;if(t){var o=this.$loading({lock:!0});this.$http.post("/activitybooks/delete",{id:t.id}).then((function(t){o.close(),0===t.data.code?(e.$message({type:"success",message:t.data.msg}),e.$refs.table.reload()):e.$message.error(t.data.msg)})).catch((function(t){o.close(),e.$message.error(t.message)}))}else{if(0===this.choose.length)return this.$message.error("请至少选择一条数据");var a=this.choose.map((function(t){return t.id}));this.$confirm("确定要删除选中的信息吗?","提示",{type:"warning"}).then((function(){var t=e.$loading({lock:!0});e.$http.post("/activitybooks/delete",{id:a}).then((function(o){t.close(),0===o.data.code?(e.$message({type:"success",message:o.data.msg}),e.$refs.table.reload()):e.$message.error(o.data.msg)})).catch((function(o){t.close(),e.$message.error(o.message)}))})).catch((function(){return 0}))}},editStatus:function(t){var e=this,o=Object.assign({},t);this.$confirm("确定要处理选中的信息吗?","提示",{type:"warning"}).then((function(){var a=e.$loading({lock:!0});e.$http.post("/activitybooks/status",o).then((function(o){a.close(),0===o.data.code?e.$message({type:"success",message:o.data.msg}):(t.status=t.status?1:2,e.$message.error(o.data.msg))})).catch((function(t){a.close(),e.$message.error(t.message)}))})).catch((function(){return 0}))}}},c=r,u=(o("b4aa"),o("2877")),d=Object(u["a"])(c,a,s,!1,null,"1bc665d8",null);e["default"]=d.exports},b4aa:function(t,e,o){"use strict";o("0e00")},c19f:function(t,e,o){"use strict";var a=o("23e7"),s=o("da84"),i=o("621a"),l=o("2626"),n="ArrayBuffer",r=i[n],c=s[n];a({global:!0,forced:c!==r},{ArrayBuffer:r}),l(n)},cbc3:function(t,e,o){"use strict";var a=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"finish_room"},[o("div",{staticClass:"finish_room2"},[o("div",{staticClass:"img-list"},t._l(t.photo,(function(e,a){return o("div",{key:a,staticClass:"room_img"},[o("img",{directives:[{name:"lazy",rawName:"v-lazy",value:e.url,expression:"item.url"}]}),o("div",{staticClass:"im-button",attrs:{disabled:!t.disabled},on:{click:function(e){return t.deleteImg(a)}}},[o("div",{staticClass:"im-close"}),o("div",{staticClass:"im-close1"})])])})),0),t.photo.length<t.limit?o("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"room_add_img"},[t._m(0),o("input",{attrs:{disabled:t.disabled,type:"file"},on:{change:t.add_img}})]):t._e()])])},s=[function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("span",{staticStyle:{"margin-top":"35px"}},[a("img",{attrs:{src:o("206d")}})])}],i=(o("a434"),o("c19f"),o("a9e3"),o("d3b7"),o("ac1f"),o("1276"),o("5cc6"),o("9a8c"),o("a975"),o("735e"),o("c1ac"),o("d139"),o("3a7b"),o("d5d6"),o("82f8"),o("e91f"),o("60bd"),o("5f96"),o("3280"),o("3fcc"),o("ca91"),o("25a1"),o("cd26"),o("3c5d"),o("2954"),o("649e"),o("219c"),o("170b"),o("b39a"),o("72f7"),o("bc3a")),l=o.n(i),n={name:"uploadImage",props:{limit:{type:Number,default:function(){return 1}},disabled:{type:Boolean,default:function(){return!1}},isCompress:{type:Boolean,default:function(){return!1}},value:{}},data:function(){return{photo:[],deleteStatus:!1,loading:!1}},watch:{photo:function(){1==this.limit?this.$emit("input",this.photo.length>0?this.photo[0].url:""):this.$emit("input",this.photo)},value:function(){1==this.limit?this.value instanceof Array?this.photo=[]:this.photo=this.value?[{url:this.value}]:[]:this.photo=this.value}},mounted:function(){1==this.limit?this.value instanceof Array?this.photo=[]:this.photo=this.value?[{url:this.value}]:[]:this.value instanceof Array?this.photo=this.value:this.photo=[]},methods:{deleteImg:function(t){this.photo&&this.photo instanceof Array&&this.photo.splice(t,1)},compress:function(t){var e=null,o=document.createElement("canvas"),a=t.height/t.width;o.width=720,o.height=720*a;var s=o.getContext("2d");return s.clearRect(0,0,o.width,o.height),s.drawImage(t,0,0,o.width,o.height),e=o.toDataURL("image/jpeg"),e},dataURItoBlob:function(t){for(var e=window.atob(t.split(",")[1]),o=t.split(",")[0].split(":")[1].split(";")[0],a=new ArrayBuffer(e.length),s=new Uint8Array(a),i=0;i<e.length;i++)s[i]=e.charCodeAt(i);return new window.Blob([a],{type:o})},add_img:function(t){var e=t.target.files[0];if(/\.(gif|jpg|jpeg|png|GIF|JPG|PNG)$/.test(t.target.value)){var o=10485760,a=e.size;if(a>o)return t.target.value="",void this.$notify.error({title:"上传图片错误",message:"上传图片不能超过10M"});this.loading=!0;var s=new FileReader,i=this;s.readAsDataURL(e);var n=new Image;s.onload=function(o){n.src=this.result,n.onload=function(){var a=o.target.result,s=e;i.isCompress&&(a=i.compress(n),s=i.dataURItoBlob(a));var r=new window.FormData;r.append("file",s),l()({method:"POST",url:"/upload/uploadImage",data:r,timeout:1e6,headers:{"Content-Type":"multipart/form-data"}}).then((function(o){console.log(o.data),t.target.value="","undefined"!=typeof i.photo&&""!=i.photo||(i.photo=[]),console.log(i.photo),i.photo.push({fileName:e.fileName,url:o.data.data}),i.loading=!1})).catch((function(e){t.target.value="",i.loading=!1,console.log(e)}))}}}else t.target.value="",this.$notify.error({title:"上传图片错误",message:"请上传gif|jpg|jpeg|png|GIF|JPG|PNG格式图片"})}}},r=n,c=(o("e5ee"),o("2877")),u=Object(c["a"])(r,a,s,!1,null,"2ed5cae0",null);e["a"]=u.exports},e5ee:function(t,e,o){"use strict";o("4091")}}]);
|