|
|
|
@ -3,16 +3,14 @@ import { |
|
|
|
getFamilyRelationshipList |
|
|
|
} from "../../../../../../utils/api"; |
|
|
|
var chart; |
|
|
|
|
|
|
|
const formatNumber = n => { |
|
|
|
n = n.toString() |
|
|
|
return n[1] ? n : '0' + n |
|
|
|
} |
|
|
|
Component({ |
|
|
|
properties: { |
|
|
|
resiId: { |
|
|
|
type: String, |
|
|
|
value: '', |
|
|
|
observer(val) { |
|
|
|
this.getData() |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
data: { |
|
|
|
@ -20,13 +18,7 @@ Component({ |
|
|
|
lazyLoad: true |
|
|
|
// onInit: initChart
|
|
|
|
}, |
|
|
|
tabList: [{ |
|
|
|
label: "问题突出类别", |
|
|
|
value: 1 |
|
|
|
}, { |
|
|
|
label: '行业领域分析', |
|
|
|
value: 2 |
|
|
|
}], |
|
|
|
|
|
|
|
tabValue: 1 |
|
|
|
}, |
|
|
|
lifetimes: { |
|
|
|
@ -46,10 +38,8 @@ Component({ |
|
|
|
let than = this |
|
|
|
chart.on('click', function (param) { |
|
|
|
if (param.dataType == 'node') { |
|
|
|
console.log('点击了节点',param) |
|
|
|
than.triggerEvent('clickGraphNode', {data: param.data.data }); |
|
|
|
} else { |
|
|
|
console.log('点击了边',param) |
|
|
|
} |
|
|
|
}) |
|
|
|
canvas.setChart(chart); |
|
|
|
@ -57,7 +47,6 @@ Component({ |
|
|
|
type: "0", |
|
|
|
id: this.data.resiId |
|
|
|
} |
|
|
|
|
|
|
|
getFamilyRelationshipList(params).then(({ |
|
|
|
data |
|
|
|
}) => { |
|
|
|
@ -132,7 +121,6 @@ Component({ |
|
|
|
}, |
|
|
|
})) |
|
|
|
|
|
|
|
|
|
|
|
var option = { |
|
|
|
|
|
|
|
legend: [{ |
|
|
|
|