Browse Source

获取房屋信息

lisu
mk 1 year ago
parent
commit
c0cb306973
  1. 12
      subpages/house/pages/housePortrait/component/graph/graph.js
  2. 11
      utils/api.js

12
subpages/house/pages/housePortrait/component/graph/graph.js

@ -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,

11
utils/api.js

@ -76,7 +76,8 @@ module.exports = {
houseResidentChangeRecord,
waitCollectHouseList,
nonIntResiList,
overView
overView,
getFamilyRelationshipListByHouseId
}
// 获取公钥
@ -288,13 +289,15 @@ function getPersonalFile(parm) {
return fly.post(`actual/base/peopleRoomOverview/getPersonalFile?resid=` + parm.resid)
}
// 获取家庭关系
// 获取家庭关系(居民)
function getFamilyRelationshipList(parm) {
return fly.post(`actual/base/peopleRoomOverview/getFamilyRelationshipList?type=${parm.type}&resid=` + parm.id)
}
// 获取家庭关系(房屋)
function getFamilyRelationshipListByHouseId(parm) {
return fly.post(`actual/base/peopleRoomOverview/getFamilyRelationshipListByHouseId?type=0&houseId=` + parm.id)
}
// 省满意度
function provincialSatisfactionPageList(parm) {
return fly.post(`actual/base/peopleRoomOverview/provincialSatisfactionPageList`, parm)

Loading…
Cancel
Save