|
|
|
@ -149,9 +149,32 @@
|
|
|
|
|
value: data2,
|
|
|
|
|
id: 'key123',
|
|
|
|
|
onchange: function(data, index){
|
|
|
|
|
|
|
|
|
|
dataTransfer = transfer.getData('key123'); //获取右侧数据
|
|
|
|
|
// layer.alert(JSON.stringify(dataTransfer));
|
|
|
|
|
$('#promote_data').val(JSON.stringify(dataTransfer));
|
|
|
|
|
|
|
|
|
|
if (index == 0) {
|
|
|
|
|
$('#promote_data').val(JSON.stringify(dataTransfer));
|
|
|
|
|
return;
|
|
|
|
|
} else if (index == 1){
|
|
|
|
|
|
|
|
|
|
for(var i=0;i<data2.length;i++)
|
|
|
|
|
{
|
|
|
|
|
console.log(data2[i])
|
|
|
|
|
if (data2[i]==data[0]['value']) {
|
|
|
|
|
data2.splice(i,1);
|
|
|
|
|
i=i-1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// data2.push(data[0]['value']);
|
|
|
|
|
console.log(data2)
|
|
|
|
|
transfer.reload('key123',{elem: '#test4',data: JSON.parse(data1).list,title: ['全部成员', '选中成员'],showSearch: true,value: data2,id: 'key123'});
|
|
|
|
|
dataTransfer = transfer.getData('key123');
|
|
|
|
|
$('#promote_data').val(JSON.stringify(dataTransfer));
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|