刘洋 11 mesiacov pred
rodič
commit
0c03dbb1e0

+ 0 - 5
src/components/shared/message/Message.vue

@@ -82,17 +82,12 @@ watch(
   (val) => {
     if (!visibleMessageWindow.value) {
       let newMsgs = val.messages
-      // if (!newMsgs.length) {
-      //   return
-      // }
-
       let newMsgMaxId = !newMsgs.length
         ? -1
         : Math.max.apply(
             Math,
             newMsgs.map((item: any) => item.id)
           )
-      // let hasRecentSixSecondsMsg = newMsgTime > Date.now() - 10000;
       let lastNewMsgMaxId = Number(sessionStorage.getItem('lastNewMsgMaxId'))
       if (lastNewMsgMaxId) {
         if (newMsgMaxId > lastNewMsgMaxId) {

+ 10 - 0
src/components/shared/message/MessageHeadList.vue

@@ -94,6 +94,16 @@ watch(
           currentMessage.value = find
           bus.emit('clickChangeMsg', find)
         }
+        let lastNewMsgMaxId = Number(sessionStorage.getItem('lastNewMsgMaxId'))
+        if (lastNewMsgMaxId && res.length) {
+          let newMsgMaxId = Math.max.apply(
+            Math,
+            res.map((item: any) => item.id)
+          )
+          if (newMsgMaxId > lastNewMsgMaxId && newMsgMaxId == currentMessage.value?.id) {
+            sessionStorage.setItem('lastNewMsgMaxId', String(newMsgMaxId))
+          }
+        }
       }
     })
   }

+ 34 - 1
src/modules/analysis/marker-statistics/index.vue

@@ -106,6 +106,7 @@
                   @current-change="onCurrentChange"
                   @row-dblclick="onDbClick"
                   @selection-change="handleSelectionChange"
+                  @row-contextmenu="rowContextmenu"
                 ></base-table>
               </div>
             </pane>
@@ -135,11 +136,18 @@
     v-model="visibleHistory"
     :task="currentViewHistory"
   ></mark-history-list>
+  <right-key-menu
+    v-show="visable"
+    ref="rightKeyMenu"
+    :menu-strs="['发送消息']"
+    @right-click="rightClick"
+    @on-send-message="onSendMessage"
+  ></right-key-menu>
 </template>
 
 <script setup lang="tsx" name="AnalysisPersonnelStatisticsMarker">
 /** 评卷员明细统计 */
-import { computed, reactive, ref, watch, nextTick } from 'vue'
+import { computed, reactive, ref, watch, nextTick, inject } from 'vue'
 import { useRouter, useRoute } from 'vue-router'
 import { ElButton, ElMessage } from 'element-plus'
 import dayjs from 'dayjs'
@@ -165,6 +173,7 @@ import ScoringPanelWithConfirm from '@/components/shared/ScoringPanelWithConfirm
 import ImagePreview from '@/components/shared/ImagePreview.vue'
 import BtnPagination from '@/components/common/BtnPagination.vue'
 import SecNumberStatus from '@/components/common/secNumberStatus.vue'
+import RightKeyMenu from '../personnel-statistics/components/RightKeyMenu.vue'
 import { ElIcon } from 'element-plus'
 import { Close } from '@element-plus/icons-vue'
 import type { EChartsOption } from 'echarts'
@@ -172,6 +181,30 @@ import type { ExtractApiResponse } from '@/api/api'
 import type { EpTableColumn, EpFormItem } from 'global-type'
 import type { SetImgBgOption } from '@/hooks/useSetImgBg'
 
+const setMessageVisible = inject<(visible: boolean) => void>('setMessageVisible')
+const setReplyUserId = inject<(id: number) => void>('setReplyUserId')
+const visable = ref(false)
+const rightKeyMenu = ref(null)
+const rightClick = () => {
+  visable.value = false
+}
+/** 发送消息 */
+function onSendMessage(data: any) {
+  setReplyUserId?.(data.markerId)
+  setMessageVisible?.(true)
+}
+const rowContextmenu = (row: any, column: any, event: any) => {
+  console.log(row, column, event)
+  visable.value = false
+  setTimeout(() => {
+    visable.value = true
+  }, 50)
+  event.preventDefault()
+  nextTick(() => {
+    ;(rightKeyMenu.value as any).onload(row, column, event)
+  })
+}
+
 const multipleSelection = ref<any>([])
 const handleSelectionChange = (val: any) => {
   multipleSelection.value = val

+ 15 - 2
src/modules/analysis/personnel-statistics/components/RightKeyMenu.vue

@@ -2,6 +2,7 @@
 <template>
   <div ref="rkm" class="right-key-menu">
     <div
+      v-if="menuStrArr.includes('设置工作量')"
       class="rightKeyMenuItem"
       :class="{ disabled: !curRow.markerId }"
       @click="curRow?.markerId && emits('onSetWorkload', unref(curRow))"
@@ -9,6 +10,7 @@
       设置工作量
     </div>
     <div
+      v-if="menuStrArr.includes('发送消息')"
       class="rightKeyMenuItem"
       :class="{ disabled: !curRow.markerId }"
       @click="curRow?.markerId && emits('onSendMessage', unref(curRow))"
@@ -23,6 +25,7 @@
       暂停评卷
     </div> -->
     <div
+      v-if="menuStrArr.includes('分数分布曲线')"
       class="rightKeyMenuItem"
       :class="{ disabled: !curRow.markerId }"
       @click="curRow?.markerId && emits('onShowScoreLines', curRow)"
@@ -30,7 +33,11 @@
       分数分布曲线
     </div>
     <div
-      v-if="curRow.markingStatus === '正评' && mainStore?.myUserInfo?.role !== 'DEPUTY'"
+      v-if="
+        menuStrArr.includes('强制考核分发') &&
+        curRow.markingStatus === '正评' &&
+        mainStore?.myUserInfo?.role !== 'DEPUTY'
+      "
       class="rightKeyMenuItem"
       @click="curRow?.markerId && emits('forceAssessment', unref(curRow))"
     >
@@ -39,10 +46,16 @@
   </div>
 </template>
 <script setup lang="ts" name="RightKeyMenu">
-import { ref, onUnmounted, unref } from 'vue'
+import { ref, onUnmounted, unref, computed } from 'vue'
 import useMainStore from '@/store/main'
 const mainStore = useMainStore()
 let rkm = ref()
+const props = defineProps<{
+  menuStrs: string[] | undefined
+}>()
+const menuStrArr = computed(() => {
+  return props.menuStrs || []
+})
 const emits = defineEmits([
   'rightClick',
   'onSetWorkload',

+ 1 - 0
src/modules/analysis/personnel-statistics/components/StatisticsPersonnel.vue

@@ -54,6 +54,7 @@
   <right-key-menu
     v-show="visable"
     ref="rightKeyMenu"
+    :menu-strs="['设置工作量', '发送消息', '分数分布曲线', '强制考核分发']"
     @right-click="rightClick"
     @on-set-workload="onSetWorkload"
     @on-send-message="onSendMessage"

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

@@ -47,6 +47,7 @@ const useStatisticsFilter = () => {
     // hasGroupLeaderScore: ['true'],
     hasGroupLeaderScore: [],
     expand: route.query?.sortKey ? ['按人员展开'] : [],
+    hideUnMarked: [],
     markerId: '',
     online: '',
   })
@@ -115,6 +116,7 @@ const useStatisticsFilter = () => {
       // endTime: model.time?.[1],
       curDay: model.curDay,
       hasGroupLeaderScore: model.hasGroupLeaderScore.length > 0,
+      hideUnMarked: model.hideUnMarked.length > 0,
       expand: model.expand.length > 0,
       // markingGroupNumber:
       //   typeof model.markingGroupNumber === 'number' ? [model.markingGroupNumber] : model.markingGroupNumber,
@@ -275,6 +277,15 @@ const useStatisticsFilter = () => {
         options: [{ label: '按人员展开' }],
       },
     }),
+    TwoRowSpan2({
+      prop: 'hideUnMarked',
+      label: '',
+      slotType: 'checkbox',
+      labelWidth: '40px',
+      slot: {
+        options: [{ label: 'true', slotLabel: '含评卷份数为0' }],
+      },
+    }),
     TwoRowSpan3({
       prop: 'hasGroupLeaderScore',
       label: '',

+ 34 - 1
src/modules/analysis/view-marked-detail/index.vue

@@ -113,6 +113,7 @@
               @current-change="onCurrentChange"
               @row-dblclick="onDbClick"
               @selection-change="handleSelectionChange"
+              @row-contextmenu="rowContextmenu"
             ></base-table>
           </div>
         </pane>
@@ -132,12 +133,19 @@
     v-model="visibleHistory"
     :task="currentViewHistory"
   ></mark-history-list>
+  <right-key-menu
+    v-show="visable"
+    ref="rightKeyMenu"
+    :menu-strs="['发送消息']"
+    @right-click="rightClick"
+    @on-send-message="onSendMessage"
+  ></right-key-menu>
 </template>
 
 <script setup lang="tsx" name="AnalysisViewMarked">
 // <script setup lang="ts" name="ViewMarkedDetail">
 /** 提取阅卷明细 */
-import { ref, computed, watch, nextTick } from 'vue'
+import { ref, computed, watch, nextTick, inject } from 'vue'
 import { useRoute } from 'vue-router'
 import { ElButton, ElMessage, ElPagination } from 'element-plus'
 import { add } from '@/utils/common'
@@ -162,8 +170,33 @@ import { Splitpanes, Pane } from 'splitpanes'
 import { setPaneSize } from '@/utils/common'
 import useMainStore from '@/store/main'
 import BtnPagination from '@/components/common/BtnPagination.vue'
+import RightKeyMenu from '../personnel-statistics/components/RightKeyMenu.vue'
 type RowType = ExtractMultipleApiResponse<'getPersonalMarkDetail'> & { index: number }
 
+const setMessageVisible = inject<(visible: boolean) => void>('setMessageVisible')
+const setReplyUserId = inject<(id: number) => void>('setReplyUserId')
+const visable = ref(false)
+const rightKeyMenu = ref(null)
+const rightClick = () => {
+  visable.value = false
+}
+/** 发送消息 */
+function onSendMessage(data: any) {
+  setReplyUserId?.(data.markerId)
+  setMessageVisible?.(true)
+}
+const rowContextmenu = (row: any, column: any, event: any) => {
+  console.log(row, column, event)
+  visable.value = false
+  setTimeout(() => {
+    visable.value = true
+  }, 50)
+  event.preventDefault()
+  nextTick(() => {
+    ;(rightKeyMenu.value as any).onload(row, column, event)
+  })
+}
+
 const multipleSelection = ref<any>([])
 const handleSelectionChange = (val: any) => {
   multipleSelection.value = val

+ 35 - 1
src/modules/marking/inquiry-result/index.vue

@@ -104,6 +104,7 @@
               @current-change="onCurrentChange"
               @row-dblclick="onDbClick"
               @selection-change="handleSelectionChange"
+              @row-contextmenu="rowContextmenu"
             ></base-table>
           </div>
         </pane>
@@ -147,11 +148,18 @@
       </template>
     </base-form>
   </base-dialog>
+  <right-key-menu
+    v-show="visable"
+    ref="rightKeyMenu"
+    :menu-strs="['发送消息']"
+    @right-click="rightClick"
+    @on-send-message="onSendMessage"
+  ></right-key-menu>
 </template>
 
 <script setup lang="tsx" name="MarkingInquiryResult">
 /** 自定义查询结果 */
-import { ref, computed, watch, reactive, nextTick } from 'vue'
+import { ref, computed, watch, reactive, nextTick, inject } from 'vue'
 import { useRoute } from 'vue-router'
 import { ElButton, ElPagination, ElMessage } from 'element-plus'
 import { add } from '@/utils/common'
@@ -173,6 +181,7 @@ import ImagePreview from '@/components/shared/ImagePreview.vue'
 import ScoringPanelWithConfirm from '@/components/shared/ScoringPanelWithConfirm.vue'
 import SendBackMark from '@/components/shared/SendBackMark.vue'
 import SecNumberStatus from '@/components/common/secNumberStatus.vue'
+import RightKeyMenu from '../../analysis/personnel-statistics/components/RightKeyMenu.vue'
 import type { SetImgBgOption } from '@/hooks/useSetImgBg'
 import type { ExtractMultipleApiResponse, ExtractApiParams } from '@/api/api'
 import type { MarkHeaderInstance, EpTableColumn, EpFormItem } from 'global-type'
@@ -180,6 +189,31 @@ import { Splitpanes, Pane } from 'splitpanes'
 import { setPaneSize } from '@/utils/common'
 import useMainStore from '@/store/main'
 import BtnPagination from '@/components/common/BtnPagination.vue'
+
+const setMessageVisible = inject<(visible: boolean) => void>('setMessageVisible')
+const setReplyUserId = inject<(id: number) => void>('setReplyUserId')
+const visable = ref(false)
+const rightKeyMenu = ref(null)
+const rightClick = () => {
+  visable.value = false
+}
+/** 发送消息 */
+function onSendMessage(data: any) {
+  setReplyUserId?.(data.markerId)
+  setMessageVisible?.(true)
+}
+const rowContextmenu = (row: any, column: any, event: any) => {
+  console.log(row, column, event)
+  visable.value = false
+  setTimeout(() => {
+    visable.value = true
+  }, 50)
+  event.preventDefault()
+  nextTick(() => {
+    ;(rightKeyMenu.value as any).onload(row, column, event)
+  })
+}
+
 // const isMult = ref(false)
 const multipleSelection = ref<any>([])
 const handleSelectionChange = (val: any) => {

+ 6 - 0
src/modules/quality/ending-check/components/EndCheck.vue

@@ -43,6 +43,7 @@
             @selection-change="handleSelectionChange1"
           ></base-table> -->
           <el-table-v2
+            :key="table1Key"
             :header-height="43"
             :row-height="43"
             :height="tableHeight"
@@ -84,6 +85,7 @@
             @selection-change="handleSelectionChange2"
           ></base-table> -->
           <el-table-v2
+            :key="table2Key"
             :header-height="43"
             :row-height="43"
             :height="tableHeight"
@@ -180,6 +182,8 @@ import useMainLayoutStore from '@/store/layout'
 import type { ExtractApiParams, ExtractMultipleApiResponse } from '@/api/api'
 import type { EpFormItem, EpTableColumn, EpFormRules } from 'global-type'
 
+const table2Key = ref(Math.random() + '')
+const table1Key = ref(Math.random() + '')
 const SelectionCell: any = (obj: any) => {
   const { value, intermediate = false, onChange } = obj
   return <ElCheckbox onChange={onChange} modelValue={value} indeterminate={intermediate} />
@@ -484,8 +488,10 @@ const columns3: EpTableColumn[] = [
 const onStartCheck = () => {
   // getUnMarkPaperList({ pageNumber: 1, pageSize: 20, ...model })
   getUnMarkPaperList({ pageNumber: 1, pageSize: 999999, ...model })
+  table1Key.value = Math.random() + ''
   // getUnMarkBackPaperList({ pageNumber: 1, pageSize: 20, ...model })
   getUnMarkBackPaperList({ pageNumber: 1, pageSize: 999999, ...model })
+  table2Key.value = Math.random() + ''
   getUnProcessProblemList(model)
   getUnProcessSimilarList(model)
   getRecoveryCount({ questionMainNumber: model.questionMainNumber, subjectCode: model.subjectCode })