当前位置:网站首页>EasyUI DataGrid obtains multiple selected data for operation
EasyUI DataGrid obtains multiple selected data for operation
2022-07-26 22:09:00 【reg183】
easyui datagrid Obtain multiple selected data for operation
function topCenter(msg) {
$.messager.show({
title: ' Tips ',
msg: msg,
showType: 'slide',
style: {
right: '',
top: document.body.scrollTop + document.documentElement.scrollTop,
bottom: ''
}
});
}
function warning(msg) {
$.messager.alert(' Tips ', msg, 'warning');
}
function confirmMsg(msg,func) {
$.messager.confirm(' Tips ', msg, function (r) {
if (r) {
func();
}
});
}
function datagridFun(dg, url, fun) {
var param1, param2, param3;
switch (arguments.length) {
case 2: param1 = param2 = param3 = null; break;
case 3: param1 = arguments[2]; param2 = param3 = null; break;
case 4: param1 = arguments[2]; param2 = arguments[3]; param3 = null; break;
case 5: param1 = arguments[2]; param2 = arguments[3]; param3 = arguments[4]; break;
}
var datagrid = $('#'+dg);
var rows = datagrid.datagrid('getSelections');
if (rows.length <= 0) {
warning(' Please select the data you want to operate !');
}
else {
confirmMsg(' You have selected ' + rows.length + ' Bar record , Go ahead ?', function () {
var ids = [];
for (var i = 0, j = rows.length; i < j; i++) {
ids.push(rows[i].id);
}
ids.join(',');
$.post(url, {
id: ids.toString(), operator: $.cookie('user'),param1:param1,param2:param2,param3:param3 }, function (result) {
if (result.success) {
topCenter(result.msg); datagrid.datagrid('reload'); $('#recentOp').datagrid('reload');
if(fun != undefined) fun();
} else {
warning(result.msg);
}
}, 'json')
})
}
}
边栏推荐
- Join method in JS
- Li Kou daily question - day 43 -168. Name of Excel table column
- July training (the 26th day) - and check the collection
- In depth interpretation of happens before principle
- Flash source code startup phase
- 2018 arXiv preprint | MolGAN: An implicit generative model for small molecular graphs
- ansible安装及使用
- Altium Designer 22 修改选中元件的层属性
- 1 - "pytorch deep learning practice" - linear model
- Also on Data Governance
猜你喜欢
![[shutter -- geTx] pop up - dialog, snackBar, bottomsheet](/img/17/af2e45620e96a78235081145b7bb76.png)
[shutter -- geTx] pop up - dialog, snackBar, bottomsheet

Isilon's onefs common operation commands (I)

Unity installation failed: operation not allowed, MKDIR

月薪5万的朋友告诉我,你只是在打杂

matlab 画短时能量图

If you do not add waitkey() function after imshow() function, it will not be displayed

xshell7个人免费下载,使用

伦敦银外汇走势理解与实操

Thoroughly understand the principle and implementation of service discovery

也谈数据治理
随机推荐
JDBC总结
I successfully landed the automatic testing post, with a maximum monthly salary of 15.4k. I'm great~
09 expr 命令
Go----Go 语言命名规范
Task04 | classification analysis
Altium Designer 22 中文字符乱码
SQL注入 Less24(二次注入)
: could not determine a constructor for the tag !RootAdmin
C# 数据类型_摘自菜鸟教程
A bowl of noodles in a dream
Thorough load balancing
【地平线旭日X3派试用体验】+开箱帖
Implementation of MATLAB short-time autocorrelation
Pytorch 使用RNN模型构建人名分类器
jmeter -- response中文乱码处理
Just one dependency to give swagger a new skin, which is simple and cool
Basic operation of (C language) files
JS delay execution window.onload
Overview of MPLS Basics
正则表达式及绕过案例