picasso před 3 roky
rodič
revize
af1a31cd69

+ 1 - 1
src/views/heatingDistrict/heatingDistrictManage/children/resident/index.vue

@@ -129,7 +129,7 @@ export default defineComponent({
 		}
 		// 打开新增修改弹窗
 		const onOpenDialog = (row: any) => {
-			editDicRef.value.openDialog(row, { organizationId: prop.organizationId, floorId: prop.floorId });
+			editDicRef.value.openDialog(row, { organizationId: prop.organizationId, plotId: prop.plotId, floorId: prop.floorId, unitId: prop.unitId });
 		};
 		
 		// 状态修改

+ 1 - 3
src/views/heatingDistrict/heatingDistrictManage/children/unit/index.vue

@@ -125,9 +125,7 @@ export default defineComponent({
 		}
 		// 打开新增修改弹窗
 		const onOpenDialog = (row: any) => {
-			// editDicRef.value.orgList = orgList.value
-			// editDicRef.value.plotList = plotList.value
-			editDicRef.value.openDialog(row, { organizationId: prop.organizationId, floorId: prop.floorId });
+			editDicRef.value.openDialog(row, { organizationId: prop.organizationId, plotId: prop.plotId, floorId: prop.floorId });
 		};
 		
 		// 状态修改

+ 9 - 3
src/views/heatingDistrict/heatingDistrictManage/index.vue

@@ -25,9 +25,9 @@
 			<!-- 楼宇 -->
 			<Floor v-else-if="curNode.orgType === 'plot'" :organizationId="curNode.organizationId" :plotId="curNode.id"/>
 			<!-- 单元 -->
-			<Unit v-else-if="curNode.orgType === 'floor'" :organizationId="curNode.organizationId" :floorId="curNode.id"/>
+			<Unit v-else-if="curNode.orgType === 'floor'" :organizationId="curNode.organizationId" :plotId="curNode.plotId" :floorId="curNode.id"/>
 			<!-- 住户 -->
-			<Resident v-else-if="curNode.orgType === 'unit'" :organizationId="curNode.organizationId" :unitId="curNode.id"/>
+			<Resident v-else-if="curNode.orgType === 'unit'" :organizationId="curNode.organizationId" :plotId="curNode.plotId" :floorId="curNode.floorId" :unitId="curNode.id"/>
 		</div>
   </div>
 </template>
@@ -64,8 +64,14 @@ export default defineComponent({
 		}
 		const onNodeClick = (data: any, node: any) => {
 			console.log(data)
+			console.log(node)
+			if (data.orgType === 'floor') {
+				data.plotId = node.parent.data.id
+			} else if (data.orgType === 'unit') {
+				data.floorId = node.parent.data.id
+				data.plotId = node.parent.parent.data.id
+			}
 			state.curNode = data
-			// console.log(node)
 		}
 
 		// 页面加载时