|
@@ -14,7 +14,7 @@
|
|
:label-col="{span:8}">
|
|
:label-col="{span:8}">
|
|
<a-range-picker format="YYYY-MM-DD"
|
|
<a-range-picker format="YYYY-MM-DD"
|
|
v-model:value="formState.days"
|
|
v-model:value="formState.days"
|
|
- :placeholder="['开始日期', '结束日期']" @change="onRangeChange"/>
|
|
|
|
|
|
+ :placeholder="['开始日期', '结束日期']"/>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
|
|
|
|
@@ -53,7 +53,7 @@
|
|
<div class="echarts-total">
|
|
<div class="echarts-total">
|
|
<span style="font-weight: bold;padding-right: 10px">统计区间:</span>
|
|
<span style="font-weight: bold;padding-right: 10px">统计区间:</span>
|
|
<template v-for="(it) in getTotals()">
|
|
<template v-for="(it) in getTotals()">
|
|
- <span style="color: #2f54eb; font-weight: bold;">{{it.name}}</span> : {{it.total!=null? parseFloat( it.total).toFixed(3):0}}{{it.unit}}
|
|
|
|
|
|
+ <span :style="{color: it.color, fontWeight: 'bold'}">{{it.name}}</span> : {{it.total!=null? parseFloat( it.total).toFixed(3):0}}{{it.unit}}
|
|
</template>
|
|
</template>
|
|
</div>
|
|
</div>
|
|
<div class="echart" :id="('chart-'+id)" :style="getChartStyle()"></div>
|
|
<div class="echart" :id="('chart-'+id)" :style="getChartStyle()"></div>
|
|
@@ -139,6 +139,18 @@
|
|
this.getTotals();
|
|
this.getTotals();
|
|
this.readerChart();
|
|
this.readerChart();
|
|
},
|
|
},
|
|
|
|
+ // onRangeChange:async function (){
|
|
|
|
+ // let result = await get('/factwell/getFactWellListByTime', {
|
|
|
|
+ // wellId : this.wellId,
|
|
|
|
+ // timeType : this.formState.timeType,
|
|
|
|
+ // startTime : this.formState.startTime,
|
|
|
|
+ // endTime : this.formState.endTime
|
|
|
|
+ // });
|
|
|
|
+ // this.datas = result.rows;
|
|
|
|
+ //
|
|
|
|
+ // this.getTotals();
|
|
|
|
+ // this.readerChart();
|
|
|
|
+ // },
|
|
initTimeLimit:function (){
|
|
initTimeLimit:function (){
|
|
if(this.formState.days[0]==null && this.formState.days[1]==null){
|
|
if(this.formState.days[0]==null && this.formState.days[1]==null){
|
|
let timeResult = this.timeList.filter(row=>{
|
|
let timeResult = this.timeList.filter(row=>{
|
|
@@ -163,12 +175,12 @@
|
|
{label:'年', value:'year'}];
|
|
{label:'年', value:'year'}];
|
|
},
|
|
},
|
|
getTypeOptions:function (){
|
|
getTypeOptions:function (){
|
|
- return [{label:'产油量', leiLabel:'累产油量', value:'oil', unit:'(万吨)'},
|
|
|
|
- {label:'产水量', leiLabel:'累产水量', value:'water', unit:'(万吨)'},
|
|
|
|
- {label:'产液量', leiLabel:'累产液量', value:'fluid', unit:'(万吨)'},
|
|
|
|
- {label:'产气量', leiLabel:'累产气量', value:'gas', unit:'(立方米)'},
|
|
|
|
- {label:'含水率', leiLabel:'含水率', value:'watercut', unit:'(%)'},
|
|
|
|
- {label:'注水量', leiLabel:'累注水量', value:'vol', unit:'(万吨)'}
|
|
|
|
|
|
+ return [{label:'产油量', leiLabel:'累产油量', value:'oil', unit:'(万吨)', color: '#e33e48'},
|
|
|
|
+ {label:'产水量', leiLabel:'累产水量', value:'water', unit:'(万吨)', color: '#800080'},
|
|
|
|
+ {label:'产液量', leiLabel:'累产液量', value:'fluid', unit:'(万吨)', color: '#762126'},
|
|
|
|
+ {label:'产气量', leiLabel:'累产气量', value:'gas', unit:'(立方米)', color: '#f0a1c4'},
|
|
|
|
+ {label:'含水率', leiLabel:'含水率', value:'watercut', unit:'(%)', color: '#695ef5'},
|
|
|
|
+ {label:'注水量', leiLabel:'累注水量', value:'vol', unit:'(万吨)', color: '#2af62d'}
|
|
];
|
|
];
|
|
},
|
|
},
|
|
getTypes:function (){
|
|
getTypes:function (){
|
|
@@ -181,6 +193,11 @@
|
|
return item.label==label;
|
|
return item.label==label;
|
|
})[0].unit;
|
|
})[0].unit;
|
|
},
|
|
},
|
|
|
|
+ getTypeColor:function ( label: any ){
|
|
|
|
+ return this.getTypeOptions().filter((item) => {
|
|
|
|
+ return item.label==label;
|
|
|
|
+ })[0].color;
|
|
|
|
+ },
|
|
getxDatas:function (){
|
|
getxDatas:function (){
|
|
//根据后台数据生成需要显示的数据集
|
|
//根据后台数据生成需要显示的数据集
|
|
let arys = (this.datas as any).map((item) => {
|
|
let arys = (this.datas as any).map((item) => {
|
|
@@ -247,7 +264,9 @@
|
|
for(let i=0;i< showList.length;i++){
|
|
for(let i=0;i< showList.length;i++){
|
|
let row = { xAxisIndex : this.getGridIndex(i), yAxisIndex: this.getGridIndex(i),
|
|
let row = { xAxisIndex : this.getGridIndex(i), yAxisIndex: this.getGridIndex(i),
|
|
type : this.serieType, data: yDatas[i] ,
|
|
type : this.serieType, data: yDatas[i] ,
|
|
- name : i<=1?showList[i].label: null};
|
|
|
|
|
|
+ name : i<=1?showList[i].label: null,
|
|
|
|
+ itemStyle:{color: this.getTypeColor(showList[i].label)}
|
|
|
|
+ };
|
|
series.push(row);
|
|
series.push(row);
|
|
}
|
|
}
|
|
console.log("getSeries",series);
|
|
console.log("getSeries",series);
|
|
@@ -275,7 +294,8 @@
|
|
totals.push({
|
|
totals.push({
|
|
name:showList[i].leiLabel,
|
|
name:showList[i].leiLabel,
|
|
total : total,
|
|
total : total,
|
|
- unit : this.getTypeUnit(showList[i].label)
|
|
|
|
|
|
+ unit : this.getTypeUnit(showList[i].label),
|
|
|
|
+ color: this.getTypeColor(showList[i].label)
|
|
});
|
|
});
|
|
}
|
|
}
|
|
console.log("getTotals",totals);
|
|
console.log("getTotals",totals);
|
|
@@ -284,6 +304,7 @@
|
|
readerChart: function () {
|
|
readerChart: function () {
|
|
const option = {
|
|
const option = {
|
|
tooltip: { trigger: 'item', triggerOn:"mousemove",showContent:true },
|
|
tooltip: { trigger: 'item', triggerOn:"mousemove",showContent:true },
|
|
|
|
+ toolbox: { feature: { saveAsImage: {} } },
|
|
grid: this.getGrids(),
|
|
grid: this.getGrids(),
|
|
xAxis: this.getxAxis(),
|
|
xAxis: this.getxAxis(),
|
|
yAxis: this.getyAxis(),
|
|
yAxis: this.getyAxis(),
|