|
|
|
@ -72,9 +72,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':index == 0 ? item.gender == 1 ? 'father' : 'mother' : item.houseHolderRel == '配偶' ? item.gender == '1' ? 'mother' : 'father' : item.houseHolderRel == '女儿' ? 'girl' : item.houseHolderRel == '儿子' ? 'gon' : item.houseHolderRel == '父亲' || item.houseHolderRel == '祖父母' ? item.gender == 1 ? 'grandpa' : 'grandma' : item.houseHolderRel == '母亲' ? 'grandma' : item.gender == 1 ? 'father' : 'mother' }"><div class="c-node-name${index == 0 ? '1' : '2'}" style="color:#000">${item.type == 1?`${item.name}`:item.name.length === 2 ? |
|
|
|
item.name.substring(0, 1) + '*' : |
|
|
|
item.name.substring(0, 1) + '*' + item.name.substring(2)} ${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}, |
|
|
|
|
|
|
|
})) |
|
|
|
@ -83,7 +81,7 @@ export default { |
|
|
|
let lineList = data.map((item, index) => ({ |
|
|
|
'from': 'N1', |
|
|
|
'to': `N${index + 1}`, |
|
|
|
'text':item.type ==1?'未知':data[index].houseHolderRel || '自住', |
|
|
|
'text':item.type ==1?'未知':data[index].houseHolderRel || '未知', |
|
|
|
'isHideArrow': true, |
|
|
|
'color': item.houseHolderRel === '父亲' ? '#3876f2' : (item.houseHolderRel === '母亲' || item.houseHolderRel === '祖父母' ? '#ff9696' : (item.houseHolderRel === '女儿' ? '#ffd5d5' : '#3876f2')), |
|
|
|
'fontColor': item.houseHolderRel === '父亲' ? '#3876f2' : (item.houseHolderRel === '母亲' || item.houseHolderRel === '祖父母' ? '#ff9696' : (item.houseHolderRel === '女儿' ? '#ffd5d5' : '#3876f2')) |
|
|
|
|