From 94e2f78c6ff8eb51ce9b0a8c7a85062872cacb0c Mon Sep 17 00:00:00 2001
From: value <z1292839451@163.com>
Date: 星期一, 22 四月 2024 17:25:48 +0800
Subject: [PATCH] 检验模板调整

---
 src/view/index.vue |  131 +++++++++++++++++++++++++++++++++++++------
 1 files changed, 112 insertions(+), 19 deletions(-)

diff --git a/src/view/index.vue b/src/view/index.vue
index e8dffa6..5bf3b0c 100644
--- a/src/view/index.vue
+++ b/src/view/index.vue
@@ -16,7 +16,7 @@
 	}
 
 	.logo {
-		width: 130px;
+		width: 118px;
 		height: 40px;
 	}
 
@@ -53,6 +53,12 @@
 	.user span {
 		font-size: 14px;
 	}
+  .el-dropdown{
+    display: flex;
+    align-items: center;
+    color: #000;
+    cursor: pointer;
+  }
 
 	.left {
 		height: calc(100vh - 48px - 40px);
@@ -162,8 +168,7 @@
 	}
 
 	.tag>.el-icon-s-unfold,
-	.el-icon-s-fold,
-	.tag>.el-icon-delete {
+	.el-icon-s-fold{
 		font-size: 16px;
 		cursor: pointer;
 		margin: 0 8px;
@@ -211,6 +216,11 @@
 	.active_tab i {
 		display: inline;
 		color: #3A7BFA;
+		border-radius: 50%;
+	}
+
+	.active_tab i:hover{
+		background-color: rgba(0, 0, 0, 0.08);
 	}
 
 	.component_view {
@@ -226,12 +236,12 @@
 	}
 
 	.right_key_menu {
-		width: 120px;
+		width: 130px;
 		position: absolute;
 		top: 0;
 		left: 0;
 		display: none;
-		z-index: 999;
+		z-index: 9998;
 		padding: 0;
 	}
 
@@ -245,7 +255,7 @@
 	}
 
 	.right_key_menu li i {
-		margin-right: 14px;
+		margin-right: 10px;
 	}
 
 	.right_key_menu li:hover {
@@ -259,6 +269,22 @@
 		cursor: auto !important;
 		margin: 8px 12px;
 	}
+
+  .search_thing {
+    display: flex;
+    align-items: center;
+    height: 50px;
+  }
+
+  .search_label {
+    width: 90px;
+    font-size: 14px;
+    text-align: right;
+  }
+
+  .search_input {
+    width: calc(100% - 120px);
+  }
 </style>
 <style></style>
 <template>
@@ -269,8 +295,13 @@
 			</div>
 			<div class="label">LIMS瀹為獙瀹ょ鐞嗙郴缁�</div>
 			<div class="user">
-				<el-avatar :size="26">{{ userName.substring(0, 1) }}</el-avatar>
-				<span>{{ userName }}</span>
+        <el-dropdown trigger="click" @command="handleCommand">
+          <el-avatar :size="26">{{ userName.substring(0, 1) }}</el-avatar>
+				  <span>{{ userName }}</span>
+          <el-dropdown-menu slot="dropdown">
+            <el-dropdown-item>淇敼瀵嗙爜</el-dropdown-item>
+          </el-dropdown-menu>
+        </el-dropdown>
 				<img src="../../static/img/閫�鍑�.png" @click="out" title="閫�鍑鸿处鍙�" />
 			</div>
 		</div>
@@ -281,7 +312,7 @@
 					<i :class="a.i"></i>
 					<div>{{a.v}}</div>
 				</div>
-				<el-popover placement="right-start" trigger="click" v-if="a.self != true && getPower(a.p)">
+				<el-popover ref="popoverName" placement="right-start" trigger="click" v-if="a.self != true && getPower(a.p)">
 					<div :class="`box ${activeBox == a.k ? 'active_box' : ''}`" slot="reference">
 						<i :class="a.i"></i>
 						<div style="text-align: center;">{{ a.v }}</div>
@@ -299,7 +330,6 @@
 						</div>
 					</div>
 				</el-popover>
-				</el-popover>
 			</div>
 		</div>
 		<div class="right" :style="`width: calc(100% - ${leftOpen?'92':'0'}px);`">
@@ -312,7 +342,6 @@
 						<i class="el-icon-close" @click="removeTab(ai)" v-if="tabActive!=0"></i>
 					</div>
 				</div>
-				<i class="el-icon-delete" @click="allDel" title="鍒犻櫎鎵�鏈夋爣绛鹃〉"></i>
 			</div>
 			<div class="component_view">
 				<component class="com_index" v-for="(com, index) in tabs" :is="com.u" :key="com.k" v-show="com.k == tabActive"
@@ -327,12 +356,39 @@
 					<ul>
 						<li @click="removeTab(activeIndex)"><i class="el-icon-close"></i>鍏抽棴</li>
 						<li @click="allDel"><i class="el-icon-delete"></i>鍏抽棴鎵�鏈�</li>
+						<li @click="rightDel(activeIndex)"><i class="el-icon-d-arrow-right"></i>鍏抽棴鍙充晶椤电</li>
 						<el-divider></el-divider>
 						<li @click="refreshTable"><i class="el-icon-refresh"></i>鍒锋柊</li>
 					</ul>
 				</el-card>
 			</el-col>
 		</div>
+    <el-dialog
+      title="淇敼瀵嗙爜"
+      :visible.sync="editVisible"
+      width="400px"
+      :before-close="handleClose">
+      <el-row>
+        <el-col class="search_thing" :span="24">
+          <div class="search_label"><span class="required-span">* </span>鏃у瘑鐮侊細</div>
+          <div class="search_input">
+            <el-input v-model="query.oldPassword" size="small" clearable show-password></el-input>
+          </div>
+        </el-col>
+      </el-row>
+      <el-row>
+        <el-col class="search_thing" :span="24">
+          <div class="search_label"><span class="required-span">* </span>鏂板瘑鐮侊細</div>
+          <div class="search_input">
+            <el-input v-model="query.newPassWord" size="small" clearable show-password></el-input>
+          </div>
+        </el-col>
+      </el-row>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="handleClose">鍙� 娑�</el-button>
+        <el-button type="primary" @click="handleEdit">纭� 瀹�</el-button>
+      </span>
+    </el-dialog>
 	</div>
 </template>
 
@@ -363,7 +419,9 @@
 				tabs: [],
 				upIndex: 0,
 				activeIndex: 0,
-				power: []
+				power: [],
+        editVisible:false,
+        query:{}
 			};
 		},
 		created() {
@@ -378,7 +436,7 @@
 					k: 0,
 					v: "涓汉棣栭〉",
 					i: "font icon-a-Group1124",
-					u: "nullFace"
+					u: "index-index"
 				}]
 			}
 			this.tabActive = JSON.parse(localStorage.getItem('tabActive'))
@@ -416,15 +474,22 @@
 					if (ob.u == "") ob.u = "nullFace"
 					this.tabs.push(ob);
 				}
+				this.$refs['popoverName'].forEach(a=>{
+					a.doClose()
+				})
 				this.saveClick()
 			},
 			removeTab(index) {
 				this.tabs.splice(index, 1);
 				let data = this.tabs[this.tabs.length - 1]
-				this.activeP = data.k;
-				this.tabActive = data.k;
-				this.activeBox = data.k
-				this.saveClick()
+				this.upTabActive(data.k)
+			},
+			rightDel(index){
+				for (var i = this.tabs.length - 1; i > index; i--) {
+					this.tabs.splice(i, 1);
+				}
+				let data = this.tabs[this.tabs.length - 1]
+				this.upTabActive(data.k)
 			},
 			allDel() {
 				this.activeBox = 0
@@ -434,7 +499,7 @@
 					k: 0,
 					v: "涓汉棣栭〉",
 					i: "font icon-a-Group1124",
-					u: "nullFace"
+					u: "index-index"
 				}]
 				this.saveClick()
 			},
@@ -514,7 +579,35 @@
 				if (count > 4) return 8
 				if (count > 1) return 12
 				if (count == 1) return 24
-			}
+			},
+      // 淇敼瀵嗙爜-鎵撳紑寮圭獥
+      handleCommand(e){
+        this.editVisible = true;
+      },
+      handleEdit(){
+        if (!this.query.oldPassword) {
+          this.$message.error('璇峰~鍐欐棫瀵嗙爜')
+          return
+        }
+        if (!this.query.newPassWord) {
+          this.$message.error('璇峰~鍐欐棫瀵嗙爜')
+          return
+        }
+        this.$axios.post(this.$api.user.upUserPassword, {...this.query}).then(res => {
+            if (res.code == 201) {
+              this.$message.error('淇敼澶辫触')
+              return
+            }
+            this.$message.success('淇敼鎴愬姛')
+            this.editVisible = false
+            this.query = {}
+            this.out();
+          })
+      },
+      handleClose(){
+        this.editVisible = false
+        this.query = {}
+      }
 		}
 	};
 </script>

--
Gitblit v1.9.3