From ba68990fbac11dea58a34a47cbf68aef08010d1b Mon Sep 17 00:00:00 2001 From: mk <2403457699@qq.com> Date: Tue, 16 Apr 2024 15:48:20 +0800 Subject: [PATCH] =?UTF-8?q?=E9=AB=98=E5=BA=A6,=E6=A0=B7=E5=BC=8F=E5=BE=AE?= =?UTF-8?q?=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index/index.wxss | 14 ++++---- pages/resiAndHouse/resiAndHouse.js | 52 ++++++++++++++++++++++++---- pages/resiAndHouse/resiAndHouse.wxss | 4 +-- pages/work2/work2.wxml | 1 - 4 files changed, 55 insertions(+), 16 deletions(-) diff --git a/pages/index/index.wxss b/pages/index/index.wxss index 2712379..aa9e704 100644 --- a/pages/index/index.wxss +++ b/pages/index/index.wxss @@ -964,13 +964,13 @@ width: 490rpx; height: auto; font-family: PingFang SC; - font-weight: 500; -font-size: 32rpx; -color: #333333; -line-height: 32rpx; -overflow: hidden; -text-overflow: ellipsis; -white-space: nowrap; + /* font-weight: 500; */ + font-size: 32rpx; + color: #333333; + line-height: 32rpx; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; } .Information_test2{ width: 60rpx; diff --git a/pages/resiAndHouse/resiAndHouse.js b/pages/resiAndHouse/resiAndHouse.js index 754e3bd..b2f558d 100644 --- a/pages/resiAndHouse/resiAndHouse.js +++ b/pages/resiAndHouse/resiAndHouse.js @@ -6,7 +6,7 @@ import api, { getNextTree, houseSearch, allOrgHouseInfo, - getCommunityHouse + getCommunityHouse, } from "../../utils/api" Page({ @@ -82,12 +82,13 @@ Page({ { name: '出租', num: 0, value: '1' }, { name: '闲置', num: 0, value: '2' }, { name: '未出售', num: 0, value: '3' }, - ] + ], + tempList:[] }, /** * 生命周期函数--监听页面加载 */ - onLoad(options) { + onLoad(options) { this.setData({ searchOrgIdPath: App.globalData.user.agencyId, cascaderName: App.globalData.user.agencyName, @@ -157,6 +158,45 @@ Page({ */ onShareAppMessage() { + }, + getUnitoption(val){ + getNextTree({ level:val[0].level, id: val[0].id ||val[0].agencyId}).then(res => { + if (res.data.length > 0) { + if(res.data[0].level!='unit' ||res.data[0].level=='unit' ){ + this.setData({ + tempList:this.data.tempList.concat([res.data[0]]) + }) + this.getUnitoption(res.data) + } + let unitId = this.data.tempList.filter(item=>item.level == 'unit')[0].id + this.setData({ + cascaderNameFw:this.data.tempList.map(item=>item.label).join(','), + 'params1.searchOrgIdPath':unitId, + 'params.orgId':unitId + }) + const data = res.data.map(item => { + if (item.level != 'unit') { + return { + ...item, + children: [] + } + } + return { + ...item, + children: null + } + }); + const arr = this.getTreeFun(val[0].agencyId, this.data.angencyFwList, data); + this.setData({ + angencyFwList: arr, + }) + } else { + const arr = this.getTreeFun(val[0].agencyId, this.data.angencyFwList, null); + this.setData({ + angencyFwList: arr, + }) + } + }) }, toOCRCard() { wx.navigateTo({ @@ -311,10 +351,10 @@ Page({ }) }, // 组织树 - getAgencygridtree() { - + getAgencygridtree () { api.getAgencygridtree().then(res => { - this.setData({ + this.getUnitoption( [res.data]) + this.setData({ angencyList: [res.data], }) }).catch(err => { diff --git a/pages/resiAndHouse/resiAndHouse.wxss b/pages/resiAndHouse/resiAndHouse.wxss index 633cf7f..1062119 100644 --- a/pages/resiAndHouse/resiAndHouse.wxss +++ b/pages/resiAndHouse/resiAndHouse.wxss @@ -1261,7 +1261,7 @@ page { } .scroll { - height: calc(100vh - 750rpx); + height: calc(100vh - 687rpx); } .text_61 { @@ -1394,7 +1394,7 @@ page { font-size: 24rpx; } .resi_tag view{ - padding: 7rpx 9rpx; + padding: 1rpx 9rpx; box-sizing: border-box; white-space:nowrap; margin-right:5rpx; diff --git a/pages/work2/work2.wxml b/pages/work2/work2.wxml index 001888b..1e01914 100644 --- a/pages/work2/work2.wxml +++ b/pages/work2/work2.wxml @@ -8,7 +8,6 @@ -