From 999cab6fb3fc6d2a288d365da991351c5a396bf0 Mon Sep 17 00:00:00 2001 From: Admin <978517621@qq.com> Date: 星期三, 21 九月 2022 15:53:18 +0800 Subject: [PATCH] 删除无用页面 --- src/views/doublePrevent/dpIndex/index.vue | 239 +++++++++++++++++++++++++++++++++++++++++------------------ 1 files changed, 164 insertions(+), 75 deletions(-) diff --git a/src/views/doublePrevent/dpIndex/index.vue b/src/views/doublePrevent/dpIndex/index.vue index c06a0e3..b8e5bf0 100644 --- a/src/views/doublePrevent/dpIndex/index.vue +++ b/src/views/doublePrevent/dpIndex/index.vue @@ -1,12 +1,13 @@ <template> <div class="home-container"> + <el-scrollbar height="100%"> <div class="main-cont"> <div class="table-item"> <div class="item-head"> <span>告警风险事件概括</span> <div @click="toRiskEve">查看更多>></div> </div> - <el-table :data="eventData" style="width: 100%" :header-cell-style="{ background: '#fafafa' }"> + <el-table :data="eventData" style="width: 100%;height: 90%" :header-cell-style="{ background: '#fafafa' }"> <el-table-column prop="riskEventName" label="风险事件名称" show-overflow-tooltip></el-table-column> <el-table-column prop="riskUnitName" label="风险分析单元名称" show-overflow-tooltip></el-table-column> <el-table-column prop="createByUserName" label="创建人" show-overflow-tooltip></el-table-column> @@ -18,7 +19,7 @@ <span>隐患状态详情</span> <div @click="toRiskStatus">查看更多>></div> </div> - <el-table :data="riskStatusData" style="width: 100%" :header-cell-style="{ background: '#fafafa' }"> + <el-table :data="riskStatusData" style="width: 100%;height: 90%" :header-cell-style="{ background: '#fafafa' }"> <el-table-column type="index" label="序号" width="60" /> <!-- <el-table-column prop="reportTime" label="上报时间" show-overflow-tooltip width="170px"></el-table-column>--> <el-table-column prop="dangerCode" label="隐患名称" show-overflow-tooltip></el-table-column> @@ -43,7 +44,7 @@ <div class="item-head"> <span>隐患整改情况</span> </div> - <div id="riskFix"></div> + <div class="riskFix" :id="riskFixId"></div> </div> <div class="table-item"> <div class="item-head"> @@ -83,9 +84,10 @@ <div class="item-head"> <span>隐患等级分布</span> </div> - <div id="riskLevel"></div> + <div class="riskLevel" :id="riskLevelId"></div> </div> </div> + </el-scrollbar> </div> </template> @@ -144,6 +146,8 @@ classGroupList: [], inspectPointAllList: [] }); + const riskFixId = ref("eChartFix" + Date.now() + Math.random()) + const riskLevelId = ref("eChartLe" + Date.now() + Math.random()) // 页面载入时执行方法 onMounted(() => { @@ -198,14 +202,14 @@ // 隐患整改情况 const initRiskFix =()=>{ - var dom = document.getElementById('riskFix'); - var myChart = echarts.init(dom, null, { + const dom = document.getElementById(riskFixId.value); + let myChart = echarts.init(dom, null, { renderer: 'canvas', useDirtyRect: false }); - var app = {}; + let app = {}; - var option; + let option; option = { tooltip: { @@ -217,7 +221,6 @@ }, series: [ { - name: 'Access From', type: 'pie', radius: ['35%', '60%'], avoidLabelOverlap: false, @@ -271,18 +274,19 @@ // 隐患整改情况 const initRiskLevel =()=>{ - var dom = document.getElementById('riskLevel'); - var myChart = echarts.init(dom, null, { + const dom = document.getElementById(riskLevelId.value); + let myChart = echarts.init(dom, null, { renderer: 'canvas', useDirtyRect: false }); - var app = {}; + let app = {}; - var option; + let option; option = { tooltip: { - trigger: 'item' + trigger: 'item', + formatter: '已完成整改:75%' + '\n\r' + '整改中:19%' + '\n\r' + '暂未整改:6%' }, legend: { bottom: '5%', @@ -290,7 +294,6 @@ }, series: [ { - name: 'Access From', type: 'pie', radius: ['35%', '60%'], avoidLabelOverlap: false, @@ -337,6 +340,9 @@ } window.addEventListener('resize', myChart.resize); + setTimeout(()=>{ + myChart.resize + },500) } const toRiskEve = ()=>{ @@ -364,6 +370,8 @@ Refresh, Plus, router, + riskFixId, + riskLevelId, toRiskEve, toRiskStatus, toRevice, @@ -375,37 +383,130 @@ <style scoped lang="scss"> $homeNavLengh: 8; - .home-container { - height: calc(100vh - 144px); - /*height: 100%;*/ - box-sizing: border-box; - overflow: hidden; + + @media screen and (min-width: 1366px) { .main-cont { width: 100%; height: 100%; display: grid; + margin-bottom: 40px; + box-sizing: border-box; grid-gap: 20px; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 1fr); grid-auto-flow: row; justify-content: center; + } + .item-head{ + height: 25px; + line-height: 25px; + span{ + font-size: 20px; + } + div{ + font-size: 16px; + } + } + + .levelItem{ + font-size: 16px; + + span{ + margin-bottom: 10px; + font-size: 24px; + font-weight: bolder; + } + } + } + + @media screen and (min-width: 1024px) and (max-width: 1366px){ + .main-cont { + width: 100%; + height: 100%; + display: grid; + margin-bottom: 40px; + box-sizing: border-box; + grid-gap: 15px; + grid-template-columns: repeat(3, 1fr); + grid-template-rows: repeat(2, 1fr); + grid-auto-flow: row; + justify-content: center; + } + .item-head{ + height: 20px; + line-height: 20px; + span{ + font-size: 16px; + } + div{ + font-size: 14px; + } + } + .levelItem{ + font-size: 14px; + + span{ + margin-bottom: 10px; + font-size: 20px; + font-weight: bolder; + } + } + } + + @media screen and (max-width: 1024px) { + .main-cont { + width: 100%; + height: 100%; + display: flex; + flex-direction: column; + margin-bottom: 40px; + box-sizing: border-box; + justify-content: center; + } + .item-head{ + height: 20px; + line-height: 20px; + span{ + font-size: 16px; + } + div{ + font-size: 14px; + } + } + .levelItem{ + font-size: 12px; + + span{ + margin-bottom: 10px; + font-size: 16px; + font-weight: bolder; + } + } + } + .home-container { + height: 100%; + box-sizing: border-box; + overflow: hidden; + + .main-cont { + .table-item{ - height: calc(50vh - 82px); border-radius: 8px; background: #fff; padding: 15px; + display: flex; + flex-direction: column; + justify-content: space-between; + box-sizing: border-box; .item-head{ display: flex; align-items: center; justify-content: space-between; - height: 25px; margin-bottom: 20px; - line-height: 25px; border-left: 4px solid #409eff; padding-left: 10px; span{ - font-size: 20px; color: #333; font-weight: bolder; } @@ -417,53 +518,53 @@ } } } - #riskFix{ - height: calc(50vh - 157px); + .riskFix{ + height: 300px; } - #riskLevel{ - height: calc(50vh - 157px); + .riskLevel{ + height: 300px } .deviceTable{ - height: calc((50vh - 167px) / 3 * 2); + height: 200px; } - .deviceLevel{ - height: calc((50vh - 167px) / 3); - display: grid; - grid-gap: 10px; - grid-template-columns: repeat(4, 1fr); - align-items: center; - justify-content: space-between; - - .levelItem{ - display: flex; - margin-top: 20px; - flex-direction: column; + .deviceLevel{ + width: 100%; + height: 100px; + display: grid; + grid-gap: 10px; + grid-template-columns: repeat(4, 1fr); align-items: center; - padding: 15px; - box-sizing: border-box; - border-radius: 8px; - color: #fff; - font-size: 16px; + justify-content: space-between; - span{ - margin-bottom: 10px; - font-size: 24px; - font-weight: bolder; + .levelItem{ + display: flex; + height: 100%; + flex-direction: column; + justify-content: flex-start; + align-items: center; + padding: 15px; + box-sizing: border-box; + border-radius: 8px; + color: #fff; + + span{ + margin-bottom: 10px; + font-weight: bolder; + } + } + .red{ + background: #F56C6C; + } + .orange{ + background: #E6A23C; + } + .green{ + background: #67C23A; + } + .blue{ + background: #409EFF; } } - .red{ - background: #F56C6C; - } - .orange{ - background: #E6A23C; - } - .green{ - background: #67C23A; - } - .blue{ - background: #409EFF; - } - } } .table-item2{ grid-column-start: 2; @@ -480,18 +581,6 @@ .grid-content { align-items: center; min-height: 36px; - } - - .topInfo { - display: flex; - align-items: center; - font-size: 16px; - font-weight: bold; - - & > div { - white-space: nowrap; - margin-right: 20px; - } } } } -- Gitblit v1.9.2