刘洋 2 jaren geleden
bovenliggende
commit
ac95ea9733

+ 1 - 1
src/components/shared/MarkHeader.vue

@@ -116,7 +116,7 @@ const buttons: HeaderButton[] = [
   { title: '查看样卷', type: 'example' },
   { title: '评分标准', type: 'standard' },
   { title: '删除当前专家卷', type: 'delete', smallTitle: '删除' },
-  { title: '设置专家卷', type: 'bookmark' },
+  { title: '设置专家卷', type: 'bookmark', smallTitle: '设置' },
 ]
 
 const refs = reactive<Partial<Record<ButtonType, Element>>>({

+ 6 - 1
src/components/shared/ScoringPanel.vue

@@ -36,7 +36,7 @@
 </template>
 
 <script setup lang="ts" name="ScoringPanel">
-import { watch, withDefaults, ref, defineComponent, useSlots, computed, nextTick } from 'vue'
+import { watch, withDefaults, ref, defineComponent, useSlots, computed, nextTick, onMounted } from 'vue'
 
 import { ElButton } from 'element-plus'
 import BaseDialog from '@/components/element/BaseDialog.vue'
@@ -98,6 +98,11 @@ watch(modalVisible, (val) => {
   dialogMode.value =
     typeof sessionKeyboardShowType === 'boolean' ? sessionKeyboardShowType : dialogModeBeforeSubmit.value
 })
+onMounted(() => {
+  let sessionKeyboardShowType = sessionStorage.get('dialogModeBeforeSubmit')
+  dialogMode.value =
+    typeof sessionKeyboardShowType === 'boolean' ? sessionKeyboardShowType : dialogModeBeforeSubmit.value
+})
 
 const { fetch: getQuestionStruct, reset: resetQuestionStruct, result: questionStruct } = useFetch('getQuestionStruct')
 

+ 7 - 1
src/components/shared/message/Message.vue

@@ -81,7 +81,13 @@ const props = withDefaults(
   { type: 'view', replyUserId: null, paperPath: null, messageVisible: false }
 )
 const transContent = (content: any) => {
-  return content.replaceAll(/<[^>]+>/gim, ' ')
+  return content
+    .replaceAll(/<[^>]+>/gim, ' ')
+    .replace('&quot;', '"')
+    .replace('&amp;', '&')
+    .replace('&lt;', '<')
+    .replace('&gt;', '>')
+    .replace('&nbsp;', ' ')
   // return content.replaceAll('<div>', ' ').replaceAll('<br>', ' ').replaceAll('<\/div>', '').replaceAll('<\/br>', '')
 }
 const MessageComponent = defineComponent({

+ 1 - 0
src/constants/storage.ts

@@ -8,4 +8,5 @@ export const SESSION_STORAGE_KEYS = {
   LOGIN_RESULT: 'login-result',
   /** 超管选择的考试ID */
   EXAM_ID: 'exam-id',
+  dialogModeBeforeSubmit: 'dialogModeBeforeSubmit',
 }

+ 10 - 2
src/hooks/useSetImgBg.ts

@@ -97,10 +97,11 @@ export const useSetImgBg = (option: Ref<SetImgBgOption>, frontColor?: Ref<string
         const img = new Image()
         img.src = image as string
         img.onload = async () => {
+          console.log('img onload')
           if (frontColor && setFrontColor) {
             // console.time()
             try {
-              const result = await analyze(image, { scale: 0.2 })
+              const result = await analyze(image, { scale: 0.1 })
               const bgColorRgb = result[0].color
               const bgColorNum = bgColorRgb.split('rgb(')[1].slice(0, -1)
               const splitArr = bgColorNum.split(',')
@@ -123,7 +124,14 @@ export const useSetImgBg = (option: Ref<SetImgBgOption>, frontColor?: Ref<string
 
           resolve(img)
         }
-        img.onerror = reject
+        img.onerror = () => {
+          console.log('img error')
+          reject()
+        }
+        img.onabort = () => {
+          console.log('img aborted')
+          reject()
+        }
       })
     }
     return image

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

@@ -178,6 +178,7 @@ const formItems = computed<EpFormItem[]>(() => [
     label: '大题',
     prop: 'mainNumber',
     slotType: 'select',
+    labelWidth: '46px',
     slot: { options: mainQuestionList.value, onChange: changeModelValue('question'), disabled: true },
   }),
   span10({

+ 2 - 0
src/modules/expert/expert/index.vue

@@ -206,6 +206,7 @@ const formItems = computed<EpFormItem[]>(() => {
       label: '大题',
       prop: 'mainNumber',
       slotType: 'select',
+      labelWidth: '46px',
       slot: { options: mainQuestionList.value, onChange: changeModelValue('question'), disabled: true },
     }),
     span10({
@@ -220,6 +221,7 @@ const formItems = computed<EpFormItem[]>(() => {
       rowKey: 'row-2',
       label: '试卷类型',
       prop: 'paperType',
+      labelWidth: '70px',
       slotType: 'select',
       slot: {
         options: [

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

@@ -165,6 +165,7 @@ const formItems = computed<EpFormItem[]>(() => [
     rowKey: 'row-1',
     label: '大题',
     prop: 'mainNumber',
+    labelWidth: '46px',
     slotType: 'select',
     slot: { options: mainQuestionList.value, onChange: changeModelValue('question'), disabled: true },
   }),

+ 3 - 0
src/modules/expert/standard/index.vue

@@ -116,6 +116,7 @@ const formItems = computed<EpFormItem[]>(() => [
     label: '大题',
     prop: 'mainNumber',
     slotType: 'select',
+    labelWidth: '46px',
     slot: { options: mainQuestionList.value, onChange: changeModelValue('question'), disabled: true },
   }),
   span10({
@@ -137,6 +138,7 @@ const formItems = computed<EpFormItem[]>(() => [
     label: '分数',
     prop: 'scoreStart',
     slotType: 'input',
+    labelWidth: '46px',
     // slotType: 'inputNumber',
     // slot: {
     //   step: 1,
@@ -150,6 +152,7 @@ const formItems = computed<EpFormItem[]>(() => [
     label: '至',
     prop: 'scoreEnd',
     slotType: 'input',
+    labelWidth: '38px',
     // slotType: 'inputNumber',
     // slot: {
     //   step: 1,

+ 1 - 0
src/modules/expert/training/index.vue

@@ -144,6 +144,7 @@ const formItems = computed<EpFormItem[]>(() => [
     label: '大题',
     prop: 'mainNumber',
     slotType: 'select',
+    labelWidth: '46px',
     slot: { options: mainQuestionList.value, onChange: changeModelValue('question'), disabled: true },
   }),
   span10({

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

@@ -159,6 +159,7 @@ const formItems = computed<EpFormItem[]>(() => [
     label: '大题',
     prop: 'mainNumber',
     slotType: 'select',
+    labelWidth: '46px',
     slot: { options: mainQuestionList.value, onChange: changeModelValue('question'), disabled: true },
   }),
   span10({

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

@@ -20,6 +20,15 @@
         <div class="flex-1 p-base scroll-auto mark-content-paper">
           <img :src="dataUrl" alt="" class="paper-img" :style="{ 'background-color': frontColor }" />
         </div>
+        <scoring-panel-with-confirm
+          v-model:visible="editScoreVisible"
+          v-model:score="modelScore"
+          :main-number="current?.mainNumber"
+          modal
+          :toggle-modal="false"
+          :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">
         <div class="flex items-center justify-between detail-info-table-header">
@@ -57,15 +66,7 @@
   </div>
   <image-preview v-model="previewModalVisible" :url="current?.filePath"></image-preview>
   <mark-history-list :id="currentViewHistory?.taskId" v-model="visibleHistory"></mark-history-list>
-  <scoring-panel-with-confirm
-    v-model:visible="editScoreVisible"
-    v-model:score="modelScore"
-    :main-number="current?.mainNumber"
-    modal
-    :toggle-modal="false"
-    :auto-visible="false"
-    @submit="onSubmit"
-  ></scoring-panel-with-confirm>
+
   <base-dialog v-model="setExpertPaperVisible" title="设置专家卷" :footer="false" :width="540">
     <base-form size="small" :model="setExpertModel" :items="items" :label-width="'130px'">
       <template #form-item-confirm>

+ 2 - 0
src/modules/marking/problem/index.vue

@@ -190,6 +190,7 @@ const formItems = computed<EpFormItem[]>(() => [
     rowKey: 'row-1',
     label: '大题',
     prop: 'mainNumber',
+    labelWidth: '46px',
     slotType: 'select',
     slot: { options: mainQuestionList.value, onChange: changeModelValue('question'), disabled: true },
   }),
@@ -210,6 +211,7 @@ const formItems = computed<EpFormItem[]>(() => [
   span10({
     rowKey: 'row-2',
     label: '问题类型',
+    labelWidth: '70px',
     prop: 'problemType',
     slotType: 'select',
     slot: {

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

@@ -171,6 +171,7 @@ const formItems = computed<EpFormItem[]>(() => [
     label: '大题',
     prop: 'mainNumber',
     slotType: 'select',
+    labelWidth: '46px',
     slot: { options: mainQuestionList.value, onChange: changeModelValue('question'), disabled: true },
   }),
   span10({

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

@@ -107,6 +107,7 @@ const formItems = computed<EpFormItem[]>(() => [
     label: '大题',
     prop: 'mainNumber',
     slotType: 'select',
+    labelWidth: '46px',
     slot: { options: mainQuestionList.value, onChange: changeModelValue('question'), disabled: true },
   }),
   span10({

+ 2 - 0
src/modules/monitor/system-check/index.vue

@@ -199,6 +199,7 @@ const formItems = computed<EpFormItem[]>(() => [
     label: '大题',
     prop: 'mainNumber',
     slotType: 'select',
+    labelWidth: '46px',
     slot: { options: mainQuestionList.value, onChange: changeModelValue('question'), disabled: true },
   }),
   span10({
@@ -221,6 +222,7 @@ const formItems = computed<EpFormItem[]>(() => [
     label: '类型',
     prop: 'status',
     slotType: 'select',
+    labelWidth: '46px',
     slot: {
       options: [
         { label: '未浏览', value: 'INITIAL' },

+ 6 - 6
src/modules/quality/spot-check/index.vue

@@ -88,17 +88,17 @@ const columns: EpTableColumn<ExtractArrayValue<ExtractApiResponse<'statisticChec
   {
     label: '评卷员',
     prop: 'markerName',
-    formatter(row) {
-      return row.markerId === 0 ? '' : row.markerName
-    },
+    // formatter(row) {
+    //   return row.markerId === 0 ? '' : row.markerName
+    // },
     sortable: true,
   },
   {
     label: '大题名称',
     prop: 'questionMainName',
-    formatter(row) {
-      return row.markerId === 0 ? '' : row.questionMainName
-    },
+    // formatter(row) {
+    //   return row.markerId === 0 ? '' : row.questionMainName
+    // },
   },
   { label: '主动抽查次数', prop: 'customCheckCount', align: 'center', sortable: true },
   { label: '打回量', prop: 'rejectCount', align: 'center', sortable: true },