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 | 187 ++++++++++++++++++++++++++++++++-------------- 1 files changed, 129 insertions(+), 58 deletions(-) diff --git a/src/views/doublePrevent/dpIndex/index.vue b/src/views/doublePrevent/dpIndex/index.vue index c25b2c8..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> @@ -212,7 +214,7 @@ trigger: 'item' }, legend: { - bottom: '10%', + bottom: '5%', left: 'center' }, series: [ @@ -227,8 +229,21 @@ borderWidth: 2 }, label: { - show: false, - position: 'center' + alignTo: 'labelLine', + formatter: '{name|{b}}\n{value|{c}}', + minMargin: 5, + edgeDistance: 5, + lineHeight: 15, + rich: { + name: { + fontSize: 14, + color: '#666' + } + } + }, + labelLine: { + length: 15, + maxSurfaceAngle: 80 }, emphasis: { label: { @@ -237,9 +252,6 @@ fontWeight: 'bold' } }, - labelLine: { - show: false - }, data: [ { value: 1048, name: '整改中' }, { value: 735, name: '待验收' }, @@ -247,7 +259,7 @@ { value: 484, name: '超期未整改' }, { value: 300, name: '已验收' } ], - center: ['50%','35%'] + center: ['50%','40%'] } ] }; @@ -275,7 +287,7 @@ trigger: 'item' }, legend: { - bottom: '10%', + bottom: '5%', left: 'center' }, series: [ @@ -290,8 +302,21 @@ borderWidth: 2 }, label: { - show: false, - position: 'center' + alignTo: 'labelLine', + formatter: '{name|{b}}\n{value|{c}}', + minMargin: 5, + edgeDistance: 5, + lineHeight: 15, + rich: { + name: { + fontSize: 14, + color: '#666' + } + } + }, + labelLine: { + length: 15, + maxSurfaceAngle: 80 }, emphasis: { label: { @@ -300,14 +325,11 @@ fontWeight: 'bold' } }, - labelLine: { - show: false - }, data: [ { value: 1048, name: '一般隐患' }, { value: 235, name: '重大隐患' } ], - center: ['50%','35%'] + center: ['50%','40%'] } ] }; @@ -355,16 +377,62 @@ <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%; - padding: 20px; 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); @@ -373,16 +441,19 @@ .table-item{ border-radius: 8px; background: #fff; - padding: 20px; + padding: 15px; + display: flex; + flex-direction: column; + justify-content: space-between; .item-head{ display: flex; align-items: center; justify-content: space-between; - height: 30px; margin-bottom: 20px; + border-left: 4px solid #409eff; + padding-left: 10px; span{ - font-size: 20px; color: #333; font-weight: bolder; } @@ -395,52 +466,52 @@ } } #riskFix{ - height: calc(50vh - 80px); + height: 300px; } #riskLevel{ - height: calc(50vh - 80px); + height: 300px } .deviceTable{ - height: calc((50vh - 100px) / 3 * 2); + height: 200px; } - .deviceLevel{ - height: calc((50vh - 100px) / 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