| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026 |
- <template>
- <el-container>
- <el-header>
- <el-row>
- <el-col :span="24">
- <el-card style="height: 30px">
- <div class="grid-content bg-purple-dark">
- <span>电量绩效榜</span>
- </div>
- </el-card>
- </el-col>
- </el-row>
- </el-header>
- <el-main>
- <el-card>
- <el-form :inline="true" :model="formInline" class="demo-form-inline">
- <el-row :gutter="1">
- <el-form-item label="风场">
- <el-input
- v-model="formInline.wpIds"
- id="windfarm"
- placeholder="风场"
- ></el-input>
- </el-form-item>
- <el-form-item label="项目">
- <el-input
- v-model="formInline.project"
- id="project"
- placeholder="项目"
- @focus="checkwindfarm"
- ></el-input>
- </el-form-item>
- <el-form-item label="线路">
- <el-input
- v-model="formInline.line"
- id="line"
- placeholder="线路"
- @focus="checkproject"
- ></el-input>
- </el-form-item>
- <el-form-item label="开始时间">
- <el-date-picker
- v-model="beginDate"
- type="date"
- placeholder="选择日期"
- >
- </el-date-picker>
- </el-form-item>
- <el-form-item label="结束时间">
- <el-date-picker
- v-model="endDate"
- type="date"
- placeholder="选择日期"
- >
- </el-date-picker>
- </el-form-item>
- <el-form-item>
- <el-button type="primary" @click="queryPowerAll" :plain="true"
- >查询</el-button
- >
- </el-form-item>
- <el-form-item>
- <el-button type="primary" @click="queryApDataMx"
- >明细信息</el-button
- >
- </el-form-item>
- <el-form-item>
- <el-button type="primary" @click="toExcel">导出</el-button>
- </el-form-item>
- </el-row>
- </el-form>
- <el-tabs
- v-model="activeName"
- type="card"
- @tab-click="handleClick"
- style="height: 100%; width: 100%"
- >
- <el-tab-pane label="风场" name="first" id="fc">
- <el-row
- style="
- width: 100%;
- height: 100%;
- display: flex;
- justify-content: space-between;
- "
- >
- <el-card
- shadow="always"
- ref="fc_zzt_card"
- style="
- height: 440px;
- width: 45%;
- display: table-cell;
- vertical-align: middle;
- "
- >
- <div
- id="histogram_fc"
- ref="fc_zzt"
- style="width: 800px; height: 400px; margin: auto"
- ></div>
- </el-card>
- <el-card
- shadow="always"
- style="width: 45%"
- height="400px"
- id="moban"
- >
- <el-table
- id="fc_table"
- :data="fc_date"
- style="width: 100%"
- max-height="400px"
- >
- <el-table-column label="项目列表">
- <el-table-column fixed type="index" width="45">
- </el-table-column>
- <el-table-column prop="wtName" label="名称" width="150">
- </el-table-column>
- <el-table-column
- prop="total"
- label="理论发电量"
- width="120"
- >
- </el-table-column>
- <el-table-column
- prop="daydl2"
- label="SCADA发电量"
- width="120"
- >
- </el-table-column>
- <el-table-column prop="dayspeed" label="风速" width="120">
- </el-table-column>
- <el-table-column
- prop="daynhgzssdl"
- label="非计划检修"
- width="300"
- >
- </el-table-column>
- <el-table-column
- prop="daynhwhssdl"
- label="计划检修"
- width="120"
- >
- </el-table-column>
- <el-table-column prop="daynhcfdl" label="受累" width="120">
- </el-table-column>
- <el-table-column
- prop="daynhxdssdl"
- label="限电"
- width="120"
- >
- </el-table-column>
- <el-table-column
- prop="daynhxdssdl"
- label="性能"
- width="120"
- >
- </el-table-column>
- <el-table-column prop="lyl" label="风能利用率%" width="120">
- </el-table-column>
- </el-table-column>
- </el-table>
- </el-card>
- </el-row>
- </el-tab-pane>
- <el-tab-pane label="项目" name="second" id="xm">
- <el-row
- style="
- width: 100%;
- height: 100%;
- display: flex;
- justify-content: space-between;
- "
- >
- <el-card
- shadow="always"
- style="
- height: 440px;
- width: 45%;
- display: table-cell;
- vertical-align: middle;
- "
- >
- <div
- id="histogram_xm"
- style="width: 800px; height: 400px; margin: auto"
- ></div>
- </el-card>
- <el-card
- shadow="always"
- style="width: 45%"
- height="400px"
- id="moban"
- >
- <el-table
- id="pj_table"
- :data="pj_date"
- style="width: 100%"
- max-height="400px"
- >
- <el-table-column label="项目列表">
- <el-table-column fixed type="index" width="45">
- </el-table-column>
- <el-table-column prop="wtName" label="名称" width="150">
- </el-table-column>
- <el-table-column
- prop="total"
- label="理论发电量"
- width="120"
- >
- </el-table-column>
- <el-table-column
- prop="daydl2"
- label="SCADA发电量"
- width="120"
- >
- </el-table-column>
- <el-table-column prop="dayspeed" label="风速" width="120">
- </el-table-column>
- <el-table-column
- prop="daynhgzssdl"
- label="非计划检修"
- width="300"
- >
- </el-table-column>
- <el-table-column
- prop="daynhwhssdl"
- label="计划检修"
- width="120"
- >
- </el-table-column>
- <el-table-column prop="daynhcfdl" label="受累" width="120">
- </el-table-column>
- <el-table-column
- prop="daynhxdssdl"
- label="限电"
- width="120"
- >
- </el-table-column>
- <el-table-column
- prop="daynhxdssdl"
- label="性能"
- width="120"
- >
- </el-table-column>
- <el-table-column prop="lyl" label="风能利用率%" width="120">
- </el-table-column>
- </el-table-column>
- </el-table>
- </el-card>
- </el-row>
- </el-tab-pane>
- <el-tab-pane label="集电线路" name="jdxl" id="jdxl">
- <el-row
- style="
- width: 100%;
- height: 100%;
- display: flex;
- justify-content: space-between;
- "
- >
- <el-card
- shadow="always"
- style="
- width: 45%;
- display: table-cell;
- vertical-align: middle;
- "
- >
- <div
- id="histogram_jdxl"
- style="width: 800px; margin: auto"
- :style="{height : judge === true ? '1200px' : '600px'}"
- ></div>
- </el-card>
- <el-card
- shadow="always"
- style="width: 45%"
- height="400px"
- id="moban"
- >
- <el-table
- id="xl_table"
- :data="xl_date"
- style="width: 100%"
- max-height="600px"
- >
- <el-table-column label="项目列表">
- <el-table-column fixed type="index" width="45">
- </el-table-column>
- <el-table-column prop="wtName" label="名称" width="150">
- </el-table-column>
- <el-table-column
- prop="total"
- label="理论发电量"
- width="120"
- >
- </el-table-column>
- <el-table-column
- prop="daydl2"
- label="SCADA发电量"
- width="120"
- >
- </el-table-column>
- <el-table-column prop="dayspeed" label="风速" width="120">
- </el-table-column>
- <el-table-column
- prop="daynhgzssdl"
- label="非计划检修"
- width="300"
- >
- </el-table-column>
- <el-table-column
- prop="daynhwhssdl"
- label="计划检修"
- width="120"
- >
- </el-table-column>
- <el-table-column prop="daynhcfdl" label="受累" width="120">
- </el-table-column>
- <el-table-column
- prop="daynhxdssdl"
- label="限电"
- width="120"
- >
- </el-table-column>
- <el-table-column
- prop="daynhxdssdl"
- label="性能"
- width="120"
- >
- </el-table-column>
- <el-table-column prop="lyl" label="风能利用率%" width="120">
- </el-table-column>
- </el-table-column>
- </el-table>
- </el-card>
- </el-row>
- </el-tab-pane>
- </el-tabs>
- </el-card>
- </el-main>
- </el-container>
- </template>
- <script>
- import * as echarts from "echarts";
- import excelHelper from "@/utils/excelHelper";
- export default {
- data() {
- return {
- judge:true,
- autoHeight:1200,
- formInline: {
- wpIds: "NSS_FDC",
- project: "NSS01_GC",
- line: "NSS01_XL",
- },
- fc_date: [],
- pj_date: [],
- xl_date: [],
- beginDate: "2021-01-01",
- endDate: "2021-01-02",
- activeName: "first",
- tableid: "fc",
- celname: [],
- histogram_fc: {},
- histogram_xm: {},
- histogram_jdxl: {},
- table_fc: {},
- table_xm: {},
- table_jdxl: {},
- queryAll_querybutton: {},
- };
- },
- methods: {
- onSubmit() {
- console.log("submit!");
- },
- handleClick(tab) {
- if (tab.name === "first") {
- this.tableid = "fc";
- this.query();
- } else if (tab.name === "second") {
- this.tableid = "pj";
- this.query();
- } else if (tab.name === "jdxl") {
- this.tableid = "xl";
- this.query();
- }
- },
- deleteRow(index, rows) {
- rows.splice(index, 1);
- },
- query() {
- this.fc_date = "";
- this.xl_date = "";
- this.pj_date = "";
- this.$http
- .get(
- "powercompare/queryPowerAll?wpIds=" +
- this.formInline.wpIds +
- "&beginDate=" +
- this.beginDate +
- "&endDate=" +
- this.endDate +
- "&queryType=" +
- this.tableid
- )
- .then((res) => {
- let that = this;
- if (this.tableid === "fc") {
- that.drawhistogram_fc(res.data.data);
- } else if (this.tableid === "pj") {
- that.drawhistogram_pj(res.data.data);
- } else if (this.tableid === "xl") {
- this.autoHeight = 1200;
- that.drawhistogram_xl(res.data.data);
- }
- });
- //表格数据获取
- this.$http
- .get(
- "powercompare/powerAjaxAll?wpIds=" +
- this.formInline.wpIds +
- "&beginDate=" +
- this.beginDate +
- "&endDate=" +
- this.endDate +
- "&queryType=" +
- this.tableid +
- "&sortName=" +
- this.formInline.wpIds +
- "&sortOrder=" +
- "Asc"
- )
- .then((res) => {
- let that = this;
- console.log(res);
- let queryAll_table = res.data.data;
- if (this.tableid === "fc") {
- that.fc_date = queryAll_table;
- } else if (this.tableid === "pj") {
- that.pj_date = queryAll_table;
- } else if (this.tableid === "xl") {
- that.xl_date = queryAll_table;
- }
- });
- },
- async queryPowerAll() {
- this.judge = false;
- this.autoHeight = 600;
- let that = this;
- if (this.beginDate == "" || this.endDate == "" || this.beginDate == undefined || this.endDate == undefined) {
- this.beginDate = "2021-01-01";
- that.endDate = "2021-01-02";
- that.$message.error("请选时间!");
- return;
- }
- this.fc_date = "";
- this.xl_date = "";
- this.pj_date = "";
-
- if (
- that.formInline.wpIds == "" ||
- that.formInline.wpIds == null ||
- that.formInline.wpIds == undefined
- ) {
- that.query();
- } else {
- this.$http
- .get(
- "powercompare/queryPower?wpIds=" +
- this.formInline.wpIds +
- "&pjIds=" +
- this.formInline.project +
- "&lineIds=" +
- this.formInline.line +
- "&beginDate=" +
- this.beginDate +
- "&endDate=" +
- this.endDate
- )
- .then((res) => {
- let that = this;
- let queryAll = res.data.data;
- if (this.tableid === "fc") {
- that.drawhistogram_fc(queryAll);
- } else if (this.tableid === "pj") {
- that.drawhistogram_pj(queryAll);
- } else if (this.tableid === "xl") {
- that.drawhistogram_xl(queryAll);
- }
- });
- this.$http
- .get(
- "powercompare/powerAjax?wpIds=" +
- this.formInline.wpIds +
- "&pjIds=" +
- this.formInline.project +
- "&lineIds=" +
- this.formInline.line +
- "&beginDate=" +
- this.beginDate +
- "&endDate=" +
- this.endDate +
- "&sortName=" +
- this.formInline.wpIds +
- "&sortOrder=" +
- "Asc"
- )
- .then((res) => {
- let that = this;
- let queryAll_table = res.data.data;
- if (this.tableid === "fc") {
- that.fc_date = queryAll_table;
- } else if (this.tableid === "pj") {
- that.pj_date = queryAll_table;
- } else if (this.tableid === "xl") {
- that.xl_date = queryAll_table;
- }
- });
- }
- },
- checkwindfarm() {
- if (this.formInline.windfarm == "") {
- this.$message.error("请选择风场!");
- return;
- }
- },
- checkproject() {
- if (this.formInline.project == "") {
- this.$message.error("请选择项目!");
- return;
- }
- if (new Date(this.timedate) == null) {
- this.$message.error("请选择时间");
- return;
- }
- },
- checktime() {
- if (new Date(this.timedate) == null) {
- this.$message.error("请选择时间");
- return;
- }
- },
- queryApDataMx() {
- this.$router.push({ path: "/new_performanceList_fan" });
- },
- toExcel() {
- let that = this;
- if (this.tableid === "fc") {
- excelHelper.exportExcel("fc_table","fc数据",".xls",true);
- } else if (this.tableid === "pj") {
- excelHelper.exportExcel("pj_table","pj数据",".xls",true);
- } else if (this.tableid === "xl") {
- excelHelper.exportExcel("xl_table","xl数据",".xls",true);
- }
-
- },
- drawhistogram_fc(date) {
- this.chartLine = echarts.init(document.getElementById("histogram_fc"));
- var option;
- option = {
- title: {
- text: "风机绩效榜单",
- left: 300,
- top: -5,
- textStyle: {
- fontSize: 13,
- },
- },
- tooltip: {
- trigger: "axis",
- axisPointer: {
- // Use axis to trigger tooltip
- type: "shadow", // 'shadow' as default; can also be 'line' or 'shadow'
- },
- },
- legend: {
- left: 15,
- top: 30,
- data: [
- "实发电量",
- "计划检修损失",
- "非计划检修损失",
- "限电损失",
- "受累损失",
- "性能损失",
- "总和",
- ],
- },
- grid: {
- left: "3%",
- right: "4%",
- bottom: "3%",
- containLabel: true,
- },
- xAxis: {
- type: "value",
- },
- yAxis: {
- type: "category",
- data: date.names,
- },
- series: [
- {
- name: "实发电量",
- type: "bar",
- stack: "total",
- label: {
- show: true,
- },
- emphasis: {
- focus: "series",
- },
- data: date.sfdl,
- },
- {
- name: "计划检修损失",
- type: "bar",
- stack: "total",
- label: {
- show: true,
- },
- emphasis: {
- focus: "series",
- },
- data: date.whdl,
- },
- {
- name: "非计划检修损失",
- type: "bar",
- stack: "total",
- label: {
- show: true,
- },
- emphasis: {
- focus: "series",
- },
- data: date.gzdl,
- },
- {
- name: "限电损失",
- type: "bar",
- stack: "total",
- label: {
- show: true,
- },
- emphasis: {
- focus: "series",
- },
- data: date.xddl,
- },
- {
- name: "受累损失",
- type: "bar",
- stack: "total",
- label: {
- show: true,
- },
- emphasis: {
- focus: "series",
- },
- data: date.sldl,
- },
- {
- name: "性能损失",
- type: "bar",
- stack: "total",
- label: {
- show: date.qfdl,
- },
- emphasis: {
- focus: "series",
- },
- data: date.qfdl,
- },
- //曲线
- {
- name: "总和",
- data: date.yfdl,
- type: "line",
- symbol: "circle",
- symbolSize: 20,
- lineStyle: {
- color: "#5470C6",
- width: 4,
- type: "dashed",
- },
- itemStyle: {
- borderWidth: 3,
- borderColor: "#EE6666",
- color: "yellow",
- },
- },
- ],
- };
- this.chartLine.setOption(option);
- },
- drawhistogram_pj(date) {
- this.chartLine = echarts.init(document.getElementById("histogram_xm"));
- var option;
- var option;
- option = {
- title: {
- text: "风机绩效榜单",
- left: 300,
- top: -5,
- textStyle: {
- fontSize: 13,
- },
- },
- tooltip: {
- trigger: "axis",
- axisPointer: {
- // Use axis to trigger tooltip
- type: "shadow", // 'shadow' as default; can also be 'line' or 'shadow'
- },
- },
- legend: {
- left: 15,
- top: 30,
- data: [
- "实发电量",
- "计划检修损失",
- "非计划检修损失",
- "限电损失",
- "受累损失",
- "性能损失",
- "总和",
- ],
- },
- grid: {
- left: "3%",
- right: "4%",
- bottom: "3%",
- containLabel: true,
- },
- xAxis: {
- type: "value",
- },
- yAxis: {
- type: "category",
- data: date.names,
- },
- series: [
- {
- name: "实发电量",
- type: "bar",
- stack: "total",
- label: {
- show: true,
- },
- emphasis: {
- focus: "series",
- },
- data: date.sfdl,
- },
- {
- name: "计划检修损失",
- type: "bar",
- stack: "total",
- label: {
- show: true,
- },
- emphasis: {
- focus: "series",
- },
- data: date.whdl,
- },
- {
- name: "非计划检修损失",
- type: "bar",
- stack: "total",
- label: {
- show: true,
- },
- emphasis: {
- focus: "series",
- },
- data: date.gzdl,
- },
- {
- name: "限电损失",
- type: "bar",
- stack: "total",
- label: {
- show: true,
- },
- emphasis: {
- focus: "series",
- },
- data: date.xddl,
- },
- {
- name: "受累损失",
- type: "bar",
- stack: "total",
- label: {
- show: true,
- },
- emphasis: {
- focus: "series",
- },
- data: date.sldl,
- },
- {
- name: "性能损失",
- type: "bar",
- stack: "total",
- label: {
- show: date.qfdl,
- },
- emphasis: {
- focus: "series",
- },
- data: date.qfdl,
- },
- //曲线
- {
- name: "总和",
- data: date.yfdl,
- type: "line",
- symbol: "circle",
- symbolSize: 20,
- lineStyle: {
- color: "#5470C6",
- width: 4,
- type: "dashed",
- },
- itemStyle: {
- borderWidth: 3,
- borderColor: "#EE6666",
- color: "yellow",
- },
- },
- ],
- };
- this.chartLine.setOption(option);
- },
- drawhistogram_xl(date) {
- this.chartLine = echarts.init(document.getElementById("histogram_jdxl"));
- this.chartLine.clear();
- this.chartLine.resize({height: this.autoHeight})
- var option;
- var option;
- option = {
- title: {
- text: "风机绩效榜单",
- left: 300,
- top: -5,
- textStyle: {
- fontSize: 13,
- },
- },
- tooltip: {
- trigger: "axis",
- axisPointer: {
- // Use axis to trigger tooltip
- type: "shadow", // 'shadow' as default; can also be 'line' or 'shadow'
- },
- },
- legend: {
- left: 15,
- top: 30,
- data: [
- "实发电量",
- "计划检修损失",
- "非计划检修损失",
- "限电损失",
- "受累损失",
- "性能损失",
- "总和",
- ],
- },
- grid: {
- left: "3%",
- right: "4%",
- bottom: "3%",
- containLabel: true,
- },
- xAxis: {
- type: "value",
- },
- yAxis: {
- type: "category",
- data: date.names,
- },
- series: [
- {
- name: "实发电量",
- type: "bar",
- stack: "total",
- label: {
- show: true,
- },
- emphasis: {
- focus: "series",
- },
- data: date.sfdl,
- },
- {
- name: "计划检修损失",
- type: "bar",
- stack: "total",
- label: {
- show: true,
- },
- emphasis: {
- focus: "series",
- },
- data: date.whdl,
- },
- {
- name: "非计划检修损失",
- type: "bar",
- stack: "total",
- label: {
- show: true,
- },
- emphasis: {
- focus: "series",
- },
- data: date.gzdl,
- },
- {
- name: "限电损失",
- type: "bar",
- stack: "total",
- label: {
- show: true,
- },
- emphasis: {
- focus: "series",
- },
- data: date.xddl,
- },
- {
- name: "受累损失",
- type: "bar",
- stack: "total",
- label: {
- show: true,
- },
- emphasis: {
- focus: "series",
- },
- data: date.sldl,
- },
- {
- name: "性能损失",
- type: "bar",
- stack: "total",
- label: {
- show: date.qfdl,
- },
- emphasis: {
- focus: "series",
- },
- data: date.qfdl,
- },
- //曲线
- {
- name: "总和",
- data: date.yfdl,
- type: "line",
- symbol: "circle",
- symbolSize: 20,
- lineStyle: {
- color: "#5470C6",
- width: 4,
- type: "dashed",
- },
- itemStyle: {
- borderWidth: 3,
- borderColor: "#EE6666",
- color: "yellow",
- },
- },
- ],
- };
- this.chartLine.setOption(option);
- },
- },
- mounted() {
- this.query();
- },
- };
- </script>
- <style scoped>
- .bg-purple-dark {
- background: #fff;
- }
- .grid-content {
- border-radius: 2px;
- min-height: 36px;
- margin-top: -15px;
- }
- .item {
- margin-top: 10px;
- margin-right: 40px;
- }
- .el-row {
- margin: 10px;
- }
- </style>
|