From b01346e041ffa205d69fddffa8c6f78cbeb307af Mon Sep 17 00:00:00 2001
From: WX <1377869194@qq.com>
Date: 星期五, 11 八月 2023 10:57:48 +0800
Subject: [PATCH] 修改风场

---
 src/components/dateTimePicker.vue |  156 +++++++++++++++++++++++++++++++++++++++++-----------
 1 files changed, 123 insertions(+), 33 deletions(-)

diff --git a/src/components/dateTimePicker.vue b/src/components/dateTimePicker.vue
index 47fc10c..cc37748 100644
--- a/src/components/dateTimePicker.vue
+++ b/src/components/dateTimePicker.vue
@@ -1,24 +1,74 @@
 <template>
-  <div class="picker_box">
-    <div class="pickerBox">
-      <div class="picker_title">鏃堕棿閫夋嫨</div>
-      <div class="form_box">
-        <div class="inp_box XZboxDate">
-          <el-date-picker
-            size="large"
-            v-model="selectform.value"
-            type="datetime"
-            @change="changeTime"
-            format="YYYY-MM-DD HH"
-            value-format="YYYY-MM-DD HH"
-            placeholder="閫夋嫨鏃堕棿"
-          />
+  <div>
+    <div class="picker_box" v-show="tpData == 'd22' || tpData == 'd23'">
+      <div class="pickerBox">
+        <div class="picker_title">椋庡尯閫夋嫨</div>
+        <div class="form_box">
+          <!-- <div class="inp_box XZboxDate">
+            <span>椋庡尯</span>
+            <el-select
+              class="FQ_s"
+              v-model="selectform.fetch"
+              placeholder="椋庡尯"
+              size="large"
+              clearable
+            >
+              <el-option label="鏁翠釜鍘傚尯" value="Main" />
+              <el-option label="瑗块儴鍘傚尯" value="West" />
+              <el-option label="涓滈儴鍘傚尯" value="East" />
+            </el-select>
+          </div> -->
+
+          <div class="inp_box">
+            <span>閫夋嫨灞傛暟</span>
+            <el-select
+              v-model="selectform.start"
+              size="large"
+              placeholder="寮�濮�"
+              class="CS_s"
+              clearable
+            >
+              <el-option :label="i" :value="i" v-for="(e, i) in 50" :key="i" />
+            </el-select>
+            <i>-</i>
+            <el-select
+              v-model="selectform.end"
+              size="large"
+              placeholder="缁撴潫"
+              class="CS_s"
+              clearable
+            >
+              <el-option :label="e" :value="e" v-for="(e, i) in 50" :key="i" />
+            </el-select>
+          </div>
+
+          <div class="button_box">
+            <el-button @click="FQselectBtn">纭畾</el-button>
+          </div>
         </div>
+      </div>
+    </div>
+    <div class="picker_box">
+      <div class="pickerBox">
+        <div class="picker_title">鏃堕棿閫夋嫨</div>
+        <div class="form_box">
+          <div class="inp_box">
+            <el-date-picker
+              size="large"
+              v-model="selectform.value"
+              type="datetime"
+              @change="changeTime"
+              format="YYYY-MM-DD HH"
+              value-format="YYYY-MM-DD HH"
+              placeholder="閫夋嫨鏃堕棿"
+            />
+          </div>
 
-        <div class="button_box"></div>
+          <div class="button_box"></div>
 
-        <div class="button_box">
-          <el-button @click="selectBtn">纭畾</el-button>
+          <div class="button_box">
+            <el-button @click="selectBtn">纭畾</el-button>
+          </div>
         </div>
       </div>
     </div>
@@ -39,8 +89,16 @@
 
     let selectform = reactive({
       value: "",
+      fetch: "",
+      start: 0,
+      end: 0,
     });
-
+    let btnState = false;
+    let CS = {
+      start: "",
+      end: "",
+      Classify: "",
+    };
     const selectBtn = () => {
       if (selectform.value) {
         // let newTimeStr = `${value.slice(0, 13)}:00:00`;
@@ -73,18 +131,33 @@
 
         emit("changeTime", { data: newTimeStr, week: week });
         if (props.tpData == "d2") {
-          menuTool.createFC("sj", newTimeStr);
+          if (!btnState) {
+            return ElMessage.error("璇峰厛閫夋嫨椋庡尯");
+          }
+          menuTool.createFC("sj", newTimeStr, CS);
         } else {
           menuTool.createWRW("sj", newTimeStr);
         }
       }
     };
-    function changeTime(value) {}
-
+    function FQselectBtn() {
+      btnState = true;
+      selectform.value = "";
+      CS.start = selectform.start;
+      CS.end = selectform.end;
+      CS.Classify = selectform.fetch;
+      if (selectform.start > selectform.end) {
+        CS.start = selectform.end;
+        CS.end = selectform.start;
+      }
+      menuTool.createFC("fc", "", CS);
+    }
+    function changeTime() {}
     return {
       selectBtn,
       changeTime,
       selectform,
+      FQselectBtn,
     };
   },
 };
@@ -99,7 +172,7 @@
   width: 38%;
 }
 .picker_box {
-  width: calc(742px * 1);
+  // width: calc(742px * 1.5);
   //   position: absolute;
   //   right: 70px;
   //   top: 490px;
@@ -131,6 +204,9 @@
     // justify-content: space-around;
     align-items: center;
     .inp_box {
+      display: flex;
+      // justify-content: space-around;
+      align-items: center;
       span {
         font-size: 24px;
         font-weight: 400;
@@ -187,20 +263,34 @@
   }
   .el-button {
     background: rgba(0, 0, 0, 0.2);
-    border: 4px solid #2e58cc !important;
-    border-radius: 20px !important;
+    border: 4px solid #2e58cc;
+    border-radius: 20px;
     color: #ffffff;
-    height: 64px !important;
-    font-size: 28px !important;
-    padding: 16px 30px !important;
+    height: 64px;
+    font-size: 28px;
+    padding: 16px 30px;
+  }
+  .el-button:focus,
+  .el-button:hover {
+    color: var(--el-button-hover-text-color);
+    border-color: var(--el-button-hover-border-color);
+    background-color: var(--el-button-hover-bg-color);
+    outline: 0;
   }
 }
-// .XZboxDate {
-//   width: 70%;
-//   /deep/ .el-input {
-//     width: 100%;
-//   }
-// }
+.XZboxDate {
+  margin-right: 30px;
+  //   width: 460px;
+  //   .el-select {
+  //     width: 30%;
+  //   }
+}
+.FQ_s {
+  width: 160px;
+}
+.CS_s {
+  width: 100px;
+}
 </style>
 <style>
 @media (width: 1920px) {

--
Gitblit v1.9.3