|
@@ -5,6 +5,7 @@
|
|
class="w-3/4 xl:w-4/5"
|
|
class="w-3/4 xl:w-4/5"
|
|
@register="registerTable"
|
|
@register="registerTable"
|
|
:row-selection="{ selectedRowKeys: selectedKeys, onChange: onSelectChange }"
|
|
:row-selection="{ selectedRowKeys: selectedKeys, onChange: onSelectChange }"
|
|
|
|
+ :searchInfo="searchInfo"
|
|
>
|
|
>
|
|
<template #toolbar>
|
|
<template #toolbar>
|
|
<a-button type="primary" v-auth="'student:add'" @click="handleAdd">新增</a-button>
|
|
<a-button type="primary" v-auth="'student:add'" @click="handleAdd">新增</a-button>
|
|
@@ -16,15 +17,11 @@
|
|
<template #overlay>
|
|
<template #overlay>
|
|
<Menu>
|
|
<Menu>
|
|
<Menu.Item>
|
|
<Menu.Item>
|
|
- <a-button block type="link" @click="handelDownloadTemplate">
|
|
|
|
- 下载模板
|
|
|
|
- </a-button>
|
|
|
|
|
|
+ <a-button block type="link" @click="handelDownloadTemplate"> 下载模板 </a-button>
|
|
</Menu.Item>
|
|
</Menu.Item>
|
|
<Menu.Item>
|
|
<Menu.Item>
|
|
<Upload :showUploadList="false" :before-upload="beforeUpload">
|
|
<Upload :showUploadList="false" :before-upload="beforeUpload">
|
|
- <a-button block type="link">
|
|
|
|
- 导入
|
|
|
|
- </a-button>
|
|
|
|
|
|
+ <a-button block type="link"> 导入 </a-button>
|
|
</Upload>
|
|
</Upload>
|
|
</Menu.Item>
|
|
</Menu.Item>
|
|
</Menu>
|
|
</Menu>
|
|
@@ -36,9 +33,7 @@
|
|
:before-upload="handelBeforeUpload"
|
|
:before-upload="handelBeforeUpload"
|
|
accept=".rar,.zip"
|
|
accept=".rar,.zip"
|
|
>
|
|
>
|
|
- <a-button block type="primary">
|
|
|
|
- 导入学籍照
|
|
|
|
- </a-button>
|
|
|
|
|
|
+ <a-button block type="primary"> 导入学籍照 </a-button>
|
|
</Upload>
|
|
</Upload>
|
|
<ExportTool
|
|
<ExportTool
|
|
v-auth="'student:export'"
|
|
v-auth="'student:export'"
|
|
@@ -87,7 +82,7 @@
|
|
</PageWrapper>
|
|
</PageWrapper>
|
|
</template>
|
|
</template>
|
|
<script lang="ts" setup>
|
|
<script lang="ts" setup>
|
|
- import { computed, createVNode, onMounted, ref } from 'vue';
|
|
|
|
|
|
+ import { computed, createVNode, onMounted, reactive, ref } from 'vue';
|
|
|
|
|
|
import { Modal, Upload, Dropdown, Menu } from 'ant-design-vue';
|
|
import { Modal, Upload, Dropdown, Menu } from 'ant-design-vue';
|
|
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
|
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
|
@@ -103,7 +98,7 @@
|
|
import { columns, searchFormSchema } from './components/config';
|
|
import { columns, searchFormSchema } from './components/config';
|
|
|
|
|
|
import Icon from '/@/components/Icon/index';
|
|
import Icon from '/@/components/Icon/index';
|
|
- import ClassTree from '/@/views/educational/class/components/ClassTree.vue';
|
|
|
|
|
|
+ import ClassTree from '/@/views/educational/class/components/ClassGroup.vue';
|
|
import {
|
|
import {
|
|
postStudentmanagerAvatarImport,
|
|
postStudentmanagerAvatarImport,
|
|
postStudentmanagerImport,
|
|
postStudentmanagerImport,
|
|
@@ -114,8 +109,13 @@
|
|
import { useLoading } from '/@/components/Loading';
|
|
import { useLoading } from '/@/components/Loading';
|
|
|
|
|
|
const exportToolRef = ref<ElRef>(null);
|
|
const exportToolRef = ref<ElRef>(null);
|
|
|
|
+ const searchInfo = reactive<Recordable>({});
|
|
|
|
|
|
const handelExportClick = (type) => {
|
|
const handelExportClick = (type) => {
|
|
|
|
+ if (searchInfo.treeType !== 4) {
|
|
|
|
+ createMessage.warning('请选择班级');
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
const data: Recordable = {
|
|
const data: Recordable = {
|
|
conditions: [],
|
|
conditions: [],
|
|
ids: [],
|
|
ids: [],
|
|
@@ -125,7 +125,7 @@
|
|
for (const key in formData) {
|
|
for (const key in formData) {
|
|
data.conditions.push({ keyName: key, keyValue: formData[key], keyType: '1' });
|
|
data.conditions.push({ keyName: key, keyValue: formData[key], keyType: '1' });
|
|
}
|
|
}
|
|
- data.conditions.push({ keyName: 'classId', keyValue: classId.value, keyType: '1' });
|
|
|
|
|
|
+ data.conditions.push({ keyName: 'classId', keyValue: searchInfo.treeId, keyType: '1' });
|
|
} else {
|
|
} else {
|
|
const selectKeys = getSelectRowKeys();
|
|
const selectKeys = getSelectRowKeys();
|
|
if (selectKeys.length === 0) {
|
|
if (selectKeys.length === 0) {
|
|
@@ -138,7 +138,6 @@
|
|
exportToolRef.value?.open(data);
|
|
exportToolRef.value?.open(data);
|
|
};
|
|
};
|
|
|
|
|
|
- const classId = ref();
|
|
|
|
onMounted(async () => {});
|
|
onMounted(async () => {});
|
|
const { notification, createMessage } = useMessage();
|
|
const { notification, createMessage } = useMessage();
|
|
const { t } = useI18n();
|
|
const { t } = useI18n();
|
|
@@ -166,7 +165,6 @@
|
|
fieldMapToTime: [],
|
|
fieldMapToTime: [],
|
|
},
|
|
},
|
|
beforeFetch: (params) => {
|
|
beforeFetch: (params) => {
|
|
- params.classId = classId.value;
|
|
|
|
return { ...params, FormId: formIdComputedRef.value, PK: 'id' };
|
|
return { ...params, FormId: formIdComputedRef.value, PK: 'id' };
|
|
},
|
|
},
|
|
useSearchForm: true,
|
|
useSearchForm: true,
|
|
@@ -199,8 +197,9 @@
|
|
function handleDelete(record: Recordable) {
|
|
function handleDelete(record: Recordable) {
|
|
deleteList([record.id]);
|
|
deleteList([record.id]);
|
|
}
|
|
}
|
|
- const handleChange = (id) => {
|
|
|
|
- classId.value = id;
|
|
|
|
|
|
+ const handleChange = (data) => {
|
|
|
|
+ searchInfo.treeId = data.id;
|
|
|
|
+ searchInfo.treeType = data.type;
|
|
reload();
|
|
reload();
|
|
};
|
|
};
|
|
function deleteList(ids) {
|
|
function deleteList(ids) {
|
|
@@ -256,8 +255,7 @@
|
|
|
|
|
|
function handelDownloadTemplate() {
|
|
function handelDownloadTemplate() {
|
|
downloadByUrl({
|
|
downloadByUrl({
|
|
- url:
|
|
|
|
- 'https://zhxy.cqtlzjzx.com/minio/static/resources/%E5%AD%A6%E7%94%9F%E6%A8%A1%E6%9D%BF.xlsx',
|
|
|
|
|
|
+ url: 'https://zhxy.cqtlzjzx.com/minio/static/resources/%E5%AD%A6%E7%94%9F%E6%A8%A1%E6%9D%BF.xlsx',
|
|
fileName: '学生信息模板',
|
|
fileName: '学生信息模板',
|
|
});
|
|
});
|
|
}
|
|
}
|