123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209 |
- <template>
- <view class="content">
- <view class="section_1">
- <view class="tab">
- <view class="title" @click="change_active(1)" :class="active==1?'active':''">机关部室</view>
- <view class="title" @click="change_active(2)" :class="active==2?'active':''">基层区队</view>
- </view>
- <view class="list">
- <view class="item" v-for="(item,index) in list.children" :key="index" @click="go_record(item)">
- {{item.title}}
- </view>
- </view>
- </view>
- <!-- 图片链接 -->
- <view class="section_2">
- <view class="list">
- <view class="item" v-for="(item,index) in list_3.children" :key="index" @click="go_record(item)">
- <image :src="item.thumb" mode=""></image>
- </view>
- </view>
- </view>
- <!-- 快速通道 -->
- <view class="section_3">
- <view class="title">快速通道</view>
- <view class="list">
- <view class="item" v-for="(item,index) in list_4.children" :key="index" @click="go_record(item)">
- <image :src="item.thumb" mode=""></image>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- import {goToLink} from "@/common/common.js"
-
- export default {
- name: "t-i-jinjiaqu",
- props: [
- "mine_code",
- "home_link"
- ],
- data() {
- return {
- active: 1,
- list: [],
- list_1: [],
- list_2: [],
- // 图片链接
- list_3: [],
- // 快速通道
- list_4: []
- };
- },
- mounted() {
- this.get_home_link()
- },
- methods: {
- change_active(item) {
- this.active = item
- if (item == 1) {
- this.list = this.list_1
- } else if (item == 2) {
- this.list = this.list_2
- }
- },
- get_home_link() {
- setTimeout(()=>{
- // 机关部室
- this.list = this.home_link[0]
- this.list_1 = this.home_link[0]
- // 基层区队
- this.list_2 = this.home_link[1]
-
- // 图片链接
- this.list_3 = this.home_link[3]
- // 快速通道
- this.list_4 = this.home_link[2]
- },1000)
- },
- go_record(item) {
- goToLink(item,this.mine_code)
- }
- }
- }
- </script>
- <style lang="scss">
- .content {
- margin-top: 20rpx;
- background-color: #FFFFFF;
- }
- .section_1 {
- box-sizing: border-box;
- padding: 25rpx;
- .tab {
- display: flex;
- justify-content: space-around;
- .title {
- line-height: 80rpx;
- font-weight: 700;
- }
- .active {
- color: #009fe8;
- border-bottom: 6rpx solid #009fe8;
- }
- }
- .list {
- margin-top: 30rpx;
- overflow: hidden;
- .item {
- float: left;
- margin-right: 20rpx;
- margin-bottom: 30rpx;
- width: 160rpx;
- box-sizing: border-box;
- border: 2rpx solid #009fe8;
- border-radius: 20rpx;
- font-size: 28rpx;
- line-height: 70rpx;
- //超过一行省略号
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- padding: 0 10rpx;
- background-color: #66C7F218;
- color: #009FE8;
- text-align: center;
- }
- .item:nth-child(4n) {
- margin-right: 0;
- }
- }
- }
- .section_2 {
- box-sizing: border-box;
- padding: 0 25rpx;
- .list {
- display: flex;
- flex-wrap: wrap;
- justify-content: space-between;
- .item {
- margin-bottom: 20rpx;
- width: 340rpx;
- height: 180rpx;
- border-radius: 20rpx;
- overflow: hidden;
- image {
- width: 340rpx;
- height: 180rpx;
- }
- }
- }
- }
- .section_3 {
- box-sizing: border-box;
- padding: 0 25rpx;
- .title {
- line-height: 120rpx;
- font-size: 36rpx;
- }
- .list {
- display: flex;
- flex-wrap: wrap;
- justify-content: space-between;
- .item {
- margin-bottom: 20rpx;
- width: 340rpx;
- height: 220rpx;
- border-radius: 20rpx;
- overflow: hidden;
- image {
- width: 340rpx;
- height: 220rpx;
- }
- }
- }
- }
- </style>
|