|
@@ -1,76 +1,71 @@
|
|
|
<template>
|
|
|
<div class="draught-fan-list">
|
|
|
<div class="query mg-b-8">
|
|
|
- <div class="query-items">
|
|
|
- <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="recorddate" type="date"
|
|
|
- value-format="YYYY-MM-DD" placeholder="选择日期" popper-class="date-select">
|
|
|
- </el-date-picker>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="query-actions">
|
|
|
- <button class="btn green" @click="search">查询</button>
|
|
|
- <button class="btn green" @click="exportExcel">导出</button>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ <div class="query-items">
|
|
|
+ <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="recorddate" type="date" value-format="YYYY-MM-DD" placeholder="选择日期" popper-class="date-select">
|
|
|
+ </el-date-picker>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="query-actions">
|
|
|
+ <button class="btn green" @click="search">查询</button>
|
|
|
+ <button class="btn green" @click="exportExcel">导出</button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<div class="df-table">
|
|
|
<ComTable height="78vh" :data="tableData"></ComTable>
|
|
|
</div>
|
|
|
- <el-dialog title="切入切出风速整合历史" v-model="dialogShow" width="85%" top="10vh" custom-class="modal" :close-on-click-modal="true" @closed="dialogType = ''">
|
|
|
+ <el-dialog title="切入切出风速整合历史" v-model="dialogShow" width="85%" top="10vh" custom-class="modal"
|
|
|
+ :close-on-click-modal="true" @closed="dialogType = ''">
|
|
|
<div class="query mg-b-8">
|
|
|
- <div class="query-items">
|
|
|
- <div class="query-item">
|
|
|
- <div class="lable">场站:</div>
|
|
|
- <div class="search-input">
|
|
|
- <el-select v-model="wpId2" clearable placeholder="请选择"
|
|
|
- popper-class="select" @change="reGetWtArray">
|
|
|
- <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-select v-model="wtId" clearable placeholder="请选择"
|
|
|
- popper-class="select">
|
|
|
- <el-option v-for="item in wtArray" :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"
|
|
|
- value-format="YYYY-MM-DD" placeholder="选择日期" popper-class="date-select">
|
|
|
- </el-date-picker>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="query-item">
|
|
|
- <div class="lable">结束日期:</div>
|
|
|
- <div class="search-input">
|
|
|
- <el-date-picker v-model="endDate" type="date"
|
|
|
- value-format="YYYY-MM-DD" placeholder="选择日期" popper-class="date-select">
|
|
|
- </el-date-picker>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="query-actions">
|
|
|
- <button class="btn green" @click="reGetHistoryTableData">查询</button>
|
|
|
- <button class="btn green" @click="exportExcel2">导出</button>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ <div class="query-items">
|
|
|
+ <div class="query-item">
|
|
|
+ <div class="lable">场站:</div>
|
|
|
+ <div class="search-input">
|
|
|
+ <el-select v-model="wpId2" clearable placeholder="请选择" popper-class="select" @change="reGetWtArray">
|
|
|
+ <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-select v-model="wtId" clearable placeholder="请选择" popper-class="select">
|
|
|
+ <el-option v-for="item in wtArray" :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" value-format="YYYY-MM-DD" placeholder="选择日期" popper-class="date-select">
|
|
|
+ </el-date-picker>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="query-item">
|
|
|
+ <div class="lable">结束日期:</div>
|
|
|
+ <div class="search-input">
|
|
|
+ <el-date-picker v-model="endDate" type="date" value-format="YYYY-MM-DD" placeholder="选择日期" popper-class="date-select">
|
|
|
+ </el-date-picker>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="query-actions">
|
|
|
+ <button class="btn green" @click="reGetHistoryTableData">查询</button>
|
|
|
+ <button class="btn green" @click="exportExcel2">导出</button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<ComTable height="78vh" :data="historyTableData"></ComTable>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
@@ -84,34 +79,27 @@ export default {
|
|
|
|
|
|
// 使用组件
|
|
|
components: {
|
|
|
- ComTable
|
|
|
+ ComTable
|
|
|
},
|
|
|
|
|
|
// 数据
|
|
|
- data() {
|
|
|
+ data () {
|
|
|
const that = this;
|
|
|
return {
|
|
|
- isAsc:"asc",
|
|
|
- wpArray:[],
|
|
|
- wtArray:[],
|
|
|
- wpId:"",
|
|
|
- wtId:"",
|
|
|
- wpId2:"",
|
|
|
- recorddate:new Date((new Date().getTime() - 3600 * 1000 * 24)).formatDate("yyyy-MM-dd"),
|
|
|
- beginDate:"",
|
|
|
- endDate:"",
|
|
|
- dialogShow:false,
|
|
|
+ isAsc: "asc",
|
|
|
+ wpArray: [],
|
|
|
+ wtArray: [],
|
|
|
+ wpId: "",
|
|
|
+ wtId: "",
|
|
|
+ wpId2: "",
|
|
|
+ recorddate: new Date((new Date().getTime() - 3600 * 1000 * 24)).formatDate("yyyy-MM-dd"),
|
|
|
+ beginDate: "",
|
|
|
+ endDate: "",
|
|
|
+ dialogShow: false,
|
|
|
|
|
|
tableData: {
|
|
|
column: [
|
|
|
{
|
|
|
- name: "风场",
|
|
|
- field: "name",
|
|
|
- is_num: false,
|
|
|
- is_light: false,
|
|
|
- sortable: true
|
|
|
- },
|
|
|
- {
|
|
|
name: "风机",
|
|
|
field: "windturbineid",
|
|
|
is_num: false,
|
|
@@ -193,10 +181,10 @@ export default {
|
|
|
field: "",
|
|
|
is_num: false,
|
|
|
is_light: false,
|
|
|
- template() {
|
|
|
- return "<el-button type='text' style='cursor: pointer;'>详情</el-button>";
|
|
|
- },
|
|
|
- click(e, row){
|
|
|
+ template () {
|
|
|
+ return "<el-button type='text' style='cursor: pointer;'>详情</el-button>";
|
|
|
+ },
|
|
|
+ click (e, row) {
|
|
|
that.jumpUrl(row);
|
|
|
}
|
|
|
},
|
|
@@ -205,10 +193,10 @@ export default {
|
|
|
field: "",
|
|
|
is_num: false,
|
|
|
is_light: false,
|
|
|
- template() {
|
|
|
- return "<el-button type='text' style='cursor: pointer;'>历史</el-button>";
|
|
|
- },
|
|
|
- click(e, row){
|
|
|
+ template () {
|
|
|
+ return "<el-button type='text' style='cursor: pointer;'>历史</el-button>";
|
|
|
+ },
|
|
|
+ click (e, row) {
|
|
|
that.getOutputspeedHistoryList(row);
|
|
|
}
|
|
|
}
|
|
@@ -374,122 +362,122 @@ export default {
|
|
|
// 函数
|
|
|
methods: {
|
|
|
// 请求服务
|
|
|
- requestData() {
|
|
|
+ requestData () {
|
|
|
let that = this;
|
|
|
that.API.requestData({
|
|
|
method: "GET",
|
|
|
subUrl: "powercompare/windfarmAjax",
|
|
|
- success(res) {
|
|
|
- that.wpArray=res.data;
|
|
|
- that.wpId=res.data[0].id;
|
|
|
+ success (res) {
|
|
|
+ that.wpArray = res.data;
|
|
|
+ that.wpId = res.data[0].id;
|
|
|
that.getOutputSpeedList(that.wpId)
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
|
|
|
- getOutputSpeedList(wpId){
|
|
|
+ getOutputSpeedList (wpId) {
|
|
|
let that = this;
|
|
|
- if(!that.wpId || !that.recorddate){
|
|
|
+ if (!that.wpId || !that.recorddate) {
|
|
|
that.BASE.showMsg({
|
|
|
- msg:"场站与日期不可为空"
|
|
|
+ msg: "场站与日期不可为空"
|
|
|
});
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
that.API.requestData({
|
|
|
method: "POST",
|
|
|
subUrl: "goodness/windturbinegoodness",
|
|
|
- data:{
|
|
|
+ data: {
|
|
|
wpId,
|
|
|
- isAsc:that.isAsc,
|
|
|
- recorddate:that.recorddate
|
|
|
+ isAsc: that.isAsc,
|
|
|
+ recorddate: that.recorddate
|
|
|
},
|
|
|
- success(res) {
|
|
|
+ success (res) {
|
|
|
that.tableData.data = res.data.list;
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
|
|
|
- getOutputspeedHistoryList (item){
|
|
|
+ getOutputspeedHistoryList (item) {
|
|
|
let that = this;
|
|
|
|
|
|
that.API.requestData({
|
|
|
- method: "GET",
|
|
|
- subUrl: "powercompare/windturbineAjax",
|
|
|
- data:{
|
|
|
- wpId: item.windtpowerstationid
|
|
|
- },
|
|
|
- success(res) {
|
|
|
- that.wtArray=res.data;
|
|
|
-
|
|
|
- that.wpId2 = item.windtpowerstationid;
|
|
|
- that.wtId = item.windturbineid;
|
|
|
- that.beginDate = (new Date().formatDate("yyyy-MM") + '-01');
|
|
|
- that.endDate = new Date().formatDate("yyyy-MM-dd");
|
|
|
-
|
|
|
- that.API.requestData({
|
|
|
- method: "POST",
|
|
|
- subUrl: "goodness/goodhistorylist",
|
|
|
- data:{
|
|
|
- wpId: that.wpId2,
|
|
|
- wtId: that.wtId,
|
|
|
- beginDate: that.beginDate,
|
|
|
- endDate: that.endDate
|
|
|
- },
|
|
|
- success(res) {
|
|
|
- res.data.forEach(ele=>{
|
|
|
- ele.time=new Date(ele.recorddate).formatDate("yyyy-MM-dd");
|
|
|
- });
|
|
|
- that.historyTableData.data = res.data;
|
|
|
- that.dialogShow = true;
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
+ method: "GET",
|
|
|
+ subUrl: "powercompare/windturbineAjax",
|
|
|
+ data: {
|
|
|
+ wpId: item.windtpowerstationid
|
|
|
+ },
|
|
|
+ success (res) {
|
|
|
+ that.wtArray = res.data;
|
|
|
+
|
|
|
+ that.wpId2 = item.windtpowerstationid;
|
|
|
+ that.wtId = item.windturbineid;
|
|
|
+ that.beginDate = (new Date().formatDate("yyyy-MM") + '-01');
|
|
|
+ that.endDate = new Date().formatDate("yyyy-MM-dd");
|
|
|
+
|
|
|
+ that.API.requestData({
|
|
|
+ method: "POST",
|
|
|
+ subUrl: "goodness/goodhistorylist",
|
|
|
+ data: {
|
|
|
+ wpId: that.wpId2,
|
|
|
+ wtId: that.wtId,
|
|
|
+ beginDate: that.beginDate,
|
|
|
+ endDate: that.endDate
|
|
|
+ },
|
|
|
+ success (res) {
|
|
|
+ res.data.forEach(ele => {
|
|
|
+ ele.time = new Date(ele.recorddate).formatDate("yyyy-MM-dd");
|
|
|
+ });
|
|
|
+ that.historyTableData.data = res.data;
|
|
|
+ that.dialogShow = true;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
|
|
|
- reGetWtArray(){
|
|
|
+ reGetWtArray () {
|
|
|
let that = this;
|
|
|
that.API.requestData({
|
|
|
- method: "GET",
|
|
|
- subUrl: "powercompare/windturbineAjax",
|
|
|
- data:{
|
|
|
- wpId: that.wpId2
|
|
|
- },
|
|
|
- success(res) {
|
|
|
- that.wtArray=res.data;
|
|
|
- that.wtId = res.data[0].id;
|
|
|
- }
|
|
|
- });
|
|
|
+ method: "GET",
|
|
|
+ subUrl: "powercompare/windturbineAjax",
|
|
|
+ data: {
|
|
|
+ wpId: that.wpId2
|
|
|
+ },
|
|
|
+ success (res) {
|
|
|
+ that.wtArray = res.data;
|
|
|
+ that.wtId = res.data[0].id;
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
|
|
|
- reGetHistoryTableData(){
|
|
|
- let that=this;
|
|
|
- if(!that.wpId2){
|
|
|
+ reGetHistoryTableData () {
|
|
|
+ let that = this;
|
|
|
+ if (!that.wpId2) {
|
|
|
that.BASE.showMgs({
|
|
|
- msg:"场站不可为空"
|
|
|
+ msg: "场站不可为空"
|
|
|
});
|
|
|
- }else if(!that.wtId){
|
|
|
+ } else if (!that.wtId) {
|
|
|
that.BASE.showMgs({
|
|
|
- msg:"风机不可为空"
|
|
|
+ msg: "风机不可为空"
|
|
|
});
|
|
|
- }else if(!that.beginDate || !that.endDate){
|
|
|
+ } else if (!that.beginDate || !that.endDate) {
|
|
|
that.BASE.showMgs({
|
|
|
- msg:"开始日期与结束日期不可为空"
|
|
|
+ msg: "开始日期与结束日期不可为空"
|
|
|
});
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
that.API.requestData({
|
|
|
method: "POST",
|
|
|
subUrl: "goodness/goodhistorylist",
|
|
|
- data:{
|
|
|
+ data: {
|
|
|
wpId: that.wpId2,
|
|
|
wtId: that.wtId,
|
|
|
beginDate: that.beginDate,
|
|
|
endDate: that.endDate
|
|
|
},
|
|
|
- success(res) {
|
|
|
- res.data.forEach(ele=>{
|
|
|
- ele.time=new Date(ele.recorddate).formatDate("yyyy-MM-dd");
|
|
|
+ success (res) {
|
|
|
+ res.data.forEach(ele => {
|
|
|
+ ele.time = new Date(ele.recorddate).formatDate("yyyy-MM-dd");
|
|
|
});
|
|
|
that.historyTableData.data = res.data;
|
|
|
that.dialogShow = true;
|
|
@@ -498,7 +486,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
|
|
|
- search(){
|
|
|
+ search () {
|
|
|
this.getOutputSpeedList(this.wpId);
|
|
|
},
|
|
|
|
|
@@ -506,15 +494,15 @@ export default {
|
|
|
exportExcel () {
|
|
|
let that = this;
|
|
|
const { export_json_to_excel } = require('@tools/excel/Export2Excel.js'); // 注意这个Export2Excel路径
|
|
|
-
|
|
|
+
|
|
|
// const tHeader = ['点名', '描述']; // 上面设置Excel的表格第一行的标题
|
|
|
// const filterVal = ['id', 'name']; // 上面的index、nickName、name是tableData里对象的属性key值
|
|
|
-
|
|
|
+
|
|
|
let tHeader = []; // 上面设置Excel的表格第一行的标题
|
|
|
let filterVal = []; // 上面的index、nickName、name是tableData里对象的属性key值
|
|
|
|
|
|
- that.tableData.column.forEach(ele=>{
|
|
|
- if(ele.name !== "操作"){
|
|
|
+ that.tableData.column.forEach(ele => {
|
|
|
+ if (ele.name !== "操作") {
|
|
|
tHeader.push(ele.name);
|
|
|
filterVal.push(ele.field);
|
|
|
}
|
|
@@ -529,15 +517,15 @@ export default {
|
|
|
exportExcel2 () {
|
|
|
let that = this;
|
|
|
const { export_json_to_excel } = require('@tools/excel/Export2Excel.js'); // 注意这个Export2Excel路径
|
|
|
-
|
|
|
+
|
|
|
// const tHeader = ['点名', '描述']; // 上面设置Excel的表格第一行的标题
|
|
|
// const filterVal = ['id', 'name']; // 上面的index、nickName、name是tableData里对象的属性key值
|
|
|
-
|
|
|
+
|
|
|
let tHeader = []; // 上面设置Excel的表格第一行的标题
|
|
|
let filterVal = []; // 上面的index、nickName、name是tableData里对象的属性key值
|
|
|
|
|
|
- that.historyTableData.column.forEach(ele=>{
|
|
|
- if(ele.name !== "操作"){
|
|
|
+ that.historyTableData.column.forEach(ele => {
|
|
|
+ if (ele.name !== "操作") {
|
|
|
tHeader.push(ele.name);
|
|
|
filterVal.push(ele.field);
|
|
|
}
|
|
@@ -553,18 +541,18 @@ export default {
|
|
|
},
|
|
|
|
|
|
// 页面跳转
|
|
|
- jumpUrl(item){
|
|
|
- this.$router.push(`/new/dj1/${item.windtpowerstationid}`);
|
|
|
+ jumpUrl (item) {
|
|
|
+ this.$router.push(`/performanceAnalysis/detail/${item.windtpowerstationid}/${item.windturbineid}`);
|
|
|
}
|
|
|
},
|
|
|
|
|
|
- created() {
|
|
|
+ created () {
|
|
|
this.requestData();
|
|
|
},
|
|
|
|
|
|
- mounted() {},
|
|
|
+ mounted () { },
|
|
|
|
|
|
- unmounted() {},
|
|
|
+ unmounted () { },
|
|
|
};
|
|
|
</script>
|
|
|
|
|
@@ -592,7 +580,7 @@ export default {
|
|
|
margin-top: 1.481vh;
|
|
|
|
|
|
&:before {
|
|
|
- content: "";
|
|
|
+ content: '';
|
|
|
width: 0.37vh;
|
|
|
height: 0.37vh;
|
|
|
background: @write;
|