|
|
|
@ -909,20 +909,20 @@ function JYimport(input,ruleTitle) { |
|
|
|
|
let datalist3 = [];//存放待二次确认的临时接口
|
|
|
|
|
datalist2.forEach(data=>{ |
|
|
|
|
data['updatetime'] = data['updatetime'] || $.dateFormat(new Date(),"yyyy-MM-dd HH:mm:ss"); |
|
|
|
|
let ii = datalist.findIndex(item => item.name == data.name && item.type==data.type); |
|
|
|
|
log(ii); |
|
|
|
|
xlog(ii); |
|
|
|
|
if (i>-1) { |
|
|
|
|
log(datalist[ii].name); |
|
|
|
|
let index = datalist.findIndex(item => item.name == data.name && item.type==data.type); |
|
|
|
|
if (index>-1) { |
|
|
|
|
log(datalist[index].name); |
|
|
|
|
//存在时,做对应处理
|
|
|
|
|
if(Juconfig['ImportType']=="Skip"){ |
|
|
|
|
//跳过,啥也不做
|
|
|
|
|
}else if(Juconfig['ImportType']=="Confirm"){ |
|
|
|
|
//二次手工确认代码
|
|
|
|
|
if(datalist[index].updatetime != data.updatetime){ |
|
|
|
|
datalist3.push(data); |
|
|
|
|
} |
|
|
|
|
}else{ |
|
|
|
|
//默认是覆盖已存在的
|
|
|
|
|
let index = datalist.indexOf(datalist.filter(d => d.name == data.name && d.type==data.type)[0]); |
|
|
|
|
//let index = datalist.indexOf(datalist.filter(d => d.name == data.name && d.type==data.type)[0]);
|
|
|
|
|
datalist.splice(index, 1); |
|
|
|
|
datalist.push(data); |
|
|
|
|
num = num + 1; |
|
|
|
|