chunk-e834beac.82aa8366.js 14 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-e834beac"],{10984:function(e,t,a){"use strict";a("75f9")},"206d":function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAmCAYAAACoPemuAAAAAXNSR0IArs4c6QAAAJ5JREFUWAnt2DEKwDAMA8Ck9Cl9e/Ko9i8uXrUIBQ8eVMhgUEW4Zggdo+jZe7+5iurGXVUUEU9VV/ZclWWVXd6Yqmkxi6kCat5nzGKqgJr3GbOYKqDm256xmbfO6kueqoP5OefXVgw3ezyvtSLXcQG82FbMG4MvRUeLUSIIWAxA6GgxSgQBiwEIHS1GiSBgMQChY1uxsn+weR2mDELgB3FmFp5YffVrAAAAAElFTkSuQmCC"},"326b":function(e,t,a){"use strict";a.r(t);var o=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"ele-body"},[a("el-card",{attrs:{shadow:"never"}},[a("el-form",{staticClass:"ele-form-search",attrs:{model:e.table.where,"label-width":"77px"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.$refs.table.reload()},submit:function(e){e.preventDefault()}}},[a("el-row",{attrs:{gutter:15}},[a("el-col",{attrs:{md:6,sm:12}},[a("el-form-item",{attrs:{label:"义工姓名:"}},[a("el-input",{attrs:{placeholder:"请输入义工姓名",clearable:""},model:{value:e.table.where.realname,callback:function(t){e.$set(e.table.where,"realname",t)},expression:"table.where.realname"}})],1)],1),a("el-col",{attrs:{md:6,sm:12}},[a("el-form-item",{attrs:{label:"在寺状态:"}},[a("el-select",{staticClass:"ele-fluid",attrs:{placeholder:"请选择状态"},model:{value:e.table.where.on_siyuan,callback:function(t){e.$set(e.table.where,"on_siyuan",t)},expression:"table.where.on_siyuan"}},[a("el-option",{attrs:{label:"全部",value:"0"}}),a("el-option",{attrs:{label:"在寺",value:"1"}}),a("el-option",{attrs:{label:"离寺",value:"2"}}),a("el-option",{attrs:{label:"请假",value:"3"}})],1)],1)],1),a("el-col",{attrs:{md:6,sm:12}},[a("el-form-item",{attrs:{label:"状态:"}},[a("el-select",{staticClass:"ele-fluid",attrs:{placeholder:"请选择状态"},model:{value:e.table.where.status,callback:function(t){e.$set(e.table.where,"status",t)},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(t){return e.$refs.table.reload()}}},[e._v("查询 ")]),a("el-button",{on:{click:function(t){(e.table.where={status:"0",on_siyuan:"0"})&&e.$refs.table.reload()}}},[e._v("重置")])],1)])],1)],1),a("div",{staticClass:"ele-table-tool ele-table-tool-default"},[e.permission.includes("sys:yigong:add")?a("el-button",{staticClass:"ele-btn-icon",attrs:{type:"primary",icon:"el-icon-plus",size:"small"},on:{click:function(t){e.showEdit=!0}}},[e._v("添加 ")]):e._e(),e.permission.includes("sys:yigong:dall")?a("el-button",{staticClass:"ele-btn-icon",attrs:{type:"danger",icon:"el-icon-delete",size:"small"},on:{click:function(t){return e.remove()}}},[e._v("批量删除 ")]):e._e()],1),a("ele-data-table",{ref:"table",attrs:{config:e.table,choose:e.choose,height:"calc(100vh - 315px)","highlight-current-row":""},on:{"update:choose":function(t){e.choose=t}},scopedSlots:e._u([{key:"default",fn:function(t){var o=t.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:e._u([{key:"default",fn:function(e){var t=e.row;return[a("el-avatar",{attrs:{shape:"square",size:35,src:t.avatar}})]}}],null,!0)}),a("el-table-column",{attrs:{prop:"realname",label:"义工姓名","show-overflow-tooltip":"",align:"center","min-width":"200"}}),a("el-table-column",{attrs:{prop:"idcard",label:"身份证号","show-overflow-tooltip":"",align:"center","min-width":"120"}}),a("el-table-column",{attrs:{prop:"phone",label:"联系号码","show-overflow-tooltip":"",align:"center","min-width":"150"}}),a("el-table-column",{attrs:{prop:"siyuan",label:"所在寺院","show-overflow-tooltip":"",align:"center","min-width":"150"}}),a("el-table-column",{attrs:{prop:"on_siyuan",label:"在寺状态",align:"center","min-width":"100"},scopedSlots:e._u([{key:"default",fn:function(t){var o=t.row;return[1==o.on_siyuan?a("span",[e._v("在寺")]):e._e(),2==o.on_siyuan?a("span",[e._v("离寺")]):e._e(),3==o.on_siyuan?a("span",[e._v("请假")]):e._e()]}}],null,!0)}),a("el-table-column",{attrs:{prop:"status",label:"状态",resizable:!1,align:"center","min-width":"100"},scopedSlots:e._u([{key:"default",fn:function(t){var o=t.row;return[a("el-switch",{attrs:{"active-value":2,"inactive-value":1},on:{change:function(t){return e.editStatus(o)}},model:{value:o.status,callback:function(t){e.$set(o,"status",t)},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:{prop:"sort",label:"排序",sortable:"custom",align:"center","show-overflow-tooltip":"","min-width":"100"}}),a("el-table-column",{attrs:{label:"创建时间",sortable:"custom","show-overflow-tooltip":"",align:"center","min-width":"160"},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.row;return[e._v(e._s(e._f("toDateString")(a.create_time)))]}}],null,!0)}),a("el-table-column",{attrs:{label:"操作",width:"130px",align:"center",resizable:!1,fixed:"right"},scopedSlots:e._u([{key:"default",fn:function(t){var o=t.row;return[e.permission.includes("sys:yigong:edit")?a("el-link",{attrs:{icon:"el-icon-edit",type:"primary",underline:!1},on:{click:function(t){return e.edit(o)}}},[e._v("详情")]):e._e(),a("el-popconfirm",{staticClass:"ele-action",attrs:{title:"确定要删除此义工信息吗?"},on:{confirm:function(t){return e.remove(o)}}},[e.permission.includes("sys:yigong:delete")?a("el-link",{attrs:{slot:"reference",icon:"el-icon-delete",type:"danger",underline:!1},slot:"reference"},[e._v("删除")]):e._e()],1)]}}],null,!0)})]}}])})],1),a("el-dialog",{attrs:{title:"义工信息",visible:e.showEdit,width:"600px","destroy-on-close":!0,"custom-class":"ele-dialog-form","lock-scroll":!1},on:{"update:visible":function(t){e.showEdit=t},closed:function(t){e.editForm={}}}},[a("el-form",{ref:"editForm",attrs:{model:e.editForm,rules:e.editRules,"label-width":"82px"}},[a("el-form-item",{attrs:{label:"头像:"}},[a("uploadImage",{attrs:{limit:1},model:{value:e.editForm.avatar,callback:function(t){e.$set(e.editForm,"avatar",t)},expression:"editForm.avatar"}})],1),a("el-row",{attrs:{gutter:15}},[a("el-col",{attrs:{sm:12}},[a("el-form-item",{attrs:{label:"义工姓名:",prop:"realname"}},[a("span",{domProps:{textContent:e._s(e.editForm.realname)}})]),a("el-form-item",{attrs:{label:"手机号:",prop:"phone"}},[a("span",{domProps:{textContent:e._s(e.editForm.phone)}})]),a("el-form-item",{attrs:{label:"身份证号码:",prop:"idcard"}},[a("span",{domProps:{textContent:e._s(e.editForm.idcard)}})]),a("el-form-item",{attrs:{label:"所在寺院:",prop:"siyuan"}},[a("span",{domProps:{textContent:e._s(e.editForm.siyuan)}})]),a("el-form-item",{attrs:{label:"描述备注:",prop:"description"}},[a("span",{domProps:{textContent:e._s(e.editForm.description)}})])],1),a("el-col",{attrs:{sm:12}},[a("el-form-item",{attrs:{label:"在寺状态:"}},[a("el-radio-group",{model:{value:e.editForm.on_siyuan,callback:function(t){e.$set(e.editForm,"on_siyuan",t)},expression:"editForm.on_siyuan"}},[a("el-radio",{attrs:{label:1}},[e._v("在寺")]),a("el-radio",{attrs:{label:2}},[e._v("离寺")]),a("el-radio",{attrs:{label:3}},[e._v("请假")])],1)],1)],1),a("el-col",{attrs:{sm:12}},[a("el-form-item",{attrs:{label:"状态:"}},[a("el-radio-group",{model:{value:e.editForm.status,callback:function(t){e.$set(e.editForm,"status",t)},expression:"editForm.status"}},[a("el-radio",{attrs:{label:1}},[e._v("待审核")]),a("el-radio",{attrs:{label:2}},[e._v("已审核")])],1)],1)],1)],1)],1),a("div",{attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.showEdit=!1}}},[e._v("取消")]),a("el-button",{attrs:{type:"primary"},on:{click:e.save}},[e._v("保存")])],1)],1)],1)},l=[],s=(a("d81d"),a("5530")),i=a("cbc3"),n=a("2f62"),r={name:"SysSengren",components:{uploadImage:i["a"]},data:function(){return{table:{url:"/yigong/index",where:{status:"0",on_siyuan:"0"}},choose:[],showEdit:!1,editForm:{status:1,form:1,avatar:""},editRules:{realname:[{required:!0,message:"请输入义工姓名",trigger:"blur"}],status:[{required:!0,message:"请选择状态",trigger:"blur"}]}}},computed:Object(s["a"])({},Object(n["b"])(["permission"])),mounted:function(){},methods:{edit:function(e){this.editForm=Object.assign({},e),this.showEdit=!0},save:function(){var e=this;this.$refs["editForm"].validate((function(t){if(!t)return!1;var a=e.$loading({lock:!0});e.$http.post("/yigong/edit",e.editForm).then((function(t){a.close(),0===t.data.code?(e.showEdit=!1,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)}))}))},remove:function(e){var t=this;if(e){var a=this.$loading({lock:!0});this.$http.post("/yigong/delete",{id:e.id}).then((function(e){a.close(),0===e.data.code?(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)}))}else{if(0===this.choose.length)return this.$message.error("请至少选择一条数据");var o=this.choose.map((function(e){return e.id}));this.$confirm("确定要删除选中的信息吗?","提示",{type:"warning"}).then((function(){var e=t.$loading({lock:!0});t.$http.post("/yigong/delete",{id:o}).then((function(a){e.close(),0===a.data.code?(t.$message({type:"success",message:a.data.msg}),t.$refs.table.reload()):t.$message.error(a.data.msg)})).catch((function(a){e.close(),t.$message.error(a.message)}))})).catch((function(){return 0}))}},editStatus:function(e){var t=this,a=Object.assign({},e);this.$confirm("确定要处理选中的信息吗?","提示",{type:"warning"}).then((function(){var o=t.$loading({lock:!0});t.$http.post("/yigong/status",a).then((function(a){o.close(),0===a.data.code?t.$message({type:"success",message:a.data.msg}):(e.status=e.status?1:2,t.$message.error(a.data.msg))})).catch((function(e){o.close(),t.$message.error(e.message)}))})).catch((function(){return 0}))}}},c=r,u=(a("10984"),a("2877")),d=Object(u["a"])(c,o,l,!1,null,"2f9adec2",null);t["default"]=d.exports},"75f9":function(e,t,a){},b8ca:function(e,t,a){},c19f:function(e,t,a){"use strict";var o=a("23e7"),l=a("da84"),s=a("621a"),i=a("2626"),n="ArrayBuffer",r=s[n],c=l[n];o({global:!0,forced:c!==r},{ArrayBuffer:r}),i(n)},cbc3:function(e,t,a){"use strict";var o=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"finish_room"},[a("div",{staticClass:"finish_room2"},[a("div",{staticClass:"img-list"},e._l(e.photo,(function(t,o){return a("div",{key:o,staticClass:"room_img"},[a("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.url,expression:"item.url"}]}),e.disabled?e._e():a("div",{staticClass:"im-button",on:{click:function(t){return e.deleteImg(o)}}},[a("div",{staticClass:"im-close"}),a("div",{staticClass:"im-close1"})])])})),0),e.photo.length<e.limit?a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"room_add_img"},[e._m(0),a("input",{attrs:{disabled:e.disabled,type:"file"},on:{change:e.add_img}})]):e._e()])])},l=[function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("span",{staticStyle:{"margin-top":"35px"}},[o("img",{attrs:{src:a("206d")}})])}],s=(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")),i=a.n(s),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:[],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(e){this.photo&&this.photo instanceof Array&&this.photo.splice(e,1)},compress:function(e){var t=null,a=document.createElement("canvas"),o=e.height/e.width;a.width=720,a.height=720*o;var l=a.getContext("2d");return l.clearRect(0,0,a.width,a.height),l.drawImage(e,0,0,a.width,a.height),t=a.toDataURL("image/jpeg"),t},dataURItoBlob:function(e){for(var t=window.atob(e.split(",")[1]),a=e.split(",")[0].split(":")[1].split(";")[0],o=new ArrayBuffer(t.length),l=new Uint8Array(o),s=0;s<t.length;s++)l[s]=t.charCodeAt(s);return new window.Blob([o],{type:a})},add_img:function(e){var t=e.target.files[0];if(/\.(gif|jpg|jpeg|png|GIF|JPG|PNG)$/.test(e.target.value)){var a=10485760,o=t.size;if(o>a)return e.target.value="",void this.$notify.error({title:"上传图片错误",message:"上传图片不能超过10M"});this.loading=!0;var l=new FileReader,s=this;l.readAsDataURL(t);var n=new Image;l.onload=function(a){n.src=this.result,n.onload=function(){var o=a.target.result,l=t;s.isCompress&&(o=s.compress(n),l=s.dataURItoBlob(o));var r=new window.FormData;r.append("file",l),i()({method:"POST",url:"/upload/uploadImage",data:r,timeout:1e6,headers:{"Content-Type":"multipart/form-data"}}).then((function(a){console.log(a.data),e.target.value="","undefined"!=typeof s.photo&&""!=s.photo||(s.photo=[]),console.log(s.photo),s.photo.push({fileName:t.fileName,url:a.data.data}),s.loading=!1})).catch((function(t){e.target.value="",s.loading=!1,console.log(t)}))}}}else e.target.value="",this.$notify.error({title:"上传图片错误",message:"请上传gif|jpg|jpeg|png|GIF|JPG|PNG格式图片"})}}},r=n,c=(a("f960"),a("2877")),u=Object(c["a"])(r,o,l,!1,null,null,null);t["a"]=u.exports},f960:function(e,t,a){"use strict";a("b8ca")}}]);