Browse Source

隐藏数据模块,查询居民切换时默认选中当前组织

dongming
mk 5 months ago
parent
commit
a6a8aa11b3
  1. 30
      components/custom-tab-bar/index.js
  2. 15
      pages/index/index.wxml
  3. 51
      pages/index/index.wxss
  4. 7
      pages/resiAndHouse/resiAndHouse.js

30
components/custom-tab-bar/index.js

@ -32,15 +32,6 @@ Component({
show: true show: true
}, },
{
"pagePath": "/pages/statistics/statistics",
"text": "数据",
"iconPath": "/images/home/information.png",
"selectedIconPath": "/images/home/informationSelected.png",
show: true
},
{ {
"pagePath": "/pages/mine/mine", "pagePath": "/pages/mine/mine",
"text": "我的", "text": "我的",
@ -53,26 +44,7 @@ Component({
attached() { attached() {
}, },
ready: function () { ready: function () {
this.setData({
selected: app.globalData.selected
})
// secretary 书记 admin 管理员
console.log( app.globalData.roleList.filter(item => item.roleKey === 'secretary'))
if(app.globalData.roleList.length <= 0) {
getStaffbasicinfo().then(res=>{
getOwnedRolesOfStaffId(res.data.id).then(res2 => {
app.globalData.user = res.data
this.setData({
"list[3].show": res2.data.filter(item => item.roleKey === 'secretary' || item.roleKey === 'administrator' || item.roleKey === 'street_secretary').length > 0
})
})
})
} else {
// this.setData({
// "list[3].show": app.globalData.roleList.filter(item => item.roleKey === 'secretary' || item.roleKey === 'administrator' || item.roleKey === 'street_secretary').length > 0
// })
}
}, },
methods: { methods: {
switchTab(e) { switchTab(e) {

15
pages/index/index.wxml

@ -5,15 +5,11 @@
</view> </view>
</view> </view>
<view class="text-wrapper_8"> <view class="text-wrapper_8">
<Tabs tabList="{{tabList}}" bind:tabChange="tabChange" /> <image src="https://elink-esua-epdc.oss-cn-qingdao.aliyuncs.com/epmet/test/internal/20240412/bca77e0435014a4680679c2c77d4fa50.png" class="bg-image"/>
<view class="communityOverview"> <text lines="1" class="text_30">数字化社区平台</text>
<view class="total"> <text lines="1" class="paragraph_1">打造社区工作新模式<br/>用数据提升基层治理与服务水平</text>
<view style="font-size:38rpx;font-weight: 500;">{{resiAndhouseTotal}}</view>
<view style="font-size:28rpx">{{tabValue === 1?'居民总数':'房屋总数'}}</view> </view>
</view>
<ec-canvas id="communityOverview" canvas-id="communityOverview" ec="{{ ec }}"></ec-canvas>
</view>
</view>
<view class="group_1"> <view class="group_1">
<view class="section_1"> <view class="section_1">
<view class="image-text_1" bind:tap="onAddHouseLL"> <view class="image-text_1" bind:tap="onAddHouseLL">
@ -154,5 +150,4 @@
</view> </view>
</view> </view>
</view> </view>
<custom-tab-bar></custom-tab-bar> <custom-tab-bar></custom-tab-bar>

51
pages/index/index.wxss

@ -20,12 +20,12 @@ page {
} }
.back { .back {
width: 30rpx; width: 30rpx;
height: 30rpx; height: 30rpx;
margin-left: 20rpx; margin-left: 20rpx;
margin-top: 20rpx; margin-top: 20rpx;
border-radius: 0rpx; border-radius: 0rpx;
z-index: 101; z-index: 101;
} }
.header .navigation { .header .navigation {
width: 100%; width: 100%;
@ -42,7 +42,7 @@ page {
} }
.header_text_1 { .header_text_1 {
margin-left: 20rpx; margin-left: 20rpx;
margin-top: 12rpx; margin-top: 12rpx;
/* width: 157rpx; /* width: 157rpx;
height: 30rpx; */ height: 30rpx; */
overflow-wrap: break-word; overflow-wrap: break-word;
@ -60,14 +60,11 @@ page {
left: 30rpx; left: 30rpx;
top: -120rpx; top: -120rpx;
width: 690rpx; width: 690rpx;
height: 300rpx;
background-size: 100% 100%; background-size: 100% 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
z-index: 1000; z-index: 1000;
background-color: #ffffff;
padding: 10rpx;
border-radius: 10rpx;
} }
.bg-image{ .bg-image{
position: absolute; position: absolute;
@ -859,7 +856,9 @@ line-height: 40rpx;
/* align-items: center; */ /* align-items: center; */
} }
.right{
}
.bg_new_box{ .bg_new_box{
background: #F9FBFE; background: #F9FBFE;
height: 230rpx; height: 230rpx;
@ -1031,21 +1030,25 @@ line-height: 52rpx;
margin-left: 20rpx; margin-left: 20rpx;
font-size: 32rpx; font-size: 32rpx;
} }
ec-canvas { .movable-area{
pointer-events:none;
z-index: 100;
width: 100%; width: 100%;
height: 100%; height: 100%;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
} }
.total{ .movable-view{
width: 30%; pointer-events:auto;
height: 318rpx; height: 50px;
display: flex; width: 50px;
flex-direction: column;
justify-content: center;
align-items: center;
} }
.communityOverview { .image-wrapper{
width: 100%; width: 190rpx;
height: 318rpx; height: 190rpx;
display: flex;
box-sizing: border-box;
} }

7
pages/resiAndHouse/resiAndHouse.js

@ -261,7 +261,6 @@ Page({
angencyFwList: [{ ...res.data, children: arr }], angencyFwList: [{ ...res.data, children: arr }],
angencyJmList:[{ ...res.data, children: arr }] angencyJmList:[{ ...res.data, children: arr }]
}) })
console.log(this.data.angencyFwList);
}) })
}, },
getTreeFun(id, arr, data) { getTreeFun(id, arr, data) {
@ -417,9 +416,13 @@ Page({
this.setData({ this.setData({
showAngenCascader: true showAngenCascader: true
}) })
this.onChangeJm({detail:{
value:this.data.angencyJmList[0].id,
selectedOptions:this.data.angencyJmList
}})
}, },
handelClickShowTreeFw() { handelClickShowTreeFw() {
this.setData({ this.setData({
showFw: true showFw: true
}) })
}, },

Loading…
Cancel
Save