| 1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-79ae64e5"],{"64fa":function(e,t,s){"use strict";s.r(t);var a=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"ele-body"},[s("el-card",{attrs:{shadow:"never"}},[s("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()}}},[s("el-row",{attrs:{gutter:15}},[s("el-col",{attrs:{md:6,sm:12}},[s("el-form-item",{attrs:{label:"关键词:"}},[s("el-input",{attrs:{placeholder:"请输入关键词",clearable:""},model:{value:e.table.where.keyword,callback:function(t){e.$set(e.table.where,"keyword",t)},expression:"table.where.keyword"}})],1)],1),s("el-col",{attrs:{md:6,sm:12}},[s("el-form-item",{attrs:{label:"来源:"}},[s("el-select",{staticClass:"ele-fluid",attrs:{placeholder:"请选择来源"},model:{value:e.table.where.type,callback:function(t){e.$set(e.table.where,"type",t)},expression:"table.where.type"}},[s("el-option",{attrs:{label:"僧人",value:"1"}}),s("el-option",{attrs:{label:"义工",value:"2"}})],1)],1)],1),s("el-col",{attrs:{md:6,sm:12}},[s("el-form-item",{attrs:{label:"状态:"}},[s("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"}},[s("el-option",{attrs:{label:"全部",value:"0"}}),s("el-option",{attrs:{label:"有效",value:"1"}}),s("el-option",{attrs:{label:"无效",value:"2"}})],1)],1)],1),s("el-col",{attrs:{md:6,sm:12}},[s("div",{staticClass:"ele-form-actions"},[s("el-button",{staticClass:"ele-btn-icon",attrs:{type:"primary",icon:"el-icon-search"},on:{click:function(t){return e.$refs.table.reload()}}},[e._v("查询 ")]),s("el-button",{on:{click:function(t){(e.table.where={})&&e.$refs.table.reload()}}},[e._v("重置")])],1)])],1)],1),s("div",{staticClass:"ele-table-tool ele-table-tool-default"},[e.permission.includes("sys:sengren_sign:add")?s("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:sengren_sign:dall")?s("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),s("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 a=t.index;return[s("el-table-column",{attrs:{type:"selection",width:"45",align:"center",fixed:"left"}}),s("el-table-column",{attrs:{type:"index",index:a,label:"编号",width:"60",align:"center",fixed:"left","show-overflow-tooltip":""}}),s("el-table-column",{attrs:{prop:"nickname",label:"用户昵称","show-overflow-tooltip":"",align:"center","min-width":"150"}}),s("el-table-column",{attrs:{prop:"type",label:"打卡来源","show-overflow-tooltip":"",align:"center","min-width":"100"}}),s("el-table-column",{attrs:{prop:"cate_name",label:"打卡类型","show-overflow-tooltip":"",align:"center","min-width":"100"}}),s("el-table-column",{attrs:{prop:"sign_at",label:"打卡时间","show-overflow-tooltip":"",align:"center","min-width":"150"}}),s("el-table-column",{attrs:{prop:"status",label:"状态",resizable:!1,align:"center","min-width":"100"},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.row;return[s("el-switch",{attrs:{"active-value":1,"inactive-value":2},on:{change:function(t){return e.editStatus(a)}},model:{value:a.status,callback:function(t){e.$set(a,"status",t)},expression:"row.status"}})]}}],null,!0)}),s("el-table-column",{attrs:{prop:"description",label:"描述备注","show-overflow-tooltip":"",align:"center","min-width":"250"}}),s("el-table-column",{attrs:{label:"创建时间",sortable:"custom","show-overflow-tooltip":"",align:"center","min-width":"160"},scopedSlots:e._u([{key:"default",fn:function(t){var s=t.row;return[e._v(e._s(e._f("toDateString")(s.create_time)))]}}],null,!0)}),s("el-table-column",{attrs:{label:"操作",width:"130px",align:"center",resizable:!1,fixed:"right"},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.row;return[e.permission.includes("sys:sengren_sign:edit")?s("el-link",{attrs:{icon:"el-icon-edit",type:"primary",underline:!1},on:{click:function(t){return e.edit(a)}}},[e._v("修改")]):e._e(),s("el-popconfirm",{staticClass:"ele-action",attrs:{title:"确定要删除此打卡信息吗?"},on:{confirm:function(t){return e.remove(a)}}},[e.permission.includes("sys:sengren_sign:delete")?s("el-link",{attrs:{slot:"reference",icon:"el-icon-delete",type:"danger",underline:!1},slot:"reference"},[e._v("删除")]):e._e()],1)]}}],null,!0)})]}}])})],1),s("el-dialog",{attrs:{title:(e.editForm.id,"修改打卡信息"),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={status:2}}}},[s("el-form",{ref:"editForm",attrs:{model:e.editForm,rules:e.editRules,"label-width":"82px"}},[s("el-row",{attrs:{gutter:15}},[s("el-col",{attrs:{sm:24}},[s("el-col",{attrs:{sm:12}},[s("el-form-item",{attrs:{label:"用户昵称:",prop:"nickname"}},[s("span",{domProps:{textContent:e._s(e.editForm.nickname)}})]),s("el-form-item",{attrs:{label:"打卡来源:",prop:"type"}},[1==e.editForm.type?s("span",[e._v("僧人")]):2==e.editForm.type?s("span",[e._v("义工")]):e._e()]),s("el-form-item",{attrs:{label:"打卡类型:",prop:"cate_name"}},[s("span",{domProps:{textContent:e._s(e.editForm.cate_name)}})]),s("el-form-item",{attrs:{label:"打卡时间:",prop:"sign_at"}},[s("span",{domProps:{textContent:e._s(e.editForm.sign_at)}})]),s("el-form-item",{attrs:{label:"描述备注:",prop:"description"}},[s("span",{domProps:{textContent:e._s(e.editForm.description)}})]),s("el-form-item",{attrs:{label:"状态:"}},[s("el-radio-group",{model:{value:e.editForm.status,callback:function(t){e.$set(e.editForm,"status",t)},expression:"editForm.status"}},[s("el-radio",{attrs:{label:1}},[e._v("有效")]),s("el-radio",{attrs:{label:2}},[e._v("无效")])],1)],1)],1)],1)],1)],1),s("div",{attrs:{slot:"footer"},slot:"footer"},[s("el-button",{on:{click:function(t){e.showEdit=!1}}},[e._v("取消")]),s("el-button",{attrs:{type:"primary"},on:{click:e.save}},[e._v("保存")])],1)],1)],1)},o=[],l=(s("d81d"),s("5530")),n=s("2f62"),i={name:"SysSigns",data:function(){return{table:{url:"/signs/index",where:{status:"0",type:"1"}},choose:[],showEdit:!1,editForm:{id:0,status:2,form:1},cates:[],editRules:{status:[{required:!0,message:"请选择状态",trigger:"blur"}]}}},computed:Object(l["a"])(Object(l["a"])({},Object(n["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 e=this,t=this.$loading({lock:!0});this.$http.post("/goodscates/options",this.editForm).then((function(s){t.close(),0===s.data.code?e.cates="undefined"!=typeof s.data.data?s.data.data:{}:e.$message.error(s.data.msg)})).catch((function(s){t.close(),e.$message.error(s.message)}))},edit:function(e){this.editForm=Object.assign({},e),this.editForm.albums||(this.editForm.albums=[]),this.showEdit=!0},save:function(){var e=this;this.$refs["editForm"].validate((function(t){if(!t)return!1;var s=e.$loading({lock:!0});e.$http.post("/signs/edit",e.editForm).then((function(t){s.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){s.close(),e.$message.error(t.message)}))}))},remove:function(e){var t=this;if(e){var s=this.$loading({lock:!0});this.$http.post("/signs/delete",{id:e.id}).then((function(e){s.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){s.close(),t.$message.error(e.message)}))}else{if(0===this.choose.length)return this.$message.error("请至少选择一条数据");var a=this.choose.map((function(e){return e.id}));this.$confirm("确定要删除选中的信息吗?","提示",{type:"warning"}).then((function(){var e=t.$loading({lock:!0});t.$http.post("/signs/delete",{id:a}).then((function(s){e.close(),0===s.data.code?(t.$message({type:"success",message:s.data.msg}),t.$refs.table.reload()):t.$message.error(s.data.msg)})).catch((function(s){e.close(),t.$message.error(s.message)}))})).catch((function(){return 0}))}},editStatus:function(e){var t=this,s=this.$loading({lock:!0}),a=Object.assign({},e);this.$http.post("/signs/status",a).then((function(a){s.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){s.close(),t.$message.error(e.message)}))}}},r=i,c=(s("e277"),s("2877")),d=Object(c["a"])(r,a,o,!1,null,"be27c346",null);t["default"]=d.exports},bdcc:function(e,t,s){},e277:function(e,t,s){"use strict";s("bdcc")}}]);
|