(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-b073f330"],{"0082":function(e,t,o){"use strict";o.r(t);var l=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",[o("ul",{staticClass:"role-menu"},[Array.isArray(e.roleList)&&0!=e.roleList.length?e._e():o("li",{staticClass:"no-data"},[e._v("暂无数据")]),e._l(e.roleList,(function(t){return o("li",{key:t,class:["role-item",{active:e.activeRoleId==t.roleId}],on:{click:function(o){return e.onChangeRole(t)}}},[o("span",{staticClass:"role-name"},[e._v(e._s(t.roleName))]),o("el-dropdown",{attrs:{placement:"bottom-start"}},[o("i",{staticClass:"iconfont icongengduo edit-icon"}),o("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[o("el-dropdown-item",{nativeOn:{click:function(o){return e.onEditRole(t)}}},[e._v("编辑")]),e.showDelRoleButton?o("el-dropdown-item",{nativeOn:{click:function(o){return e.onDelRole(t)}}},[e._v("删除")]):e._e()],1)],1)],1)}))],2),o("el-dialog",{attrs:{visible:e.delRole.show,title:"删除角色",width:"600px"},on:{"update:visible":function(t){return e.$set(e.delRole,"show",t)},closed:e.onDelRoleClose}},[o("div",{staticClass:"del-role"},[o("i",{staticClass:"el-icon-warning"}),o("div",{staticClass:"del-role-content"},[o("p",{staticClass:"del-role-tip"},[e._v("确认删除“"+e._s(e.delRole.roleName)+"”角色吗？")]),o("p",{staticClass:"del-role-tip"},[e._v("请在输入框中输入该角色名称，以避免误操作。")]),o("el-input",{staticStyle:{"margin-top":"10px",width:"440px"},model:{value:e.delRole.roleNameInput,callback:function(t){e.$set(e.delRole,"roleNameInput","string"===typeof t?t.trim():t)},expression:"delRole.roleNameInput"}})],1)]),o("template",{slot:"footer"},[o("el-button",{on:{click:function(t){e.delRole.show=!1}}},[e._v("取消")]),o("el-button",{attrs:{type:"primary",loading:e.delRole.loading},on:{click:e.onDelRoleSure}},[e._v("确定")])],1)],2)],1)},n=[],i=(o("c5f6"),o("f286")),r=i["a"].delRole,a={name:"RoleList",props:{roleList:{type:Array,default:function(){return[]}},activeRoleId:[String,Number],showDelRoleButton:{type:Boolean,default:!1}},data:function(){return{delRole:{show:!1,loading:!1,roleId:"",roleName:"",roleNameInput:""}}},methods:{onChangeRole:function(e){this.$emit("change-role",e)},onEditRole:function(e){this.$emit("edit-role",e)},onDelRole:function(e){var t=e.roleId,o=e.roleName;Object.assign(this.delRole,{show:!0,roleId:t,roleName:o})},onDelRoleClose:function(){Object.assign(this.delRole,{roleId:"",roleName:"",roleNameInput:""})},onDelRoleSure:function(){var e=this,t=this.delRole,o=t.roleId,l=t.roleName,n=t.roleNameInput;return 0==n.length?this.$message.warning("请输入角色名称！"):l!=n?this.$message.warning("请输入正确的角色名称！"):(this.delRole.loading=!0,void r({roleId:o}).then((function(t){"0000"==t.code&&(e.$message.success("删除成功！"),e.$emit("del-role-succ",o==e.activeRoleId),e.delRole.show=!1)})).finally((function(){return e.delRole.loading=!1})))}}},s=a,d=(o("575f"),o("2877")),c=Object(d["a"])(s,l,n,!1,null,"7c337432",null);t["default"]=c.exports},"44e1":function(e,t,o){},"575f":function(e,t,o){"use strict";var l=o("44e1"),n=o.n(l);n.a},"71f6":function(e,t,o){"use strict";o.d(t,"a",(function(){return n}));o("ac6a"),o("456d");var l=o("b775");function n(e,t){e=e||{};var o=Object.keys(e);return o.forEach((function(o){var n=e[o];"string"===typeof n&&(n={url:n}),n.url="".concat(t).concat(n.url),e[o]=function(e,t){return Object(l["a"])(n,e,t)}})),e}},f286:function(e,t,o){"use strict";var l=o("71f6"),n={addRole:{url:"/add-role",method:"post",useFormData:!0},delRole:"/role-del",editRole:{url:"/role-edit",method:"post",useFormData:!0},roleDetail:"/role-detail",roleList:"/role-list",menuList:"/menu-list",roleAdminList:"/role-admin-list",delAdmin:"/admin-del",enterpriseList:"/auth-enterprise-list",resourceList:"/resource-list",findAppSetting:"/find-application-setting",saveAppSetting:{url:"/save-application-setting",method:"post",useFormData:!0},findStoreRange:"/find-store-range",saveStoreRange:"/save-store-range"};t["a"]=Object(l["a"])(n,"/hb-manage-web")}}]);