刘洋 2 жил өмнө
parent
commit
741cd05c96

+ 2 - 1
src/api/api-types/statistics.d.ts

@@ -312,6 +312,7 @@ export namespace Statistics {
     questionMainNumber?: number | string
     startTime?: string
     subjectCode: string
+    hasGroupLeaderScore?: boolean
   }
 
   interface GetStatisticsByGroupResponseItem {
@@ -465,7 +466,7 @@ export namespace Statistics {
     MultipleResult<PersonalMarkDetail>
   >
 
-  type UpdatePersonalMarkDetailScore = BaseDefine<{ taskId?: number; scores: number[] }>
+  type UpdatePersonalMarkDetailScore = BaseDefine<{ taskId?: number; scores: number[]; source?: string }>
 
   interface SystemSpotListItem {
     checkCount: number

+ 24 - 11
src/components/shared/SendBackMark.vue

@@ -1,8 +1,12 @@
 <template>
-  <base-dialog v-model="visible" title="提示" :footer="false" destroy-on-close :width="300">
-    <h3 style="margin-bottom: 20px">确定打回吗?</h3>
-
-    <template v-if="needRejectReason">
+  <base-dialog
+    v-model="visible"
+    :title="needRejectReason === true ? '打回原因' : '提示'"
+    :footer="false"
+    destroy-on-close
+    :width="550"
+  >
+    <template v-if="needRejectReason === true">
       <base-form ref="formRef" :model="model" :items="items" :rules="rules" label-width="72px">
         <el-form-item>
           <confirm-button @confirm="onSendBack" @cancel="onCancel"></confirm-button>
@@ -11,9 +15,12 @@
     </template>
 
     <!-- <base-form ref="formRef" :model="model" :items="items" :rules="rules" :label-width="useVW(72)"> -->
-    <el-form-item v-else>
-      <confirm-button @confirm="onSendBack" @cancel="onCancel"></confirm-button>
-    </el-form-item>
+    <template v-else-if="needRejectReason === false">
+      <h3 style="margin-top: 25px; margin-bottom: 40px">确定打回吗?</h3>
+      <el-form-item>
+        <confirm-button @confirm="onSendBack" @cancel="onCancel"></confirm-button>
+      </el-form-item>
+    </template>
     <!-- </base-form> -->
   </base-dialog>
 </template>
@@ -33,7 +40,7 @@ import useMainStore from '@/store/main'
 
 import type { EpFormItem, EpFormRules } from 'global-type'
 const mainStore = useMainStore()
-const needRejectReason = ref(false)
+const needRejectReason = ref<any>(null)
 const emits = defineEmits<{
   (e: 'rejected'): void
 }>()
@@ -78,9 +85,15 @@ const reason = ['给分太高', '给分太低', '注意,评分偏紧', '注意,
   value: v,
 }))
 
-const items: EpFormItem[] = [
-  { label: '打回原因', prop: 'reason', slotType: 'select', slot: { options: reason } },
-  { label: '说明', prop: 'description', slotType: 'input', slot: { type: 'textarea' } },
+const items: any[] = [
+  { label: '打回原因', labelWidth: '80px', prop: 'reason', slotType: 'select', slot: { options: reason } },
+  {
+    label: '说明',
+    labelWidth: '80px',
+    prop: 'description',
+    slotType: 'input',
+    slot: { type: 'textarea', maxlength: 200, resize: 'none', rows: 6, showWordLimit: true },
+  },
 ]
 
 const { fetch: rejectMarkHistory } = useFetch('rejectMarkHistory')

+ 3 - 1
src/components/shared/message/MessageHeadList.vue

@@ -9,7 +9,9 @@
         @click="checkMessage(message)"
       >
         <div class="flex items-center m-b-base message-title">
-          <div class="message-send-user">{{ message.sendUserName }}</div>
+          <div class="message-send-user">
+            {{ mainStore?.myUserInfo?.id == message.sendUserId ? message.receiveUserName : message.sendUserName }}
+          </div>
           <div class="m-l-auto message-send-time">{{ dayjs(message.sendTime).format('MM-DD HH:mm') }}</div>
         </div>
 

+ 18 - 3
src/components/shared/message/MessageList.vue

@@ -178,7 +178,12 @@ watch(currentMessage, (newVal: any, oldVal: any) => {
           currentMessage.value.unReadCount = 0
         }
         if (currentMessage.value?.sendUserId) {
-          getMessageHistory({ sendUserId: currentMessage.value.sendUserId }).then(() => {
+          getMessageHistory({
+            sendUserId:
+              currentMessage.value.sendUserId == mainStore?.myUserInfo?.id
+                ? currentMessage.value.receiveUserId
+                : currentMessage.value.sendUserId,
+          }).then(() => {
             let newV = unref(newVal)
             let oldV = unref(oldVal)
             if (newV.id != oldV?.id) {
@@ -202,12 +207,22 @@ const onSendMessage = async () => {
 
     await sendMessage({
       content: messageContent.value,
-      receiveUserIds: [currentMessage.value?.sendUserId as number],
+      // receiveUserIds: [currentMessage.value?.sendUserId as number],
+      receiveUserIds: [
+        (currentMessage.value?.sendUserId == mainStore?.myUserInfo?.id
+          ? currentMessage.value?.receiveUserId
+          : currentMessage.value?.sendUserId) as number,
+      ],
     })
     ElMessage.success('发送成功')
     messageContent.value = ''
     if (currentMessage.value?.sendUserId) {
-      getMessageHistory({ sendUserId: currentMessage.value.sendUserId }).then(() => {
+      getMessageHistory({
+        sendUserId:
+          currentMessage.value.sendUserId == mainStore?.myUserInfo?.id
+            ? currentMessage.value.receiveUserId
+            : currentMessage.value.sendUserId,
+      }).then(() => {
         setTimeout(scrollToBottom, 1)
       })
     }

+ 2 - 1
src/components/shared/message/MessageSend.vue

@@ -111,7 +111,7 @@ const customNodeClass = (data: any, node: any) => {
   }
 }
 /** cleat warning */
-const emit = defineEmits(['close', 'change-type', 'reply'])
+const emit = defineEmits(['close', 'change-type', 'reply', 'refresh'])
 const showHistory = ref<boolean>(false)
 /** 默认的收件人ID */
 const replyUserId = useVModel(props, 'replyUserId')
@@ -288,6 +288,7 @@ const onSendMessage = async () => {
     })
     ElMessage.success('发送成功')
     messageContent.value = ''
+    emit('refresh')
     // emit('close')
   } catch (error) {
     console.error(error)

+ 8 - 0
src/components/shared/message/MessageWindow.vue

@@ -22,6 +22,7 @@
           @close="onClose"
           @change-type="onChangeType"
           @reply="onReply"
+          @refresh="refresh"
         >
           <message-head-list
             :mode="props.type"
@@ -74,6 +75,13 @@ const onClose = () => {
   replyUserName.value = null
   currentMessage.value = null
 }
+const refresh = () => {
+  onClose()
+  modalType.value = 'view'
+  nextTick(() => {
+    visible.value = true
+  })
+}
 
 const onChangeType = (type: ModalType) => {
   modalType.value = type

+ 1 - 0
src/modules/admin-user/manage/index.vue

@@ -178,6 +178,7 @@ watch(
       } else {
         ElMessage.error('导入失败,详见“任务信息报告”')
       }
+      onSearch()
     })
   },
   { deep: true }

+ 18 - 7
src/modules/analysis/group-monitoring-detail/index.vue

@@ -233,7 +233,8 @@ const markerSubjectiveChartsOption = computed<EChartsOption>(() => {
         name: '评卷员',
         type: 'line',
         itemStyle: {
-          color: '#3AD500',
+          // color: '#3AD500',
+          color: '#8ED14B',
         },
         data: getXAxisData('rate', subjectiveByMarker?.value?.segmentsByUser),
       },
@@ -241,7 +242,8 @@ const markerSubjectiveChartsOption = computed<EChartsOption>(() => {
         name: '小组',
         type: 'line',
         itemStyle: {
-          color: '#0064FF',
+          // color: '#0064FF',
+          color: '#3B99D4',
         },
         data: getXAxisData('rate', subjectiveByMarker?.value?.segmentsByGroup),
       },
@@ -249,7 +251,8 @@ const markerSubjectiveChartsOption = computed<EChartsOption>(() => {
         name: '题组',
         type: 'line',
         itemStyle: {
-          color: '#008000',
+          // color: '#008000',
+          color: '#ff0000',
         },
         data: getXAxisData('rate', subjectiveByMarker?.value?.segmentsByAll),
       },
@@ -296,7 +299,8 @@ const markerObjectiveChartsOption = computed<EChartsOption>(() => {
         name: '评卷员',
         type: 'line',
         itemStyle: {
-          color: '#3AD500',
+          // color: '#3AD500',
+          color: '#8ED14B',
         },
         data: getXAxisData('rate', objectiveByMarker?.value?.segmentsByUser),
       },
@@ -304,7 +308,8 @@ const markerObjectiveChartsOption = computed<EChartsOption>(() => {
         name: '小组',
         type: 'line',
         itemStyle: {
-          color: '#0064FF',
+          // color: '#0064FF',
+          color: '#3B99D4',
         },
         data: getXAxisData('rate', objectiveByMarker?.value?.segmentsByGroup),
       },
@@ -312,7 +317,8 @@ const markerObjectiveChartsOption = computed<EChartsOption>(() => {
         name: '题组',
         type: 'line',
         itemStyle: {
-          color: '#008000',
+          // color: '#008000',
+          color: '#ff0000',
         },
         data: getXAxisData('rate', objectiveByMarker?.value?.segmentsByAll),
       },
@@ -325,7 +331,12 @@ const onSubmit = async () => {
     if (!current.value?.taskId) {
       return
     }
-    await useFetch('markMonitorDetailTask').fetch({ taskId: current.value.taskId, scores: modelScore.value })
+    // await useFetch('markMonitorDetailTask').fetch({ taskId: current.value.taskId, scores: modelScore.value })
+    await useFetch('updatePersonalMarkDetailScore').fetch({
+      taskId: current.value.taskId,
+      scores: modelScore.value,
+      source: (query.source as string) || '',
+    })
     fetchTable()
   } catch (error) {
     console.error(error)

+ 1 - 0
src/modules/analysis/group-monitoring/index.vue

@@ -86,6 +86,7 @@ function viewMonitoringDetail(
     query: {
       operateType,
       headerId: row.markingGroupLeaderId,
+      source: '小组长监控',
     },
   })
 }

+ 7 - 6
src/modules/analysis/marker-statistics/index.vue

@@ -210,6 +210,7 @@ const onDbClick = (row: TableDataType) => {
       query: {
         markerName: query.markerName,
         score: row.scoreStart,
+        source: (query.source as string) || '',
       },
     })
   }
@@ -264,7 +265,7 @@ const markerSubjectiveChartsOption = computed<EChartsOption>(() => {
         name: '评卷员主观分布',
         type: 'line',
         itemStyle: {
-          color: '#3AD500',
+          color: '#8ED14B',
         },
         data: getXAxisData('rate', subjectiveByMarker?.value?.segmentsByUser),
       },
@@ -272,7 +273,7 @@ const markerSubjectiveChartsOption = computed<EChartsOption>(() => {
         name: '小组主观分布',
         type: 'line',
         itemStyle: {
-          color: '#0064FF',
+          color: '#3B99D4',
         },
         data: getXAxisData('rate', subjectiveByMarker?.value?.segmentsByGroup),
       },
@@ -280,7 +281,7 @@ const markerSubjectiveChartsOption = computed<EChartsOption>(() => {
         name: '题组主观分布',
         type: 'line',
         itemStyle: {
-          color: '#008000',
+          color: '#ff0000',
         },
         data: getXAxisData('rate', subjectiveByMarker?.value?.segmentsByAll),
       },
@@ -320,7 +321,7 @@ const markerObjectiveChartsOption = computed<EChartsOption>(() => {
         name: '评卷员客观分布',
         type: 'line',
         itemStyle: {
-          color: '#3AD500',
+          color: '#8ED14B',
         },
         data: getXAxisData('rate', objectiveByMarker?.value?.segmentsByUser),
       },
@@ -328,7 +329,7 @@ const markerObjectiveChartsOption = computed<EChartsOption>(() => {
         name: '小组客观分布',
         type: 'line',
         itemStyle: {
-          color: '#0064FF',
+          color: '#3B99D4',
         },
         data: getXAxisData('rate', objectiveByMarker?.value?.segmentsByGroup),
       },
@@ -336,7 +337,7 @@ const markerObjectiveChartsOption = computed<EChartsOption>(() => {
         name: '题组客观分布',
         type: 'line',
         itemStyle: {
-          color: '#008000',
+          color: '#ff0000',
         },
         data: getXAxisData('rate', objectiveByMarker?.value?.segmentsByAll),
       },

+ 33 - 3
src/modules/analysis/marking-progress/components/GroupProgress.vue

@@ -39,7 +39,16 @@ import useVW from '@/hooks/useVW'
 import type { EpFormItem, EpTableColumn } from 'global-type'
 import type { ExtractApiParams, ExtractApiResponse } from '@/api/api'
 
-const { groupListWithAll, dataModel, changeModelValue, onOptionInit } = useOptions(['group'])
+const {
+  subjectList,
+  mainQuestionList,
+  groupListWithAll,
+  dataModel,
+  changeModelValue,
+  onOptionInit,
+  isExpert,
+  isLeader,
+} = useOptions(['subject', 'question', 'group'])
 
 const model = reactive<ExtractApiParams<'getMarkProgressByMarker'>>({
   subjectCode: dataModel.subject || '',
@@ -73,16 +82,37 @@ onOptionInit(onSearch)
 
 const { defineColumn, _ } = useForm()
 
-const OneRow = defineColumn(_, 'row-1', { span: 8 })
+const OneRow = defineColumn(_, 'row-1', { span: 5 })
+const OneRow8 = defineColumn(_, 'row-1', { span: 8 })
 
 const items = computed<EpFormItem[]>(() => [
   OneRow({
+    labelWidth: '52px',
+    label: '科目',
+    slotType: 'select',
+    prop: 'subjectCode',
+    slot: { options: subjectList.value, onChange: changeModelValue('subject'), disabled: !isExpert.value },
+  }),
+  OneRow({
+    labelWidth: '52px',
+    slotType: 'select',
+    label: '大题',
+    prop: 'questionMainNumber',
+    slot: {
+      placeholder: '选择大题',
+      options: mainQuestionList.value,
+      onChange: changeModelValue('question'),
+      disabled: !isExpert.value && !isLeader.value,
+    },
+  }),
+  OneRow({
+    labelWidth: '52px',
     label: '小组',
     slotType: 'select',
     prop: 'markingGroupNumber',
     slot: { options: groupListWithAll.value, onChange: changeModelValue('group') },
   }),
-  OneRow({ slotName: 'operation' }),
+  OneRow8({ slotName: 'operation' }),
 ])
 
 const dateTimes = computed(() => {

+ 1 - 0
src/modules/analysis/monitoring/index.vue

@@ -232,6 +232,7 @@ const viewMarkDetail = (row: ExtractArrayValue<ExtractRecordValue<ExtractApiResp
       markerName: row.markerName,
       subjectCode: model.subjectCode,
       questionMainNumber: model.questionMainNumber,
+      source: '监控',
     },
   })
 }

+ 12 - 3
src/modules/analysis/personnel-compare/index.vue

@@ -144,8 +144,17 @@ watch(allTableData, () => {
 })
 const columns = computed(() => {
   return [
-    { label: '账号', prop: 'loginName', align: 'center', minWidth: 120, fixed: 'left' },
-    { label: '姓名', prop: 'markerName', align: 'center', minWidth: 120, fixed: 'left' },
+    {
+      label: '评卷员',
+      prop: 'loginName',
+      align: 'center',
+      minWidth: 90,
+      fixed: 'left',
+      formatter(row: any) {
+        return `${row.loginName}-${row.markerName}`
+      },
+    },
+    // { label: '姓名', prop: 'markerName', align: 'center', minWidth: 120, fixed: 'left' },
     {
       label: dataTypeLabelMap[dataType.value],
       align: 'center',
@@ -176,7 +185,7 @@ const columns2: any = computed(() => {
   let initColumns = [
     { type: 'selection', width: 55 },
     {
-      label: '账号',
+      label: '评卷员',
       prop: 'loginName',
       align: 'center',
       minWidth: 90,

+ 14 - 4
src/modules/analysis/personnel-statistics/components/StatisticsPersonnel.vue

@@ -79,12 +79,16 @@ import useVW, { usePX } from '@/hooks/useVW'
 import useFetch from '@/hooks/useFetch'
 import useTableCheck from '@/hooks/useTableCheck'
 import RightKeyMenu from './RightKeyMenu.vue'
-
+import useMainStore from '@/store/main'
 import type { EChartsOption } from 'echarts'
 import type { ExtractApiResponse, ExtractApiParams } from '@/api/api'
 import type { EpTableColumn } from 'global-type'
 import type { PopoverInstance } from 'element-plus'
-
+const mainStore = useMainStore()
+const isChief = computed(() => {
+  const arr = ['CHIEF', 'SECTION_LEADER', 'EXPERT']
+  return arr.indexOf(mainStore.myUserInfo?.role || '') > -1
+})
 const rightKeyMenu = ref(null)
 const rightClick = () => {
   visable.value = false
@@ -127,10 +131,16 @@ const columns = computed(() => {
       minWidth: 90,
       formatter(row: any) {
         let r = unref(props.result) || []
+        console.log('rrrrr:', r)
         const { markingGroupNumber } = row
         let compareTarget = r.find((item: any) => item.markingGroupNumber == markingGroupNumber)
+        let allTarget = r.find((item: any) => item.markingGroupNumber == 0)
         if (compareTarget && markingGroupNumber) {
-          return row.xyRelate < compareTarget.xyRelate ? <span style="color:red">{row.xyRelate}</span> : row.xyRelate
+          return row.xyRelate < compareTarget.xyRelate || (isChief.value && row.xyRelate < allTarget.xyRelate) ? (
+            <span style="color:red">{row.xyRelate}</span>
+          ) : (
+            row.xyRelate
+          )
         } else {
           return row.xyRelate
         }
@@ -257,7 +267,7 @@ const myDbClick = (row: any) => {
   if (currentView.value && !!currentView.value.markingGroupNumber) {
     push({
       name: 'AnalysisPersonnelStatisticsMarker',
-      query: { markerId: currentView.value.markerId, markerName: currentView.value.markerName },
+      query: { markerId: currentView.value.markerId, markerName: currentView.value.markerName, source: '人员数据统计' },
     })
   }
 }

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

@@ -11,10 +11,10 @@ import type { ExtractApiParams } from '@/api/api'
 
 type FormMode = Omit<
   ExtractApiParams<'getStatisticsByGroup'>,
-  'endTime' | 'startTime' | 'hasJudge' | 'markingGroupNumbers'
+  'endTime' | 'startTime' | 'hasGroupLeaderScore' | 'markingGroupNumbers'
 > & {
   time: string[]
-  hasJudge: string[]
+  hasGroupLeaderScore: string[]
   expand: string[]
   markingGroupNumbers?: number | string
 }
@@ -36,7 +36,8 @@ const useStatisticsFilter = () => {
     questionMainNumber: dataModel.question,
     markingGroupNumbers: dataModel.group,
     time: [curDayRange[0], curDayRange[1]],
-    hasJudge: ['true'],
+    // hasGroupLeaderScore: ['true'],
+    hasGroupLeaderScore: [],
     expand: [],
     markerId: '',
     online: '',
@@ -63,7 +64,7 @@ const useStatisticsFilter = () => {
     return Object.assign(omit(model, 'time'), {
       startTime: model.time?.[0],
       endTime: model.time?.[1],
-      hasJudge: model.hasJudge.length > 0,
+      hasGroupLeaderScore: model.hasGroupLeaderScore.length > 0,
       expand: model.expand.length > 0,
       markingGroupNumbers:
         typeof model.markingGroupNumbers === 'number' ? [model.markingGroupNumbers] : model.markingGroupNumbers,
@@ -185,11 +186,11 @@ const useStatisticsFilter = () => {
       },
     }),
     TwoRowSpan3({
-      prop: 'hasJudge',
-      label: '仲裁',
+      prop: 'hasGroupLeaderScore',
+      label: '组长给分',
       slotType: 'checkbox',
       slot: {
-        options: [{ label: 'true', slotLabel: '含仲裁' }],
+        options: [{ label: 'true', slotLabel: '含' }],
       },
     }),
   ])

+ 1 - 0
src/modules/analysis/statistics/index.vue

@@ -213,6 +213,7 @@ const viewMarkDetail = (row: ExtractArrayValue<ExtractRecordValue<ExtractApiResp
     },
     query: {
       markerName: row.markerName,
+      source: '统计',
     },
   })
 }

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

@@ -251,7 +251,11 @@ const { fetch: updatePersonalMarkDetailScore } = useFetch('updatePersonalMarkDet
 const onSubmit = async () => {
   if (current.value) {
     const scores = JSON.parse(JSON.stringify(modelScore.value))
-    await updatePersonalMarkDetailScore({ taskId: current.value.taskId, scores: modelScore.value })
+    await updatePersonalMarkDetailScore({
+      taskId: current.value.taskId,
+      scores: modelScore.value,
+      source: (query.source as string) || '',
+    })
     // current.value.markerScore = add(...scores)
     current.value.markScore = add(...scores)
     ElMessage.success('修改成功')

+ 2 - 2
src/modules/quality/subjective-check/index.vue

@@ -90,14 +90,14 @@
             >
               <template #empty> 暂无数据 </template>
             </base-table> -->
-            <div v-if="currentSubjectiveCheck">
+            <div v-if="currentSubjectiveCheck" style="height: 100%">
               <div class="bottom-title">给分记录( {{ currentSubjectiveCheck?.secretNumber }} )</div>
               <base-table
                 border
                 stripe
                 class="m-t-base"
                 size="small"
-                height="150px"
+                height="calc(100% - 20px)"
                 :data="currentHistoryData"
                 :columns="currentHistoryColumns"
                 :cell-style="{ padding: '6px 0' }"