|
@@ -39,15 +39,23 @@ $(document).on('click', '.pure-table tbody.multipleChoice tr', function() {
|
|
|
$(this).find("td:eq(0)").removeClass('checked');
|
|
|
filterAll();
|
|
|
|
|
|
- removeByValue(arr99, $(this).find("td:eq(0)").data('id'));
|
|
|
+ // 取消选中,del数组里push id
|
|
|
+ if ($(this).find("td:eq(0)").data('pd')) {
|
|
|
+ arrDelPd.push($(this).find("td:eq(0)").data('id'))
|
|
|
+ arrDelPd = unique(arrDelPd);
|
|
|
+ console.log('arrDelPd');
|
|
|
+ console.log(arrDelPd)
|
|
|
|
|
|
- console.log('数组变量')
|
|
|
- console.log(arr99)
|
|
|
+ } else {
|
|
|
|
|
|
- if (arrDelPd.indexOf($(this).find("td:eq(0)").data('id')) > -1) {
|
|
|
+ removeByValue(arr99, $(this).find("td:eq(0)").data('id'));
|
|
|
+
|
|
|
+ console.log('数组变量')
|
|
|
+ console.log(arr99)
|
|
|
|
|
|
}
|
|
|
|
|
|
+
|
|
|
} else {
|
|
|
$(this).addClass("selected");
|
|
|
$(this).find("td:eq(0)").addClass('checked');
|
|
@@ -55,9 +63,19 @@ $(document).on('click', '.pure-table tbody.multipleChoice tr', function() {
|
|
|
filterAll()
|
|
|
|
|
|
arr99.push($(this).find("td:eq(0)").data('id'))
|
|
|
+ arr99 = unique(arr99);
|
|
|
console.log('数组变量')
|
|
|
console.log(arr99)
|
|
|
|
|
|
+
|
|
|
+ // pd的 取消选中再选中,del数组里去除 id
|
|
|
+ if ($(this).find("td:eq(0)").data('pd')) {
|
|
|
+ removeByValue(arrDelPd, $(this).find("td:eq(0)").data('id'));
|
|
|
+ arrDelPd = unique(arrDelPd);
|
|
|
+ console.log('arrDelPd');
|
|
|
+ console.log(arrDelPd)
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
});
|
|
|
|