فهرست منبع

fix: 周日报回复评论图标

qiny 1 سال پیش
والد
کامیت
aea8911f9b

+ 4 - 3
client/src/views/OaSystem/personnelManagement/components/DetailBox.vue

@@ -47,15 +47,16 @@ const submitComment = async (content?) => {
   if (isReply) {
     // 回复评论,被回复人用户ID =
     data.replyToUserid = isReply.commentUserId
+    if (content) {
+      data.commentContent = encodeURI(`回复“${isReply.commentUserName}”:${content}`)
+    }
   }
   const result: any = await request.postOriginal({ url: '/adm/reportComment/send', data })
   if (result.msg == 'success') {
     getCommentList()
     message.success('评论成功!')
     // 清空输入框
-    if (!content) {
-      commentInput.value = ''
-    }
+    commentInput.value = ''
   } else {
     message.error('评论失败,请稍后再试')
   }

+ 4 - 3
client/src/views/OaSystem/personnelManagement/components/DetailBoxWeek.vue

@@ -58,15 +58,16 @@ const submitComment = async (content?) => {
   if (isReply) {
     // 回复评论,被回复人用户ID =
     data.replyToUserid = isReply.commentUserId
+    if (content) {
+      data.commentContent = encodeURI(`回复“${isReply.commentUserName}”:${content}`)
+    }
   }
   const result: any = await request.postOriginal({ url: '/adm/reportComment/send', data })
   if (result.msg == 'success') {
     getCommentList()
     message.success('评论成功!')
     // 清空输入框
-    if (!content) {
-      commentInput.value = ''
-    }
+    commentInput.value = ''
   } else {
     message.error('评论失败,请稍后再试')
   }

+ 6 - 3
client_h5/src/pages/myLogs/components/LogDetail.vue

@@ -238,6 +238,11 @@ const submitComment = async (content?: string) => {
   if (isReply) {
     // 回复评论,被回复人用户ID =
     params.replyToUserid = isReply.commentUserId;
+    if (content) {
+      params.commentContent = encodeURI(
+        `回复“${isReply.commentUserName}”:${content}`
+      );
+    }
   }
   const result: any = await http.addReportComment(params);
   if (result.msg == "success") {
@@ -247,9 +252,7 @@ const submitComment = async (content?: string) => {
     });
     await initCommentList();
     // 清空输入框
-    if (!content) {
-      commentInput.value = "";
-    }
+    commentInput.value = "";
   } else {
     showToast({
       message: "评论失败,请稍后重试!",

+ 1 - 1
client_h5/src/utils/tools.ts

@@ -14,6 +14,6 @@ export const getUserInfo = () => {
     deptName: "数智产业研发部",
   };
   // 从localStorage中获取用户信息并返回
-  return JSON.parse(localStorage.getItem("_userInfo") as string);
   // return userInfo;
+  return JSON.parse(localStorage.getItem("_userInfo") as string);
 };