|
|
@ -1,13 +1,9 @@ |
|
|
|
import * as echarts from '../../../../../../ec-canvas/echarts'; |
|
|
|
import { |
|
|
|
getFamilyRelationshipList |
|
|
|
getFamilyRelationshipListByHouseId |
|
|
|
} from "../../../../../../utils/api"; |
|
|
|
var chart; |
|
|
|
|
|
|
|
const formatNumber = n => { |
|
|
|
n = n.toString() |
|
|
|
return n[1] ? n : '0' + n |
|
|
|
} |
|
|
|
Component({ |
|
|
|
properties: { |
|
|
|
houseId: { |
|
|
@ -50,11 +46,9 @@ Component({ |
|
|
|
}); |
|
|
|
canvas.setChart(chart); |
|
|
|
let params = { |
|
|
|
type: "1", |
|
|
|
id: this.data.houseId |
|
|
|
} |
|
|
|
|
|
|
|
getFamilyRelationshipList(params).then(({ |
|
|
|
getFamilyRelationshipListByHouseId(params).then(({ |
|
|
|
data |
|
|
|
}) => { |
|
|
|
const rootNode = {}; |
|
|
@ -103,7 +97,7 @@ Component({ |
|
|
|
let links = data.map((item, index) => ({ |
|
|
|
"source": 0, |
|
|
|
"target": index+1, |
|
|
|
"name": item.houseHolderRel||'暂不清楚', |
|
|
|
"name":item.resiHouseRel ===null?'未知':item.resiHouseRel ==='0'?'自住':item.resiHouseRel === '1'?'出租':'未知', |
|
|
|
"label": { |
|
|
|
"align": "center", |
|
|
|
"fontSize": 12, |
|
|
|