chunk-71f02d72.028957f8.js 16 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-71f02d72"],{"09f4":function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),Math.easeInOutQuad=function(e,t,r,a){return e/=a/2,e<1?r/2*e*e+t:(e--,-r/2*(e*(e-2)-1)+t)};var a=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)}}();function n(e){document.documentElement.scrollTop=e,document.body.parentNode.scrollTop=e,document.body.scrollTop=e}function i(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function s(e,t,r){var s=i(),c=e-s,l=20,o=0;t="undefined"===typeof t?500:t;var u=function e(){o+=l;var i=Math.easeInOutQuad(o,s,c,t);n(i),o<t?a(e):r&&"function"===typeof r&&r()};u()}},1582:function(e,t,r){"use strict";r.r(t);var a=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"m-container"},[e._m(0),e._v(" "),r("div",{staticClass:"m-core"},[r("save-form",{staticClass:"searchForm",attrs:{inline:!0,"save-key":"memberSet",model:e.searchForm},on:{submit:e.search,reset:e.onReSet,"update:model":function(t){e.searchForm=t}}},[r("el-form-item",[r("el-input",{attrs:{clearable:"",placeholder:"会员名称"},model:{value:e.searchForm.search,callback:function(t){e.$set(e.searchForm,"search","string"===typeof t?t.trim():t)},expression:"searchForm.search"}})],1),e._v(" "),r("el-form-item",[r("el-button",{attrs:{"native-type":"submit",type:"danger"}},[e._v("搜索")])],1)],1),e._v(" "),r("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"memberRankSetting/add",expression:"'memberRankSetting/add'"}],staticStyle:{"margin-bottom":"20px"},attrs:{type:"primary"},on:{click:e.addLeave}},[e._v("新增会员等级")]),e._v(" "),r("el-table",{attrs:{data:e.tableList,"header-cell-style":{background:"#EDEEF0",color:"#444"}}},[r("el-table-column",{attrs:{align:"center",prop:"name",label:"会员名称"}}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"type",label:"会员标识"},scopedSlots:e._u([{key:"default",fn:function(e){return[r("el-image",{staticStyle:{width:"100px",height:"100px"},attrs:{src:e.row.icon,"preview-src-list":[e.row.icon]}})]}}])}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"type",label:"试用会员标识"},scopedSlots:e._u([{key:"default",fn:function(e){return[r("el-image",{staticStyle:{width:"100px",height:"100px"},attrs:{src:e.row.experienceIcon,"preview-src-list":[e.row.experienceIcon]}})]}}])}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"updateTime",width:"100px",label:"修改时间"}}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"operatorName",label:"修改人"}}),e._v(" "),r("el-table-column",{attrs:{align:"center",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("div",[r("auth",{attrs:{auths:"memberRankSetting/get"}},[r("el-button",{attrs:{type:"text"},on:{click:function(r){return e.resetMember(t.row)}}},[e._v("详情")])],1),e._v(" "),r("auth",{attrs:{auths:["memberRankSetting/get","memberRankSetting/update"],mulit:""}},[r("el-button",{attrs:{type:"text"},on:{click:function(r){return e.resetMember(t.row,"update")}}},[e._v("修改")])],1)],1)]}}])})],1),e._v(" "),r("pagination",{attrs:{"save-key":"memberSet",total:e.rules.total,sync:"",page:e.rules.page,limit:e.rules.limit,"page-sizes":e.rules.page_size},on:{"update:total":function(t){return e.$set(e.rules,"total",t)},"update:page":function(t){return e.$set(e.rules,"page",t)},"update:limit":function(t){return e.$set(e.rules,"limit",t)},pagination:e.getList}})],1),e._v(" "),e.branchStatus?r("el-dialog",{attrs:{title:e.title,"close-on-click-modal":!1,visible:e.branchStatus,"default-expand-all":"",width:"800px"},on:{"update:visible":function(t){e.branchStatus=t},close:function(t){return e.onFormClose("ruleForm")}}},[r("el-form",{ref:"ruleForm",attrs:{model:e.form,inline:!0}},[r("el-alert",{staticStyle:{"margin-bottom":"20px"},attrs:{title:"会员信息",type:"info",closable:!1}}),e._v(" "),r("el-form-item",{attrs:{label:"会员名称",prop:"name","label-width":e.formLabelWidth,rules:[{required:!0,message:"请输入会员名称"}]}},[r("el-input",{staticStyle:{width:"620px"},attrs:{disabled:e.addDisabled,autocomplete:"off",maxlength:"10","show-word-limit":""},model:{value:e.form.name,callback:function(t){e.$set(e.form,"name","string"===typeof t?t.trim():t)},expression:"form.name"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"会员介绍",prop:"intro","label-width":e.formLabelWidth,rules:[{required:!0,message:"请输入会员介绍"}]}},[r("el-input",{staticStyle:{width:"620px"},attrs:{maxlength:"200","show-word-limit":"",disabled:e.addDisabled,autocomplete:"off",type:"textarea",rows:5},model:{value:e.form.intro,callback:function(t){e.$set(e.form,"intro","string"===typeof t?t.trim():t)},expression:"form.intro"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"会员标识",prop:"icon","label-width":e.formLabelWidth,rules:[{required:!0,message:"请上传会员标识"}]}},[r("image-cropper",{attrs:{options:e.cropperOptions,disabled:e.addDisabled,imgSize:2,imageUrl:e.form.icon},on:{"crop-upload-success":e.cropSuccess2}})],1),e._v(" "),r("br"),e._v(" "),r("el-form-item",{attrs:{label:"试用会员标识",prop:"experienceIcon","label-width":e.formLabelWidth,rules:[{required:!0,message:"请上传试用会员标识"}]}},[r("image-cropper",{attrs:{options:e.cropperOptions,disabled:e.addDisabled,imgSize:2,imageUrl:e.form.experienceIcon},on:{"crop-upload-success":e.cropSuccess}}),e._v(" "),e.addDisabled?e._e():r("p",{staticStyle:{color:"red"}},[e._v("\n 请上传大小2M以内,格式为jpg、png、gif图片\n ")])],1),e._v(" "),r("el-alert",{staticStyle:{"margin-bottom":"20px"},attrs:{title:"会员权益",type:"info",closable:!1}}),e._v(" "),r("el-form-item",{attrs:{label:e.searchName,"label-width":e.formLabelWidth}},[r("el-input",{staticStyle:{width:"210px"},model:{value:e.seachRoleValue,callback:function(t){e.seachRoleValue="string"===typeof t?t.trim():t},expression:"seachRoleValue"}}),e._v(" "),r("el-button",{staticStyle:{"margin-left":"10px"},attrs:{type:"danger"},on:{click:e.seachRoles}},[e._v("搜索")]),e._v(" "),r("el-button",{attrs:{type:"primary"},on:{click:e.onReSetRole}},[e._v("重置")])],1),e._v(" "),r("br"),e._v(" "),r("el-form-item",{attrs:{label:"会员功能","label-width":e.formLabelWidth}},[r("el-checkbox",{attrs:{disabled:e.addDisabled,indeterminate:e.isIndeterminate},on:{change:e.onCheckAll},model:{value:e.checkAll,callback:function(t){e.checkAll="string"===typeof t?t.trim():t},expression:"checkAll"}},[e._v("全选")]),e._v(" "),r("div",[r("el-tree",{ref:"trees",staticClass:"tree",attrs:{data:e.treeData,"show-checkbox":"","node-key":"id","filter-node-method":e.filterNode,"highlight-current":"","default-checked-keys":e.checkList,props:e.defaultProps},on:{check:e.onTreeCheck},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.node;t.data;return r("div",{},[e._v("\n "+e._s(a.label)+"\n ")])}}],null,!1,769793285)})],1)],1)],1),e._v(" "),r("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e.addDisabled?e._e():r("el-button",{on:{click:function(t){e.branchStatus=!1}}},[e._v("取 消")]),e._v(" "),r("el-button",{attrs:{type:"primary"},on:{click:e.onSubmit}},[e._v("确 定")])],1)],1):e._e()],1)},n=[function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("h2",[r("div",{staticClass:"squrt"}),e._v("\n 会员设置\n ")])}],i=(r("ac6a"),r("6762"),r("2fdb"),r("7f7f"),r("db72")),s=r("75fc"),c=(r("386d"),r("c80c")),l=(r("96cf"),r("3b8d")),o=r("333d"),u=r("c7f0"),d=r("896b"),m=r("6cfe"),h=r("624a"),p={components:{pagination:o["a"],Upload:u["a"],ImageCropper:d["a"]},name:"memberSet",data:function(){return{formLabelWidth:"120px",searchForm:{search:null},rules:{limit:10,page:1,total:0,page_size:[10,20,40,50]},tableList:[],title:"新增会员等级",branchStatus:!1,form:{name:"",icon:"",into:"",experienceIcon:""},addDisabled:!1,checkAll:!1,isIndeterminate:!1,treeData:[],defaultProps:{children:"children",label:"label",disabled:this.addDisabled},result:{roleName:null,roleDesc:null},seachRoleValue:"",silderList:[],slideCount:0,pageType:"",allChildIds:[],checkList:[],searchName:"搜索       ",cropperOptions:{autoCrop:!0,autoCropWidth:200,autoCropHeight:200,fixedBox:!0,previewsCircle:!1,title:"会员标识"}}},mounted:function(){var e=Object(l["a"])(Object(c["a"])().mark((function e(){return Object(c["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:this.getList();case 1:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),methods:{onFormClose:function(e){this.form={name:"",icon:"",into:""},this.$refs.trees.setCheckedNodes([]),this.onTreeCheck(),this.$refs[e].resetFields()},search:function(){this.rules.page=1,this.getList()},onReSet:function(){},cropSuccess:function(e){this.form.experienceIcon=e.data.url},cropSuccess2:function(e){this.form.icon=e.data.url},getList:function(){var e=Object(l["a"])(Object(c["a"])().mark((function e(){var t;return Object(c["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(m["e"])({search:this.searchForm.search,rows:this.rules.limit,page:this.rules.page});case 3:t=e.sent,this.tableList=t.data.rows,this.rules.total=t.data.total,e.next=10;break;case 8:e.prev=8,e.t0=e["catch"](0);case 10:case"end":return e.stop()}}),e,this,[[0,8]])})));function t(){return e.apply(this,arguments)}return t}(),addLeave:function(){var e=Object(l["a"])(Object(c["a"])().mark((function e(){return Object(c["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return this.checkList=[],this.title="新增会员等级",this.addDisabled=!1,this.pageType="create",e.next=6,this.getNewTree();case 6:return this.slideCount=0,e.next=9,this.setTableData(this.silderList,this.addDisabled);case 9:this.treeData=e.sent,this.branchStatus=!0;case 11:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),onSubmit:function(){var e=this;this.$refs.ruleForm.validate(function(){var t=Object(l["a"])(Object(c["a"])().mark((function t(r){var a,n,l;return Object(c["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!r){t.next=33;break}if(a=e.$refs.trees.getCheckedKeys(),n=e.$refs.trees.getHalfCheckedKeys(),l=[].concat(Object(s["a"])(a),Object(s["a"])(n)),"update"!=e.pageType){t.next=18;break}return t.prev=5,t.next=8,Object(m["h"])(Object(i["a"])(Object(i["a"])({},e.form),{},{memberPrivilegesItemIdList:l}));case 8:t.sent,e.$message.success("修改成功"),e.branchStatus=!1,e.getList(),t.next=16;break;case 14:t.prev=14,t.t0=t["catch"](5);case 16:t.next=33;break;case 18:if("create"!=e.pageType){t.next=32;break}return t.prev=19,t.next=22,Object(m["b"])(Object(i["a"])(Object(i["a"])({},e.form),{},{memberPrivilegesItemIdList:l}));case 22:t.sent,e.$message.success("新建会员成功"),e.branchStatus=!1,e.getList(),t.next=30;break;case 28:t.prev=28,t.t1=t["catch"](19);case 30:t.next=33;break;case 32:e.branchStatus=!1;case 33:case"end":return t.stop()}}),t,null,[[5,14],[19,28]])})));return function(e){return t.apply(this,arguments)}}())},onCheckAll:function(e){e?(this.isIndeterminate=!1,this.$refs.trees.setCheckedNodes(this.treeData)):this.$refs.trees.setCheckedNodes([])},onTreeCheck:function(){var e=this.$refs.trees.getCheckedKeys();this.checkAll=e.length>=this.slideCount,this.isIndeterminate=e.length>0&&e.length<this.slideCount},filterNode:function(e,t){return!e||-1!==t.label.indexOf(e)},seachRoles:function(){this.$refs.trees.filter(this.seachRoleValue)},onReSetRole:function(){this.seachRoleValue="",this.$refs.trees.filter(this.seachRoleValue)},setTableData:function(e,t){var r=this,a=[];return a=e.map((function(e){var a={};return a={id:e.id,name:e.name,label:e.name,disabled:t||!1},r.slideCount++,e.memberPrivilegesItems&&e.memberPrivilegesItems.length>0&&(a.children=r.setTableData(e.memberPrivilegesItems,t)),a})),a},resetMember:function(){var e=Object(l["a"])(Object(c["a"])().mark((function e(t,r){return Object(c["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return this.branchStatus=!0,e.next=3,this.resetTree(t);case 3:if(!r){e.next=13;break}return this.title="修改会员等级",this.pageType="update",this.addDisabled=!1,this.slideCount=0,e.next=10,this.setTableData(this.silderList,this.addDisabled);case 10:this.treeData=e.sent,e.next=20;break;case 13:return this.addDisabled=!0,this.title="查看会员等级",this.pageType="",this.slideCount=0,e.next=19,this.setTableData(this.silderList,this.addDisabled);case 19:this.treeData=e.sent;case 20:case"end":return e.stop()}}),e,this)})));function t(t,r){return e.apply(this,arguments)}return t}(),getParent:function(e,t){var r=JSON.parse(JSON.stringify(e));this.getAllChildIds(t);for(var a=this.allChildIds,n=e.length;n>0;n--)a.includes(e[n-1])||r.splice(n-1,1);return r},getAllChildIds:function(e){var t=this,r=this.allChildIds;e.forEach((function(e,a){e.children&&e.children.length>0?t.getAllChildIds(e.children):r.push(e.id)}))},resetTree:function(){var e=Object(l["a"])(Object(c["a"])().mark((function e(t){var r,a,n,s,l,o=this;return Object(c["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.getNewTree();case 3:return this.treeData=e.sent,e.next=6,Object(m["d"])({memberRankSettingId:t.id});case 6:s=e.sent,this.form=Object(i["a"])({},s.data),this.checkAll=(null===(r=s.data.memberPrivilegesItemIdList)||void 0===r?void 0:r.length)>=this.slideCount||!1,this.isIndeterminate=(null===(a=s.data.memberPrivilegesItemIdList)||void 0===a?void 0:a.length)>0&&(null===(n=s.data.memberPrivilegesItemIdList)||void 0===n?void 0:n.length)<this.slideCount,this.checkList=s.data.memberPrivilegesItemIdList,l=this.getParent(s.data.memberPrivilegesItemIdList||[],this.treeData),this.checkList=l,this.$nextTick((function(){o.$refs.trees.setCheckedKeys(o.checkList)})),e.next=19;break;case 16:e.prev=16,e.t0=e["catch"](0),console.log(e.t0);case 19:case"end":return e.stop()}}),e,this,[[0,16]])})));function t(t){return e.apply(this,arguments)}return t}(),getNewTree:function(){var e=Object(l["a"])(Object(c["a"])().mark((function e(){var t;return Object(c["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(h["c"])();case 3:return t=e.sent,this.silderList=t.data,this.slideCount=0,e.abrupt("return",this.setTableData(t.data));case 9:e.prev=9,e.t0=e["catch"](0);case 11:case"end":return e.stop()}}),e,this,[[0,9]])})));function t(){return e.apply(this,arguments)}return t}()}},b=p,f=(r("6196"),r("2877")),g=Object(f["a"])(b,a,n,!1,null,"6e35d1ea",null);t["default"]=g.exports},"5be7":function(e,t,r){},6196:function(e,t,r){"use strict";r("5be7")},"624a":function(e,t,r){"use strict";r.d(t,"c",(function(){return i})),r.d(t,"a",(function(){return s})),r.d(t,"d",(function(){return c})),r.d(t,"b",(function(){return l}));var a=r("829b"),n=(r("4328"),"/api-web");function i(e){return Object(a["a"])({url:n+"/memberPrivilegesItem/findAll",method:"get",params:e})}function s(e){return Object(a["a"])({url:n+"/memberPrivilegesItem/add",method:"post",data:e})}function c(e){return Object(a["a"])({url:n+"/memberPrivilegesItem/update",method:"post",data:e})}function l(e){return Object(a["a"])({url:n+"/memberPrivilegesItem/del",method:"post",params:e})}},"6cfe":function(e,t,r){"use strict";r.d(t,"c",(function(){return i})),r.d(t,"b",(function(){return s})),r.d(t,"e",(function(){return c})),r.d(t,"d",(function(){return l})),r.d(t,"h",(function(){return o})),r.d(t,"a",(function(){return u})),r.d(t,"f",(function(){return d})),r.d(t,"g",(function(){return m}));var a=r("829b"),n=(r("4328"),"/api-web");function i(e){return Object(a["a"])({url:n+"/memberRankSetting/findAll",method:"get",params:e})}function s(e){return Object(a["a"])({url:n+"/memberRankSetting/add",method:"post",data:e})}function c(e){return Object(a["a"])({url:n+"/memberRankSetting/queryPage",method:"get",params:e})}function l(e){return Object(a["a"])({url:n+"/memberRankSetting/get",method:"get",params:e})}function o(e){return Object(a["a"])({url:n+"/memberRankSetting/update",method:"post",data:e})}function u(e){return Object(a["a"])({url:n+"/memberRankOrganizationFeeMapper/add",method:"post",data:e})}function d(e){return Object(a["a"])({url:n+"/memberRankOrganizationFeeMapper/queryPage",method:"get",params:e})}function m(e){return Object(a["a"])({url:n+"/memberRankOrganizationFeeMapper/update",method:"post",data:e,requestType:"json"})}}}]);