chenhao 2 жил өмнө
parent
commit
7969d4e225

+ 4 - 0
src/assets/styles/element/custom.scss

@@ -176,3 +176,7 @@ button.el-button {
 .el-popover.el-popper.color-picker-popover {
   background-color: map-get($ep-fill-color, 'light');
 }
+
+.el-message__badge {
+  display: none;
+}

+ 3 - 3
src/components/shared/ScoringPanel.vue

@@ -83,12 +83,12 @@ const modalVisible = useVModel(props, 'visible')
 
 const scoreValues = useVModel(props, 'score')
 
-const activeIndex = ref<number | null>(null)
+const activeIndex = ref<number | null>(0)
 
 const scoreValidFail = ref<boolean[]>([])
 
 watch(modalVisible, () => {
-  activeIndex.value ??= 0
+  activeIndex.value = 0
 })
 
 const { fetch: getQuestionStruct, reset: resetQuestionStruct, result: questionStruct } = useFetch('getQuestionStruct')
@@ -138,7 +138,7 @@ const onSubmit = () => {
 const onEnter = (index: number) => {
   nextTick(() => {
     if (scoreValues.value.length >= questionList.value?.length) {
-      const nullScoreIndex = scoreValues.value?.findIndex((v) => !v)
+      const nullScoreIndex = scoreValues.value?.findIndex((v) => !`${v}`)
       const validFailIndexIndex = scoreValidFail.value?.findIndex((v) => !!v)
       if (nullScoreIndex >= 0) {
         activeIndex.value = nullScoreIndex

+ 14 - 2
src/components/shared/message/MessageList.vue

@@ -5,7 +5,7 @@
         v-for="message in messageList"
         :key="message.id"
         class="radius-base fill-blank p-base m-b-mini message-item"
-        :class="{ active: currentMessage?.sendUserId === message.sendUserId }"
+        :class="{ active: currentMessage?.sendUserId === message.sendUserId, 'un-read': message.unReadCount > 0 }"
         @click="checkMessage(message)"
       >
         <div class="flex items-center m-b-base message-title">
@@ -74,7 +74,13 @@ const currentMessage = ref<MessageType>()
 
 watch(currentMessage, () => {
   if (currentMessage.value) {
-    useFetch('handleReadMessage').fetch({ id: currentMessage.value.id })
+    useFetch('handleReadMessage')
+      .fetch({ id: currentMessage.value.id })
+      .then(() => {
+        if (currentMessage.value?.unReadCount) {
+          currentMessage.value.unReadCount--
+        }
+      })
   }
 })
 
@@ -115,6 +121,12 @@ getMessageList().then((result) => (currentMessage.value = result?.[0]))
     background: #fafafa;
     box-shadow: 0px 6px 6px 0px rgba(0, 0, 0, 0.1);
     .message-item {
+      &.un-read {
+        .message-title {
+          font-size: $MediumFont;
+          font-weight: 900;
+        }
+      }
       &.active {
         background-color: $color--primary;
         color: $color--white;

+ 2 - 2
src/modules/analysis/personnel-statistics/hooks/useStatisticsFilter.ts

@@ -29,7 +29,7 @@ const useStatisticsFilter = () => {
     questionMainNumber: dataModel.question,
     markingGroupNumbers: dataModel.group,
     time: [],
-    hasJudge: [],
+    hasJudge: ['true'],
     expand: [],
   })
 
@@ -121,7 +121,7 @@ const useStatisticsFilter = () => {
       label: '仲裁',
       slotType: 'checkbox',
       slot: {
-        options: [{ label: '含仲裁' }],
+        options: [{ label: 'true', slotLabel: '含仲裁' }],
       },
     }),
   ])

+ 0 - 1
src/modules/marking/mark/index.vue

@@ -228,7 +228,6 @@ const modelScore = ref<number[]>([])
 const onSubmit: InstanceType<typeof ScoringPanelWithConfirm>['onSubmit'] = async ({ question, scores, totalScore }) => {
   try {
     if (!currentTask.value?.taskId) {
-      scoringPanelVisible.value = true
       return
     }