当前位置:网站首页>Synchronous modification when fastadmin searches
Synchronous modification when fastadmin searches
2022-08-06 10:02:00 【Extreme dream network worry-free】

The above statistics are synchronized in real time with the time search below
1、在js文件中添加如下代码,必须添加在var table = $(“#table”);之后
table.on('common-search.bs.table', function (event, table) {
//Get the data that needs to be passed for synchronous search
var d = {
};
var t = $('.form-commonsearch').serializeArray();
//t的值为[{name: "a1", value: "xx"},
//{name: "a2", value: "xx"}...]
var i=1;
var xyg = {
};
var dyg = '';
var filter = {
};
var op = {
};
$.each(t, function() {
d[this.name] = this.value;
if(i%2 != 0){
//第一个
dyg = this.value;
}else{
xyg[this.name] = this.value;
if(this.value && (dyg)){
filter[this.name] = this.value;
op[this.name] = dyg;
}
}
i++;
});
filter = (JSON.stringify(filter));
op = (JSON.stringify(op));
//ajax进行同步数据
$.ajax({
type: "GET",
async: false,
jsonType: "JSON",
// data:{addtabs:1,sort:'id',order:'desc',offset:0,limit:10,filter:filter,op:op},
url: "recharge_order/index?atype=tj&addtabs=1&sort=id&order=desc&offset=0&limit=10&filter="+filter+"&op="+op,
success: function (res) {
$('#zbf').html(res.zbf);
$('#wx').html(res.wx);
$('#zg').html(res.zg);
}
});
});

触发条件在fastadmintable event exists
边栏推荐
- White, concise and easy company website source WordPress theme 2 or more
- LinkedList 是如何完成添加的?
- [QNX Hypervisor 2.2用户手册]10.7 vdev pci-dummy
- Neo4j:通过 Docker 和 Cypher 查询语言 运行图形数据库
- 【深基16.例1】淘汰赛(下)
- 【mysql篇-进阶篇】索引
- 【重写init方法 Objective-C语言】
- Looking back at ResNet - a key step in the history of deep learning
- PHP online examination system 4.0 version source code computer + mobile terminal
- Argo Workflows 体验
猜你喜欢

接口自动化落地实践

数据库日增20万条数据,用读写分离和分库分表加持破它

昼夜双色导航主题模板 WordPress导航模板

ELT.zip 】 【 OpenHarmony chew club - the methodology of academic research paper precipitation series

PHP在线考试系统4.0版本源码电脑+手机端

基于FPGA的AHT10传感器温湿度读取

智能三子棋——保姆级教学。

jupyter notebook & pycharm(anaconda)

Let's talk about the pits of mysql's unique index, why does it still generate duplicate data?

创建一个 Dapp,为什么要选择波卡?
随机推荐
Redis 通信协议 -- RESP
46道史上最全Redis面试题,面试官能问的都被我找到了(含答案)
pytorch中的两个重要的自学函数 dir() ; help()
Neo4j:通过 Docker 和 Cypher 查询语言 运行图形数据库
Introduction of deep learning
【 machine learning bayesian classifier
grpc uses consul for service registration and discovery
NOIP 2010 普及组初赛 第28题 过河问题
常见的损失函数
Usage of torch.utils.data in pytorch ---- Loading Data
Changsha College 2022 Summer Training Competition (1)
Hdu 2022 Multi-School Training (5) Slipper
PyBind11踩坑笔记
sqlalchemy 批量插入
【机器学习】贝叶斯分类器
Vant3——复选框点击其他后格外出现一个输入框
1、命令行部署启动长安链
【mysql篇-进阶篇】索引
[QNX Hypervisor 2.2用户手册]10.7 vdev pci-dummy
HMM模型