刘洋 2 лет назад
Родитель
Сommit
6d4668cabd

+ 18 - 6
src/App.vue

@@ -21,21 +21,33 @@ window.addEventListener('online', () => {
 window.addEventListener('offline', () => {
   mainStore.setOnline(false)
 })
+
+function getParentNodeIsScroll(el: any): any {
+  if (el.className.includes('scroll-auto')) {
+    return el
+  } else {
+    return getParentNodeIsScroll(el.parentNode)
+  }
+}
 function keyBoardScroll(e: any) {
-  let imgWrap = document.querySelector('img-wrap')
+  let imgWrap = document.querySelector('.img-wrap')
   if (!imgWrap) {
     return
   }
   let word = e.key
-  let t = imgWrap.scrollTop
+  if (word !== 'ArrowDown' && word !== 'ArrowUp') {
+    return
+  }
+  let pWrap = getParentNodeIsScroll(imgWrap)
+  let t = (pWrap as any).scrollTop
   if (word === 'ArrowDown') {
-    t -= 20
+    t += 30
   } else if (word === 'ArrowUp') {
-    t += 20
+    t -= 30
   } else {
-    e.returnValue = false
+    // e.returnValue = false
   }
-  imgWrap.scrollTop = t
+  pWrap.scrollTop = t
 }
 onMounted(() => {
   document.addEventListener('keydown', keyBoardScroll)

+ 3 - 1
src/api/api-types/marking.d.ts

@@ -185,7 +185,8 @@ export namespace Marking {
 
   type GetMarkScoreHistoryListWithTask = BaseDefine<{ taskId: number | string }, MarkScoreHistory[]>
 
-  type RejectMarkHistory = BaseDefine<{ description: string; id: number; reason: string }>
+  type RejectMarkHistory = BaseDefine<{ description?: string; id: number; reason?: string }>
+  type RejectCustomQueryTask = BaseDefine<{ description?: string; reason?: string; taskId: number }>
 
   interface ArbitrationListItem {
     chiefName: string
@@ -342,6 +343,7 @@ export namespace Marking {
     getMarkScoreHistoryListWithTask: GetMarkScoreHistoryListWithTask
     /** 打回 */
     rejectMarkHistory: RejectMarkHistory
+    rejectCustomQueryTask: RejectCustomQueryTask
     /** 仲裁卷列表 */
     getArbitrationList: GetArbitrationList
     /** 仲裁卷打分 */

+ 1 - 0
src/api/marking.ts

@@ -46,6 +46,7 @@ const MarkingApi: DefineApiModule<Marking.ApiMap> = {
   getMarkScoreHistoryListWithTask: '/api/mark/history/task',
   /** 打回 */
   rejectMarkHistory: '/api/problem/history/reject',
+  rejectCustomQueryTask: '/api/custom/query/reject',
   /** 仲裁卷 */
   getArbitrationList: '/api/arbitration/page',
   /** 仲裁卷打分 */

BIN
src/assets/images/daishen.png


+ 8 - 1
src/components/shared/MarkHistoryList.vue

@@ -1,5 +1,12 @@
 <template>
-  <scoring-panel-container v-model="visible" class="mark-history-list" title="给分记录" width="600px">
+  <scoring-panel-container
+    v-model="visible"
+    :modal="false"
+    draggable
+    class="mark-history-list"
+    title="给分记录"
+    width="600px"
+  >
     <template #default>
       <slot :data="tableData">
         <base-table border stripe highlight-current-row size="small" :data="tableData" :columns="columns"></base-table>

+ 8 - 2
src/components/shared/SendBackMark.vue

@@ -32,7 +32,7 @@ const props = withDefaults(
     modelValue: boolean
     id: number | undefined
     // 问题卷 | 系统抽查 | 自查卷
-    type?: 'problem' | 'system-check' | 'self-check'
+    type?: 'problem' | 'system-check' | 'self-check' | 'custom-check'
   }>(),
   { type: 'problem' }
 )
@@ -72,11 +72,13 @@ const { fetch: rejectMarkHistory } = useFetch('rejectMarkHistory')
 const { fetch: rejectSystemSpotPaper } = useFetch('rejectSystemSpotPaper')
 
 const { fetch: rejectSelfCheckData } = useFetch('rejectSelfCheckData')
+const { fetch: rejectCustomCheckData } = useFetch('rejectCustomQueryTask')
 
 const ApiMap = {
   problem: rejectMarkHistory,
   'system-check': rejectSystemSpotPaper,
   'self-check': rejectSelfCheckData,
+  'custom-check': rejectCustomCheckData,
 }
 
 const onSendBack = async () => {
@@ -88,7 +90,11 @@ const onSendBack = async () => {
     // const valid = await elFormRef?.value?.validate()
     // if (valid) {
     // await ApiMap[props.type]({ description: model.description, reason: model.reason, id: props.id })
-    await ApiMap[props.type]({ description: '', reason: '', id: props.id })
+    if (props.type === 'custom-check') {
+      await rejectCustomCheckData({ description: '', reason: '', taskId: props.id })
+    } else {
+      await ApiMap[props.type]({ description: '', reason: '', id: props.id })
+    }
     // }
     visible.value = false
     emits('rejected')

+ 3 - 0
src/directives/dialogResize.ts

@@ -173,6 +173,9 @@ export const dialogResize = {
     resizeEl.style.position = 'absolute'
     resizeEl.style.height = '10px'
     resizeEl.style.width = '10px'
+    resizeEl.style.border = '3px solid transparent'
+    resizeEl.style.borderRightColor = '#333'
+    resizeEl.style.borderBottomColor = '#333'
     resizeEl.style.right = '0px'
     resizeEl.style.bottom = '0px'
     resizeEl.style.zIndex = '99'

+ 3 - 5
src/directives/dialogResizeImg.ts

@@ -187,6 +187,9 @@ export const dialogResizeImg = {
     resizeEl.style.position = 'absolute'
     resizeEl.style.height = '10px'
     resizeEl.style.width = '10px'
+    resizeEl.style.border = '3px solid transparent'
+    resizeEl.style.borderRightColor = '#333'
+    resizeEl.style.borderBottomColor = '#333'
     resizeEl.style.right = '0px'
     resizeEl.style.bottom = '0px'
     resizeEl.style.zIndex = '99'
@@ -221,11 +224,6 @@ export const dialogResizeImg = {
         // }
         if (dragDom.clientHeight >= maxHeight && maxWW == 0) {
           maxWW = dragDom.clientWidth
-          console.log('maxWW', maxWW)
-          //   console.log('dragDom.clientWidth:', dragDom.clientWidth)
-
-          //   dragDom.style.width = 100
-          //   return false
         }
         // 比较是否小于最小宽高
         if (x > maxWW && maxWW > 0) {

+ 23 - 2
src/modules/marking/inquiry-result/index.vue

@@ -5,7 +5,12 @@
       :paper-path="current?.filePath"
       @click="onOperationClick"
     >
-      <el-button class="m-l-base m-r-auto" size="small" type="primary" @click="onEditScore">修改给分</el-button>
+      <el-button :disabled="!current?.taskId" class="m-l-base" size="small" type="primary" @click="onEditScore"
+        >修改给分</el-button
+      >
+      <el-button :disabled="!current?.taskId" class="m-l-base m-r-auto" size="small" type="primary" @click="onSendBack"
+        >打回</el-button
+      >
     </mark-header>
     <div class="flex flex-1 overflow-hidden p-base mark-container">
       <div
@@ -69,6 +74,12 @@
   </div>
   <image-preview v-model="previewModalVisible" :url="current?.filePath"></image-preview>
   <mark-history-list :id="currentViewHistory?.taskId" v-model="visibleHistory"></mark-history-list>
+  <send-back-mark
+    :id="current?.taskId"
+    v-model="sendBackVisible"
+    type="custom-check"
+    @rejected="onRejected"
+  ></send-back-mark>
 
   <base-dialog v-model="setExpertPaperVisible" title="设置专家卷" :footer="false" :width="540">
     <base-form size="small" :model="setExpertModel" :items="items" :label-width="'130px'">
@@ -105,7 +116,7 @@ import RightButton from '@/components/shared/RightButton.vue'
 import SvgIcon from '@/components/common/SvgIcon.vue'
 import ImagePreview from '@/components/shared/ImagePreview.vue'
 import ScoringPanelWithConfirm from '@/components/shared/ScoringPanelWithConfirm.vue'
-
+import SendBackMark from '@/components/shared/SendBackMark.vue'
 import type { SetImgBgOption } from '@/hooks/useSetImgBg'
 import type { ExtractMultipleApiResponse, ExtractApiParams } from '@/api/api'
 import type { MarkHeaderInstance, EpTableColumn, EpFormItem } from 'global-type'
@@ -113,6 +124,16 @@ import type { MarkHeaderInstance, EpTableColumn, EpFormItem } from 'global-type'
 type RowType = ExtractMultipleApiResponse<'getCustomQueryTasks'> & { index: number }
 
 const { query } = useRoute()
+/** 打回弹窗 */
+const sendBackVisible = ref<boolean>(false)
+/** 打回 */
+const onSendBack = () => {
+  sendBackVisible.value = true
+}
+/** 打回成功 */
+const onRejected = () => {
+  onRefresh()
+}
 
 /** 给分板 */
 const editScoreVisible = ref<boolean>(false)

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

@@ -357,7 +357,7 @@ const checkMarkStatus = async (): Promise<boolean> => {
     clearTaskView()
     return false
   } else if (!!markTotalCount && res.personCount === markTotalCount) {
-    ElMessage.success(`任务量${res.totalCount}已完成`)
+    ElMessage.success(`任务量${res.personCount}已完成`)
     clearTaskView()
     return false
   } else {

+ 91 - 16
src/modules/monitor/training-monitoring/index.vue

@@ -69,7 +69,7 @@ import useVW from '@/hooks/useVW'
 import useFetch from '@/hooks/useFetch'
 import useSection from '@/hooks/useSection'
 import useFormFilter from './hooks/useFormFilter'
-
+import ImgWaitingCheck from '../../../assets/images/daishen.png'
 import type { ExtractApiResponse } from '@/api/api'
 import type { EpTableColumn } from 'global-type'
 
@@ -123,7 +123,34 @@ const columns = computed<EpTableColumn<TableDataType>[]>(() => {
       fixed: 'left',
     },
     { label: '评卷员', prop: 'markerName', width: 100, fixed: 'left' },
-    { label: '状态', prop: 'status', width: 100, fixed: 'left' },
+    {
+      label: '状态',
+      prop: 'status',
+      width: 104,
+      fixed: 'left',
+      formatter(row: any) {
+        let cls =
+          row.status == 'Sample A'
+            ? 'sample-a'
+            : row.status == 'Sample B'
+            ? 'sample-b'
+            : row.status == 'Pass A'
+            ? 'pass-a'
+            : row.status == 'Pass B'
+            ? 'pass-b'
+            : row.status == '强制考核'
+            ? 'qzkh'
+            : row.status === '正评'
+            ? 'zp'
+            : 'normal'
+        return (
+          <div class={cls + ' status-box'}>
+            {row.status}
+            {row.needAudit ? <img class="wait-check" src={ImgWaitingCheck} /> : null}
+          </div>
+        )
+      },
+    },
     { label: '平均分', prop: 'avg', width: 80 },
     { label: '标准差', prop: 'std', width: 80 },
     { label: '相关系数', prop: 'xyRelate', width: 80 },
@@ -181,13 +208,13 @@ const onDbClick = (row: TableDataType) => {
 }
 
 onOptionInit(onSearch)
-let timer: any = setInterval(() => {
-  onSearch()
-}, 30000)
-onBeforeUnmount(() => {
-  clearInterval(timer)
-  timer = null
-})
+// let timer: any = setInterval(() => {
+//   onSearch()
+// }, 30000)
+// onBeforeUnmount(() => {
+//   clearInterval(timer)
+//   timer = null
+// })
 </script>
 
 <style scoped lang="scss">
@@ -195,13 +222,61 @@ onBeforeUnmount(() => {
   :deep(.el-form-item--small) {
     margin-bottom: 10px;
   }
-  :deep(.el-table .fixed-row) {
-    display: table-row;
-    position: sticky;
-    position: '-webkit-sticky';
-    top: 0;
-    width: 100%;
-    z-index: 3;
+  :deep(.el-table) {
+    .cell {
+      overflow: visible;
+    }
+    .fixed-row {
+      display: table-row;
+      position: sticky;
+      position: '-webkit-sticky';
+      top: 0;
+      width: 100%;
+      z-index: 3;
+    }
+    .status-box {
+      height: 24px;
+      padding: 6px 10px;
+      text-align: center;
+      border-radius: 12px;
+      // background: #eee;
+      line-height: 1 !important;
+      font-size: 12px;
+      font-weight: bold;
+      position: relative;
+      .wait-check {
+        position: absolute;
+        right: -1px;
+        top: -5px;
+        width: 10px;
+        height: 10px;
+        z-index: 1;
+      }
+      &.sample-a {
+        background: #d6f3ff;
+        color: #0086d9;
+      }
+      &.sample-b {
+        background: #e8e4ff;
+        color: #605ca2;
+      }
+      &.pass-a {
+        background: #fdf0cc;
+        color: #e26100;
+      }
+      &.pass-b {
+        background: #ffe0cc;
+        color: #9f4f26;
+      }
+      &.qzkh {
+        background: #ffd8d8;
+        color: #844141;
+      }
+      &.zp {
+        background: #ccf1ea;
+        color: #307864;
+      }
+    }
   }
 }
 </style>

+ 1 - 1
src/utils/common.ts

@@ -227,7 +227,7 @@ export const getCurDayRange = () => {
 
 export const transHtmlContent = (content: string) => {
   return content
-    .replaceAll(/<[^>]+>/gim, ' ')
+    .replaceAll(/<[^>]+>/gim, '')
     .replace('&quot;', '"')
     .replace('&amp;', '&')
     .replace('&lt;', '<')