linwe
2024-08-08 3c738f4fe2762bba8087e5a22fc0dc06560eab0e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
<template>
    <view class="">
        <!-- <view class="tab">
            <u-tabs :list="tabList" :current="tabIndex" @click="changeTab" :inactiveStyle="{color:'#999999'}"
                :activeStyle="{color:'#017BFC'}"></u-tabs>
        </view> -->
 
        <view class="grid flex flex-wrap bgc-ff">
            <view class="grid-item flex f-d-c a-i-c j-c-c" v-for="i in gridList">
                <!-- <text class="mb-20 f-28"></text> -->
                <u-image v-if="i.picUrl" :src="i.picUrl" width="100" height="100"></u-image>
                <u-image v-else src="/static/icon/user-01.png" width="100" height="100"></u-image>
                <text class="mt-20">{{i.gridmanName}}</text>
                <text class="c-99 f-26">{{i.mobile}}</text>
            </view>
        </view>
 
        <view class="detail bgc-ff">
            <caption-row title="网格基本情况" />
            <view class="detail-content f-28">
                <text v-for="i in houseList" v-if="i.aoiName">{{i.aoiName?i.aoiName:''}} {{i.buildingName|| ""}} </text>
            </view>
        </view>
 
        <view class="comment" v-if="false">
            <caption-row title="留言" />
            <view class="comment-list ">
                <view class="comment-item flex " v-for="(item,index) in commentList" :key="index">
                    <u-avatar size="45" src="/static/icon/user-01.png"></u-avatar>
                    <view class="comment-item-content">
                        <view class="flex j-c-s-b a-i-c mb-20">
                            <text class="f-28 c-99">{{item.name}}</text>
                            <text class="c-99 f-24">{{item.createTime}}</text>
                        </view>
                        <view class="f-30">
                            {{item.content}}
                        </view>
                    </view>
                </view>
            </view>
        </view>
        <!-- <view class="footer">
            <u-search searchIcon='edit-pen' :animation="true" placeholder="写评论" disabled
                @click="navToComment"></u-search>
        </view> -->
    </view>
</template>
 
<script>
    import captionRow from "@/components/caption/caption.vue"
    import {
        getGridDetail
    } from "@/api/grid/grid.js"
    export default {
        components: {
            captionRow
        },
        data() {
            return {
                gridList: [],
                houseList: [],
                commentList: []
            }
        },
 
        onLoad(option) {
            if (option.from) {
                uni.setNavigationBarTitle({
                    title: "我的网格"
                })
            }
            this.getDetailInfo()
        },
 
        methods: {
 
            getDetailInfo() {
                getGridDetail({
                    houseCode: uni.getStorageSync("siteInfo").houseCode
                }).then(res => {
                    console.log(res)
                    this.houseList = res.data.doorplateAddress;
                    this.gridList = res.data.grid;
                })
            },
 
            navToComment() {
                uni.navigateTo({
                    url: `comment?id=${this.params.id}`
                })
            }
        }
    }
</script>
 
<style lang="scss">
    page {
        background-color: #F5F5F5;
    }
 
    .tab {
        width: 100%;
        height: 88rpx;
        position: fixed;
        /*#ifdef H5*/
        top: 88rpx;
        /*#endif*/
        /*#ifdef MP-WEIXIN*/
        top: 0;
        /*#endif*/
        left: 0;
        background-color: #fff;
        padding: 0 30rpx;
        box-sizing: border-box;
        z-index: 999;
 
    }
 
    .grid {
        width: 100%;
        padding: 20rpx;
        box-sizing: border-box;
 
        .grid-item {
            width: 32.8%;
            padding: 20rpx 0;
            // border:1px solid #333;
        }
    }
 
    .detail {
        padding: 0 30rpx;
        margin: 40rpx 0 20rpx;
 
        .detail-content {
            padding: 20rpx 0;
            text-indent: 2em;
        }
    }
 
    .comment {
        width: 100%;
        padding: 0 30rpx 160rpx;
        box-sizing: border-box;
    }
 
    .comment-list {
        width: 100%;
        padding-top: 20rpx;
 
        .comment-item {
            width: 100%;
            padding: 20rpx 0;
        }
 
        .comment-item-content {
            flex: 1;
            margin-left: 20rpx;
        }
    }
 
    .footer {
        width: 100%;
        padding: 20rpx 30rpx;
        box-sizing: border-box;
        background-color: #fff;
        position: fixed;
        bottom: 0;
        left: 0;
        z-index: 10;
        border-top: 1px solid #f5f5f5;
    }
</style>