From 4a800a8fc83c6bd1f86a8e847b079a51a7532c09 Mon Sep 17 00:00:00 2001 From: zhangzengfei <zhangzengfei@smartai.com> Date: 星期三, 20 七月 2022 15:05:58 +0800 Subject: [PATCH] 修复国标配置的bug --- src/components/subComponents/SystemInfo.vue | 90 ++++++++++++++++++++++++++------------------ 1 files changed, 53 insertions(+), 37 deletions(-) diff --git a/src/components/subComponents/SystemInfo.vue b/src/components/subComponents/SystemInfo.vue index acb8c26..03acc5b 100644 --- a/src/components/subComponents/SystemInfo.vue +++ b/src/components/subComponents/SystemInfo.vue @@ -1,22 +1,22 @@ <template> <div :class="showClass"> - <div class="card-box" :style="`width:${borderWidth}`"> + <div class="card-box" :style="`width:${borderWidth};min-width:456px`"> <ul> - <li style="max-width:30px;" v-if="ShowLocalVedio"> + <li style="max-width: 30px" v-if="ShowLocalVedio"> <div class="total-box"> - <div style="width:100%;margin-top:28px;"> + <div style="width: 100%; margin-top: 28px"> <div class="top-text"> - <em>{{"鎬荤畻鍔�"}}</em> + <em>{{ "鎬荤畻鍔�" }}</em> </div> <div class="mid-text"> - <em>{{` ${PollData.channelTotal}`}}</em> + <em>{{ ` ${PollData.channelTotal}` }}</em> </div> </div> </div> </li> - <li style="max-width:120px" v-if="showRealPoll"> + <li style="max-width: 120px" v-if="showRealPoll"> <DataStackCard - style="width:95%" + style="width: 95%" title="瀹炴椂绠楀姏" fourTip="鏁呴殰瀵艰嚧鏈鐞�" fourIcon="iconicon-test21" @@ -27,12 +27,15 @@ :NoDeal="`${PollData.RealTimeNoDeal}璺痐" /> </li> - <li style="max-width:120px" v-if="showRealPoll"> + <li + style="max-width: 120px" + v-if="showRealPoll && isShowPolling === 'show'" + > <DataStackCard title="杞绠楀姏" fourTip="绛夊緟杞澶勭悊" fourIcon="iconicon-test2" - style="width:95%" + style="width: 95%" :total="`${PollData.PollValidCount}璺痐" :ValidCount="`${PollData.PollSum}璺痐" :InValidCount="`${PollData.PollInvalid}璺痐" @@ -40,7 +43,7 @@ :NoDeal="`${PollData.PollNoDeal}璺痐" /> </li> - <li style="max-width:120px" v-if="ShowLocalVedio"> + <li style="max-width: 120px" v-if="ShowLocalVedio"> <!-- <local-vedio-card title="鏈湴绠楀姏" style="width:95%" @@ -49,8 +52,9 @@ :warning="`${PollData.PollInvalid}璺痐" />--> <DataStackCard + v-if="isShowPolling === 'show'" title="鏁版嵁鏍堢畻鍔�" - style="width:95%" + style="width: 95%" fourTip="鏈煡鍘熷洜瀵艰嚧鏈鐞�" fourIcon="iconicon-test5" :total="`${PollData.stackChannelCount}璺痐" @@ -75,15 +79,18 @@ </li> </ul> </div>--> - <div class="eCharts-box" v-if="PollData.barCharts.length>0"> - <eChartsBar ref="cpuMeneryCharts" :xAxisData="PollData.barCharts"></eChartsBar> + <div class="eCharts-box" v-if="PollData.barCharts.length > 0"> + <eChartsBar + ref="cpuMeneryCharts" + :xAxisData="PollData.barCharts" + ></eChartsBar> </div> </div> </template> <script> -import DataStackCard from "@/components/subComponents/DataStackCard" -import eChartsBar from '@/components/subComponents/eChartsBar' +import DataStackCard from "@/components/subComponents/DataStackCard"; +import eChartsBar from "@/components/subComponents/eChartsBar"; export default { name: "SystemInfo", @@ -91,43 +98,51 @@ DataStackCard, eChartsBar, }, + data() { + return { + isShowPolling: sessionStorage.getItem("isShowPolling"), + }; + }, props: { showTask: { type: Boolean, - default: false + default: false, }, showClass: { type: String, - default: 'sysinfo-box flex-box' + default: "sysinfo-box flex-box", }, ShowLocalVedio: { type: Boolean, - default: false + default: false, }, showRealPoll: { type: Boolean, - default: true + default: true, }, marginTop: { type: String, - default: 'ma' + default: "ma", }, borderWidth: { type: String, - default: '70%' + default: "64%", }, liquidWidth: { type: String, - default: '30%' - } + default: "30%", + }, }, methods: { initCpuCharts() { this.$forceUpdate(); - } - } - -} + }, + }, + mounted() { + console.log(this.PollData); + // console.log('PollData.RealTimeValidCount',this.PollData.RealTimeValidCount) + }, +}; </script> <style lang="scss"> .sysinfo-box { @@ -174,22 +189,23 @@ font-weight: 700; } } - ul{ + ul { padding-left: 0; } } .eCharts-box { - width: 28%; - float: right; + width: 46%; + float: left; box-sizing: border-box; height: 100%; - margin-left: 5px; - @media screen and (min-width: 1280px) and (max-width: 1440px) { - width: 35%; - } - @media screen and (max-width: 1279px) { - width: 30%; - } + padding-left: 10px; + //margin-left: 10px; + // @media screen and (min-width: 1280px) and (max-width: 1440px) { + // width: 35%; + // } + // @media screen and (max-width: 1279px) { + // width: 30%; + // } } .chart-box { float: left; -- Gitblit v1.8.0