فهرست منبع

fix: 查看周日报详情页面已填未填展示错误问题修复

qiny 10 ماه پیش
والد
کامیت
6fc3e589a3

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

@@ -201,7 +201,7 @@ watch(
         </el-row>
       </el-form>
     </div>
-    <div class="comment-box">
+    <div class="comment-box" v-if="!detail.isTemp">
       <div class="comment-list">
         <div v-if="commentList.length === 0" class="not-comment">
           <el-empty description="暂无评论" image-size="35" />

+ 18 - 6
client/src/views/OaSystem/personnelManagement/dailyDetail/OaCalendar.vue

@@ -57,7 +57,7 @@ const todayValue = ref(moment(detailTime))
 const changeDate = () => {
   const changeTimer = moment(todayValue.value).format('YYYY-MM-DD')
   const newDetail = dayReportMap.value[changeTimer].isLog
-  if (newDetail) {
+  if (newDetail && !newDetail.isTemp) {
     onChange(newDetail)
   } else {
     onChange({
@@ -233,13 +233,19 @@ const initDailyReportData = async (): Promise<any> => {
  * 3、当天,蓝色三角+画笔 square-today
  * 4、未到,灰色三角+省略 square-future
  * 5、请假,橙色三角+假   square-leave
+ * 6、暂存,同 未填
  */
 const getDayClass = (data) => {
   const { isworkday = 0, state = '', date = '', isLog } = dayReportMap.value[data] ?? {}
+  // 是否暂存
+  const isTemp = isLog?.isTemp ?? false
   const isFuture = moment(date).isAfter(moment())
-  // if (date == moment().format('YYYY-MM-DD')) {
-  //   return `square-today`
-  // }
+  if (isTemp) {
+    return 'square-unfilled'
+  }
+  if (date == moment().format('YYYY-MM-DD')) {
+    return `square-today`
+  }
   if (isworkday && isLog && !isFuture) {
     return `square-filled`
   } else if (isworkday && leaveList.includes(state) && !isFuture) {
@@ -251,12 +257,13 @@ const getDayClass = (data) => {
   }
   return ''
 }
-
 // 鼠标移入移出事件
 const onMouseOver = (data) => {
   const isLog = dayReportMap.value[data.day]?.isLog ? true : false
+  // console.log('isLog', dayReportMap.value[data.day])
   if (isLog) {
-    dayReportMap.value[data.day].show = '已填'
+    const type = dayReportMap.value[data.day]?.isLog?.isTemp ? '暂存' : '已填'
+    dayReportMap.value[data.day].show = type
   } else {
     dayReportMap.value[data.day].show = dayReportMap.value[data.day]?.holidayRemark ?? '未填'
   }
@@ -336,6 +343,11 @@ const onMouseOut = (data) => {
         border-right: 30px solid #c9cdd8;
       }
     }
+    .square-leave {
+      ::before {
+        border-right: 30px solid #f1a256;
+      }
+    }
     .is-selected {
       color: #1989fa;
     }