chunk-3e835ca9.0d9cb1ab.js 15 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3e835ca9"],{"03c7":function(t,e,a){},"206d":function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAmCAYAAACoPemuAAAAAXNSR0IArs4c6QAAAJ5JREFUWAnt2DEKwDAMA8Ck9Cl9e/Ko9i8uXrUIBQ8eVMhgUEW4Zggdo+jZe7+5iurGXVUUEU9VV/ZclWWVXd6Yqmkxi6kCat5nzGKqgJr3GbOYKqDm256xmbfO6kueqoP5OefXVgw3ezyvtSLXcQG82FbMG4MvRUeLUSIIWAxA6GgxSgQBiwEIHS1GiSBgMQChY1uxsn+weR2mDELgB3FmFp5YffVrAAAAAElFTkSuQmCC"},4091:function(t,e,a){},"48ae":function(t,e,a){"use strict";a.r(e);var o=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"ele-body"},[a("el-card",{attrs:{shadow:"never"}},[a("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()}}},[a("el-row",{attrs:{gutter:15}},[a("el-col",{attrs:{md:8,sm:12}},[a("el-form-item",{attrs:{label:"关键词:"}},[a("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),a("el-col",{attrs:{md:6,sm:12}},[a("el-form-item",{attrs:{label:"状态:"}},[a("el-select",{staticClass:"ele-fluid",attrs:{placeholder:"请选择状态",clearable:""},model:{value:t.table.where.status,callback:function(e){t.$set(t.table.where,"status",e)},expression:"table.where.status"}},[a("el-option",{attrs:{label:"全部",value:"0"}}),a("el-option",{attrs:{label:"成功",value:"1"}}),a("el-option",{attrs:{label:"待处理",value:"2"}})],1)],1)],1),a("el-col",{attrs:{md:6,sm:12}},[a("div",{staticClass:"ele-form-actions"},[a("el-button",{staticClass:"ele-btn-icon",attrs:{type:"primary",icon:"el-icon-search"},on:{click:function(e){return t.$refs.table.reload()}}},[t._v("查询 ")]),a("el-button",{on:{click:function(e){(t.table.where={})&&t.$refs.table.reload()}}},[t._v("重置")])],1)])],1)],1),a("div",{staticClass:"ele-table-tool ele-table-tool-default"},[t.permission.includes("sys:work_books:add")?a("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:work_books:dall")?a("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(),t.permission.includes("sys:work_books:export")?a("el-button",{staticClass:"ele-btn-icon",attrs:{icon:"el-icon-download",type:"success"},on:{click:t.exportData}},[t._v("导出")]):t._e()],1),a("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 o=e.index;return[a("el-table-column",{attrs:{type:"selection",width:"45",align:"center",fixed:"left"}}),a("el-table-column",{attrs:{type:"index",index:o,label:"编号",width:"60",align:"center",fixed:"left","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"图片","min-width":"100",align:"center"},scopedSlots:t._u([{key:"default",fn:function(t){var e=t.row;return[a("el-avatar",{attrs:{shape:"square",size:35,src:e.thumb}})]}}],null,!0)}),a("el-table-column",{attrs:{prop:"title",label:"工作","show-overflow-tooltip":"",align:"center","min-width":"200"}}),a("el-table-column",{attrs:{prop:"nickname",label:"用户昵称","show-overflow-tooltip":"",align:"center","min-width":"150"}}),a("el-table-column",{attrs:{prop:"realname",label:"姓名","show-overflow-tooltip":"",align:"center","min-width":"100"}}),a("el-table-column",{attrs:{prop:"phone",label:"电话","show-overflow-tooltip":"",align:"center","min-width":"80"}}),a("el-table-column",{attrs:{prop:"status",label:"状态",resizable:!1,align:"center","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(e){var o=e.row;return[a("el-switch",{attrs:{"active-value":1,"inactive-value":2},on:{change:function(e){return t.editStatus(o)}},model:{value:o.status,callback:function(e){t.$set(o,"status",e)},expression:"row.status"}})]}}],null,!0)}),a("el-table-column",{attrs:{prop:"description",label:"描述","show-overflow-tooltip":"",align:"center","min-width":"250"}}),a("el-table-column",{attrs:{label:"创建时间",sortable:"custom","show-overflow-tooltip":"",align:"center","min-width":"160"},scopedSlots:t._u([{key:"default",fn:function(e){var a=e.row;return[t._v(t._s(t._f("toDateString")(a.create_time)))]}}],null,!0)}),a("el-table-column",{attrs:{label:"操作",width:"130px",align:"center",resizable:!1,fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){var o=e.row;return[t.permission.includes("sys:work_books:edit")?a("el-link",{attrs:{icon:"el-icon-edit",type:"primary",underline:!1},on:{click:function(e){return t.edit(o)}}},[t._v("修改")]):t._e(),a("el-popconfirm",{staticClass:"ele-action",attrs:{title:"确定要删除此报名信息吗?"},on:{confirm:function(e){return t.remove(o)}}},[t.permission.includes("sys:work_books:delete")?a("el-link",{attrs:{slot:"reference",icon:"el-icon-delete",type:"danger",underline:!1},slot:"reference"},[t._v("删除")]):t._e()],1)]}}],null,!0)})]}}])})],1),a("el-dialog",{attrs:{title:(t.editForm.id,"修改报名信息"),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={status:2}}}},[a("el-form",{ref:"editForm",attrs:{model:t.editForm,rules:t.editRules,"label-width":"82px"}},[a("el-form-item",{attrs:{label:"图片:",visible:t.showEdit},on:{"update:visible":function(e){t.showEdit=e}}},[a("uploadImage",{attrs:{limit:1,disabled:!0},model:{value:t.editForm.thumb,callback:function(e){t.$set(t.editForm,"thumb",e)},expression:"editForm.thumb"}})],1),a("el-row",{attrs:{gutter:15}},[a("el-col",{attrs:{sm:24}},[a("el-col",{attrs:{sm:12}},[a("el-form-item",{attrs:{label:"工作标题:",prop:"title"}},[a("span",{domProps:{textContent:t._s(t.editForm.title)}})]),a("el-form-item",{attrs:{label:"用户昵称:",prop:"realname"}},[a("span",{domProps:{textContent:t._s(t.editForm.nickname)}})]),a("el-form-item",{attrs:{label:"报名姓名:",prop:"realname"}},[a("span",{domProps:{textContent:t._s(t.editForm.realname)}})]),a("el-form-item",{attrs:{label:"报名电话:",prop:"phone"}},[a("span",{domProps:{textContent:t._s(t.editForm.phone)}})]),a("el-form-item",{attrs:{label:"描述备注:",prop:"description"}},[a("span",{domProps:{textContent:t._s(t.editForm.description)}})]),a("el-form-item",{attrs:{label:"状态:"}},[a("el-radio-group",{model:{value:t.editForm.status,callback:function(e){t.$set(t.editForm,"status",e)},expression:"editForm.status"}},[a("el-radio",{attrs:{label:1}},[t._v("成功")]),a("el-radio",{attrs:{label:2}},[t._v("待处理")])],1)],1)],1)],1)],1)],1),a("div",{attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(e){t.showEdit=!1}}},[t._v("取消")]),a("el-button",{attrs:{type:"primary"},on:{click:t.save}},[t._v("保存")])],1)],1)],1)},s=[],i=(a("a4d3"),a("e01a"),a("4160"),a("d81d"),a("159b"),a("5530")),l=a("1146"),n=a.n(l),r=a("2f62"),c=a("cbc3"),u={name:"SysArticleBooks",components:{uploadImage:c["a"]},data:function(){return{table:{url:"/workbooks/index",where:{status:"0"}},choose:[],showEdit:!1,editForm:{id:0,status:2,form:1,thumb:{},albums:[],title:""},cates:[],editRules:{status:[{required:!0,message:"请选择状态",trigger:"blur"}]}}},computed:Object(i["a"])(Object(i["a"])({},Object(r["b"])(["permission"])),{},{editContent:function(){return{menubar:!1,file_picker_callback:this.file_picker_callback,skin_url:"dark"===this.$store.state.theme.theme?"/tinymce/skins/ui/oxide-dark":"/tinymce/skins/ui/oxide",content_css:"dark"===this.$store.state.theme.theme?"/tinymce/skins/content/dark/content.css":"/tinymce/skins/content/default/content.css"}}}),mounted:function(){this.getCateOPtions()},methods:{getCateOPtions:function(){var t=this,e=this.$loading({lock:!0});this.$http.post("/goodscates/options",this.editForm).then((function(a){e.close(),0===a.data.code?t.cates="undefined"!=typeof a.data.data?a.data.data:{}:t.$message.error(a.data.msg)})).catch((function(a){e.close(),t.$message.error(a.message)}))},edit:function(t){this.editForm=Object.assign({},t),this.editForm.albums||(this.editForm.albums=[]),this.showEdit=!0},save:function(){var t=this;this.$refs["editForm"].validate((function(e){if(!e)return!1;var a=t.$loading({lock:!0});t.$http.post("/workbooks/edit",t.editForm).then((function(e){a.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){a.close(),t.$message.error(e.message)}))}))},remove:function(t){var e=this;if(t){var a=this.$loading({lock:!0});this.$http.post("/workbooks/delete",{id:t.id}).then((function(t){a.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){a.close(),e.$message.error(t.message)}))}else{if(0===this.choose.length)return this.$message.error("请至少选择一条数据");var o=this.choose.map((function(t){return t.id}));this.$confirm("确定要删除选中的信息吗?","提示",{type:"warning"}).then((function(){var t=e.$loading({lock:!0});e.$http.post("/workbooks/delete",{id:o}).then((function(a){t.close(),0===a.data.code?(e.$message({type:"success",message:a.data.msg}),e.$refs.table.reload()):e.$message.error(a.data.msg)})).catch((function(a){t.close(),e.$message.error(a.message)}))})).catch((function(){return 0}))}},exportData:function(){var t=this,e=[["工作","招聘人数","用户昵称","姓名","报名电话","描述","报名时间","状态"]],a=this.$loading({lock:!0});this.table.where.page=this.table.where.page?this.table.where.page:1,this.table.where.limit=this.table.where.limit?this.table.where.limit:50,this.$http.get("/workbooks/index?page="+this.table.where.page+"&limit="+this.table.where.limit+"&status="+this.table.where.status).then((function(o){if(a.close(),0===o.data.code){o.data.data.forEach((function(t){e.push([t.title,t.num,t.nickname,t.realname,t.phone,t.description,t.create_time,["","成功","待处理"][t.status]])}));var s=n.a.utils.aoa_to_sheet(e);t.$util.exportSheet(n.a,s,"寺院工作报名记录")}else t.$message.error(o.data.msg)})).catch((function(e){a.close(),t.$message.error(e.message)}))},editStatus:function(t){var e=this,a=this.$loading({lock:!0}),o=Object.assign({},t);this.$http.post("/workbooks/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)}))}}},d=u,m=(a("8c5c"),a("2877")),h=Object(m["a"])(d,o,s,!1,null,"0c8c55a6",null);e["default"]=h.exports},"5cc6":function(t,e,a){var o=a("74e8");o("Uint8",(function(t){return function(e,a,o){return t(this,e,a,o)}}))},"8c5c":function(t,e,a){"use strict";a("03c7")},c19f:function(t,e,a){"use strict";var o=a("23e7"),s=a("da84"),i=a("621a"),l=a("2626"),n="ArrayBuffer",r=i[n],c=s[n];o({global:!0,forced:c!==r},{ArrayBuffer:r}),l(n)},cbc3:function(t,e,a){"use strict";var o=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"finish_room"},[a("div",{staticClass:"finish_room2"},[a("div",{staticClass:"img-list"},t._l(t.photo,(function(e,o){return a("div",{key:o,staticClass:"room_img"},[a("img",{directives:[{name:"lazy",rawName:"v-lazy",value:e.url,expression:"item.url"}]}),a("div",{staticClass:"im-button",attrs:{disabled:!t.disabled},on:{click:function(e){return t.deleteImg(o)}}},[a("div",{staticClass:"im-close"}),a("div",{staticClass:"im-close1"})])])})),0),t.photo.length<t.limit?a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"room_add_img"},[t._m(0),a("input",{attrs:{disabled:t.disabled,type:"file"},on:{change:t.add_img}})]):t._e()])])},s=[function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("span",{staticStyle:{"margin-top":"35px"}},[o("img",{attrs:{src:a("206d")}})])}],i=(a("a434"),a("c19f"),a("a9e3"),a("d3b7"),a("ac1f"),a("1276"),a("5cc6"),a("9a8c"),a("a975"),a("735e"),a("c1ac"),a("d139"),a("3a7b"),a("d5d6"),a("82f8"),a("e91f"),a("60bd"),a("5f96"),a("3280"),a("3fcc"),a("ca91"),a("25a1"),a("cd26"),a("3c5d"),a("2954"),a("649e"),a("219c"),a("170b"),a("b39a"),a("72f7"),a("bc3a")),l=a.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,a=document.createElement("canvas"),o=t.height/t.width;a.width=720,a.height=720*o;var s=a.getContext("2d");return s.clearRect(0,0,a.width,a.height),s.drawImage(t,0,0,a.width,a.height),e=a.toDataURL("image/jpeg"),e},dataURItoBlob:function(t){for(var e=window.atob(t.split(",")[1]),a=t.split(",")[0].split(":")[1].split(";")[0],o=new ArrayBuffer(e.length),s=new Uint8Array(o),i=0;i<e.length;i++)s[i]=e.charCodeAt(i);return new window.Blob([o],{type:a})},add_img:function(t){var e=t.target.files[0];if(/\.(gif|jpg|jpeg|png|GIF|JPG|PNG)$/.test(t.target.value)){var a=10485760,o=e.size;if(o>a)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(a){n.src=this.result,n.onload=function(){var o=a.target.result,s=e;i.isCompress&&(o=i.compress(n),s=i.dataURItoBlob(o));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(a){console.log(a.data),t.target.value="","undefined"!=typeof i.photo&&""!=i.photo||(i.photo=[]),console.log(i.photo),i.photo.push({fileName:e.fileName,url:a.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=(a("e5ee"),a("2877")),u=Object(c["a"])(r,o,s,!1,null,"2ed5cae0",null);e["a"]=u.exports},e5ee:function(t,e,a){"use strict";a("4091")}}]);