代码如下:
<div data-toggle="topjui-layout" data-options="fit:true">
<div data-options="region:'west',title:'',split:true,border:false,width:'10%',iconCls:'fa fa-sitemap',headerCls:'border_right',bodyCls:'border_right'">
<!-- treegrid表格 -->
<table data-toggle="topjui-treegrid"
data-options="id:'orgnizationDatagrid',
idField:'sCode',
treeField:'sName',
url:'../control.php?f=model/System&m=schoolTree',
childGrid:{
param:'codeSetId:codeSetId,sSchoolCode:sCode',
grid:[
{type:'datagrid',id:'userDg'},
]
}">
<thead>
<tr>
<th data-options="field:'sName',title:'机构名称'"></th>
</tr>
</thead>
</table>
</div>
<div data-options="region:'center',iconCls:'icon-reload',title:'',split:true,border:false,bodyCls:'border_left_right'">
<!-- datagrid表格 -->
<table data-toggle="topjui-datagrid"
data-options="id:'userDg',pageSize:50,pageList:[30,50,100,150,200],
url:'../control.php?f=model/Enroll&m=enrollList',
childTab: [{id:'eastTabs'}],
emptyMsg:'无记录'
">
<thead>
<tr>
<th data-options="field:'uuid',title:'uuid',sortable:true"></th>
</tr>
</thead>
</table>
</div>
</div>
<!-- 表格工具栏开始 -->
<div id="userDg-toolbar" class="topjui-toolbar"
data-options="grid:{
type:'datagrid',
id:'userDg'
}">
<a href="javascript:void(0)" data-toggle="topjui-menubutton" data-options="menu:'#addSubMenu', btnCls:'topjui-btn-green',hasDownArrow:false,iconCls:'fa fa-plus'">新增</a>
<div id="addSubMenu" class="topjui-toolbar" style="width:80px;">
<div data-toggle="topjui-menubutton" data-options="method:'openDialog', extend: '#userDg-toolbar',iconCls: 'fa fa-id-card-o',
parentGrid:{type:'treegrid',id:'orgnizationDatagrid',param:'sSchoolCode:sCode',unselectedMsg:'请先选中左侧具体机构。'},
dialog:{iconCls: '',title:'新增(逐个表单)',id:'userAddDialog',
href:'../control.php?f=view/enroll_view&m=addEdit&sSchoolCode={parent.sCode}',
buttonsGroup:[
{text:'保存',url:'../control.php?f=model/Enroll&m=insertUpdate&no_html=1&sTreeNo=<?=$sTreeNo?>',iconCls:'fa fa-plus',handler:'ajaxForm',btnCls:'topjui-btn-green'}
]
}">逐个表单</div>
<div data-toggle="topjui-menubutton" data-options="method:'openDialog', extend: '#userDg-toolbar',iconCls: 'fa fa-file-excel-o',
parentGrid:{type:'treegrid',id:'orgnizationDatagrid',param:'sSchoolCode:sCode',unselectedMsg:'请先选中左侧具体机构。'},
dialog:{iconCls: '',title:'新增(Excel导入)',id:'userAddDialogExcel',
href:'../control.php?f=view/enroll_view&m=addEditExcel&no_db=1&sTreeNo=<?=$sTreeNo?>&sSchoolCode={parent.sCode}',
buttonsGroup:[
{text:'保存',url:'../control.php?f=model/Enroll&m=insertUpdateExcel',iconCls:'fa fa-plus',handler:'ajaxForm',btnCls:'topjui-btn-green'}
]
}">Excel导入</div>
</div>
</div>