Code-NFine:下来框和复选框
ylbtech-Code-NFine:下来框和复选框 |
1.返回顶部 |

$("#F_OrganizeId").bindSelect({
url: "/SystemManage/Organize/GetTreeSelectJson",
});
-
<select id="F_OrganizeId" name="F_OrganizeId" class="form-control required">
</select>
[HttpGet]
[HandlerAjaxOnly]
public ActionResult GetTreeSelectJson()
{
var data = organizeApp.GetList();
var treeList = new List<TreeSelectModel>();
foreach (OrganizeEntity item in data)
{
TreeSelectModel treeModel = new TreeSelectModel();
treeModel.id = item.F_Id;
treeModel.text = item.F_FullName;
treeModel.parentId = item.F_ParentId;
treeModel.data = item;
treeList.Add(treeModel);
}
return Content(treeList.TreeSelectJson());
}

$("#F_Type").bindSelect({
url: "/SystemManage/ItemsData/GetSelectJson",
param: { enCode: "RoleType" }
});
-
<select id="F_Type" name="F_Type" class="form-control required">
</select>
[HttpGet]
[HandlerAjaxOnly]
public ActionResult GetSelectJson(string enCode)
{
var data = itemsDetailApp.GetItemList(enCode);
List<object> list = new List<object>();
foreach (ItemsDetailEntity item in data)
{
list.Add(new { id = item.F_ItemCode, text = item.F_ItemName });
}
return Content(list.ToJson());
}

$("#permissionTree").treeview({
height: 444,
showcheck: true,
url: "/SystemManage/RoleAuthorize/GetPermissionTree",
param: { roleId: keyValue }
});
-
<div id="permissionTree"></div>
public ActionResult GetPermissionTree(string roleId)
{
var moduledata = moduleApp.GetList();
var buttondata = moduleButtonApp.GetList();
var authorizedata = new List<RoleAuthorizeEntity>();
if (!string.IsNullOrEmpty(roleId))
{
authorizedata = roleAuthorizeApp.GetList(roleId);
}
var treeList = new List<TreeViewModel>();
foreach (ModuleEntity item in moduledata)
{
TreeViewModel tree = new TreeViewModel();
bool hasChildren = moduledata.Count(t => t.F_ParentId == item.F_Id) == ? false : true;
tree.id = item.F_Id;
tree.text = item.F_FullName;
tree.value = item.F_EnCode;
tree.parentId = item.F_ParentId;
tree.isexpand = true;
tree.complete = true;
tree.showcheck = true;
tree.checkstate = authorizedata.Count(t => t.F_ItemId == item.F_Id);
tree.hasChildren = true;
tree.img = item.F_Icon == "" ? "" : item.F_Icon;
treeList.Add(tree);
}
foreach (ModuleButtonEntity item in buttondata)
{
TreeViewModel tree = new TreeViewModel();
bool hasChildren = buttondata.Count(t => t.F_ParentId == item.F_Id) == ? false : true;
tree.id = item.F_Id;
tree.text = item.F_FullName;
tree.value = item.F_EnCode;
tree.parentId = item.F_ParentId == "" ? item.F_ModuleId : item.F_ParentId;
tree.isexpand = true;
tree.complete = true;
tree.showcheck = true;
tree.checkstate = authorizedata.Count(t => t.F_ItemId == item.F_Id);
tree.hasChildren = hasChildren;
tree.img = item.F_Icon == "" ? "" : item.F_Icon;
treeList.Add(tree);
}
return Content(treeList.TreeViewJson());
}
2.返回顶部 |
3.返回顶部 |
4.返回顶部 |
5.返回顶部 |
6.返回顶部 |
![]() |
作者:ylbtech 出处:http://ylbtech.cnblogs.com/ 本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。 |
Code-NFine:下来框和复选框的更多相关文章
- Selenium2+python自动化19-单选框和复选框(radiobox、checkbox)
本篇主要介绍单选框和复选框的操作 一.认识单选框和复选框 1.先认清楚单选框和复选框长什么样 2.各位小伙伴看清楚哦,上面的单选框是圆的:下图复选框是方的,这个是业界的标准,要是开发小伙伴把图标弄错了 ...
- CSS学习笔记三:自定义单选框,复选框,开关
一点一点学习CCS,这次学习了如何自定义单选框,复选框以及开关. 一.单选框 1.先写好body里面的样式,先写几个框 <body> <div class="radio-1 ...
- 自动化测试-15.selenium单选框与复选框状态判断
本篇主要介绍单选框和复选框的操作 一.认识单选框和复选框 1.先认清楚单选框和复选框长什么样 2.各位小伙伴看清楚哦,上面的单选框是圆的:下图复选框是方的,这个是业界的标准,要是开发小伙伴把图标弄错了 ...
- 2.12 单选框和复选框(radiobox、checkbox)
2.12 单选框和复选框(radiobox.checkbox) 本篇主要介绍单选框和复选框的操作一.认识单选框和复选框 1.先认清楚单选框和复选框长什么样 2.各位小伙伴看清楚哦,上面的单选框是 ...
- Selenium2学习(十五)-- 单选框和复选框(radiobox、checkbox)
本篇主要介绍单选框和复选框的操作 一.认识单选框和复选框 1.先认清楚单选框和复选框长什么样 2.各位小伙伴看清楚哦,上面的单选框是圆的:下图复选框是方的,这个是业界的标准,要是开发小伙伴把图标弄错了 ...
- Selenium2+python自动化19-单选框和复选框(radiobox、checkbox)【转载】
本篇主要介绍单选框和复选框的操作 一.认识单选框和复选框 1.先认清楚单选框和复选框长什么样 2.各位小伙伴看清楚哦,上面的单选框是圆的:下图复选框是方的,这个是业界的标准,要是开发小伙伴把图标弄错了 ...
- 微信小程序-修改单选框和复选框大小的方法
方法有两种: 一:采用css的zoom属性 zoom缩放会将元素保持在左上角,并且会有毛边,可能会稍稍改变元素原来的形状. 二:采用css3的transform:scale属性 zoom缩放会将元素保 ...
- HTML--使用单选框、复选框,让用户选择
在使用表单设计调查表时,为了减少用户的操作,使用选择框是一个好主意,html中有两种选择框,即单选框和复选框,两者的区别是单选框中的选项用户只能选择一项,而复选框中用户可以任意选择多项,甚至全选.请看 ...
- Selenium3+python自动化 单选框和复选框
一.认识单选框和复选框 1.先认清楚单选框和复选框长什么样 2.各位小伙伴看清楚哦,上面的单选框是圆的:下图复选框是方的,这个是业界的标准,要是开发小伙伴把图标弄错了,可以先抽他了. 二.radio和 ...
随机推荐
- ios Crash Log 分析汇总
方法一: 1.xcode 有自带的symbolicatecrash,可以将.crash文件中的16进制地址转换成可读的函数地址. symbolicatecrash位于: /Applications/X ...
- android 查看手机运行的进程列表
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools=&q ...
- 基于centos 创建stress镜像——源码安装stress
上一篇文章进行了yum安装stress,这次对stress进行源码编译安装,并且生成新的镜像 创建Dockerfile目录 [vagrant@localhost ~]$ mkdir -p /tmp/s ...
- gdb源码安装过程中的问题:no termcap library found
gdb使用源码安装的时候遇到错误:no termcap library found ./configure --> make --> make install 解决办法,下载termca ...
- SolidEdge如何绘制阵列之后取消掉某一些
在最后一步点击"抑制事件",然后可以在被阵列的圆形上单击,被抑制的圆形变成灰色
- CentOS安装Openfire服务
原文::http://xiao987334176.blog.51cto.com/2202382/979677 系统是全新新安装的系统.版本号是Centos 5.6 x86 同步北京时间 # ntpda ...
- js加入收藏夹
工作需要了解了一下点击加入收藏这个功能 <script> function _addFavorite() { var url = window.location; //获取当前网页网址 v ...
- iOS 小动画
一.图片旋转 CABasicAnimation* rotationAnimation; rotationAnimation = [CABasicAnimation animationWithKeyPa ...
- JfreeChart折线图 CSDN-李鹏飞
今天公司里分配给我的工作是JfreeChart折线图本人之前也没接触过如今让我们大家一起完毕! 在这个公司,用到了太多的JfreeChart,今天就对折线图作一个总结,希望对大家有点帮助,我这里直接是 ...
- BZOJ 1042: [HAOI2008]硬币购物 容斥+背包
1042: [HAOI2008]硬币购物 Description 硬币购物一共有4种硬币.面值分别为c1,c2,c3,c4.某人去商店买东西,去了tot次.每次带di枚ci硬币,买si的价值的东西.请 ...