(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5be271a6"],{2001:function(t,e,a){"use strict";a("34a4")},2147:function(t,e,a){"use strict";a("745b")},"34a4":function(t,e,a){},"63d3":function(t,e,a){},"6ebb":function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"divBox"},[a("div",{staticClass:"selCard"},[a("el-form",{ref:"searchForm",attrs:{model:t.tableFrom,size:"small","label-width":"85px",inline:!0}},[a("el-form-item",{attrs:{label:"活动搜索:",prop:"keyword"}},[a("el-input",{staticClass:"selWidth",attrs:{placeholder:"请输入活动名称/关键字",clearable:""},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.getList(1)}},model:{value:t.tableFrom.keyword,callback:function(e){t.$set(t.tableFrom,"keyword",e)},expression:"tableFrom.keyword"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"报名状态:",prop:"status"}},[a("el-select",{staticClass:"selWidth",attrs:{placeholder:"请选择",clearable:""},on:{change:function(e){return t.getList(1)}},model:{value:t.tableFrom.status,callback:function(e){t.$set(t.tableFrom,"status",e)},expression:"tableFrom.status"}},[a("el-option",{attrs:{label:"未开始",value:0}}),t._v(" "),a("el-option",{attrs:{label:"进行中",value:1}}),t._v(" "),a("el-option",{attrs:{label:"已结束",value:-1}})],1)],1),t._v(" "),a("el-form-item",{attrs:{label:"关联表单:",prop:"form_id"}},[a("el-select",{staticClass:"selWidth",attrs:{clearable:"",placeholder:"请选择"},on:{change:function(e){return t.getList(1)}},model:{value:t.tableFrom.form_id,callback:function(e){t.$set(t.tableFrom,"form_id",e)},expression:"tableFrom.form_id"}},t._l(t.formList,(function(t){return a("el-option",{key:t.form_id,attrs:{label:t.name,value:t.form_id}})})),1)],1),t._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(e){return t.getList(1)}}},[t._v("搜索")]),t._v(" "),a("el-button",{attrs:{size:"small"},on:{click:function(e){return t.searchReset()}}},[t._v("重置")])],1)],1)],1),t._v(" "),a("el-card",{staticClass:"mt14"},[a("router-link",{attrs:{to:{path:t.roterPre+"/marketing/application/create"}}},[a("el-button",{staticClass:"mb20",attrs:{size:"small",type:"primary"}},[t._v("创建报名活动")])],1),t._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],attrs:{data:t.tableData.data,size:"small"}},[a("el-table-column",{attrs:{label:"ID",prop:"activity_id","min-width":"50"}}),t._v(" "),a("el-table-column",{attrs:{label:"活动名称",prop:"activity_name","min-width":"120"}}),t._v(" "),a("el-table-column",{attrs:{"min-width":"120",label:"封面图"},scopedSlots:t._u([{key:"default",fn:function(t){return[a("el-image",{staticStyle:{width:"36px",height:"36px"},attrs:{src:t.row.pic}})]}}])}),t._v(" "),a("el-table-column",{attrs:{"min-width":"120",label:"分享海报图"},scopedSlots:t._u([{key:"default",fn:function(e){return t._l(e.row.images,(function(t,e){return a("el-image",{key:e,staticStyle:{width:"36px",height:"36px","margin-right":"5px"},attrs:{src:t}})}))}}])}),t._v(" "),a("el-table-column",{attrs:{label:"报名状态","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.row;return[0==i.time_status?a("el-tag",{attrs:{type:"danger"}},[t._v("未开始")]):t._e(),t._v(" "),1==i.time_status?a("el-tag",[t._v("进行中")]):t._e(),t._v(" "),-1==i.time_status?a("el-tag",{attrs:{type:"info"}},[t._v("已结束")]):t._e()]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"已报人数/总人数",align:"center","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.row;return[a("span",[t._v(t._s(i.total))]),t._v("/"),a("span",[t._v(t._s(i.count||"不限制"))])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"form_name",label:"关联表单","min-width":"100"}}),t._v(" "),a("el-table-column",{attrs:{prop:"create_time",label:"创建时间","min-width":"120"}}),t._v(" "),a("el-table-column",{attrs:{label:"是否显示","min-width":"90"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-switch",{attrs:{"active-value":1,"inactive-value":0,"active-text":"开启","inactive-text":"关闭"},nativeOn:{click:function(a){return t.onchangeIsShow(e.row)}},model:{value:e.row.is_show,callback:function(a){t.$set(e.row,"is_show",a)},expression:"scope.row.is_show"}})]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"操作","min-width":"120",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.onDetails(e.row.activity_id,!1)}}},[t._v("查看")]),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.onDetails(e.row.activity_id,!0)}}},[t._v("编辑")]),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.handleDelete(e.row.activity_id,e.$index)}}},[t._v("删除")])]}}])})],1),t._v(" "),a("div",{staticClass:"block"},[a("el-pagination",{attrs:{background:"","page-size":t.tableFrom.limit,"current-page":t.tableFrom.page,layout:"total, prev, pager, next, jumper",total:t.total},on:{"size-change":t.handleSizeChange,"current-change":t.pageChange}})],1)],1),t._v(" "),a("create-application",{ref:"createApplication",attrs:{formList:t.formList},on:{getList:t.getList}}),t._v(" "),a("application-details",{ref:"applicationDetails",attrs:{applyId:t.applyId,drawer:t.drawer},on:{getList:t.getList,closeDrawer:t.closeDrawer}})],1)},n=[],r=a("83d6"),s=a("b7be"),o=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-dialog",{attrs:{title:"创建报名活动",visible:t.dialogVisible,width:"650px","before-close":t.handleClose,"append-to-body":!0},on:{"update:visible":function(e){t.dialogVisible=e}}},[a("el-form",{directives:[{name:"loading",rawName:"v-loading",value:t.fullscreenLoading,expression:"fullscreenLoading"}],ref:"formValidate",staticClass:"formValidate mt20",attrs:{"label-width":"120px",rules:t.ruleValidate,model:t.formValidate,size:"small"},nativeOn:{submit:function(t){t.preventDefault()}}},[a("el-form-item",{attrs:{label:"活动名称:",prop:"activity_name"}},[a("el-input",{attrs:{maxlength:"50",size:"small",placeholder:"请输入活动名称","show-word-limit":""},model:{value:t.formValidate.activity_name,callback:function(e){t.$set(t.formValidate,"activity_name",e)},expression:"formValidate.activity_name"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"活动简介:",prop:"info"}},[a("el-input",{attrs:{type:"textarea",maxlength:"500",size:"small",autosize:{minRows:4,maxRows:8},"show-word-limit":"",placeholder:"请输入活动简介"},model:{value:t.formValidate.info,callback:function(e){t.$set(t.formValidate,"info",e)},expression:"formValidate.info"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"封面图:",prop:"pic"}},[a("div",{staticClass:"acea-row row-middle"},[a("div",{staticClass:"upLoadPicBox mr15",attrs:{title:"710*340px"},on:{click:function(e){return t.modalPicTap("1")}}},[t.formValidate.pic?a("div",{staticClass:"pictrue"},[a("img",{attrs:{src:t.formValidate.pic}})]):a("div",{staticClass:"upLoad"},[a("i",{staticClass:"iconfont iconjiahao"})])]),t._v(" "),a("div",{staticStyle:{color:"#ccc","font-size":"12px"}},[t._v("\n 建议尺寸750*350px\n "),a("el-popover",{attrs:{placement:"bottom",title:"","min-width":"200",trigger:"hover"}},[a("img",{staticStyle:{height:"270px"},attrs:{src:t.baseURL+"/statics/system/application01.jpg",alt:""}}),t._v(" "),a("el-button",{attrs:{slot:"reference",type:"text"},slot:"reference"},[t._v("查看示例")])],1)],1)])]),t._v(" "),a("el-form-item",{attrs:{label:"活动分享海报:",prop:"images"}},[a("div",{staticClass:"acea-row row-middle"},[a("div",{staticClass:"acea-row"},[t._l(t.formValidate.images,(function(e,i){return a("div",{key:i,staticClass:"pictrue"},[a("img",{attrs:{src:e},on:{click:function(a){return t.lookImg(e)}}}),t._v(" "),a("i",{staticClass:"el-icon-error btndel",on:{click:function(e){return t.handleRemove(i)}}})])})),t._v(" "),t.formValidate.images.length<5?a("div",{staticClass:"upLoadPicBox mr15",on:{click:function(e){return t.modalPicTap("2")}}},[a("div",{staticClass:"upLoad"},[a("i",{staticClass:"iconfont iconjiahao"})])]):t._e()],2),t._v(" "),a("div",{staticStyle:{color:"#ccc","font-size":"12px"}},[t._v("\n 建议尺寸750*1250px\n "),a("el-popover",{attrs:{placement:"bottom",title:"","min-width":"200",trigger:"hover"}},[a("img",{staticStyle:{height:"270px"},attrs:{src:t.baseURL+"/statics/system/application02.jpg",alt:""}}),t._v(" "),a("el-button",{attrs:{slot:"reference",type:"text"},slot:"reference"},[t._v("查看示例")])],1)],1)])]),t._v(" "),a("el-form-item",{attrs:{label:"活动背景色:",prop:"color"}},[a("div",{staticClass:"acea-row"},[a("el-color-picker",{staticClass:"mr15",model:{value:t.formValidate.color,callback:function(e){t.$set(t.formValidate,"color",e)},expression:"formValidate.color"}}),t._v(" "),a("div",{staticStyle:{color:"#ccc","font-size":"12px"}},[t._v("\n 若未设置颜色,则为默认色\n "),a("el-popover",{attrs:{placement:"bottom",title:"","min-width":"200",trigger:"hover"}},[a("img",{staticStyle:{height:"270px"},attrs:{src:t.baseURL+"/statics/system/application03.jpg",alt:""}}),t._v(" "),a("el-button",{attrs:{slot:"reference",type:"text"},slot:"reference"},[t._v("查看示例")])],1)],1)],1)]),t._v(" "),a("el-form-item",{attrs:{label:"活动起止日期:",required:""}},[a("el-date-picker",{staticStyle:{width:"100%"},attrs:{"value-format":"yyyy-MM-dd HH:mm:ss",format:"yyyy-MM-dd HH:mm:ss",size:"small",type:"datetimerange",placement:"bottom-end",placeholder:"请选择活动时间"},on:{change:t.onchangeTime},model:{value:t.timeVal,callback:function(e){t.timeVal=e},expression:"timeVal"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"活动人数上限:",prop:"count"}},[a("el-input-number",{staticStyle:{width:"200px"},attrs:{placeholder:"请输入本次活动总人数","controls-position":"right"},model:{value:t.formValidate.count,callback:function(e){t.$set(t.formValidate,"count",e)},expression:"formValidate.count"}}),t._v(" "),a("span",[t._v("0为不限制人数")])],1),t._v(" "),a("el-form-item",{attrs:{label:"关联系统表单:",prop:"form_id"}},[a("el-select",{staticClass:"width100",attrs:{placeholder:"请选择",clearable:""},on:{change:t.getFormInfo},model:{value:t.formValidate.form_id,callback:function(e){t.$set(t.formValidate,"form_id",e)},expression:"formValidate.form_id"}},t._l(t.formList,(function(t){return a("el-option",{key:t.form_id,attrs:{label:t.name,value:t.form_id}})})),1)],1),t._v(" "),t.formValidate.form_id?a("el-form-item",[a("div",{staticStyle:{width:"350px"}},[a("iframe",{ref:"iframe",staticClass:"iframe-box",staticStyle:{"min-height":"300px"},attrs:{id:"iframe",src:t.formUrl,frameborder:"0"}})])]):t._e(),t._v(" "),a("el-form-item",{attrs:{label:"排序:",prop:"sort"}},[a("el-input-number",{staticStyle:{width:"200px"},attrs:{placeholder:"请输入排序序号","controls-position":"right"},model:{value:t.formValidate.sort,callback:function(e){t.$set(t.formValidate,"sort",e)},expression:"formValidate.sort"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"是否开启:",prop:"is_show"}},[a("el-switch",{attrs:{width:60,"active-value":1,"inactive-value":0,"active-text":"开启","inactive-text":"关闭"},model:{value:t.formValidate.is_show,callback:function(e){t.$set(t.formValidate,"is_show",e)},expression:"formValidate.is_show"}})],1)],1),t._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{size:"small"},on:{click:t.handleClose}},[t._v("取 消")]),t._v(" "),a("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(e){return t.handleSubmit("formValidate")}}},[t._v("确 定")])],1)],1),t._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:!1,expression:"false"},{name:"viewer",rawName:"v-viewer",value:{movable:!1},expression:"{ movable: false }"}],staticClass:"images"},t._l(t.formValidate.images,(function(t,e){return a("img",{key:e,attrs:{src:t}})})),0)],1)},c=[],l=a("c80c"),u=(a("96cf"),a("3b8d")),d=(a("7f7f"),a("20d6"),a("bbcc")),f={name:"createActivity",props:{formList:{type:Array,default:function(){return[]}}},data:function(){return{baseURL:d["a"].httpUrl||"http://localhost:8080",roterPre:r["roterPre"],dialogVisible:!1,fullscreenLoading:!1,listLoading:!1,formData:[],formUrl:"",ruleValidate:{activity_name:[{required:!0,message:"请输入活动名称",trigger:"blur"}],pic:[{required:!0,message:"请上传封面图",trigger:"change"}],images:[{required:!0,message:"请上传海报图",trigger:"change"}],form_id:[{required:!0,message:"请选择关联系统表单",trigger:"change"}]},formValidate:{pic:"",images:[]},timeVal:""}},mounted:function(){},methods:{handleClose:function(){this.resetData(),this.dialogVisible=!1},resetData:function(){this.$refs["formValidate"].resetFields(),this.timeVal="",this.formValidate.start_time="",this.formValidate.end_time="",this.formData=[]},modalPicTap:function(t,e,a){var i=this;this.$modalUpload((function(e){"1"===t&&(i.formValidate.pic=e[0]),"2"===t&&e.map((function(t){i.formValidate.images.push(t),i.formValidate.images.length>5&&(i.formValidate.images.length=5)}))}),t)},handleRemove:function(t){this.formValidate.images.splice(t,1)},lookImg:function(t){var e=this,a=this.$el.querySelector(".images").$viewer;a.show(),this.$nextTick((function(){var i=e.formValidate.images.findIndex((function(e){return e===t}));a.update().view(i)}))},onchangeTime:function(t){this.timeVal=t,this.formValidate.start_time=t?t[0]:"",this.formValidate.end_time=t?t[1]:""},getFormInfo:function(){var t=1e3*(new Date).getTime(),e="".concat(this.baseURL,"/pages/admin/system_form/index?inner_frame=1&form_id=").concat(this.formValidate.form_id,"&time=").concat(t);this.formUrl=e},handleSubmit:function(t){var e=this;this.$refs[t].validate((function(a){a&&(e.fullscreenLoading=!0,Object(s["a"])(e.formValidate).then(function(){var a=Object(u["a"])(Object(l["a"])().mark((function a(i){return Object(l["a"])().wrap((function(a){while(1)switch(a.prev=a.next){case 0:e.fullscreenLoading=!1,e.$message.success(i.message),e.dialogVisible=!1,e.$emit("getList"),e.$refs[t].resetFields();case 5:case"end":return a.stop()}}),a)})));return function(t){return a.apply(this,arguments)}}()).catch((function(t){e.fullscreenLoading=!1,e.$message.error(t.message)})))}))}}},p=f,m=(a("de9b"),a("2877")),v=Object(m["a"])(p,o,c,!1,null,"1714a04e",null),g=v.exports,h=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-drawer",{attrs:{"with-header":!1,size:1e3,visible:t.drawer,direction:t.direction,"before-close":t.handleClose},on:{"update:visible":function(e){t.drawer=e}}},[a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}]},[t.isAdd?t._e():a("div",{staticClass:"head"},[a("div",{staticClass:"full"},[a("img",{staticClass:"order_icon",attrs:{src:t.orderImg,alt:""}}),t._v(" "),a("div",{staticClass:"text"},[a("div",{staticClass:"title"},[a("span",{staticClass:"bold"},[t._v(t._s(t.applyData.activity_name))])]),t._v(" "),a("div",[a("span",{staticClass:"mr20"},[t._v("活动ID:"+t._s(t.applyData.activity_id))])])]),t._v(" "),a("div",[t.isEdit?a("el-button",{attrs:{size:"small"},on:{click:t.cancelEdit}},[t._v("取消")]):t._e(),t._v(" "),t.isEdit?t._e():a("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.onEdit}},[t._v("编辑")]),t._v(" "),t.isEdit?a("el-button",{attrs:{type:"success",size:"small"},on:{click:t.saveInfo}},[t._v("完成")]):t._e()],1)]),t._v(" "),a("ul",{staticClass:"list"},[a("li",{staticClass:"item"},[a("div",{staticClass:"title"},[t._v("报名状态")]),t._v(" "),a("div",[t._v(t._s(0==t.applyData.time_status?"未开始":1==t.applyData.status?"进行中":"已结束"))])]),t._v(" "),a("li",{staticClass:"item"},[a("div",{staticClass:"title"},[t._v("已报名人数")]),t._v(" "),a("div",[t._v(t._s(t.applyData.total))])]),t._v(" "),a("li",{staticClass:"item"},[a("div",{staticClass:"title"},[t._v("活动人数上限")]),t._v(" "),a("div",[t._v(t._s(0==t.applyData.count?"不限制":t.applyData.count))])]),t._v(" "),a("li",{staticClass:"item"},[a("div",{staticClass:"title"},[t._v("创建时间")]),t._v(" "),a("div",[t._v(t._s(t.applyData.create_time))])])])]),t._v(" "),a("application-info",{ref:"applicationInfo",attrs:{applyData:t.applyData,form_name:t.form_name,isEdit:t.isEdit,formList:t.formList,formData:t.formData},on:{editSuccess:t.editSuccess}})],1)])],1)},b=[],y=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-tabs",{attrs:{type:"border-card"},model:{value:t.activeName,callback:function(e){t.activeName=e},expression:"activeName"}},[a("el-tab-pane",{attrs:{label:"活动信息",name:"detail"}},[a("div",{staticClass:"section"},[a("div",{staticClass:"title"},[t._v("活动信息")]),t._v(" "),t.isEdit?a("div",[a("edit-form",{ref:"editForm",attrs:{applyData:t.applyData},on:{success:t.success}})],1):a("ul",{staticClass:"list"},[a("li",{staticClass:"item"},[a("div",{staticClass:"item-title"},[t._v("活动名称:")]),t._v(" "),a("div",{staticClass:"value"},[t._v("\n "+t._s(t.applyData.activity_name)+"\n ")])]),t._v(" "),a("li",{staticClass:"item"},[a("div",{staticClass:"item-title"},[t._v("活动简介:")]),t._v(" "),a("div",{staticClass:"value"},[t._v(t._s(t.applyData.info))])]),t._v(" "),a("li",{staticClass:"item"},[a("div",{staticClass:"item-title"},[t._v("开始时间:")]),t._v(" "),a("div",{staticClass:"value"},[t._v(t._s(t.applyData.start_time))])]),t._v(" "),a("li",{staticClass:"item"},[a("div",{staticClass:"item-title"},[t._v("结束时间:")]),t._v(" "),a("div",{staticClass:"value"},[t._v(t._s(t.applyData.end_time))])]),t._v(" "),a("li",{staticClass:"item"},[a("div",{staticClass:"item-title"},[t._v("排序:")]),t._v(" "),a("div",{staticClass:"value"},[t._v(t._s(t.applyData.sort))])]),t._v(" "),a("li",{staticClass:"item"},[a("div",{staticClass:"item-title"},[t._v("背景色:")]),t._v(" "),a("div",{staticClass:"value"},[a("el-color-picker",{attrs:{disabled:""},model:{value:t.applyData.color,callback:function(e){t.$set(t.applyData,"color",e)},expression:"applyData.color"}})],1)]),t._v(" "),a("li",{staticClass:"item item100"},[a("div",{staticClass:"acea-row row-middle"},[a("div",{staticClass:"item-title"},[t._v("封面图:")]),t._v(" "),a("div",{staticClass:"value"},[a("img",{staticStyle:{width:"40px",height:"40px","margin-right":"12px"},attrs:{src:t.applyData.pic}})])])]),t._v(" "),t.applyData.images&&t.applyData.images.length>0?a("li",{staticClass:"item item100"},[a("div",{staticClass:"acea-row row-middle"},[a("div",{staticClass:"item-title"},[t._v("分享海报:")]),t._v(" "),a("div",{staticClass:"value"},t._l(t.applyData.images,(function(e,i){return a("img",{key:i,staticStyle:{width:"40px",height:"40px","margin-right":"12px"},attrs:{src:e},on:{click:function(a){return t.lookImg(e)}}})})),0)])]):t._e(),t._v(" "),a("li",{staticClass:"item item100"},[a("div",{staticClass:"item-title"},[t._v("关联表单:")]),t._v(" "),a("div",{staticClass:"value"},[t._v(t._s(t.form_name))])]),t._v(" "),a("li",{staticClass:"item item100"},[a("div",{staticClass:"item-title"}),t._v(" "),a("div",{staticClass:"value",staticStyle:{width:"350px"}},[a("iframe",{ref:"iframe",staticClass:"iframe-box",attrs:{id:"iframe",src:t.formUrl,frameborder:"0"}})])]),t._v(" "),a("li",{staticClass:"item item100"},[a("div",{staticClass:"item-title"},[t._v("是否显示:")]),t._v(" "),a("div",{staticClass:"value"},[t._v(t._s(1==t.applyData.is_show?"显示":"不显示"))])]),t._v(" "),a("li",{staticClass:"item"},[a("div",{staticClass:"item-title"},[t._v("更新时间:")]),t._v(" "),a("div",{staticClass:"value"},[t._v(t._s(t.applyData.update_time))])])])])]),t._v(" "),t.isEdit?t._e():a("el-tab-pane",{attrs:{label:"活动统计",name:"statistics"}},[a("el-form",{staticClass:"mt10",attrs:{size:"small","label-width":"80px",inline:""}},[a("el-form-item",{attrs:{label:"用户搜索:"}},[a("el-input",{staticClass:"selWidth",attrs:{placeholder:"请输入用户昵称/ID/手机号搜索",size:"small",clearable:""},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.getStatistics(t.applyId,1)}},model:{value:t.statisticsForm.keyword,callback:function(e){t.$set(t.statisticsForm,"keyword",e)},expression:"statisticsForm.keyword"}})],1),t._v(" "),a("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return t.getStatistics(t.applyId,1)}}},[t._v("查询")]),t._v(" "),a("el-button",{attrs:{size:"small",type:"primary",icon:"el-icon-top"},on:{click:t.exportStatics}},[t._v("导出")])],1),t._v(" "),a("el-table",{attrs:{data:t.tableData.data,size:"small"}},[a("el-table-column",{attrs:{prop:"order_id",label:"序号","min-width":"60"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.$index+(t.statisticsForm.page-1)*t.statisticsForm.limit+1))])]}}],null,!1,1642385080)}),t._v(" "),a("el-table-column",{attrs:{label:"用户名称/ID","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row.nickname+"/"+e.row.uid))])]}}],null,!1,3748123513)}),t._v(" "),a("el-table-column",{attrs:{prop:"phone",label:"手机号","min-width":"100"}}),t._v(" "),t._l(t.headers,(function(e,i){return a("el-table-column",{key:i,attrs:{label:e.label,"min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(i){var n=i.row;return["uploadPicture"==e.type?a("div",t._l(n.value[e.key],(function(t,e){return a("el-image",{key:e,staticStyle:{width:"36px",height:"36px"},attrs:{src:t,"preview-src-list":[t]}})})),1):"dateranges"==e.type?a("div",[n.value[e.key]?a("div",[t._v(t._s(n.value[e.key][0])+"至"),a("br"),t._v(t._s(n.value[e.key][1]))]):t._e()]):a("div",[t._v("\n "+t._s(n.value[e.key])+"\n ")])]}}],null,!0)})})),t._v(" "),a("el-table-column",{attrs:{label:"提交时间",prop:"create_time","min-width":"150"}})],2),t._v(" "),a("div",{staticClass:"block"},[a("el-pagination",{attrs:{"page-size":t.statisticsForm.limit,"current-page":t.statisticsForm.page,layout:"prev, pager, next, jumper",total:t.tableData.total},on:{"size-change":t.handleSizeChange,"current-change":t.pageChange}})],1)],1)],1),t._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:!1,expression:"false"},{name:"viewer",rawName:"v-viewer",value:{movable:!1},expression:"{ movable: false }"}],staticClass:"images"},t._l(t.applyData.images,(function(t,e){return a("img",{key:e,attrs:{src:t}})})),0)],1)},_=[],w=(a("ac6a"),function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("el-form",{ref:"applyDataField",attrs:{size:"small",rules:t.ruleValidate,model:t.applyData,"label-width":"100px"},nativeOn:{submit:function(t){t.preventDefault()}}},[a("el-row",{staticClass:"mt20",attrs:{gutter:24}},[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"活动名称:",prop:"activity_name"}},[a("el-input",{attrs:{maxlength:"50",placeholder:"请输入活动名称","show-word-limit":""},model:{value:t.applyData.activity_name,callback:function(e){t.$set(t.applyData,"activity_name",e)},expression:"applyData.activity_name"}})],1)],1),t._v(" "),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"起止时间:",required:""}},[a("el-date-picker",{attrs:{"value-format":"yyyy-MM-dd HH:mm:ss",format:"yyyy-MM-dd HH:mm:ss",type:"datetimerange",placement:"bottom-end",placeholder:"请选择活动时间"},on:{change:t.onchangeTime},model:{value:t.timeVal,callback:function(e){t.timeVal=e},expression:"timeVal"}})],1)],1)],1),t._v(" "),a("el-row",[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"活动简介:"}},[a("el-input",{attrs:{type:"textarea",maxlength:"500",autosize:{minRows:4,maxRows:8},"show-word-limit":"",placeholder:"请输入活动简介"},model:{value:t.applyData.info,callback:function(e){t.$set(t.applyData,"info",e)},expression:"applyData.info"}})],1)],1),t._v(" "),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"背景色:"}},[a("el-color-picker",{model:{value:t.applyData.color,callback:function(e){t.$set(t.applyData,"color",e)},expression:"applyData.color"}})],1)],1)],1),t._v(" "),a("el-row",[a("el-form-item",{attrs:{label:"封面图:",prop:"pic"}},[a("div",{staticClass:"upLoadPicBox",attrs:{title:"710*340px"},on:{click:function(e){return t.modalPicTap("1")}}},[t.applyData.pic?a("div",{staticClass:"pictrue"},[a("img",{attrs:{src:t.applyData.pic}})]):a("div",{staticClass:"upLoad"},[a("i",{staticClass:"el-icon-camera"})])]),t._v(" "),a("div",{staticStyle:{color:"#ccc","font-size":"12px"}},[t._v("\n 建议尺寸750*350px\n ")])])],1),t._v(" "),a("el-row",[a("el-form-item",{attrs:{label:"分享海报:",prop:"images"}},[a("div",{staticClass:"acea-row"},[t._l(t.applyData.images,(function(e,i){return a("div",{key:i,staticClass:"pictrue"},[a("img",{attrs:{src:e},on:{click:function(a){return t.lookImg(e)}}}),t._v(" "),a("i",{staticClass:"el-icon-error btndel",on:{click:function(e){return t.handleRemove(i)}}})])})),t._v(" "),t.applyData.images.length<5?a("div",{staticClass:"upLoadPicBox",on:{click:function(e){return t.modalPicTap("2")}}},[a("div",{staticClass:"upLoad"},[a("i",{staticClass:"el-icon-camera"})])]):t._e()],2),t._v(" "),a("div",{staticStyle:{color:"#ccc","font-size":"12px"}},[t._v("\n 建议尺寸750*1250px\n ")])])],1),t._v(" "),a("el-row",[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"排序:"}},[a("el-input-number",{attrs:{"controls-position":"right",placeholder:"请输入排序"},model:{value:t.applyData.sort,callback:function(e){t.$set(t.applyData,"sort",e)},expression:"applyData.sort"}})],1)],1),t._v(" "),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"活动人数:"}},[a("el-input-number",{attrs:{"controls-position":"right",placeholder:"请输入本次活动总人数"},model:{value:t.applyData.count,callback:function(e){t.$set(t.applyData,"count",e)},expression:"applyData.count"}}),t._v(" "),a("span",[t._v("0为不限制人数")])],1)],1)],1),t._v(" "),a("el-row",[a("el-form-item",{attrs:{label:"是否显示:"}},[a("el-switch",{attrs:{"active-value":1,"inactive-value":0,width:55,"active-text":"开启","inactive-text":"关闭"},model:{value:t.applyData.is_show,callback:function(e){t.$set(t.applyData,"is_show",e)},expression:"applyData.is_show"}})],1)],1),t._v(" "),a("el-row",[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"关联表单:",prop:"link_id"}},[a("el-select",{attrs:{placeholder:"请选择",clearable:""},on:{change:t.getFormInfo},model:{value:t.applyData.link_id,callback:function(e){t.$set(t.applyData,"link_id",e)},expression:"applyData.link_id"}},t._l(t.formList,(function(t){return a("el-option",{key:t.form_id,attrs:{label:t.name,value:t.form_id}})})),1)],1),t._v(" "),t.applyData.link_id?a("el-form-item",[a("div",{staticStyle:{width:"350px"}},[a("iframe",{ref:"iframe",staticClass:"iframe-box",staticStyle:{"min-height":"300px"},attrs:{id:"iframe",src:t.formUrl,frameborder:"0"}})])]):t._e()],1)],1),t._v(" "),a("el-row",[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"更新时间:"}},[t._v("\n "+t._s(t.applyData.update_time)+"\n ")])],1)],1),t._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:!1,expression:"false"},{name:"viewer",rawName:"v-viewer",value:{movable:!1},expression:"{ movable: false }"}],staticClass:"images"},t._l(t.applyData.images,(function(t,e){return a("img",{key:e,attrs:{src:t}})})),0)],1)}),x=[],D={props:{applyData:{type:Object,default:{}},isAdd:{type:Boolean,default:!1}},data:function(){return{loading:!1,listLoading:!1,applyId:"",direction:"rtl",activeName:"detail",formUrl:"",BaseURL:d["a"].httpUrl||"http://localhost:8080",timeVal:[this.applyData.start_time,this.applyData.end_time],ruleValidate:{activity_name:[{required:!0,message:"请输入活动名称",trigger:"blur"}],link_id:[{required:!0,message:"请选择关联表单",trigger:"change"}],pic:[{required:!0,message:"请上传封面图",trigger:"change"}],images:[{required:!0,message:"请上传海报图",trigger:"change"}]},formList:[],formData:[]}},watch:{applyData:function(t){this.timeVal=[t.start_time,t.end_time]}},filters:{},mounted:function(){var t=1e3*(new Date).getTime(),e="".concat(this.BaseURL,"/pages/admin/system_form/index?inner_frame=1&time=").concat(t,"&form_id=").concat(this.applyData.link_id);this.formUrl=e},methods:{onchangeTime:function(t){this.timeVal=t,this.applyData.start_time=t?t[0]:"",this.applyData.end_time=t?t[1]:""},modalPicTap:function(t,e,a){var i=this;this.$modalUpload((function(e){"1"===t&&(i.applyData.pic=e[0]),"2"===t&&e.map((function(t){i.applyData.images.push(t),i.applyData.images.length>5&&(i.applyData.images.length=5)}))}),t)},handleRemove:function(t){this.applyData.images.splice(t,1)},lookImg:function(t){var e=this,a=this.$el.querySelector(".images").$viewer;a.show(),this.$nextTick((function(){var i=e.applyData.images.findIndex((function(e){return e===t}));a.update().view(i)}))},resetData:function(){this.$refs.applyDataField.resetFields()},getFormSelect:function(){var t=this;Object(s["ac"])().then((function(e){t.formList=e.data})).catch((function(e){t.$message.error(e.message)}))},getFormInfo:function(){if(this.applyData.link_id){var t=1e3*(new Date).getTime(),e="".concat(this.BaseURL,"/pages/admin/system_form/index?inner_frame=1&form_id=").concat(this.applyData.link_id,"&time=").concat(t);this.formUrl=e}},onSubmit:function(t){var e=this;this.timeVal?this.$refs["applyDataField"].validate((function(a){a&&(e.loading=!0,e.applyData.form_id=e.applyData.link_id,Object(s["g"])(t,e.applyData).then(function(){var t=Object(u["a"])(Object(l["a"])().mark((function t(a){return Object(l["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.$message.success(a.message),e.loading=!1,e.$emit("success");case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){e.loading=!1,e.$message.error(t.message)})))})):this.$message.warning("请选择活动时间!")},handleCreate:function(){var t=this;this.$refs["applyDataField"].validate((function(e){if(e)merchantCreate(t.applyData).then(function(){var e=Object(u["a"])(Object(l["a"])().mark((function e(a){return Object(l["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:t.$message.success(a.message),t.$emit("success");case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.$message.error(e.message)}));else if(!t.applyData.mer_name)return t.$message.error("请填写基本信息-商户名称")}))}}},k=D,C=(a("2147"),Object(m["a"])(k,w,x,!1,null,"7252fabc",null)),A=C.exports,V=a("2e83"),I={props:{applyData:{type:Object,default:{}},isEdit:{type:Boolean,default:!1},form_name:{type:String,default:""},formData:{type:Array,default:function(){return[]}},formList:{type:Array,default:function(){return[]}}},components:{editForm:A},data:function(){return{baseURL:d["a"].httpUrl||"http://localhost:8080",formUrl:"",loading:!0,applyId:"",direction:"rtl",activeName:"detail",headers:[],tableData:{total:0,data:[]},statisticsForm:{page:1,limit:10,keyword:""}}},mounted:function(){},methods:{getStatistics:function(t,e){var a=this;this.applyId=t,this.loading=!0,this.statisticsForm.page=e||this.statisticsForm.page,Object(s["h"])(t,this.statisticsForm).then((function(t){a.headers=t.data.list.length&&t.data.list[0]["keys"]||[],a.tableData.data=t.data.list,a.tableData.total=t.data.count,a.loading=!1})).catch((function(t){a.loading=!1,a.$message.error(t.message)}))},getForm:function(){var t=1e3*(new Date).getTime(),e="".concat(this.baseURL,"/pages/admin/system_form/index?inner_frame=1&form_id=").concat(this.applyData.link_id,"&time=").concat(t);this.formUrl=e},getFormData:function(){var t=this;this.$nextTick((function(){t.activeName="detail",t.$refs.editForm.getFormSelect(),t.$refs.editForm.getFormInfo()}))},lookImg:function(t){var e=this,a=this.$el.querySelector(".images").$viewer;a.show(),this.$nextTick((function(){var i=e.applyData.images.findIndex((function(e){return e===t}));a.update().view(i)}))},success:function(){this.$emit("editSuccess")},pageChange:function(t){this.statisticsForm.page=t,this.getStatistics(this.applyId)},handleSizeChange:function(t){this.statisticsForm.limit=t,this.getStatistics(this.applyId)},resetData:function(){this.$refs.editForm.resetData()},onSubmit:function(t){this.$refs.editForm.onSubmit(t)},exportStatics:function(){var t=Object(u["a"])(Object(l["a"])().mark((function t(){var e,a,i,n,r;return Object(l["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:e=JSON.parse(JSON.stringify(this.statisticsForm)),a=[],e.page=1,i=1,n={},r=0;case 5:if(!(r