ExtJs 4.2 treePanel 点击树节点 传送参数到后台(多个参数)
//***********************************************左边树开始***********************************************
//分组树Store
var treeStore = Ext.create('Ext.data.TreeStore', {
proxy: {
type: 'ajax',
url: "/Handler/StorePositionLayoutHandler.ashx?func=getbystorestorepositionlist&format=list"
},
autoLoad: false,
fields: ['text', 'id', 'leaf', 'SPLId', 'SPLName', 'StoreId', 'Level1', 'Level2', 'Level3', 'levelType'],
reader: {
type: "json",
root: ''
},
extraParams: {
SPLId: '',
StoreId: '',
Level1: '',
Level2: '',
Level3: '',
levelType: '',
}
});
//分组树
var treePanel = Ext.create('Ext.tree.Panel', {
store: treeStore,
border: false, //边框
enableDD: true,
rootVisible: false, //隐藏根节点
useArrows: true, //树节点使用箭头
containerScroll: true,
collapsible: false,
autoScroll: false,
title: '货位信息列表',
columns: [{
xtype: 'treecolumn',
text: '货位层次',
dataIndex: 'text',
width: 150,
sortable: true
}, {
text: '货位名称',
dataIndex: 'SPLName',
flex: 1,
sortable: true
}],
//点击目录树+前 给root参数赋值
listeners: {
//树列表单击,取值赋值给id:xxxx的文本框
itemclick: function (node, record, item, index, event, eOpts) {
//给右侧页面赋值 开始
var id = record.data.id;
var text = record.data.text;
var SPLId = record.data.SPLId;
var SPLName = record.data.SPLName;
var StoreId = record.data.StoreId; BelowForm.setTitle('当前货位:' + text + '' + SPLName); BelowForm.form.findField('SPLId').setValue(SPLId);
BelowForm.form.findField('SPLName').setValue(SPLName);
//给右侧页面赋值 结束
},
//点击目录树+前 给root参数赋值
beforeitemexpand: function (record, eOpts) {
if (treePanel != undefined) {
var root = treePanel.store.getProxy();
root.extraParams.SPLId = record.data.SPLId;
root.extraParams.StoreId = record.data.StoreId;
root.extraParams.Level1 = record.data.Level1;
root.extraParams.Level2 = record.data.Level2;
root.extraParams.Level3 = record.data.Level3;
root.extraParams.levelType = record.data.levelType;
}
}
}
//singleExpand:true //展示单个子节点,其它的子节点合并。
});
//treePanel.expandAll(); //展开所有节点
treePanel.collapseAll(); //关闭所有节点 //***********************************************左边树结束***********************************************
ExtJs 4.2 treePanel 点击树节点 传送参数到后台(多个参数)的更多相关文章
- 展开easyui 树节点到某个点
$(function () { $('#tt').tree({ url: '/IS/Department/JsonTree?companyID=@(Request.QueryString[" ...
- 【ztree】zTree取消树节点选中的背景色
点击树节点的时候是ztree给树加了个class: curSelectedNode 所以最简单的清除树节点的背景色的方法是移除其有背景色的class: $(".curSelectedN ...
- Extjs 树节点操作常用属性
tree: 树 node:节点 1.全部展开 tree.expandAll(); 2.全部收缩 tree.collapseAll(); 3.得到父节点 node.parentNode 4. ...
- 玩转Web之easyui(二)-----easy ui 异步加载生成树节点(Tree),点击树生成tab(选项卡)
关于easy ui 异步加载生成树及点击树生成选项卡,这里直接给出代码,重点部分代码中均有注释 前台: $('#tree').tree({ url: '../servlet/School_Tree?i ...
- Extjs 4.2 右键菜单树节点(,选择逆,废除)
写自己的最新版本号extjs4.2树节点的操作,记录它,可能在将来被用于. var tree = new Ext.tree.TreePanel({ flex: 1, animate: true, au ...
- Easyui 实现点击不同树节点打开不同tab页展示不同datagrid表数据设计
实现点击不同树节点打开不同tab页展示不同datagrid表数据设计 by:授客 QQ:1033553122 测试环境 jquery-easyui-1.5.3 需求描述 如上图, 1.点击左侧树,叶子 ...
- Extjs整体加载树节点
Ext.onReady(function () { Ext.define('company', { extend: 'Ext.data.Mode ...
- pyqt5 树节点点击实现多窗口切换
# coding=utf-8 import sys from PyQt5.QtWidgets import * from PyQt5.QtCore import * from PyQt5.QtGui ...
- ext 树节点操作
ext 树节点操作 tree :树 node:节点 1.全部展开 tree.expandAll(); 2.全部收缩 tree.collapseAll(); 3.得到父节点 node.parent ...
随机推荐
- PHP正则提取或替换img标记属性实现文章预览
今天在想如何实现文章预览时,如果文章里面包含照片,那么就选取第一张照片作为预览图,如果没有照片,则截取文章的头150个字作为预览文字,但是因为保存在数据库的文章都是以富文本的形式,没办法直接提取,在网 ...
- 【数论-数位统计】UVa 11076 - Add Again
Add AgainInput: Standard Input Output: Standard Output Summation of sequence of integers is always a ...
- Hashtable 和 HashMap 的比较
Hashtable HashMap 并发操作 使用同步机制, 实际应用程序中,仅仅是Hashtable本身的同步并不能保证程序在并发操作下的正确性,需要高层次的并发保护. 下面的代码试图在ke ...
- C#控制台程序 使用 Server.MapPath,
(1)添加引用 System.Web. (2)在类中填写 using System.Web 命名空间. (3)写法为: System.Web.HttpContext.Current.Server.Ma ...
- Commons Configuration2 - Quick start guide
原文:http://commons.apache.org/proper/commons-configuration/userguide/quick_start.html Reading a prope ...
- Servlet & JSP - Listener
Servlet API 中的 6 个事件类 1. ServletContextEvent:该类表示上下文事件,当应用上下文对象发生改变,例如创建或销毁上下文对象时,将触发上下文事件. 2. Servl ...
- MyBatis(3.2.3) - Configuring MyBatis using XML, Environment
The key component of MyBatis is SqlSessionFactory from which we get SqlSession and execute the mappe ...
- asp.net post方法;对象转json
[System.Web.Services.WebMethod()] public static string GetPoints(string userId) { st ...
- <转载>批处理之FOR语句祥解
批处理之FOR语句祥解 FOR这条命令基本上都被用来处理文本,但还有其他一些好用的功能! 看看他的基本格式(这里我引用的是批处理中的格式,直接在命令行只需要一个%号) FOR 参数 %%变量名 IN ...
- 第四十二篇、自定义Log打印
1.在Xcode 8出来之后,需要我们去关闭多余的日志信息打印 2.在开发的过程中,打印调试日志是一项比不可少的工程,但是在iOS 10中NSLog打印日志被屏蔽了,就不得不使用自定义Log 3.去掉 ...