|
@@ -161,12 +161,25 @@
|
|
</el-input-number>
|
|
</el-input-number>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
|
|
+ <el-divider class="form-divider" />
|
|
<div class="part-action box-justify">
|
|
<div class="part-action box-justify">
|
|
<el-space wrap>
|
|
<el-space wrap>
|
|
<el-button type="primary" @click="toPage(1)">查询</el-button>
|
|
<el-button type="primary" @click="toPage(1)">查询</el-button>
|
|
<el-button @click="onAdd">添加</el-button>
|
|
<el-button @click="onAdd">添加</el-button>
|
|
<el-button type="success" @click="onImport">导入</el-button>
|
|
<el-button type="success" @click="onImport">导入</el-button>
|
|
- <el-button @click="exportData">导出</el-button>
|
|
|
|
|
|
+ <el-dropdown @command="onImportCommand">
|
|
|
|
+ <el-button type="primary">
|
|
|
|
+ 导入
|
|
|
|
+ <el-icon class="el-icon--right"><ArrowDown /> </el-icon>
|
|
|
|
+ </el-button>
|
|
|
|
+ <template #dropdown>
|
|
|
|
+ <el-dropdown-menu>
|
|
|
|
+ <el-dropdown-item command="breaking">违纪名单</el-dropdown-item>
|
|
|
|
+ <el-dropdown-item command="miss">缺考名单</el-dropdown-item>
|
|
|
|
+ </el-dropdown-menu>
|
|
|
|
+ </template>
|
|
|
|
+ </el-dropdown>
|
|
|
|
+ <el-button @click="exportData">导入名单</el-button>
|
|
</el-space>
|
|
</el-space>
|
|
|
|
|
|
<table-field v-model="headFields" :fields="tableFields"></table-field>
|
|
<table-field v-model="headFields" :fields="tableFields"></table-field>
|
|
@@ -232,7 +245,7 @@
|
|
<el-table-column
|
|
<el-table-column
|
|
v-if="checkFieldVisible('scanRecognition')"
|
|
v-if="checkFieldVisible('scanRecognition')"
|
|
label="扫描识别"
|
|
label="扫描识别"
|
|
- width="80"
|
|
|
|
|
|
+ width="100"
|
|
>
|
|
>
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
<el-tag :type="scope.row.scanRecognition ? 'success' : 'danger'">
|
|
<el-tag :type="scope.row.scanRecognition ? 'success' : 'danger'">
|
|
@@ -252,12 +265,12 @@
|
|
v-if="checkFieldVisible('scanPages')"
|
|
v-if="checkFieldVisible('scanPages')"
|
|
property="scanPages"
|
|
property="scanPages"
|
|
label="扫描张数"
|
|
label="扫描张数"
|
|
- width="80"
|
|
|
|
|
|
+ width="100"
|
|
/>
|
|
/>
|
|
<el-table-column
|
|
<el-table-column
|
|
v-if="checkFieldVisible('manualAssign')"
|
|
v-if="checkFieldVisible('manualAssign')"
|
|
label="人工指定"
|
|
label="人工指定"
|
|
- width="80"
|
|
|
|
|
|
+ width="100"
|
|
>
|
|
>
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
<el-tag :type="scope.row.manualAssign ? 'success' : 'danger'">
|
|
<el-tag :type="scope.row.manualAssign ? 'success' : 'danger'">
|
|
@@ -342,6 +355,16 @@
|
|
download-filename="学生导入模板.xlsx"
|
|
download-filename="学生导入模板.xlsx"
|
|
/>
|
|
/>
|
|
|
|
|
|
|
|
+ <!-- 导入名单 -->
|
|
|
|
+ <ImportDialog
|
|
|
|
+ ref="importUserDialogRef"
|
|
|
|
+ :title="importConfig?.title"
|
|
|
|
+ :upload-url="importConfig?.url"
|
|
|
|
+ :format="importConfig?.format"
|
|
|
|
+ :download-handle="downloadTemplate"
|
|
|
|
+ :download-filename="importConfig?.donloadFilename"
|
|
|
|
+ />
|
|
|
|
+
|
|
<!-- 查看图片 -->
|
|
<!-- 查看图片 -->
|
|
<el-image-viewer
|
|
<el-image-viewer
|
|
v-if="showPreview"
|
|
v-if="showPreview"
|
|
@@ -352,7 +375,8 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
- import { reactive, ref } from 'vue';
|
|
|
|
|
|
+ import { reactive, ref, computed } from 'vue';
|
|
|
|
+ import { ArrowDown } from '@element-plus/icons-vue';
|
|
import { getStudentList } from '@/api/student';
|
|
import { getStudentList } from '@/api/student';
|
|
import { StudentItem, StudentListFilter } from '@/api/types/student';
|
|
import { StudentItem, StudentListFilter } from '@/api/types/student';
|
|
import useTable from '@/hooks/table';
|
|
import useTable from '@/hooks/table';
|
|
@@ -442,6 +466,39 @@
|
|
importDialogRef.value?.open();
|
|
importDialogRef.value?.open();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ // 导入名单
|
|
|
|
+ const impoartConfigList = ref([
|
|
|
|
+ {
|
|
|
|
+ code: 'breaking',
|
|
|
|
+ title: '缺考名单',
|
|
|
|
+ url: '/api/admin/subject/import/kgt',
|
|
|
|
+ format: ['xls', 'xlsx'],
|
|
|
|
+ donloadFilename: '缺考名单导入模板.xlsx',
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ code: 'miss',
|
|
|
|
+ title: '违纪名单',
|
|
|
|
+ url: '/api/admin/subject/import/kgt',
|
|
|
|
+ format: ['xls', 'xlsx'],
|
|
|
|
+ donloadFilename: '违纪名单导入模板.xlsx',
|
|
|
|
+ },
|
|
|
|
+ ]);
|
|
|
|
+ const importUserDialogRef = ref();
|
|
|
|
+ const importData = reactive({
|
|
|
|
+ importType: 'breaking',
|
|
|
|
+ });
|
|
|
|
+ const importConfig = computed(() => {
|
|
|
|
+ return impoartConfigList.value.find(
|
|
|
|
+ (item) => item.code === importData.importType
|
|
|
|
+ );
|
|
|
|
+ });
|
|
|
|
+ const onImportCommand = (command: string) => {
|
|
|
|
+ console.log('导入命令:', command);
|
|
|
|
+ importData.importType = command;
|
|
|
|
+ importUserDialogRef.value?.open();
|
|
|
|
+ };
|
|
|
|
+
|
|
|
|
+ // 导出
|
|
function exportData() {
|
|
function exportData() {
|
|
// TODO: 实现导出功能
|
|
// TODO: 实现导出功能
|
|
}
|
|
}
|