123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362 |
- <template>
- <el-dialog width="80%" @opened="opened()" @closed="closed()" :show-close="false" class="my-info-dialog">
- <template #title>
- <div style="margin-top: -10px; color: #ffffff">光伏详情</div>
- </template>
- <div class="pvDetail">
- <div class="pvLeftDetail">
- <div class="commonSty titleFont">
- <span>光伏板号:</span>
- <span style="width: 38%;color: #c3c3c3">{{windturbine.id}}</span>
- </div>
- <div class="commonSty titleFont">
- <span>逆变器状态</span>
- </div>
- <div v-for="(item, index) in nbqData" :key="index" class="commonSty arrSty">
- <div class="arrName">
- <span>{{item.name}}</span>
- </div>
- <div class="arrMsg">
- <span style="padding-right: 20px">{{item.value}}</span>
- <span style="width: 20%;color: #c3c3c3">{{item.tes}}</span>
- </div>
- </div>
- </div>
- <div class="pvRightDetail">
- <div class="pvRightDetail_top">
- <div class="pvRightTopTitle">
- <span>光伏板</span>
- <span>汇流箱</span>
- <span>逆变器</span>
- <span>电网</span>
- </div>
- <div class="pvRightBotImg">
- <div class="img1">
- <img src="../assets/img/PV/pv_pic.png" alt="">
- </div>
- <div class="imgCom">
- <img src="../assets/img/PV/pv_arrow_pic.png" alt="">
- </div>
- <div class="img2">
- <img src="../assets/img/PV/pv_box_pic.png" alt="">
- </div>
- <div class="imgCom">
- <img src="../assets/img/PV/pv_arrow_pic.png" alt="">
- </div>
- <div class="img3">
- <img src="../assets/img/PV/pv_nb_pic.png" alt="">
- </div>
- <div class="imgCom">
- <img src="../assets/img/PV/pv_arrow_pic.png" alt="">
- </div>
- <div>
- <img src="../assets/img/PV/pv_elec_pic.png" alt="">
- </div>
- </div>
- </div>
- <div class="pvRightDetail_bot">
- <div class="pvRightBotTitle">
- <span>功率曲线</span>
- </div>
- <div class="pvRightBotEchart" id="pvEchart"></div>
- </div>
- </div>
- </div>
- </el-dialog>
- </template>
- <script>
- import api from "api/index";
- import * as echarts from "echarts";
- export default {
- props: {
- windturbine: {
- type: Object,
- default: () => {
- return {}
- },
- },
- },
- watch: {
- windturbine: {
- handler: function (json) {
- if (json) {
- // this.initData();
- }
- },
- },
- },
- data() {
- return {
- nbqData: []
- };
- },
- created() {
- this.nbqData = [
- {
- name: '交流电压',
- value: 0,
- tes: 'V'
- },
- {
- name: '交流电流',
- value: 0,
- tes: 'A'
- },
- {
- name: '直流电压',
- value: 0,
- tes: 'V'
- },
- {
- name: '直流电流',
- value: 0,
- tes: 'A'
- },
- {
- name: '并网功率',
- value: 0,
- tes: 'KW'
- },
- {
- name: '电网频率',
- value: 0,
- tes: 'Hz'
- },
- {
- name: '功率因数',
- value: 0,
- tes: ''
- },
- {
- name: '日发电量',
- value: 0,
- tes: 'Kwh'
- },
- {
- name: '月发电量',
- value: 0,
- tes: 'Kwh'
- },
- {
- name: '年发电量',
- value: 0,
- tes: 'Kwh'
- },
- {
- name: '累计发电量',
- value: 0,
- tes: 'Kwh'
- },
- {
- name: '逆变器温度',
- value: 0,
- tes: '℃'
- },
- {
- name: '效率',
- value: 0,
- tes: '%'
- },
- ]
- },
- methods: {
- opened() {
- this.$nextTick(() =>{
- this.getEcharts()
- })
- },
- closed(){},
- // 获取曲线数据
- getEcharts() {
- let series = [
- {
- name: 'Email',
- type: 'line',
- stack: 'Total',
- data: [120, 132, 101, 134, 90, 230, 210]
- },
- {
- name: 'Union Ads',
- type: 'line',
- stack: 'Total',
- data: [220, 182, 191, 234, 290, 330, 310]
- },
- {
- name: 'Video Ads',
- type: 'line',
- stack: 'Total',
- data: [150, 232, 201, 154, 190, 330, 410]
- },
- {
- name: 'Direct',
- type: 'line',
- stack: 'Total',
- data: [320, 332, 301, 334, 390, 330, 320]
- },
- {
- name: 'Search Engine',
- type: 'line',
- stack: 'Total',
- data: [820, 932, 901, 934, 1290, 1330, 1320]
- }
- ]
- let xAxis = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
- let legend = ['Email', 'Union Ads', 'Video Ads', 'Direct', 'Search Engine']
- this.getglobalLine('pvEchart', xAxis, legend, series)
- },
- getglobalLine(name, xAxis, legend, series) {
- let option = {
- backgroundColor: '#232d38',
- tooltip: {
- trigger: 'axis'
- },
- legend: {
- data: legend
- },
- grid: {
- left: '5%',
- right: '4%',
- bottom: '3%',
- containLabel: true
- },
- xAxis: {
- type: 'category',
- boundaryGap: false,
- data: xAxis
- },
- yAxis: {
- type: 'value',
- name: '万千瓦时(Wkw/h)'
- },
- series: series
- };
- // 基于准备好的dom,初始化echarts实例
- let dom = document.getElementById(name);
- let myChart = echarts.init(dom, 'dark');
- myChart.setOption(option);
- window.addEventListener("resize", function () {
- myChart.resize()
- })
- },
- }
- };
- </script>
- <style lang="less" scoped>
- .pvDetail {
- background-color: black;
- margin-top: -30px;
- margin-left: -10px;
- margin-right: -10px;
- margin-bottom: -30px;
- border-bottom: 20px solid rgb(36, 36, 36);
- display: flex;
- padding: 5px 10px;
- .pvLeftDetail{
- width: 20%;
- .commonSty{
- height: 40px;
- background:#232d38;
- border-radius: 10px;
- margin-top: 10px;
- span{
- color: #fff;
- position: relative;
- top: 8px;
- left: 16px;
- }
- }
- .titleFont{
- width: calc(100% - 20px);
- font-size: 16px;
- display: flex;
- padding-right: 20px;
- justify-content: space-between;
- }
- .arrSty{
- display: flex;
- justify-content: space-between;
- span{
- font-size: 14px;
- }
- .arrName{
- width: 40%;
- span{
- color: #c3c3c3;
- }
- }
- .arrMsg{
- width: 60%;
- display: flex;
- justify-content: end;
- padding-right: 20px;
- span{
- display: inline-block;
- }
- }
- }
- }
- .pvRightDetail{
- width: calc(80% - 10px);
- padding-left: 10px;
- .pvRightDetail_top{
- background:#232d38;
- border-radius: 10px;
- margin-top: 10px;
- .pvRightTopTitle{
- display: flex;
- justify-content: space-around;
- height: 30px;
- color: #253443;
- border-bottom: 1px solid #5c5b5b;
- padding: 5px 0;
- margin-bottom: 10px;
- span{
- color: #fff;
- margin-top: 3px;
- }
- }
- .pvRightBotImg{
- display: flex;
- justify-content: space-around;
- padding: 50px 0;
- .img1{
- margin-top: 40px;
- }
- .img2{
- margin-top: 35px;
- }
- .img3{
- margin-top: 20px;
- }
- .imgCom{
- margin-top: 50px;
- }
- }
- }
- .pvRightDetail_bot{
- background:#232d38;
- border-radius: 10px;
- margin-top: 10px;
- .pvRightBotTitle{
- text-align: center;
- height: 20px;
- color: #253443;
- border-bottom: 1px solid #5c5b5b;
- padding: 10px 0;
- margin-bottom: 10px;
- span{
- color: #fff;
- }
- }
- .pvRightBotEchart{
- width: 100%;
- height: 375px;
- }
- }
- }
- }
- </style>
|