import{Q as e,h as t,_ as i,m as l,f as a,e as d,q as r}from"./index-vtcwYVzc.js";let o={components:{gridHeader:"",gridBody:{render:()=>[e(t("el-alert"),{style:{"margin-bottom":"12px"},"show-icon":!0,type:"error",closable:!1,title:"关于TreeTable使用"},' treetable同样全部代码自动生成，页面生成后设置this.rowKe="xxx" tree主键字段,即可完成树形table配置,具体说明见Sys_Role1.js')]},gridFooter:"",modelHeader:"",modelBody:"",modelFooter:""},buttons:[],tableAction:"Sys_Role",methods:{onInited(){this.height=this.height-80,this.editFormOptions.forEach((e=>{e.forEach((e=>{"ParentId"==e.field&&(e.title="上级角色",e.changeOnSelect=!0)}))}))},onInit(){this.rowKey="Role_Id"},loadTreeChildren(e,t,i){let l=`api/role/getTreeTableChildrenData?roleId=${e.Role_Id}`;this.http.post(l,{}).then((e=>{i(e.rows)}))},searchBefore:e=>(e.wheres.length||(e.value=1),!0)}};const n=i(l({setup(){const e=a({key:"Role_Id",footer:"Foots",cnName:"角色管理",name:"Sys_Role",url:"/Sys_Role/",sortName:"Role_Id"}),t=a({ParentId:[],RoleName:"",DeptName:"",Enable:"",Creator:"",CreateDate:"",Modifier:"",ModifyDate:""}),i=a([[{dataKey:"tree_roles",data:[],title:"父级ID",required:!0,field:"ParentId",type:"cascader"},{title:"角色名称",required:!0,field:"RoleName"}],[{title:"部门名称",field:"DeptName"},{dataKey:"enable",data:[],title:"是否启用",field:"Enable",type:"switch"}],[{title:"创建人",field:"Creator",disabled:!0},{title:"创建时间",field:"CreateDate",disabled:!0,type:"datetime"}],[{title:"修改人",field:"Modifier",disabled:!0},{title:"修改时间",field:"ModifyDate",disabled:!0}]]),l=a({RoleName:"",DeptName:"",Enable:"",CreateDate:"",ModifyDate:""}),d=a([[{title:"角色名称",field:"RoleName",type:"text"},{title:"部门名称",field:"DeptName",type:"text"},{dataKey:"enable",data:[],title:"是否启用",field:"Enable",type:"select"}],[{title:"创建时间",field:"CreateDate",type:"datetime"},{title:"修改时间",field:"ModifyDate",type:"datetime"}]]),r=a([{field:"Role_Id",title:"角色ID",type:"int",width:70,readonly:!0,require:!0,align:"left",sortable:!0},{field:"RoleName",title:"角色名称",type:"string",link:!0,width:90,require:!0,align:"left"},{field:"Dept_Id",title:"部门ID",type:"int",width:90,hidden:!0,align:"left"},{field:"DeptName",title:"部门名称",type:"string",width:90,align:"left"},{field:"Enable",title:"是否启用",type:"byte",bind:{key:"enable",data:[]},width:90,align:"left"},{field:"OrderNo",title:"排序",type:"int",width:90,hidden:!0,align:"left"},{field:"Creator",title:"创建人",type:"string",width:130,readonly:!0,align:"left"},{field:"CreateDate",title:"创建时间",type:"datetime",width:90,readonly:!0,align:"left",sortable:!0},{field:"Modifier",title:"修改人",type:"string",width:130,readonly:!0,align:"left"},{field:"ModifyDate",title:"修改时间",type:"datetime",width:90,readonly:!0,align:"left",sortable:!0}]),n=a({cnName:"#detailCnName",columns:[],sortName:"",key:""});return{table:e,extend:o,editFormFields:t,editFormOptions:i,searchFormFields:l,searchFormOptions:d,columns:r,detail:n}}}),[["render",function(e,i,l,a,o,n){const s=t("view-grid");return d(),r(s,{ref:"grid",columns:e.columns,detail:e.detail,editFormFields:e.editFormFields,editFormOptions:e.editFormOptions,searchFormFields:e.searchFormFields,searchFormOptions:e.searchFormOptions,table:e.table,extend:e.extend},null,8,["columns","detail","editFormFields","editFormOptions","searchFormFields","searchFormOptions","table","extend"])}]]);export{n as default};
