combotree :

设置为多选框: $('#menu-combotree').combotree({multiple:true}).combotree('loadData', menuListJson).combotree('setValues', moduleMenuIds);

<select id="menu-combotree" name="m_ids[]" style="width: 200px;"></select>
var menuListJson = [{"id":"1","text":"\u57fa\u672c\u7ba1\u7406(---)","parent":"0","children":[{"id":"2","text":"\u7ba1\u7406\u5458\u7ba1\u7406(---)","parent":"1"},{"id":"3","text":"\u4fee\u6539\u5bc6\u7801(---)","parent":"1"},{"id":"4","text":"\u8bbe\u7f6e\u6b22\u8fce\u8bcd(---)","parent":"1"},{"id":"5","text":"\u6743\u9650\u5206\u914d(---)","parent":"1"},{"id":"6","text":"\u4f01\u4e1a\u4fe1\u606f(---)","parent":"1"},{"id":"52","text":"\u63a8\u9001\u8bbe\u7f6e(---)","parent":"1"},{"id":"59","text":"\u5ba2\u670d\u914d\u7f6e(---)","parent":"1"}]},{"id":"7","text":"\u4e00\u7ebf\u5ba2\u670d\u7ba1\u7406(---)","parent":"0","children":[{"id":"8","text":"\u5ba2\u670d\u7ec4\u7ba1\u7406(---)","parent":"7"},{"id":"79","text":"\u5ba2\u6237\u7ec4\u6307\u5b9a\u5ba2\u670d\u7ec4(---)","parent":"7"},{"id":"9","text":"\u5ba2\u670d\u7ba1\u7406(---)","parent":"7"},{"id":"10","text":"\u5b9e\u65f6\u76d1\u63a7(---)","parent":"7"}]},{"id":"11","text":"\u4e8c\u7ebf\u5ba2\u670d\u7ba1\u7406(---)","parent":"0","children":[{"id":"12","text":"\u5ba2\u670d\u7ec4\u7ba1\u7406(---)","parent":"11"},{"id":"13","text":"\u5ba2\u670d\u7ba1\u7406(---)","parent":"11"},{"id":"14","text":"\u5b9e\u65f6\u76d1\u63a7(---)","parent":"11"}]},{"id":"15","text":"\u5ba2\u6237\u7ba1\u7406(---)","parent":"0","children":[{"id":"16","text":"\u5ba2\u6237\u7ec4\u7ba1\u7406(---)","parent":"15"},{"id":"17","text":"\u5ba2\u6237\u7ba1\u7406(---)","parent":"15"}]},{"id":"18","text":"\u6d88\u606f\u7ba1\u7406(---)","parent":"0","children":[{"id":"19","text":"\u4f1a\u8bdd\u5206\u7ec4(---)","parent":"18"},{"id":"20","text":"\u4f1a\u8bdd\u5386\u53f2(---)","parent":"18"}]},{"id":"21","text":"\u63d2\u4ef6\u7ba1\u7406(---)","parent":"0","children":[{"id":"22","text":"\u63d2\u4ef6\u5217\u8868(---)","parent":"21"},{"id":"47","text":"\u5173\u952e\u8bcd\u56de\u590d(---)","parent":"21"},{"id":"48","text":"\u81ea\u5b9a\u4e49\u56de\u590d(---)","parent":"21"},{"id":"49","text":"\u5730\u7406\u4f4d\u7f6e\u56de\u590d(---)","parent":"21"}]},{"id":"23","text":"\u7fa4\u53d1\u7ba1\u7406(---)","parent":"0","children":[{"id":"24","text":"\u7fa4\u53d1\u6d88\u606f(---)","parent":"23"},{"id":"25","text":"\u7fa4\u53d1\u5386\u53f2(---)","parent":"23"},{"id":"77","text":"\u6d88\u8d39\u7ba1\u7406(---)","parent":"23"},{"id":"60","text":"\u6a21\u677f\u7fa4\u53d1(---)","parent":"23"}]},{"id":"26","text":"\u7edf\u8ba1\u62a5\u8868(---)","parent":"0","children":[{"id":"27","text":"\u5ba2\u6237\u7edf\u8ba1(---)","parent":"26"},{"id":"28","text":"\u4f1a\u8bdd\u7edf\u8ba1(---)","parent":"26"},{"id":"29","text":"\u5ba2\u670d\u670d\u52a1\u7edf\u8ba1(---)","parent":"26"},{"id":"53","text":"\u6d88\u606f\u660e\u7ec6(---)","parent":"26"}]},{"id":"30","text":"\u95e8\u5e97\u7ba1\u7406(---)","parent":"0","children":[{"id":"31","text":"\u95e8\u5e97\u7ba1\u7406(---)","parent":"30"},{"id":"32","text":"\u95e8\u5e97\u5206\u914d(---)","parent":"30"},{"id":"41","text":"\u5ba2\u6237\u7ba1\u7406(---)","parent":"30"},{"id":"44","text":"\u7fa4\u53d1\u6d88\u606f(---)","parent":"30"},{"id":"45","text":"\u7fa4\u53d1\u5386\u53f2(---)","parent":"30"},{"id":"46","text":"\u6279\u91cf\u5bfc\u5165(---)","parent":"30"}]},{"id":"36","text":"\u4f1a\u5458\u7ed1\u5b9a(---)","parent":"0","children":[{"id":"37","text":"\u7ed1\u5b9a\u8bbe\u7f6e(---)","parent":"36"},{"id":"61","text":"\u4f1a\u5458\u7ed1\u5b9a\u5217\u8868(---)","parent":"36"}]},{"id":"38","text":"\u7d20\u6750\u7ba1\u7406(---)","parent":"0","children":[{"id":"39","text":"\u56fe\u6587\u7d20\u6750(---)","parent":"38"},{"id":"55","text":"\u56fe\u7247\u7d20\u6750(---)","parent":"38"},{"id":"74","text":"\u8bed\u97f3\u7d20\u6750(---)","parent":"38"},{"id":"75","text":"\u89c6\u9891\u7d20\u6750(---)","parent":"38"},{"id":"76","text":"\u97f3\u4e50\u7d20\u6750(---)","parent":"38"}]},{"id":"42","text":"\u81ea\u5b9a\u4e49\u83dc\u5355(---)","parent":"0","children":[{"id":"43","text":"\u83dc\u5355\u7ba1\u7406(---)","parent":"42"}]},{"id":"50","text":"\u4e8c\u7ef4\u7801\u5e94\u7528(---)","parent":"0","children":[{"id":"51","text":"\u5e94\u7528\u5217\u8868(---)","parent":"50"},{"id":"63","text":"\u4f1a\u5458\u7ed1\u5b9a(---)","parent":"50"},{"id":"64","text":"\u6d3b\u52a8\u63a8\u5e7f(---)","parent":"50"},{"id":"65","text":"\u5546\u54c1\u4e8c\u7ef4\u7801(---)","parent":"50"},{"id":"66","text":"\u95e8\u5e97\u63a8\u5e7f(---)","parent":"50"},{"id":"67","text":"\u4fdd\u4fee\u5361(---)","parent":"50"},{"id":"70","text":"\u81ea\u5b9a\u4e49\u4e8c\u7ef4\u7801(---)","parent":"50"}]},{"id":"58","text":"\u76d1\u6d4b\u7ba1\u7406(---)","parent":"0","children":[{"id":"56","text":"\u6765\u6e90\u5a92\u4f53\u7ba1\u7406(---)","parent":"58"},{"id":"57","text":"\u7f51\u9875\u76d1\u6d4b\u7ba1\u7406(---)","parent":"58"},{"id":"68","text":"\u7f51\u9875\u76d1\u6d4b\u62a5\u8868(---)","parent":"58"},{"id":"62","text":"\u6d3b\u52a8\u76d1\u6d4b\u7ba1\u7406(---)","parent":"58"},{"id":"69","text":"\u6d3b\u52a8\u76d1\u6d4b\u62a5\u8868(---)","parent":"58"}]},{"id":"71","text":"IVR\u7ba1\u7406(---)","parent":"0","children":[{"id":"72","text":"IVR\u83dc\u5355\u7ba1\u7406(---)","parent":"71"},{"id":"73","text":"\u4e1a\u52a1\u6d41\u7a0b\u7ba1\u7406(---)","parent":"71"},{"id":"78","text":"\u4e1a\u52a1\u6d41\u7a0b\u660e\u7ec6(---)","parent":"71"}]},{"id":"33","text":"\u67e5\u770b\u8bb0\u5f55(---)","parent":"0"},{"id":"34","text":"\u8f6c\u4e8c\u7ebf\u5ba2\u670d(---)","parent":"0"},{"id":"35","text":"\u5ba2\u6237\u5206\u7ec4(---)","parent":"0"}];
var moduleMenuIds = ["2","3","4","5","6","16","17","56","57","62","68","69"];
 
 $('#menu-combotree').combotree({multiple:true}).combotree('loadData', menuListJson).combotree('setValues', moduleMenuIds);
http://www.oschina.net/code/snippet_12_4021

<script type="text/javascript" src="./Public/js/jquery.js"></script>
  <link type="text/css" rel="stylesheet" href="./Public/js/EasyUI/css/icon.css" />
  <link type="text/css" rel="stylesheet" href="./Public/js/EasyUI/css/easyui.css" />
  <script type="text/javascript" src="./Public/js/EasyUI/jquery.easyui.min.js"></script>

<select id="module-combotree" name="mod_ids[]" style="width: 200px;"></select>

$(document).ready(function(){
   var AllList = <?php echo $pluginListJson;?>;
   var defaultIds = <?php echo $entPluginIds;?>;
   $('#module-combotree').combotree({multiple:true}).combotree('loadData', AllList).combotree('setValues',defaultIds);

   var url = "<?php echo url('EntPluginManager', 'update');?>";
   var href = "<?php echo url('EntPluginManager', 'index');?>";
   $('#submit').click(function (){
    var id = $.trim($('#id').val());
    var ids = $('#module-combotree').combotree("getValues");
    var params = {
        id:id,
        ids:ids,
     };
    submit_operate(url,params,href);
   });

});

if ($ent) {
   $pluginAllList = $this->model->getPluginListCombotree();
   $entPluginList = $this->model->getEntPluginIdsByEntId($id);
  }
  $this->assign('pluginListJson', json_encode($pluginAllList));
  $this->assign('entPluginIds', json_encode($entPluginList));

/**
  * 获取企业插件列表Combotree数据
  * @return array
  */
 public function getPluginListCombotree()
 {
  $list = array();
  $PluginList = $this->getList();
  if ($PluginList) {
   foreach ($PluginList as  $k => $v) {
    $list[] = array(
      'id'   => $v['plugin_id'],
      'text' => $v['plugin_name']
    );
   }
  }
  return $list;
 }
 /**
  * 获取企业插件ID集合
  * @param int $ent_id
  * @return array
  */
 public function getEntPluginIdsByEntId($ent_id)
 {
  $sql = "SELECT plugin_id FROM `wx_ent_plugins` WHERE ent_id = %d";
  try {
   return $this->dbBase->getCol(sprintf($sql, $ent_id));
  } catch ( Exception $e ) {
   Logger::error(__FILE__ . '  ' . __CLASS__ . '  ' . __METHOD__ . '  ' . __LINE__ . '  ',
   $e->getMessage() . "\n" . $e->getTraceAsString());
   return false;
  }
 }

combo参数配置_手册的更多相关文章

  1. Dubbo -- 系统学习 笔记 -- 配置参考手册

    Dubbo -- 系统学习 笔记 -- 目录 配置参考手册 <dubbo:service/> <dubbo:reference/> <dubbo:protocol/> ...

  2. LogMiner配置使用手册

    LogMiner配置使用手册 1 Logminer简介 1.1 LogMiner介绍 Oracle LogMiner 是Oracle公司从产品8i以后提供的一个实际非常有用的分析工具,使用该工具可以轻 ...

  3. Mysql性能优化之参数配置(转)

    前言: Mysql作为数据库中广泛应用的开源产品,需要面对不同的生产压力,而有些性能问题通过配置优化就可以得到解决,优化可以分为几个方向:1.优化参数配置.2.优化数据库索引.3.优化数据库结构,如分 ...

  4. UnRAID_6.8.2_配置_设置

    UnRAID_6.8.2_配置_设置 转载注明来源: 本文链接 来自osnosn的博客,写于 2020-10-05. 参考: UnRAID download Getting_Started Offic ...

  5. capability参数配置

    前言 本文为在霍格沃兹测试开发学社的学习经历分享 简介 功能:配置 Appium 会话,告诉 Appium 服务器需要自动化的平台的应用程序 形式:键值对的集合,键对应设置的名称,值对应设置的值 主要 ...

  6. 转:浅谈UNIX下Apache的MPM及httpd.conf配置文件中相关参数配置

    为什么要并发处理 以Apache为代表的web服务器中,如果不支持并发,则在一个客户端连接的时候,如果该客户端的任务没有处理完,其他连接的客户端将会一直处于等待状态,这事不可想象的,好像没有为什么要不 ...

  7. Spark on Yarn:任务提交参数配置

    当在YARN上运行Spark作业,每个Spark executor作为一个YARN容器运行.Spark可以使得多个Tasks在同一个容器里面运行. 以下参数配置为例子: spark-submit -- ...

  8. Production环境中iptables常用参数配置

    production环境中iptables常用参数配置 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 我相信在实际生产环境中有很多运维的兄弟跟我一样,很少用到iptables的这个 ...

  9. Unity3D安卓打包参数配置与兼容性的关系分析

    前言 在使用Unity3D工程导出安卓安装包的时候,往往会遇到兼容性的问题,针对某些机型,要么无法打开游戏,要么会出现卡机的现象.面对这种情况,我们可以调节相关的参数来提高兼容性. 为了了解在打包时候 ...

随机推荐

  1. Innodb buffer pool/redo log_buffer 相关

    InnoDB存储引擎是基于磁盘存储的,并将其中的记录按照页的方式进行管理.在数据库系统中,由于CPU速度和磁盘速度之前的鸿沟,通常使用缓冲池技术来提高数据库的整体性能. 1. Innodb_buffe ...

  2. ZOJ 3299-Fall the Brick(线段树+离散化)

    题意: n个区间 ,给出区间的左右坐标 ,区间内填满宽度为1的箱子,有m个板子给出板子的高度和左右坐标(同高度不重叠) 所有箱子从上向下落,求每块板子能接到的箱子数. 分析: 首先给的区间很大,一开始 ...

  3. POJ3414 Pots BFS搜素

    题意:通过题目给出的三种操作,让任意一个杯子中的水到达一定量 分析:两个杯子最大容量是100,所以开个100*100的数组记录状态,最多1w个状态,所以复杂度很低,然后记录一下路径就好 注:代码写残了 ...

  4. Tomcat 7 Connector 精读(2) CoyoteAdapter

    这个适配器类只讲2个方法,构造方法中我们看到一个适配器对象有自己关联的连接器类. 其中Service的重要任务就是讲客户端端请求交给容器. public void service(org.apache ...

  5. CCF 认证

    题意:字符串替换 string+map的应用 #include<iostream> #include<stdio.h> #include<stdlib.h> #in ...

  6. lua协程实现简析

    协程,简单来说就是新创建一个协助程序(co = coroutine.create(func)),然后需要手动去启动它(coroutine.resume(co)),在它最终退出之前,它有可能暂停多次返回 ...

  7. highcharts图表的图例legend怎么改变显示位置

    一.将图例Legend放于图表右侧1.设置chart的marginRight属性值:chart: { marginRight: 120}2.设置legend图例属性值如下 legend: { alig ...

  8. [转载] Zookeeper中的 ACL(Access Control List)访问控制列表

    zk做为分布式架构中的重要中间件,通常会在上面以节点的方式存储一些关键信息,默认情况下,所有应用都可以读写任何节点,在复杂的应用中,这不太安全,ZK通过ACL机制来解决访问权限问题,详见官网文档:ht ...

  9. FZU 2176 easy problem (DFS序+树状数组)

    对于一颗树,dfs遍历为每个节点标号,在进入一个树是标号和在遍历完这个树的子树后标号,那么子树所有的标号都在这两个数之间,是一个连续的区间.(好神奇~~~) 这样每次操作一个结点的子树时,在每个点的开 ...

  10. 集合框架Map之KeySet方法的使用

    package cn.itcast.map; import java.util.HashMap; import java.util.Iterator; import java.util.Map; im ...