shuishen
2023-02-08 5abc5b858a7fdd7648ea5055ca89f298217758ad
首页定时器更改及跳转后台地址更换
4 files modified
58 ■■■■■ changed files
src/App.vue 6 ●●●● patch | view | raw | blame | history
src/views/home/components/leftContainer.vue 2 ●●● patch | view | raw | blame | history
src/views/home/components/rightContainer.vue 46 ●●●●● patch | view | raw | blame | history
src/views/layout/index.vue 4 ●●●● patch | view | raw | blame | history
src/App.vue
@@ -10,9 +10,9 @@
-->
<template>
    <div id="app" :style="{
    width: (useSceen == true ? currentWidth + 'px' : '100%'),
    height: (useSceen == true ? currentHeight + 'px' : '100%')
}">
        width: (useSceen == true ? currentWidth + 'px' : '100%'),
        height: (useSceen == true ? currentHeight + 'px' : '100%')
    }">
        <router-view></router-view>
    </div>
</template>
src/views/home/components/leftContainer.vue
@@ -319,7 +319,7 @@
                this.houseTabClick(this.tabTypeTwo)
                this.landTabClick(this.tabTypeThree)
            }, 60000)
            }, 600000)
        },
        /**
src/views/home/components/rightContainer.vue
@@ -81,8 +81,8 @@
                <div class="title">
                    <div>现有设备</div>
                    <div class="title-tab">
                        <span :class="{ choosed: linetype == 0 }" @click="lineTabClick(0)">设备种类</span>/
                        <span :class="{ choosed: linetype == 1 }" @click="lineTabClick(1)">设备状态</span>
                        <span :class="{ choosed: linetype == 0 }" @click="initEquipmentEcharts(0)">设备种类</span>/
                        <span :class="{ choosed: linetype == 1 }" @click="initEquipmentEcharts(1)">设备状态</span>
                    </div>
                </div>
                <div style="overflow: hidden;" id="EquipmentEcharts" class="echarts-box"></div>
@@ -103,6 +103,7 @@
const oneColor = ['#4caf50', '#2979ff', '#ffd600', '#0d47a1', '#b71c1c']
const twoColor = ['#5470FE', '#91cc75', '#fac858', '#ee6666', '#73c0de', '#3ba272', '#fc8452', '#9a60b4', '#ea7ccc']
let rightTiming = null
let equipmentmyChart = null
let eventchangemychart = null
let timer
@@ -201,7 +202,18 @@
            this.initEventChangeEcharts()
            this.initEquipmentEcharts()
            this.initEquipmentEcharts(this.linetype)
            if (rightTiming != null) {
                clearInterval(rightTiming)
                rightTiming = null
            }
            rightTiming = setInterval(async () => {
                this.initEquipmentEcharts(this.linetype)
            }, 600000)
        },
        getSchedulingList () {
@@ -448,34 +460,16 @@
            return dataAll
        },
        // 设备种类,设备状态切换
        async lineTabClick (type) {
        // 现有设备饼图初始化
        async initEquipmentEcharts (type) {
            this.linetype = type
            const data = await this.getEquipment()
            const newData = data.filter(item => {
                if (item.value != 0) {
                    return item
                }
            })
            equipmentmyChart.setOption(this.initEquipmentOptions(newData))
            if (newData.length > 1) {
                this.equipmentEchartsCarousel()
            } else {
                clearInterval(timer)
                equipmentmyChart.off('mouseover')
                equipmentmyChart.off('mouseout')
            if (equipmentmyChart != null && equipmentmyChart != '' && equipmentmyChart != undefined) {
                equipmentmyChart.dispose()
                equipmentmyChart.off('click')
            }
        },
        // 现有设备饼图初始化
        async initEquipmentEcharts () {
            var chartDom = document.getElementById('EquipmentEcharts')
            if (equipmentmyChart != null && equipmentmyChart != '' && equipmentmyChart != undefined) equipmentmyChart.dispose()
            equipmentmyChart = this.$echarts.init(chartDom)
            const data = await this.getEquipment()
src/views/layout/index.vue
@@ -2,7 +2,7 @@
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2022-08-18 16:18:24
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2023-02-07 10:05:32
 * @LastEditTime: 2023-02-08 09:49:16
 * @FilePath: \srs-police-affairs\src\views\layout\index.vue
 * @Description: 
 * 
@@ -142,7 +142,7 @@
                    menuName: '运维管理',
                    openExternal: true,
                    // 内网
                    path: 'http://10.141.11.11:8081/s#/security/security'
                    path: 'http://10.141.11.11:8081/#/security/security'
                    // path: 'http://192.168.43.201:1888/#/security/security'
                }
            ],