Browse Source

房屋跳转居民,编辑拓展信息弹框点不开

lisu
mk 1 year ago
parent
commit
81331c3f8f
  1. 11
      subpages/addResi/pages/addResi/addResi.js
  2. 13
      subpages/house/pages/housePortrait/component/graph/graph.js
  3. 14
      subpages/house/pages/housePortrait/housePortrait.js
  4. 2
      subpages/house/pages/housePortrait/housePortrait.wxml

11
subpages/addResi/pages/addResi/addResi.js

@ -1342,7 +1342,6 @@ Page({
console.error('Error fetching options:', error); console.error('Error fetching options:', error);
} }
} }
console.log(this.data.form);
if(this.data.formType ==='edit'){ if(this.data.formType ==='edit'){
if(item.itemType === 'select'){ if(item.itemType === 'select'){
let obj = item.opction.find(itemC=>itemC.value === this.data.form[item.formNameP][item.formName]) || null let obj = item.opction.find(itemC=>itemC.value === this.data.form[item.formNameP][item.formName]) || null
@ -1350,7 +1349,15 @@ Page({
item.selectLabel = obj.label || '' item.selectLabel = obj.label || ''
} }
}else{ }else{
item.selectLabel = this.data.form[item.formNameP][item.formName] if(this.data.form[item.formNameP]){
item.selectLabel = this.data.form[item.formNameP][item.formName] || null
}else{
this.setData({
['form.' +item.formNameP ]: {},
})
}
console.log(this.data.form);
} }
} }
return acc; return acc;

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

@ -47,6 +47,13 @@ Component({
height: height, height: height,
devicePixelRatio: dpr // 像素比 devicePixelRatio: dpr // 像素比
}); });
let than = this
chart.on('click', function (param) {
if (param.dataType == 'node') {
than.triggerEvent('clickGraphNode', {data: param.data.data });
} else {
}
})
canvas.setChart(chart); canvas.setChart(chart);
let params = { let params = {
id: this.data.houseId id: this.data.houseId
@ -93,7 +100,11 @@ Component({
'symbol': symbolUrl, 'symbol': symbolUrl,
label: { label: {
"position": "bottom" "position": "bottom"
} },
'data':{
type:item.type,
id:item.id
},
}; };
}); });

14
subpages/house/pages/housePortrait/housePortrait.js

@ -217,6 +217,7 @@ Page({
}) })
} }
}) })
await getfuwuList(params).then(res => { await getfuwuList(params).then(res => {
if (res.data && res.data.length > 0) { if (res.data && res.data.length > 0) {
let renamedArray = []; let renamedArray = [];
@ -271,4 +272,17 @@ Page({
ywVisible: true ywVisible: true
}) })
}, },
clickGraphNode(parm){
if(parm.detail.data.type === 0){
wx.navigateTo({
url: `/subpages/searchResult/pages/resiInfo/resiInfo?resiId=${parm.detail.data.id}`,
})
}else{
this.setData({
houseId:parm.detail.data.id
})
this.getData()
}
},
}) })

2
subpages/house/pages/housePortrait/housePortrait.wxml

@ -30,7 +30,7 @@
<image mode="widthFix" src="../../../../images/right.png"></image> <image mode="widthFix" src="../../../../images/right.png"></image>
</view> </view>
</view> </view>
<house-graph houseId="{{houseId}}" houseName="{{houseName}}"></house-graph> <house-graph houseId="{{houseId}}" bind:clickGraphNode="clickGraphNode" ></house-graph>
</view> </view>
<view class="card"> <view class="card">

Loading…
Cancel
Save