From 1d662c1648aeeff4b1bfdadb619cdba922740348 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期三, 28 九月 2022 15:14:26 +0800
Subject: [PATCH] 1.头部搜索栏、下拉箭头优化

---
 src/views/scgl/scdd.vue |   95 +++++++++++++++++++++--------------------------
 1 files changed, 42 insertions(+), 53 deletions(-)

diff --git a/src/views/scgl/scdd.vue b/src/views/scgl/scdd.vue
index 4b078da..262793f 100644
--- a/src/views/scgl/scdd.vue
+++ b/src/views/scgl/scdd.vue
@@ -24,7 +24,7 @@
           style="display: flex;justify-content: space-between"
         >
           <div class="elForm">
-            <el-form-item label="璁㈠崟鐘舵��" style=" display: flex;">
+            <el-form-item label-width="70px" label="璁㈠崟鐘舵��" style=" display: flex;">
               <el-select
                 v-model="form.erporderstus"
                 filterable
@@ -49,7 +49,7 @@
             <el-form-item label="浜у搧鍚嶇О" style=" display: flex;">
               <el-input v-model="form.partname" style="width: 200px" placeholder="璇疯緭鍏�" />
             </el-form-item>
-            <el-form-item v-show="isExpandForm" label="浜у搧瑙勬牸" style=" display: flex;">
+            <el-form-item v-show="isExpandForm" label-width="70px" label="浜у搧瑙勬牸" style=" display: flex;">
               <el-input v-model="form.partspec" style="width: 200px" placeholder="璇疯緭鍏�" />
             </el-form-item>
             <el-form-item v-show="isExpandForm" label="鍒涘缓浜哄憳" style=" display: flex;">
@@ -95,55 +95,37 @@
               <!--              />-->
             </el-form-item>
           </div>
-          <div>
-            <div style="display: flex;align-items: start;margin-top: 5px;z-index: 2;justify-content: end">
-              <el-button type="primary" icon="el-icon-search" @click="search">鏌ヨ</el-button>
-              <el-button type="info" icon="el-icon-refresh" @click="reset">閲嶇疆</el-button>
-            </div>
-            <!--                      <div v-if="!isIpad" style="display: flex;align-items: start; margin-top: 15px;z-index: 2">-->
-            <!--                        <el-button-->
-            <!--                          type="primary"-->
-            <!--                          icon="el-icon-refresh-right"-->
-            <!--                          @click="reset('update')"-->
-            <!--                        >鍚屾ERP-->
-            <!--                        </el-button>-->
-            <!--                        <el-button-->
-            <!--                          type="primary"-->
-            <!--                          icon="el-icon-switch-button"-->
-            <!--                          @click="orderClose"-->
-            <!--                        >鍏抽棴璁㈠崟-->
-            <!--                        </el-button>-->
-            <!--                      </div>-->
-            <!--                      <div v-if="isIpad" style="display: flex;flex-direction: column;align-items: end">-->
-            <!--                        <el-button-->
-            <!--                          type="primary"-->
-            <!--                          icon="el-icon-refresh-right"-->
-            <!--                          style="margin: 10px 0"-->
-            <!--                          @click="reset('update')"-->
-            <!--                        >鍚屾ERP-->
-            <!--                        </el-button>-->
-            <!--                        <el-button-->
-            <!--                          type="primary"-->
-            <!--                          icon="el-icon-switch-button"-->
-            <!--                          @click="orderClose"-->
-            <!--                        >鍏抽棴璁㈠崟-->
-            <!--                        </el-button>-->
-            <!--                      </div>-->
+
+          <div class="bodySearchReset" :style="{marginLeft:$store.state.app.sidebar.opened?'5%':'10%'}">
+            <el-button type="primary" icon="el-icon-search" @click="search">鏌ヨ</el-button>
+            <el-button type="info" icon="el-icon-refresh" @click="reset">閲嶇疆</el-button>
           </div>
+
         </el-form>
+
+        <div
+          class="bodyTopFormExpand"
+        >
+          <svg-icon
+            v-show="mouseHoverType==='mouseout'"
+            style="cursor: pointer"
+            :icon-class="!isExpandForm?'doubleDown3':'doubleUp3'"
+            @mouseenter="mouseHoverType=$event.type"
+          />
+          <svg-icon
+            v-show="mouseHoverType==='mouseenter'"
+            style="cursor: pointer"
+            :icon-class="!isExpandForm?'doubleDown':'doubleUp'"
+            @click="isExpandForm=!isExpandForm"
+            @mouseout="mouseHoverType=$event.type"
+          />
+        </div>
       </div>
 
-      <div
-        class="bodyTopFormExpand"
-        @click="isExpandForm=!isExpandForm"
-      >
-        <i
-          :class="!isExpandForm?'el-icon-arrow-down':'el-icon-arrow-up'"
-          :style="{color:'#42B983'}"
-        /></div>
-
-      <div class="elTableDiv" style="margin-top: 0">
+      <div class="elTableDiv">
         <el-table
+          ref="tableDataRef"
+          class="tableFixed"
           :data="tableData"
           :height="isExpandForm?tableHeight:(tableHeight+40)+'px'"
           border
@@ -420,7 +402,8 @@
       }
     }
     return {
-      isIpad: false,
+      mouseHoverType: 'mouseout',
+      isExpandForm: false,
       mainHeight: 0,
       tableHeight: 0,
       form: {
@@ -483,8 +466,8 @@
           { required: true, message: '璇疯緭鍏ヤ笅鍗曞崟鏁�', trigger: ['blur', 'change'] }
         ]
 
-      },
-      isExpandForm: false
+      }
+
       // expireTimeOption: {
       //   disabledDate(time) {
       //     return time.getTime() > Date.now() - 8.64e6 // 濡傛灉娌℃湁鍚庨潰鐨�-8.64e6灏辨槸涓嶅彲浠ラ�夋嫨浠婂ぉ鐨�
@@ -724,11 +707,8 @@
       this.$nextTick(() => {
         this.mainHeight = window.innerHeight - 85
         this.tableHeight = this.mainHeight - 250
-        this.isIpad = window.innerHeight < 769 && window.innerWidth < 1367
 
-        if (this.isIpad) {
-          this.tableHeight = this.tableHeight - 20
-        }
+        this.$refs.tableDataRef.doLayout()
       })
     },
     tableRowClassName({ row, rowIndex }) {
@@ -850,6 +830,15 @@
     display: none;
   }
 }
+
+.tableFixed{
+  ::v-deep .el-table__fixed-right{
+    height: 100% !important;
+  }
+  ::v-deep .el-table__fixed{
+    height: 100% !important;
+  }
+}
 </style>
 <style>
 .el-table .custom-row {

--
Gitblit v1.9.3