DBSD_ZJPT/jeecgboot-vue3/src/views/tjbbVue/TjbbList.vue

241 lines
9.1 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<div class="p-2">
<!--查询区域-->
<div class="jeecg-basic-table-form-container">
<a-spin :spinning="spinning">
<a-row :gutter="24">
<a-col :span="12">
<a-row>
<a-col>
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls141">导入表1-4-1专业基本情况数据</j-upload-button>
</a-col>
<a-col style="margin-top: 10px;">
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls151">导入表1-5-1教职工基本信息数据</j-upload-button>
</a-col>
<a-col style="margin-top: 10px;">
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls152">导入表1-5-2教职工其他信息数据</j-upload-button>
</a-col>
<a-col style="margin-top: 10px;">
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls153">导入表1-5-3外聘和兼职教师基本信息数据</j-upload-button>
</a-col>
<a-col style="margin-top: 10px;">
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls16">导入表1-6本科生基本情况数据</j-upload-button>
</a-col>
<a-col style="margin-top: 10px;">
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls24">导入表2-4校内外实习实践实训基地数据</j-upload-button>
</a-col>
<a-col style="margin-top: 10px;">
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXlssf3">导入表SF-3师范-3师范类专业办学基本条件数据</j-upload-button>
</a-col>
<a-col style="margin-top: 10px;">
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXlssf5">导入表SF-5师范-5师范类专业培养情况数据</j-upload-button>
</a-col>
<a-col style="margin-top: 10px;">
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXlssf6">导入表SF-6师范-6教师教育课程情况表数据</j-upload-button>
</a-col>
<a-col style="margin-top: 10px;">
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXlssf8">导入表SF-8师范-8教育实践情况数据</j-upload-button>
</a-col>
<a-col style="margin-top: 10px;">
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXlssf9">导入表SF-9师范-9师范类专业非本科学生数量基本情况数据</j-upload-button>
</a-col>
<a-col style="margin-top: 10px;">
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXlssf11">导入表SF-11师范-11师范类专业应届毕业生情况数据</j-upload-button>
</a-col>
</a-row>
</a-col>
<a-col :span="12">
<a-row>
<a-col>
<a-row>
<a-col style="margin-top: 10px;">
表1-4-1专业基本情况数据:{{dataList.t141}}
</a-col>
<a-col style="margin-top: 10px;">
表1-5-1教职工基本信息数据:{{dataList.t151}}
</a-col>
<a-col style="margin-top: 10px;">
表1-5-2教职工其他信息数据:{{dataList.t152}}
</a-col>
<a-col style="margin-top: 10px;">
表1-5-3外聘和兼职教师基本信息数据:{{dataList.t153}}
</a-col>
<a-col style="margin-top: 10px;">
表1-6本科生基本情况数据:{{dataList.t16}}
</a-col>
<a-col style="margin-top: 10px;">
表2-4校内外实习实践实训基地数据:{{dataList.t24}}
</a-col>
<a-col style="margin-top: 10px;">
表SF-3师范-3 {{dataList.tsf3}}
</a-col>
<a-col style="margin-top: 10px;">
表SF-5师范-5 {{dataList.tsf5}}
</a-col>
<a-col style="margin-top: 10px;">
表SF-6师范-6 {{dataList.tsf6}}
</a-col>
<a-col style="margin-top: 10px;">
表SF-8师范-8 {{dataList.tsf8}}
</a-col>
<a-col style="margin-top: 10px;">
表SF-9师范-9 {{dataList.tsf9}}
</a-col>
<a-col style="margin-top: 10px;">
表SF-11师范-11 {{dataList.tsf11}}
</a-col>
</a-row>
</a-col>
<a-col>
<a-button @click="deleteAll">删除全部数据</a-button>
</a-col>
<a-col style="margin-top: 10px;">
<a-button @click="handleScsj">生成数据</a-button>
</a-col>
</a-row>
</a-col>
</a-row>
</a-spin>
</div>
<!--引用表格-->
</div>
</template>
<script lang="ts" name="tjbbSf11-tjbbSf11" setup>
import { ref, onMounted } from 'vue';
import JUploadButton from '/@/components/Button/src/JUploadButton.vue';
import { useMethods } from '/@/hooks/system/useMethods';
import { useMessage } from '/@/hooks/web/useMessage';
import { defHttp } from '/@/utils/http/axios';
const { handleExportXls, handleImportXls } = useMethods();
const spinning = ref<boolean>(false);
const dataList = ref<any>([]);
const { createMessage } = useMessage();
function onImportXls141(file) {
spinning.value = true;
let realUrl = "/tjbb141/tjbb_141/importExcel";
return handleImportXls(file, realUrl, success);
}
function onImportXls151(file) {
spinning.value = true;
let realUrl = "/tjbb151/tjbb_151/importExcel";
return handleImportXls(file, realUrl, success);
}
function onImportXls152(file) {
spinning.value = true;
let realUrl = "/tjbb152/tjbb_152/importExcel";
return handleImportXls(file, realUrl, success);
}
function onImportXls153(file) {
spinning.value = true;
let realUrl = "/tjbb153/tjbb_153/importExcel";
return handleImportXls(file, realUrl, success);
}
function onImportXls16(file) {
spinning.value = true;
let realUrl = "/tjbb16/tjbb_16/importExcel";
return handleImportXls(file, realUrl, success);
}
function onImportXls24(file) {
spinning.value = true;
let realUrl = "/tjbb24/tjbb_24/importExcel";
return handleImportXls(file, realUrl, success);
}
function onImportXlssf3(file) {
spinning.value = true;
let realUrl = "/tjbbSf3/tjbbSf3/importExcel";
return handleImportXls(file, realUrl, success);
}
function onImportXlssf5(file) {
spinning.value = true;
let realUrl = "/tjbbSf5/tjbbSf5/importExcel";
return handleImportXls(file, realUrl, success);
}
function onImportXlssf6(file) {
spinning.value = true;
let realUrl = "/tjbbSf6/tjbbSf6/importExcel";
return handleImportXls(file, realUrl, success);
}
function onImportXlssf8(file) {
spinning.value = true;
let realUrl = "/tjbbSf8/tjbbSf8/importExcel";
return handleImportXls(file, realUrl, success);
}
function onImportXlssf9(file) {
spinning.value = true;
let realUrl = "/tjbbSf9/tjbbSf9/importExcel";
return handleImportXls(file, realUrl, success);
}
function onImportXlssf11(file) {
spinning.value = true;
let realUrl = "/tjbbSf11/tjbbSf11/importExcel";
return handleImportXls(file, realUrl, success);
}
//操作成功
function success(){
spinning.value = false;
getAllData();
}
//获取数据情况
function getAllData(){
defHttp.get({url:'/tjbb/tjbb/list'}).then(res=>{
console.log("🚀 ~ defHttp.get ~ res:", res)
dataList.value = res;
})
}
//删除全部数据
function deleteAll(){
defHttp.delete({url:'/tjbb/tjbb/delete'}).then(res=>{
getAllData();
})
}
//生成文件
function handleScsj(){
var name = "文件名称";
var url = "/tjbb/tjbb/exportXls";
handleExportXls(name,url);
}
onMounted(() => {
getAllData();
});
</script>
<style lang="less" scoped>
.jeecg-basic-table-form-container {
padding: 0;
.table-page-search-submitButtons {
display: block;
margin-bottom: 24px;
white-space: nowrap;
}
.query-group-cust{
min-width: 100px !important;
}
.query-group-split-cust{
width: 30px;
display: inline-block;
text-align: center
}
.ant-form-item:not(.ant-form-item-with-help){
margin-bottom: 16px;
height: 32px;
}
:deep(.ant-picker),:deep(.ant-input-number){
width: 100%;
}
}
</style>