From d33eacc1f85ac3a736b33ba4713a19aae466d711 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期五, 05 八月 2022 16:42:53 +0800
Subject: [PATCH] 1.做适应平板显示的内容大小

---
 src/views/zzmx/gylx.vue |   45 ++++++++++++++++++++++++++++-----------------
 1 files changed, 28 insertions(+), 17 deletions(-)

diff --git a/src/views/zzmx/gylx.vue b/src/views/zzmx/gylx.vue
index e31a9b6..7c61802 100644
--- a/src/views/zzmx/gylx.vue
+++ b/src/views/zzmx/gylx.vue
@@ -5,12 +5,12 @@
         <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="宸ヨ壓璺嚎缂栫爜" style=" display: flex;">
               <el-input v-model="form.routecode" placeholder="璇疯緭鍏�" style="width: 200px" />
             </el-form-item>
             <el-form-item label="宸ヨ壓鍚嶇О" style=" display: flex;">
@@ -90,9 +90,11 @@
             prop="lm_date"
             label="鍒涘缓鏃堕棿"
             sortable="custom"
+            width="160"
           />
           <el-table-column
             label="鎿嶄綔"
+            width="120"
           >
             <template slot-scope="{row}">
               <div class="operationClass">
@@ -120,16 +122,15 @@
     <el-dialog
       :title="operation==='add'?'鏂板':'棰勮'"
       :visible.sync="dialogVisible"
-      width="1200px"
+      width="1000px"
       :close-on-click-modal="false"
-      top="15vh"
-      :fullscreen="isFullscreen"
+      :top="isIpad?'5vh':'15vh'"
       @closed="handleClose"
       @close="handleClose"
     >
-      <el-form ref="dialogForm" style="height: 500px" :rules="dialogFormRules" :model="dialogForm" label-width="80px">
+      <el-form ref="dialogForm" style="height: 500px" :rules="dialogFormRules" :model="dialogForm" label-width="110px">
         <div style="display: flex">
-          <el-form-item label="宸ヨ壓缂栫爜" prop="code" style="margin-right: 20px">
+          <el-form-item label="宸ヨ壓璺嚎缂栫爜" prop="code" style="margin-right: 20px">
             <el-input v-model="dialogForm.code" :disabled="operation!=='add'" style="width: 220px" />
           </el-form-item>
           <el-form-item label="宸ヨ壓鍚嶇О" prop="name">
@@ -258,7 +259,7 @@
 
 <script>
 import Pagination from '@/components/Pagination'
-import { AddUpdateRoute, DeleteRoute, RouteSearch, RouteSelect, StepSelect, ViewRoute } from '@/api/zzmx'
+import { AddUpdateRoute, DeleteRoute, RouteSearch, StepSelect, ViewRoute } from '@/api/zzmx'
 
 const SER_HZ = /^[\u4e00-\u9fa5]+$/
 export default {
@@ -279,7 +280,7 @@
       }
     }
     return {
-      isFullscreen: false,
+      isIpad: false,
       mainHeight: 0,
       tableHeight: 0,
       form: {
@@ -303,7 +304,7 @@
         id: '',
         code: '',
         name: '',
-        enable: '',
+        enable: 'Y',
         description: '',
         Data: []
       },
@@ -316,7 +317,7 @@
       selectedName: '', // 閫変腑鐨勫悕绉�
       autocompleteValue: '', // 鍙悳绱㈣緭鍏ユ涓殑鍊�
       routeArr: [], // 宸ヨ壓璁剧疆涓嬫媺鎵�鏈夊��
-      addDisabled: false, // 娣诲姞鎸夐挳鏄惁鍙偣鍑�
+      addDisabled: true, // 娣诲姞鎸夐挳鏄惁鍙偣鍑�
       editDisabled: true, // 淇敼鎸夐挳鏄惁鍙偣鍑�
       mouseFocusPosition: 0, // 榧犳爣鑱氱劍鐨勪綅缃�
       operation: '',
@@ -399,6 +400,9 @@
           flag2 = true
         }
       })
+      if (tag.stepname === this.autocompleteValue.trim()) {
+        flag2 = false
+      }
       if (flag2) {
         return this.$message.info('姝ゅ伐搴忓凡閫夛紝璇烽�夋嫨鍏跺畠宸ュ簭锛�')
       }
@@ -597,12 +601,13 @@
     handleClose() {
       this.dialogForm.code = ''
       this.dialogForm.name = ''
-      this.dialogForm.enable = ''
+      this.dialogForm.enable = 'Y'
       this.dialogForm.description = ''
       this.dialogForm.Data = []
       this.dynamicTags = [
         { editDisabled: true, stepcode: 'Step01', seq: 1, stepname: ' ', effect: 'light' }
       ]
+      this.addDisabled = true
       this.$refs.dialogForm.clearValidate()
     },
     // 瀵硅瘽妗嗗彇娑�
@@ -652,8 +657,11 @@
     getHeight() {
       this.$nextTick(() => {
         this.mainHeight = window.innerHeight - 250
-        this.tableHeight = this.mainHeight - 100
-        // this.isFullscreen = window.innerHeight < 800
+        this.tableHeight = this.mainHeight - 50
+        if (window.innerHeight < 769) {
+          this.tableHeight = this.tableHeight - 50
+        }
+        this.isIpad = window.innerHeight < 769 && window.innerWidth < 1367
       })
     }
   }
@@ -704,8 +712,11 @@
   color: #606266;
 }
 
+//::v-deep .el-dialog__body {
+//  padding: 20px 100px !important;
+//}
 ::v-deep .el-dialog__body {
-  padding: 20px 100px !important;
+  padding: 20px 60px !important;
 }
 
 ::v-deep .el-radio__input.is-checked .el-radio__inner {
@@ -828,8 +839,8 @@
   position: absolute;
   margin-left: -7px;
   z-index: 2;
-  width: 15px;
-  height: 15px !important;
+  width: 16px;
+  height: 16px !important;
   font-size: 12px;
   text-align: center;
   line-height: 15px;

--
Gitblit v1.9.3