(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3325a58c"],{bba9:function(e,t,n){"use strict";n("ffc4")},cd6d:function(e,t,n){"use strict";n.r(t);var a=function(){var e=this,t=e._self._c;return t("a-card",{attrs:{bordered:!1}},[t("div",{staticClass:"table-operator"},[t("a-button",{attrs:{type:"primary",icon:"plus"},on:{click:e.handleAdd}},[e._v("新增")]),e.selectedRowKeys.length>0?t("a-button",{attrs:{ghost:"",type:"primary",icon:"delete"},on:{click:e.batchDel}},[e._v("批量删除\n ")]):e._e()],1),t("div",[t("div",{staticClass:"ant-alert ant-alert-info",staticStyle:{"margin-bottom":"16px"}},[t("i",{staticClass:"anticon anticon-info-circle ant-alert-icon"}),e._v("已选择 "),t("a",{staticStyle:{"font-weight":"600"}},[e._v(e._s(e.selectedRowKeys.length))]),e._v("项  \n "),t("a",{staticStyle:{"margin-left":"24px"},on:{click:e.onClearSelected}},[e._v("清空")])]),t("a-table",{attrs:{columns:e.columns,size:"middle",pagination:!1,dataSource:e.dataSource,loading:e.loading,expandedRowKeys:e.expandedRowKeys,rowSelection:{selectedRowKeys:e.selectedRowKeys,onChange:e.onSelectChange}},on:{expand:e.expandSubmenu,expandedRowsChange:e.handleExpandedRowsChange},scopedSlots:e._u([{key:"action",fn:function(n,a){return t("span",{},[t("a",{on:{click:function(t){return e.handleEdit(a)}}},[e._v("编辑")]),t("a-divider",{attrs:{type:"vertical"}}),t("a-dropdown",[t("a",{staticClass:"ant-dropdown-link"},[e._v("\n 更多 "),t("a-icon",{attrs:{type:"down"}})],1),t("a-menu",{attrs:{slot:"overlay"},slot:"overlay"},[t("a-menu-item",[t("a",{attrs:{href:"javascript:;"},on:{click:function(t){return e.handleDetail(a)}}},[e._v("详情")])]),t("a-menu-item",[t("a",{attrs:{href:"javascript:;"},on:{click:function(t){return e.handleAddSub(a)}}},[e._v("添加下级")])]),t("a-menu-item",[t("a",{attrs:{href:"javascript:;"},on:{click:function(t){return e.handleDataRule(a)}}},[e._v("数据规则")])]),t("a-menu-item",[t("a-popconfirm",{attrs:{title:"确定删除吗?"},on:{confirm:function(){return e.handleDelete(a.id)}}},[t("a",[e._v("删除")])])],1)],1)],1)],1)}},{key:"url",fn:function(e){return t("span",{},[t("j-ellipsis",{attrs:{value:e,length:25}})],1)}},{key:"component",fn:function(e){return t("span",{},[t("j-ellipsis",{attrs:{value:e}})],1)}}])})],1),t("permission-modal",{ref:"modalForm",on:{ok:e.modalFormOk}}),t("permission-data-rule-list",{ref:"PermissionDataRuleList",on:{ok:e.modalFormOk}})],1)},i=[],o=n("b90e"),s=n("4ec3"),l=n("b65a"),r=n("56cd1"),d=n("d579"),c=[{title:"菜单名称",dataIndex:"name",key:"name"},{title:"菜单类型",dataIndex:"menuType",key:"menuType",customRender:function(e){return 0==e||1==e?"菜单":2==e?"按钮/权限":e}},{title:"icon",dataIndex:"icon",key:"icon"},{title:"组件",dataIndex:"component",key:"component",scopedSlots:{customRender:"component"}},{title:"路径",dataIndex:"url",key:"url",scopedSlots:{customRender:"url"}},{title:"排序",dataIndex:"sortNo",key:"sortNo"},{title:"操作",dataIndex:"action",scopedSlots:{customRender:"action"},align:"center",width:150}],u={name:"PermissionListAsync",mixins:[l["a"]],components:{PermissionDataRuleList:r["default"],PermissionModal:o["default"],JEllipsis:d["default"]},data:function(){return{description:"这是菜单管理页面",columns:c,loading:!1,expandedRowKeys:[],url:{list:"/sys/permission/list",delete:"/sys/permission/delete",deleteBatch:"/sys/permission/deleteBatch"}}},methods:{loadData:function(){var e=this;this.loading=!0,Object(s["x"])().then((function(t){if(t.success)return e.dataSource=t.result,e.loadDataByExpandedRows(e.dataSource)})).finally((function(){e.loading=!1}))},expandSubmenu:function(e,t){!e||t.children&&0!==t.children.length||Object(s["y"])({parentId:t.id}).then((function(e){e.success&&(t.children=e.result)}))},loadDataByExpandedRows:function(e){var t=this;return this.expandedRowKeys.length>0?Object(s["z"])({parentIds:this.expandedRowKeys.join(",")}).then((function(n){if(n.success){var a=n.result,i=function e(n){n.forEach((function(n){t.expandedRowKeys.includes(n.id)&&(n.children=a[n.id],e(n.children))}))};i(e)}})):Promise.resolve()},handleDataRule:function(e){this.$refs.PermissionDataRuleList.edit(e)},handleAddSub:function(e){this.$refs.modalForm.title="添加子菜单",this.$refs.modalForm.localMenuType=1,this.$refs.modalForm.disableSubmit=!1,this.$refs.modalForm.edit({status:"1",permsType:"1",route:!0,parentId:e.id})},handleExpandedRowsChange:function(e){this.expandedRowKeys=e}}},p=u,m=(n("bba9"),n("2877")),f=Object(m["a"])(p,a,i,!1,null,"0796d44f",null);t["default"]=f.exports},d579:function(e,t,n){"use strict";n.r(t);var a=function(){var e=this,t=e._self._c;return t("a-tooltip",{attrs:{placement:"topLeft"}},[t("template",{slot:"title"},[t("span",[e._v(e._s(e.value))])]),e._v("\n "+e._s(e._f("ellipsis")(e.value,e.length))+"\n")],2)},i=[],o={name:"JEllipsis",props:{value:{type:String,required:!1},length:{type:Number,required:!1,default:25}}},s=o,l=n("2877"),r=Object(l["a"])(s,a,i,!1,null,"4de15389",null);t["default"]=r.exports},ffc4:function(e,t,n){}}]);