(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0c0c02"],{"42b0":function(e,t,n){"use strict";n.r(t);var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"app-list-content"},[n("cl-crud",{on:{load:e.onLoad},scopedSlots:e._u([{key:"table-column-icon",fn:function(e){var t=e.scope;return[n("icon-svg",{attrs:{name:t.row.icon,size:"20px"}})]}},{key:"slot-column-op",fn:function(t){var r=t.scope;return[2!=r.row.type?n("el-button",{attrs:{type:"text",size:"mini"},on:{click:function(t){return e.upsertAppend(r.row)}}},[e._v("新增")]):e._e()]}}])}),n("cl-context-menu",{ref:"context-menu"})],1)},a=[],o=(n("ea51"),n("63ff"),n("e5af")),p=(n("8bc2"),{data:function(){return{crud:null,parentArr:[]}},methods:{onLoad:function(e){var t=this,n=e.ctx,r=e.app;this.crud=r,n.service(this.$service.sassAuth).set("dict",{api:{page:"authList",add:"authAdd",update:"authUpdate",delete:"authDel"}}).set("table",{columns:[{prop:"authName",label:"名称",width:200},{prop:"parentId",label:"父级ID",align:"center","min-width":160},{prop:"frontUrl",label:"前端路由",align:"center","min-width":160},{prop:"backUrl",label:"后端路由",align:"center","min-width":160}],props:{"row-key":"id"},on:{"row-click":function(e,t){t.property&&e.children&&r.refs("table").toggleRowExpansion(e)},"row-contextmenu":function(e,n,a){var o=[{label:"编辑",callback:function(t,n){r.edit(e),n()}},{label:"删除",callback:function(t,n){r.delete(e),n()}}];t.$refs["context-menu"].open(a,{list:o}),a.preventDefault()}},op:{props:{width:"200"},layout:["slot-column-op","edit","delete"]}}).set("upsert",{props:{width:"600px"},items:[{prop:"parentId",label:"父权限",span:24,component:{name:"el-select",attrs:{placeholder:"请选择"},options:this.parentArr}},{prop:"name",label:"权限名",span:24,component:{name:"el-input",attrs:{placeholder:"请输入名称"}},rules:{required:!0,message:"名称不能为空"}},{prop:"frontUrl",label:"前端路由",span:24,component:{name:"el-input",attrs:{placeholder:"请输入"}},rules:{required:!0,message:"前端路由不能为空"}},{prop:"backUrl",label:"后端路由",span:24,component:{name:"el-input",attrs:{placeholder:"请输入"}}},{prop:"endId",label:"endId",span:24,value:"1",hidden:!0,component:{name:"el-input",attrs:{placeholder:"请输入"}}}]}).set("layout",[["refresh-btn","add-btn"],["data-table"]]).on("refresh",function(){var e=Object(o["a"])(regeneratorRuntime.mark((function e(n,r){var a,o,p;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return a=r.next,r.render,e.next=3,a(n);case 3:o=e.sent,p=o.list,p=JSON.parse(JSON.stringify(p)),p=p.map((function(e){return e.label=e.authName,e.value=e.id,e})),t.crud.setData("upsert.items[prop:parentId].component.options",p),console.log(t.parentArr);case 9:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()).done(),r.refresh()},upsertAppend:function(e){var t=e.type,n=e.id;this.crud.append({parentId:n,type:t+1})},setPermission:function(e){var t=e.id;this.crud.append({parentId:t,type:2})},toUrl:function(e){this.$router.push(e)}}}),l=p,s=n("5511"),c=Object(s["a"])(l,r,a,!1,null,null,null);t["default"]=c.exports}}]);