|
@@ -3,7 +3,7 @@
|
|
|
<div class="query mg-b-8">
|
|
|
<div class="query-items">
|
|
|
<div class="query-item">
|
|
|
- <div class="lable">类型:</div>
|
|
|
+ <div class="lable">维度:</div>
|
|
|
<div class="search-input">
|
|
|
<el-select v-model="typeId" clearable placeholder="请选择"
|
|
|
popper-class="select" @change="renderWprray">
|
|
@@ -12,15 +12,6 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="query-item">
|
|
|
- <div class="lable">场站:</div>
|
|
|
- <div class="search-input">
|
|
|
- <el-select v-model="wpId" clearable placeholder="请选择"
|
|
|
- popper-class="select">
|
|
|
- <el-option v-for="item in wpArray" :key="item.id" :value="item.id" :label="item.name" />
|
|
|
- </el-select>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="query-item">
|
|
|
<div class="lable">开始日期:</div>
|
|
|
<div class="search-input">
|
|
|
<el-date-picker v-model="beginDate" type="date"
|
|
@@ -44,21 +35,22 @@
|
|
|
<div class="df-table">
|
|
|
<ComTable height="100vh" :data="tableData"></ComTable>
|
|
|
</div>
|
|
|
- <el-dialog title="切入切出风速整合历史" v-model="dialogShow" width="85%" top="10vh" custom-class="modal" :close-on-click-modal="true" @closed="dialogType = ''">
|
|
|
- <ComTable height="100vh" :data="tableHistoryData"></ComTable>
|
|
|
- </el-dialog>
|
|
|
+ <!-- <Mlc height="650px" :list="chartData" :units="chartUnit" :showLegend="true" /> -->
|
|
|
+ <Lbc height="650px" :list="chartData" :units="chartUnit" :showLegend="true" />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import ComTable from "@com/coms/table/table.vue";
|
|
|
+import Lbc from "@com/chart/bar/multiple-bar-chart.vue";
|
|
|
export default {
|
|
|
// 名称
|
|
|
name: "cutAnalyse",
|
|
|
|
|
|
// 使用组件
|
|
|
components: {
|
|
|
- ComTable
|
|
|
+ ComTable,
|
|
|
+ Lbc
|
|
|
},
|
|
|
|
|
|
// 数据
|
|
@@ -67,13 +59,16 @@ export default {
|
|
|
return {
|
|
|
isAsc:"asc",
|
|
|
typeArray:[{
|
|
|
- id:"-1",
|
|
|
- name:"风场"
|
|
|
+ id:"1",
|
|
|
+ name:"按报警统计"
|
|
|
},{
|
|
|
- id:"-2",
|
|
|
- name:"光伏电站"
|
|
|
+ id:"2",
|
|
|
+ name:"按报警分类统计"
|
|
|
+ },{
|
|
|
+ id:"3",
|
|
|
+ name:"按厂家统"
|
|
|
}],
|
|
|
- typeId:"-1",
|
|
|
+ typeId:"1",
|
|
|
wpArray:[],
|
|
|
wpId:"",
|
|
|
beginDate:new Date((new Date().getTime() - 3600 * 1000 * 24)).formatDate("yyyy-MM-dd"),
|
|
@@ -82,57 +77,35 @@ export default {
|
|
|
tableData: {
|
|
|
column: [
|
|
|
{
|
|
|
- name: "风场",
|
|
|
- field: "windfarm",
|
|
|
- is_num: false,
|
|
|
- is_light: false,
|
|
|
- sortable: true
|
|
|
- },
|
|
|
- {
|
|
|
- name: "风机",
|
|
|
- field: "windturbine",
|
|
|
+ name: "序号",
|
|
|
+ field: "index",
|
|
|
is_num: false,
|
|
|
is_light: false,
|
|
|
sortable: true
|
|
|
},
|
|
|
{
|
|
|
- name: "起始日期",
|
|
|
- field: "beginDate",
|
|
|
+ name: "名称",
|
|
|
+ field: "name",
|
|
|
is_num: false,
|
|
|
is_light: false,
|
|
|
sortable: true
|
|
|
},
|
|
|
{
|
|
|
- name: "截止日期",
|
|
|
- field: "endDate",
|
|
|
- is_num: false,
|
|
|
- is_light: false,
|
|
|
- sortable: true
|
|
|
- },
|
|
|
- {
|
|
|
- name: "平均风速",
|
|
|
- field: "speed",
|
|
|
- is_num: false,
|
|
|
- is_light: false,
|
|
|
- sortable: true
|
|
|
- },
|
|
|
- {
|
|
|
- name: "平均功率",
|
|
|
- field: "power",
|
|
|
- is_num: false,
|
|
|
- is_light: false,
|
|
|
- sortable: true
|
|
|
- },
|
|
|
- {
|
|
|
- name: "平均效率",
|
|
|
- field: "generatingCapacity",
|
|
|
+ name: "频率(次)",
|
|
|
+ field: "frequencyday",
|
|
|
is_num: false,
|
|
|
is_light: false,
|
|
|
sortable: true
|
|
|
}
|
|
|
],
|
|
|
data: [],
|
|
|
- }
|
|
|
+ },
|
|
|
+ chartData: [{
|
|
|
+ title: "",
|
|
|
+ yAxisIndex: 0,
|
|
|
+ value: []
|
|
|
+ }],
|
|
|
+ chartUnit: ["(次)"]
|
|
|
};
|
|
|
},
|
|
|
|
|
@@ -141,49 +114,15 @@ export default {
|
|
|
// 请求服务
|
|
|
requestData() {
|
|
|
let that = this;
|
|
|
- that.API.requestData({
|
|
|
- method: "GET",
|
|
|
- subUrl: "powercompare/windfarmAllAjax",
|
|
|
- data:{
|
|
|
- type:that.typeId
|
|
|
- },
|
|
|
- success(res) {
|
|
|
- that.allWpArray = res.data;
|
|
|
- that.renderWprray();
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
-
|
|
|
- renderWprray(){
|
|
|
- let wpArray = [];
|
|
|
- this.allWpArray.forEach(ele=>{
|
|
|
- if(this.typeId === "-1"){
|
|
|
- if(ele.id.indexOf("FDC") !== -1){
|
|
|
- wpArray.push(ele);
|
|
|
- }
|
|
|
- }else{
|
|
|
- if(ele.id.indexOf("GDC") !== -1){
|
|
|
- wpArray.push(ele);
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
- this.wpId = wpArray[0].id;
|
|
|
- this.wpArray = wpArray;
|
|
|
- this.getOutputSpeedList();
|
|
|
- },
|
|
|
-
|
|
|
- getOutputSpeedList(){
|
|
|
- let that = this;
|
|
|
if(!that.typeId || !that.beginDate || !that.endDate){
|
|
|
that.BASE.showMsg({
|
|
|
- msg:"类型与日期不可为空"
|
|
|
+ msg:"维度与日期不可为空"
|
|
|
});
|
|
|
}else{
|
|
|
that.API.requestData({
|
|
|
method: "POST",
|
|
|
- subUrl: "leaderboard/loadfactortoplist",
|
|
|
+ subUrl: "leaderboard/querywarningStatistical",
|
|
|
data:{
|
|
|
- wpId:that.wpId,
|
|
|
type:that.typeId,
|
|
|
isAsc:that.isAsc,
|
|
|
beginDate:that.beginDate,
|
|
@@ -191,19 +130,29 @@ export default {
|
|
|
orderByColumn:"",
|
|
|
},
|
|
|
success(res) {
|
|
|
- res.data.forEach(ele=>{
|
|
|
- ele.beginDate=new Date(ele.beginDate).formatDate("yyyy-MM-dd");
|
|
|
- ele.endDate=new Date(ele.beginDate).formatDate("yyyy-MM-dd");
|
|
|
- })
|
|
|
+ let chartData = [];
|
|
|
+
|
|
|
+ res.data.forEach((ele, index) => {
|
|
|
+ ele.index = (index + 1);
|
|
|
+ chartData.push({
|
|
|
+ title: ele.name,
|
|
|
+ yAxisIndex: 0,
|
|
|
+ value: [{
|
|
|
+ text: ele.name,
|
|
|
+ value: ele.frequencyday,
|
|
|
+ }]
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+ that.chartData = chartData;
|
|
|
that.tableData.data = res.data;
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
-
|
|
|
},
|
|
|
|
|
|
search(){
|
|
|
- this.getOutputSpeedList();
|
|
|
+ this.requestData();
|
|
|
}
|
|
|
},
|
|
|
|