- 注册时间
- 2012-7-12
- 最后登录
- 2014-5-31
- 阅读权限
- 10
- 积分
- 35
- 精华
- 0
- 帖子
- 11
|
<div class="mini-splitter" style="width:100%;height:100%;">
<div showCollapseButton="true">
<div class="mini-toolbar" style="padding:5px;border-top:0;border-left:0;border-right:0;">
<a class="mini-button" iconCls="icon-add" plain="true">新增</a>
<span class="separator"></span>
<a class="mini-button" iconCls="icon-remove" plain="true">删除</a>
<span class="separator"></span>
<a class="mini-button" iconCls="icon-save" plain="true">保存</a>
</div>
<div class="mini-fit">
<div id="grid1" class="mini-datagrid" style="width:100%;height:100%;" borderStyle="border:0" showFooter="false" allowCellSelect="true" allowCellEdit="true" rowclick="onRowClick">
<div property="columns">
<div field="RoleID" width="60" headerAlign="center" allowSort="true">编号</div>
<div field="RoleName" width="150" headerAlign="center" allowSort="true">角色名称
<input property="editor" class="mini-textbox" style="width:100%;"/>
</div>
<div field="RoleGroupID" width="120" allowSort="true" renderer="onGroupRenderer" align="center" headerAlign="center">分组
<input property="editor" class="mini-combobox" style="width:100%;" data="RoleGroupsData.data" textField="GroupName" valueField="GroupID"/>
</div>
<div field="RoleOrder" width="60" allowSort="true">排序
<input property="editor" class="mini-spinner" minValue="0" maxValue="200" style="width:100%;"/>
</div>
<div field="RoleDescription" width="100%" headerAlign="center" allowSort="true">说明
<input property="editor" class="mini-textbox" style="width:100%;"/>
</div>
</div>
</div>
</div>
</div>
<div size="240" showCollapseButton="true">
<div class="mini-toolbar" style="padding:3px;border-top:0;border-left:0;border-right:0;">
<span style="padding-left:5px;">系统权限</span>
</div>
<div class="mini-fit">
<ul id="tree1" class="mini-tree" url="../data/data.ashx?op=GetRoleGrantAllList" style="width:100%;height:100%" showTreeIcon="true" textField="text" idField="id" parentField="pid" resultAsTree="false" expandOnLoad="true" showCheckBox="true" showFolderCheckBox="false">
</ul>
</div>
</div>
</div>
- <script type="text/javascript">
- var RoleGroupsData = null;
- mini.parse();
- LoadGroups();
- mini.get("tree1").load();
- $(document).ready(function() {
-
-
- });
- //加载数据
- function LoadData() {
- var ctl = mini.get("grid1");
- ctl.mask("正在加载数据...");
- $.ajax({
- type: "POST",
- contentType: "application/json",
- url: "../data/ws.asmx/RolesGet",
- dataType: 'json',
- success: function(result) {
- ctl.unmask();
- var res = mini.decode(result.d);
- if (CheckMsg(res)) return;
- ctl.set({ "data": res });
- },
- error: function(XmlHttpRequest, textStatus, errorThrown) {
- ctl.unmask();
- alert(XmlHttpRequest.responseText);
- }
- });
- }
- function LoadGroups() {
- var ctl = mini.get("grid1");
- $.ajax({
- type: "POST",
- contentType: "application/json",
- url: "../data/ws.asmx/RoleGroupsGet",
- dataType: 'json',
- success: function(result) {
- RoleGroupsData = mini.decode(result.d);
- LoadData();
- CheckMsg(RoleGroupsData);
- },
- error: function(XmlHttpRequest, textStatus, errorThrown) {
- alert(XmlHttpRequest.responseText);
- }
- });
- }
- //渲染
- function onGroupRenderer(e) {
- for (var i = 0; i < RoleGroupsData.Count; i++) {
- if (e.record.RoleGroupID == RoleGroupsData.data.GroupID)
- return RoleGroupsData.data.GroupName;
- }
- }
- //row click
- function onRowClick(e) {
- alert(e.record.RoleName);
- }
复制代码
其中 mini.parse();
LoadGroups();
mini.get("tree1").load();
这样树形数据无法显示
LoadGroups();
mini.get("tree1").load();
把mini.parse();注释掉就OK,请问什么问题呢?
|
|