yunshangxie/pages/index/tissue.vue

119 lines
3.1 KiB
Vue
Raw Normal View History

2024-04-20 14:58:10 +08:00
<template>
2024-05-08 18:14:41 +08:00
<view style="letter-spacing: 1rpx;background-color: #F2F2F2;min-height: 100vh;">
2024-04-20 14:58:10 +08:00
<tn-nav-bar :isBack="false" backTitle="" :bottomShadow="true" backgroundColor="#FFFFFF">
<view class="custom-nav tn-flex tn-flex-col-center tn-flex-row-left">
<view style="padding-left: 15rpx;" @click="goBack()">
<text class="tn-icon-left" style="font-size: 40rpx;"></text>
</view>
<view class="tn-margin-top"
style=";text-shadow: 1rpx 0 0 #FFF, 0 1rpx 0 #FFF, -1rpx 0 0 #FFF , 0 -1rpx 0 #FFF;">
<tn-tabs :list="[{name:'组织架构'}]" :current="topCurrent" activeColor="#000" :bold="false"
:fontSize="36"></tn-tabs>
</view>
</view>
</tn-nav-bar>
2024-05-08 18:14:41 +08:00
<view :style="{paddingTop: vuex_custom_bar_height+ 'px',}">
<view style="position: fixed;width: 100%;background-color: #F2F2F2;z-index: 1;">
<tn-tabs :list="list" :isScroll="false" :current="current" name="name" activeColor="#000000"
:activeItemStyle="{backgroundColor:'#ffffff'}" :showBar='false' @change="change"></tn-tabs>
</view>
<view style="padding: 30rpx;text-align: center;padding-top: 94rpx;">
<template v-for="(item, index) in architecture">
<tn-button backgroundColor="#ffffff" height="50rpx"
fontColor="#000000">{{item.position_name}}</tn-button>
<tn-grid align="center" col="5" hoverClass="none">
<tn-grid-item v-if="item.neirong" style="width:20%" v-for="(v,i) in item.neirong"
2024-06-26 14:17:06 +08:00
@click="openInfo('/pages/packageA/user/my_card?id='+v.member_id)">
2024-05-08 18:14:41 +08:00
<view style="padding: 30rpx;">
<image :src="apiImgUrl+v.photo_image"
style="width: 100rpx;height: 100rpx;border-radius: 50%;">
</image>
<view>{{v.nikename}}</view>
</view>
</tn-grid-item>
<tn-grid-item v-if="!item.neirong" style="width:20%">
<view style="padding: 30rpx;">
<view>暂无</view>
</view>
</tn-grid-item>
</tn-grid>
</template>
2024-04-20 14:58:10 +08:00
</view>
</view>
</view>
</template>
<script>
2024-05-08 18:14:41 +08:00
import {
architectureList
} from "@/util/api";
import store from "@/store";
2024-04-24 17:34:38 +08:00
2024-05-08 18:14:41 +08:00
export default {
2024-04-20 14:58:10 +08:00
data() {
return {
2024-04-24 17:34:38 +08:00
topCurrent: 0,
2024-05-08 18:14:41 +08:00
architecture: [],
apiImgUrl: this.$store.state.imgUrl,
current: 0,
list: [{
name: '理事会'
}, {
name: '监事会'
}],
type: 1
2024-04-20 14:58:10 +08:00
}
},
2024-05-08 18:14:41 +08:00
onLoad(d) {
this.getArchitectureList();
},
2024-04-20 14:58:10 +08:00
methods: {
2024-05-08 18:14:41 +08:00
openInfo(u) {
uni.navigateTo({
url: u
})
},
getArchitectureList() {
architectureList({
association_id: store.state.Gid,
type: this.type,
})
.then(res => {
console.log(res);
if (res.code == 1) {
this.architecture = res.data;
}
})
.catch(error => {
uni.showToast({
title: error,
icon: 'none',
duration: 2000
});
})
},
2024-04-20 14:58:10 +08:00
goBack() {
if (getCurrentPages().length > 1) {
uni.navigateBack()
} else {
uni.redirectTo({
url: '/pages/index/index'
})
}
2024-05-08 18:14:41 +08:00
},
change(index) {
this.current = index;
this.type = index + 1;
2024-05-14 10:20:09 +08:00
this.architecture = [];
2024-05-08 18:14:41 +08:00
this.getArchitectureList();
2024-04-20 14:58:10 +08:00
}
}
}
</script>
<style>
2024-06-26 14:17:06 +08:00
</style>