shuishen
2024-03-23 56db45198587ff6d9c4c0dd7fb9d16a2fb2eff47
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
<template>
    <div id="homeL">
        <div class="homeL-up">
            <span class="h1">{{ webTitle }}</span>
            <span class="h2"></span>
        </div>
        <div class="homeL-bar" v-if="homeMenuData.length">
            <div class="outS" v-for="(item, index) in homeMenuData" :key="index" @click="openMenu(item, item.newOpen)">
                <div :style="{ backgroundImage: `url(${publicPath + item.imageUrl})` }"><span>{{ item.title }}</span>
                </div>
            </div>
        </div>
    </div>
</template>
 
<script>
import { getToken } from '@/util/auth'
import { getStore } from "@/util/store"
 
export default {
    data () {
        return {
            webTitle: getStore({ name: "webTitle" }),
            webType: getStore({ name: "webType" }),
            a: 1,
            globalUserInfo: getStore({ name: "userInfo" }),
 
            publicPath: process.env.BASE_URL,
            homeMenuData: []
        }
    },
 
    created () {
        if (this.webType == 'secend') {
            // 住建局
            // if (this.globalUserInfo.role_name == 'zjj') {
            //     this.homeMenuData = [
            //         {
            //             imageUrl: 'img/yijianbaoj.png',
            //             url: '/propertySupervision/residentSupervision',
            //             title: '居民监管',
            //             newOpen: false,
            //         },
            //         {
            //             imageUrl: 'img/yijianbaoj.png',
            //             url: '/propertySupervision/houseHoldSupervision',
            //             title: '住房监管',
            //             newOpen: false,
            //         },
            //         {
            //             imageUrl: 'img/yijianbaoj.png',
            //             url: '/propertySupervision/ownersCommittee',
            //             title: '业主大会',
            //             newOpen: false,
            //         },
            //         {
            //             imageUrl: 'img/yijianbaoj.png',
            //             url: '/propertySupervision/propertyCapitalManage',
            //             title: '维修基金管理',
            //             newOpen: false,
            //         },
            //     ]
            // } else {
            //     // 物业
            //     this.homeMenuData = [
            //         {
            //             imageUrl: 'img/yijianbaoj.png',
            //             url: '/userHouse/houseHoldList',
            //             title: '住户管理',
            //             newOpen: false,
            //         },
            //     ]
            // }
        } else {
            this.homeMenuData = [
                {
                    imageUrl: 'img/yijianbaoj.png',
                    url: '/userHouse/houseHoldList',
                    title: '住户管理',
                    newOpen: false,
                },
                {
                    imageUrl: 'img/fangyi.png',
                    url: '/userHouse/houseList',
                    title: '房屋管理',
                    newOpen: false,
                },
                {
                    imageUrl: 'img/anjian.png',
                    url: '/cGovernance/taskECall',
                    title: 'E呼即办',
                    newOpen: false,
                },
                {
                    imageUrl: 'img/tiwen.png',
                    url: '/cGovernance/reportForRepairs',
                    title: '报事报修',
                    newOpen: false,
                },
                {
                    imageUrl: 'img/tongji.png',
                    url: '/cGovernance/gridWorkLog',
                    title: '走访日志',
                    newOpen: false,
                }
            ]
 
            if (this.globalUserInfo.role_name == 'administrator' ||
                this.globalUserInfo.role_name.indexOf('jdgly') != -1 ||
                this.globalUserInfo.role_name.indexOf('sqgly') != -1 ||
                this.globalUserInfo.role_name.split(',').find(item => item == 'admin')) {
                this.homeMenuData.push({
                    imageUrl: 'img/jsc.png',
                    url: `http://srgdjczzxtpt.com:2181/uniform-auth/login?app=app_smart_aoi&Blade-Auth=bearer ${getToken()}`,
                    title: '驾驶舱',
                    newOpen: true,
                })
            }
        }
    },
 
    methods: {
        openMenu (data, flag = false) {
            if (flag) {
                window.open(data.url)
            } else {
                this.$router.push({ path: data.url })
            }
        }
    },
    mouted () { },
}
</script>
 
<style lang="scss">
#homeL {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 96.6%;
 
    //   border: 1px solid #000;
    .homeL-up {
        width: 100%;
        height: 74%;
        // border: 1px solid rgb(39, 164, 185);
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        background-image: url("../../../public/img/bjkeji.png");
        background-color: #fff;
        background-repeat: no-repeat;
        background-size: 100% 100%;
        -moz-background-size: 100% 100%;
        color: #4BA3FE;
 
        .h1,
        .h2 {
            position: relative;
            left: 22%;
        }
 
        .h1 {
            font-size: 54px;
        }
 
        .h2 {
            font-size: 28px;
        }
    }
 
    .homeL-bar {
        height: 0;
        flex: 1;
        width: 100%;
        display: flex;
        align-items: center;
 
        .outS {
            width: 0;
            flex: 1;
            height: 94.6%;
            display: flex;
            justify-content: center;
 
            &>div {
                width: 96%;
                height: 100%;
                background-repeat: no-repeat;
                background-size: 100% 100%;
                cursor: pointer;
                display: flex;
                align-items: center;
                justify-content: center;
                border-radius: 5px;
 
                &:hover {
                    width: 99%;
                    height: 99%;
                    transition: all 0.3s ease;
                }
 
                span {
                    position: relative;
                    top: -30px;
                    left: -50px;
                    font-weight: 600;
                    font-size: 30px;
                    color: #fff;
                    display: inline-block;
                    // border: 1px solid rgb(180, 22, 75);
                }
            }
        }
    }
}
</style>