ソースを参照

feat: 试评与仲裁管理

zhangjie 2 日 前
コミット
5e0232f69e

+ 192 - 0
src/views/mark/ArbitrationManage.vue

@@ -0,0 +1,192 @@
+<template>
+  <div class="part-box is-filter">
+    <el-form inline>
+      <el-form-item label="科目">
+        <select-subject v-model="searchModel.subject"></select-subject>
+      </el-form-item>
+      <el-form-item label="分组">
+        <el-input
+          v-model.trim="searchModel.group"
+          placeholder="请输入分组"
+          clearable
+          style="width: 120px"
+        >
+        </el-input>
+      </el-form-item>
+      <el-form-item label="状态">
+        <el-select
+          v-model="searchModel.status"
+          placeholder="请选择状态"
+          clearable
+          style="width: 120px"
+        >
+          <el-option label="待处理" value="pending" />
+          <el-option label="已处理" value="processed" />
+          <el-option label="已关闭" value="closed" />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="准考证号">
+        <el-input
+          v-model.trim="searchModel.examCardNo"
+          placeholder="请输入准考证号"
+          clearable
+          style="width: 150px"
+        >
+        </el-input>
+      </el-form-item>
+      <el-form-item>
+        <el-checkbox v-model="searchModel.optional"> 选做题 </el-checkbox>
+      </el-form-item>
+      <el-form-item>
+        <el-space wrap>
+          <el-button type="primary" @click="toPage(1)">查询</el-button>
+          <el-button @click="onBatchHandle">批量处理</el-button>
+          <el-button @click="onExport">导出</el-button>
+        </el-space>
+      </el-form-item>
+    </el-form>
+  </div>
+
+  <div class="part-box">
+    <el-table
+      class="page-table"
+      :data="dataList"
+      :loading="loading"
+      @selection-change="handleSelectionChange"
+    >
+      <el-table-column type="selection" width="55" />
+      <el-table-column property="subjectCode" label="科目代码" width="120" />
+      <el-table-column property="groupNo" label="分组序号" width="100" />
+      <el-table-column property="examCardNo" label="准考证号" width="150" />
+      <el-table-column label="状态" width="100">
+        <template #default="scope">
+          <el-tag :type="getStatusType(scope.row.status)" size="small">
+            {{ getStatusText(scope.row.status) }}
+          </el-tag>
+        </template>
+      </el-table-column>
+      <el-table-column
+        property="createTime"
+        label="创建时间"
+        width="180"
+        show-overflow-tooltip
+      />
+      <el-table-column
+        property="handleTime"
+        label="处理时间"
+        width="180"
+        show-overflow-tooltip
+      >
+        <template #default="scope">
+          {{ scope.row.handleTime || '-' }}
+        </template>
+      </el-table-column>
+      <el-table-column
+        property="handler"
+        label="处理人"
+        width="120"
+        show-overflow-tooltip
+      >
+        <template #default="scope">
+          {{ scope.row.handler || '-' }}
+        </template>
+      </el-table-column>
+      <el-table-column label="操作" width="120" fixed="right">
+        <template #default="scope">
+          <el-button
+            type="primary"
+            size="small"
+            link
+            @click="onHandle(scope.row)"
+          >
+            处理
+          </el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    <el-pagination
+      v-model:current-page="pagination.pageNumber"
+      v-model:page-size="pagination.pageSize"
+      :layout="pagination.layout"
+      :total="pagination.total"
+      @size-change="pageSizeChange"
+      @current-change="toPage"
+    />
+  </div>
+</template>
+
+<script setup lang="ts">
+  import { reactive } from 'vue';
+  import { ElMessage } from 'element-plus';
+  import { getArbitrationList } from '@/api/mark';
+  import {
+    MarkArbitrationItem,
+    MarkArbitrationListFilter,
+  } from '@/api/types/mark';
+  import useTable from '@/hooks/table';
+
+  defineOptions({
+    name: 'ArbitrationManage',
+  });
+
+  const searchModel = reactive<MarkArbitrationListFilter>({
+    subject: null,
+    group: '',
+    status: '',
+    optional: undefined,
+    examCardNo: '',
+  });
+
+  const {
+    dataList,
+    pagination,
+    loading,
+    selectedRows,
+    toPage,
+    pageSizeChange,
+    handleSelectionChange,
+  } = useTable<MarkArbitrationItem>(getArbitrationList, searchModel, false);
+
+  // 获取状态类型
+  function getStatusType(status: string) {
+    const statusMap: Record<string, string> = {
+      pending: 'warning',
+      processed: 'success',
+      closed: 'info',
+    };
+    return statusMap[status] || 'info';
+  }
+
+  // 获取状态文本
+  function getStatusText(status: string) {
+    const statusMap: Record<string, string> = {
+      pending: '待处理',
+      processed: '已处理',
+      closed: '已关闭',
+    };
+    return statusMap[status] || status;
+  }
+
+  // 处理仲裁
+  function onHandle(row: MarkArbitrationItem) {
+    ElMessage.info(`处理仲裁:${row.examCardNo}`);
+    // TODO: 实现处理仲裁的逻辑
+  }
+
+  function onBatchHandle() {
+    if (!selectedRows.value.length) {
+      ElMessage.warning('请选择数据');
+      return;
+    }
+
+    ElMessage.info(
+      `批量处理仲裁:${selectedRows.map((row) => row.examCardNo).join(',')}`
+    );
+    // TODO: 实现批量处理仲裁的逻辑
+  }
+
+  function onExport() {
+    // TODO: 导出仲裁
+    ElMessage.info('导出仲裁');
+  }
+</script>

+ 0 - 2
src/views/mark/MarkProgress.vue

@@ -125,8 +125,6 @@
   import useLoading from '@/hooks/loading';
   import { modalConfirm } from '@/utils/ui';
 
-  import Chart from '@/components/chart/index.vue';
-
   defineOptions({
     name: 'MarkProgress',
   });

+ 118 - 0
src/views/mark/TrialManage.vue

@@ -0,0 +1,118 @@
+<template>
+  <div class="part-box is-filter">
+    <el-form inline>
+      <el-form-item label="科目">
+        <select-subject v-model="searchModel.subject"></select-subject>
+      </el-form-item>
+      <el-form-item label="分组">
+        <el-input
+          v-model.trim="searchModel.group"
+          placeholder="请输入分组"
+          clearable
+          style="width: 120px"
+        >
+        </el-input>
+      </el-form-item>
+      <el-form-item label="准考证号">
+        <el-input
+          v-model.trim="searchModel.examCardNo"
+          placeholder="请输入准考证号"
+          clearable
+          style="width: 150px"
+        >
+        </el-input>
+      </el-form-item>
+      <el-form-item label="密号">
+        <el-input
+          v-model.trim="searchModel.secretNo"
+          placeholder="请输入密号"
+          clearable
+          style="width: 120px"
+        >
+        </el-input>
+      </el-form-item>
+      <el-form-item>
+        <el-space wrap>
+          <el-button type="primary" @click="toPage(1)">查询</el-button>
+          <el-button @click="onExport">导出</el-button>
+        </el-space>
+      </el-form-item>
+    </el-form>
+  </div>
+
+  <div class="part-box">
+    <el-table class="page-table" :data="dataList" :loading="loading">
+      <el-table-column property="subjectCode" label="科目代码" width="120" />
+      <el-table-column property="groupNo" label="分组序号" width="100" />
+      <el-table-column property="examCardNo" label="准考证号" width="150" />
+      <el-table-column property="secretNo" label="密号" width="120" />
+      <el-table-column property="marker" label="评卷员" width="120" />
+      <el-table-column property="totalScore" label="评卷总分" width="100" />
+      <el-table-column
+        property="giveScoreDetail"
+        label="给分明细"
+        min-width="200"
+        show-overflow-tooltip
+      />
+      <el-table-column
+        property="markingTime"
+        label="评卷时间"
+        width="180"
+        show-overflow-tooltip
+      />
+      <el-table-column label="操作" width="120" fixed="right">
+        <template #default="scope">
+          <el-button
+            type="primary"
+            size="small"
+            link
+            @click="onView(scope.row)"
+          >
+            查看
+          </el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    <el-pagination
+      v-model:current-page="pagination.pageNumber"
+      v-model:page-size="pagination.pageSize"
+      :layout="pagination.layout"
+      :total="pagination.total"
+      @size-change="pageSizeChange"
+      @current-change="toPage"
+    />
+  </div>
+</template>
+
+<script setup lang="ts">
+  import { reactive } from 'vue';
+  import { ElMessage } from 'element-plus';
+  import { getMarkTrialList } from '@/api/mark';
+  import { MarkTrialItem, MarkTrialListFilter } from '@/api/types/mark';
+  import useTable from '@/hooks/table';
+
+  defineOptions({
+    name: 'TrialManage',
+  });
+
+  const searchModel = reactive<MarkTrialListFilter>({
+    subject: null,
+    group: '',
+    examCardNo: '',
+    secretNo: '',
+  });
+
+  const { dataList, pagination, loading, toPage, pageSizeChange } =
+    useTable<MarkTrialItem>(getMarkTrialList, searchModel, false);
+
+  // 查看详情
+  function onView(row: MarkTrialItem) {
+    ElMessage.info(`查看试卷:${row.examCardNo}`);
+    // TODO: 实现查看试卷详情的逻辑
+  }
+
+  function onExport() {
+    // TODO: 导出试卷
+    ElMessage.info('导出试卷');
+  }
+</script>