From d597f9a4d8c83b149694354a7369057f80e5faac Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期日, 26 六月 2022 15:58:41 +0800
Subject: [PATCH] 1.优化代码递交

---
 src/views/zzmx/gylx.vue |   52 +++++++++++++++++++++++++++++++++-------------------
 1 files changed, 33 insertions(+), 19 deletions(-)

diff --git a/src/views/zzmx/gylx.vue b/src/views/zzmx/gylx.vue
index 906dacb..946cd75 100644
--- a/src/views/zzmx/gylx.vue
+++ b/src/views/zzmx/gylx.vue
@@ -156,17 +156,18 @@
           <div class="settingDiv">
             <!--   瀹炵幇宸ヨ壓璁剧疆鍔ㄦ�佹坊鍔�-->
             <div v-for="(tag,index) in dynamicTags" :key="tag.id" style="display: flex;align-items: center">
-              <div style="display: flex;align-items: center;position: relative">
-
+              <div style="display: flex;align-items: center;position: relative;">
+                <div class="orderNumber">{{ index }}</div>
                 <el-tooltip class="item" effect="dark" :content="tag.label" placement="top">
+
+                  <!--                  @close="handleTagClose(tag.label)"-->
+                  <!--                  :closable="index!==0"-->
                   <el-tag
                     v-if="flag||tag.label!==flagSelected"
-                    :closable="index!==0"
                     :disable-transitions="false"
                     class="elTag"
                     :class="tagClass(tag.label)"
                     :effect="tag.effect"
-                    @close="handleTagClose(tag.label)"
                     @click="elTagClick(tag)"
                   >
                     <!--                <div class="orderNumber">{{ index }}</div>-->
@@ -174,10 +175,11 @@
                     <i class="el-icon-edit" @click="tagEdit(tag)" />
                   </el-tag>
                 </el-tooltip>
+                <i v-if="index!==0" class="el-icon-close" @click="handleTagClose(tag.label)" />
                 <el-autocomplete
                   v-if="!flag&&tag.label===flagSelected"
                   :ref="'saveTagInput'+tag.id"
-                  v-model="value"
+                  v-model="tagValue"
                   class="input-new-tag"
                   size="small"
                   :fetch-suggestions="querySearch"
@@ -262,7 +264,7 @@
       ],
       total: 10,
       tableData: [],
-      dialogVisible: true,
+      dialogVisible: false,
       dialogForm: {
         OrgType: '',
         OrgCode: '',
@@ -270,14 +272,14 @@
         SupUnit: ''// 涓婄骇鍗曚綅
       },
       dynamicTags: [// 宸ヨ壓璁剧疆鏁扮粍
-        { id: 1, label: '鏍囩涓�', effect: 'light' },
+        { id: 1, label: '鏍囩涓�鏍囩涓�鏍囩涓�鏍囩涓�鏍囩涓�鏍囩涓�', effect: 'light' },
         { id: 2, label: '鏍囩浜�', effect: 'light' },
         { id: 3, label: '鏍囩涓�', effect: 'light' }
       ],
       tagSelectedId: '', // tag閫夋嫨涓璱d
       flag: true,
       flagSelected: '', // 鍒ゆ柇鏄惁閫変腑
-      value: '',
+      tagValue: '',
       restaurants: [],
       addDisabled: false,
 
@@ -345,7 +347,7 @@
       console.log(this.value)
       this.addDisabled = false
       this.flagSelect = ''
-      this.value = ''
+      this.tagValue = ''
       this.flag = !this.flag
     },
     tagEdit(tag) {
@@ -353,7 +355,7 @@
 
       this.addDisabled = true
       this.flagSelected = tag.label
-      this.value = tag.label
+      this.tagValue = tag.label
       this.flag = !this.flag
       this.$nextTick(_ => {
         this.$refs['saveTagInput' + tag.id][0].focus()
@@ -692,9 +694,10 @@
 瀹炵幇宸ヨ壓璁剧疆鍔ㄦ�佹坊鍔犳牱寮�
 */
 
-.orderNumber{
+.orderNumber {
 
 }
+
 .el-icon-edit {
   width: 16px;
   height: 16px;
@@ -702,11 +705,25 @@
   padding: 3px 0 0 3px;
   margin-left: 5px;
   cursor: pointer;
+  position: absolute;
+  right: 3px;
+  bottom: 8px;
 }
 
 .el-icon-edit:hover {
   background-color: #99a9bf;
   color: #FFFFFF;
+}
+ .el-icon-close {
+  position: absolute ;
+  top: -5px ;
+  z-index: 100 ;
+  cursor: pointer;
+  padding: 1px 0 0 1px ;
+}
+
+.el-icon-close:hover {
+  background-color: #99a9bf;
 }
 
 .el-tag--dark {
@@ -721,13 +738,6 @@
   display: flex;
   justify-content: center;
   color: $main_color;
-}
-
-::v-deep .el-tag__close {
-  padding: 1px 0 0 1px !important;
-}
-::v-deep .el-tag__close:hover {
-  background-color: #99a9bf;
 }
 
 ::v-deep .el-button--success {
@@ -750,7 +760,8 @@
   display: flex;
   width: 100%;
   height: 40px;
-  overflow-y: scroll;
+  overflow-x: scroll;
+  overflow-y: hidden;
   align-items: center;
 }
 
@@ -758,6 +769,9 @@
   margin-left: 0;
   width: 100px;
   position: relative;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
 }
 
 </style>

--
Gitblit v1.9.3