刘洋 hace 2 años
padre
commit
66f1590553

+ 28 - 17
src/directives/dialogResizeImg.ts

@@ -27,6 +27,8 @@ export const dialogResizeImg = {
     const dragDom: any = document.querySelector('.' + binding.value)
     const dialogHeaderEl = dragDom.querySelector('.el-dialog__header')
     const img = dragDom.querySelector('.small-img')
+    let imgError = false
+    const resizeEl = document.createElement('div')
 
     if (!img.src) {
       dragDom.style.width = minWidth + 'px'
@@ -50,6 +52,9 @@ export const dialogResizeImg = {
     }
     img.onerror = function () {
       dragDom.style.width = minWidth + 'px'
+      dragDom.style.height = minWidth + 'px'
+      imgError = true
+      resizeEl.style.display = 'none'
     }
 
     // console.log('img', getComputedStyle(img).width)
@@ -60,7 +65,7 @@ export const dialogResizeImg = {
     // dragDom.style.overflow = 'auto'
     dragDom.style.background = '#fff'
 
-    if (keyboardPositions) {
+    if (keyboardPositions && !!img.src) {
       dragDom.style.left = JSON.parse(keyboardPositions).left || 0
       dragDom.style.top = JSON.parse(keyboardPositions).top || 0
     }
@@ -130,16 +135,20 @@ export const dialogResizeImg = {
         document.onmousemove = null
         document.onmouseup = null
         console.log('dragDom.style.left:', dragDom.style.left, dragDom.style.top)
-        localStorage.setItem(
-          localKeyMap.positions[bValue],
-          JSON.stringify({
-            left: dragDom.style.left || 0,
-            top: dragDom.style.top || 0,
-          })
-        )
+        if (!imgError) {
+          localStorage.setItem(
+            localKeyMap.positions[bValue],
+            JSON.stringify({
+              left: dragDom.style.left || 0,
+              top: dragDom.style.top || 0,
+            })
+          )
+        }
       }
     }
-    dialogHeaderEl.onmousedown = moveDown
+    if (!!img.src) {
+      dialogHeaderEl.onmousedown = moveDown
+    }
     // const bodyHeight = 'auto'
 
     // function setMaxMin() {
@@ -193,7 +202,6 @@ export const dialogResizeImg = {
     // 双击头部效果
     // dialogHeaderEl.ondblclick = setMaxMin
     // 拉伸
-    const resizeEl = document.createElement('div')
     dragDom.appendChild(resizeEl)
     // 在弹窗右下角加上一个10-10px的控制块
     resizeEl.style.cursor = 'se-resize'
@@ -265,13 +273,16 @@ export const dialogResizeImg = {
       document.onmouseup = function (e) {
         document.onmousemove = null
         document.onmouseup = null
-        localStorage.setItem(
-          localKeyMap.resize[bValue],
-          JSON.stringify({
-            width: dragDom.style.width || 'auto',
-            height: dragDom.style.height || 'auto',
-          })
-        )
+        if (!imgError) {
+          localStorage.setItem(
+            localKeyMap.resize[bValue],
+            JSON.stringify({
+              width: dragDom.style.width || 'auto',
+              height: dragDom.style.height || 'auto',
+            })
+          )
+        }
+
         el.dispatchEvent(resizeEvent)
       }
     }

+ 15 - 2
src/layout/main/MenuItem.vue

@@ -56,7 +56,11 @@
     :class="{ 'is-collapse': mainLayoutStore.collapse, 'active-index': checkActive() }"
   >
     <template #title>
-      <div class="flex items-center flex-1 main-layout-sub-menu-title" :class="{ 'menu-padding-left': hasChildren }">
+      <div
+        class="flex items-center flex-1 main-layout-sub-menu-title"
+        :class="{ 'menu-padding-left': hasChildren }"
+        @click="mClick(menuInfo)"
+      >
         <component
           :is="menuInfo.path ? 'router-link' : 'div'"
           :to="menuInfo.path"
@@ -93,7 +97,16 @@ const props = defineProps<{
   currentIndex?: string
   menu: ExtractArrayValue<typeof mainLayoutStore.menuList>
 }>()
-
+const mClick = (info: any) => {
+  console.log('iii', info)
+  if (
+    info.label === '评阅试卷' &&
+    info.path === '/marking' &&
+    !info.children.find((item: any) => item.path === '/marking/training-record')
+  ) {
+    mainLayoutStore.getRenderMenuList()
+  }
+}
 const menuInfo = computed(() => {
   // console.log('menuInfo:', { ...props.menu, children: props.menu.children || [] })
   return { ...props.menu, children: props.menu.children || [] }

+ 2 - 1
src/modules/analysis/personnel-statistics/components/StatisticsGroup.vue

@@ -201,7 +201,8 @@ watch(
   [() => props.params, current],
   () => {
     const { subjectCode, questionMainNumber, startTime = '', endTime = '' } = props.params || {}
-    if (subjectCode && questionMainNumber && current.value?.markingGroupNumber) {
+    // if (subjectCode && questionMainNumber && current.value?.markingGroupNumber) {
+    if (subjectCode && questionMainNumber && current.value) {
       getStatisticObjectiveByGroup({
         subjectCode,
         questionMainNumber,

+ 7 - 2
src/modules/analysis/personnel-statistics/components/StatisticsPersonnel.vue

@@ -42,7 +42,11 @@
       </template>
     </base-table>
   </div>
-  <div v-if="!!current" v-loading="loading1 || loading2" class="flex justify-between m-t-base charts-box">
+  <div
+    v-if="!!current && !!current?.markerId"
+    v-loading="loading1 || loading2"
+    class="flex justify-between m-t-base charts-box"
+  >
     <el-button type="primary" plain size="small" class="close-panel" @click="clearCheck">关闭</el-button>
 
     <div class="flex-1 p-base radius-base fill-blank m-r-base chart-box">
@@ -293,6 +297,7 @@ watch(
   [() => props.params, current],
   () => {
     const { startTime = '', endTime = '' } = props.params || {}
+    // if (current.value?.markerId) {
     if (current.value?.markerId) {
       getStatisticObjectiveByMarker({
         markerId: current.value.markerId,
@@ -440,7 +445,7 @@ const markerObjectiveChartsOption = computed<EChartsOption>(() => {
   }
 })
 const tableHeight = computed(() => {
-  return !!current.value ? 'calc(100vh - 520px)' : 'calc(100vh - 219px)'
+  return !!current.value && !!current.value?.markerId ? 'calc(100vh - 520px)' : 'calc(100vh - 219px)'
 })
 const clearCheck = () => {
   ;(elTableRef as any).value!.setCurrentRow(undefined)

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

@@ -20,7 +20,7 @@
         <div class="flex-1 p-base scroll-auto mark-content-paper img-wrap">
           <img :src="dataUrl" alt="" class="paper-img" :style="{ 'background-color': frontColor }" />
         </div>
-        <scoring-panel-with-confirm
+        <!-- <scoring-panel-with-confirm
           :id="current?.taskId"
           v-model:visible="editScoreVisible"
           v-model:score="modelScore"
@@ -29,6 +29,15 @@
           :auto-visible="false"
           :toggle-modal="false"
           @submit="onSubmit"
+        ></scoring-panel-with-confirm> -->
+        <scoring-panel-with-confirm
+          :id="current?.taskId"
+          v-model:visible="editScoreVisible"
+          v-model:score="modelScore"
+          :main-number="current?.mainNumber"
+          modal
+          :auto-visible="false"
+          @submit="onSubmit"
         ></scoring-panel-with-confirm>
       </div>
       <div class="flex direction-column p-base radius-base fill-blank m-l-base table-view">

+ 9 - 1
src/modules/expert/assess/index.vue

@@ -21,7 +21,7 @@
           <img :src="dataUrl" alt="" class="paper-img" :style="{ 'background-color': frontColor }" />
           <p v-if="currentAssessPaper" class="absolute mark-score">{{ currentAssessPaper.score }}</p>
         </div>
-        <scoring-panel-with-confirm
+        <!-- <scoring-panel-with-confirm
           v-model:visible="editScoreVisible"
           v-model:score="modelScore"
           :main-number="currentAssessPaper?.mainNumber"
@@ -29,6 +29,14 @@
           :toggle-modal="false"
           :auto-visible="false"
           @submit="onSubmit"
+        ></scoring-panel-with-confirm> -->
+        <scoring-panel-with-confirm
+          v-model:visible="editScoreVisible"
+          v-model:score="modelScore"
+          :main-number="currentAssessPaper?.mainNumber"
+          modal
+          :auto-visible="false"
+          @submit="onSubmit"
         ></scoring-panel-with-confirm>
       </div>
       <div class="flex direction-column p-base radius-base fill-blank m-l-base table-view">

+ 9 - 1
src/modules/expert/expert/index.vue

@@ -21,7 +21,7 @@
           <img :src="dataUrl" alt="" class="paper-img" :style="{ 'background-color': frontColor }" />
           <p v-if="currentExpertPaper" class="absolute mark-score">{{ currentExpertPaper.score }}</p>
         </div>
-        <scoring-panel-with-confirm
+        <!-- <scoring-panel-with-confirm
           v-model:visible="editScoreVisible"
           v-model:score="modelScore"
           modal
@@ -29,6 +29,14 @@
           :auto-visible="false"
           :main-number="currentExpertPaper?.mainNumber"
           @submit="onSubmit"
+        ></scoring-panel-with-confirm> -->
+        <scoring-panel-with-confirm
+          v-model:visible="editScoreVisible"
+          v-model:score="modelScore"
+          modal
+          :auto-visible="false"
+          :main-number="currentExpertPaper?.mainNumber"
+          @submit="onSubmit"
         ></scoring-panel-with-confirm>
       </div>
       <div class="flex direction-column p-base radius-base fill-blank m-l-base table-view">

+ 9 - 1
src/modules/expert/sample/index.vue

@@ -21,7 +21,7 @@
           <img :src="dataUrl" alt="" class="paper-img" :style="{ 'background-color': frontColor }" />
           <p v-if="currentRfPaper" class="absolute mark-score">{{ currentRfPaper.score }}</p>
         </div>
-        <scoring-panel-with-confirm
+        <!-- <scoring-panel-with-confirm
           v-model:visible="editScoreVisible"
           v-model:score="modelScore"
           modal
@@ -29,6 +29,14 @@
           :auto-visible="false"
           :main-number="currentRfPaper?.mainNumber"
           @submit="onSubmit"
+        ></scoring-panel-with-confirm> -->
+        <scoring-panel-with-confirm
+          v-model:visible="editScoreVisible"
+          v-model:score="modelScore"
+          modal
+          :auto-visible="false"
+          :main-number="currentRfPaper?.mainNumber"
+          @submit="onSubmit"
         ></scoring-panel-with-confirm>
       </div>
       <div class="flex direction-column p-base radius-base fill-blank m-l-base table-view">

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

@@ -25,7 +25,7 @@
         <div class="flex-1 p-base scroll-auto mark-content-paper img-wrap">
           <img :src="dataUrl" alt="" class="paper-img" :style="{ 'background-color': frontColor }" />
         </div>
-        <scoring-panel-with-confirm
+        <!-- <scoring-panel-with-confirm
           v-model:visible="editScoreVisible"
           v-model:score="modelScore"
           :main-number="current?.mainNumber"
@@ -33,6 +33,14 @@
           :toggle-modal="false"
           :auto-visible="false"
           @submit="onSubmit"
+        ></scoring-panel-with-confirm> -->
+        <scoring-panel-with-confirm
+          v-model:visible="editScoreVisible"
+          v-model:score="modelScore"
+          :main-number="current?.mainNumber"
+          modal
+          :auto-visible="false"
+          @submit="onSubmit"
         ></scoring-panel-with-confirm>
       </div>
       <div class="flex direction-column p-base radius-base fill-blank m-l-base table-view">

+ 12 - 4
src/modules/marking/mark/index.vue

@@ -27,7 +27,7 @@
         <span class="preview" @click="onPreview">
           <svg-icon name="preview"></svg-icon>
         </span>
-        <div :class="{ 'text-center': center }" class="img-wrap">
+        <div ref="imgWrap" :class="{ 'text-center': center }" class="img-wrap">
           <img :src="dataUrl" alt="" class="paper-img" :style="{ 'background-color': frontColor }" />
         </div>
       </div>
@@ -89,7 +89,7 @@ import RemarkListModal from '@/components/shared/RemarkListModal.vue'
 import CurrentTime from '@/components/shared/CurrentTime.vue'
 import SvgIcon from '@/components/common/SvgIcon.vue'
 import bus from '@/utils/bus'
-
+import useMainLayoutStore from '@/store/layout'
 import MarkingStatus from '@/assets/images/status-marking.png'
 import ReMarkingStatus from '@/assets/images/status-remarking.png'
 import SampleAStatus from '@/assets/images/status-sample-a.png'
@@ -98,8 +98,9 @@ import SampleBStatus from '@/assets/images/status-sample-b.png'
 import type { SetImgBgOption } from '@/hooks/useSetImgBg'
 import type { ExtractApiResponse } from '@/api/api'
 import type { MarkHeaderInstance } from 'global-type'
+const mainLayoutStore = useMainLayoutStore()
 const { push, replace } = useRouter()
-
+const imgWrap = ref()
 const { getSpentTime, resume } = useSpentTime()
 
 const CACHE_NUM = 2
@@ -210,7 +211,7 @@ const refreshTaskPool = (force = false, isRefresh = false) => {
                 })
                 currentTaskPool.unshift(...result)
               } else {
-                currentTaskPool.push(...result)
+                currentTaskPool.unshift(...result)
               }
             } else {
               currentTaskPool.push(...result)
@@ -465,6 +466,11 @@ const getEnableRemark = () => {
       enableRemark.value = markHistoryRes.enableRemark
     })
 }
+const clearScrollTop = () => {
+  if (imgWrap.value) {
+    imgWrap.value.scrollTop = 0
+  }
+}
 let timer: any = null
 watch(currentTask, (newVal, oldVal) => {
   // getMarkStatus()
@@ -475,6 +481,7 @@ watch(currentTask, (newVal, oldVal) => {
   if (!currentTask.value) {
     getEnableRemark()
   }
+  clearScrollTop()
 })
 
 onRefresh()
@@ -492,6 +499,7 @@ watch(enableRemark, (val) => {
     timer = null
     getMarkStatus()
   }
+  mainLayoutStore.getRenderMenuList()
 })
 </script>
 

+ 10 - 1
src/modules/monitor/system-check/index.vue

@@ -26,7 +26,7 @@
             {{ currentSystemCheckPaper.headerScore ?? currentSystemCheckPaper.markScore }}
           </p>
         </div>
-        <scoring-panel-with-confirm
+        <!-- <scoring-panel-with-confirm
           :id="currentSystemCheckPaper?.taskId"
           v-model:visible="scoringPanelVisible"
           v-model:score="modelScore"
@@ -35,6 +35,15 @@
           :auto-visible="false"
           :main-number="currentSystemCheckPaper?.mainNumber"
           @submit="onSubmit"
+        ></scoring-panel-with-confirm> -->
+        <scoring-panel-with-confirm
+          :id="currentSystemCheckPaper?.taskId"
+          v-model:visible="scoringPanelVisible"
+          v-model:score="modelScore"
+          modal
+          :auto-visible="false"
+          :main-number="currentSystemCheckPaper?.mainNumber"
+          @submit="onSubmit"
         ></scoring-panel-with-confirm>
       </div>
       <div class="flex direction-column p-base radius-base fill-blank m-l-base table-view">

+ 10 - 1
src/modules/quality/self-check-detail/index.vue

@@ -21,7 +21,7 @@
         <div class="flex-1 p-base scroll-auto mark-content-paper img-wrap">
           <img :src="dataUrl" alt="" class="paper-img" :style="{ 'background-color': frontColor }" />
         </div>
-        <scoring-panel-with-confirm
+        <!-- <scoring-panel-with-confirm
           :id="current?.taskId"
           v-model:visible="editScoreVisible"
           v-model:score="modelScore"
@@ -30,6 +30,15 @@
           :toggle-modal="false"
           :auto-visible="false"
           @submit="onSubmit"
+        ></scoring-panel-with-confirm> -->
+        <scoring-panel-with-confirm
+          :id="current?.taskId"
+          v-model:visible="editScoreVisible"
+          v-model:score="modelScore"
+          :main-number="current?.mainNumber"
+          modal
+          :auto-visible="false"
+          @submit="onSubmit"
         ></scoring-panel-with-confirm>
       </div>
       <div class="flex direction-column p-base radius-base fill-blank m-l-base table-view">

+ 10 - 1
src/modules/quality/subjective-check/index.vue

@@ -21,7 +21,7 @@
         <div class="flex-1 p-base scroll-auto mark-content-paper img-wrap">
           <img :src="dataUrl" alt="" class="paper-img" :style="{ 'background-color': frontColor }" />
         </div>
-        <scoring-panel-with-confirm
+        <!-- <scoring-panel-with-confirm
           :id="currentSubjectiveCheck?.taskId"
           v-model:visible="editScoreVisible"
           v-model:score="modelScore"
@@ -30,6 +30,15 @@
           :toggle-modal="false"
           :auto-visible="false"
           @submit="onSubmit"
+        ></scoring-panel-with-confirm> -->
+        <scoring-panel-with-confirm
+          :id="currentSubjectiveCheck?.taskId"
+          v-model:visible="editScoreVisible"
+          v-model:score="modelScore"
+          :main-number="currentSubjectiveCheck?.mainNumber"
+          modal
+          :auto-visible="false"
+          @submit="onSubmit"
         ></scoring-panel-with-confirm>
       </div>
       <div class="p-base radius-base fill-blank scroll-auto m-l-base table-view">