From 9101ba64d5aa4722fc6384674682cd508d1315c9 Mon Sep 17 00:00:00 2001
From: wangfei <3597712270@qq.com>
Date: 星期四, 11 十二月 2025 10:51:44 +0800
Subject: [PATCH] 报警弹窗新增提示信息

---
 UI-Project/src/views/Caching/cachingun.vue      |   10 ++++
 UI-Project/src/views/Slicecage/slicecage.vue    |    6 +-
 UI-Project/src/views/hollow/hollowslicecage.vue |    9 ++++
 UI-Project/src/views/Caching/cachingbefore.vue  |    8 ++++
 UI-Project/src/views/User/userlist.vue          |   61 ++++++++----------------------
 5 files changed, 45 insertions(+), 49 deletions(-)

diff --git a/UI-Project/src/views/Caching/cachingbefore.vue b/UI-Project/src/views/Caching/cachingbefore.vue
index 541283a..7f92321 100644
--- a/UI-Project/src/views/Caching/cachingbefore.vue
+++ b/UI-Project/src/views/Caching/cachingbefore.vue
@@ -411,6 +411,7 @@
       <el-icon><WarnTriangleFilled /></el-icon>
       <span class="alert-text">
         {{ alertText }} (id:{{ alertMessage }})
+        <span class="confirm-text">{{ $t('hellow.pleaseConfirm') }}</span>
       </span>
     </div>
     <button @click="showAlert = false" class="close-btn">脳</button>
@@ -686,4 +687,11 @@
   max-width: 80%; /* 闃叉灏忓睆骞曟孩鍑� */
   min-width: 400px; /* 鏈�灏忓搴︿繚璇� */
 }
+.confirm-text {
+  color: rgb(242, 121, 8);
+  display: block; /* 寮哄埗鎹㈣ */
+  text-align: center; /* 姘村钩灞呬腑 */
+  margin-top: 4px; /* 涓庝笂涓�琛屼繚鎸侀棿璺� */
+  font-weight: 500; /* 鍔犵矖绐佸嚭 */
+}
 </style>
diff --git a/UI-Project/src/views/Caching/cachingun.vue b/UI-Project/src/views/Caching/cachingun.vue
index a2ff07a..2815f63 100644
--- a/UI-Project/src/views/Caching/cachingun.vue
+++ b/UI-Project/src/views/Caching/cachingun.vue
@@ -392,6 +392,7 @@
       <el-icon><WarnTriangleFilled /></el-icon>
       <span class="alert-text">
         {{ alertText }} (id:{{ alertMessage }})
+        <span class="confirm-text">{{ $t('hellow.pleaseConfirm') }}</span>
       </span>
     </div>
     <button @click="showAlert = false" class="close-btn">脳</button>
@@ -593,4 +594,11 @@
   max-width: 80%; /* 闃叉灏忓睆骞曟孩鍑� */
   min-width: 400px; /* 鏈�灏忓搴︿繚璇� */
 }
-</style>
+.confirm-text {
+  color: rgb(242, 121, 8);
+  display: block; /* 寮哄埗鎹㈣ */
+  text-align: center; /* 姘村钩灞呬腑 */
+  margin-top: 4px; /* 涓庝笂涓�琛屼繚鎸侀棿璺� */
+  font-weight: 500; /* 鍔犵矖绐佸嚭 */
+}
+</style>
\ No newline at end of file
diff --git a/UI-Project/src/views/Slicecage/slicecage.vue b/UI-Project/src/views/Slicecage/slicecage.vue
index 573de12..9a49a1c 100644
--- a/UI-Project/src/views/Slicecage/slicecage.vue
+++ b/UI-Project/src/views/Slicecage/slicecage.vue
@@ -1248,7 +1248,7 @@
       <el-icon><WarnTriangleFilled /></el-icon>
       <span class="alert-text">
         {{ alertText }} (id:{{ alertMessage }})
-        <!-- <span class="confirm-text">{{ $t('hellow.pleaseConfirm') }}</span> -->
+        <span class="confirm-text">{{ $t('hellow.pleaseConfirm') }}</span>
       </span>
     </div>
     <button @click="showAlert = false" class="close-btn">脳</button>
@@ -2040,7 +2040,7 @@
   color: rgb(242, 121, 8);
   display: block; /* 寮哄埗鎹㈣ */
   text-align: center; /* 姘村钩灞呬腑 */
-  margin-top: 4px; /* 涓庝笂涓�琛屼繚鎸侀棿璺濓紝鍙�� */
-  font-weight: 500; /* 鍙�夛紝鍔犵矖绐佸嚭 */
+  margin-top: 4px; /* 涓庝笂涓�琛屼繚鎸侀棿璺� */
+  font-weight: 500; /* 鍔犵矖绐佸嚭 */
 }
 </style>
\ No newline at end of file
diff --git a/UI-Project/src/views/User/userlist.vue b/UI-Project/src/views/User/userlist.vue
index 5d1f44b..db9da3f 100644
--- a/UI-Project/src/views/User/userlist.vue
+++ b/UI-Project/src/views/User/userlist.vue
@@ -1,25 +1,23 @@
 <script setup>
 import { Search, Lock } from "@element-plus/icons-vue"; // 鏂板Lock鍥炬爣瀵煎叆
-import { reactive, ref, onMounted } from "vue"; // 鍚堝苟瀵煎叆
+import { reactive, ref, onMounted } from "vue";
 import { useRouter } from "vue-router";
 const router = useRouter();
 import request from "@/utils/request";
 import { ElMessage, ElMessageBox } from "element-plus";
 import { useI18n } from "vue-i18n";
 const { t } = useI18n();
-
-let language = ref(localStorage.getItem("lang") || "zh");
 const selectedProjectNoa = ref(null);
 const userName = ref("");
 const password = ref("");
-const confirmPassword = ref(""); // 鏂板锛氱‘璁ゅ瘑鐮�
-const editPassword = ref(""); // 鏂板锛氱紪杈戞椂鐨勫瘑鐮�
-const editConfirmPassword = ref(""); // 鏂板锛氱紪杈戞椂鐨勭‘璁ゅ瘑鐮�
+const confirmPassword = ref("");
+const editPassword = ref("");
+const editConfirmPassword = ref("");
 const tableData = ref([]);
 const slot = ref("");
-const add = ref(false); // 娣诲姞寮圭獥
-const adda = ref(false); // 缂栬緫寮圭獥
-
+const add = ref(false);
+const adda = ref(false);
+let language = ref(localStorage.getItem("lang") || "zh");
 // 鑾峰彇鐢ㄦ埛鍒楄〃
 const listByUserName = async () => {
   try {
@@ -33,10 +31,8 @@
     }
   } catch (error) {
     ElMessage.error( );
-    console.error("鑾峰彇鐢ㄦ埛鍒楄〃澶辫触锛�", error);
   }
 };
-
 // 閲嶇疆瀵嗙爜
 const open = async (row) => {
   try {
@@ -67,11 +63,9 @@
     }
   }
 };
-
 const titleSelectJsona = ref({
-  processTypea: [], // 淇瀛楁鍚嶆嫾鍐�
+  processTypea: [],
 });
-
 // 鑾峰彇瑙掕壊鍒楄〃
 const fetchOptionsa = async () => {
   try {
@@ -85,15 +79,13 @@
     }
   } catch (error) {
     ElMessage.error( );
-    console.error("鑾峰彇瑙掕壊鍒楄〃澶辫触锛�", error);
   }
 };
-
 // 澶勭悊缂栬緫鎸夐挳鐐瑰嚮
 function handleEdit(row) {
   userName.value = row.userName;
-  editPassword.value = ""; // 娓呯┖缂栬緫瀵嗙爜
-  editConfirmPassword.value = ""; // 娓呯┖缂栬緫纭瀵嗙爜
+  editPassword.value = "";
+  editConfirmPassword.value = "";
   if (row.roleList && row.roleList.length > 0) {
     const firstRole = row.roleList[0];
     selectedProjectNoa.value = firstRole.id;
@@ -101,25 +93,22 @@
   adda.value = true;
   window.localStorage.setItem("id", row.id);
 }
-
 // 鍏抽棴娣诲姞寮圭獥
 function closeDialog() {
   add.value = false;
   userName.value = "";
   password.value = "";
-  confirmPassword.value = ""; // 娓呯┖纭瀵嗙爜
+  confirmPassword.value = "";
   selectedProjectNoa.value = "";
 }
-
 // 鍏抽棴缂栬緫寮圭獥
 function closeDialoga() {
   adda.value = false;
   userName.value = "";
-  editPassword.value = ""; // 娓呯┖缂栬緫瀵嗙爜
-  editConfirmPassword.value = ""; // 娓呯┖缂栬緫纭瀵嗙爜
+  editPassword.value = "";
+  editConfirmPassword.value = "";
   selectedProjectNoa.value = "";
 }
-
 // 娣诲姞鐢ㄦ埛
 const getTableRow = async () => {
   // 楠岃瘉鐢ㄦ埛鍚�
@@ -139,15 +128,14 @@
   }
   // 楠岃瘉纭瀵嗙爜
   if (!confirmPassword.value) {
-    ElMessage.error(t("productStock.inconfirmpassword")); // 闇�鍦╥18n涓坊鍔犺瀛楁
+    ElMessage.error(t("productStock.inconfirmpassword"));
     return;
   }
   // 楠岃瘉瀵嗙爜涓�鑷存��
   if (password.value !== confirmPassword.value) {
-    ElMessage.error(t("productStock.passwordNotMatch")); // 闇�鍦╥18n涓坊鍔犺瀛楁
+    ElMessage.error(t("productStock.passwordNotMatch"));
     return;
   }
-
   try {
     const response = await request.post("/loadGlass/sys/user/saveUser", {
       userName: userName.value,
@@ -168,10 +156,8 @@
     }
   } catch (error) {
     ElMessage.error( );
-    console.error("娣诲姞鐢ㄦ埛澶辫触锛�", error);
   }
 };
-
 // 缂栬緫鐢ㄦ埛
 const getTableRowa = async () => {
   // 楠岃瘉鐢ㄦ埛鍚�
@@ -184,7 +170,6 @@
     ElMessage.error(t("productStock.inrole"));
     return;
   }
-  // 濡傛灉濉啓浜嗗瘑鐮侊紝楠岃瘉瀵嗙爜鍜岀‘璁ゅ瘑鐮�
   if (editPassword.value || editConfirmPassword.value) {
     if (!editPassword.value) {
       ElMessage.error(t("productStock.inpassword"));
@@ -199,14 +184,12 @@
       return;
     }
   }
-
   let id = window.localStorage.getItem("id");
   if (!id) {
     ElMessage.error(t("productStock.userIdError"));
     return;
   }
   try {
-    // 鏋勫缓璇锋眰鍙傛暟
     const requestData = {
       id: id,
       userName: userName.value,
@@ -216,25 +199,21 @@
         },
       ],
     };
-    // 濡傛灉濉啓浜嗗瘑鐮侊紝娣诲姞鍒拌姹傚弬鏁颁腑
     if (editPassword.value) {
       requestData.password = editPassword.value;
     }
-
     const response = await request.post("/loadGlass/sys/user/updateUser", requestData);
     if (response.code === 200) {
       ElMessage.success(response.message);
-      closeDialoga(); // 鍏抽棴寮圭獥骞舵竻绌鸿〃鍗�
-      listByUserName(); // 鍒锋柊鍒楄〃
+      closeDialoga();
+      listByUserName();
     } else {
       ElMessage.error(response.message);
     }
   } catch (error) {
     ElMessage.error( );
-    console.error("缂栬緫鐢ㄦ埛澶辫触锛�", error);
   }
 };
-
 // 鍒犻櫎鐢ㄦ埛
 const opena = async (row) => {
   try {
@@ -259,17 +238,14 @@
   } catch (error) {
     if (error !== "cancel") {
       ElMessage.error( );
-      console.error("鍒犻櫎鐢ㄦ埛澶辫触锛�", error);
     }
   }
 };
-
 onMounted(() => {
   fetchOptionsa();
   listByUserName();
 });
 </script>
-
 <template>
   <div>
     <el-button
@@ -339,7 +315,6 @@
       </div>
     </el-card>
   </div>
-
   <!-- 娣诲姞鐢ㄦ埛寮圭獥 -->
   <el-dialog
     v-model="add"
@@ -450,7 +425,6 @@
       </div>
     </template>
   </el-dialog>
-
   <!-- 缂栬緫鐢ㄦ埛寮圭獥 -->
   <el-dialog
     v-model="adda"
@@ -563,7 +537,6 @@
     </template>
   </el-dialog>
 </template>
-
 <style scoped>
 #dt {
   display: block;
diff --git a/UI-Project/src/views/hollow/hollowslicecage.vue b/UI-Project/src/views/hollow/hollowslicecage.vue
index 84585cf..68ad819 100644
--- a/UI-Project/src/views/hollow/hollowslicecage.vue
+++ b/UI-Project/src/views/hollow/hollowslicecage.vue
@@ -135,7 +135,6 @@
       sums[index] = '鍚堣';
       return;
     }
-    
     // 鍙闇�瑕佽绠楃殑鍒楄繘琛屾眰鍜�
     const needSumColumns = ['sumCount', 'pairCount', 'totalNumber', 'realCount'];
     if (needSumColumns.includes(column.property)) {
@@ -942,6 +941,7 @@
       <el-icon><WarnTriangleFilled /></el-icon>
       <span class="alert-text">
         {{ alertText }} (id:{{ alertMessage }})
+        <span class="confirm-text">{{ $t('hellow.pleaseConfirm') }}</span>
       </span>
     </div>
     <button @click="showAlert = false" class="close-btn">脳</button>
@@ -1517,4 +1517,11 @@
 #app-container {
   padding-top: 60px; /* 鏍规嵁alert楂樺害璋冩暣 */
 }
+.confirm-text {
+  color: rgb(242, 121, 8);
+  display: block; /* 寮哄埗鎹㈣ */
+  text-align: center; /* 姘村钩灞呬腑 */
+  margin-top: 4px; /* 涓庝笂涓�琛屼繚鎸侀棿璺� */
+  font-weight: 500; /* 鍔犵矖绐佸嚭 */
+}
 </style>
\ No newline at end of file

--
Gitblit v1.8.0