Ver Fonte

feat: 周日报项目时长填写及评论回复功能

qiny há 1 ano atrás
pai
commit
8ad91994c7
18 ficheiros alterados com 152 adições e 1536 exclusões
  1. 4 0
      client/src/config/axios/index.ts
  2. 13 5
      client/src/views/OaSystem/personnelManagement/components/AmountOfWork.vue
  3. 60 6
      client/src/views/OaSystem/personnelManagement/components/DetailBox.vue
  4. 63 8
      client/src/views/OaSystem/personnelManagement/components/DetailBoxWeek.vue
  5. 0 72
      client/src/views/OaSystem/personnelManagement/components/WorkHoursSelect.vue
  6. 0 73
      client/src/views/OaSystem/personnelManagement/components/WorkProjectList.vue
  7. 0 259
      client/src/views/OaSystem/personnelManagement/dailyCenter/DetailBox.vue
  8. 2 2
      client/src/views/OaSystem/personnelManagement/dailyCenter/dailyCenter.vue
  9. 1 1
      client/src/views/OaSystem/personnelManagement/dailyCenter/editorDetail.vue
  10. 0 230
      client/src/views/OaSystem/personnelManagement/dailyCenter/lookDetail.vue
  11. 2 2
      client/src/views/OaSystem/personnelManagement/dailyDetail/index.vue
  12. 3 2
      client/src/views/OaSystem/personnelManagement/mySendLog/index.vue
  13. 0 383
      client/src/views/OaSystem/personnelManagement/weeklyCenter/AmountOfWork.vue
  14. 0 259
      client/src/views/OaSystem/personnelManagement/weeklyCenter/DetailBox.vue
  15. 1 1
      client/src/views/OaSystem/personnelManagement/weeklyCenter/editorDetail.vue
  16. 0 230
      client/src/views/OaSystem/personnelManagement/weeklyCenter/lookDetail.vue
  17. 1 1
      client/src/views/OaSystem/personnelManagement/weeklyCenter/weeklyCenter.vue
  18. 2 2
      client/src/views/OaSystem/personnelManagement/weeklyDetail/index.vue

+ 4 - 0
client/src/config/axios/index.ts

@@ -47,6 +47,10 @@ export default {
     const res = await request({ method: 'DELETE', ...option }, prefix)
     return res.data as unknown as T
   },
+  deleteOriginal: async (option: any, prefix?: string) => {
+    const res = await request({ method: 'DELETE', ...option }, prefix)
+    return res
+  },
   put: async <T = any>(option: any, prefix?: string) => {
     const res = await request({ method: 'PUT', ...option }, prefix)
     return res.data as unknown as T

+ 13 - 5
client/src/views/OaSystem/personnelManagement/dailyCenter/AmountOfWork.vue → client/src/views/OaSystem/personnelManagement/components/AmountOfWork.vue

@@ -30,7 +30,7 @@
               :visible="item.visible"
             >
               <template #reference>
-                <div class="time-select" @click="item.visible = true">
+                <div class="time-select" @click="openDialog(item.id)">
                   <span>{{ item.count ? `(${item.count}小时)` : '' }}</span>
                   {{ item['name'] }}
                 </div>
@@ -46,7 +46,7 @@
                       :min="0"
                       :max="80"
                       controls-position="right"
-                      @change="changeCount"
+                      @change="(val) => changeCount(val, index)"
                     />
                   </div>
                   <div class="panel-numeric-key">
@@ -58,7 +58,7 @@
                           color: i + 1 === item.count ? '#fff' : '#2d333c'
                         }"
                         :key="i"
-                        @click="changeCount(num, index)"
+                        @click="changeCount(num, index, true)"
                       >
                         <span>{{ num }}</span>
                       </li>
@@ -166,11 +166,11 @@ const getAllProject = async () => {
 const tempCount = ref(0)
 
 // 工时数量
-const changeCount = (val, index) => {
+const changeCount = (val, index, submit?) => {
   // 获取临时数量
   tempCount.value = dataList.value[index].count
   dataList.value[index].count = val
-  if (index || index === 0) {
+  if (submit) {
     panelSubmit(index)
   }
 }
@@ -269,6 +269,14 @@ const emit = defineEmits<{
 const handleClick = (val: IProject): void => {
   emit('select', val)
 }
+
+// 打开弹窗
+const openDialog = (id) => {
+  // 并且关闭所有其他弹窗
+  dataList.value.forEach((item) => {
+    item.visible = item.id == id
+  })
+}
 </script>
 
 <style lang="scss" scoped>

+ 60 - 6
client/src/views/OaSystem/personnelManagement/dailyDetail/DetailBox.vue → client/src/views/OaSystem/personnelManagement/components/DetailBox.vue

@@ -22,8 +22,10 @@ const message = useMessage()
 const userInfo = getUserInfo()
 // 评论字段
 interface IComment {
-  reportId: string // 报告id
+  id: string // 评论id
+  reportId: string // 日报id
   commentUserId: string // 评论人用户id
+  commentUserName: string // 评论人用户名
   commentContent: string // 评论内容
   commentDate?: string // 评论时间
   replyToUserid?: string // 被回复人用户ID
@@ -34,11 +36,17 @@ const submitComment = async (content?) => {
     message.info('评论内容不能为空!')
     return
   }
-  const data = {
+  const data: any = {
     reportId: detail.id,
     commentUserId: userInfo.id ?? '',
     commentContent: content ?? commentInput.value
   }
+  // 判断是否是回复评论
+  const isReply = commentList.value.find((item) => item.isReply === true)
+  if (isReply) {
+    // 回复评论,被回复人用户ID =
+    data.replyToUserid = isReply.commentUserId
+  }
   const result: any = await request.postOriginal({ url: '/adm/reportComment/send', data })
   if (result.msg == 'success') {
     getCommentList()
@@ -58,13 +66,57 @@ const getCommentList = async () => {
     url: '/adm/reportComment/getList',
     params: { reportId: detail?.id, uId: detail?.userId }
   })
-  commentList.value = result
+  commentList.value = result.map((item) => ({
+    ...item,
+    isReply: false
+  }))
 }
 const commentInput = ref('')
 
 onMounted(() => {
   getCommentList()
 })
+
+// 点击回复后对内容进行引用
+const commentInputRef: any = ref(null)
+const replyComment = (data: IComment, isCancel?) => {
+  if (isCancel) {
+    commentInput.value = ''
+    commentList.value = commentList.value.map((item) => {
+      return {
+        ...item,
+        isReply: false
+      }
+    })
+    return
+  }
+  commentInput.value = `回复“${data.commentUserName}”:`
+  commentList.value = commentList.value.map((item) => {
+    return {
+      ...item,
+      isReply: item.id == data.id
+    }
+  })
+  commentInputRef.value.focus()
+}
+// 删除评论
+const deleteComment = async (data: IComment) => {
+  const result: any = await request.deleteOriginal({
+    url: '/adm/reportComment/delete',
+    data: [data.id]
+  })
+
+  if (result.msg == 'success') {
+    message.success('删除成功')
+    getCommentList()
+  } else {
+    message.error('删除失败,请稍后重试!')
+  }
+}
+// 由于只能删除自己发出的评论,所以做一个判断
+const isMyComment = (data: IComment) => {
+  return data.commentUserId == userInfo.id
+}
 </script>
 <template>
   <div class="detail-box">
@@ -124,14 +176,16 @@ onMounted(() => {
         </div>
         <div v-else v-for="(item, index) in commentList" :key="index" class="item">
           <div class="left">
-            <span>{{ item.commentUserName.substr(-2) }}</span>
+            <span>{{ item.commentUserName?.substr(-2) }}</span>
           </div>
           <div class="right">
             <div class="title">
               {{
                 `${item.commentUserName} ${moment(item.commentDate).format('YYYY-MM-DD HH:mm:ss')}`
               }}
-              <span>删除</span>
+              <span v-if="isMyComment(item)" @click="deleteComment(item)">删除</span>
+              <span v-if="!item.isReply" @click="replyComment(item)">回复</span>
+              <span v-else @click="replyComment(item, true)">取消回复</span>
             </div>
             <div>{{ item.commentContent }}</div>
           </div>
@@ -143,7 +197,7 @@ onMounted(() => {
         }}</span>
       </div>
       <div class="comment-input">
-        <el-input v-model="commentInput" placeholder="请输入评论内容" />
+        <el-input ref="commentInputRef" v-model="commentInput" placeholder="请输入评论内容" />
         <el-button class="submit" type="primary" @click="submitComment()">发表评价</el-button>
       </div>
     </div>

+ 63 - 8
client/src/views/OaSystem/personnelManagement/weeklyDetail/DetailBox.vue → client/src/views/OaSystem/personnelManagement/components/DetailBoxWeek.vue

@@ -7,9 +7,6 @@ interface IProp {
 }
 const { detail } = defineProps<IProp>()
 
-// onMounted(() => {
-//   console.log('detail', detail)
-// })
 // const emojiObj = {
 //   'emoji-good': '赞!👍',
 //   'emoji-very-good': '写的太棒了!👏',
@@ -25,8 +22,10 @@ const message = useMessage()
 const userInfo = getUserInfo()
 // 评论字段
 interface IComment {
-  reportId: string // 报告id
+  id: string // 评论id
+  reportId: string // 日报id
   commentUserId: string // 评论人用户id
+  commentUserName: string // 评论人用户名
   commentContent: string // 评论内容
   commentDate?: string // 评论时间
   replyToUserid?: string // 被回复人用户ID
@@ -37,11 +36,17 @@ const submitComment = async (content?) => {
     message.info('评论内容不能为空!')
     return
   }
-  const data = {
+  const data: any = {
     reportId: detail.id,
     commentUserId: userInfo.id ?? '',
     commentContent: content ?? commentInput.value
   }
+  // 判断是否是回复评论
+  const isReply = commentList.value.find((item) => item.isReply === true)
+  if (isReply) {
+    // 回复评论,被回复人用户ID =
+    data.replyToUserid = isReply.commentUserId
+  }
   const result: any = await request.postOriginal({ url: '/adm/reportComment/send', data })
   if (result.msg == 'success') {
     getCommentList()
@@ -61,9 +66,57 @@ const getCommentList = async () => {
     url: '/adm/reportComment/getList',
     params: { reportId: detail?.id, uId: detail?.userId }
   })
-  commentList.value = result
+  commentList.value = result.map((item) => ({
+    ...item,
+    isReply: false
+  }))
 }
 const commentInput = ref('')
+
+onMounted(() => {
+  getCommentList()
+})
+
+// 点击回复后对内容进行引用
+const commentInputRef: any = ref(null)
+const replyComment = (data: IComment, isCancel?) => {
+  if (isCancel) {
+    commentInput.value = ''
+    commentList.value = commentList.value.map((item) => {
+      return {
+        ...item,
+        isReply: false
+      }
+    })
+    return
+  }
+  commentInput.value = `回复“${data.commentUserName}”:`
+  commentList.value = commentList.value.map((item) => {
+    return {
+      ...item,
+      isReply: item.id == data.id
+    }
+  })
+  commentInputRef.value.focus()
+}
+// 删除评论
+const deleteComment = async (data: IComment) => {
+  const result: any = await request.deleteOriginal({
+    url: '/adm/reportComment/delete',
+    data: [data.id]
+  })
+
+  if (result.msg == 'success') {
+    message.success('删除成功')
+    getCommentList()
+  } else {
+    message.error('删除失败,请稍后重试!')
+  }
+}
+// 由于只能删除自己发出的评论,所以做一个判断
+const isMyComment = (data: IComment) => {
+  return data.commentUserId == userInfo.id
+}
 </script>
 <template>
   <div class="detail-box">
@@ -132,7 +185,9 @@ const commentInput = ref('')
               {{
                 `${item.commentUserName} ${moment(item.commentDate).format('YYYY-MM-DD HH:mm:ss')}`
               }}
-              <span>删除</span>
+              <span v-if="isMyComment(item)" @click="deleteComment(item)">删除</span>
+              <span v-if="!item.isReply" @click="replyComment(item)">回复</span>
+              <span v-else @click="replyComment(item, true)">取消回复</span>
             </div>
             <div>{{ item.commentContent }}</div>
           </div>
@@ -144,7 +199,7 @@ const commentInput = ref('')
         }}</span>
       </div>
       <div class="comment-input">
-        <el-input v-model="commentInput" placeholder="请输入评论内容" />
+        <el-input ref="commentInputRef" v-model="commentInput" placeholder="请输入评论内容" />
         <el-button class="submit" type="primary" @click="submitComment()">发表评价</el-button>
       </div>
     </div>

+ 0 - 72
client/src/views/OaSystem/personnelManagement/components/WorkHoursSelect.vue

@@ -1,72 +0,0 @@
-<template>
-  <div class="WorkHoursSelect">
-    <p class="title">{{ title || '工时选择(小时)' }}</p>
-    <div>
-      <ul>
-        <li v-for="(item, index) in data * 25" :key="index" @click="handleClick(index)">
-          {{ index }}
-        </li>
-      </ul>
-    </div>
-  </div>
-</template>
-
-<script setup lang="ts">
-defineOptions({ name: 'WorkHoursSelect' })
-defineProps({
-  data: {
-    type: Number,
-    default: 0
-  },
-  title: {
-    type: String,
-    default: ''
-  },
-  height: {
-    type: String,
-    default: '174px'
-  }
-})
-const emit = defineEmits<{
-  (e: 'select', val: number): void
-}>()
-const handleClick = (val: number): void => {
-  emit('select', val)
-}
-</script>
-
-<style lang="scss" scoped>
-.WorkHoursSelect {
-  border: 1px solid #dee0e3;
-  height: 100%;
-  > .title {
-    padding: 10px;
-    text-align: center;
-    background-color: #f7f8fa;
-    color: #121518;
-  }
-  > div {
-    text-align: center;
-    overflow-y: auto;
-    height: calc(100% - 42px);
-    > ul {
-      padding: 20px;
-      display: grid;
-      grid-template-columns: repeat(6, 38px);
-      gap: 10px;
-      justify-content: center; /* 水平居中 */
-      align-items: center; /* 垂直居中 */
-      > li {
-        text-align: center;
-        width: 38px;
-        height: 38px;
-        line-height: 38px;
-        background: #f7f8fa;
-        border-radius: 2px;
-        color: #2d333c;
-        cursor: pointer;
-      }
-    }
-  }
-}
-</style>

+ 0 - 73
client/src/views/OaSystem/personnelManagement/components/WorkProjectList.vue

@@ -1,73 +0,0 @@
-<template>
-  <div class="WorkHoursSelect">
-    <p class="title">{{ title || '工作项目(总耗时8小时)' }}</p>
-    <div :style="{ height: height }">
-      <ul>
-        <li v-for="(item, index) in dataList" :key="index" @click="handleClick(item)">
-          {{ item['name'] }}
-        </li>
-      </ul>
-    </div>
-  </div>
-</template>
-
-<script setup lang="ts">
-interface IProject {
-  name: string
-}
-defineOptions({ name: 'WorkHoursSelect' })
-const emit = defineEmits<{
-  (e: 'select', val: IProject): void
-}>()
-defineProps({
-  data: {
-    type: Number,
-    default: 0
-  },
-  title: {
-    type: String,
-    default: ''
-  },
-  height: {
-    type: String,
-    default: '174px'
-  }
-})
-let dataList = ref<Array<IProject>>([])
-dataList.value.push({
-  name: '测试项目'
-})
-const handleClick = (val: IProject): void => {
-  emit('select', val)
-}
-</script>
-
-<style lang="scss" scoped>
-.WorkHoursSelect {
-  border: 1px solid #dee0e3;
-  width: 100%;
-  height: 100%;
-  > .title {
-    padding: 10px;
-    text-align: center;
-    background-color: #f7f8fa;
-    color: #121518;
-  }
-  > div {
-    text-align: center;
-    height: 174px;
-    > ul {
-      background-color: #fff;
-      > li {
-        text-align: left;
-        color: #2d333c;
-        padding: 10px 15px;
-        cursor: pointer;
-        &:hover {
-          background-color: #e3effd;
-        }
-      }
-    }
-  }
-}
-</style>

+ 0 - 259
client/src/views/OaSystem/personnelManagement/dailyCenter/DetailBox.vue

@@ -1,259 +0,0 @@
-<script lang="ts" setup>
-import moment from 'moment'
-import request from '@/config/axios'
-import { getUserInfo } from '@/utils/tool'
-interface IProp {
-  detail: any
-}
-const { detail } = defineProps<IProp>()
-
-const emojiList = ['赞!👍', '写的太棒了!👏', '学习了🌹', '感谢你的分享🙏', '加油💪', '早点休息😴']
-
-const message = useMessage()
-const userInfo = getUserInfo()
-// 评论字段
-interface IComment {
-  reportId: string // 报告id
-  commentUserId: string // 评论人用户id
-  commentContent: string // 评论内容
-  commentDate?: string // 评论时间
-  replyToUserid?: string // 被回复人用户ID
-}
-// 提交评论
-const submitComment = async (content?) => {
-  if (!content && commentInput.value == '') {
-    message.info('评论内容不能为空!')
-    return
-  }
-  const data = {
-    reportId: detail.id,
-    commentUserId: userInfo.id ?? '',
-    commentContent: content ?? commentInput.value
-  }
-  const result: any = await request.postOriginal({ url: '/adm/reportComment/send', data })
-  if (result.msg == 'success') {
-    getCommentList()
-    message.success('评论成功!')
-    // 清空输入框
-    if (!content) {
-      commentInput.value = ''
-    }
-  } else {
-    message.error('评论失败,请稍后再试')
-  }
-}
-const commentList = ref<any[]>(detail?.comments ?? [])
-// 获取报告被评论列表
-const getCommentList = async () => {
-  const result = await request.get({
-    url: '/adm/reportComment/getList',
-    params: { reportId: detail?.id, uId: detail?.userId }
-  })
-  commentList.value = result
-}
-const commentInput = ref('')
-
-onMounted(() => {
-  getCommentList()
-})
-</script>
-<template>
-  <div class="detail-box">
-    <div class="form-box">
-      <el-form ref="form" label-width="100px">
-        <el-row :gutter="24">
-          <el-col :span="8">
-            <el-form-item class="label-item" label="日志日期">
-              <div class="write-date">
-                {{ moment(detail.reportStartDate).format('YYYY-MM-DD') }}
-              </div>
-            </el-form-item>
-          </el-col>
-          <el-col :span="16">
-            <el-form-item class="label-item" label="接收人">
-              <div class="tag-list">
-                <el-tag
-                  type="info"
-                  effect="light"
-                  v-for="(item, index) in detail.receiveNames"
-                  :key="index"
-                  >{{ item }}</el-tag
-                >
-              </div>
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="24" style="height: 100%">
-            <el-form-item class="label-item" label="今日工作">
-              <div
-                class="text-area"
-                v-html="detail?.reportContent?.replace(/(\r\n|\n|\r)/gm, '<br />')"
-              >
-              </div>
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="24" style="height: 100%">
-            <el-form-item class="label-item" label="工作量分配">
-              <div class="text-area area2">
-                <div v-for="(item, index) in detail.workload" :key="index">
-                  <span class="work-time">{{ `(${item.workTime}小时)` }}</span>
-                  <span>{{ item.projectName }}</span>
-                </div>
-              </div>
-            </el-form-item>
-          </el-col>
-        </el-row>
-      </el-form>
-    </div>
-    <div class="comment-box">
-      <div class="comment-list">
-        <div v-if="commentList.length === 0" class="not-comment">
-          <el-empty description="暂无评论" image-size="35" />
-        </div>
-        <div v-else v-for="(item, index) in commentList" :key="index" class="item">
-          <div class="left">
-            <span>{{ item.commentUserName.substr(-2) }}</span>
-          </div>
-          <div class="right">
-            <div class="title">
-              {{
-                `${item.commentUserName} ${moment(item.commentDate).format('YYYY-MM-DD HH:mm:ss')}`
-              }}
-              <span>删除</span>
-            </div>
-            <div>{{ item.commentContent }}</div>
-          </div>
-        </div>
-      </div>
-      <div class="comment-emoji">
-        <span v-for="(item, index) in emojiList" :key="index" @click="submitComment(item)">{{
-          item
-        }}</span>
-      </div>
-      <div class="comment-input">
-        <el-input v-model="commentInput" placeholder="请输入评论内容" />
-        <el-button class="submit" type="primary" @click="submitComment()">发表评价</el-button>
-      </div>
-    </div>
-  </div>
-</template>
-<style scoped lang="scss">
-.detail-box {
-  width: 100%;
-  height: 100%;
-  .form-box {
-    width: 100%;
-    .label-item {
-      .el-form-item__label {
-        font-weight: 400 !important;
-        font-size: 16px !important;
-      }
-      .write-date {
-        width: 100px;
-        border: 1px solid #dee0e3;
-        border-radius: 4px;
-        text-align: center;
-        background: #f9f9f9;
-      }
-      .text-area {
-        width: 100%;
-        height: 132px;
-        overflow-y: scroll;
-        background: #f9f9f9;
-        border-radius: 4px 4px 4px 4px;
-        border: 1px solid #c7ceda;
-        padding: 5px 10px;
-      }
-      .area2 {
-        height: 90px;
-        .work-time {
-          font-weight: bold;
-          font-size: 14px;
-          color: #1b80eb;
-        }
-      }
-      .tag-list {
-        width: 100%;
-        max-height: 65px;
-        overflow-y: scroll;
-        .el-tag {
-          margin-right: 8px;
-        }
-      }
-    }
-  }
-  .comment-box {
-    width: 100%;
-    padding-left: 100px;
-    .comment-list {
-      height: 180px;
-      overflow-y: scroll;
-      background: #f7f8fa;
-      border-radius: 4px 4px 4px 4px;
-      border: 1px solid #eef2f9;
-      padding: 10px;
-      .item {
-        display: flex;
-        justify-content: flex-start;
-        align-items: center;
-        border-bottom: 1px solid #e3eaf5;
-        height: 85px;
-        .left {
-          width: 80px;
-          text-align: center;
-          span {
-            display: inline-block;
-            width: 44px;
-            height: 44px;
-            line-height: 44px;
-            color: #ffffff;
-            background-color: #5a99e3;
-            font-size: 14px;
-            font-weight: 400;
-            border-radius: 50%;
-          }
-        }
-        .right {
-          font-weight: 400;
-          font-size: 14px;
-          color: #121518;
-          line-height: 16px;
-          .title {
-            font-weight: 400;
-            font-size: 14px;
-            color: #8a94a4;
-            margin-bottom: 8px;
-            span {
-              color: #1b80eb;
-              margin-left: 15px;
-              cursor: pointer;
-            }
-          }
-        }
-      }
-    }
-    .comment-emoji {
-      height: 50px;
-      line-height: 50px;
-      display: flex;
-      justify-content: space-between;
-      font-size: 14px;
-      color: #626b70;
-      span {
-        cursor: pointer;
-      }
-    }
-    .comment-input {
-      width: 100%;
-      display: flex;
-      justify-content: space-between;
-      .submit {
-        margin-left: 10px;
-      }
-    }
-  }
-}
-</style>

+ 2 - 2
client/src/views/OaSystem/personnelManagement/dailyCenter/dailyCenter.vue

@@ -5,7 +5,7 @@
       <div class="calendarBox">
         <OaCalendar @click="dateOnChange" />
       </div>
-      <div class="contentBox" v-if="writeData.isLog">
+      <div class="contentBox" v-if="writeData?.isLog">
         <DetailBox :detail="writeData.isLog" />
       </div>
       <div class="contentBox" v-else>
@@ -17,7 +17,7 @@
 
 <script setup lang="ts">
 import OaCalendar from './OaCalendar.vue'
-import DetailBox from './DetailBox.vue'
+import DetailBox from '../components/DetailBox.vue'
 import EditorDetail from './editorDetail.vue'
 import moment from 'moment'
 defineOptions({ name: 'DailyCenter' })

+ 1 - 1
client/src/views/OaSystem/personnelManagement/dailyCenter/editorDetail.vue

@@ -55,7 +55,7 @@
 
 <script setup lang="ts">
 import request from '@/config/axios'
-import AmountOfWork from './AmountOfWork.vue'
+import AmountOfWork from '../components/AmountOfWork.vue'
 import UserSelect from '@/components/UserSelect/index.vue'
 import { getUserInfo } from '@/utils/tool'
 import moment from 'moment'

+ 0 - 230
client/src/views/OaSystem/personnelManagement/dailyCenter/lookDetail.vue

@@ -1,230 +0,0 @@
-<template>
-  <div class="lookDetailBox">
-    <div class="topBox">
-      <div class="formBox">
-        <el-form ref="form" :model="formData" label-width="120px">
-          <el-row style="height: 100%">
-            <el-col :span="24" style="height: 100%">
-              <el-form-item label="今日完成工作" style="height: 100%">
-                <el-input
-                  type="textarea"
-                  disabled
-                  v-model="formData.reportContent"
-                  style="width: 100%; height: 100%"
-                />
-              </el-form-item>
-            </el-col>
-          </el-row>
-        </el-form>
-      </div>
-      <div class="footBox">
-        <WorkProjectList height="auto" />
-      </div>
-    </div>
-    <div class="commonentBox">
-      <ul class="commonentList">
-        <li>
-          <div class="userImg">张三</div>
-          <div class="content">
-            <p>
-              <span>张三</span>
-              <span>2023-10-02</span>
-            </p>
-            <p class="desc">点赞</p>
-          </div>
-        </li>
-        <li>
-          <div class="userImg">张三</div>
-          <div class="content">
-            <p>
-              <span>张三</span>
-              <span>2023-10-02</span>
-            </p>
-            <p class="desc">点赞</p>
-          </div>
-        </li>
-      </ul>
-      <div class="commonent">
-        <ul>
-          <li>赞</li>
-          <li>写的太棒了!</li>
-        </ul>
-        <div class="formBox">
-          <div>
-            <el-input width="100%" />
-          </div>
-          <div>
-            <el-button type="primary" @click="sendCommontHandle">发送</el-button>
-          </div>
-        </div>
-      </div>
-    </div>
-  </div>
-</template>
-
-<script setup lang="ts">
-import request from '@/config/axios'
-import { handleTree } from '@/utils/tree'
-import WorkProjectList from '../components/WorkProjectList.vue'
-
-defineOptions({ name: 'LookDetail' })
-
-const formData = ref<{
-  fillingDate: string
-  receiveUserId: never[]
-  reportContent: string
-  workTime: number
-}>({
-  fillingDate: '',
-  receiveUserId: [],
-  reportContent: '',
-  workTime: 0
-})
-const allUserList = ref<any[]>()
-const commentList = ref<any>()
-let sourceAllUserList: any[] = []
-
-const getReportCommentList = async () => {
-  const urlApi = '/adm/reportComment/getList'
-  const params = {
-    reportId: '',
-    uId: ''
-  }
-  const result = await request.get({ url: urlApi, params })
-  commentList.value = result
-}
-getReportCommentList()
-
-const getAllUserSimpleByList = async () => {
-  const urlApi = '/system/dept/list-all-user-simple'
-  const params = {}
-  const result = await request.get({ url: urlApi, params })
-  sourceAllUserList = handleTree(
-    result.map((item) => {
-      return {
-        label: item['name'],
-        value: item['id'],
-        parentId: item['parentId'],
-        children: item['children']
-      }
-    }),
-    'value'
-  )
-  allUserList.value = sourceAllUserList
-}
-getAllUserSimpleByList()
-
-const sendCommontHandle = async () => {
-  const urlApi = '/adm/reportComment/send'
-  const sendData = {
-    replyToUserid: '',
-    reportId: '',
-    commentContent: '',
-    commentDate: ''
-  }
-  const result = await request.post({ url: urlApi, data: sendData })
-  console.log('result~~~~~~~~~~~~~~~~~~~~~')
-  console.log(result)
-}
-</script>
-
-<style lang="scss" scoped>
-.lookDetailBox {
-  width: 100%;
-  height: 100%;
-  .topBox {
-    display: flex;
-    height: calc(100% - 280px);
-    > .formBox {
-      padding: 0px 0px;
-      margin-right: 15px;
-      flex: 1.4;
-      height: 100%;
-      :depp(.el-form) {
-        height: 100%;
-      }
-      :deep(.el-textarea, .el-textarea__inner) {
-        height: 100% !important;
-      }
-    }
-    > .footBox {
-      display: flex;
-      flex: 1;
-    }
-  }
-  > .commonentBox {
-    margin-top: 20px;
-    > ul {
-      border: 1px solid #eef2f9;
-      background-color: #f7f8fa;
-      > li {
-        display: flex;
-        align-items: center;
-        padding: 15px;
-        border-bottom: 1px solid #e3eaf5;
-        &:last-child {
-          border-bottom: 0px;
-        }
-        > .userImg {
-          font-size: 15px;
-          width: 50px;
-          height: 50px;
-          line-height: 50px;
-          text-align: center;
-          border-radius: 50%;
-          background-color: #5a99e3;
-          color: #fff;
-          margin-right: 10px;
-        }
-        > .content {
-          flex: 1;
-          > p {
-            padding: 2px 0px;
-            &:first-child {
-              font-size: 14px;
-              color: #8a94a4;
-              > span {
-                display: inline-block;
-                margin-right: 10px;
-              }
-            }
-            &.desc {
-              color: #121518;
-            }
-          }
-        }
-      }
-    }
-    > .commonent {
-      margin-top: 15px;
-      > ul {
-        > li {
-          display: inline-block;
-          padding: 3px 20px;
-          background: #f7f8fa;
-          border-radius: 20px;
-          opacity: 1;
-          border: 1px solid #edeeef;
-          margin-right: 10px;
-          font-size: 14px;
-          &:last-child {
-            margin-right: 0px;
-          }
-        }
-      }
-      > .formBox {
-        display: flex;
-        margin-top: 10px;
-        > div {
-          &:first-child {
-            flex: 1;
-          }
-          &:last-child {
-            margin-left: 10px;
-          }
-        }
-      }
-    }
-  }
-}
-</style>

+ 2 - 2
client/src/views/OaSystem/personnelManagement/dailyDetail/index.vue

@@ -5,7 +5,7 @@
 
 import request from '@/config/axios'
 import OaCalendar from './OaCalendar.vue'
-import DetailBox from './DetailBox.vue'
+import DetailBox from '../components/DetailBox.vue'
 
 const { currentRoute } = useRouter()
 
@@ -37,7 +37,7 @@ const getDetailById = async (reportId) => {
 </script>
 <template>
   <div class="daily-log-detail">
-    <div class="title">日报详情</div>
+    <div class="title">{{ currentRoute.query?.userName ?? '' }}日报详情</div>
     <div class="box" v-if="detail.id">
       <div class="calendarBox">
         <OaCalendar :detailTime="detail.reportStartDate" />

+ 3 - 2
client/src/views/OaSystem/personnelManagement/mySendLog/index.vue

@@ -78,10 +78,11 @@ const { push, currentRoute } = useRouter()
 // 查看详情
 const jumpLogDetail = (id: number): void => {
   const userId = currentRoute.value.query.userId ?? userInfo.id ?? ''
+  const userName = currentRoute.value.query.userName ?? userInfo.nickname ?? ''
   if (isDaily.value) {
-    push(`/dailyLogDetail?id=${id}&userId=${userId}`)
+    push(`/dailyLogDetail?id=${id}&userId=${userId}&userName=${userName}`)
   } else {
-    push(`/weeklyLogDetail?id=${id}&userId=${userId}`)
+    push(`/weeklyLogDetail?id=${id}&userId=${userId}&userName=${userName}`)
   }
 }
 

+ 0 - 383
client/src/views/OaSystem/personnelManagement/weeklyCenter/AmountOfWork.vue

@@ -1,383 +0,0 @@
-<template>
-  <div class="WorkHoursSelect">
-    <div class="select-title">
-      <span>工作量分配</span>
-    </div>
-    <div class="select-list">
-      <div class="title">
-        <div class="left">
-          {{ '工作项目' + (defaultTotalTime ? `(总耗时${defaultTotalTime}小时)` : '') }}
-        </div>
-        <div class="right">
-          <el-input
-            ref="searchInputRef"
-            placeholder="搜索项目"
-            v-model="searchValue"
-            @input="searchOnchange"
-            clearable
-          />
-        </div>
-      </div>
-      <ul class="list-ul">
-        <li v-for="(item, index) in dataList" :key="index" @click="handleClick(item)">
-          <div class="project-write">
-            <el-popover
-              ref="popperRef"
-              popper-class="popover-panel"
-              placement="top-end"
-              :width="400"
-              trigger="click"
-              :visible="item.visible"
-            >
-              <template #reference>
-                <div class="time-select" @click="item.visible = true">
-                  <span>{{ item.count ? `(${item.count}小时)` : '' }}</span>
-                  {{ item['name'] }}
-                </div>
-              </template>
-              <template #default>
-                <div class="work-hours-select-panel">
-                  <p class="title">{{ item['name'] }} 工时 (小时)</p>
-                  <div class="panel-input-number">
-                    输入时间:
-                    <el-input-number
-                      v-model="item.count"
-                      class="input-number"
-                      :min="0"
-                      :max="80"
-                      controls-position="right"
-                      @change="changeCount"
-                    />
-                  </div>
-                  <div class="panel-numeric-key">
-                    <ul>
-                      <li
-                        v-for="(num, i) in 40"
-                        :style="{
-                          background: i + 1 === item.count ? '#1b80eb' : '#f7f8fa',
-                          color: i + 1 === item.count ? '#fff' : '#2d333c'
-                        }"
-                        :key="i"
-                        @click="changeCount(num, index)"
-                      >
-                        <span>{{ num }}</span>
-                      </li>
-                    </ul>
-                  </div>
-                  <div class="panel-submit">
-                    <el-button type="primary" @click="panelSubmit(index)">确定</el-button>
-                    <el-button type="danger" @click="changeCount(0, index)">清零</el-button>
-                    <el-button type="info" @click="panelCancel(index)"> 取消 </el-button>
-                  </div>
-                </div>
-              </template>
-            </el-popover>
-          </div>
-        </li>
-      </ul>
-    </div>
-  </div>
-</template>
-
-<script setup lang="ts">
-/** 周日报相同文件 */
-import request from '@/config/axios'
-import { getUserInfo } from '@/utils/tool'
-// 获取用户信息
-const userInfo = getUserInfo()
-
-defineOptions({ name: 'WorkHoursSelect' })
-
-interface IProp {
-  onChange: (any) => any
-  initialData?: any[] // 初始数据
-  nowDate: string
-}
-const props = defineProps<IProp>()
-const { onChange } = props
-const { initialData, nowDate } = toRefs(props)
-// 默认工作项目总时长
-const defaultTotalTime = ref(0)
-// 工时填写弹框的ref
-const popperRef = ref<any>(null)
-// 初始化数据
-const dataList = ref<any[]>([])
-
-const setInitData = () => {
-  if (initialData.value && initialData.value.length > 0) {
-    const initialObj = {}
-    initialData.value.forEach((item) => {
-      initialObj[item.projectId] = item.workTime
-    })
-    const timer = setTimeout(() => {
-      dataList.value = dataList.value.map((item) => {
-        let count = 0
-        if (initialObj[item.id]) {
-          count = initialObj[item.id]
-        }
-        return {
-          ...item,
-          count
-        }
-      })
-      dataList.value.sort((x, y) => y['count'] - x['count'])
-      clearTimeout(timer)
-    }, 0)
-  } else {
-    getAllProject()
-  }
-  getTotalTime()
-}
-
-watch(
-  () => nowDate.value,
-  () => {
-    setInitData()
-  }
-)
-
-onMounted(() => {
-  getAllProject()
-  setInitData()
-})
-// 获取任务列表
-const getAllProject = async () => {
-  const { records } = await request.get(
-    {
-      url: `/project/page`,
-      params: {
-        pageSize: -1,
-        userId: userInfo.id ?? ''
-      }
-    },
-    '/business'
-  )
-  dataList.value = records.map((item) => {
-    return {
-      visible: false,
-      count: 0,
-      name: item.xmmc,
-      id: item.id
-    }
-  })
-}
-
-// 临时存储数量
-const tempCount = ref(0)
-
-// 工时数量
-const changeCount = (val, index) => {
-  // 获取临时数量
-  tempCount.value = dataList.value[index].count
-  dataList.value[index].count = val
-}
-
-// 计算总工时
-const getTotalTime = () => {
-  defaultTotalTime.value = dataList.value.reduce((total, item) => {
-    return total + item.count
-  }, 0)
-}
-
-// 提交工时
-const panelSubmit = (index: number) => {
-  dataList.value[index].visible = false
-  getTotalTime()
-  tempCount.value = 0
-  // 提交后进行一下数据排序
-  dataList.value.sort((x, y) => y['count'] - x['count'])
-
-  // 提交工时后将已填数据传出去
-  const countList = dataList.value
-    .filter((item) => item.count > 0)
-    .map((item) => ({
-      workTime: item.count,
-      projectId: item.id
-    }))
-  onChange(countList)
-
-  // 提交工时后清空搜索框
-  if (tempSearchList.value.length > 0) {
-    searchInputRef.value?.clear()
-  }
-}
-
-// 取消选择
-const panelCancel = (index: number) => {
-  dataList.value[index] = {
-    ...dataList.value[index],
-    visible: false,
-    count: tempCount.value
-  }
-  getTotalTime()
-}
-
-// 搜索内容的临时存储
-const searchInputRef = ref<any>(null)
-const tempSearchList = ref<any[]>([])
-const searchValue = ref('')
-// 搜索内容改变时触发
-const searchOnchange = (val: string) => {
-  // 搜索框第一次搜索时触发
-  if (tempSearchList.value.length < dataList.value.length) {
-    tempSearchList.value = dataList.value
-  }
-  // 搜索内容为空时,清空搜索列表,并显示全部数据
-  if (val.length == 0) {
-    clearSearch()
-    return
-  }
-  // 使用 filter() 方法进行模糊查询
-  const filteredArray = tempSearchList.value.filter((item) => {
-    // 创建正则表达式,忽略大小写,并且匹配关键词
-    const regex = new RegExp(val, 'i')
-    // 使用正则表达式测试数组中的每个元素
-    return regex.test(item.name)
-  })
-  dataList.value = filteredArray
-}
-// 清除内容时触发
-const clearSearch = () => {
-  const countObj = {}
-  dataList.value.forEach((item) => {
-    countObj[item.id] = item.count
-  })
-  tempSearchList.value.forEach((item) => {
-    if (countObj[item.id]) {
-      // 如果有值,则赋值
-      item.count = countObj[item.id]
-    }
-  })
-  // 顺便进行一下数据排序
-  tempSearchList.value.sort((x, y) => y['count'] - x['count'])
-  // 还原全部数据
-  dataList.value = tempSearchList.value
-  tempSearchList.value = []
-  getTotalTime()
-}
-
-interface IProject {
-  name: string
-}
-const emit = defineEmits<{
-  (e: 'select', val: IProject): void
-}>()
-
-const handleClick = (val: IProject): void => {
-  emit('select', val)
-}
-</script>
-
-<style lang="scss" scoped>
-.WorkHoursSelect {
-  width: 100%;
-  height: calc(100% - 110px);
-  display: flex;
-
-  .select-title {
-    font-family:
-      Microsoft YaHei,
-      Microsoft YaHei;
-    width: 100px;
-    font-size: 14px;
-    font-weight: 400;
-    height: 36px;
-    line-height: 36px;
-    text-align: right;
-    padding-right: 12px;
-    :before {
-      content: '*';
-      color: var(--el-color-danger);
-      margin-right: 4px;
-    }
-  }
-  .select-list {
-    flex: 1;
-    height: 100%;
-    border: 1px solid #dee0e3;
-    .title {
-      padding: 8px 20px;
-      background-color: #f7f8fa;
-      color: #121518;
-      display: flex;
-      justify-content: space-between;
-      align-items: center;
-    }
-    .list-ul {
-      width: 100%;
-      height: calc(100% - 50px);
-      overflow-y: scroll;
-      text-align: center;
-      background-color: #fff;
-      width: 100%;
-      li {
-        text-align: left;
-        color: #2d333c;
-        padding: 6px 10px;
-        cursor: pointer;
-        justify-content: space-between;
-        &:hover {
-          background-color: #d3e5ff;
-        }
-
-        .project-write {
-          width: 100%;
-          padding-left: 10px;
-        }
-      }
-      .time-select {
-        span {
-          color: #1b80eb;
-        }
-      }
-    }
-  }
-}
-.work-hours-select-panel {
-  .title {
-    padding: 10px;
-    text-align: center;
-    background-color: #f7f8fa;
-    color: #121518;
-    font-size: 16px;
-    font-weight: 400;
-  }
-  .popover-panel {
-    padding: 0 !important;
-  }
-  .panel-input-number {
-    height: 21px;
-    margin: 10px 0;
-    font-size: 16px;
-    font-weight: 400;
-    color: #404956;
-    .input-number {
-      width: calc(100% - 86px);
-    }
-  }
-  .panel-numeric-key {
-    text-align: center;
-    overflow-y: auto;
-    height: calc(100% - 42px);
-    ul {
-      padding: 20px 0;
-      display: grid;
-      grid-template-columns: repeat(8, 36px);
-      gap: 10px;
-      justify-content: space-between; /* 水平居中 */
-      align-items: center; /* 垂直居中 */
-      li {
-        text-align: center;
-        height: 35px;
-        line-height: 35px;
-        border-radius: 2px;
-        color: #2d333c;
-        cursor: pointer;
-      }
-      li:hover {
-        border: 2px solid #1b80eb;
-      }
-    }
-  }
-}
-</style>

+ 0 - 259
client/src/views/OaSystem/personnelManagement/weeklyCenter/DetailBox.vue

@@ -1,259 +0,0 @@
-<script lang="ts" setup>
-import moment from 'moment'
-import request from '@/config/axios'
-import { getUserInfo } from '@/utils/tool'
-interface IProp {
-  detail: any
-}
-const { detail } = defineProps<IProp>()
-
-const emojiList = ['赞!👍', '写的太棒了!👏', '学习了🌹', '感谢你的分享🙏', '加油💪', '早点休息😴']
-
-const message = useMessage()
-const userInfo = getUserInfo()
-// 评论字段
-interface IComment {
-  reportId: string // 报告id
-  commentUserId: string // 评论人用户id
-  commentContent: string // 评论内容
-  commentDate?: string // 评论时间
-  replyToUserid?: string // 被回复人用户ID
-}
-// 提交评论
-const submitComment = async (content?) => {
-  if (!content && commentInput.value == '') {
-    message.info('评论内容不能为空!')
-    return
-  }
-  const data = {
-    reportId: detail.id,
-    commentUserId: userInfo.id ?? '',
-    commentContent: content ?? commentInput.value
-  }
-  const result: any = await request.postOriginal({ url: '/adm/reportComment/send', data })
-  if (result.msg == 'success') {
-    getCommentList()
-    message.success('评论成功!')
-    // 清空输入框
-    if (!content) {
-      commentInput.value = ''
-    }
-  } else {
-    message.error('评论失败,请稍后再试')
-  }
-}
-const commentList = ref<any[]>(detail?.comments ?? [])
-// 获取报告被评论列表
-const getCommentList = async () => {
-  const result = await request.get({
-    url: '/adm/reportComment/getList',
-    params: { reportId: detail?.id, uId: detail?.userId }
-  })
-  commentList.value = result
-}
-const commentInput = ref('')
-
-onMounted(() => {
-  getCommentList()
-})
-</script>
-<template>
-  <div class="detail-box">
-    <div class="form-box">
-      <el-form ref="form" label-width="100px">
-        <el-row :gutter="24">
-          <el-col :span="8">
-            <el-form-item class="label-item" label="日志日期">
-              <div class="write-date">
-                {{ moment(detail.reportStartDate).format('YYYY-MM-DD') }}
-              </div>
-            </el-form-item>
-          </el-col>
-          <el-col :span="16">
-            <el-form-item class="label-item" label="接收人">
-              <div class="tag-list">
-                <el-tag
-                  type="info"
-                  effect="light"
-                  v-for="(item, index) in detail.receiveNames"
-                  :key="index"
-                  >{{ item }}</el-tag
-                >
-              </div>
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="24" style="height: 100%">
-            <el-form-item class="label-item" label="今日工作">
-              <div
-                class="text-area"
-                v-html="detail?.reportContent?.replace(/(\r\n|\n|\r)/gm, '<br />')"
-              >
-              </div>
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="24" style="height: 100%">
-            <el-form-item class="label-item" label="工作量分配">
-              <div class="text-area area2">
-                <div v-for="(item, index) in detail.workload" :key="index">
-                  <span class="work-time">{{ `(${item.workTime}小时)` }}</span>
-                  <span>{{ item.projectName }}</span>
-                </div>
-              </div>
-            </el-form-item>
-          </el-col>
-        </el-row>
-      </el-form>
-    </div>
-    <div class="comment-box">
-      <div class="comment-list">
-        <div v-if="commentList.length === 0" class="not-comment">
-          <el-empty description="暂无评论" image-size="35" />
-        </div>
-        <div v-else v-for="(item, index) in commentList" :key="index" class="item">
-          <div class="left">
-            <span>{{ item.commentUserName.substr(-2) }}</span>
-          </div>
-          <div class="right">
-            <div class="title">
-              {{
-                `${item.commentUserName} ${moment(item.commentDate).format('YYYY-MM-DD HH:mm:ss')}`
-              }}
-              <span>删除</span>
-            </div>
-            <div>{{ item.commentContent }}</div>
-          </div>
-        </div>
-      </div>
-      <div class="comment-emoji">
-        <span v-for="(item, index) in emojiList" :key="index" @click="submitComment(item)">{{
-          item
-        }}</span>
-      </div>
-      <div class="comment-input">
-        <el-input v-model="commentInput" placeholder="请输入评论内容" />
-        <el-button class="submit" type="primary" @click="submitComment()">发表评价</el-button>
-      </div>
-    </div>
-  </div>
-</template>
-<style scoped lang="scss">
-.detail-box {
-  width: 100%;
-  height: 100%;
-  .form-box {
-    width: 100%;
-    .label-item {
-      .el-form-item__label {
-        font-weight: 400 !important;
-        font-size: 16px !important;
-      }
-      .write-date {
-        width: 100px;
-        border: 1px solid #dee0e3;
-        border-radius: 4px;
-        text-align: center;
-        background: #f9f9f9;
-      }
-      .text-area {
-        width: 100%;
-        height: 132px;
-        overflow-y: scroll;
-        background: #f9f9f9;
-        border-radius: 4px 4px 4px 4px;
-        border: 1px solid #c7ceda;
-        padding: 5px 10px;
-      }
-      .area2 {
-        height: 90px;
-        .work-time {
-          font-weight: bold;
-          font-size: 14px;
-          color: #1b80eb;
-        }
-      }
-      .tag-list {
-        width: 100%;
-        max-height: 65px;
-        overflow-y: scroll;
-        .el-tag {
-          margin-right: 8px;
-        }
-      }
-    }
-  }
-  .comment-box {
-    width: 100%;
-    padding-left: 100px;
-    .comment-list {
-      height: 180px;
-      overflow-y: scroll;
-      background: #f7f8fa;
-      border-radius: 4px 4px 4px 4px;
-      border: 1px solid #eef2f9;
-      padding: 10px;
-      .item {
-        display: flex;
-        justify-content: flex-start;
-        align-items: center;
-        border-bottom: 1px solid #e3eaf5;
-        height: 85px;
-        .left {
-          width: 80px;
-          text-align: center;
-          span {
-            display: inline-block;
-            width: 44px;
-            height: 44px;
-            line-height: 44px;
-            color: #ffffff;
-            background-color: #5a99e3;
-            font-size: 14px;
-            font-weight: 400;
-            border-radius: 50%;
-          }
-        }
-        .right {
-          font-weight: 400;
-          font-size: 14px;
-          color: #121518;
-          line-height: 16px;
-          .title {
-            font-weight: 400;
-            font-size: 14px;
-            color: #8a94a4;
-            margin-bottom: 8px;
-            span {
-              color: #1b80eb;
-              margin-left: 15px;
-              cursor: pointer;
-            }
-          }
-        }
-      }
-    }
-    .comment-emoji {
-      height: 50px;
-      line-height: 50px;
-      display: flex;
-      justify-content: space-between;
-      font-size: 14px;
-      color: #626b70;
-      span {
-        cursor: pointer;
-      }
-    }
-    .comment-input {
-      width: 100%;
-      display: flex;
-      justify-content: space-between;
-      .submit {
-        margin-left: 10px;
-      }
-    }
-  }
-}
-</style>

+ 1 - 1
client/src/views/OaSystem/personnelManagement/weeklyCenter/editorDetail.vue

@@ -60,7 +60,7 @@
 <script setup lang="ts">
 import moment from 'moment'
 import request from '@/config/axios'
-import AmountOfWork from './AmountOfWork.vue'
+import AmountOfWork from '../components/AmountOfWork.vue'
 import UserSelect from '@/components/UserSelect/index.vue'
 import { getUserInfo } from '@/utils/tool'
 defineOptions({ name: 'EditorDetail' })

+ 0 - 230
client/src/views/OaSystem/personnelManagement/weeklyCenter/lookDetail.vue

@@ -1,230 +0,0 @@
-<template>
-  <div class="lookDetailBox">
-    <div class="topBox">
-      <div class="formBox">
-        <el-form ref="form" :model="formData" label-width="120px">
-          <el-row style="height: 100%">
-            <el-col :span="24" style="height: 100%">
-              <el-form-item label="今日完成工作" style="height: 100%">
-                <el-input
-                  type="textarea"
-                  disabled
-                  v-model="formData.reportContent"
-                  style="width: 100%; height: 100%"
-                />
-              </el-form-item>
-            </el-col>
-          </el-row>
-        </el-form>
-      </div>
-      <div class="footBox">
-        <WorkProjectList height="auto" />
-      </div>
-    </div>
-    <div class="commonentBox">
-      <ul class="commonentList">
-        <li>
-          <div class="userImg">张三</div>
-          <div class="content">
-            <p>
-              <span>张三</span>
-              <span>2023-10-02</span>
-            </p>
-            <p class="desc">点赞</p>
-          </div>
-        </li>
-        <li>
-          <div class="userImg">张三</div>
-          <div class="content">
-            <p>
-              <span>张三</span>
-              <span>2023-10-02</span>
-            </p>
-            <p class="desc">点赞</p>
-          </div>
-        </li>
-      </ul>
-      <div class="commonent">
-        <ul>
-          <li>赞</li>
-          <li>写的太棒了!</li>
-        </ul>
-        <div class="formBox">
-          <div>
-            <el-input width="100%" />
-          </div>
-          <div>
-            <el-button type="primary" @click="sendCommontHandle">发送</el-button>
-          </div>
-        </div>
-      </div>
-    </div>
-  </div>
-</template>
-
-<script setup lang="ts">
-import request from '@/config/axios'
-import { handleTree } from '@/utils/tree'
-import WorkProjectList from '../components/WorkProjectList.vue'
-
-defineOptions({ name: 'LookDetail' })
-
-const formData = ref<{
-  fillingDate: string
-  receiveUserId: never[]
-  reportContent: string
-  workTime: number
-}>({
-  fillingDate: '',
-  receiveUserId: [],
-  reportContent: '',
-  workTime: 0
-})
-const allUserList = ref<any[]>()
-const commentList = ref<any>()
-let sourceAllUserList: any[] = []
-
-const getReportCommentList = async () => {
-  const urlApi = '/adm/reportComment/getList'
-  const params = {
-    reportId: '',
-    uId: ''
-  }
-  const result = await request.get({ url: urlApi, params })
-  commentList.value = result
-}
-getReportCommentList()
-
-const getAllUserSimpleByList = async () => {
-  const urlApi = '/system/dept/list-all-user-simple'
-  const params = {}
-  const result = await request.get({ url: urlApi, params })
-  sourceAllUserList = handleTree(
-    result.map((item) => {
-      return {
-        label: item['name'],
-        value: item['id'],
-        parentId: item['parentId'],
-        children: item['children']
-      }
-    }),
-    'value'
-  )
-  allUserList.value = sourceAllUserList
-}
-getAllUserSimpleByList()
-
-const sendCommontHandle = async () => {
-  const urlApi = '/adm/reportComment/send'
-  const sendData = {
-    replyToUserid: '',
-    reportId: '',
-    commentContent: '',
-    commentDate: ''
-  }
-  const result = await request.post({ url: urlApi, data: sendData })
-  // console.log('result~~~~~~~~~~~~~~~~~~~~~')
-  // console.log(result)
-}
-</script>
-
-<style lang="scss" scoped>
-.lookDetailBox {
-  width: 50%;
-  height: 100%;
-  .topBox {
-    display: flex;
-    height: calc(100% - 280px);
-    > .formBox {
-      padding: 0px 0px;
-      margin-right: 15px;
-      flex: 1.4;
-      height: 100%;
-      :depp(.el-form) {
-        height: 100%;
-      }
-      :deep(.el-textarea, .el-textarea__inner) {
-        height: 100% !important;
-      }
-    }
-    > .footBox {
-      display: flex;
-      flex: 1;
-    }
-  }
-  > .commonentBox {
-    margin-top: 20px;
-    > ul {
-      border: 1px solid #eef2f9;
-      background-color: #f7f8fa;
-      > li {
-        display: flex;
-        align-items: center;
-        padding: 15px;
-        border-bottom: 1px solid #e3eaf5;
-        &:last-child {
-          border-bottom: 0px;
-        }
-        > .userImg {
-          font-size: 15px;
-          width: 50px;
-          height: 50px;
-          line-height: 50px;
-          text-align: center;
-          border-radius: 50%;
-          background-color: #5a99e3;
-          color: #fff;
-          margin-right: 10px;
-        }
-        > .content {
-          flex: 1;
-          > p {
-            padding: 2px 0px;
-            &:first-child {
-              font-size: 14px;
-              color: #8a94a4;
-              > span {
-                display: inline-block;
-                margin-right: 10px;
-              }
-            }
-            &.desc {
-              color: #121518;
-            }
-          }
-        }
-      }
-    }
-    > .commonent {
-      margin-top: 15px;
-      > ul {
-        > li {
-          display: inline-block;
-          padding: 3px 20px;
-          background: #f7f8fa;
-          border-radius: 20px;
-          opacity: 1;
-          border: 1px solid #edeeef;
-          margin-right: 10px;
-          font-size: 14px;
-          &:last-child {
-            margin-right: 0px;
-          }
-        }
-      }
-      > .formBox {
-        display: flex;
-        margin-top: 10px;
-        > div {
-          &:first-child {
-            flex: 1;
-          }
-          &:last-child {
-            margin-left: 10px;
-          }
-        }
-      }
-    }
-  }
-}
-</style>

+ 1 - 1
client/src/views/OaSystem/personnelManagement/weeklyCenter/weeklyCenter.vue

@@ -17,7 +17,7 @@
 
 <script setup lang="ts">
 import WeekCalendar from './WeekCalendar.vue'
-import DetailBox from './DetailBox.vue'
+import DetailBox from '../components/DetailBoxWeek.vue'
 import EditorDetail from './editorDetail.vue'
 import moment from 'moment'
 // import request from '@/config/axios'

+ 2 - 2
client/src/views/OaSystem/personnelManagement/weeklyDetail/index.vue

@@ -4,7 +4,7 @@
  */
 
 import request from '@/config/axios'
-import DetailBox from './DetailBox.vue'
+import DetailBox from '../components/DetailBoxWeek.vue'
 import WeekCalendar from './WeekCalendar.vue'
 
 const { currentRoute } = useRouter()
@@ -37,7 +37,7 @@ const getDetailById = async (reportId) => {
 </script>
 <template>
   <div class="weekly-log-detail">
-    <div class="title">周报详情</div>
+    <div class="title">{{ currentRoute.query?.userName ?? '' }}周报详情</div>
     <div class="box" v-if="detail.id">
       <div class="calendarBox">
         <WeekCalendar :detailTime="[detail.reportStartDate, detail.reportEndDate]" />