Jelajahi Sumber

组卷作业人数为0时不弹窗

shmily1213 1 bulan lalu
induk
melakukan
32f50f8bc2

+ 3 - 2
src/pagesStudy/pages/study-exam-simulated-class/study-exam-simulated-class.vue

@@ -9,8 +9,8 @@
           <template #name="{ item }">
             <text class="font-bold">{{ item.name }}</text>
           </template>
-          <template #score="{ item }">
-            <text class="font-bold">{{ item.score }}</text>
+          <template #total="{ item }">
+            <text class="font-bold">{{ item.total }}</text>
           </template>
           <template #action="{ item }">
             <text class="text-30 text-primary font-bold" @click="handleRowClick(item)">查看</text>
@@ -44,6 +44,7 @@ const tableColumns: TableColumnConfig[] = [
     prop: 'total',
     label: '做卷数量',
     flex: 1,
+    slot: 'total'
   },
   {
     prop: 'action',

+ 4 - 0
src/pagesStudy/pages/study-history/components/exam-history-paperwork.vue

@@ -167,6 +167,10 @@ const getStatusText = (status: number | null) => {
 
 const popupRef = ref();
 const handleRowClick = async (row: Study.PaperWorkRecord) => {
+  if (!row.count) {
+    uni.$ie.showToast('暂无数据');
+    return;
+  }
   uni.$ie.showLoading();
   try {
     const params = {