|
@@ -24,7 +24,7 @@
|
|
|
<el-form-item label="风场">
|
|
|
<el-select v-model="fc" clearable placeholder="请选择">
|
|
|
<el-option
|
|
|
- v-for="item in FClist"
|
|
|
+ v-for="item in list"
|
|
|
:key="item.id"
|
|
|
:label="item.name"
|
|
|
:value="item.id"
|
|
@@ -36,6 +36,7 @@
|
|
|
<el-form-item label="开始时间">
|
|
|
<el-date-picker
|
|
|
v-model="beginDate"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
type="date"
|
|
|
placeholder="选择日期"
|
|
|
>
|
|
@@ -45,6 +46,7 @@
|
|
|
<el-form-item label="结束时间">
|
|
|
<el-date-picker
|
|
|
v-model="endDate"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
type="date"
|
|
|
placeholder="选择日期"
|
|
|
>
|
|
@@ -58,18 +60,19 @@
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item>
|
|
|
- <el-button type="primary" @click="toExcel" :plain="true">导出</el-button>
|
|
|
+ <el-button type="primary" @click="toExcel" :plain="true"
|
|
|
+ >导出</el-button
|
|
|
+ >
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</el-row>
|
|
|
</el-card>
|
|
|
-
|
|
|
</el-header>
|
|
|
|
|
|
<el-main>
|
|
|
<el-card style="margin-top: 20px; height: 666px">
|
|
|
<el-table
|
|
|
- id="tableData"
|
|
|
+ id="tableData"
|
|
|
:data="tableData"
|
|
|
style="width: 100%; font-size: 1px"
|
|
|
:cell-style="{ textAlign: 'center' }"
|
|
@@ -87,12 +90,7 @@
|
|
|
width="190"
|
|
|
>
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- sortable
|
|
|
- prop="windfarm"
|
|
|
- label="风场"
|
|
|
- width="280"
|
|
|
- >
|
|
|
+ <el-table-column sortable prop="windfarm" label="风场" width="280">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
sortable
|
|
@@ -105,11 +103,19 @@
|
|
|
sortable
|
|
|
prop="beginDate"
|
|
|
:formatter="filter_bdate"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
label="起始时间"
|
|
|
width="280"
|
|
|
>
|
|
|
</el-table-column>
|
|
|
- <el-table-column sortable prop="endDate" :formatter="filter_edate" label="截至日期" width="180">
|
|
|
+ <el-table-column
|
|
|
+ sortable
|
|
|
+ prop="endDate"
|
|
|
+ :formatter="filter_edate"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ label="截至日期"
|
|
|
+ width="180"
|
|
|
+ >
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
sortable
|
|
@@ -140,23 +146,13 @@ import excelHelper from "@/utils/excelHelper";
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
- FClist: {},
|
|
|
+ list:[],
|
|
|
+ FClist: [],
|
|
|
GFlist: [
|
|
|
- { name: "大武口光伏电站", id: "DWK_GDC" },
|
|
|
- { name: "平罗光伏电站", id: "PL_GDC" },
|
|
|
- { name: "宣和光伏电站", id: "XH_GDC" },
|
|
|
- { name: "马场湖光伏电站", id: "MCH_GDC" },
|
|
|
+
|
|
|
],
|
|
|
QBlist: [
|
|
|
- { name: "大武口光伏电站", id: "DWK_GDC" },
|
|
|
- { name: "平罗光伏电站", id: "PL_GDC" },
|
|
|
- { name: "宣和光伏电站", id: "XH_GDC" },
|
|
|
- { name: "马场湖光伏电站", id: "MCH_GDC" },
|
|
|
- { name: "青山风电站", id: "QS_FDC" },
|
|
|
- { name: "香山风电站", id: "XS_FDC" },
|
|
|
- { name: "麻黄山风电站", id: "MHS_FDC" },
|
|
|
- { name: "牛首山风电站", id: "NSS_FDC" },
|
|
|
- { name: "石板泉风电站", id: "SBQ_FDC" },
|
|
|
+
|
|
|
],
|
|
|
lxlist: [
|
|
|
{
|
|
@@ -182,22 +178,35 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
check_lx() {
|
|
|
- this.fc="";
|
|
|
+ this.fc = "";
|
|
|
if (this.lx == "fc") {
|
|
|
- this.FClist={};
|
|
|
- this.query_fc();
|
|
|
+ this.list={};
|
|
|
+ this.list = this.FClist;
|
|
|
} else if (this.lx == "gf") {
|
|
|
- this.FClist={};
|
|
|
- this.FClist = this.GFlist;
|
|
|
- }else if(this.lx=="qb"){
|
|
|
- this.FClist={};
|
|
|
- this.FClist = this.QBlist;
|
|
|
+ this.list = {};
|
|
|
+ this.list = this.GFlist;
|
|
|
+ } else if (this.lx == "qb") {
|
|
|
+ this.list = {};
|
|
|
+ this.list = this.QBlist;
|
|
|
}
|
|
|
},
|
|
|
query_fc() {
|
|
|
- this.$http.get("powercompare/windfarmAjax?").then((res) => {
|
|
|
- this.FClist = res.data.data;
|
|
|
- });
|
|
|
+ let that = this;
|
|
|
+ let fjj="";
|
|
|
+ this.$http.get("powercompare/windfarmAllAjax?").then((res) => {
|
|
|
+ this.QBlist = res.data.data;
|
|
|
+
|
|
|
+ for (let i = 0; i < Object.keys(this.QBlist).length; i++) {
|
|
|
+ fjj = "";
|
|
|
+ fjj = this.QBlist[i].id;
|
|
|
+ if (fjj.endsWith("FDC")) {
|
|
|
+ that.FClist.push(this.QBlist[i]);
|
|
|
+ } else {
|
|
|
+ that.GFlist.push(this.QBlist[i]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.list = this.QBlist;
|
|
|
+ });
|
|
|
},
|
|
|
query_table() {
|
|
|
this.$http
|
|
@@ -224,7 +233,7 @@ export default {
|
|
|
},
|
|
|
toExcel() {
|
|
|
let that = this;
|
|
|
- excelHelper.exportExcel("tableData", "总发电量排行", ".xls", true);
|
|
|
+ excelHelper.exportExcel("tableData", "总发电量排行", ".xls", true);
|
|
|
},
|
|
|
headStyle() {
|
|
|
return "text-align:center";
|
|
@@ -250,10 +259,9 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
mounted() {
|
|
|
- this.check_lx();
|
|
|
+ this.query_fc();
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
|
<style scoped>
|
|
|
-
|
|
|
</style>
|