|
@@ -4,20 +4,20 @@
|
|
<el-form ref="queryForm" size="small" :inline="true" popper-class="cpp-popper">
|
|
<el-form ref="queryForm" size="small" :inline="true" popper-class="cpp-popper">
|
|
<el-form-item label="预测日期">
|
|
<el-form-item label="预测日期">
|
|
<el-date-picker
|
|
<el-date-picker
|
|
- :clearable="false"
|
|
|
|
- v-model="dateTime"
|
|
|
|
- type="date"
|
|
|
|
- :picker-options="expireDateOption"
|
|
|
|
- placeholder="选择生成日期">
|
|
|
|
|
|
+ :clearable="false"
|
|
|
|
+ v-model="dateTime"
|
|
|
|
+ type="date"
|
|
|
|
+ :picker-options="expireDateOption"
|
|
|
|
+ placeholder="选择生成日期">
|
|
</el-date-picker>
|
|
</el-date-picker>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="场站名称">
|
|
<el-form-item label="场站名称">
|
|
<el-select v-model="stationCode" placeholder="请选择" popper-class="cpp-popper">
|
|
<el-select v-model="stationCode" placeholder="请选择" popper-class="cpp-popper">
|
|
<el-option
|
|
<el-option
|
|
- v-for="item in stationList"
|
|
|
|
- :key="item.value"
|
|
|
|
- :label="item.label"
|
|
|
|
- :value="item.value">
|
|
|
|
|
|
+ v-for="item in stationList"
|
|
|
|
+ :key="item.value"
|
|
|
|
+ :label="item.label"
|
|
|
|
+ :value="item.value">
|
|
</el-option>
|
|
</el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -42,51 +42,51 @@
|
|
|
|
|
|
<div class="divTable">
|
|
<div class="divTable">
|
|
<el-table
|
|
<el-table
|
|
- :data="tableData"
|
|
|
|
- height="550px"
|
|
|
|
- :loading="loading"
|
|
|
|
- size="mini"
|
|
|
|
- style="width: 100%">
|
|
|
|
|
|
+ :data="tableData"
|
|
|
|
+ height="550px"
|
|
|
|
+ :loading="loading"
|
|
|
|
+ size="mini"
|
|
|
|
+ style="width: 100%">
|
|
<el-table-column
|
|
<el-table-column
|
|
- prop="time"
|
|
|
|
- header-align="center"
|
|
|
|
- align="center"
|
|
|
|
- label="时间"
|
|
|
|
|
|
+ prop="time"
|
|
|
|
+ header-align="center"
|
|
|
|
+ align="center"
|
|
|
|
+ label="时间"
|
|
>
|
|
>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
- prop="xs"
|
|
|
|
- header-align="center"
|
|
|
|
- align="center"
|
|
|
|
- label="系数">
|
|
|
|
|
|
+ prop="xs"
|
|
|
|
+ header-align="center"
|
|
|
|
+ align="center"
|
|
|
|
+ label="系数">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<vxe-input type="number" v-model="scope.row.xs" size="small" style="width:100%" min="0"
|
|
<vxe-input type="number" v-model="scope.row.xs" size="small" style="width:100%" min="0"
|
|
placeholder="" @change="setValueByManual(scope.row,scope.$index)"></vxe-input>
|
|
placeholder="" @change="setValueByManual(scope.row,scope.$index)"></vxe-input>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
- prop="sz"
|
|
|
|
- header-align="center"
|
|
|
|
- align="center"
|
|
|
|
- label="数值">
|
|
|
|
|
|
+ prop="sz"
|
|
|
|
+ header-align="center"
|
|
|
|
+ align="center"
|
|
|
|
+ label="数值">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<vxe-input type="number" v-model="scope.row.sz" size="small" style="width:100%"
|
|
<vxe-input type="number" v-model="scope.row.sz" size="small" style="width:100%"
|
|
placeholder="" @change="setValueByManual(scope.row,scope.$index)"></vxe-input>
|
|
placeholder="" @change="setValueByManual(scope.row,scope.$index)"></vxe-input>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
- prop="ysValue"
|
|
|
|
- header-align="center"
|
|
|
|
- align="center"
|
|
|
|
- label="原始值">
|
|
|
|
|
|
+ prop="ysValue"
|
|
|
|
+ header-align="center"
|
|
|
|
+ align="center"
|
|
|
|
+ label="原始值">
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
- prop="tkValue"
|
|
|
|
- header-align="center"
|
|
|
|
- align="center"
|
|
|
|
- label="调控值"
|
|
|
|
- :max="capacity"
|
|
|
|
- :min="0"
|
|
|
|
|
|
+ prop="tkValue"
|
|
|
|
+ header-align="center"
|
|
|
|
+ align="center"
|
|
|
|
+ label="调控值"
|
|
|
|
+ :max="capacity"
|
|
|
|
+ :min="0"
|
|
>
|
|
>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
@@ -144,44 +144,46 @@
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="dark-el-dialog">
|
|
<div class="dark-el-dialog">
|
|
- <el-dialog :visible.sync="quickUseOpen" :before-close="cancelQuickUse" :close-on-click-modal="false" style="height: calc(100% - 50px)">
|
|
|
|
|
|
+ <el-dialog :visible.sync="quickUseOpen" :before-close="cancelQuickUse" :close-on-click-modal="false"
|
|
|
|
+ style="height: calc(100% - 50px)">
|
|
<div class="reg-config-container flex justify-between">
|
|
<div class="reg-config-container flex justify-between">
|
|
<div>
|
|
<div>
|
|
-<!-- 策略列表 -->
|
|
|
|
- <div class="reg-config flex items-center">
|
|
|
|
- <el-radio v-model="vradio" label="1" @click.native.prevent="radioChange('1')">快捷选择历史策略:</el-radio>
|
|
|
|
- <div>
|
|
|
|
- <!-- 循环生成按钮 -->
|
|
|
|
- <el-button
|
|
|
|
- v-for="(button, index) in buttons"
|
|
|
|
- :key="index"
|
|
|
|
- @click="handleButtonClick(button.usualName)"
|
|
|
|
- >
|
|
|
|
- {{ button.usualName }}
|
|
|
|
- </el-button>
|
|
|
|
|
|
+ <!-- 策略列表 -->
|
|
|
|
+ <div class="reg-config flex items-center">
|
|
|
|
+ <el-radio v-model="vradio" label="1" @click.native.prevent="radioChange('1')">快捷选择历史策略:</el-radio>
|
|
|
|
+ <div>
|
|
|
|
+ <!-- 循环生成按钮 -->
|
|
|
|
+ <el-button
|
|
|
|
+ v-for="(button, index) in buttons"
|
|
|
|
+ :key="index"
|
|
|
|
+ @click="handleButtonClick(button.usualName)"
|
|
|
|
+ >
|
|
|
|
+ {{ button.usualName }}
|
|
|
|
+ </el-button>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
- </div>
|
|
|
|
<div class="reg-config flex items-center">
|
|
<div class="reg-config flex items-center">
|
|
<el-radio v-model="vradio" label="2" @click.native.prevent="radioChange('2')">选择历史策略:</el-radio>
|
|
<el-radio v-model="vradio" label="2" @click.native.prevent="radioChange('2')">选择历史策略:</el-radio>
|
|
<div>
|
|
<div>
|
|
- <el-select ref="selectUsualName" v-model="usualId" placeholder="请选择" popper-class="cpp-popper" :disabled="disabled" @change="changeUsualName">
|
|
|
|
|
|
+ <el-select ref="selectUsualName" v-model="usualId" placeholder="请选择" popper-class="cpp-popper"
|
|
|
|
+ :disabled="disabled" @change="changeUsualName">
|
|
<el-option
|
|
<el-option
|
|
- v-for="item in usualList"
|
|
|
|
- :key="item.id"
|
|
|
|
- :label="item.usualName"
|
|
|
|
- :value="item.id">
|
|
|
|
|
|
+ v-for="item in usualList"
|
|
|
|
+ :key="item.id"
|
|
|
|
+ :label="item.usualName"
|
|
|
|
+ :value="item.id">
|
|
</el-option>
|
|
</el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div class="reg-config flex items-center">
|
|
|
|
|
|
+ <div id="currentSelectFunction" style="display: none" class="reg-config flex items-center">
|
|
<div>当前选择策略:</div>
|
|
<div>当前选择策略:</div>
|
|
<div style="width: 200px">
|
|
<div style="width: 200px">
|
|
{{ this.currentStrategy }}
|
|
{{ this.currentStrategy }}
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div>
|
|
- <el-button @click="trialClick">预览</el-button>
|
|
|
|
- <el-button>删除</el-button>
|
|
|
|
|
|
+ <el-button @click="trialPreview">预览</el-button>
|
|
|
|
+ <el-button @click="trialDelete">删除</el-button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div slot="footer" class="dialog-footer">
|
|
<div slot="footer" class="dialog-footer">
|
|
@@ -189,47 +191,47 @@
|
|
<el-button @click="cancelQuickUse">取 消</el-button>
|
|
<el-button @click="cancelQuickUse">取 消</el-button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
-<!-- <el-divider direction="vertical" style="height: calc(100% - 30px)"></el-divider>-->
|
|
|
|
|
|
+ <!-- <el-divider direction="vertical" style="height: calc(100% - 30px)"></el-divider>-->
|
|
<div>
|
|
<div>
|
|
-<!-- 预览表格 -->
|
|
|
|
|
|
+ <!-- 预览表格 -->
|
|
<el-table
|
|
<el-table
|
|
- :data="trialData"
|
|
|
|
- height="550px"
|
|
|
|
- :loading="loading"
|
|
|
|
- size="mini"
|
|
|
|
- style="width: 100%">
|
|
|
|
|
|
+ :data="trialData"
|
|
|
|
+ height="550px"
|
|
|
|
+ :loading="loading"
|
|
|
|
+ size="mini"
|
|
|
|
+ style="width: 100%">
|
|
<el-table-column
|
|
<el-table-column
|
|
- prop="time"
|
|
|
|
- header-align="center"
|
|
|
|
- align="center"
|
|
|
|
- label="时间"
|
|
|
|
|
|
+ prop="time"
|
|
|
|
+ header-align="center"
|
|
|
|
+ align="center"
|
|
|
|
+ label="时间"
|
|
>
|
|
>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
- prop="xs"
|
|
|
|
- header-align="center"
|
|
|
|
- align="center"
|
|
|
|
- label="系数">
|
|
|
|
|
|
+ prop="xs"
|
|
|
|
+ header-align="center"
|
|
|
|
+ align="center"
|
|
|
|
+ label="系数">
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
- prop="sz"
|
|
|
|
- header-align="center"
|
|
|
|
- align="center"
|
|
|
|
- label="数值">
|
|
|
|
|
|
+ prop="sz"
|
|
|
|
+ header-align="center"
|
|
|
|
+ align="center"
|
|
|
|
+ label="数值">
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
- prop="ysValue"
|
|
|
|
- header-align="center"
|
|
|
|
- align="center"
|
|
|
|
- label="原始值">
|
|
|
|
|
|
+ prop="ysValue"
|
|
|
|
+ header-align="center"
|
|
|
|
+ align="center"
|
|
|
|
+ label="原始值">
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
- prop="tkValue"
|
|
|
|
- header-align="center"
|
|
|
|
- align="center"
|
|
|
|
- label="调控值"
|
|
|
|
- :max="capacity"
|
|
|
|
- :min="0"
|
|
|
|
|
|
+ prop="tkValue"
|
|
|
|
+ header-align="center"
|
|
|
|
+ align="center"
|
|
|
|
+ label="调控值"
|
|
|
|
+ :max="capacity"
|
|
|
|
+ :min="0"
|
|
>
|
|
>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
@@ -251,8 +253,8 @@ export default {
|
|
name: 'inverterinfo',
|
|
name: 'inverterinfo',
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
- trialData:[],
|
|
|
|
- disabled:true,
|
|
|
|
|
|
+ trialData: [],
|
|
|
|
+ disabled: true,
|
|
vradio: '1',
|
|
vradio: '1',
|
|
buttons: new Array(),
|
|
buttons: new Array(),
|
|
usualId: '',
|
|
usualId: '',
|
|
@@ -344,9 +346,8 @@ export default {
|
|
},
|
|
},
|
|
xAxis: [{
|
|
xAxis: [{
|
|
type: 'category',
|
|
type: 'category',
|
|
- // boundaryGap: false,
|
|
|
|
|
|
+ boundaryGap: false,
|
|
axisLine: {onZero: false},
|
|
axisLine: {onZero: false},
|
|
- // data: this.hoursArray
|
|
|
|
}],
|
|
}],
|
|
yAxis: [{
|
|
yAxis: [{
|
|
type: 'value',
|
|
type: 'value',
|
|
@@ -474,19 +475,22 @@ export default {
|
|
computed: {},
|
|
computed: {},
|
|
methods: {
|
|
methods: {
|
|
// 策略名称下拉框选择
|
|
// 策略名称下拉框选择
|
|
- changeUsualName(id){
|
|
|
|
|
|
+ changeUsualName(id) {
|
|
const item = this.usualList.find(item => item.id == id)
|
|
const item = this.usualList.find(item => item.id == id)
|
|
let usualName = item ? item.usualName : ''
|
|
let usualName = item ? item.usualName : ''
|
|
this.currentStrategy = usualName
|
|
this.currentStrategy = usualName
|
|
|
|
+ document.getElementById("currentSelectFunction").style.display = ''
|
|
},
|
|
},
|
|
radioChange(radioValue) {
|
|
radioChange(radioValue) {
|
|
|
|
+ document.getElementById("currentSelectFunction").style.display = 'none'
|
|
this.currentStrategy = ''
|
|
this.currentStrategy = ''
|
|
|
|
+ this.trialData = []
|
|
if (radioValue == '1') {
|
|
if (radioValue == '1') {
|
|
- this.vradio='1'
|
|
|
|
- this.usualId=''
|
|
|
|
|
|
+ this.vradio = '1'
|
|
|
|
+ this.usualId = ''
|
|
this.disabled = true
|
|
this.disabled = true
|
|
} else {
|
|
} else {
|
|
- this.vradio='2'
|
|
|
|
|
|
+ this.vradio = '2'
|
|
this.disabled = false
|
|
this.disabled = false
|
|
|
|
|
|
}
|
|
}
|
|
@@ -496,30 +500,63 @@ export default {
|
|
if (this.vradio == '1') {
|
|
if (this.vradio == '1') {
|
|
// 执行常用按钮点击
|
|
// 执行常用按钮点击
|
|
this.currentStrategy = usualName
|
|
this.currentStrategy = usualName
|
|
|
|
+ document.getElementById("currentSelectFunction").style.display = ''
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- async executeTrial(){
|
|
|
|
|
|
+ async executeTrial() {
|
|
const param = {
|
|
const param = {
|
|
"usualName": this.currentStrategy,
|
|
"usualName": this.currentStrategy,
|
|
"stationCode": this.tableData[0].stationCode,
|
|
"stationCode": this.tableData[0].stationCode,
|
|
- "time":new Date(this.tableData[0].forecastDate).getTime()
|
|
|
|
|
|
+ "time": new Date(this.tableData[0].forecastDate).getTime()
|
|
}
|
|
}
|
|
// 获取策略名称的系数和数值
|
|
// 获取策略名称的系数和数值
|
|
- await this.$axios.get('/dqRegulationController/trialData',{params: param}).then(response => {
|
|
|
|
|
|
+ await this.$axios.get('/dqRegulationController/trialData', {params: param}).then(response => {
|
|
this.trialData = response.data
|
|
this.trialData = response.data
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ // 删除按钮点击
|
|
|
|
+ trialDelete() {
|
|
|
|
+ if (this.currentStrategy == '') {
|
|
|
|
+ this.$message.warning("请选择策略名称进行删除!")
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ this.$confirm('是否确认删除【' + this.currentStrategy + '】?', '提示', {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ type: 'warning'
|
|
|
|
+ }).then(() => {
|
|
|
|
+ // 提交名称及系数配置
|
|
|
|
+ const formData = new FormData()
|
|
|
|
+ formData.append('usualName', this.currentStrategy)
|
|
|
|
+ this.$axios.post('/dqUsualController/deleteUsual', formData, {
|
|
|
|
+ headers: {
|
|
|
|
+ 'Content-Type': 'multipart/form-data' // 设置请求头,确保服务器正确解析 FormData
|
|
|
|
+ }
|
|
|
|
+ }).then((res) => {
|
|
|
|
+ this.$message.success('删除策略成功!')
|
|
|
|
+ document.getElementById("currentSelectFunction").style.display = "none"
|
|
|
|
+ this.trialData = []
|
|
|
|
+ // 重新渲染下拉框
|
|
|
|
+ this.renderUsual()
|
|
|
|
+ }).catch((error) => {
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ },
|
|
// 预览按钮点击
|
|
// 预览按钮点击
|
|
- trialClick(){
|
|
|
|
- if (this.currentStrategy==''){
|
|
|
|
|
|
+ trialPreview() {
|
|
|
|
+ if (this.currentStrategy == '') {
|
|
this.$message.warning("请选择策略名称进行预览!")
|
|
this.$message.warning("请选择策略名称进行预览!")
|
|
return
|
|
return
|
|
}
|
|
}
|
|
this.executeTrial()
|
|
this.executeTrial()
|
|
},
|
|
},
|
|
// 一键应用中确定
|
|
// 一键应用中确定
|
|
- quickUseCommit(){
|
|
|
|
- this.executeTrial()
|
|
|
|
|
|
+ async quickUseCommit() {
|
|
|
|
+ if (this.currentStrategy == '') {
|
|
|
|
+ this.$message.warning("请选择策略进行应用!")
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ await this.executeTrial()
|
|
// 将列表数据赋值给底层列表
|
|
// 将列表数据赋值给底层列表
|
|
this.tableData = this.trialData
|
|
this.tableData = this.trialData
|
|
// 将预算的调控曲线赋值给底层曲线上
|
|
// 将预算的调控曲线赋值给底层曲线上
|
|
@@ -540,19 +577,17 @@ export default {
|
|
// 一键应用中取消按钮
|
|
// 一键应用中取消按钮
|
|
cancelQuickUse() {
|
|
cancelQuickUse() {
|
|
this.quickUseOpen = false;
|
|
this.quickUseOpen = false;
|
|
- this.trialData=[]
|
|
|
|
- console.log(this.trialData)
|
|
|
|
- this.currentStrategy=''
|
|
|
|
- this.buttons=[]
|
|
|
|
- this.vradio='1'
|
|
|
|
- this.disabled=true
|
|
|
|
|
|
+ this.trialData = []
|
|
|
|
+ this.currentStrategy = ''
|
|
|
|
+ this.buttons = []
|
|
|
|
+ this.vradio = '1'
|
|
|
|
+ this.disabled = true
|
|
|
|
+ document.getElementById("currentSelectFunction").style.display = 'none'
|
|
},
|
|
},
|
|
- quickUse() {
|
|
|
|
- if (this.tableData.length==0){
|
|
|
|
- this.$message.warning("调控列表为空,不能操作!")
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
|
|
+ renderUsual() {
|
|
|
|
+ this.buttons = []
|
|
|
|
+ this.usualId = ''
|
|
|
|
+ this.currentStrategy=''
|
|
// 先获取常用下拉框
|
|
// 先获取常用下拉框
|
|
this.$axios.get('/dqUsualController/getUsualList').then(response => {
|
|
this.$axios.get('/dqUsualController/getUsualList').then(response => {
|
|
this.usualList = response.data
|
|
this.usualList = response.data
|
|
@@ -565,12 +600,18 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
})
|
|
})
|
|
-
|
|
|
|
|
|
+ },
|
|
|
|
+ quickUse() {
|
|
|
|
+ if (this.tableData.length == 0) {
|
|
|
|
+ this.$message.warning("调控列表为空,不能操作!")
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ this.renderUsual()
|
|
this.quickUseOpen = true
|
|
this.quickUseOpen = true
|
|
},
|
|
},
|
|
// 点击设为常用按钮触发
|
|
// 点击设为常用按钮触发
|
|
usualSet() {
|
|
usualSet() {
|
|
- if (this.tableData.length==0){
|
|
|
|
|
|
+ if (this.tableData.length == 0) {
|
|
this.$message.warning("调控列表为空,不能操作!")
|
|
this.$message.warning("调控列表为空,不能操作!")
|
|
return
|
|
return
|
|
}
|
|
}
|
|
@@ -609,7 +650,7 @@ export default {
|
|
this.usualForm = {
|
|
this.usualForm = {
|
|
usualName: undefined,
|
|
usualName: undefined,
|
|
},
|
|
},
|
|
- this.resetForm("usualForm");
|
|
|
|
|
|
+ this.resetForm("usualForm");
|
|
},
|
|
},
|
|
// 取消按钮
|
|
// 取消按钮
|
|
cancelUsual() {
|
|
cancelUsual() {
|
|
@@ -617,7 +658,7 @@ export default {
|
|
this.resetUsual();
|
|
this.resetUsual();
|
|
},
|
|
},
|
|
tkDialog() {
|
|
tkDialog() {
|
|
- if (this.tableData.length==0){
|
|
|
|
|
|
+ if (this.tableData.length == 0) {
|
|
this.$message.warning("调控列表为空,不能操作!")
|
|
this.$message.warning("调控列表为空,不能操作!")
|
|
return
|
|
return
|
|
}
|
|
}
|
|
@@ -863,7 +904,8 @@ export default {
|
|
width: 100%;
|
|
width: 100%;
|
|
text-align: center
|
|
text-align: center
|
|
}
|
|
}
|
|
-.reg-config{
|
|
|
|
|
|
+
|
|
|
|
+.reg-config {
|
|
margin-top: 5px;
|
|
margin-top: 5px;
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|