|
@@ -22,7 +22,9 @@
|
|
|
<view class="fdwcl_DataAll" v-for="(item,index) in powerProgressData" :key="index">
|
|
|
<view class="fdwcl_Data flex justify-between">
|
|
|
<view class="fdwcl_Data_1 flex">
|
|
|
- <image src="../../static/jnImage/indexPage/windIcon.png" mode=""></image>
|
|
|
+ <image src="../../static/jnImage/indexPage/windIcon.png" v-if="item.type==='wind'" mode="">
|
|
|
+ </image>
|
|
|
+ <image src="../../static/jnImage/indexPage/powerIcon.png" v-else mode=""></image>
|
|
|
<text>{{item.inPower}}万kWh</text>
|
|
|
</view>
|
|
|
<view class="fdwcl_Data_2">
|
|
@@ -40,21 +42,21 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="ycdl" v-else>
|
|
|
- <view class="ycdl_msg" v-for="(item,index) in 3" :key="index">
|
|
|
+ <view class="ycdl_msg" v-for="(item,index) in powerFulterData" :key="index">
|
|
|
<view class="ycdl_title flex">
|
|
|
<image src="../../static/jnImage/powerPage/clock.png" mode=""></image>
|
|
|
- <text>11月22日</text>
|
|
|
+ <text>{{item.date}}</text>
|
|
|
<text>预测电量</text>
|
|
|
</view>
|
|
|
<view class="ycdl_data">
|
|
|
<uni-row class="ycdl_data_row">
|
|
|
- <uni-col :span="12" v-for="(item,index) in powerProgressData" :key="index">
|
|
|
+ <uni-col :span="12" v-for="(itv,index) in item.values" :key="index">
|
|
|
<view class="ycdl_data_col flex">
|
|
|
<view class="ycdl_data_col_left">
|
|
|
- <text>{{item.name}}</text>
|
|
|
+ <text>{{showStationZH(itv.windpowerstationId)}}</text>
|
|
|
</view>
|
|
|
<view class="ycdl_data_col_right flex justify-between">
|
|
|
- <text>{{item.inPower}}</text>
|
|
|
+ <text>{{itv.dayPowerForecast}}</text>
|
|
|
<text>MW</text>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -75,7 +77,7 @@
|
|
|
<view class="xsfsgl" v-else>
|
|
|
<view class="xsfsgl_title flex justify-center">
|
|
|
<image src="../../static/jnImage/powerPage/72clock.png" mode=""></image>
|
|
|
- <text>72小时风速功率</text>
|
|
|
+ <text>24小时功率曲线</text>
|
|
|
</view>
|
|
|
<view class="qiun-chartsLine">
|
|
|
<qiun-data-charts type="mix" :opts="optsLine" :chartData="chartDataLine" />
|
|
@@ -86,6 +88,14 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ import {
|
|
|
+ bulletinappCompanyelectricityApi,
|
|
|
+ bulletinappForecastApi,
|
|
|
+ cockpitPowercurve24Api
|
|
|
+ } from '../../api/power.js'
|
|
|
+ import {
|
|
|
+ windPowerDataApi
|
|
|
+ } from '../../api/common.js'
|
|
|
import companyHeader from '../common/companyHeader.vue'
|
|
|
var uChartsInstance = {};
|
|
|
export default {
|
|
@@ -104,9 +114,14 @@
|
|
|
chartDataLine: {},
|
|
|
opts: {},
|
|
|
optsLine: {},
|
|
|
+ windData: [],
|
|
|
+ powerData: [],
|
|
|
+ powerFulterData: []
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
+ this.stationData("0", "-1");
|
|
|
+ this.stationData("0", "-2");
|
|
|
this.powerTabData = [{
|
|
|
nameZN: '电量',
|
|
|
nameEN: 'DL',
|
|
@@ -120,78 +135,87 @@
|
|
|
}
|
|
|
]
|
|
|
this.yearData = [{
|
|
|
- nameZN: '月',
|
|
|
- nameEN: 'month',
|
|
|
- showColor: true
|
|
|
- },
|
|
|
- {
|
|
|
- nameZN: '年',
|
|
|
- nameEN: 'year',
|
|
|
- showColor: false
|
|
|
+ nameZN: '月',
|
|
|
+ nameEN: 'month',
|
|
|
+ showColor: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ nameZN: '年',
|
|
|
+ nameEN: 'year',
|
|
|
+ showColor: false
|
|
|
|
|
|
- }
|
|
|
- ],
|
|
|
- this.powerProgressData = [{
|
|
|
- type: 'wind',
|
|
|
- inPower: 961,
|
|
|
- allPower: 1865,
|
|
|
- name: '宝龙山'
|
|
|
- },
|
|
|
- {
|
|
|
- type: 'wind',
|
|
|
- inPower: 852,
|
|
|
- allPower: 1865,
|
|
|
- name: '乌力吉'
|
|
|
- },
|
|
|
- {
|
|
|
- type: 'wind',
|
|
|
- inPower: 696,
|
|
|
- allPower: 1865,
|
|
|
- name: '浩日格吐'
|
|
|
- },
|
|
|
- {
|
|
|
- type: 'wind',
|
|
|
- inPower: 527,
|
|
|
- allPower: 1865,
|
|
|
- name: '开鲁'
|
|
|
- },
|
|
|
- {
|
|
|
- type: 'wind',
|
|
|
- inPower: 935,
|
|
|
- allPower: 1865,
|
|
|
- name: '景观'
|
|
|
- },
|
|
|
- {
|
|
|
- type: 'wind',
|
|
|
- inPower: 1022,
|
|
|
- allPower: 1865,
|
|
|
- name: '高力板'
|
|
|
- },
|
|
|
- {
|
|
|
- type: 'wind',
|
|
|
- inPower: 752,
|
|
|
- allPower: 1865,
|
|
|
- name: '书声'
|
|
|
- },
|
|
|
- {
|
|
|
- type: 'wind',
|
|
|
- inPower: 1520,
|
|
|
- allPower: 1865,
|
|
|
- name: '宝力根花'
|
|
|
- },
|
|
|
- {
|
|
|
- type: 'wind',
|
|
|
- inPower: 365.6,
|
|
|
- allPower: 1865,
|
|
|
- name: '振发'
|
|
|
- },
|
|
|
- ]
|
|
|
- },
|
|
|
- onReady() {
|
|
|
- this.getPowerBar()
|
|
|
+ }
|
|
|
+ ]
|
|
|
},
|
|
|
methods: {
|
|
|
- getPowerBar() {
|
|
|
+ //获取公司电量
|
|
|
+ getCompanyData() {
|
|
|
+ let that = this
|
|
|
+ bulletinappCompanyelectricityApi().then(res => {
|
|
|
+ if (res && res.data) {
|
|
|
+ let allData = []
|
|
|
+ let allSation = [...that.windData, ...that.powerData]
|
|
|
+ allSation.forEach(item => {
|
|
|
+ for (let i in res.data) {
|
|
|
+ if (i === item.wpid) {
|
|
|
+ let obj = res.data[i]
|
|
|
+ obj.wpname = item.wpname
|
|
|
+ obj.wpid = item.wpid
|
|
|
+ allData.push(obj)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ allData.forEach(item => {
|
|
|
+ //公司电量月年数据
|
|
|
+ let obj = {
|
|
|
+ type: item.wpid.indexOf('_FDC') > -1 ? 'wind' : 'power',
|
|
|
+ name: item.wpname
|
|
|
+ }
|
|
|
+ if (that.yearTab === 'month') {
|
|
|
+ obj.inPower = item.yfdl
|
|
|
+ obj.allPower = item.yjhdl
|
|
|
+ } else if (that.yearTab === 'year') {
|
|
|
+ obj.inPower = item.nfdl
|
|
|
+ obj.allPower = item.njhdl
|
|
|
+ }
|
|
|
+ that.powerProgressData.push(obj)
|
|
|
+ })
|
|
|
+ //公司电量日数据
|
|
|
+ that.getPowerBar(allData)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ async stationData(type1, type2) {
|
|
|
+ await windPowerDataApi({
|
|
|
+ company: type1,
|
|
|
+ type: type2
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ if (Object.values(res.data.data).length) {
|
|
|
+ if (res.data.data.powerVos.length > 0) {
|
|
|
+ res.data.data.powerVos.forEach(item => {
|
|
|
+ let obj = {
|
|
|
+ wpname: item.wpname,
|
|
|
+ wpid: item.wpid
|
|
|
+ }
|
|
|
+ if (type2 === "-1") {
|
|
|
+ this.windData.push(obj)
|
|
|
+ } else {
|
|
|
+ this.powerData.push(obj)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ if (type2 === "-2") {
|
|
|
+ this.getCompanyData()
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ } else {
|
|
|
+ this.windData = [];
|
|
|
+ this.powerData = [];
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ getPowerBar(allData) {
|
|
|
let opts = {
|
|
|
color: ["#1890FF", "#91CB74", "#FAC858", "#EE6666", "#73C0DE", "#3CA272", "#FC8452", "#9A60B4",
|
|
|
"#ea7ccc"
|
|
@@ -204,6 +228,7 @@
|
|
|
xAxis: {
|
|
|
disableGrid: true,
|
|
|
rotateLabel: true,
|
|
|
+ rotateAngle: 90,
|
|
|
axisLineColor: "#A49EAC",
|
|
|
fontColor: "#A49EAC",
|
|
|
fontSize: 10,
|
|
@@ -232,18 +257,17 @@
|
|
|
let proColor = ['#6C4B9E', '#323A97', '#4951B2', '#4287FF', '#3CB8FE', '#1AA7B5', '#5183B6', '#9F65C1',
|
|
|
'#766FF1', '#4951B2',
|
|
|
]
|
|
|
- //模拟服务器返回数据,如果数据格式和标准格式不同,需自行按下面的格式拼接
|
|
|
|
|
|
let xAxis = []
|
|
|
let series = []
|
|
|
- this.powerProgressData.forEach((item, index) => {
|
|
|
- xAxis.push(item.name)
|
|
|
+ allData.forEach((item, index) => {
|
|
|
+ xAxis.push(item.wpname)
|
|
|
let obj = {
|
|
|
color: '',
|
|
|
name: '',
|
|
|
textSize: 10,
|
|
|
textColor: "#A49EAC",
|
|
|
- value: item.inPower
|
|
|
+ value: item.rjhdl.toFixed(2)
|
|
|
}
|
|
|
proColor.forEach((it, idx) => {
|
|
|
if (index.toString().length > 1) {
|
|
@@ -257,13 +281,56 @@
|
|
|
let res = {
|
|
|
categories: xAxis,
|
|
|
series: [{
|
|
|
+ name: '日计划电量',
|
|
|
+ textColor: "#FFFFFF",
|
|
|
+ textSize: 12,
|
|
|
data: series
|
|
|
}]
|
|
|
};
|
|
|
this.opts = opts
|
|
|
this.chartData = JSON.parse(JSON.stringify(res));
|
|
|
},
|
|
|
- getLineBar() {
|
|
|
+
|
|
|
+ //获取公司预测电量
|
|
|
+ getCompanyEleData() {
|
|
|
+ let that = this
|
|
|
+ bulletinappForecastApi({
|
|
|
+ type: 0,
|
|
|
+ wpId: '1'
|
|
|
+ }).then(res => {
|
|
|
+ if (res && res.data) {
|
|
|
+ for (let i in res.data) {
|
|
|
+ let obj = {
|
|
|
+ date: res.data[i][0].recordDate,
|
|
|
+ values: res.data[i]
|
|
|
+ }
|
|
|
+ that.powerFulterData.push(obj)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ showStationZH(stationId) {
|
|
|
+ let allStation = [...this.windData, ...this.powerData]
|
|
|
+ let str = ''
|
|
|
+ allStation.forEach(item => {
|
|
|
+ if (item.wpid === stationId) {
|
|
|
+ str = item.wpname
|
|
|
+ }
|
|
|
+ })
|
|
|
+ return str
|
|
|
+ },
|
|
|
+ // 获取公司24小时功率预测
|
|
|
+ getcockpitPowercurve() {
|
|
|
+ let that = this
|
|
|
+ cockpitPowercurve24Api({
|
|
|
+ wpId: 'KGDL_FGS0'
|
|
|
+ }).then(res => {
|
|
|
+ if (res && res.data) {
|
|
|
+ this.getLineBar(res.data)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getLineBar(values) {
|
|
|
let opts = {
|
|
|
color: ["#1890FF", "#91CB74", "#FAC858", "#EE6666", "#73C0DE", "#3CA272", "#FC8452", "#9A60B4",
|
|
|
"#ea7ccc"
|
|
@@ -275,6 +342,7 @@
|
|
|
},
|
|
|
xAxis: {
|
|
|
disableGrid: true,
|
|
|
+ rotateLabel: true,
|
|
|
axisLineColor: "#A49EAC",
|
|
|
fontColor: "#A49EAC",
|
|
|
fontSize: 10,
|
|
@@ -290,23 +358,12 @@
|
|
|
gridColor: "#CCCCCC",
|
|
|
padding: 10,
|
|
|
data: [{
|
|
|
- position: "left",
|
|
|
- title: "折线",
|
|
|
- fontColor: "#A49EAC",
|
|
|
- titleFontColor: "#A49EAC",
|
|
|
- titleFontSize: 10
|
|
|
- },
|
|
|
- {
|
|
|
- position: "right",
|
|
|
- min: 0,
|
|
|
- max: 200,
|
|
|
- title: "点",
|
|
|
- textAlign: "left",
|
|
|
- fontColor: "#A49EAC",
|
|
|
- titleFontColor: "#A49EAC",
|
|
|
- titleFontSize: 10
|
|
|
- }
|
|
|
- ]
|
|
|
+ position: "left",
|
|
|
+ title: "MW",
|
|
|
+ fontColor: "#A49EAC",
|
|
|
+ titleFontColor: "#A49EAC",
|
|
|
+ titleFontSize: 10
|
|
|
+ }]
|
|
|
},
|
|
|
extra: {
|
|
|
mix: {
|
|
@@ -317,37 +374,45 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- let proColor = ['#6C4B9E', '#323A97', '#4951B2', '#4287FF', '#3CB8FE', '#1AA7B5', '#5183B6', '#9F65C1',
|
|
|
- '#766FF1', '#4951B2',
|
|
|
- ]
|
|
|
- //模拟服务器返回数据,如果数据格式和标准格式不同,需自行按下面的格式拼接
|
|
|
+ let sjglArr = []
|
|
|
+ let ycglArr = []
|
|
|
+ let xAxisArr = []
|
|
|
+ if (values.length > 0) {
|
|
|
+ values.forEach((item, index) => {
|
|
|
+ xAxisArr.push(this.changTimeSV(index + 1))
|
|
|
+ sjglArr.push(item.sjgl)
|
|
|
+ ycglArr.push(item.bzgl)
|
|
|
+ })
|
|
|
+ }
|
|
|
|
|
|
let res = {
|
|
|
- categories: ["2018", "2019", "2020", "2021", "2022", "2023"],
|
|
|
+ categories: xAxisArr,
|
|
|
series: [{
|
|
|
- name: "折线",
|
|
|
+ name: "实际功率",
|
|
|
type: "line",
|
|
|
- color: "#2fc25b",
|
|
|
- data: [150, 186, 205, 155, 96, 84]
|
|
|
+ color: "#25a1ff",
|
|
|
+ data: sjglArr
|
|
|
},
|
|
|
{
|
|
|
- name: "折线",
|
|
|
+ name: "预测功率",
|
|
|
type: "line",
|
|
|
- color: "#2fc25b",
|
|
|
- data: [120, 140, 105, 170, 95, 160]
|
|
|
- },
|
|
|
- {
|
|
|
- name: "点",
|
|
|
- index: 2,
|
|
|
- type: "point",
|
|
|
- color: "#f04864",
|
|
|
- data: [100, 80, 125, 150, 112, 132]
|
|
|
+ color: "#bc39aa",
|
|
|
+ data: ycglArr
|
|
|
}
|
|
|
]
|
|
|
};
|
|
|
this.optsLine = opts
|
|
|
this.chartDataLine = JSON.parse(JSON.stringify(res));
|
|
|
},
|
|
|
+ changTimeSV(date) {
|
|
|
+ let str = ''
|
|
|
+ if (date < 10) {
|
|
|
+ str = '0' + date + ':00'
|
|
|
+ } else {
|
|
|
+ str = date + ':00'
|
|
|
+ }
|
|
|
+ return str
|
|
|
+ },
|
|
|
changePowerTab(item) {
|
|
|
this.powerTabData.forEach(it => {
|
|
|
it.showColor = false
|
|
@@ -357,12 +422,14 @@
|
|
|
}
|
|
|
})
|
|
|
if (this.powerTab === 'DL') {
|
|
|
- this.getPowerBar()
|
|
|
+ this.getCompanyData()
|
|
|
} else {
|
|
|
- this.getLineBar()
|
|
|
+ this.getCompanyEleData()
|
|
|
+ this.getcockpitPowercurve()
|
|
|
}
|
|
|
},
|
|
|
changeYearTab(item) {
|
|
|
+ this.powerProgressData = []
|
|
|
this.yearData.forEach(it => {
|
|
|
it.showColor = false
|
|
|
if (it.nameEN === item.nameEN) {
|
|
@@ -370,6 +437,7 @@
|
|
|
this.yearTab = it.nameEN
|
|
|
}
|
|
|
})
|
|
|
+ this.getCompanyData()
|
|
|
},
|
|
|
showProgress(item, index) {
|
|
|
let indexX = index
|
|
@@ -379,7 +447,12 @@
|
|
|
let proColor = ['#6C4B9E', '#323A97', '#4951B2', '#4287FF', '#3CB8FE', '#1AA7B5', '#5183B6', '#9F65C1',
|
|
|
'#766FF1'
|
|
|
]
|
|
|
- let pro = ((item.inPower / item.allPower).toFixed(2)) * 100 + '%'
|
|
|
+ let pro = ((item.inPower / item.allPower).toFixed(2)) * 100
|
|
|
+ if (pro > 100) {
|
|
|
+ pro = '100%'
|
|
|
+ } else {
|
|
|
+ pro = pro + '%'
|
|
|
+ }
|
|
|
let showColor = proColor[indexX]
|
|
|
let ss = `width: ${pro};background: ${showColor}`
|
|
|
return ss
|
|
@@ -574,6 +647,11 @@
|
|
|
|
|
|
text {
|
|
|
margin-left: 5px;
|
|
|
+ width: 100%;
|
|
|
+ display: inline-block;
|
|
|
+ overflow: hidden;
|
|
|
+ white-space: nowrap;
|
|
|
+ text-overflow: ellipsis;
|
|
|
}
|
|
|
}
|
|
|
|