Browse Source

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

dongming
mk 5 months ago
parent
commit
a6a8aa11b3
  1. 28
      components/custom-tab-bar/index.js
  2. 13
      pages/index/index.wxml
  3. 37
      pages/index/index.wxss
  4. 5
      pages/resiAndHouse/resiAndHouse.js

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

@ -32,15 +32,6 @@ Component({
show: true
},
{
"pagePath": "/pages/statistics/statistics",
"text": "数据",
"iconPath": "/images/home/information.png",
"selectedIconPath": "/images/home/informationSelected.png",
show: true
},
{
"pagePath": "/pages/mine/mine",
"text": "我的",
@ -53,26 +44,7 @@ Component({
attached() {
},
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: {
switchTab(e) {

13
pages/index/index.wxml

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

37
pages/index/index.wxss

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

5
pages/resiAndHouse/resiAndHouse.js

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

Loading…
Cancel
Save