刘洋 8 months ago
parent
commit
2998fcf064
2 changed files with 19 additions and 6 deletions
  1. 5 3
      src/components/upload-button/index.vue
  2. 14 3
      src/views/order/student-manage/index.vue

+ 5 - 3
src/components/upload-button/index.vue

@@ -19,14 +19,14 @@
     >
       <template #upload-button>
         <a-button type="primary" :disabled="loading">{{ btnText }}</a-button>
-        <a-button
+        <!-- <a-button
           v-if="!autoUpload"
           type="primary"
           :loading="loading"
           :disabled="!canUpload"
           @click.stop="startUpload"
           >开始上传</a-button
-        >
+        > -->
       </template>
     </a-upload>
   </div>
@@ -191,7 +191,9 @@
     justify-content: space-between;
     align-items: center;
     width: 100%;
-
+    .arco-upload-hide {
+      display: inline-block;
+    }
     .arco-input-wrapper {
       flex-grow: 2;
       margin-right: 10px;

+ 14 - 3
src/views/order/student-manage/index.vue

@@ -42,7 +42,7 @@
     </a-space>
   </div>
   <div class="part-box">
-    <a-space class="part-action" :size="12">
+    <a-space class="part-action" :size="24">
       <a-button
         type="primary"
         status="danger"
@@ -55,6 +55,7 @@
         upload-url="/api/admin/student/upload/photo"
         btn-text="上传照片"
         accept="image/*"
+        @upload-success="toPage(1)"
       ></upload-button>
     </a-space>
     <a-table
@@ -79,7 +80,9 @@
           @click="toCancel(record)"
           >取消</a-button
         > -->
-        <a-button v-if="record.photoPath" type="text">照片</a-button>
+        <a-button v-if="record.photoPath" type="text" @click="showImg(record)"
+          >照片</a-button
+        >
         <a-button
           class="btn-danger"
           type="text"
@@ -88,6 +91,7 @@
         >
       </template>
     </a-table>
+    <a-image-preview v-model:visible="imgVisible" :src="imgSrc" />
   </div>
 </template>
 
@@ -109,6 +113,13 @@
   defineOptions({
     name: 'StudentManage',
   });
+  const imgVisible = ref(false);
+  const imgSrc = ref('');
+  const showImg = (record: any) => {
+    imgSrc.value = record.photoPath;
+    imgVisible.value = true;
+  };
+
   const selectedKeys = ref([]);
 
   const rowSelection = reactive<TableRowSelection>({
@@ -196,7 +207,7 @@
   async function toDelete(ids: string[]) {
     const confirmRes = await modalConfirm(
       '提示',
-      `确定要删除${ids.length ? '选中的' : '这条'}预约吗?`
+      `确定要删除${ids.length ? '选中的' : '这条'}考生吗?`
     ).catch(() => false);
     if (confirmRes !== 'confirm') return;