Ver Fonte

短期调控样式调整

xusl há 6 meses atrás
pai
commit
63719fcc87
1 ficheiros alterados com 52 adições e 19 exclusões
  1. 52 19
      cpp-ui/src/views/regulation/dqRegulation/index.vue

+ 52 - 19
cpp-ui/src/views/regulation/dqRegulation/index.vue

@@ -93,7 +93,7 @@
         </div>
         <div class="tkBtn">
           <div class="dark-el-input dark-el-button">
-            <el-button type="primary" size="small" style="margin-left: 5px" @click="tkCommit">调控功率</el-button>
+            <el-button type="primary" size="small" style="margin-left: 5px" @click="tkDialog">调控功率</el-button>
           </div>
         </div>
 
@@ -102,10 +102,10 @@
         <div style="float:left;width: 95%;height: 750px" id="tkcharts"></div>
       </el-col>
     </el-row>
+    <div class="dark-el-dialog">
+      <el-dialog :visible.sync="usualOpen" :close-on-click-modal="false" width="450px" height="600px">
 
-    <el-dialog :visible.sync="usualOpen" :close-on-click-modal="false" width="450px" height="600px">
-      <div class="dark-el-input dark-el-button">
-        <el-form ref="usualForm" :model="usualForm" width="430px" label-width="130px">
+        <el-form ref="usualForm" :model="usualForm" width="430px" label-width="70px">
           <el-row class="mb4">
             <el-col :span="24">
               <el-form-item label="常用名称" prop="name">
@@ -124,8 +124,26 @@
           <el-button type="primary" @click="commitUsual">确 定</el-button>
           <el-button @click="cancelUsual">取 消</el-button>
         </div>
-      </div>
-    </el-dialog>
+
+      </el-dialog>
+    </div>
+    <div class="dark-el-dialog">
+      <el-dialog :visible.sync="tkOpen" :close-on-click-modal="false" width="700px" height="600px">
+
+        <div class="flex" style="color:#ffffff;">
+          确认对
+          <span style="background: #d3a4ff">{{ this.tkrq }}</span>
+          日,
+          <span style="background: #d3a4ff">{{ this.stationName }}</span>
+          的短期功率调控,调控后数据将下发到对应场站上报调度。
+        </div>
+        <div slot="footer" class="dialog-footer">
+          <el-button type="primary" @click="tkCommit">确 定</el-button>
+          <el-button @click="tkCancel">取 消</el-button>
+        </div>
+
+      </el-dialog>
+    </div>
   </div>
 </template>
 
@@ -137,6 +155,9 @@ export default {
   name: 'inverterinfo',
   data() {
     return {
+      stationName: '',
+      tkrq: '',
+      tkOpen: false,
       usualOpen: false,
       usualForm: {
         usualName: undefined
@@ -349,29 +370,28 @@ export default {
   computed: {},
   methods: {
     // 点击设为常用按钮触发
-    usualSet(){
+    usualSet() {
       this.usualOpen = true
     },
     // 设为常用弹出框保存按钮
-    commitUsual(){
-      if (this.tableData==undefined||this.tableData.length==0){
+    commitUsual() {
+      if (this.tableData == undefined || this.tableData.length == 0) {
         this.$message.warning("请查询列表才可以设为常用!")
         return
       }
-      if (this.usualForm.usualName==null || this.usualForm.usualName=='' || this.usualForm.usualName==undefined){
+      if (this.usualForm.usualName == null || this.usualForm.usualName == '' || this.usualForm.usualName == undefined) {
         this.$message.warning("请输入常用名称!")
         return
-      }
-      else{
+      } else {
         let tempUsualName = this.usualForm.usualName.trim()
-        if (tempUsualName==''){
+        if (tempUsualName == '') {
           this.$message.warning("请输入常用名称!")
           return
         }
         // 提交名称及系数配置
         const param = {
-          "tempShortRegulationDtoList":this.tableData,
-          "usualName":tempUsualName
+          "tempShortRegulationDtoList": this.tableData,
+          "usualName": tempUsualName
         }
         this.$axios.post('/dqUsualController/saveUsual', param).then((res) => {
           this.$message.success('常用策略保存成功!')
@@ -393,6 +413,20 @@ export default {
       this.usualOpen = false;
       this.resetUsual();
     },
+    tkDialog() {
+      const date = new Date(this.dateTime); // 如果long是毫秒
+      const year = date.getFullYear();
+      const month = (date.getMonth() + 1).toString().padStart(2, '0');
+      const day = date.getDate().toString().padStart(2, '0');
+      this.tkrq = `${year}-${month}-${day}`; // 根据需要可以添加时间部分
+      const item = this.stationList.find(item => item.value === this.stationCode)
+      this.stationName = item ? item.label : ''
+      this.tkOpen = true
+
+    },
+    tkCancel() {
+      this.tkOpen = false
+    },
     // 调控列表提交
     tkCommit() {
       if (this.tableData.length == 0) {
@@ -413,8 +447,7 @@ export default {
         // this.dataQuery()
       }).catch((error) => {
       })
-
-
+      this.tkOpen = false
     },
 
     //通过表格内系数或固定值修改  生成曲线以及最终预测结果
@@ -605,7 +638,7 @@ export default {
 
 .divDescribeBtn {
   position: relative;
-  top: 20px; /* 向下移动15px */
+  top: 25px; /* 向下移动15px */
   width: 100%;
   text-align: right
 }
@@ -619,7 +652,7 @@ export default {
 
 .tkBtn {
   position: relative;
-  top: 30px; /* 向下移动15px */
+  top: 50px; /* 向下移动15px */
   width: 100%;
   text-align: center
 }