|
|
@ -69,7 +69,7 @@ export default { |
|
|
|
let familyList = data.map((item, index) => ({ |
|
|
|
'id': `N${index + 1}`, |
|
|
|
'text': item.name, |
|
|
|
'innerHTML': `<div class="c-my-node${index == 0 ? '1' : '2'} c-my-node-${item.type == 1?'home':item.gender==='1'?item.age>18&&item.age<60?'father':item.age<18?'son':'grandpa':item.gender === '2'?item.age>18&&item.age<60?'mother':item.age<18?'girl':'grandma':'father'}"><div class="c-node-name${index == 0 ? '1' : '2'}" style="color:#000">${item.name}${item.age?`(${item.age})岁`:''}</div></div>`, |
|
|
|
'innerHTML': `<div class="c-my-node${index == 0 ? '1' : '2'} c-my-node-${item.type == 1?'home':item.gender==='1'?item.age>18&&item.age<60?'father':item.age<=18?'son':'grandpa':item.gender === '2'?item.age>18&&item.age<=60?'mother':item.age<=18?'girl':'grandma':'father'}"><div class="c-node-name${index == 0 ? '1' : '2'}" style="color:#000">${item.name}${item.age?`(${item.age})岁`:''}</div></div>`, |
|
|
|
'data':{id: item.id,type:item.type,name:item.name}, |
|
|
|
})) |
|
|
|
let lineList = data.map((item, index) => ({ |
|
|
|