ylbtech-Code-NFine:下来框和复选框
1.返回顶部
1、
1.1 html
 $("#F_OrganizeId").bindSelect({
url: "/SystemManage/Organize/GetTreeSelectJson",
});

-

<select id="F_OrganizeId" name="F_OrganizeId" class="form-control required">
</select>
1.2 cs
[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());
}
2、
2.1 html
 $("#F_Type").bindSelect({
url: "/SystemManage/ItemsData/GetSelectJson",
param: { enCode: "RoleType" }
});

-

<select id="F_Type" name="F_Type" class="form-control required">
</select>
2.2 cs
[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());
}
3、
3.1 html
$("#permissionTree").treeview({
height: 444,
showcheck: true,
url: "/SystemManage/RoleAuthorize/GetPermissionTree",
param: { roleId: keyValue }
});

-

<div id="permissionTree"></div>
3.2 cs
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());
}
4、
5、
2.返回顶部
 
3.返回顶部
 
4.返回顶部
 
5.返回顶部
 
 
6.返回顶部
 
作者:ylbtech
出处:http://ylbtech.cnblogs.com/
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。

Code-NFine:下来框和复选框的更多相关文章

  1. Selenium2+python自动化19-单选框和复选框(radiobox、checkbox)

    本篇主要介绍单选框和复选框的操作 一.认识单选框和复选框 1.先认清楚单选框和复选框长什么样 2.各位小伙伴看清楚哦,上面的单选框是圆的:下图复选框是方的,这个是业界的标准,要是开发小伙伴把图标弄错了 ...

  2. CSS学习笔记三:自定义单选框,复选框,开关

    一点一点学习CCS,这次学习了如何自定义单选框,复选框以及开关. 一.单选框 1.先写好body里面的样式,先写几个框 <body> <div class="radio-1 ...

  3. 自动化测试-15.selenium单选框与复选框状态判断

    本篇主要介绍单选框和复选框的操作 一.认识单选框和复选框 1.先认清楚单选框和复选框长什么样 2.各位小伙伴看清楚哦,上面的单选框是圆的:下图复选框是方的,这个是业界的标准,要是开发小伙伴把图标弄错了 ...

  4. 2.12 单选框和复选框(radiobox、checkbox)

    2.12 单选框和复选框(radiobox.checkbox) 本篇主要介绍单选框和复选框的操作一.认识单选框和复选框    1.先认清楚单选框和复选框长什么样 2.各位小伙伴看清楚哦,上面的单选框是 ...

  5. Selenium2学习(十五)-- 单选框和复选框(radiobox、checkbox)

    本篇主要介绍单选框和复选框的操作 一.认识单选框和复选框 1.先认清楚单选框和复选框长什么样 2.各位小伙伴看清楚哦,上面的单选框是圆的:下图复选框是方的,这个是业界的标准,要是开发小伙伴把图标弄错了 ...

  6. Selenium2+python自动化19-单选框和复选框(radiobox、checkbox)【转载】

    本篇主要介绍单选框和复选框的操作 一.认识单选框和复选框 1.先认清楚单选框和复选框长什么样 2.各位小伙伴看清楚哦,上面的单选框是圆的:下图复选框是方的,这个是业界的标准,要是开发小伙伴把图标弄错了 ...

  7. 微信小程序-修改单选框和复选框大小的方法

    方法有两种: 一:采用css的zoom属性 zoom缩放会将元素保持在左上角,并且会有毛边,可能会稍稍改变元素原来的形状. 二:采用css3的transform:scale属性 zoom缩放会将元素保 ...

  8. HTML--使用单选框、复选框,让用户选择

    在使用表单设计调查表时,为了减少用户的操作,使用选择框是一个好主意,html中有两种选择框,即单选框和复选框,两者的区别是单选框中的选项用户只能选择一项,而复选框中用户可以任意选择多项,甚至全选.请看 ...

  9. Selenium3+python自动化 单选框和复选框

    一.认识单选框和复选框 1.先认清楚单选框和复选框长什么样 2.各位小伙伴看清楚哦,上面的单选框是圆的:下图复选框是方的,这个是业界的标准,要是开发小伙伴把图标弄错了,可以先抽他了. 二.radio和 ...

随机推荐

  1. Leetcode 数组问题2:买卖股票的最佳时机 II

    问题描述: 给定一个数组,它的第 i 个元素是一支给定股票第 i 天的价格. 设计一个算法来计算你所能获取的最大利润.你可以尽可能地完成更多的交易(多次买卖一支股票). 注意:你不能同时参与多笔交易( ...

  2. Nginx配置文件语法教程

    Nginx的配置文件在一开始可能真的不太好理解,就像当初开始使用Apache那样,像JSON但却不是.可以说是Nginx的一种专门语言,仅为Nginx服务的. 市面上基本都是写了一点不写一点的教程,基 ...

  3. Linux C多线程编程-线程互斥

    Linux下的多线程编程需要注意的是程序需要包含头文件pthread.h,在生成可执行文件的时候需要链接库libpthread.a或者libpthread.so. 线程创建函数: pthread_cr ...

  4. rm -rf /* 注意

    mkdir -p ~/.trash  //创建一个目录作为回收站,这里使用的是用户家目录下的.trash目录 alias rm=trash  //命令别名 rm改变为trash,通过将rm命令别名值t ...

  5. Java主线程等待所有子线程执行完毕再执行解决办法(转)

    方法一: Thread.join()方法,亲测可行,thread.join()方法 Vector<Thread> ts = new Vector<Thread>(); for  ...

  6. springboot mybatis 项目框架源码 shiro 集成代码生成器 ehcache缓存

    1.代码生成器: [正反双向](单表.主表.明细表.树形表,快速开发利器)freemaker模版技术 ,0个代码不用写,生成完整的一个模块,带页面.建表sql脚本.处理类.service等完整模块2. ...

  7. java平台利用jsoup开发包,抓取优酷视频播放地址与图片地址等信息。

    /********************************************************************************************  * aut ...

  8. Android兼容性测试CTS

     一.简介 为了确保Android应用能够在所有兼容Android的设备上正确运行,并且保持相似的用户体验,在每个版本发布之时,Android提供了一套兼容性测试用例集合(Compatibility ...

  9. 简单使用 Mvc 内置的 Ioc

    简单使用 Mvc 内置的 Ioc 本文基于 .NET Core 2.0. 鉴于网上的文章理论较多,鄙人不才,想整理一份 Hello World(Demo)版的文章. 目录 场景一:简单类的使用 场景二 ...

  10. Computer form factor

    http://en.wikipedia.org/wiki/Motherboard_form_factor Computer form factor From Wikipedia, the free e ...