Pārlūkot izejas kodu

paper records structure changed

abpcoder 2 nedēļas atpakaļ
vecāks
revīzija
69b88716d0

+ 4 - 4
back-ui/src/api/dz/papers.js

@@ -179,10 +179,10 @@ export function getPaperList(query) {
         code: 200,
         total: 4,
         rows: [
-            {id: 1, name: '试卷名称', classId: 1, className: '2501班', total: 50, unexact: 10, exact: 40, unsend: 10, send: 20, unfinish: 5, finish: 15},
-            {id: 2, name: '试卷名称', classId: 2, className: '2502班', total: 50, unexact: 10, exact: 40, unsend: 10, send: 20, unfinish: 5, finish: 15},
-            {id: 3, name: '试卷名称', classId: 3, className: '2503班', total: 50, unexact: 10, exact: 40, unsend: 10, send: 20, unfinish: 5, finish: 15},
-            {id: 4, name: '试卷名称', classId: 4, className: '2504班', total: 50, unexact: 10, exact: 40, unsend: 10, send: 20, unfinish: 5, finish: 15},
+            {id: 1, buildType: '定向智能', classId: 1, className: '2501班', batchName: '第一批', total: 50, unexact: 10, exact: 40, unsend: 10, send: 20, unfinish: 5, finish: 15},
+            {id: 2, buildType: '定向智能', classId: 2, className: '2502班', batchName: '第一批', total: 50, unexact: 10, exact: 40, unsend: 10, send: 20, unfinish: 5, finish: 15},
+            {id: 3, buildType: '定向智能', classId: 3, className: '2503班', batchName: '第一批', total: 50, unexact: 10, exact: 40, unsend: 10, send: 20, unfinish: 5, finish: 15},
+            {id: 4, buildType: '定向智能', classId: 4, className: '2504班', batchName: '第一批', total: 50, unexact: 10, exact: 40, unsend: 10, send: 20, unfinish: 5, finish: 15},
         ]
     })
     return request({

+ 4 - 9
back-ui/src/views/dz/papers/components/list-exact-intelligent.vue

@@ -1,9 +1,5 @@
 <template>
     <el-form ref="queryRef" :model="queryParams" :rules="rules" label-width="68px" inline>
-        <el-form-item label="试卷名称" prop="name">
-            <el-input v-model="queryParams.name" clearable @keydown.enter="handleQuery" @clear="handleQuery"
-                      style="width: 172px"/>
-        </el-form-item>
         <el-form-item label="批次" prop="batchId">
             <el-select v-model="queryParams.batchId" clearable @change="handleQuery" style="width: 172px">
                 <el-option v-for="b in batchList" :label="b.name" :value="b.batchId"/>
@@ -25,8 +21,8 @@
         </el-form-item>
     </el-form>
     <Table :data="list" :columns="columns" :actions="actions" @get-list="getList" @action="handleAction" />
-    <el-drawer v-model="drawer" title="班级详情" size="50%">
-        <class-detail v-if="drawer" :state="queryParams.state" />
+    <el-drawer v-model="drawer" title="班级详情" size="1000px">
+        <class-detail v-if="drawer" :state="queryParams.state" exact-mode />
     </el-drawer>
 </template>
 
@@ -40,8 +36,8 @@ import ClassDetail from "@/views/dz/papers/components/plugs/class-detail.vue";
 
 const options = {
     queryDefine: {
-        name: '',
         batchId: '',
+        classId: '',
         state: ''
     }
 }
@@ -50,8 +46,7 @@ const columns = [
     {label: '班级', prop: 'className'},
     {label: '批次', prop: 'batchName'},
     {label: '班级人数', prop: 'total'},
-    ...consts.config.exactColumns,
-    {label: '试卷名称', prop: 'name'}
+    ...consts.config.exactColumns
 ]
 const actions = [
     {label: '查看详情', key: 'detail', permission: ['']}

+ 26 - 12
back-ui/src/views/dz/papers/components/plugs/class-detail.vue

@@ -9,13 +9,19 @@
             <el-button type="primary" @click="handleQuery">查询</el-button>
         </el-form-item>
     </el-form>
-    <Table :data="list" :columns="columns" :actions="actions" @action="handleAction"/>
+    <Table :data="list" :columns="columns" :actions="actions" @action="handleAction">
+        <template #rate="{row}">
+            <el-text v-if="[undefined, null].includes(row.rate)">-</el-text>
+            <el-text :type="row.rate>90?'success':row.rate>75?'primary':'danger'">{{row.rate}}%</el-text>
+        </template>
+    </Table>
     <el-dialog v-model="dialog" title="做题情况" show-close>
         <student-detail v-if="dialog" :id="1" />
     </el-dialog>
 </template>
 
 <script setup name="ClassDetail">
+
 import consts from "@/utils/consts.js";
 import Table from "@/components/Table/index.vue";
 import StudentDetail from "@/views/dz/papers/components/plugs/student-detail.vue";
@@ -41,8 +47,9 @@ const columns = [
     {label: '姓名', prop: 'studentName'},
     {label: '班级', prop: 'className'},
     {label: '考试批次', prop: 'batchName'},
+    {label: '试卷名称', prop: 'paperName'},
     {label: '发送情况', prop: 'state'},
-    {label: '得分率', prop: 'rate'},
+    {label: '得分率', prop: 'rate', type: 'slot', slotName: 'rate'},
     {label: '手机号', prop: 'mobile', minWidth: 120}
 ]
 const actions = [
@@ -57,40 +64,45 @@ const getList = async function() {
         mobile: '13933445566',
         batchId: 1,
         batchName: '第一批',
+        paperName: '试卷一',
         state: '',
-        rate: '80%',
+        rate: 99,
     },{
         studentId: 1,
         studentName: '张三',
         mobile: '13933445566',
         batchId: 1,
         batchName: '第一批',
+        paperName: '试卷一',
         state: '',
-        rate: '80%',
+        rate: 80,
     },{
         studentId: 1,
         studentName: '张三',
         mobile: '13933445566',
         batchId: 1,
         batchName: '第一批',
+        paperName: '试卷一',
         state: '',
-        rate: '80%',
+        rate: 60,
     },{
         studentId: 1,
         studentName: '张三',
         mobile: '13933445566',
         batchId: 1,
         batchName: '第一批',
+        paperName: '试卷一',
         state: '',
-        rate: '80%',
+        rate: 55,
     },{
         studentId: 1,
         studentName: '张三',
         mobile: '13933445566',
         batchId: 1,
         batchName: '第一批',
+        paperName: '试卷一',
         state: '',
-        rate: '80%',
+        rate: 85,
     },{
         studentId: 1,
         studentName: '张三',
@@ -98,15 +110,16 @@ const getList = async function() {
         batchId: 1,
         batchName: '第一批',
         state: '',
-        rate: '80%',
+        rate: 81,
     },{
         studentId: 1,
         studentName: '张三',
         mobile: '13933445566',
         batchId: 1,
         batchName: '第一批',
+        paperName: '试卷一',
         state: '',
-        rate: '80%',
+        rate: 81,
     },{
         studentId: 1,
         studentName: '张三',
@@ -114,7 +127,7 @@ const getList = async function() {
         batchId: 1,
         batchName: '第一批',
         state: '',
-        rate: '80%',
+        rate: 81,
     },{
         studentId: 1,
         studentName: '张三',
@@ -122,15 +135,16 @@ const getList = async function() {
         batchId: 1,
         batchName: '第一批',
         state: '',
-        rate: '80%',
+        rate: 94,
     },{
         studentId: 1,
         studentName: '张三',
         mobile: '13933445566',
         batchId: 1,
         batchName: '第一批',
+        paperName: '试卷一',
         state: '',
-        rate: '80%',
+        rate: 90,
     },]
 }