From f064f30c91750ae7ffb912e47bca5f9dbc143c8b Mon Sep 17 00:00:00 2001 From: Admin <978517621@qq.com> Date: 星期二, 16 八月 2022 16:02:21 +0800 Subject: [PATCH] Default Changelist --- src/views/doublePrevent/dpIndex/index.vue | 138 +++++++++++++++++++++++++++++++--------------- 1 files changed, 93 insertions(+), 45 deletions(-) diff --git a/src/views/doublePrevent/dpIndex/index.vue b/src/views/doublePrevent/dpIndex/index.vue index c06a0e3..74820af 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> @@ -86,6 +87,7 @@ <div id="riskLevel"></div> </div> </div> + </el-scrollbar> </div> </template> @@ -375,37 +377,83 @@ <style scoped lang="scss"> $homeNavLengh: 8; + + @media screen and (min-width: 1366px) { + .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 (max-width: 1366px){ + .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; + } + } + } .home-container { - height: calc(100vh - 144px); - /*height: 100%;*/ + height: 100%; box-sizing: border-box; overflow: hidden; + .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; .table-item{ - height: calc(50vh - 82px); border-radius: 8px; background: #fff; padding: 15px; + display: flex; + flex-direction: column; + justify-content: space-between; .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; } @@ -418,52 +466,52 @@ } } #riskFix{ - height: calc(50vh - 157px); + height: 300px; } #riskLevel{ - height: calc(50vh - 157px); + 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; -- Gitblit v1.9.2