shuishen
2024-01-22 3835cf1ca8d5ac8475052d3876ebeb4a2c4160f1
src/views/wel/index.vue
@@ -4,25 +4,10 @@
            <span class="h1">{{ webTitle }}</span>
            <span class="h2"></span>
        </div>
        <div class="homeL-bar">
            <div class="outS" @click="down1">
                <div class="down1"><span>住户管理</span></div>
            </div>
            <div class="outS" @click="down2">
                <div class="down2"><span>房屋管理</span></div>
            </div>
            <div class="outS" @click="down3">
                <div class="down3"><span>E呼即办</span></div>
            </div>
            <div class="outS" @click="down4">
                <div class="down4"><span>报事报修</span></div>
            </div>
            <div class="outS" @click="down5">
                <div class="down5"><span>走访日志</span></div>
            </div>
            <div class="outS" @click="down6"
                v-show="globalUserInfo.role_name == 'administrator' || globalUserInfo.role_name.split(',').find(item => item == 'admin')">
                <div class="down6"><span>驾驶舱</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>
@@ -39,29 +24,106 @@
            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: '/task/reportForRepairs',
                    title: '报事报修',
                    newOpen: false,
                },
                {
                    imageUrl: 'img/tongji.png',
                    url: '/cGovernance/gridWorkLog',
                    title: '走访日志',
                    newOpen: false,
                }
            ]
            if (this.globalUserInfo.role_name == 'administrator' || 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: {
        down1 () {
            this.$router.push({ path: "/userHouse/houseHoldList" })
        },
        down2 () {
            this.$router.push({ path: "/userHouse/houseList" })
        },
        down3 () {
            this.$router.push({ path: "/cGovernance/taskECall" })
        },
        down4 () {
            this.$router.push({ path: "/task/reportForRepairs" })
        },
        down5 () {
            this.$router.push({ path: "/cGovernance/gridWorkLog" })
        },
        down6 () {
            let token = 'bearer ' + getToken()
            window.open(`http://srgdjczzxtpt.com:2181/uniform-auth/login?app=app_smart_aoi&Blade-Auth=${token}`)
        },
        openMenu (data, flag = false) {
            if (flag) {
                window.open(data.url)
            } else {
                this.$router.push({ path: data.url })
            }
        }
    },
    mouted () { },
}
@@ -118,64 +180,35 @@
            height: 94.6%;
            display: flex;
            justify-content: center;
        }
        .down1,
        .down2,
        .down3,
        .down4,
        .down5,
        .down6 {
            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;
            &>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;
                &: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);
                }
            }
            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);
            }
        }
        .down1 {
            background-image: url("../../../public/img/yijianbaoj.png");
        }
        .down2 {
            background-image: url("../../../public/img/fangyi.png");
        }
        .down3 {
            background-image: url("../../../public/img/anjian.png");
        }
        .down4 {
            background-image: url("../../../public/img/tiwen.png");
        }
        .down5 {
            background-image: url("../../../public/img/tongji.png");
        }
        .down6 {
            background-image: url("../../../public/img/jsc.png");
        }
    }
}