|
@@ -2,7 +2,7 @@
|
|
|
<div class="chart-container">
|
|
|
<div class="filter" >
|
|
|
<div style="margin-left:-10px;">
|
|
|
- <el-button size="small" type="primary" @click="insertEvent"> 新增</el-button>
|
|
|
+<!-- <el-button size="small" type="primary" @click="insertEvent"> 新增</el-button>-->
|
|
|
<el-upload
|
|
|
ref="upload"
|
|
|
name="file"
|
|
@@ -15,11 +15,57 @@
|
|
|
</el-upload>
|
|
|
<el-button size="small" type="primary" @click="exportToExcel">导出</el-button>
|
|
|
</div>
|
|
|
-<!-- <div class="toolbar" v-show="this.showToolBar"> <vxe-toolbar ref="fstToolBar" custom >-->
|
|
|
-<!-- <template v-slot:buttons>-->
|
|
|
-<!-- <vxe-button class="downloadButton" style="border:none;" @click="exportDataEvent"><i class="vxe-icon--download" ></i></vxe-button>-->
|
|
|
-<!-- </template>-->
|
|
|
-<!-- </vxe-toolbar></div>-->
|
|
|
+ <div class="toolbar" v-show="this.showToolBar">
|
|
|
+ <div class="toolMenu">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="6">
|
|
|
+ 风速
|
|
|
+ <el-input type="text"
|
|
|
+ v-model="speed"
|
|
|
+ placeholder="请输入风速值"
|
|
|
+ prefix-icon="el-icon-search"
|
|
|
+ clearable
|
|
|
+ style="max-width: 180px;"
|
|
|
+ size="small"
|
|
|
+ ></el-input>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ 功率
|
|
|
+ <el-input type="text"
|
|
|
+ v-model="power"
|
|
|
+ placeholder="请输入功率值"
|
|
|
+ prefix-icon="el-icon-search"
|
|
|
+ clearable
|
|
|
+ style="max-width: 180px;"
|
|
|
+ size="small"
|
|
|
+ ></el-input>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ 机组
|
|
|
+ <el-input type="text"
|
|
|
+ v-model="fanId"
|
|
|
+ placeholder="请输入机组id"
|
|
|
+ prefix-icon="el-icon-search"
|
|
|
+ clearable
|
|
|
+ style="max-width: 200px;"
|
|
|
+ size="small"
|
|
|
+ ></el-input>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-button type="primary" size="small" :loading="loading" @click="findBySomeConditions">查询</el-button>
|
|
|
+ <el-button type="primary" size="small" :loading="loading" @click="clearInput">清空</el-button>
|
|
|
+
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
+
|
|
|
+<!-- <vxe-toolbar ref="fstToolBar" custom >-->
|
|
|
+<!-- <template v-slot:buttons>-->
|
|
|
+<!-- <vxe-button class="downloadButton" style="border:none;" @click="exportDataEvent"><i class="vxe-icon--download" ></i></vxe-button>-->
|
|
|
+<!-- </template>-->
|
|
|
+<!-- </vxe-toolbar>-->
|
|
|
+ </div>
|
|
|
<!-- <div class="toolbar" v-show="this.showToolBar"> <vxe-toolbar ref="nwpToolBar" custom></vxe-toolbar></div>-->
|
|
|
</div>
|
|
|
|
|
@@ -54,7 +100,7 @@
|
|
|
<template v-else>
|
|
|
<vxe-button content="编辑" circle @click="editRowEvent(row)"></vxe-button>
|
|
|
</template>
|
|
|
- <vxe-button content="删除" circle @click="removeRowEvent(row)"></vxe-button>
|
|
|
+<!-- <vxe-button content="删除" circle @click="removeRowEvent(row)"></vxe-button>-->
|
|
|
</template>
|
|
|
</vxe-grid>
|
|
|
<div class="rtPageturning">
|
|
@@ -68,6 +114,7 @@
|
|
|
@page-change="handlePageChange"
|
|
|
:layouts="['PrevJump', 'PrevPage', 'JumpNumber', 'NextPage', 'NextJump', 'Sizes', 'FullJump', 'Total']">
|
|
|
</vxe-pager>
|
|
|
+
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-tab-pane>
|
|
@@ -116,28 +163,28 @@
|
|
|
components: { Chart},
|
|
|
mixins: [resize],
|
|
|
data(){
|
|
|
- return{
|
|
|
- fanIdStr:'',
|
|
|
+ return {
|
|
|
+ fanIdStr: '',
|
|
|
value: '',
|
|
|
- fanIdData:[],
|
|
|
- styleStr:{},
|
|
|
- styleTableStr:{},
|
|
|
+ fanIdData: [],
|
|
|
+ styleStr: {},
|
|
|
+ styleTableStr: {},
|
|
|
tableToolbar: {
|
|
|
export: true,
|
|
|
custom: true
|
|
|
},
|
|
|
- tableColumn:[],
|
|
|
+ tableColumn: [],
|
|
|
chart: null,
|
|
|
- loading:true,
|
|
|
- drawLoading:true,
|
|
|
- tableLoading:true,
|
|
|
- resizeKey:1,
|
|
|
+ loading: true,
|
|
|
+ drawLoading: true,
|
|
|
+ tableLoading: true,
|
|
|
+ resizeKey: 1,
|
|
|
activeName: 'first',
|
|
|
- drawData:{Fan1:[], Fan2:[], Fan3:[], Fan4:[], Fan5:[], xData:[]},
|
|
|
- tableData:[],
|
|
|
- total:0,
|
|
|
+ drawData: {},
|
|
|
+ tableData: [],
|
|
|
+ total: 0,
|
|
|
pageSize: 10,
|
|
|
- pageSizes: [10,50,100,{label: '大量数据', value: 1000},],
|
|
|
+ pageSizes: [10, 50, 100, {label: '大量数据', value: 1000},],
|
|
|
currentPage: 1,
|
|
|
showToolBar: false,
|
|
|
dialogVisible: false,
|
|
@@ -156,7 +203,11 @@
|
|
|
{pattern: /^[+-]?(0|([1-9]\d*))(\.\d+)?$/, message: "填写数字", trigger: 'blur'}
|
|
|
],
|
|
|
},
|
|
|
+ speed: '',
|
|
|
+ power: '',
|
|
|
+ fanId: '',
|
|
|
}
|
|
|
+
|
|
|
},
|
|
|
created () {
|
|
|
if(sessionStorage.getItem('styleSwitch') === 'blue'){
|
|
@@ -196,7 +247,6 @@
|
|
|
this.drawLoading = true
|
|
|
this.$axios.get('/windTurbinePowerCurve/new/').then((res) => {
|
|
|
|
|
|
- console.log(res.data+"-------------");
|
|
|
this.drawData = res.data
|
|
|
this.drawLoading = false
|
|
|
if(!this.drawLoading && !this.tableLoading){
|
|
@@ -211,31 +261,32 @@
|
|
|
})
|
|
|
},
|
|
|
getTable(){
|
|
|
- this.tableLoading = true
|
|
|
- this.$axios.get('/windTurbinePowerCurve/'+this.currentPage+'/'+this.pageSize).then((res) => {
|
|
|
- this.tableData = res.data.content
|
|
|
- // 表分页格数据总条数
|
|
|
- this.total = res.data.count
|
|
|
- this.tableColumn = []
|
|
|
- this.tableColumn = [
|
|
|
- { field: 'id', title: 'id',minWidth:"150",width:"180"},
|
|
|
- { field: 'speed', title: '风速',minWidth:"60",editRender: { name: 'input' }},
|
|
|
- { field: 'power', title: '功率',minWidth:"60",editRender: { name: 'input' }},
|
|
|
- { field: 'fanId', title: '机组',minWidth:"60",editRender: { name: 'input' }},
|
|
|
- { title: '操作', width: 200, slots: { default: 'operate' } }
|
|
|
- ]
|
|
|
-
|
|
|
- this.tableLoading = false
|
|
|
- if(!this.drawLoading && !this.tableLoading){
|
|
|
- this.loading = false
|
|
|
- }
|
|
|
- }).catch((error) => {
|
|
|
- this.tableLoading = false
|
|
|
- if(!this.drawLoading && !this.tableLoading){
|
|
|
- this.loading = false
|
|
|
- }
|
|
|
- this.$message.error('查询table出错' + error)
|
|
|
- })
|
|
|
+ this.findBySomeConditions()
|
|
|
+ // this.tableLoading = true
|
|
|
+ // this.$axios.get('/windTurbinePowerCurve/'+this.currentPage+'/'+this.pageSize).then((res) => {
|
|
|
+ // this.tableData = res.data.content
|
|
|
+ // // 表分页格数据总条数
|
|
|
+ // this.total = res.data.count
|
|
|
+ // this.tableColumn = []
|
|
|
+ // this.tableColumn = [
|
|
|
+ // { field: 'id', title: 'id',minWidth:"150",width:"180"},
|
|
|
+ // { field: 'speed', title: '风速',minWidth:"60",editRender: { name: 'input' }},
|
|
|
+ // { field: 'power', title: '功率',minWidth:"60",editRender: { name: 'input' }},
|
|
|
+ // { field: 'fanId', title: '机组',minWidth:"60",editRender: { name: 'input' }},
|
|
|
+ // { title: '操作', width: 200, slots: { default: 'operate' } }
|
|
|
+ // ]
|
|
|
+ //
|
|
|
+ // this.tableLoading = false
|
|
|
+ // if(!this.drawLoading && !this.tableLoading){
|
|
|
+ // this.loading = false
|
|
|
+ // }
|
|
|
+ // }).catch((error) => {
|
|
|
+ // this.tableLoading = false
|
|
|
+ // if(!this.drawLoading && !this.tableLoading){
|
|
|
+ // this.loading = false
|
|
|
+ // }
|
|
|
+ // this.$message.error('查询table出错' + error)
|
|
|
+ // })
|
|
|
|
|
|
},
|
|
|
handlePageChange ({ currentPage, pageSize }) {
|
|
@@ -326,6 +377,55 @@
|
|
|
})
|
|
|
this.dialogVisible = false;
|
|
|
},
|
|
|
+ findBySomeConditions() {
|
|
|
+ if (this.speed == '') {
|
|
|
+ this.speed = null
|
|
|
+ }
|
|
|
+ if (this.power == '') {
|
|
|
+ this.power = null
|
|
|
+ }
|
|
|
+ if (this.fanId == '') {
|
|
|
+ this.fanId = null
|
|
|
+ }
|
|
|
+
|
|
|
+ // this.$axios.get("/windTurbinePowerCurve/bySomeConditions/" + this.currentPage + "/" + this.pageSize + "/" + this.speed + '/' + this.power + '/' + this.fanId).then(res => {
|
|
|
+ // this.tableData = res.data.content
|
|
|
+ // this.total = res.data.totalElements
|
|
|
+ // })
|
|
|
+
|
|
|
+
|
|
|
+ this.$axios.get("/windTurbinePowerCurve/bySomeConditions/" + this.currentPage + "/" + this.pageSize + "/" + this.speed + '/' + this.power + '/' + this.fanId).then(res => {
|
|
|
+ this.tableData = res.data.content
|
|
|
+ // 表分页格数据总条数
|
|
|
+ this.total = res.data.totalElements
|
|
|
+ this.tableColumn = []
|
|
|
+ this.tableColumn = [
|
|
|
+ { field: 'id', title: 'id',minWidth:"150",width:"180"},
|
|
|
+ { field: 'speed', title: '风速',minWidth:"60",editRender: { name: 'input' }},
|
|
|
+ { field: 'power', title: '功率',minWidth:"60",editRender: { name: 'input' }},
|
|
|
+ { field: 'fanId', title: '机组',minWidth:"60",editRender: { name: 'input' }},
|
|
|
+ { title: '操作', width: 200, slots: { default: 'operate' } }
|
|
|
+ ]
|
|
|
+
|
|
|
+ this.tableLoading = false
|
|
|
+ if(!this.drawLoading && !this.tableLoading){
|
|
|
+ this.loading = false
|
|
|
+ }
|
|
|
+ }).catch((error) => {
|
|
|
+ this.tableLoading = false
|
|
|
+ if(!this.drawLoading && !this.tableLoading){
|
|
|
+ this.loading = false
|
|
|
+ }
|
|
|
+ this.$message.error('查询table出错' + error)
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
+ },
|
|
|
+ clearInput(){
|
|
|
+ this.speed = ''
|
|
|
+ this.power = ''
|
|
|
+ this.fanId = ''
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|