From a65112ecf7580c7d5a2ae60d05150cac34e59f5d Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期一, 26 九月 2022 16:30:33 +0800
Subject: [PATCH] 1.工艺路线工艺设置下拉选中之后自动回车2.工序定义检验人员选中默认当前登录人员

---
 src/views/zlgl/gxjyjl.vue |   59 +++++++++++++++++++++++++++++++----------------------------
 1 files changed, 31 insertions(+), 28 deletions(-)

diff --git a/src/views/zlgl/gxjyjl.vue b/src/views/zlgl/gxjyjl.vue
index 647f9bc..a65f490 100644
--- a/src/views/zlgl/gxjyjl.vue
+++ b/src/views/zlgl/gxjyjl.vue
@@ -31,10 +31,10 @@
             <el-form-item label="宸ュ簭鍚嶇О" style=" display: flex;">
               <el-input v-model="form.stepname" placeholder="璇疯緭鍏�" style="width: 200px" />
             </el-form-item>
-            <el-form-item label="鏍囧噯鍚嶇О" style=" display: flex;">
+            <el-form-item v-show="isExpandForm" label="鏍囧噯鍚嶇О" style=" display: flex;">
               <el-input v-model="form.standname" placeholder="璇疯緭鍏�" style="width: 200px" />
             </el-form-item>
-            <el-form-item label="妫�楠岀被鍨�" style=" display: flex;">
+            <el-form-item v-show="isExpandForm" label="妫�楠岀被鍨�" style=" display: flex;">
               <el-select v-model="form.checktype" style="width: 200px" placeholder="璇烽�夋嫨">
                 <el-option
                   v-for="item in checktypeArr"
@@ -44,7 +44,7 @@
                 />
               </el-select>
             </el-form-item>
-            <el-form-item label="妫�楠岀粨鏋�" style=" display: flex;">
+            <el-form-item v-show="isExpandForm" label="妫�楠岀粨鏋�" style=" display: flex;">
               <el-select v-model="form.checkresult	" style="width: 200px" placeholder="璇烽�夋嫨">
                 <el-option
                   v-for="item in checkresultArr"
@@ -54,22 +54,30 @@
                 />
               </el-select>
             </el-form-item>
-
           </div>
-          <div style="display: flex;align-items: start;margin-top: 5px;z-index: 2">
+          <div class="bodySearchReset">
             <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>
-
-      <div class="elTableDiv">
+      <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">
         <el-table
+          ref="tableDataRef"
+          class="tableFixed"
           :data="tableData"
-          :height="tableHeight+'px'"
+          :height="isExpandForm?tableHeight:(tableHeight+40)+'px'"
           border
           :row-class-name="tableRowClassName"
-          :style="{width: 100+'%',height:tableHeight+'px',}"
+          :style="{width: 100+'%',height:isExpandForm?tableHeight:(tableHeight+40)+'px'}"
           highlight-current-row
           :header-cell-style="this.$headerCellStyle"
           :cell-style="this.$cellStyle"
@@ -341,25 +349,8 @@
     Pagination, ImportPicker
   },
   data() {
-    const validateName = (rule, value, callback) => {
-      if (!value) {
-        return callback(new Error('璇疯緭鍏ョ紪鐮�'))
-      } else {
-        if (SER_HZ.test(value)) {
-          return callback(new Error('缂栫爜涓嶈兘涓轰腑鏂�'))
-        } else {
-          callback()
-        }
-      }
-    }
-    const validateTypeCode = (rule, value, callback) => {
-      if (!value) {
-        return callback(new Error('璇烽�夋嫨涓婄骇'))
-      } else {
-        callback()
-      }
-    }
     return {
+      isExpandForm: false,
       mainHeight: 0,
       tableHeight: 0,
       form: {
@@ -488,6 +479,9 @@
         DeleteOrganization({ orgid: row.code }).then(res => {
           if (res.code === '200') {
             this.$message.success('鍒犻櫎鎴愬姛!')
+            if (this.form.page > 1 && this.tableData.length === 1) {
+              this.form.page--
+            }
             this.getStepCheckTableSearch()
           }
         })
@@ -533,7 +527,8 @@
     getHeight() {
       this.$nextTick(() => {
         this.mainHeight = window.innerHeight - 85
-        this.tableHeight = this.mainHeight - 240
+        this.tableHeight = this.mainHeight - 250
+        this.$refs.tableDataRef.doLayout()
       })
     },
     tableRowClassName({ row, rowIndex }) {
@@ -654,6 +649,14 @@
   align-items: center;
   justify-content: center;
 }
+.tableFixed{
+  ::v-deep .el-table__fixed-right{
+    height: 100% !important;
+  }
+  ::v-deep .el-table__fixed{
+    height: 100% !important;
+  }
+}
 </style>
 <style>
 

--
Gitblit v1.9.3