var params = [], params2, tool = button .up('toolbar'), dates = tool .query('datefield'), ymd = tool .down('#YMD').getValue(), deptid = 1; params.push(dates[0].getRawValue()); params.push(dates[1].getRawValue()); params.push(deptid); params.push(ymd); params2 = 100000;
时间: 2023-05-20 13:01:31 浏览: 32
这段代码定义了四个变量:params、params2、tool、dates和ymd。其中,params是一个数组,params2是一个普通变量,tool是通过查找button所在的工具栏(toolbar)得到的,dates是通过查询工具栏中的所有日期字段(datefield)得到的,ymd是通过查找工具栏中第一个匹配的组件得到的。
相关问题
var params = [], params2, tool = button .up('toolbar'), dates = tool .query('datefield'), ymd = tool .down('#YMD').getValue()
这段代码定义了四个变量:params、params2、tool、dates和ymd。
params是一个空数组,用于存储参数。
params2是一个未定义的变量。
tool是一个变量,它通过查找button上方的工具栏来获取工具栏对象。
dates是一个变量,它通过查询工具栏中的所有日期字段来获取日期字段对象。
ymd是一个变量,它通过查找工具栏中的第一个组件来获取该组件对象。
onButtonClick: function(button, e, eOpts) { var params=[],tool=this.down('toolbar'),dates=tool.query('datefield'), YMD=tool.down('#YMD').getValue(),chart=this.down('chart'), Class=tool.down('#Class').getValue(), deptid=1; if(this.cf===0){ this.cf=1; chart.bindStore(this.store); } params.push(dates[0].getRawValue()); params.push(dates[1].getRawValue()); params.push(deptid); params.push(YMD); params.push(Class); this.store.getProxy().extraParams=[params,this.mothed]; this.dockedItems.items[3].moveFirst(); }
在这段代码中,当按钮被点击时,会执行一个函数。这个函数会获取一些参数,包括一个工具栏和一些日期字段。然后,它会从工具栏中获取一个特定的日期字段,并将其值存储在一个变量中。最后,它会使用这个日期值来执行一些操作。
相关推荐
![none](https://img-home.csdnimg.cn/images/20210720083646.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)