Kaynağa Gözat

feat: 调试完成

zhangjie 1 yıl önce
ebeveyn
işleme
f022e12637

+ 12 - 3
src/assets/styles/arco-custom.less

@@ -10,6 +10,9 @@
   &:not(.arco-btn-only-icon) .arco-btn-icon {
     margin-right: 4px;
   }
+  &.arco-btn-disabled {
+    color: var(--color-text-gray-1) !important;
+  }
 }
 // .arco-pagination
 .arco-table-pagination {
@@ -84,7 +87,7 @@
     border-radius: 4px;
   }
   .arco-modal-header {
-    padding: 20px;
+    padding: 15px 20px;
     border-bottom: 1px solid var(--color-border);
     margin: 0;
     height: auto;
@@ -98,10 +101,10 @@
     height: 24px;
   }
   .arco-modal-body {
-    padding: 20px;
+    padding: 15px 20px;
   }
   .arco-modal-footer {
-    padding: 0 20px 20px;
+    padding: 0 20px 15px;
     margin: 0;
     border: none;
 
@@ -124,3 +127,9 @@
     text-align: right;
   }
 }
+.arco-modal-fullscreen {
+  border-radius: 0;
+  .arco-modal-body {
+    background-color: var(--color-background);
+  }
+}

+ 1 - 1
src/store/modules/app/index.ts

@@ -3,7 +3,7 @@ import { AppState } from './types';
 
 const useAppStore = defineStore('app', {
   state: (): AppState => ({
-    version: '1.0.0',
+    version: '1.0.1',
     domain: '',
     device: 'desktop',
     trackConfig: {

+ 7 - 3
src/views/base/track-export/index.vue

@@ -44,7 +44,7 @@
       </a-button>
       <a-button type="text" :disabled="loading" @click="toSet">
         <template #icon>
-          <svg-icon name="icon-add" />
+          <svg-icon name="icon-system" />
         </template>
         下载设置
       </a-button>
@@ -377,7 +377,9 @@
       paperNumber: row.paperNumber,
       schoolId: userStore.curSchoolInfo.id,
       trackConfig: JSON.stringify(appStore.trackConfig),
-      filterData: JSON.stringify(students.map((item) => item.studentId)),
+      filterData: JSON.stringify(
+        students.map((item) => `${item.studentName}(${item.studentCode})`)
+      ),
       status: 0,
     }).catch(() => {
       result = false;
@@ -436,8 +438,10 @@
   }
 
   // 详情
+  const indexDetailRef = ref();
   function toDetail(row: TrackExportItem) {
-    console.log(row);
+    curRow.value = row;
+    indexDetailRef.value?.open();
   }
 
   onMounted(() => {

+ 16 - 10
src/views/base/track-export/indexDetail.vue

@@ -48,15 +48,14 @@
           <a-input
             v-model.trim="searchModel.startStudentCode"
             placeholder="起始学号"
-            :style="{ width: '160px' }"
+            :style="{ width: '140px' }"
             allow-clear
           >
           </a-input>
-          <span class="mlr-1">-</span>
           <a-input
             v-model.trim="searchModel.endStudentCode"
             placeholder="终止学号"
-            :style="{ width: '160px' }"
+            :style="{ width: '140px' }"
             allow-clear
           >
           </a-input>
@@ -86,7 +85,7 @@
         <a-input-group>
           <a-input-number
             v-model.trim="searchModel.objectiveStartScore"
-            :style="{ width: '100px' }"
+            :style="{ width: '120px' }"
             placeholder="客观题最低总分"
             :step="0.01"
             :precision="2"
@@ -96,7 +95,7 @@
           />
           <a-input-number
             v-model.trim="searchModel.objectiveEndScore"
-            :style="{ width: '100px' }"
+            :style="{ width: '120px' }"
             placeholder="客观题最高总分"
             :step="0.01"
             :precision="2"
@@ -108,7 +107,7 @@
         <a-input-group>
           <a-input-number
             v-model.trim="searchModel.subjectiveStartScore"
-            :style="{ width: '100px' }"
+            :style="{ width: '120px' }"
             placeholder="主观题最低总分"
             :step="0.01"
             :precision="2"
@@ -118,7 +117,7 @@
           />
           <a-input-number
             v-model.trim="searchModel.subjectiveEndScore"
-            :style="{ width: '100px' }"
+            :style="{ width: '120px' }"
             placeholder="主观题最高总分"
             :step="0.01"
             :precision="2"
@@ -149,7 +148,7 @@
           @click="toDownloadSelection"
         >
           <template #icon>
-            <svg-icon name="icon-add" />
+            <svg-icon name="icon-import" />
           </template>
           批量下载选择数据
         </a-button>
@@ -166,6 +165,8 @@
           type: 'checkbox',
           showCheckedAll: true,
           onlyCurrent: false,
+          fixed: true,
+          width: 55,
         }"
         @selection-change="selectionChange"
       >
@@ -259,22 +260,27 @@
     {
       title: '姓名',
       dataIndex: 'studentName',
+      width: 120,
     },
     {
       title: '学号',
       dataIndex: 'studentCode',
+      width: 140,
     },
     {
       title: '院系',
       dataIndex: 'collegeName',
+      width: 140,
     },
     {
       title: '专业',
       dataIndex: 'majorName',
+      width: 140,
     },
     {
       title: '班级',
       dataIndex: 'className',
+      width: 140,
     },
     {
       title: '考试时间',
@@ -284,6 +290,7 @@
     {
       title: '课程(代码)',
       slotName: 'courseCode',
+      width: 240,
     },
     {
       title: '成绩',
@@ -293,7 +300,7 @@
     {
       title: '操作',
       slotName: 'action',
-      width: 80,
+      width: 70,
       fixed: 'right',
       cellClass: 'action-column',
     },
@@ -321,7 +328,6 @@
 
   function selectionChange(keys: (string | number)[]) {
     if (!dataList.value) return;
-    console.log(keys);
     multipleSelections.value = dataList.value.filter((item) =>
       keys.includes(item.studentId)
     );

+ 5 - 1
src/views/base/track-export/modifySet.vue

@@ -33,7 +33,9 @@
           @search="toSelectDir"
         >
         </a-input-search>
-        <a-checkbox v-model="formData.outputDirIsDefault"
+        <a-checkbox
+          v-model="formData.outputDirIsDefault"
+          :style="{ marginTop: '5px' }"
           >设为默认下载路径</a-checkbox
         >
       </a-form-item>
@@ -141,6 +143,8 @@
     if (result.canceled) return;
 
     formData.outputDir = result.filePaths[0];
+
+    formRef.value?.validateField('outputDir');
   }
 
   /* confirm */

+ 16 - 10
src/views/base/track-export/taskProgress.vue

@@ -3,7 +3,7 @@
     v-model:visible="visible"
     :width="500"
     title-align="start"
-    top="10vh"
+    top="20px"
     :align-center="false"
     :mask-closable="false"
     :esc-to-close="false"
@@ -18,8 +18,13 @@
       :align="{ label: 'right' }"
       :column="1"
     />
-    <a-collapse v-if="taskFilterInfo.length">
-      <a-collapse-item header="筛选条件">
+    <a-collapse
+      v-if="taskFilterInfo.length"
+      expand-icon-position="right"
+      style="margin: 8px 0"
+      :default-active-key="[1]"
+    >
+      <a-collapse-item :key="1" header="筛选条件">
         <a-descriptions
           :data="taskFilterInfo"
           title=""
@@ -106,7 +111,7 @@
       return;
     }
 
-    addSetTimeout(PROGRESS_KEY, updateProgress, 1 * 1000);
+    addSetTimeout(PROGRESS_KEY, updateProgress, 0.5 * 1000);
   }
 
   function getExportUrl() {
@@ -178,11 +183,12 @@
     updateProgress();
 
     // 开启导出进程
-    const appConfig = window.api.getConfigData({});
-    window.electron.startWinProcess(
-      appConfig.downloadProcessCount,
-      getExportUrl()
-    );
+    let downloadProcessCount = 1;
+    if (total.value >= 10) {
+      const appConfig = window.api.getConfigData({});
+      downloadProcessCount = appConfig.downloadProcessCount;
+    }
+    window.electron.startWinProcess(downloadProcessCount, getExportUrl());
   }
 
   function updateTaskFilerInfo(data: FilterDataType | null) {
@@ -192,7 +198,7 @@
     if (objTypeOf(data) === 'array') {
       taskFilterInfo.value = [
         {
-          value: (data as string[]).join(),
+          value: (data as string[]).join(','),
           label: '选择的学生',
         },
       ];