From e713b378b01d189f972cfb5b9eae749ee95a8b51 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期六, 29 十月 2022 13:48:00 +0800
Subject: [PATCH] 1.解决两个账号登录,是否被挤掉的问题

---
 src/views/zzmx/jpgj.vue |   97 ++++++++++++++++++++++++++++--------------------
 1 files changed, 56 insertions(+), 41 deletions(-)

diff --git a/src/views/zzmx/jpgj.vue b/src/views/zzmx/jpgj.vue
index 3381926..a506c91 100644
--- a/src/views/zzmx/jpgj.vue
+++ b/src/views/zzmx/jpgj.vue
@@ -2,21 +2,21 @@
   <div>
     <div class="body" :style="{height:mainHeight+'px'}">
 
-      <div class="bodyTopButtonGroup">
+      <div class="bodyTopButtonGroup" style="justify-content: space-between">
         <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">鏂板</el-button>
-        <!--        <el-button type="primary" icon="el-icon-upload2" @click="upload">瀵煎叆</el-button>-->
+        <el-button icon="el-icon-download" @click="upload">瀵煎叆</el-button>
       </div>
 
       <div class="bodyTopFormGroup">
         <el-form
           ref="form"
           :model="form"
-          label-width="80px"
+          label-width="100px"
           inline
           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.partcode"
                 filterable
@@ -88,15 +88,20 @@
               </el-select>
             </el-form-item>
           </div>
-          <div style="display: flex;align-items: start;margin-top: 5px;z-index: 2">
+          <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"
+        />
       </div>
 
       <div class="elTableDiv">
         <el-table
+          ref="tableDataRef"
+          class="tableFixed"
           :data="tableData"
           :height="tableHeight"
           border
@@ -134,6 +139,7 @@
             label="浜у搧瑙勬牸"
             min-width="110"
             sortable="custom"
+            show-tooltip-when-overflow
           >
             <template slot-scope="{row}">
               <div v-if="row.partspec">{{ row.partspec }}</div>
@@ -151,6 +157,7 @@
             label="宸ヨ壓璺嚎"
             sortable="custom"
             min-width="120"
+            show-tooltip-when-overflow
           />
           <el-table-column
             prop="stepname"
@@ -317,6 +324,8 @@
         </div>
 
         <el-table
+          ref="eqpDialogArrRef"
+          class="tableFixed"
           :data="eqpDialogArr"
           :height="tableHeight"
           :style="{width: 100+'%',height:tableHeight-50+'px',}"
@@ -453,6 +462,16 @@
         </div>
       </span>
     </el-dialog>
+
+    <!--瀵煎叆缁勪欢-->
+    <import-picker
+      ref="importPickerFunc"
+      class="importPickerClass"
+      :shows.sync="shows"
+      :title="title_value"
+      :colos="colos"
+      :code="code"
+    />
   </div>
 </template>
 
@@ -466,32 +485,14 @@
   StepSelectEqp,
   StepSelectEqpList
 } from '@/api/zzmx'
+import ImportPicker from '@/components/ImportPicker'
 
-const SER_HZ = /^[\u4e00-\u9fa5]+$/
 export default {
   name: 'JPGJ',
   components: {
-    Pagination
+    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 {
       isIpad: false,
       mainHeight: 0,
@@ -543,21 +544,18 @@
       editRouteName: '', // 缂栬緫鏃跺伐鑹鸿矾绾垮悕绉�
       editStepName: '', // 缂栬緫鏃跺姞宸ュ伐搴忓悕绉�
       operation: '',
-      dialogFormRules: {
-        OrgType: [
-          { required: true, message: '璇疯緭鍏ラ�夋嫨绫诲瀷', trigger: ['blur', 'change'] }
-        ],
-        OrgCode: [
-          { required: true, validator: validateName, trigger: ['blur', 'change'] }
-        ],
-        OrgName: [
-          { required: true, message: '璇疯緭鍏ュ悕绉�', trigger: ['blur', 'change'] }
-        ],
-        SupUnit: [
-          { required: true, validator: validateTypeCode, trigger: ['blur', 'change'] }
-        ]
-      }
+      dialogFormRules: {},
 
+      title_value: '鏁版嵁瀵煎叆 / 鑺傛媿宸ヤ环',
+      code: '24',
+      shows: false
+    }
+  },
+  watch: {
+    shows() {
+      if (!this.shows) {
+        this.getBeatRateSearch()
+      }
     }
   },
   created() {
@@ -683,6 +681,7 @@
       this.eqpDialogArr.forEach(item => {
         item.isVisible = 0
       })
+      this.$refs.tableDataRef.doLayout()
     },
     // 淇濆瓨琛�
     async saveRow(row) {
@@ -863,15 +862,24 @@
     //     }
     //   })
     // },
+    // 瀵煎叆鎸夐挳
+    upload() {
+      this.shows = true
+      this.$refs.importPickerFunc.newDataFunc()
+    },
+    colos() {
+      this.shows = false
+    },
     // 鑾峰彇椤甸潰楂樺害
     getHeight() {
       this.$nextTick(() => {
         this.mainHeight = window.innerHeight - 85
-        this.tableHeight = this.mainHeight - 200
+        this.tableHeight = this.mainHeight - 195
         if (window.innerHeight < 769) {
           this.tableHeight = this.tableHeight - 40
         }
         this.isIpad = window.innerHeight < 769 && window.innerWidth < 1367
+        this.$refs.tableDataRef.doLayout()
       })
     }
   }
@@ -970,7 +978,14 @@
 .userDialogVisible ::v-deep .el-form-item {
   margin-bottom: 0;
 }
-
+.tableFixed{
+  ::v-deep .el-table__fixed-right{
+    height: 100% !important;
+  }
+  ::v-deep .el-table__fixed{
+    height: 100% !important;
+  }
+}
 </style>
 <style>
 

--
Gitblit v1.9.3