lct
Your Name
2022-08-20 52cdea9a329e0835fc30ef8c3ebb7263658cf38d
src/views/newHome/index.vue
@@ -1,11 +1,7 @@
<template>
    <div class="login-container" :key="once">
        <div class="topPanel">
        </div>
        <div class="topPanelBg">
        </div>
        <div class="topPanel"></div>
        <div class="topPanelBg"></div>
        <div class="topPanelCont">
            <div class="topLogo">
                <img src="../../assets/newMenu/toplogo.png" />
@@ -22,14 +18,10 @@
                </div>
            </div>
        </div>
        <div class="leftCont">
        </div>
        <div class="leftCont"></div>
        <div class="topCont">
            <div class="topInfo">
                <div class="topTit">
                    新疆国泰新华<br/>安全风险预警监测系统
                </div>
                <div class="topTit">新疆国泰新华<br />安全风险预警监测系统</div>
                <div class="topTime">
                    <div class="time">
                        {{time}}
@@ -37,13 +29,14 @@
                    <span></span>
                    <div class="today">
                        <div>{{date}}</div>
                        <div><span>{{weekDay}}</span><span>{{dayTime}}</span></div>
                        <div>
                            <span>{{ weekDay }}</span
                            ><span>{{ dayTime }}</span>
                    </div>
                </div>
            </div>
            <div class="line">
            </div>
            <div class="line"></div>
        </div>
        <div class="menuGrid">
            <div class="gridCont">
@@ -129,7 +122,7 @@
                    </div>
                    <img class="bgImg" src="../../assets/newMenu/card-5.png" />
                </div>
                <div class="grid-content cont-bg-2" v-throttle @click="render('11')">
                <div class="grid-content cont-bg-2" v-throttle @click="renderToNew('11')">
                    <div class="toplayer">
                        <img class="iconImg" src="../../assets/newMenu/icon9.png" />
                        <div>
@@ -162,9 +155,9 @@
            </div>
        </div>
        <div class="bot-rights">
            <img src="../../assets/newMenu/pic_line1.png">
            <img src="../../assets/newMenu/pic_line1.png" />
            <div>技术支持:苏州国科鸿宇智能科技有限公司</div>
            <img src="../../assets/newMenu/pic_line2.png">
            <img src="../../assets/newMenu/pic_line2.png" />
        </div>
    </div>
</template>
@@ -188,8 +181,8 @@
import { useLoginApi } from '/@/api/login';
import { useI18n } from 'vue-i18n';
import screenfull from 'screenfull';
import router from '../../router'
import Cookies from 'js-cookie'
import router from '../../router';
import Cookies from 'js-cookie';
// 定义接口来定义对象的类型
interface LoginState {
@@ -202,7 +195,7 @@
    time:string;
    date:string;
    weekDay:string;
    dayTime:string
    dayTime: string;
}
export default defineComponent({
@@ -226,7 +219,7 @@
            hour: '2-digit',
            minute: '2-digit',
            second: '2-digit'
        }
        };
        const state = reactive<LoginState>({
            tabsActiveName: 'account',
            isScan: false,
@@ -246,19 +239,29 @@
        // 当前时间
        const getDateTime = ()=>{
            const curTime = new Date().toLocaleString('zh', timeForm).replace(/\//g,'-')
            state.time = curTime.slice(10,16)
            state.date = curTime.slice(0,10)
            let week = ['日','一','二','三','四','五','六']
            let day = new Date().getDay()
            state.weekDay = '星期' + week[day]
            let curHour = Number(curTime.slice(10,13))
            if(curHour>=5&&curHour<=10){state.dayTime = '上午'}
            if(curHour>10&&curHour<=12){state.dayTime = '中午'}
            if(curHour>12&&curHour<=18){state.dayTime = '下午'}
            if(curHour>18&&curHour<=22){state.dayTime = '晚上'}
            if(curHour>22){state.dayTime = '午夜'}
            const curTime = new Date().toLocaleString('zh', timeForm).replace(/\//g, '-');
            state.time = curTime.slice(10, 16);
            state.date = curTime.slice(0, 10);
            let week = ['日', '一', '二', '三', '四', '五', '六'];
            let day = new Date().getDay();
            state.weekDay = '星期' + week[day];
            let curHour = Number(curTime.slice(10, 13));
            if (curHour >= 5 && curHour <= 10) {
                state.dayTime = '上午';
        }
            if (curHour > 10 && curHour <= 12) {
                state.dayTime = '中午';
            }
            if (curHour > 12 && curHour <= 18) {
                state.dayTime = '下午';
            }
            if (curHour > 18 && curHour <= 22) {
                state.dayTime = '晚上';
            }
            if (curHour > 22) {
                state.dayTime = '午夜';
            }
        };
        // 下拉菜单点击时
        const onLoginOut = () => {
            ElMessageBox({
@@ -323,8 +326,8 @@
            // router.push({
            //     name: "bigDataScreen"
            // });
            window.open('http://39.104.85.193:8585/')
        }
            window.open('http://39.104.85.193:8585/');
        };
        const throttle = (renderMenu: any, delay: number) => {
            let flag = true;
            let count = 0;
@@ -371,6 +374,10 @@
                return returnMenu.path;
            }
        };
        const renderToNew = () => {
            window.open('http://222.92.213.22:18001/smartlab/', '_blank');
        };
        // //点击进入特殊作业
        // const toSpecialWorkSys = () => {
        //    router.push('/layoutPage');
@@ -378,10 +385,11 @@
        // 页面加载时
        onMounted(() => {
            state.once += 1;
            NextLoading.done()
            NextLoading.done();
            getDateTime();
            setInterval(()=>{
                getDateTime()
            },1000)
                getDateTime();
            }, 1000);
            // loginBg();
            // loginApp()
        });
@@ -390,6 +398,7 @@
            logoMini,
            onLoginOut,
            getDateTime,
            renderToNew,
            toRiskPlatform,
            onScreenfullClick,
            loginIconTwo,
@@ -447,7 +456,6 @@
                top: 15px;
            }
        }
        .grid-content-1{
            grid-row-start: 1;
@@ -535,7 +543,6 @@
                    height: 44px;
                    margin-right: 10px;
                }
            }
            .bgImg {
                position: absolute;
@@ -711,7 +718,7 @@
        height: 60px;
        top: 0;
        left: 0;
        background: rgba(255,255,255,.8);
        background: rgba(255, 255, 255, 0.8);
        z-index: 9;
    }
    .topPanelCont {
@@ -805,20 +812,20 @@
            .topTit{
                font-size: 44px;
                font-family: "PingFang SC";
                font-family: 'PingFang SC';
                font-weight: bolder;
                text-align: left;
                color: #fff;
                text-shadow: 0 3px 8px rgba(0,0,0,.2);
                text-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
            }
            .topTime{
                padding: 15px 10px;
                box-sizing: border-box;
                background: rgba(6,64,195,.8);
                background: rgba(6, 64, 195, 0.8);
                border-radius: 8px;
                color: #fff;
                font-family: "PingFang SC";
                font-family: 'PingFang SC';
                font-weight: 600;
                font-size: 16px;
                display: flex;
@@ -851,7 +858,7 @@
        .line{
            width: 120px;
            height: 6px;
            background: #00EEFF;
            background: #00eeff;
        }
    }
    .menuGrid {
@@ -862,7 +869,6 @@
        top: 260px;
        left: 240px;
        .gridCont {
            .grid-content {
                border-radius: 16px;
                position: relative;
@@ -872,17 +878,16 @@
                border: none;
                &:hover {
                    background-image: radial-gradient(ellipse farthest-side at 50% 100%,#48A3FF 0%,#fff 120%);
                    box-shadow:  8px 8px 24px rgba(20,97,234,.2), -8px -8px 24px #fafafa;
                    background-image: radial-gradient(ellipse farthest-side at 50% 100%, #48a3ff 0%, #fff 120%);
                    box-shadow: 8px 8px 24px rgba(20, 97, 234, 0.2), -8px -8px 24px #fafafa;
                }
            }
            .cont-bg-1{
                background: #D9EAFF;
                background: #d9eaff;
            }
            .cont-bg-2{
                background: #CDD6FF;
                background: #cdd6ff;
            }
            /*.grid-content-2{*/
            /*   background-image: linear-gradient(135deg,#0098F5,#1461EA);*/