123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569 |
- <template>
- <div id="center">
- <div class="up">
- <!--<div class="bg-color-black item" v-for="item in titleItem" :key="item.title">
- <p class="ml-3 colorBlue fw-b">{{item.title}}</p>
- <div>
- <dv-digital-flop :config="item.number" style="width:1.25rem;height:.625rem;" />
- </div>
- </div>-->
- <!-- 4个主要的数据 -->
- <div class="bottom-data">
- <div class="item-box" v-for="(item,index) in numberData" :key="index">
- <div class="d-flex">
- <span class="coin"></span>
- <dv-digital-flop :config="item.number" style="width:2.5rem;height:.525rem;" />
- </div>
- <p class="text" style="text-align: center;">
- {{item.text}}
- <span class="colorYellow">(MW)</span>
- </p>
- </div>
- </div>
- </div>
- <div class="center">
- <centerChart class="percentNum" :id="rate[0].id" :tips="rate[0].tips" :colorObj="rate[0].colorData" />
- <centerChart class="percentNum" :id="rate[1].id" :tips="rate[1].tips" :colorObj="rate[1].colorData" />
- <centerChart class="percentNum" :id="rate[2].id" :tips="rate[2].tips" :colorObj="rate[2].colorData" />
- <centerChart class="percentNum" :id="rate[3].id" :tips="rate[3].tips" :colorObj="rate[3].colorData" />
- <centerChart class="percentNum" :id="rate[4].id" :tips="rate[4].tips" :colorObj="rate[4].colorData" />
- </div>
- <div class="down">
- <!-- <div class="ranking bg-color-black">-->
- <!-- <span style="color:#5cd9e8">-->
- <!-- <icon name="align-left"></icon>-->
- <!-- </span>-->
- <!-- <span class="fs-xl text mx-2 mb-1" style="display:block">每日能耗状态</span>-->
- <!-- <div id="naturalGasChart" style="width:100%;height:2.5rem;"></div>-->
- <!-- </div>-->
- <div class="ranking bg-color-black" @click="openChartUsed">
- <div class="d-flex pt-2 pl-2">
- <span style="color:#5cd9e8">
- <icon name="chart-bar"></icon>
- </span>
- <div class="d-flex">
- <span class="fs-xl text mx-2">每日煤耗状态</span>
- </div>
- </div>
- <div>
- <div id="naturalGasChart" style="width:100%;height:3rem;"></div>
- </div>
- <el-dialog class="my-info-dialog" :visible.sync="openChart" title="每日煤耗状态" @open="open" width="1600px" destroy-on-close append-to-body>
- <div id="naturalGasChartDialog" style="width:100%;height:600px;"></div>
- </el-dialog>
- </div>
- <div class="percent">
- <!-- 警铃 -->
- <!-- <div class="item bg-color-black">
- <svg-icon icon-class="alarm" class="alarmIcon" />
- </div> -->
- <div class="water">
- <dv-water-level-pond :config="water" style="height: 2rem" />
- </div>
- </div>
- </div>
- </div>
- </template>
- <script>
- import centerChart from "./echart/center/centerChartRate";
- export default {
- props: ['dashboardelecdata'],
- data() {
- return {
- openChart: false,
- queryParams:{},
- numberData: [
- {
- number: {
- number: [parseInt(this.dashboardelecdata.gtg1Lv)],
- toFixed: 1,
- content: "{nt}"
- },
- text: "1#GTG"
- },
- {
- number: {
- number: [parseInt(this.dashboardelecdata.gtg2Lv)],
- toFixed: 1,
- content: "{nt}"
- },
- text: "2#GTG"
- },
- {
- number: {
- number: [parseInt(this.dashboardelecdata.gtg3Lv)],
- toFixed: 1,
- content: "{nt}"
- },
- text: "3#GTG"
- },
- {
- number: {
- number: [parseInt(this.dashboardelecdata.stg1Lv)],
- toFixed: 1,
- content: "{nt}"
- },
- text: "STG"
- },
- {
- number: {
- number: [parseInt(this.dashboardelecdata.mwhLv)],
- toFixed: 1,
- content: "{nt}"
- },
- text: "发电量"
- },
- ],
- ranking: {
- data: [
- {
- name: "公应工程",
- value: 55
- },
- {
- name: "BCC",
- value: 120
- },
- {
- name: "碳一",
- value: 78
- },
- {
- name: "EU",
- value: 66
- },
- {
- name: "电厂",
- value: 80
- },
- {
- name: "AE",
- value: 80
- },
- {
- name: "AA",
- value: 80
- },
- {
- name: "苯乙烯",
- value: 80
- }
- ],
- waitTime: 4000,
- carousel: "page",
- unit: "mw"
- },
- water: {
- data: [24, 45],
- shape: "roundRect",
- formatter: "SUB {value}%",
- waveNum: 3
- },
- // 通过率和达标率的组件复用数据
- rate: [
- {
- id: "centerRate0",
- tips: parseInt(this.dashboardelecdata.mwhWr),
- colorData: {
- fontSize: 25,
- textStyle: "#3f83ff",
- series: {
- radius: ["60%", "95%", "85%", "90%"],
- color: ["#00bcd44a", "transparent"],
- dataColor: {
- normal: "#528cff",
- shadowColor: "#97e2f5"
- }
- }
- }
- },
- {
- id: "centerRate1",
- tips: parseInt(this.dashboardelecdata.stg1Wr),
- colorData: {
- fontSize: 23,
- textStyle: "#3fc0fb",
- series: {
- radius: ["65%", "85%", "85%", "90%"],
- color: ["#00bcd44a", "transparent"],
- dataColor: {
- normal: "#03a9f4",
- shadowColor: "#97e2f5"
- }
- }
- }
- },
- {
- id: "centerRate2",
- tips: parseInt(this.dashboardelecdata.gtg3Wr),
- colorData: {
- fontSize: 23,
- textStyle: "#67e0e3",
- series: {
- radius: ["65%", "85%", "85%", "90%"],
- color: ["#faf3a378", "transparent"],
- dataColor: {
- normal: "#ff9800",
- shadowColor: "#fcebad"
- }
- }
- }
- },
- {
- id: "centerRate3",
- tips: parseInt(this.dashboardelecdata.gtg2Wr),
- colorData: {
- fontSize: 23,
- textStyle: "#67e0e3",
- series: {
- radius: ["65%", "85%", "85%", "90%"],
- color: ["rgba(196,163,250,0.47)", "transparent"],
- dataColor: {
- normal: "#9d00ff",
- shadowColor: "#c9adfc"
- }
- }
- }
- },
- {
- id: "centerRate4",
- tips: parseInt(this.dashboardelecdata.gtg1Wr),
- colorData: {
- fontSize: 23,
- textStyle: "#67e0e3",
- series: {
- radius: ["65%", "85%", "85%", "90%"],
- color: ["rgba(163,250,177,0.47)", "transparent"],
- dataColor: {
- normal: "#00ff0d",
- shadowColor: "#b2fcad"
- }
- }
- }
- }
- ]
- };
- },
- components: {
- centerChart
- // centerChart1,
- // centerChart2
- },
- mounted() {
- this.initChart();
- },
- methods: {
- openChartUsed(){
- this.openChart = true
- },
- open(){
- this.$nextTick(() => {
- this.initChartDialog()
- })
- },
- initChart() {
- // 基于准备好的dom,初始化echarts实例
- this.chart = this.echarts.init(document.getElementById('naturalGasChart'))
- this.chart.setOption({
- xAxis: {
- type: 'category',
- data: [
- '00:00-03:00',
- '03:00-06:00',
- '06:00-09:00',
- '09:00-12:00',
- '12:00-15:00',
- '15:00-18:00',
- '18:00-21:00',
- '21:00-00:00'
- ]
- },
- yAxis: {
- type: 'value'
- },
- series: [
- {
- data: [120, 200, 150, 80, 70, 110, 130],
- type: 'line',
- smooth: true,
- symbol: '',
- symbolSize: 15,
- lineStyle: {
- color: '#5470C6',
- width: 6,
- type: 'dashed'
- },
- itemStyle: {
- borderWidth: 3,
- borderColor: '#EE6666',
- color: 'yellow'
- }
- }
- ]
- // color: ['#00DDFF', '#37A2FF'],
- // tooltip: {
- // trigger: 'axis',
- // type: 'category',
- // },
- // /* 标识 */
- // legend: {
- // data: ['实际', '计划'],
- // textStyle:{
- // color: '#ffffff'//字体颜色
- // }
- // },
- // /* 周围边距 */
- // grid: {
- // left: '3%',
- // right: '3%',
- // bottom: '1%',
- // top: '13%',
- // containLabel: true
- // },
- // xAxis: [
- // {
- // type: 'category',
- // boundaryGap: false,
- // data: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31'],
- // axisLabel: {//x轴文字的配置
- // show: true,
- // textStyle: {
- // color: '#ffffff',
- // }
- // },
- // }
- // ],
- // yAxis: [
- // {
- // type: 'value',
- // axisLabel: {
- // textStyle: {
- // fontSize: 10,
- // color: '#ffffffff',
- // margin: 15
- // },
- // }
- // }
- // ],
- // series: [
- // {
- // name: this.$t('实际'),
- // type: 'line',
- // symbol: "none",
- // data: [20, 32, 1, 34, 90, 30, 20, 20, 32, 1, 34, 90, 40, 10, 20, 82, 11, 34, 20, 30, 10, 20, 82, 11, 34, 20, 40, 10]
- // },
- // {
- // name: this.$t('计划'),
- // type: 'line',
- // symbol: "none",
- // data: [20, 82, 11, 24, 20, 30, 10, 20, 82, 11, 24, 20, 10, 20, 20, 32, 21, 34, 10, 30, 20, 20, 32, 21, 34, 19, 13, 20]
- // },
- // ]
- })
- },
- initChartDialog() {
- // 基于准备好的dom,初始化echarts实例
- this.chart1 = this.echarts.init(document.getElementById('naturalGasChartDialog'))
- this.chart1.setOption({
- xAxis: {
- type: 'category',
- data: [
- '00:00-03:00',
- '03:00-06:00',
- '06:00-09:00',
- '09:00-12:00',
- '12:00-15:00',
- '15:00-18:00',
- '18:00-21:00',
- '21:00-00:00'
- ]
- },
- yAxis: {
- type: 'value'
- },
- series: [
- {
- data: [120, 200, 150, 80, 70, 110, 130],
- type: 'line',
- smooth: true,
- symbol: '',
- symbolSize: 15,
- label: {
- show: true,
- position: 'top'
- },
- lineStyle: {
- color: '#5470C6',
- width: 6,
- type: 'dashed'
- },
- itemStyle: {
- borderWidth: 3,
- borderColor: '#EE6666',
- color: 'yellow'
- }
- }
- ]
- // color: ['#00DDFF', '#37A2FF'],
- // tooltip: {
- // trigger: 'axis',
- // type: 'category',
- // },
- // /* 标识 */
- // legend: {
- // data: ['实际', '计划'],
- // textStyle:{
- // color: '#ffffff'//字体颜色
- // }
- // },
- // /* 周围边距 */
- // grid: {
- // left: '3%',
- // right: '3%',
- // bottom: '1%',
- // top: '13%',
- // containLabel: true
- // },
- // xAxis: [
- // {
- // type: 'category',
- // boundaryGap: false,
- // data: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31'],
- // axisLabel: {//x轴文字的配置
- // show: true,
- // textStyle: {
- // color: '#ffffff',
- // }
- // },
- // }
- // ],
- // yAxis: [
- // {
- // type: 'value',
- // axisLabel: {
- // textStyle: {
- // fontSize: 10,
- // color: '#ffffffff',
- // margin: 15
- // },
- // }
- // }
- // ],
- // series: [
- // {
- // name: this.$t('实际'),
- // type: 'line',
- // symbol: "none",
- // data: [20, 32, 1, 34, 90, 30, 20, 20, 32, 1, 34, 90, 40, 10, 20, 82, 11, 34, 20, 30, 10, 20, 82, 11, 34, 20, 40, 10]
- // },
- // {
- // name: this.$t('计划'),
- // type: 'line',
- // symbol: "none",
- // data: [20, 82, 11, 24, 20, 30, 10, 20, 82, 11, 24, 20, 10, 20, 20, 32, 21, 34, 10, 30, 20, 20, 32, 21, 34, 19, 13, 20]
- // },
- // ]
- })
- }
- }
- };
- </script>
- <style lang="scss" scoped>
- #center {
- display: flex;
- flex-direction: column;
- .up {
- width: 100%;
- display: flex;
- flex-wrap: wrap;
- justify-content: space-around;
- .item {
- border-radius: 0.0625rem;
- padding-top: 0.2rem;
- margin-top: 0.1rem;
- width: 32%;
- height: 0.875rem;
- }
- }
- .bottom-data {
- .item-box {
- float: right;
- position: relative;
- width: 20%;
- color: #d3d6dd;
- // 金币
- .coin {
- position: absolute;
- left: 0.1rem;
- top: 0.2125rem;
- font-size: 0.25rem;
- color: #ffc107;
- }
- .colorYellow {
- color: yellowgreen;
- }
- }
- }
- .center {
- padding: 0.07rem 0.05rem;
- padding-bottom: 0;
- width: 100%;
- display: flex;
- justify-content: space-between;
- float: right;
- position: relative;
- .percentNum {
- width: 19%;
- }
- }
- .down {
- padding: 0.07rem 0.05rem;
- padding-bottom: 0;
- width: 100%;
- display: flex;
- height: 3.1875rem;
- justify-content: space-between;
- .bg-color-black {
- border-radius: 0.0625rem;
- }
- .ranking {
- padding: 0.125rem;
- width: 59%;
- }
- .percent {
- width: 40%;
- display: flex;
- flex-wrap: wrap;
- .bg-color-black {
- border-radius: 0.0625rem;
- position: relative;
- .alarmIcon {
- width: 40px !important;
- //height: 40px !important;
- position: absolute;
- left: 50%;
- top: 50%;
- transform: translate(-50%, -50%);
- }
- }
- .item {
- width: 100%;
- height: 1rem;
- }
- .water {
- padding-top:60px;
- width: 100%;
- height: 2rem;
- }
- }
- }
- }
- </style>
|