瀏覽代碼

收尾检查的表格评卷员列的内容调整:加上在线状态

刘洋 1 年之前
父節點
當前提交
b3da63cd7c

+ 32 - 22
src/components/shared/SendBackMark.vue

@@ -28,7 +28,7 @@
 
 <script setup lang="ts" name="SendBackMark">
 /** 打回弹窗 */
-import { reactive, withDefaults, watch, ref } from 'vue'
+import { reactive, withDefaults, watch, ref, computed } from 'vue'
 import { ElFormItem, ElMessage } from 'element-plus'
 import BaseDialog from '@/components/element/BaseDialog.vue'
 import BaseForm from '../element/BaseForm.vue'
@@ -42,6 +42,7 @@ import useMainStore from '@/store/main'
 import type { EpFormItem, EpFormRules } from 'global-type'
 const mainStore = useMainStore()
 const needRejectReason = ref<any>(null)
+const needRejectMessage = ref<boolean>(false)
 const emits = defineEmits<{
   (e: 'rejected'): void
 }>()
@@ -73,6 +74,7 @@ watch(visible, () => {
   } else {
     getExamInfo({ id: mainStore.myUserInfo?.examId as number }).then((result: any) => {
       needRejectReason.value = result.rejectReason
+      needRejectMessage.value = result.rejectMessage
     })
   }
 })
@@ -87,25 +89,30 @@ const reason = ['给分太高', '给分太低', '注意,评分偏紧', '注意,
   value: v,
 }))
 
-const items: any[] = [
-  { label: '打回原因', labelWidth: '90px', prop: 'reason', slotType: 'select', slot: { options: reason } },
-  {
-    label: '说明',
-    labelWidth: '90px',
-    prop: 'description',
-    slotType: 'input',
-    slot: { type: 'textarea', maxlength: 300, resize: 'none', rows: 6, showWordLimit: true },
-  },
-  {
-    prop: 'sendDeputy',
-    label: '推送给小组长',
-    slotType: 'checkbox',
-    labelWidth: '90px',
-    slot: {
-      options: [{ label: '是', slotLabel: '' }],
+const items: any = computed(() => {
+  let options: any = [
+    { label: '打回原因', labelWidth: '90px', prop: 'reason', slotType: 'select', slot: { options: reason } },
+    {
+      label: '说明',
+      labelWidth: '90px',
+      prop: 'description',
+      slotType: 'input',
+      slot: { type: 'textarea', maxlength: 300, resize: 'none', rows: 6, showWordLimit: true },
     },
-  },
-]
+  ]
+  if (needRejectMessage.value) {
+    options.push({
+      prop: 'sendDeputy',
+      label: '推送给小组长',
+      slotType: 'checkbox',
+      labelWidth: '90px',
+      slot: {
+        options: [{ label: '是', slotLabel: '' }],
+      },
+    })
+  }
+  return options
+})
 
 const { fetch: rejectMarkHistory } = useFetch('rejectMarkHistory')
 
@@ -130,12 +137,15 @@ const onSendBack = async () => {
 
     if (props.type === 'custom-check') {
       // await rejectCustomCheckData({ description: model.description, reason: model.reason, taskId: props.id })
-      await rejectCustomCheckData({
+      let params: any = {
         description: model.description,
         reason: model.reason,
         taskIds: props.id,
-        sendDeputy: model.sendDeputy?.length > 0,
-      })
+      }
+      if (needRejectMessage.value) {
+        params.sendDeputy = model.sendDeputy?.length > 0
+      }
+      await rejectCustomCheckData(params)
     } else {
       await ApiMap[props.type]({ description: model.description, reason: model.reason, id: props.id })
     }

+ 90 - 71
src/modules/analysis/group-monitoring-detail/index.vue

@@ -23,77 +23,89 @@
       </div>
     </div>
     <div class="flex fill-blank detail-info">
-      <div class="flex p-base detail-info-chart" style="width: 64%">
-        <div style="width: 50%">
-          <vue-echarts class="full" :option="markerSubjectiveChartsOption"></vue-echarts>
-        </div>
-        <div class="flex-1 m-l-base">
-          <vue-echarts class="full" :option="markerObjectiveChartsOption"></vue-echarts>
-        </div>
-      </div>
-      <div class="flex direction-column p-extra-small" style="width: 36%">
-        <div class="flex items-center justify-between detail-info-table-header m-b-mini">
-          <el-button custom-1 size="small" class="detail-info-label">
-            <span class="">{{ dataType }}试卷总数:</span>
-            <span class="m-l-extra-small detail-info-label-num">{{ total }}</span>
-          </el-button>
-          <el-pagination
-            v-bind="pagination"
-            v-model:current-page="currentPage"
-            size="small"
-            class="m-t-unset"
-            background
-            right
-            hide-on-single-page
-            :pager-count="3"
-            small
-          ></el-pagination>
-        </div>
-        <div class="flex-1 scroll-auto">
-          <base-table
-            ref="tableRef"
-            border
-            stripe
-            size="small"
-            height="100%"
-            :data="tableData"
-            :columns="tableColumn"
-            highlight-current-row
-            @current-change="onCurrentChange"
-          >
-            <template #empty> 暂无数据 </template>
-          </base-table>
-        </div>
-      </div>
+      <splitpanes class="default-theme" style="height: 100%">
+        <pane max-size="80" :size="64" class="flex p-base detail-info-chart">
+          <div style="width: 50%">
+            <vue-echarts class="full" :option="markerSubjectiveChartsOption" autoresize></vue-echarts>
+          </div>
+          <div class="flex-1 m-l-base">
+            <vue-echarts class="full" :option="markerObjectiveChartsOption" autoresize></vue-echarts>
+          </div>
+        </pane>
+        <pane max-size="80" :size="36" class="flex direction-column p-extra-small">
+          <div class="flex items-center justify-between detail-info-table-header m-b-mini">
+            <el-button custom-1 size="small" class="detail-info-label">
+              <span class="">{{ dataType }}试卷总数:</span>
+              <span class="m-l-extra-small detail-info-label-num">{{ total }}</span>
+            </el-button>
+            <el-pagination
+              v-bind="pagination"
+              v-model:current-page="currentPage"
+              size="small"
+              class="m-t-unset"
+              background
+              right
+              hide-on-single-page
+              :pager-count="3"
+              small
+            ></el-pagination>
+          </div>
+          <div class="flex-1 scroll-auto">
+            <base-table
+              ref="tableRef"
+              border
+              stripe
+              size="small"
+              height="100%"
+              :data="tableData"
+              :columns="tableColumn"
+              highlight-current-row
+              @current-change="onCurrentChange"
+            >
+              <template #empty> 暂无数据 </template>
+            </base-table>
+          </div>
+        </pane>
+      </splitpanes>
     </div>
     <div class="flex-1 p-t-base flex overflow-hidden">
-      <div class="flex direction-column flex-1 overflow-hidden radius-base fill-blank relative paper-view">
-        <div ref="imgWrap" class="flex-1 p-extra-small scroll-auto img-wrap">
-          <img :src="current?.filePath" alt="" class="paper-img relative" />
-          <p v-if="current" class="absolute question-info">{{ current.mainNumber + '-' + current.mainName }}</p>
-          <p v-if="current" class="absolute mark-score">{{ current.headerScore ?? current.markerScore }}</p>
-        </div>
-        <span class="preview" @click="onPreview">
-          <svg-icon name="preview"></svg-icon>
-        </span>
-        <scoring-panel-with-confirm
-          :id="current?.taskId"
-          v-model:visible="scoringPanelVisible"
-          v-model:score="modelScore"
-          :main-number="current?.mainNumber"
-          :subject-code="current?.subjectCode || ''"
-          @submit="onSubmit"
-        ></scoring-panel-with-confirm>
-      </div>
-      <div class="radius-base p-extra-small fill-blank m-l-base overflow-auto paper-mark-record">
-        <mark-history-list
-          :id="current?.taskId"
-          height="100%"
-          :model-value="true"
-          :modal="false"
-          :task="current"
-        ></mark-history-list>
-      </div>
+      <splitpanes class="default-theme" style="height: 100%">
+        <pane
+          max-size="80"
+          :size="70"
+          class="flex direction-column flex-1 overflow-hidden radius-base fill-blank relative paper-view"
+        >
+          <div ref="imgWrap" class="flex-1 p-extra-small scroll-auto img-wrap">
+            <img :src="current?.filePath" alt="" class="paper-img relative" />
+            <p v-if="current" class="absolute question-info">{{ current.mainNumber + '-' + current.mainName }}</p>
+            <p v-if="current" class="absolute mark-score">{{ current.headerScore ?? current.markerScore }}</p>
+          </div>
+          <span class="preview" @click="onPreview">
+            <svg-icon name="preview"></svg-icon>
+          </span>
+          <scoring-panel-with-confirm
+            :id="current?.taskId"
+            v-model:visible="scoringPanelVisible"
+            v-model:score="modelScore"
+            :main-number="current?.mainNumber"
+            :subject-code="current?.subjectCode || ''"
+            @submit="onSubmit"
+          ></scoring-panel-with-confirm>
+        </pane>
+        <pane
+          max-size="80"
+          :size="30"
+          class="radius-base p-extra-small fill-blank m-l-base overflow-auto paper-mark-record"
+        >
+          <mark-history-list
+            :id="current?.taskId"
+            height="100%"
+            :model-value="true"
+            :modal="false"
+            :task="current"
+          ></mark-history-list>
+        </pane>
+      </splitpanes>
     </div>
   </div>
   <image-preview v-model="previewModalVisible" :url="current?.filePath"></image-preview>
@@ -116,10 +128,17 @@ import ImagePreview from '@/components/shared/ImagePreview.vue'
 import MarkHistoryList from '@/components/shared/MarkHistoryList.vue'
 import SvgIcon from '@/components/common/SvgIcon.vue'
 import LockEntry from '@/components/common/LockEntry.vue'
+import useMainStore from '@/store/main'
+import { Splitpanes, Pane } from 'splitpanes'
+import { setPaneSize } from '@/utils/common'
 import type { EChartsOption } from 'echarts'
 import type { ExtractMultipleApiResponse, ExtractApiResponse } from '@/api/api'
 import type { EpTableColumn } from 'global-type'
 
+const mainStore = useMainStore()
+const paneSize = computed(() => {
+  return mainStore.paneSizeConfig[location.pathname] || 70
+})
 const { back } = useRouter()
 const { query } = useRoute()
 const imgWrap = ref()
@@ -151,7 +170,7 @@ const { pagination, currentPage, total, data, fetchTable } = useTable(
     subjectCode: query.subjectCode,
     mainNumber: query.questionMainNumber,
   },
-  { pageSize: 4 }
+  { pageSize: 100 }
 )
 
 const { tableRef, current, onCurrentChange, tableData, next } = useTableCheck(data)
@@ -466,6 +485,6 @@ fetchTable()
   }
 }
 .paper-mark-record {
-  width: 390px;
+  // width: 390px;
 }
 </style>

+ 34 - 1
src/modules/quality/ending-check/components/EndCheck.vue

@@ -379,6 +379,24 @@ const columns1 = computed(() => {
       key: 'markerName',
       dataKey: 'markerName',
       width: w,
+      cellRenderer: (rowObj: any) => {
+        const { rowData } = rowObj
+        return (
+          <span>
+            <span
+              style={{
+                backgroundColor: rowData.online ? '#00B42A' : '#ddd',
+                display: 'inline-block',
+                width: '10px',
+                height: '10px',
+                marginRight: '3px',
+                borderRadius: '2px',
+              }}
+            ></span>
+            <span>{`${rowData.loginName}-${rowData.markerName}`}</span>
+          </span>
+        )
+      },
       // formatter(row: any) {
       //   return `${row.loginName}-${row.markerName}`
       // },
@@ -420,7 +438,22 @@ const columns11 = computed(() => {
       width: w,
       cellRenderer: (rowObj: any) => {
         const { rowData } = rowObj
-        return <span>{`${rowData.loginName}-${rowData.markerName}`}</span>
+        // return <span>{`${rowData.loginName}-${rowData.markerName}`}</span>
+        return (
+          <span>
+            <span
+              style={{
+                backgroundColor: rowData.online ? '#00B42A' : '#ddd',
+                display: 'inline-block',
+                width: '10px',
+                height: '10px',
+                marginRight: '3px',
+                borderRadius: '2px',
+              }}
+            ></span>
+            <span>{`${rowData.loginName}-${rowData.markerName}`}</span>
+          </span>
+        )
       },
       // formatter(row: any) {
       //   return `${row.loginName}-${row.markerName}`