bootstraptable向表格传值,数据重复

{

                title: "采集数量",
                field: 'count',
                align: 'center',
                search: true, //显示搜索框
                cellStyle: function () {
                    return {
                        'classes':'xxs'}
                        },
                formatter:function (value,row,index) {
                    $.ajax({
                        type: "post",
                        url: "/baseinfo/searchTotalByJYBH",
                        contentType: "application/json",
                        dataType: "json",
                        data:  JSON.stringify({'jybh':row.departmentId}), //必须的,为空的话也必须是json字符串
                        success: function (res) {
                            console.log(res);
                            if(res.code==200){
                                var num=res.data+'';
                                    console.log(row);
                                    $(".xxs").html(num);
                            }else{
                                alert(res.msg);
                            }
                        }
                    })
                }
            },

img


img

https://img-mid.csdnimg.cn/release/static/image/mid/ask/881361798736132.png "#left"),}
试过的方法 ,

ajax 部分没有问题,formatter调用的地方可能出现重复调用了,比如 onclick 事件绑定在嵌套的对象上了,点到里面的对象,外边的冒泡后,也触发相同的事件了,如果有这个现象,你需要阻止冒泡