叶松
2023-11-13 19d173ea725300ee6422ec6ef9573433da94d052
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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
<!-- 入厂审核 -->
<template>
    <view class="home_index">
        <view class="home_content">
            <u-navbar
                title="智慧工厂"
                bgColor="transparent"
                leftIconColor="transparent"
                titleStyle="text-align:left;width:100%;margin-left:25rpx;color:#fff"
                :autoBack="true">
            </u-navbar>
            <view class="home_top_bg"></view>
            <view class="home_header">
                <view class="home_header_left">
                    <u-image src="@/static/agvor.png" width="150rpx" height="150rpx"></u-image>
                </view>
                <view class="home_header_right">
                    <view class="home_header_right_item">
                        <view class="home_header_right_title">{{realName}}</view>
                    </view>
                    <view class="home_header_right_datas">
                        <view class="home_header_datas_text">岗位:</view>
                        <view class="home_header_datas_text">{{works}}</view>
                    </view>
                    <view class="home_header_right_last">
                        <view class="home_header_last_text">部门:</view>
                        <view class="home_header_last_text">{{departName}}</view>
                    </view>
                </view>
            </view>
            <view class="home_main_btns">
                <view class="users_btns" v-for="items in menuLists" :key="items.tagId">
                    <view class="users_title">{{items.tagName}}</view>
                    <view class="users_content">
                        <view class="users_menu" v-for="(userItem,userIndex) in items.menuList" :key="userIndex">
                            <view class="users_menu_icons" @click="btnClick(userItem)">
                                <u-image :src="`https://pipe.thhy-tj.com/${userItem.menuIcon}`" width="128rpx" height="128rpx"></u-image>
                            </view>
                            <view class="users_menu_text">{{userItem.menuName}}</view>
                        </view>
                    </view>
                </view>
            </view>
        </view>
    </view>
</template>
 
<script>
    export default {
        data(){
            return{
                menuLists:uni.getStorageSync('menus'),
                realName:uni.getStorageSync('realName'),
                userType:uni.getStorageSync('userType'),
                works:'',//岗位
                departName:'',//部门
            }
        },
        onLoad() {
            this.showUserInfo()
        },
        methods:{
            //展示用户信息
            showUserInfo(){
                this.$api.system.labourHomeInfo({userType:this.userType}).then(res=>{
                    if(res.statusMsg === 'ok'){
                        this.works = res.data.posName
                        this.departName = res.data.departName === null?'':res.data.departName
                    }else{
                        uni.$u.toast(res.statusMsg);
                    }
                })
            },
            //点击图标跳转
            btnClick(val){
                uni.navigateTo({
                    url: `${val.menuUrl}`
                })
                //     case 'device1':钢筋管理
                //         uni.navigateTo({
                //             url: '../../robePages/goodDevices/rebarManage'
                //         })
                //         break;
            }
        }
    }
</script>
 
<style scoped lang="scss">
    .home_index{
        background-color: #F8F8F8;
        height: 100vh;
        position: relative;
        .home_content{
            // height: calc(100vh - 110rpx);
            .home_top_bg{
                background: url('https://s1.ax1x.com/2022/09/14/vvBuYq.png') no-repeat;
                background-size: 100% 100%;
                height: 40vh;
                position: absolute;
                left: 0;
                top: 0;
                right: 0;
            }
            .home_header{
                height: 20vh;
                position: absolute;
                top: 150rpx;
                left:0rpx;
                right: 0rpx;
                margin: 0rpx 20rpx;
                display: flex;
                align-items: center;
                
                .home_header_left{
                    width: 150rpx;
                }
                .home_header_right{
                    width: calc(100% - 150rpx);
                    margin-left: 40rpx;
                    margin-top: -20rpx;
                    
                    .home_header_right_item{
                        display: flex;
                        justify-content: space-between;
                        
                        .home_header_right_title{
                            color: #F3F8FF;
                            font-size: 16px;
                        }
                    }
                    .home_header_right_datas{
                        margin-top: 16px;
                        display: flex;
                        .home_header_datas_text{
                            flex: none;
                            color: #F3F8FF;
                            font-size: 16px;
                        }
                    }
                    .home_header_right_last{
                        margin-top: 16px;
                        display: flex;
                        .home_header_last_text{
                            flex: none;
                            color: #F3F8FF;
                            font-size: 16px;
                        }
                    }
                }
            }
            .home_main_btns{
                height: calc(100% - 25vh);
                // height: 100%;
                overflow-y: auto;
                margin: 0rpx 20rpx;
                // background-color: seagreen;
                position: absolute;
                top: 420rpx;
                left:0rpx;
                right: 0rpx;
                
                .data_board_btns{
                    height: 25vh;
                    border-radius: 10rpx;
                    margin-bottom: 20rpx;
                    background-color: #FFFFFF;
                    .data_board_title{
                        height: 8vh;
                        display: flex;
                        align-items: center;
                        padding-left: 50rpx;
                        border-bottom: 1px solid #F6F6F6;
                        position: relative;
                        font-size: 17px;
                        &::before{
                            content: '';
                            position: absolute;
                            top: 43rpx;
                            left: 28rpx;
                            width: 8rpx;
                            height: 48rpx;
                            background-color: #1976FF;
                        }
                    }
                    .data_board_content{
                        display: flex;
                        align-items: center;
                        justify-content: space-around;
                        max-width: 100%;
                        height: calc(100% - 110rpx);
                        overflow: auto;
                        .data_board_menu{
                            max-width: calc(100%/4 - 45rpx);
                            padding-left: 20rpx;
                            display: flex;
                            justify-content: center;
                            align-items: center;
                            flex-direction: column;
                            .data_board_menu_icons{
                                width: 225rpx;
                                margin: 0 auto;
                            }
                            .data_board_menu_text{
                                width: 225rpx;
                                padding-top: 10rpx;
                                color: #404040;
                                font-size: 15px;
                                padding-left: 96rpx;
                            }
                        }
                    }
                }
                .users_btns{
                    // height: 40vh;
                    border-radius: 10rpx;
                    margin-bottom: 20rpx;
                    background-color: #FFFFFF;
                    &:nth-child(3){
                        .users_content{
                            .users_menu{
                                // margin-left: -30px;
                            }
                        }
                    }
                    .users_title{
                        height: 8vh;
                        display: flex;
                        align-items: center;
                        padding-left: 50rpx;
                        border-bottom: 1px solid #F6F6F6;
                        position: relative;
                        font-size: 17px;
                        &::before{
                            content: '';
                            position: absolute;
                            top: 43rpx;
                            left: 28rpx;
                            width: 8rpx;
                            height: 48rpx;
                            background-color: #1976FF;
                        }
                    }
                    .users_content{
                        padding: 15px 0 0;
                        display: flex;
                        align-items: center;
                        // justify-content: space-around;
                        max-width: 100%;
                        height: calc(100% - 110rpx);
                        flex-wrap: wrap;
                        overflow: auto;
                        &:after{
                            content: "";
                            flex:0 0 328rpx;
                        }
                        .users_menu{
                            max-width: calc(100%/4 - 45rpx);
                            padding-left: 20rpx;
                            padding-right: 13px;
                            display: flex;
                            justify-content: center;
                            align-items: center;
                            flex-direction: column;
                            margin-bottom: 15px;
                            .users_menu_icons{
                                width: 225rpx;
                                margin: 0 auto;
                                margin-left: 3px;
                            }
                            .users_menu_text{
                                width: 225rpx;
                                padding-top: 10rpx;
                                color: #404040;
                                font-size: 13px;
                                text-align: center;
                                // padding-left: 96rpx;
                            }
                        }
                    }
                }
            }
        }
    }
</style>