Compare commits

..

No commits in common. "c4eb43769afd6ed1add8c88f8900288c4e9f1fe8" and "4da6835f404c9e423fba93ec82849031c702ea92" have entirely different histories.

3 changed files with 22 additions and 110 deletions

View File

@ -2,52 +2,6 @@ import { ComboModel } from "@/components/hTable/hTable";
import { http } from "@/utils/http"; import { http } from "@/utils/http";
import type { Res, ResPage } from "@/utils/http/types"; import type { Res, ResPage } from "@/utils/http/types";
import { Ref } from "vue"; import { Ref } from "vue";
/**
* @description
* @return {void}
*/
export function ImportTransferStudent(file) {
let formData = new FormData();
formData.append("file", file);
return http.request<Res<any>>(
"post",
`userCenter/back/users/importtransferstudent`,
{
data: formData
},
{
headers: {
"Content-Type": "application/x-www-form-urlencoded"
},
responseType: "blob"
}
);
}
/**
* @description 退
* @return {void}
*/
export function ImportStudentOut(file: any) {
let formData = new FormData();
formData.append("file", file);
return http.request<Res<any>>(
"post",
`userCenter/back/users/importstudentout`,
{
data: formData
},
{
headers: {
"Content-Type": "application/x-www-form-urlencoded"
},
responseType: "blob"
}
);
}
/** /**
* @description * @description
* @param {string} type type=StatusEnum * @param {string} type type=StatusEnum

View File

@ -24,7 +24,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item v-show="search.schoolId" :style="{ width: '145px' }"> <el-form-item v-show="search.schoolId" style="width: 145px">
<el-select <el-select
v-model="search.grade" v-model="search.grade"
placeholder="年级" placeholder="年级"
@ -41,7 +41,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item v-show="search.schoolId" :style="{ width: '100px' }"> <el-form-item v-show="search.schoolId" style="width: 100px">
<el-select v-model="search.classId" placeholder="班级" clearable filterable> <el-select v-model="search.classId" placeholder="班级" clearable filterable>
<el-option <el-option
v-for="item in classList" v-for="item in classList"
@ -63,35 +63,16 @@
</div> </div>
<div v-show="!selectUser" class="toolbar-container"> <div v-show="!selectUser" class="toolbar-container">
<!-- 按钮组 --> <!-- 按钮组 -->
<el-button-group style="padding-right: 1rem"> <el-button type="success" @click="importData(ImportStudent)">导入用户</el-button>
<el-button type="success" @click="importData(ImportStudent)">新增学生</el-button> <el-button type="default" @click="downLoadImportUsersTemplate"
<el-button type="primary" @click="importUpdateStudent">更新学生</el-button> >下载学生模板</el-button
<el-button >
title="模板" <!-- <el-button title="根据当前筛选条件导出" type="primary" @click="exportUser"
:icon="Tickets" >导出用户</el-button
type="default" > -->
@click="downLoadImportUsersTemplate" <el-button type="success" @click="importUpdateStudent"
>模板</el-button >使用Excel模板更新用户</el-button
> >
</el-button-group>
<el-button-group style="padding-right: 1rem">
<el-button type="success" @click="importData(ImportTransferStudent)"
>批量转班学生</el-button
>
<el-button title="模板" :icon="Tickets" type="default" @click="下载转班模板()"
>模板</el-button
>
</el-button-group>
<el-button-group>
<el-button type="success" @click="importData(ImportStudentOut)"
>批量退班</el-button
>
<el-button title="模板" :icon="Tickets" type="default" @click="下载退班模板()"
>模板</el-button
>
</el-button-group>
</div> </div>
<div v-show="!selectUser" class="toolbar-container"> <div v-show="!selectUser" class="toolbar-container">
<!-- 按钮组 --> <!-- 按钮组 -->
@ -100,9 +81,9 @@
<el-table <el-table
ref="selectUserTable" ref="selectUserTable"
:data="table.data" :data="table.data"
style="width: 100%"
:max-height="maxTableHeight" :max-height="maxTableHeight"
@row-dblclick="setCurrent" @row-dblclick="setCurrent"
:style="{ width: '100%' }"
@row-click="selectUserClick" @row-click="selectUserClick"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
> >
@ -170,7 +151,7 @@
<el-table-column prop="remark" label="备注" /> <el-table-column prop="remark" label="备注" />
</el-table> </el-table>
<el-pagination <el-pagination
:style="{ display: 'flex', justifyContent: 'center', paddingTop: '10px' }" style="display: flex; justify-content: center; padding-top: 10px"
:current-page="pagination.now" :current-page="pagination.now"
:page-sizes="[10, 20, 40, 80, 100]" :page-sizes="[10, 20, 40, 80, 100]"
:page-size="pagination.size" :page-size="pagination.size"
@ -197,7 +178,6 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ImportTransferStudent, ImportStudentOut } from "@/api/userCenter";
import { ref, reactive, onMounted } from "vue"; import { ref, reactive, onMounted } from "vue";
import { ElMessage, ElMessageBox } from "element-plus"; import { ElMessage, ElMessageBox } from "element-plus";
import type { UploadProps } from "element-plus"; import type { UploadProps } from "element-plus";
@ -221,7 +201,6 @@ import {
Message, Message,
ArrowDownBold, ArrowDownBold,
Search, Search,
Tickets,
Star, Star,
} from "@element-plus/icons-vue"; } from "@element-plus/icons-vue";
import { ComboModel, gradeComboModel } from "@/components/hTable/hTable"; import { ComboModel, gradeComboModel } from "@/components/hTable/hTable";
@ -762,22 +741,6 @@ const readerBlob = (data: Blob): Promise<any> => {
}; };
}); });
}; };
/**
* 退班模板
*/
const 下载退班模板 = () => {
let impUrl =
import.meta.env.VITE_API_USERCENTER_URL + "/back/users/dwstudentoutinfotemplate";
window.open(impUrl, "_blank");
};
/**
* 转班模板
*/
const 下载转班模板 = () => {
let impUrl =
import.meta.env.VITE_API_USERCENTER_URL + "/back/users/dwtransferuserinfotemplate";
window.open(impUrl, "_blank");
};
const downLoadImportUsersTemplate = () => { const downLoadImportUsersTemplate = () => {
let impUrl = import.meta.env.VITE_API_BASEURL + "/Student/DwImportTemplate"; let impUrl = import.meta.env.VITE_API_BASEURL + "/Student/DwImportTemplate";

View File

@ -109,17 +109,13 @@
</div> </div>
<div v-show="!selectUser" class="toolbar-container"> <div v-show="!selectUser" class="toolbar-container">
<!-- 按钮组 --> <!-- 按钮组 -->
<el-button type="success" @click="importData">导入用户</el-button>
<el-button-group style="padding-right: 1rem"> <el-button type="default" @click="downLoadImportUsersTemplate"
<el-button >下载导入用户模板</el-button
title="模板" >
:icon="Tickets" <!-- <el-button title="根据当前筛选条件导出" type="primary" @click="exportUser"
type="default" >导出用户</el-button
@click="downLoadImportUsersTemplate" > -->
>模板</el-button
>
<el-button type="success" @click="importData">导入用户</el-button>
</el-button-group>
</div> </div>
<div v-show="!selectUser" class="toolbar-container"> <div v-show="!selectUser" class="toolbar-container">
<!-- 按钮组 --> <!-- 按钮组 -->
@ -128,7 +124,7 @@
<el-table <el-table
ref="selectUserTable" ref="selectUserTable"
:data="table.data" :data="table.data"
:style="{ width: '100%' }" style="width: 100%"
:max-height="maxTableHeight" :max-height="maxTableHeight"
@row-dblclick="setCurrent" @row-dblclick="setCurrent"
@row-click="selectUserClick" @row-click="selectUserClick"
@ -251,7 +247,6 @@ import {
Message, Message,
ArrowDownBold, ArrowDownBold,
Search, Search,
Tickets,
Star, Star,
Phone, Phone,
} from "@element-plus/icons-vue"; } from "@element-plus/icons-vue";