1 |
- webpackJsonp([6],{"0JTB":function(i,t){},"4WTo":function(i,t,e){var s=e("NWt+");i.exports=function(i,t){var e=[];return s(i,!1,e.push,e,t),e}},"5zde":function(i,t,e){e("zQR9"),e("qyJz"),i.exports=e("FeBl").Array.from},"7Doy":function(i,t,e){var s=e("EqjI"),n=e("7UMu"),o=e("dSzd")("species");i.exports=function(i){var t;return n(i)&&("function"!=typeof(t=i.constructor)||t!==Array&&!n(t.prototype)||(t=void 0),s(t)&&null===(t=t[o])&&(t=void 0)),void 0===t?Array:t}},"9Bbf":function(i,t,e){"use strict";var s=e("kM2E");i.exports=function(i){s(s.S,i,{of:function(){for(var i=arguments.length,t=new Array(i);i--;)t[i]=arguments[i];return new this(t)}})}},"9C8M":function(i,t,e){"use strict";var s=e("evD5").f,n=e("Yobk"),o=e("xH/j"),r=e("+ZMJ"),a=e("2KxR"),l=e("NWt+"),c=e("vIB/"),d=e("EGZi"),u=e("bRrM"),f=e("+E39"),p=e("06OY").fastKey,h=e("LIJb"),g=f?"_s":"size",v=function(i,t){var e,s=p(t);if("F"!==s)return i._i[s];for(e=i._f;e;e=e.n)if(e.k==t)return e};i.exports={getConstructor:function(i,t,e,c){var d=i(function(i,s){a(i,d,t,"_i"),i._t=t,i._i=n(null),i._f=void 0,i._l=void 0,i[g]=0,void 0!=s&&l(s,e,i[c],i)});return o(d.prototype,{clear:function(){for(var i=h(this,t),e=i._i,s=i._f;s;s=s.n)s.r=!0,s.p&&(s.p=s.p.n=void 0),delete e[s.i];i._f=i._l=void 0,i[g]=0},delete:function(i){var e=h(this,t),s=v(e,i);if(s){var n=s.n,o=s.p;delete e._i[s.i],s.r=!0,o&&(o.n=n),n&&(n.p=o),e._f==s&&(e._f=n),e._l==s&&(e._l=o),e[g]--}return!!s},forEach:function(i){h(this,t);for(var e,s=r(i,arguments.length>1?arguments[1]:void 0,3);e=e?e.n:this._f;)for(s(e.v,e.k,this);e&&e.r;)e=e.p},has:function(i){return!!v(h(this,t),i)}}),f&&s(d.prototype,"size",{get:function(){return h(this,t)[g]}}),d},def:function(i,t,e){var s,n,o=v(i,t);return o?o.v=e:(i._l=o={i:n=p(t,!0),k:t,v:e,p:s=i._l,n:void 0,r:!1},i._f||(i._f=o),s&&(s.n=o),i[g]++,"F"!==n&&(i._i[n]=o)),i},getEntry:v,setStrong:function(i,t,e){c(i,t,function(i,e){this._t=h(i,t),this._k=e,this._l=void 0},function(){for(var i=this._k,t=this._l;t&&t.r;)t=t.p;return this._t&&(this._l=t=t?t.n:this._t._f)?d(0,"keys"==i?t.k:"values"==i?t.v:[t.k,t.v]):(this._t=void 0,d(1))},e?"entries":"values",!e,!0),u(t)}}},ALrJ:function(i,t,e){var s=e("+ZMJ"),n=e("MU5D"),o=e("sB3e"),r=e("QRG4"),a=e("oeOm");i.exports=function(i,t){var e=1==i,l=2==i,c=3==i,d=4==i,u=6==i,f=5==i||u,p=t||a;return function(t,a,h){for(var g,v,_=o(t),m=n(_),y=s(a,h,3),x=r(m.length),b=0,k=e?p(t,x):l?p(t,0):void 0;x>b;b++)if((f||b in m)&&(v=y(g=m[b],b,_),i))if(e)k[b]=v;else if(v)switch(i){case 3:return!0;case 5:return g;case 6:return b;case 2:k.push(g)}else if(d)return!1;return u?-1:c||d?d:k}}},BDhv:function(i,t,e){var s=e("kM2E");s(s.P+s.R,"Set",{toJSON:e("m9gC")("Set")})},HpRW:function(i,t,e){"use strict";var s=e("kM2E"),n=e("lOnJ"),o=e("+ZMJ"),r=e("NWt+");i.exports=function(i){s(s.S,i,{from:function(i){var t,e,s,a,l=arguments[1];return n(this),(t=void 0!==l)&&n(l),void 0==i?new this:(e=[],t?(s=0,a=o(l,arguments[2],2),r(i,!1,function(i){e.push(a(i,s++))})):r(i,!1,e.push,e),new this(e))}})}},LIJb:function(i,t,e){var s=e("EqjI");i.exports=function(i,t){if(!s(i)||i._t!==t)throw TypeError("Incompatible receiver, "+t+" required!");return i}},NnS4:function(i,t){},PtBG:function(i,t){},Vt1u:function(i,t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=e("lHA8"),n=e.n(s),o=e("c/Tr"),r=e.n(o),a={props:["permission_id"],data:function(){return{title:"",description:"",loading:!1,infoList:[],permission_list:[]}},created:function(){this.$store.state.permissionList&&0!=this.$store.state.permissionList.length?(this.infoList=this.$store.state.permissionList,this.permission_list.push(this.infoList[0].id)):this.getPermissionList(),this.permission_id&&this.groupDetail()},methods:{permissionClick:function(i,t){if(-1==this.permission_list.indexOf(i))this.permission_list.push(i),this.permission_list.push(t);else{this.permission_list=this.permission_list.filter(function(t){return t!=i});var e=this.permission_list.indexOf(t);this.permission_list.splice(e,1)}},getPermissionList:function(){var i=this;this.loading=!0,this.$axios.get(this.URL.BASEURL+this.URL.permission_permissionList,{}).then(function(t){t=t.data;i.loading=!1,t&&0==t.errno?(i.infoList=t.rst,i.permission_list.push(i.infoList[0].id),i.$store.state.permissionList=i.infoList):4002!=t.errno&&i.$message({message:t.err,type:"warning"})}).catch(function(t){i.loading=!1})},groupDetail:function(){var i=this;this.loading=!0,this.$axios.get(this.URL.BASEURL+this.URL.permission_groupDetail,{params:{id:this.permission_id}}).then(function(t){t=t.data;i.loading=!1,t&&0==t.errno?(i.title=t.rst.title,i.description=t.rst.description,i.permission_list=i.permission_list.concat(t.rst.permission_ids)):4002!=t.errno&&i.$message({message:t.err,type:"warning"})}).catch(function(t){i.loading=!1})},submitGroup:function(){var i=this;if(this.title&&""!=this.title){var t=[];if(t=this.permission_list.filter(function(i){return 0!=i}),0!=(t=r()(new n.a(t))).length){var e=this.URL.permission_groupAdd,s={title:this.title,description:this.description,permission_ids:t};this.permission_id&&(e=this.URL.permission_groupEdit,s.id=this.permission_id),this.loading=!0,this.$axios.post(this.URL.BASEURL+e,s).then(function(t){t=t.data;i.loading=!1,t&&0==t.errno?i.$emit("closeDialog",!0):4002!=t.errno&&i.$message({message:t.err,type:"warning"})}).catch(function(t){i.loading=!1})}else this.$message({message:"请选择权限!",type:"warning"})}else this.$message({message:"请输入权限组命名!",type:"warning"})}}},l={render:function(){var i=this,t=i.$createElement,e=i._self._c||t;return e("div",{directives:[{name:"loading",rawName:"v-loading",value:i.loading,expression:"loading"}],staticClass:"role_permission_dialog"},[e("div",{staticClass:"dialogitem"},[e("label",[i._v("权限命名:")]),i._v(" "),e("el-input",{staticStyle:{width:"70%"},attrs:{placeholder:"请输入权限名称",size:"small",clearable:""},model:{value:i.title,callback:function(t){i.title="string"==typeof t?t.trim():t},expression:"title"}})],1),i._v(" "),e("div",{staticClass:"dialogitem"},[e("label",[i._v("权限描述:")]),i._v(" "),e("el-input",{staticStyle:{width:"70%"},attrs:{placeholder:"请输入权限描述",size:"small",clearable:""},model:{value:i.description,callback:function(t){i.description="string"==typeof t?t.trim():t},expression:"description"}})],1),i._v(" "),e("div",{staticClass:"line"}),i._v(" "),e("div",{staticClass:"allMenu"},[i._l(i.infoList,function(t,s){return[e("div",{key:s+"bigMenu",staticClass:"bigMenu",class:t.childs&&0!=t.childs.length?"":"pointer",on:{click:function(e){(!t.childs||0==t.childs.length)&&i.permissionClick(t.id,t.parent_id)}}},[i._v("\n "+i._s(t.title)+"\n "),t.childs&&0!=t.childs.length?i._e():e("div",{staticClass:"checkbox",class:-1!=i.permission_list.indexOf(t.id)?"active":""},[e("i",{staticClass:"el-icon-check"})])]),i._v(" "),t.childs&&t.childs.length>0?e("ul",{key:s+"smallMenu",staticClass:"smallMenu"},i._l(t.childs,function(t,s){return e("li",{key:s+"smallchilds",on:{click:function(e){return i.permissionClick(t.id,t.parent_id)}}},[i._v(i._s(t.title)),e("div",{staticClass:"checkbox",class:-1!=i.permission_list.indexOf(t.id)?"active":""},[e("i",{staticClass:"el-icon-check"})])])}),0):i._e()]})],2),i._v(" "),e("div",{staticClass:"line"}),i._v(" "),e("div",{staticClass:"dialog-footer"},[e("el-button",{attrs:{size:"mini"},on:{click:function(t){return i.$emit("closeDialog")}}},[i._v("取 消")]),i._v(" "),e("el-button",{attrs:{type:"primary",size:"mini"},on:{click:i.submitGroup}},[i._v("提 交")])],1)])},staticRenderFns:[]};var c={components:{rolePermission:e("VU/8")(a,l,!1,function(i){e("NnS4"),e("PtBG")},"data-v-cecce5e6",null).exports},data:function(){return{keyword:"",total:0,page:1,pages:0,page_size:20,loading:!1,infoList:[],dialogFlag:!1,isEdit:!1,edit_id:"",userInfo:{},distributionPermissionFlag:!1,position_ids:[],gangwei_list:[],fenpe_per_id:""}},created:function(){this.userInfo=JSON.parse(this.$localSelfStore.getLocal("userInfo")),this.init_gangwei(),this.init(1)},methods:{closeDialog:function(i){this.isEdit=!1,this.dialogFlag=!1,this.edit_id="",i&&this.init(this.page)},menuConfigure:function(){var i=this.$router.resolve({path:"/permissionBigClass"});window.open(i.href,"_blank")},addEvent:function(){this.dialogFlag=!0,this.isEdit=!1,this.edit_id=""},editEvent:function(i){this.dialogFlag=!0,this.isEdit=!0,this.edit_id=i.id},roomEdit:function(){var i=this;if(this.position_ids&&0!=this.position_ids.length){var t=this.URL.permission_groupSetPositions,e={id:this.fenpe_per_id,position_ids:this.position_ids};this.$loading(this.$loadingConfig),this.$axios.post(this.URL.BASEURL+t,e).then(function(t){t=t.data;i.$loading(i.$loadingConfig).close(),t&&0==t.errno?(i.$message({message:"分配成功",type:"success"}),i.distributionPermissionFlag=!1):4002!=t.errno&&i.$message({message:t.err,type:"warning"})}).catch(function(t){i.$loading(i.$loadingConfig).close()})}else this.$message({message:"请选择岗位",type:"warning"})},deleteFlagEvent:function(i){var t=this;this.$confirm("确定要删除该权限组?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){t.$loading(t.$loadingConfig),t.$axios.post(t.URL.BASEURL+t.URL.permission_groupDel,{id:i.id}).then(function(i){i=i.data;t.$loading(t.$loadingConfig).close(),i&&0==i.errno?t.init(t.page):t.$message({message:i.rst,type:"warning"})}).catch(function(){t.$loading(t.$loadingConfig).close()})}).catch(function(){})},init:function(i){var t=this;this.page=i||this.page,this.loading=!0,this.$axios.get(this.URL.BASEURL+this.URL.permission_groupList,{params:{page:this.page,pagesize:this.page_size,title:this.keyword}}).then(function(i){i=i.data;t.loading=!1,i&&0==i.errno?(t.infoList=i.rst.data,t.total=i.rst.pageInfo.total,t.pages=i.rst.pageInfo.pages):4002!=i.errno&&t.$message({message:i.err,type:"warning"})}).catch(function(i){t.loading=!1})},handleCurrentChange:function(i){this.init(i)},init_gangwei:function(){var i=this;this.$axios.get(this.URL.BASEURL+this.URL.permission_positionList,{params:{page:1,page_size:500}}).then(function(t){(t=t.data)&&0==t.errno?i.gangwei_list=t.rst.data:4002!=t.errno&&i.$message({message:t.err,type:"warning"})}).catch(function(i){})},permission_groupPositions:function(i){var t=this;this.fenpe_per_id=i,this.loading=!0,this.$axios.get(this.URL.BASEURL+this.URL.permission_groupPositions,{params:{id:i}}).then(function(i){i=i.data;t.loading=!1,i&&0==i.errno?(t.distributionPermissionFlag=!0,t.position_ids=i.rst.map(function(i){return i.id})):4002!=i.errno&&t.$message({message:i.err,type:"warning"})}).catch(function(i){t.loading=!1})}}},d={render:function(){var i=this,t=i.$createElement,e=i._self._c||t;return e("div",{directives:[{name:"loading",rawName:"v-loading",value:i.loading,expression:"loading"}],staticClass:"managementPage"},[e("div",{staticClass:"commonInfo operation_container flex"},[e("button",{staticClass:"addButton",on:{click:function(t){return i.addEvent()}}},[i._v("添加权限组")]),i._v(" "),5==i.userInfo.role_id?e("button",{staticClass:"addButton",staticStyle:{"margin-left":"20px"},on:{click:function(t){return i.menuConfigure()}}},[i._v("菜单配置")]):i._e(),i._v(" "),e("div",{staticClass:"flex",staticStyle:{"margin-left":"10px"}},[e("div",{staticClass:"commonInfoName"},[i._v("权限组名称")]),i._v(" "),e("div",{staticClass:"commonSearchBox flex",staticStyle:{width:"200px"}},[e("input",{directives:[{name:"model",rawName:"v-model",value:i.keyword,expression:"keyword"}],staticClass:"commonSearchInput",attrs:{type:"text",placeholder:"请输入权限组名称"},domProps:{value:i.keyword},on:{keydown:function(t){return!t.type.indexOf("key")&&i._k(t.keyCode,"enter",13,t.key,"Enter")?null:i.init(1)},input:function(t){t.target.composing||(i.keyword=t.target.value)}}}),i._v(" "),e("i",{staticClass:"iconfont icon-sousuo_icon",on:{click:function(t){return i.init(1)}}})])])]),i._v(" "),e("div",{staticClass:"table_div"},[e("table",[i._m(0),i._v(" "),e("tbody",i._l(i.infoList,function(t){return e("tr",{key:t.id,staticClass:"pointer"},[e("td",[e("span",[i._v(i._s(t.title?t.title:"-"))])]),i._v(" "),e("td",[e("span",[i._v(i._s(t.description?t.description:"-"))])]),i._v(" "),e("td",[0==t.spec_type?e("el-button",{staticClass:"modifybtn",attrs:{size:"mini"},on:{click:function(e){return i.editEvent(t)}}},[i._v("编 辑")]):i._e(),i._v(" "),0!=t.spec_type||1!=i.userInfo.role_id&&5!=i.userInfo.role_id&&6!=i.userInfo.role_id?i._e():e("el-button",{staticClass:"delebtn",attrs:{size:"mini"},on:{click:function(e){return i.deleteFlagEvent(t)}}},[i._v("删 除")]),i._v(" "),e("el-button",{staticClass:"modifybtn",staticStyle:{background:"#ff9b3b","border-color":"#ff9b3b"},attrs:{size:"mini"},on:{click:function(e){return i.permission_groupPositions(t.id)}}},[i._v("分配岗位")])],1)])}),0)])]),i._v(" "),i.loading||0!=i.infoList.length?i._e():e("div",{staticClass:"noHaveDate"},[i._v("暂无数据")]),i._v(" "),e("div",{directives:[{name:"show",rawName:"v-show",value:i.total>0,expression:"total>0"}],staticClass:"bottom"},[e("el-pagination",{attrs:{background:"","current-page":i.page,layout:"prev, pager, next","page-count":Number(i.pages)},on:{"current-change":i.handleCurrentChange}})],1),i._v(" "),e("el-dialog",{attrs:{title:"分配岗位",visible:i.distributionPermissionFlag,width:"500px","close-on-click-modal":!1,left:""},on:{"update:visible":function(t){i.distributionPermissionFlag=t}}},[e("div",{staticClass:"dialogBox"},[e("div",{staticClass:"dialogitem"},[e("label",[i._v("选择岗位")]),i._v(" "),e("el-select",{staticStyle:{width:"calc(100% - 100px)"},attrs:{size:"small",multiple:"",placeholder:"选择岗位"},model:{value:i.position_ids,callback:function(t){i.position_ids=t},expression:"position_ids"}},i._l(i.gangwei_list,function(i){return e("el-option",{key:i.id,attrs:{label:i.name,value:i.id}})}),1)],1)]),i._v(" "),e("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{attrs:{size:"mini"},on:{click:function(t){i.distributionPermissionFlag=!1}}},[i._v("取 消")]),i._v(" "),e("el-button",{attrs:{type:"primary",size:"mini"},on:{click:i.roomEdit}},[i._v("提 交")])],1)]),i._v(" "),e("el-dialog",{attrs:{title:(i.isEdit?"编辑":"添加")+"权限",visible:i.dialogFlag,width:"600px",top:"60px","close-on-click-modal":!1,"show-close":!1,left:""},on:{"update:visible":function(t){i.dialogFlag=t}}},[i.dialogFlag?e("rolePermission",{attrs:{permission_id:i.edit_id},on:{closeDialog:i.closeDialog}}):i._e()],1)],1)},staticRenderFns:[function(){var i=this.$createElement,t=this._self._c||i;return t("thead",[t("tr",[t("th",[t("div",{staticClass:"th_title"},[this._v("权限组名称")])]),this._v(" "),t("th",[t("div",{staticClass:"th_title"},[this._v("描述")])]),this._v(" "),t("th",{staticStyle:{"margin-right":"20px"}},[t("div",{staticClass:"th_title"},[this._v("\n 操作\n ")])])])])}]};var u=e("VU/8")(c,d,!1,function(i){e("ZNYK"),e("0JTB")},"data-v-5be100c4",null);t.default=u.exports},ZNYK:function(i,t){},"c/Tr":function(i,t,e){i.exports={default:e("5zde"),__esModule:!0}},fBQ2:function(i,t,e){"use strict";var s=e("evD5"),n=e("X8DO");i.exports=function(i,t,e){t in i?s.f(i,t,n(0,e)):i[t]=e}},ioQ5:function(i,t,e){e("HpRW")("Set")},lHA8:function(i,t,e){i.exports={default:e("pPW7"),__esModule:!0}},m9gC:function(i,t,e){var s=e("RY/4"),n=e("4WTo");i.exports=function(i){return function(){if(s(this)!=i)throw TypeError(i+"#toJSON isn't generic");return n(this)}}},oNmr:function(i,t,e){e("9Bbf")("Set")},oeOm:function(i,t,e){var s=e("7Doy");i.exports=function(i,t){return new(s(i))(t)}},pPW7:function(i,t,e){e("M6a0"),e("zQR9"),e("+tPU"),e("ttyz"),e("BDhv"),e("oNmr"),e("ioQ5"),i.exports=e("FeBl").Set},qo66:function(i,t,e){"use strict";var s=e("7KvD"),n=e("kM2E"),o=e("06OY"),r=e("S82l"),a=e("hJx8"),l=e("xH/j"),c=e("NWt+"),d=e("2KxR"),u=e("EqjI"),f=e("e6n0"),p=e("evD5").f,h=e("ALrJ")(0),g=e("+E39");i.exports=function(i,t,e,v,_,m){var y=s[i],x=y,b=_?"set":"add",k=x&&x.prototype,C={};return g&&"function"==typeof x&&(m||k.forEach&&!r(function(){(new x).entries().next()}))?(x=t(function(t,e){d(t,x,i,"_c"),t._c=new y,void 0!=e&&c(e,_,t[b],t)}),h("add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON".split(","),function(i){var t="add"==i||"set"==i;i in k&&(!m||"clear"!=i)&&a(x.prototype,i,function(e,s){if(d(this,x,i),!t&&m&&!u(e))return"get"==i&&void 0;var n=this._c[i](0===e?0:e,s);return t?this:n})}),m||p(x.prototype,"size",{get:function(){return this._c.size}})):(x=v.getConstructor(t,i,_,b),l(x.prototype,e),o.NEED=!0),f(x,i),C[i]=x,n(n.G+n.W+n.F,C),m||v.setStrong(x,i,_),x}},qyJz:function(i,t,e){"use strict";var s=e("+ZMJ"),n=e("kM2E"),o=e("sB3e"),r=e("msXi"),a=e("Mhyx"),l=e("QRG4"),c=e("fBQ2"),d=e("3fs2");n(n.S+n.F*!e("dY0y")(function(i){Array.from(i)}),"Array",{from:function(i){var t,e,n,u,f=o(i),p="function"==typeof this?this:Array,h=arguments.length,g=h>1?arguments[1]:void 0,v=void 0!==g,_=0,m=d(f);if(v&&(g=s(g,h>2?arguments[2]:void 0,2)),void 0==m||p==Array&&a(m))for(e=new p(t=l(f.length));t>_;_++)c(e,_,v?g(f[_],_):f[_]);else for(u=m.call(f),e=new p;!(n=u.next()).done;_++)c(e,_,v?r(u,g,[n.value,_],!0):n.value);return e.length=_,e}})},ttyz:function(i,t,e){"use strict";var s=e("9C8M"),n=e("LIJb");i.exports=e("qo66")("Set",function(i){return function(){return i(this,arguments.length>0?arguments[0]:void 0)}},{add:function(i){return s.def(n(this,"Set"),i=0===i?0:i,i)}},s)}});
|