From dbcc700e995d8c1ce2a3bea4c23c9b0d23c1e65d Mon Sep 17 00:00:00 2001
From: wangfei <3597712270@qq.com>
Date: 星期二, 21 十月 2025 11:32:51 +0800
Subject: [PATCH] 第一次点击后不可再点击

---
 UI-Project/src/views/User/userlist.vue |   42 +++++++++++++++++++++++++++++++++---------
 1 files changed, 33 insertions(+), 9 deletions(-)

diff --git a/UI-Project/src/views/User/userlist.vue b/UI-Project/src/views/User/userlist.vue
index 88571f1..8395779 100644
--- a/UI-Project/src/views/User/userlist.vue
+++ b/UI-Project/src/views/User/userlist.vue
@@ -111,6 +111,18 @@
 }
 // 娣诲姞 
 const getTableRow = async () => {
+   if (!userName.value) {
+    ElMessage.error(t('productStock.inusername'))
+    return
+  }
+   if (!selectedProjectNoa.value) {
+    ElMessage.error(t('productStock.inrole'))
+    return
+  }
+   if (!password.value) {
+    ElMessage.error(t('productStock.inpassword'))
+    return
+  }
   try {
     const response = await request.post('/loadGlass/sys/user/saveUser', {
       userName: userName.value,
@@ -134,6 +146,18 @@
 };
 // 缂栬緫
 const getTableRowa = async () => {
+   if (!userName.value) {
+    ElMessage.error(t('productStock.inusername'))
+    return
+  }
+   if (!selectedProjectNoa.value) {
+    ElMessage.error(t('productStock.inrole'))
+    return
+  }
+   if (!password.value) {
+    ElMessage.error(t('productStock.inpassword'))
+    return
+  }
   let id = window.localStorage.getItem('id')
   try {
     const response = await request.post('/loadGlass/sys/user/updateUser', {
@@ -183,8 +207,8 @@
 </script>
 <template>
   <div>
-     <el-button type="primary" style="margin-top: 10px;margin-left: 10px;"  size="mini" id="searchButton" @click="add = true">{{ $t('productStock.addusers') }}</el-button>
-    <el-card style="flex: 1;margin-left: 10px;margin-top: 20px;" v-loading="loading">
+     <el-button type="primary" style="margin-top: 10px;margin-left: 10px;"  id="searchButton" @click="add = true">{{ $t('productStock.addusers') }}</el-button>
+    <el-card style="flex: 1;margin-left: 10px;margin-top: 20px;" >
       <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;">
         <el-table height="750" ref="table" 
         :data="tableData" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
@@ -198,9 +222,9 @@
             </el-table-column>
           <el-table-column fixed="right" :label="$t('productStock.operate')" align="center" width="270">
             <template #default="scope">
-              <el-button size="mini" type="text" plain @click="open(scope.row)">{{ $t('productStock.resetpassword') }}</el-button>
-              <el-button size="mini" type="text" plain @click="handleEdit(scope.row)">{{ $t('productStock.exit') }}</el-button>
-              <el-button size="mini" type="text" plain @click="opena(scope.row)">{{ $t('productStock.delete') }}</el-button>
+              <el-button type="text" plain @click="open(scope.row)">{{ $t('productStock.resetpassword') }}</el-button>
+              <el-button type="text" plain @click="handleEdit(scope.row)">{{ $t('productStock.exit') }}</el-button>
+              <el-button type="text" plain @click="opena(scope.row)">{{ $t('productStock.delete') }}</el-button>
             </template>
         </el-table-column>
         </el-table>
@@ -209,8 +233,8 @@
   </div>
   <el-dialog v-model="add" top="23vh" width="37%" :title="$t('productStock.addusers')">
     <div style="margin-left: -50px;margin-top: 10px;margin-bottom: 10px;">
-            <el-form  size="mini" label-width="150px">
-      <el-form label-width="100px" label-position="right">
+            <el-form  label-width="150px">
+      <el-form label-width="105px" label-position="right">
         <el-row style="margin-top: -15px;margin-bottom: -2px;">
           <el-col :span="6">
               <div id="dt" style="font-size: 15px;">
@@ -270,8 +294,8 @@
   </el-dialog> 
   <el-dialog v-model="adda" top="23vh" width="37%" :title="$t('productStock.reusername')" >
     <div style="margin-left: -50px;margin-top: 10px;margin-bottom: 10px;">
-            <el-form ref="formRef" size="mini" label-width="150px">
-      <el-form label-width="100px" label-position="right">
+            <el-form ref="formRef" label-width="150px">
+      <el-form label-width="105px" label-position="right">
         <el-row style="margin-top: -15px;margin-bottom: -2px;">
           <el-col :span="6">
               <div id="dt" style="font-size: 15px;">

--
Gitblit v1.8.0