woshinicheng

woshinicheng

55飞吻 2019-2-25 加入 来自北京

(这个人懒得留下签名)

woshinicheng 最近的回答

  • 2019-11-12 14:50:34手机号注册的想绑定qq却发现不是同一个号?中回答:

    @纸飞机 xxx576 这个
  • 2019-11-6 12:3:58求大神解答,数据表中的按钮,需要在页面加载时根据数据的不同进行改变中回答:

    @woshinicheng
    表格内的引用方式
  • 2019-11-6 12:2:33求大神解答,数据表中的按钮,需要在页面加载时根据数据的不同进行改变中回答:


    使用带判断的模板不知道是否满足
  • 2019-10-9 17:8:44layui tree 如何在选中父节点时 不一起选中子节点 并且子节点在父节点选中时不为强制选择中回答:

    这个倒是没办法 因为我发现ztree啥的都这个逻辑
    以前倒是没注意 但是现在看 树形结构好像都是这样的逻辑 你可以看看源码[嘻嘻]
    我改国际版分页和各种写死提示的时候就是改的源码[可怜]
    (为啥日期有英文其他的没有 小声bb)
  • 2019-9-18 17:16:48layui tree 如何在选中父节点时 不一起选中子节点 并且子节点在父节点选中时不为强制选择中回答:

    逻辑上的最 底层级加一个查看列表或者显示查询代替原中间节点的显示功能就解决了我第一个所说的问题

  • 2019-9-10 9:59:40layui tree 如何在选中父节点时 不一起选中子节点 并且子节点在父节点选中时不为强制选择中回答:


    貌似这次更新解决了但是没有尝试
  • 2019-9-3 18:27:30layui tree 如何在选中父节点时 不一起选中子节点 并且子节点在父节点选中时不为强制选择中回答:

    逻辑上的最底层级加一个查看列表或者显示查询代替原中间节点的显示功能就解决了我第一个所说的问题
  • 2019-9-3 18:25:26layui tree 如何在选中父节点时 不一起选中子节点 并且子节点在父节点选中时不为强制选择中回答:

    @月球有危险 而且顶级最好再封一层 要不也有问题
    //构造layui树结构
    List<LayuiTree> treeList = new ArrayList();
    List<LayuiTree> layuiTree = getLayuiTree(root.getTreeLeaf(), treeList,powers);

    //封至顶级菜单 否则会渲染错误
    List<LayuiTree> treeListTop = new ArrayList();
    LayuiTree layuiTreeTop = new LayuiTree();
    layuiTreeTop.setChildren(layuiTree);
    layuiTreeTop.setId(0);
    layuiTreeTop.setTitle("所有权限");
    treeListTop.add(layuiTreeTop);
    subAccoutOutput.setLayuiTreeList(treeListTop);
  • 2019-9-3 18:24:14layui tree 如何在选中父节点时 不一起选中子节点 并且子节点在父节点选中时不为强制选择中回答:

    @月球有危险 解决了 只渲染最底层的
        private List<LayuiTree> getLayuiTree(List<PermissionsTree> permissionsTreeList,List<LayuiTree> treeList,String powers){
    for (PermissionsTree perTree1 : permissionsTreeList) {
    MerPermission per1 = perTree1.getPermission();
    List<PermissionsTree> treeLeaf1 = perTree1.getTreeLeaf();
    LayuiTree layuiTree = new LayuiTree(per1.getLabel(), per1.getPermissionId(), per1.getPath());
    String permissionId = ","+per1.getPermissionId()+",";
    //该处只判断底层权限是否选中 否则渲染出错
    if(StringUtils.isNotBlank(powers)&&per1.getPermissionType().equals(Constants.Table.MerPermission.PermissionTypeEnum.Bottom)
    &&powers.contains(permissionId)){
    layuiTree.setChecked(true);
    }
    if(Objects.nonNull(treeLeaf1)&&treeLeaf1.size()!=0){
    List<LayuiTree> treeList1 = new ArrayList();
    treeList1 = getLayuiTree(treeLeaf1,treeList1,powers);
    layuiTree.setChildren(treeList1);
    }
    treeList.add(layuiTree);
    }
    return treeList;
    }
  • 2019-8-12 17:50:39layui tree 如何在选中父节点时 不一起选中子节点 并且子节点在父节点选中时不为强制选择中回答:

    还需要加一条 他在数据正常的时候 渲染会出错[可怜]
    这里他会将同父级下的除该选上的都选上 要是不可以就没办法了得换了[泪]


        layui.use(['form','tree','util'], function() {
    var form = layui.form,tree = layui.tree,data=[{"checked":false,"children":[{"checked":false,"children":[{"checked":false,"disabled":false,"href":"","id":25,"spread":true,"title":"数据导出"}],"disabled":false,"href":"","id":24,"spread":true,"title":"交易订单"},{"checked":false,"children":[{"checked":false,"disabled":false,"href":"","id":27,"spread":true,"title":"取消标记"}],"disabled":false,"href":"","id":26,"spread":true,"title":"已标记订单"}],"disabled":false,"href":"/portalCommon/TransactionManagement.do","id":2,"spread":true,"title":"交易管理"},{"checked":false,"children":[{"checked":false,"children":[{"checked":false,"disabled":false,"href":"","id":28,"spread":true,"title":"下载模板"},{"checked":false,"disabled":false,"href":"","id":29,"spread":true,"title":"上传文件"},{"checked":false,"disabled":false,"href":"","id":30,"spread":true,"title":"提交代付"}],"disabled":false,"href":"/portalCommon/paid.do","id":4,"spread":true,"title":"代付申请"},{"checked":false,"children":[{"checked":false,"disabled":false,"href":"","id":31,"spread":true,"title":"批次订单"}],"disabled":false,"href":"/portalCommon/batchManage.do","id":5,"spread":true,"title":"批次管理"},{"checked":false,"children":[{"checked":false,"children":[{"checked":false,"disabled":false,"href":"","id":33,"spread":true,"title":"数据导出"}],"disabled":false,"href":"","id":32,"spread":true,"title":"代付订单"}],"disabled":false,"href":"/portalCommon/paymentRecords.do","id":6,"spread":true,"title":"代付记录"}],"disabled":false,"href":"","id":3,"spread":true,"title":"代付中心"},{"checked":true,"children":[{"checked":true,"children":[{"checked":true,"children":[{"checked":true,"disabled":false,"href":"","id":36,"spread":true,"title":"提现"}],"disabled":false,"href":"","id":34,"spread":true,"title":"账户资金"},{"checked":true,"disabled":false,"href":"","id":35,"spread":true,"title":"账户管理"},{"checked":false,"children":[{"checked":false,"disabled":false,"href":"","id":39,"spread":true,"title":"转入"}],"disabled":false,"href":"","id":37,"spread":true,"title":"代付可用余额"},{"checked":false,"disabled":false,"href":"","id":38,"spread":true,"title":"代付凭证充值"},{"checked":false,"children":[{"checked":false,"disabled":false,"href":"","id":41,"spread":true,"title":"数据导出"}],"disabled":false,"href":"","id":40,"spread":true,"title":"提现记录"}],"disabled":false,"href":"/portalCommon/financeSettlementPage.do","id":8,"spread":true,"title":"账户管理"},{"checked":false,"children":[{"checked":false,"disabled":false,"href":"","id":42,"spread":true,"title":"汇总账单"},{"checked":false,"disabled":false,"href":"","id":43,"spread":true,"title":"账单明细"}],"disabled":false,"href":"/portalCommon/financialReconciliation.do","id":9,"spread":true,"title":"交易汇总"},{"checked":false,"children":[{"checked":false,"children":[{"checked":false,"disabled":false,"href":"","id":45,"spread":true,"title":"导出列表"}],"disabled":false,"href":"","id":44,"spread":true,"title":"动账记录"}],"disabled":false,"href":"/portalCommon/accountFlow.do","id":10,"spread":true,"title":"动账记录"},{"checked":false,"children":[{"checked":false,"disabled":false,"href":"","id":46,"spread":true,"title":"结算订单"}],"disabled":false,"href":"/portalCommon/financeClearingPage.do","id":11,"spread":true,"title":"结算账单"}],"disabled":false,"href":"","id":7,"spread":true,"title":"财务管理"},{"checked":false,"children":[{"checked":false,"children":[{"checked":false,"disabled":false,"href":"","id":49,"spread":true,"title":"应用查看"},{"checked":false,"disabled":false,"href":"","id":50,"spread":true,"title":"应用申请"}],"disabled":false,"href":"/portalCommon/protalMerchantApplicationPage.do","id":14,"spread":true,"title":"应用管理"},{"checked":false,"children":[{"checked":false,"disabled":false,"href":"","id":51,"spread":true,"title":"商户id"},{"checked":false,"disabled":false,"href":"","id":52,"spread":true,"title":"商户秘钥"},{"checked":false,"disabled":false,"href":"","id":53,"spread":true,"title":"应用列表"},{"checked":false,"disabled":false,"href":"","id":54,"spread":true,"title":"功能列表"}],"disabled":false,"href":"/portalCommon/accessInformation.do","id":15,"spread":true,"title":"接入信息"}],"disabled":false,"href":"","id":13,"spread":true,"title":"技术接入"},{"checked":false,"children":[{"checked":false,"children":[{"checked":false,"disabled":false,"href":"","id":47,"spread":true,"title":"购买模块"},{"checked":false,"disabled":false,"href":"","id":48,"spread":true,"title":"购买订单"}],"disabled":false,"href":"/accountService/accountServicePage.do","id":12,"spread":true,"title":"产品购买"},{"checked":false,"disabled":false,"href":"/accountService/accountServiceUsePage.do","id":56,"spread":true,"title":"产品使用"}],"disabled":false,"href":"","id":55,"spread":true,"title":"增值服务"}];
    form.render();
    //基本演示
    tree.render({
    elem: '#layuiTree'
    ,data: data
    ,showCheckbox: true //是否显示复选框
    //,accordion : true //是否手风琴模式
    ,id: 'layuiTree'
    //,isJump: true //是否允许点击节点时弹出新窗口跳转
    ,click: function(obj){
    /* var data = obj.data; //获取当前点击的节点数据
    layer.msg('状态:'+ obj.state + '<br>节点数据:' + JSON.stringify(data));*/
    }
    });
    });