Pārlūkot izejas kodu

查询判断是否超出30天

zy 5 mēneši atpakaļ
vecāks
revīzija
5cf33f9b7b

+ 21 - 0
cpp-ui/src/assets/styles/dark.scss

@@ -315,3 +315,24 @@
   top: .5vh;
   right: .5vw;
 }
+.btu-checked-style {
+  width: 4vw;
+  height: 3vh;
+  font-size: .85vw;
+  margin-left: .5vw;
+  cursor: pointer;
+}
+
+.btu-checked {
+  background-image: url('../../assets/images/dashboard/btu-checked.png');
+  background-size: 100% 100%;
+  background-position: center;
+  background-repeat: no-repeat;
+}
+
+.btu-no-checked {
+  background-image: url('../../assets/images/dashboard/btu-no-checked.png');
+  background-size: 100% 100%;
+  background-position: center;
+  background-repeat: no-repeat;
+}

+ 1 - 1
cpp-ui/src/assets/styles/vxe-table.scss

@@ -1,6 +1,6 @@
 .vxe-max-height-65vh{
   .vxe-table--render-default .vxe-table--body-wrapper, .vxe-table--render-default .vxe-table--footer-wrapper {
-    max-height: 36vh !important;
+    max-height: 37vh !important;
     overflow-y: auto;
   }
   .vxe-table--render-default .vxe-table--fixed-left-wrapper .vxe-table--body-wrapper {

+ 5 - 83
cpp-ui/src/views/largeScreen/index.vue

@@ -76,22 +76,8 @@
           </div>
         </div>
         <div class="border-style position-r" style="margin-top: 1%">
-          <div class="barTitleBg right-title-style flex justify-between">
+          <div class="barTitleBg right-title-style">
             功率曲线
-            <div class="flex position-a" style="right: 2.2vw;">
-              <div class="btu-checked forecastLine btu-checked-style flex items-center justify-center" id="day"
-                   @click="changeForecastLine('day')">当日
-              </div>
-              <div class="btu-no-checked forecastLine btu-checked-style flex items-center justify-center" id="tenDay"
-                   @click="changeForecastLine('tenDay')">十日
-              </div>
-              <div class="btu-no-checked forecastLine btu-checked-style flex items-center justify-center" id="wind"
-                   @click="changeForecastLine('wind')">风电
-              </div>
-              <div class="btu-no-checked forecastLine btu-checked-style flex items-center justify-center"
-                   id="photovoltaic" @click="changeForecastLine('photovoltaic')">光伏
-              </div>
-            </div>
           </div>
           <center-bottom :params="centerBottomParams"/>
         </div>
@@ -99,30 +85,13 @@
       <!--      右-->
       <div class="width-20 mr-0 flex-column justify-between">
         <div class="border-style position-r">
-          <div class="flex position-a" style="right: .3vw;top: .5vh">
-            <div class="btu-checked accuracy btu-checked-style flex items-center justify-center" id="accuracy-day"
-                 @click="changeAccuracy('accuracy-day')">日
-            </div>
-            <div class="btu-no-checked accuracy btu-checked-style flex items-center justify-center" id="accuracy-month"
-                 @click="changeAccuracy('accuracy-month')">月
-            </div>
-          </div>
           <div class="barTitleBg right-title-style ">准确率排名</div>
           <div style="height: 25vh">
             <right-top :params="rightTopParams"/>
           </div>
         </div>
         <div class="border-style position-r">
-          <div class="barTitleBg right-title-style flex justify-between">气象预测
-            <div class="flex">
-              <div class="btu-checked weather btu-checked-style flex items-center justify-center" id="weather-wind"
-                   @click="changeWeather('weather-wind')">风电
-              </div>
-              <div class="btu-no-checked weather btu-checked-style flex items-center justify-center"
-                   id="weather-photovoltaic" @click="changeWeather('weather-photovoltaic')">光伏
-              </div>
-            </div>
-          </div>
+          <div class="barTitleBg right-title-style">气象预测</div>
           <div style="height: 25vh">
             <right-middle :params="rightMiddleParams"/>
           </div>
@@ -829,27 +798,8 @@ export default {
       clickItem.classList.remove('clickBefore')
       clickItem.classList.add('clickAfter')
     },
-    /**
-     * 切换功率曲线按钮
-     * */
-    changeForecastLine(id) {
-      const activeItem = document.querySelector('.btu-checked.forecastLine')
-      this.checkedClass(id, activeItem)
-    },
-    /**
-     * 切换准确率排行按钮
-     * */
-    changeAccuracy(id) {
-      const activeItem = document.querySelector('.btu-checked.accuracy')
-      this.checkedClass(id, activeItem)
-    },
-    /**
-     * 切换气象预测按钮
-     * */
-    changeWeather(id) {
-      const activeItem = document.querySelector('.btu-checked.weather')
-      this.checkedClass(id, activeItem)
-    },
+
+
 
     formatStartDate(row) {
       return formatToDateTime(row.startTime)
@@ -1061,14 +1011,7 @@ export default {
     checkRadioMethod({row}) {
       return row.expireTime > formatToDateTime(new Date().getTime())
     },
-    checkedClass(id, activeItem) {
-      let clickItem = document.getElementById(id)
-      // let activeItem = document.querySelector('.btu-checked')
-      activeItem.classList.remove('btu-checked')
-      activeItem.classList.add('btu-no-checked')
-      clickItem.classList.remove('btu-no-checked')
-      clickItem.classList.add('btu-checked')
-    },
+
   }
 
 }
@@ -1256,27 +1199,6 @@ $top-container-height: 11vh;
   background-repeat: no-repeat;
 }
 
-.btu-checked-style {
-  width: 4vw;
-  height: 3vh;
-  font-size: .85vw;
-  margin-left: .5vw;
-  cursor: pointer;
-}
-
-.btu-checked {
-  background-image: url('../../assets/images/dashboard/btu-checked.png');
-  background-size: 100% 100%;
-  background-position: center;
-  background-repeat: no-repeat;
-}
-
-.btu-no-checked {
-  background-image: url('../../assets/images/dashboard/btu-no-checked.png');
-  background-size: 100% 100%;
-  background-position: center;
-  background-repeat: no-repeat;
-}
 
 .dialog-title {
   width: 90%;

+ 16 - 9
cpp-ui/src/views/regulation/dqHistoryContrast/index.vue

@@ -33,9 +33,9 @@
       </el-form>
     </div>
     <div style="padding-top: 10px">
-      <div style="width: 95%;height: 450px" id="czChartsId"></div>
+      <div style="width: 100%;height: 40vh" id="czChartsId"></div>
     </div>
-    <div style="padding-top: 50px">
+    <div class="vxe-max-height-65vh" style="padding-top: 1vh">
       <vxe-table
         highlight-hover-row
         :keep-source="true"
@@ -61,7 +61,7 @@
         :current-page.sync="currentPage"
         :page-size.sync="pageSize"
         :total="total"
-        :page-sizes=[10,50,100]
+        :page-sizes=[7,10,50,100]
         :layouts="['PrevJump', 'PrevPage','JumpNumber', 'NextPage', 'NextJump', 'Sizes', 'FullJump', 'Total']"
         @page-change="handlePageChange"
       >
@@ -87,7 +87,7 @@ export default {
       dateTime: [new Date(new Date().toLocaleDateString()).getTime() - 1000 * 60 * 60 * 24, new Date(new Date().toLocaleDateString()).getTime() - 1000 * 60 * 60 * 24],
       total: 0,
       sortOrder: 'asc',
-      pageSize: 10,
+      pageSize: 7,
       currentPage: 1,
       stationList: [],
       stationCode: [],
@@ -101,7 +101,7 @@ export default {
       chartOption: {
         backgroundColor: 'transparent',
         title: {
-          top: 20,
+          // top: 20,
           text: '偏差图',
           textStyle: {
             fontWeight: 'normal',
@@ -118,7 +118,7 @@ export default {
           }
         },
         legend: {
-          top: 20,
+          // top: 20,
           icon: 'rect',
           itemWidth: 14,
           itemHeight: 5,
@@ -138,10 +138,10 @@ export default {
           type: 'inside'
         }],
         grid: {
-          top: 100,
+          top: 40,
           left: '2%',
           right: '2%',
-          bottom: '10%',
+          bottom: 10,
           containLabel: true
         },
         xAxis: [
@@ -281,8 +281,15 @@ export default {
   computed: {},
   methods: {
     initChart() {
-      this.czChart = echarts.init(document.getElementById('czChartsId'), 'dark')
+      this.czChart = echarts.init(document.getElementById('czChartsId'), 'dark',{renderer: 'svg'})
       this.czChart.setOption(this.chartOption)
+      const _this = this
+      window.addEventListener("transitionend", this.handleResize);
+    },
+    handleResize(){
+      if(this.czChart!==null && this.czChart!==undefined&& this.czChart!==''){
+        this.czChart.resize();
+      }
     },
     nameFormat({cellValue, row, column}) {
       const item = this.nameList.find(item => item.value === cellValue)

+ 3 - 16
cpp-ui/src/views/stationDataQuery/historyforecastdata/index.vue

@@ -32,9 +32,9 @@
         </el-form-item>
       </el-form>
     </div>
-    <div style="padding-top: 8px">
+    <div>
       <div style="display: flex">
-        <div style="float:left;width: 100%;height: 350px" id="zhCharts"></div>
+        <div style="float:left;width: 100%;height: 36vh" id="zhCharts"></div>
       </div>
       <div>
         <div>差值颜色说明:<span style="color: #FF0000">红色</span>代表短期调控与上报不相符,<span
@@ -97,22 +97,9 @@ export default {
       tableData: [],
       nameList: [],
       loading: false,
-      pickerMinDate: null,
-      pickerMaxDate: null,
-      day30: 30 * 24 * 3600 * 1000,
       // 日期使用
       pickerOptions: {
-        onPick: ({maxDate, minDate}) => {
-          if (minDate && this.pickerMinDate) {
-            this.pickerMinDate = null;
-          } else if (minDate) {
-            this.pickerMinDate = minDate.getTime();
-          }
-        },
         disabledDate: (time) => {
-          if (this.pickerMinDate) {
-            return (time.getTime() < (this.pickerMinDate - this.day30));
-          }
           return time.getTime() > new Date(new Date().toLocaleDateString()).getTime() + 24 * 60 * 60 * 1000  - 1;
         }
       },
@@ -850,7 +837,7 @@ export default {
           top: 60,
           left: '2%',
           right: '2%',
-          bottom: '10%',
+          bottom: '5%',
           containLabel: true
         },
         xAxis: [{

+ 8 - 16
cpp-ui/src/views/stationDataQuery/inverterstatusdata/index.vue

@@ -100,23 +100,9 @@ export default {
       nameList: [],
       loading: false,
       modId: '',//备用id
-
-      pickerMinDate: null,
-      pickerMaxDate: null,
-      day30: 30 * 24 * 3600 * 1000,
       // 日期使用
       pickerOptions: {
-        onPick: ({maxDate, minDate}) => {
-          if (minDate && this.pickerMinDate) {
-            this.pickerMinDate = null;
-          } else if (minDate) {
-            this.pickerMinDate = minDate.getTime();
-          }
-        },
         disabledDate: (time) => {
-          if (this.pickerMinDate) {
-            return (time.getTime() < (this.pickerMinDate - this.day30));
-          }
           return time.getTime() > new Date(new Date().toLocaleDateString()).getTime() + 24 * 60 * 60 * 1000  - 1;
         }
       },
@@ -166,7 +152,10 @@ export default {
           this.$message.error("开始时间不能大于结束时间")
           return
         }
-
+        if (endTime - startTime > 60 * 60 * 24 * 1000 * 30) {
+          this.$message.warning("查询数据不能超过30天!")
+          return
+        }
         this.loading = true
         let queryParams = {
           "stationCode": this.stationCode,
@@ -241,7 +230,10 @@ export default {
         this.$message.error("开始时间不能大于结束时间")
         return
       }
-
+      if (endTime - startTime > 60 * 60 * 24 * 1000 * 30) {
+        this.$message.warning("查询数据不能超过30天!")
+        return
+      }
       this.loading = true
       let queryParams = {
         "currentPage": this.currentPage,

+ 33 - 40
cpp-ui/src/views/stationDataQuery/weatherstationstatusdata/index.vue

@@ -37,37 +37,40 @@
         <div style="float:left;width: 50%;height: 350px" id="fscharts"></div>
         <div style="float:left;width: 50%;height: 350px" id="sdcharts"></div>
       </div>
-      <vxe-table
-        highlight-hover-row
-        :keep-source="true"
-        align="center"
-        :loading="loading"
-        ref="xTable"
-        auto-resize
-        highlight-current-row
-        border
-        resizable
-        show-overflow
-        :data="tableData.slice((currentPage-1) * pageSize,currentPage * pageSize)">
-        <vxe-table-column field="stationCode" title="场站名称" :formatter="stationCodeFormat" width="200px"
-                          fixed="left"></vxe-table-column>
-        <vxe-table-column field="time" title="时间" width="150px" fixed="left" :formatter="timeFormat"></vxe-table-column>
-        <vxe-table-column field="globalR" title="总辐射(W/㎡)"></vxe-table-column>
-        <vxe-table-column field="directR" title="直接辐射(W/㎡)"></vxe-table-column>
-        <vxe-table-column field="diffuseR" title="散射辐射(W/㎡)"></vxe-table-column>
-        <vxe-table-column field="airT" title="温度(℃)"></vxe-table-column>
-        <vxe-table-column field="rh" title="湿度(%)"></vxe-table-column>
-        <vxe-table-column field="p" title="气压(kPa)"></vxe-table-column>
-        <vxe-table-column field="cellT" title="电池板温度(℃)"></vxe-table-column>
-        <vxe-table-column field="ws" title="风速(m/s)"></vxe-table-column>
-        <vxe-table-column field="wd" title="风向(°)"></vxe-table-column>
-      </vxe-table>
+      <div class="vxe-max-height-65vh">
+        <vxe-table
+          highlight-hover-row
+          :keep-source="true"
+          align="center"
+          :loading="loading"
+          ref="xTable"
+          auto-resize
+          highlight-current-row
+          border
+          resizable
+          show-overflow
+          :data="tableData.slice((currentPage-1) * pageSize,currentPage * pageSize)">
+          <vxe-table-column field="stationCode" title="场站名称" :formatter="stationCodeFormat" width="200px"
+                            fixed="left"></vxe-table-column>
+          <vxe-table-column field="time" title="时间" width="150px" fixed="left" :formatter="timeFormat"></vxe-table-column>
+          <vxe-table-column field="globalR" title="总辐射(W/㎡)"></vxe-table-column>
+          <vxe-table-column field="directR" title="直接辐射(W/㎡)"></vxe-table-column>
+          <vxe-table-column field="diffuseR" title="散射辐射(W/㎡)"></vxe-table-column>
+          <vxe-table-column field="airT" title="温度(℃)"></vxe-table-column>
+          <vxe-table-column field="rh" title="湿度(%)"></vxe-table-column>
+          <vxe-table-column field="p" title="气压(kPa)"></vxe-table-column>
+          <vxe-table-column field="cellT" title="电池板温度(℃)"></vxe-table-column>
+          <vxe-table-column field="ws" title="风速(m/s)"></vxe-table-column>
+          <vxe-table-column field="wd" title="风向(°)"></vxe-table-column>
+        </vxe-table>
+      </div>
+
       <vxe-pager
         perfect
         :current-page.sync="currentPage"
         :page-size.sync="pageSize"
         :total="total"
-        :page-sizes=[10,50,100]
+        :page-sizes=[7,10,50,100]
         :layouts="['PrevJump', 'PrevPage','JumpNumber', 'NextPage', 'NextJump', 'Sizes', 'FullJump', 'Total']"
         @page-change="handlePageChange"
       >
@@ -98,22 +101,9 @@ export default {
       loading: false,
       modId: '',//备用id
       lineColor: '#3b3b3b',
-      pickerMinDate: null,
-      pickerMaxDate: null,
-      day30: 30 * 24 * 3600 * 1000,
       // 日期使用
       pickerOptions: {
-        onPick: ({maxDate, minDate}) => {
-          if (minDate && this.pickerMinDate) {
-            this.pickerMinDate = null;
-          } else if (minDate) {
-            this.pickerMinDate = minDate.getTime();
-          }
-        },
         disabledDate: (time) => {
-          if (this.pickerMinDate) {
-            return (time.getTime() < (this.pickerMinDate - this.day30));
-          }
           return time.getTime() > new Date(new Date().toLocaleDateString()).getTime() + 24 * 60 * 60 * 1000  - 1;
         }
       },
@@ -187,7 +177,10 @@ export default {
         this.$message.error("开始时间不能大于结束时间")
         return
       }
-
+      if (endTime - startTime > 60 * 60 * 24 * 1000 * 30) {
+        this.$message.warning("查询数据不能超过30天!")
+        return
+      }
       this.loading = true
       let queryParams = {
         "stationCode": this.stationCode,

+ 5 - 15
cpp-ui/src/views/stationDataQuery/windtowerstatusdata/index.vue

@@ -679,23 +679,10 @@ export default {
         }
       ],
       lineColor: '#3b3b3b',
-      pickerMinDate: null,
-      pickerMaxDate: null,
-      day30: 30 * 24 * 3600 * 1000,
       // 日期使用
       pickerOptions: {
-        onPick: ({maxDate, minDate}) => {
-          if (minDate && this.pickerMinDate) {
-            this.pickerMinDate = null;
-          } else if (minDate) {
-            this.pickerMinDate = minDate.getTime();
-          }
-        },
         disabledDate: (time) => {
-          if (this.pickerMinDate) {
-            return (time.getTime() < (this.pickerMinDate - this.day30));
-          }
-          return time.getTime() > new Date(new Date().toLocaleDateString()).getTime() + 24 * 60 * 60 * 1000  - 1;
+         return time.getTime() > new Date(new Date().toLocaleDateString()).getTime() + 24 * 60 * 60 * 1000  - 1;
         }
       },
     }
@@ -768,7 +755,10 @@ export default {
         this.$message.error("开始时间不能大于结束时间")
         return
       }
-
+      if (endTime - startTime > 60 * 60 * 24 * 1000 * 30) {
+        this.$message.warning("查询数据不能超过30天!")
+        return
+      }
       this.loading = true
       let queryParams = {
         "stationCode": this.stationCode,

+ 8 - 16
cpp-ui/src/views/stationDataQuery/windturbinestatusdata/index.vue

@@ -101,23 +101,9 @@ export default {
       nameList: [],
       loading: false,
       modId: '',//备用id
-
-      pickerMinDate: null,
-      pickerMaxDate: null,
-      day30: 30 * 24 * 3600 * 1000,
       // 日期使用
       pickerOptions: {
-        onPick: ({maxDate, minDate}) => {
-          if (minDate && this.pickerMinDate) {
-            this.pickerMinDate = null;
-          } else if (minDate) {
-            this.pickerMinDate = minDate.getTime();
-          }
-        },
         disabledDate: (time) => {
-          if (this.pickerMinDate) {
-            return (time.getTime() < (this.pickerMinDate - this.day30));
-          }
           return time.getTime() > new Date(new Date().toLocaleDateString()).getTime() + 24 * 60 * 60 * 1000  - 1;
         }
       },
@@ -167,7 +153,10 @@ export default {
           this.$message.error("开始时间不能大于结束时间")
           return
         }
-
+        if (endTime - startTime > 60 * 60 * 24 * 1000 * 30) {
+          this.$message.warning("查询数据不能超过30天!")
+          return
+        }
         this.loading = true
         let queryParams = {
           "stationCode": this.stationCode,
@@ -242,7 +231,10 @@ export default {
         this.$message.error("开始时间不能大于结束时间")
         return
       }
-
+      if (endTime - startTime > 60 * 60 * 24 * 1000 * 30) {
+        this.$message.warning("查询数据不能超过30天!")
+        return
+      }
       this.loading = true
       let queryParams = {
         "currentPage": this.currentPage,