|
@@ -4,21 +4,71 @@
|
|
<div slot="header" class="clearfix">
|
|
<div slot="header" class="clearfix">
|
|
<span>风速点表</span>
|
|
<span>风速点表</span>
|
|
</div>
|
|
</div>
|
|
- <div >
|
|
|
|
|
|
+ <div class="toolMenu">
|
|
<el-row>
|
|
<el-row>
|
|
- <el-col :span="16">
|
|
|
|
- <el-button type="primary" size="small" @click="insertEvent" >新增</el-button>
|
|
|
|
- <el-button type="primary" size="small" :loading="loading" @click="readSpeedSheet" >读取excel</el-button>
|
|
|
|
|
|
+ <el-col :span="4">
|
|
|
|
+ 风机编号
|
|
|
|
+ <el-input type="text"
|
|
|
|
+ v-model="fanNumber"
|
|
|
|
+ placeholder="请输入风机编号"
|
|
|
|
+ prefix-icon="el-icon-search"
|
|
|
|
+ clearable
|
|
|
|
+ style="max-width: 180px;"
|
|
|
|
+ size="small"
|
|
|
|
+ ></el-input>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="4">
|
|
|
|
+ 风向
|
|
|
|
+ <el-select
|
|
|
|
+ v-model="wind"
|
|
|
|
+ clearable
|
|
|
|
+ size="small"
|
|
|
|
+ placeholder="请选择">
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in options"
|
|
|
|
+ :key="item.value"
|
|
|
|
+ :label="item.label"
|
|
|
|
+ :value="item.value">
|
|
|
|
+ </el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="4">
|
|
|
|
+ 风速
|
|
<el-input type="text"
|
|
<el-input type="text"
|
|
v-model="speed"
|
|
v-model="speed"
|
|
placeholder="请输入风速"
|
|
placeholder="请输入风速"
|
|
prefix-icon="el-icon-search"
|
|
prefix-icon="el-icon-search"
|
|
clearable
|
|
clearable
|
|
- style="width: 200px;"
|
|
|
|
|
|
+ style="max-width: 200px;"
|
|
size="small"
|
|
size="small"
|
|
- disabled
|
|
|
|
></el-input>
|
|
></el-input>
|
|
- <el-button type="primary" size="small" :loading="loading" @click="findBySpeed" disabled>查询</el-button>
|
|
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="4">
|
|
|
|
+ 所属机组
|
|
|
|
+ <el-input type="text"
|
|
|
|
+ v-model="unitBelongs"
|
|
|
|
+ placeholder="请输入所属机组"
|
|
|
|
+ prefix-icon="el-icon-search"
|
|
|
|
+ clearable
|
|
|
|
+ style="max-width: 180px;"
|
|
|
|
+ size="small"
|
|
|
|
+ ></el-input>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="4">
|
|
|
|
+ 所属行
|
|
|
|
+ <el-input type="text"
|
|
|
|
+ v-model="belong"
|
|
|
|
+ placeholder="请输入所属行"
|
|
|
|
+ prefix-icon="el-icon-search"
|
|
|
|
+ clearable
|
|
|
|
+ style="max-width: 180px;"
|
|
|
|
+ size="small"
|
|
|
|
+ ></el-input>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="4">
|
|
|
|
+ <el-button type="primary" size="small" :loading="loading" @click="findBySomeConditions">查询</el-button>
|
|
|
|
+ <el-button type="primary" size="small" @click="insertEvent">新增</el-button>
|
|
|
|
+ <el-button type="primary" size="small" :loading="loading" @click="readSpeedSheet">读取excel</el-button>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
</div>
|
|
</div>
|
|
@@ -95,15 +145,15 @@
|
|
>
|
|
>
|
|
<el-form ref="form" :model="form" label-width="120px" :rules="rules">
|
|
<el-form ref="form" :model="form" label-width="120px" :rules="rules">
|
|
<el-form-item label="风机编号" prop="fanNumber">
|
|
<el-form-item label="风机编号" prop="fanNumber">
|
|
- <el-input v-model="form.fanNumber" style="width: 70%" ></el-input>
|
|
|
|
|
|
+ <el-input v-model="form.fanNumber" style="width: 70%"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="风向" prop="wind" >
|
|
|
|
|
|
+ <el-form-item label="风向" prop="wind">
|
|
<el-input v-model="form.wind" style="width: 70%"></el-input>
|
|
<el-input v-model="form.wind" style="width: 70%"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="风速 MW" prop="speed">
|
|
<el-form-item label="风速 MW" prop="speed">
|
|
<el-input v-model="form.speed" style="width: 70%"></el-input>
|
|
<el-input v-model="form.speed" style="width: 70%"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="所属机组" prop="UnitBelongs">
|
|
|
|
|
|
+ <el-form-item label="所属机组" prop="unitBelongs">
|
|
<el-input v-model="form.unitBelongs" style="width: 70%"></el-input>
|
|
<el-input v-model="form.unitBelongs" style="width: 70%"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="所属行" prop="belong">
|
|
<el-form-item label="所属行" prop="belong">
|
|
@@ -113,46 +163,12 @@
|
|
<template #footer>
|
|
<template #footer>
|
|
<span class="dialog-footer">
|
|
<span class="dialog-footer">
|
|
<el-button @click="dialogVisible = false" style="color: #000000; border: 1px solid #000000">取 消</el-button>
|
|
<el-button @click="dialogVisible = false" style="color: #000000; border: 1px solid #000000">取 消</el-button>
|
|
- <el-button type="primary" @click="saveRowEvent" style="color: #000000; border: 1px solid #000000">确 定</el-button>
|
|
|
|
|
|
+ <el-button type="primary" @click="saveRowEvent"
|
|
|
|
+ style="color: #000000; border: 1px solid #000000">确 定</el-button>
|
|
</span>
|
|
</span>
|
|
</template>
|
|
</template>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
</div>
|
|
</div>
|
|
-
|
|
|
|
-
|
|
|
|
-<!-- <div class="tableContent">-->
|
|
|
|
-<!-- <vxe-grid-->
|
|
|
|
-<!-- id="nwpTable"-->
|
|
|
|
-<!-- ref="nwpRef"-->
|
|
|
|
-<!-- border-->
|
|
|
|
-<!-- export-config-->
|
|
|
|
-<!-- :loading="loading"-->
|
|
|
|
-<!-- @sort-change="sortChangeEvent"-->
|
|
|
|
-<!-- :custom-config="{storage: true, checkMethod: checkColumnMethod}"-->
|
|
|
|
-<!-- :auto-resize="true"-->
|
|
|
|
-<!-- highlight-hover-row-->
|
|
|
|
-<!-- :header-cell-style="styleStr"-->
|
|
|
|
-<!-- max-height="90%"-->
|
|
|
|
-<!-- :cell-style="styleTableStr"-->
|
|
|
|
-<!-- align="center"-->
|
|
|
|
-<!-- :data="tableData"-->
|
|
|
|
-<!-- :columns="tableColumn"-->
|
|
|
|
-<!-- >-->
|
|
|
|
-<!-- </vxe-grid>-->
|
|
|
|
-<!-- <div class="rtPageturning">-->
|
|
|
|
-<!-- <vxe-pager-->
|
|
|
|
-<!-- background-->
|
|
|
|
-<!-- :loading="loading"-->
|
|
|
|
-<!-- :current-page.sync="currentPage"-->
|
|
|
|
-<!-- :page-size.sync="pageSize"-->
|
|
|
|
-<!-- :total="total"-->
|
|
|
|
-<!-- @page-change="handlePageChange"-->
|
|
|
|
-<!-- :layouts="['PrevJump', 'PrevPage', 'JumpNumber', 'NextPage', 'NextJump', 'Sizes', 'FullJump', 'Total']">-->
|
|
|
|
-<!-- </vxe-pager>-->
|
|
|
|
-<!-- </div>-->
|
|
|
|
-<!-- </div>-->
|
|
|
|
-
|
|
|
|
-
|
|
|
|
</el-card>
|
|
</el-card>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
@@ -172,94 +188,107 @@ export default {
|
|
pageSize: 10,
|
|
pageSize: 10,
|
|
// 总条数
|
|
// 总条数
|
|
total: 0,
|
|
total: 0,
|
|
- loading:false,
|
|
|
|
- speed: 1,
|
|
|
|
- fanNumber: '2',
|
|
|
|
- wind: 3,
|
|
|
|
- UnitBelongs: 4,
|
|
|
|
- belong: '5',
|
|
|
|
|
|
+ loading: false,
|
|
|
|
+ speed: null,
|
|
|
|
+ fanNumber: null,
|
|
|
|
+ wind: null,
|
|
|
|
+ unitBelongs: null,
|
|
|
|
+ belong: null,
|
|
rules: {
|
|
rules: {
|
|
- fanNumber: [ { type: 'string',required: true,message: "名称必填", trigger: 'blur'}],
|
|
|
|
- wind: [ {pattern: /^[+-]?(0|([1-9]\d*))(\.\d+)?$/, required: true,message: "填写数字", trigger: 'blur'}],
|
|
|
|
- speed: [ { pattern: /^[+-]?(0|([1-9]\d*))(\.\d+)?$/,required: true,message: "填写数字", trigger: 'blur'}],
|
|
|
|
- power: [ { pattern: /^[+-]?(0|([1-9]\d*))(\.\d+)?$/,required: true,message: "填写数字", trigger: 'blur'}],
|
|
|
|
- UnitBelongs: [ { pattern: /^[+-]?(0|([1-9]\d*))(\.\d+)?$/,required: true,message: "填写数字", trigger: 'blur'}],
|
|
|
|
- }
|
|
|
|
|
|
+ fanNumber: [
|
|
|
|
+ {required: true, message: '此处为必填项'},
|
|
|
|
+ ],
|
|
|
|
+ wind: [
|
|
|
|
+ {required: true, message: '此处为必填项'},
|
|
|
|
+ {pattern: /^[+-]?(0|([1-9]\d*))(\.\d+)?$/, message: "填写数字", trigger: 'blur'},
|
|
|
|
+ ],
|
|
|
|
+ speed: [
|
|
|
|
+ {required: true, message: '此处为必填项'},
|
|
|
|
+ {pattern: /^[+-]?(0|([1-9]\d*))(\.\d+)?$/, message: "填写数字", trigger: 'blur'}
|
|
|
|
+ ],
|
|
|
|
+ power: [
|
|
|
|
+ {required: true, message: '此处为必填项'},
|
|
|
|
+ {pattern: /^[+-]?(0|([1-9]\d*))(\.\d+)?$/, message: "填写数字", trigger: 'blur'}
|
|
|
|
+ ],
|
|
|
|
+ unitBelongs: [
|
|
|
|
+ {required: true, message: '此处为必填项'},
|
|
|
|
+ {pattern: /^[+-]?(0|([1-9]\d*))(\.\d+)?$/, message: "填写数字", trigger: 'blur'}
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ options: [{
|
|
|
|
+ value: '1',
|
|
|
|
+ label: '北风'
|
|
|
|
+ }, {
|
|
|
|
+ value: '2',
|
|
|
|
+ label: '东北风'
|
|
|
|
+ }, {
|
|
|
|
+ value: '3',
|
|
|
|
+ label: '东风'
|
|
|
|
+ }, {
|
|
|
|
+ value: '4',
|
|
|
|
+ label: '东南风'
|
|
|
|
+ }, {
|
|
|
|
+ value: '5',
|
|
|
|
+ label: '南风'
|
|
|
|
+ }, {
|
|
|
|
+ value: '6',
|
|
|
|
+ label: '西南风'
|
|
|
|
+ }, {
|
|
|
|
+ value: '7',
|
|
|
|
+ label: '西风'
|
|
|
|
+ }, {
|
|
|
|
+ value: '8',
|
|
|
|
+ label: '西北风'
|
|
|
|
+ }],
|
|
|
|
+ value: ''
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- handlePageChange ({ currentPage, pageSize }) {
|
|
|
|
|
|
+ handlePageChange({currentPage, pageSize}) {
|
|
this.currentPage = currentPage
|
|
this.currentPage = currentPage
|
|
this.pageSize = pageSize
|
|
this.pageSize = pageSize
|
|
- this.initPage()
|
|
|
|
|
|
+ this.findBySomeConditions()
|
|
},
|
|
},
|
|
- windF: function (row, index){
|
|
|
|
- if(row.wind == "1"){
|
|
|
|
|
|
+ windF: function (row, index) {
|
|
|
|
+ if (row.wind == "1") {
|
|
return "北风"
|
|
return "北风"
|
|
- }else if(row.wind == "2"){
|
|
|
|
|
|
+ } else if (row.wind == "2") {
|
|
return "东北风"
|
|
return "东北风"
|
|
- }else if(row.wind == "3"){
|
|
|
|
|
|
+ } else if (row.wind == "3") {
|
|
return "东风"
|
|
return "东风"
|
|
- }else if(row.wind == "4"){
|
|
|
|
|
|
+ } else if (row.wind == "4") {
|
|
return "东南风"
|
|
return "东南风"
|
|
- }else if(row.wind == "5"){
|
|
|
|
|
|
+ } else if (row.wind == "5") {
|
|
return "南风"
|
|
return "南风"
|
|
- }else if(row.wind == "6"){
|
|
|
|
|
|
+ } else if (row.wind == "6") {
|
|
return "西南风"
|
|
return "西南风"
|
|
- }else if(row.wind == "7"){
|
|
|
|
|
|
+ } else if (row.wind == "7") {
|
|
return "西风"
|
|
return "西风"
|
|
- }else {
|
|
|
|
|
|
+ } else {
|
|
return "西北风"
|
|
return "西北风"
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
|
|
- // 获取分页数据
|
|
|
|
- initPage() {
|
|
|
|
- this.$axios.get("/windSpeedPointInfo/" + this.currentPage + '/' + this.pageSize).then(response => {
|
|
|
|
- this.tableData = response.data.content
|
|
|
|
- this.total = response.data.count
|
|
|
|
- //
|
|
|
|
- // this.tableColumn = [
|
|
|
|
- // { field: 'id', title: 'id',sortable:true,minWidth:"150",width:"180" },
|
|
|
|
- // { field: 'fanNumber', title: '风机编号',minWidth:"60"},
|
|
|
|
- // { field: 'wind', title: '风向',minWidth:"60"},
|
|
|
|
- // { field: 'speed', title: '风速',minWidth:"60"},
|
|
|
|
- // { field: 'unitBelongs', title: '所属机组',minWidth:"60"},
|
|
|
|
- // { field: 'belong', title: '所属',minWidth:"60"},
|
|
|
|
- //
|
|
|
|
- // ]
|
|
|
|
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
-// /{size}/{fanNumber}/{wind}/{speed}/{unitBelongs}/{belong}
|
|
|
|
- init2() {
|
|
|
|
- this.$axios.get("/windSpeedPointInfo/bySomeConditions/" + this.currentPage + "/" + this.pageSize + "/" + this.fanNumber + '/' + this.wind + '/' + this.speed + '/' + this.UnitBelongs + '/' + this.belong).then(res =>{
|
|
|
|
- console.log(res.data.content);
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
insertEvent() {
|
|
insertEvent() {
|
|
this.form = {};
|
|
this.form = {};
|
|
this.dialogVisible = true;
|
|
this.dialogVisible = true;
|
|
},
|
|
},
|
|
saveRowEvent() {
|
|
saveRowEvent() {
|
|
this.$axios.post('/windSpeedPointInfo', this.form).then(res => {
|
|
this.$axios.post('/windSpeedPointInfo', this.form).then(res => {
|
|
- this.$message.success(
|
|
|
|
- '操作成功!!!'
|
|
|
|
- )
|
|
|
|
- this.initPage()
|
|
|
|
|
|
+ this.$message.success(res.message)
|
|
|
|
+ this.findBySomeConditions()
|
|
}).catch(e => {
|
|
}).catch(e => {
|
|
- this.$message.error(
|
|
|
|
- '操作失败!!!'
|
|
|
|
- )
|
|
|
|
|
|
+ this.$message.error(e)
|
|
})
|
|
})
|
|
this.dialogVisible = false;
|
|
this.dialogVisible = false;
|
|
- this.initPage()
|
|
|
|
|
|
+ this.findBySomeConditions()
|
|
},
|
|
},
|
|
handleEdit(index, row) {
|
|
handleEdit(index, row) {
|
|
- console.log(index, row);
|
|
|
|
this.form = JSON.parse(JSON.stringify(row))
|
|
this.form = JSON.parse(JSON.stringify(row))
|
|
this.dialogVisible = true
|
|
this.dialogVisible = true
|
|
- this.initPage()
|
|
|
|
|
|
+ this.findBySomeConditions()
|
|
},
|
|
},
|
|
// 删除
|
|
// 删除
|
|
handleDelete(index, row) {
|
|
handleDelete(index, row) {
|
|
@@ -267,37 +296,50 @@ export default {
|
|
if (type === 'confirm') {
|
|
if (type === 'confirm') {
|
|
this.$axios.delete("/windSpeedPointInfo/", {data: row}).then(response => {
|
|
this.$axios.delete("/windSpeedPointInfo/", {data: row}).then(response => {
|
|
this.$XModal.message({status: 'warning', message: response.message})
|
|
this.$XModal.message({status: 'warning', message: response.message})
|
|
- this.initPage()
|
|
|
|
|
|
+ this.findBySomeConditions()
|
|
})
|
|
})
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
|
|
- readSpeedSheet(){
|
|
|
|
|
|
+ readSpeedSheet() {
|
|
this.$XModal.confirm('是否从Excel读取数据?').then(type => {
|
|
this.$XModal.confirm('是否从Excel读取数据?').then(type => {
|
|
if (type === 'confirm') {
|
|
if (type === 'confirm') {
|
|
this.loading = true
|
|
this.loading = true
|
|
- this.$axios.get("/readToMysql/readSpeedSheet").then( res => {
|
|
|
|
- this.$message.success(
|
|
|
|
- res.message
|
|
|
|
- )
|
|
|
|
|
|
+ this.$axios.get("/readToMysql/readSpeedSheet").then(res => {
|
|
|
|
+ this.$message.success(res.message)
|
|
this.loading = false
|
|
this.loading = false
|
|
- this.initPage()
|
|
|
|
|
|
+ this.findBySomeConditions()
|
|
|
|
+ }).catch(e => {
|
|
|
|
+ this.$message.error(e)
|
|
})
|
|
})
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- findBySpeed(){
|
|
|
|
- this.$axios.get("/windSpeedPointInfo/" + this.currentPage + '/' + this.pageSize + '/' + this.speed).then(response => {
|
|
|
|
- this.tableData = response.data.content
|
|
|
|
- this.total = response.data.count
|
|
|
|
-
|
|
|
|
|
|
+ findBySomeConditions() {
|
|
|
|
+ if (this.fanNumber == '') {
|
|
|
|
+ this.fanNumber = null
|
|
|
|
+ }
|
|
|
|
+ if (this.wind == '') {
|
|
|
|
+ this.wind = null
|
|
|
|
+ }
|
|
|
|
+ if (this.speed == '') {
|
|
|
|
+ this.speed = null
|
|
|
|
+ }
|
|
|
|
+ if (this.unitBelongs == '') {
|
|
|
|
+ this.unitBelongs = null
|
|
|
|
+ }
|
|
|
|
+ if (this.belong == '') {
|
|
|
|
+ this.belong = null
|
|
|
|
+ }
|
|
|
|
+ this.$axios.get("/windSpeedPointInfo/bySomeConditions/" + this.currentPage + "/" + this.pageSize + "/" + this.fanNumber + '/' + this.wind + '/' + this.speed + '/' + this.unitBelongs + '/' + this.belong).then(res => {
|
|
|
|
+ this.tableData = res.data.content
|
|
|
|
+ this.total = res.data.totalElements
|
|
})
|
|
})
|
|
}
|
|
}
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
- this.initPage();
|
|
|
|
- // this.init2()
|
|
|
|
|
|
+ this.findBySomeConditions();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
@@ -307,6 +349,7 @@ export default {
|
|
background: transparent;
|
|
background: transparent;
|
|
color: #ffffff;
|
|
color: #ffffff;
|
|
}
|
|
}
|
|
|
|
+
|
|
.el-button {
|
|
.el-button {
|
|
round-clip: 10px;
|
|
round-clip: 10px;
|
|
color: #ffffff;
|
|
color: #ffffff;
|
|
@@ -314,23 +357,27 @@ export default {
|
|
border: 1px solid #fff;
|
|
border: 1px solid #fff;
|
|
|
|
|
|
}
|
|
}
|
|
|
|
+
|
|
::v-deep .el-table, .el-table__expanded-cell {
|
|
::v-deep .el-table, .el-table__expanded-cell {
|
|
margin-top: 20px;
|
|
margin-top: 20px;
|
|
background-color: transparent;
|
|
background-color: transparent;
|
|
color: #ffffff;
|
|
color: #ffffff;
|
|
}
|
|
}
|
|
-/deep/ .el-table--enable-row-hover .el-table__body tr:hover>td {
|
|
|
|
|
|
+
|
|
|
|
+/deep/ .el-table--enable-row-hover .el-table__body tr:hover > td {
|
|
background-color: transparent;
|
|
background-color: transparent;
|
|
}
|
|
}
|
|
|
|
|
|
::v-deep .el-table tr {
|
|
::v-deep .el-table tr {
|
|
background-color: transparent !important;
|
|
background-color: transparent !important;
|
|
}
|
|
}
|
|
-::v-deep .el-table__body td,::v-deep .el-table__header th, .el-table .cell {
|
|
|
|
|
|
+
|
|
|
|
+::v-deep .el-table__body td, ::v-deep .el-table__header th, .el-table .cell {
|
|
background-color: transparent;
|
|
background-color: transparent;
|
|
}
|
|
}
|
|
|
|
+
|
|
::v-deep .el-table::before {
|
|
::v-deep .el-table::before {
|
|
-left: 0;
|
|
|
|
|
|
+ left: 0;
|
|
bottom: 0;
|
|
bottom: 0;
|
|
width: 100%;
|
|
width: 100%;
|
|
height: 0px;
|
|
height: 0px;
|