模板导入报名

dev
Gitea 1 year ago
parent 0701107917
commit 71610cabbb
  1. 4
      jeecgboot-vue3-master/src/views/anncomgrotop/AnnComGroTop.api.ts
  2. 2
      jeecgboot-vue3-master/src/views/annualCompPoint/committee/AnnualCompPoint.api.ts
  3. 30
      jeecgboot-vue3-master/src/views/annualCompPoint/committee/AnnualCompPointList.vue

@ -5,12 +5,14 @@ const { createConfirm } = useMessage();
enum Api {
list = '/anncomgrotop/annComGroTop/list',
list1 = '/anncomgrotop/annComGroTop/list1',
save='/anncomgrotop/annComGroTop/add',
edit='/anncomgrotop/annComGroTop/edit',
deleteOne = '/anncomgrotop/annComGroTop/delete',
deleteBatch = '/anncomgrotop/annComGroTop/deleteBatch',
importExcel = '/anncomgrotop/annComGroTop/importExcel',
exportXls = '/anncomgrotop/annComGroTop/exportXls',
yzpf = '/anncomgrotop/annComGroTop/yzpf',
}
/**
@ -29,6 +31,8 @@ export const getImportUrl = Api.importExcel;
* @param params
*/
export const list = (params) => defHttp.get({ url: Api.list, params });
export const list1 = (params) => defHttp.get({ url: Api.list1, params });
export const yzpf = (params) => defHttp.get({ url: Api.yzpf, params }, { successMessageMode: 'none' });
/**
*

@ -11,6 +11,7 @@ enum Api {
deleteBatch = '/AnnualCompPoint/annualCompPoint/deleteBatch',
importExcel = '/AnnualCompPoint/annualCompPoint/importExcel',
exportXls = '/AnnualCompPoint/annualCompPoint/exportXls',
exportXlsMb = '/AnnualCompPoint/annualCompPoint/exportXlsMb',
updateApply = '/AnnualCompPoint/annualCompPoint/updateApply',
collectScore = '/annualScore/personalCompScore/collectScore',
pj = '/AnnualCompPoint/annualCompPoint/pj',
@ -22,6 +23,7 @@ enum Api {
* @param params
*/
export const getExportUrl = Api.exportXls;
export const getExportUrlMb = Api.exportXlsMb;
/**
* api

@ -17,8 +17,10 @@
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出
</a-button>
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">
导入
导入报名
</j-upload-button>
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXlsMb"> 导出报名的模版
</a-button>
<a-dropdown v-if="selectedRowKeys.length > 0">
<template #overlay>
<a-menu>
@ -67,12 +69,12 @@
list,
deleteOne,
batchDelete,
getImportUrl,
getExportUrl,
getExportUrlMb,
updateApply,
collectScore,
pj,
cjhz
cjhz,
} from './AnnualCompPoint.api';
import {downloadFile} from '/@/utils/common/renderUtils';
import AnnualCompPointModal from './components/AnnualCompPointModal.vue'
@ -82,12 +84,16 @@
import {router} from "/@/router";
import {useRouter} from "vue-router";
import {personalAbilityEvaluation} from "/@/views/awardpersion/AwardPersion.api";
import {useMessage} from "../../../hooks/web/useMessage";
import {useMethods} from "../../../hooks/system/useMethods";
const { handleImportXls } = useMethods();
const formRef = ref();
const queryParam = reactive<any>({});
const toggleSearchStatus = ref<boolean>(false);
const registerModal = ref();
const { createMessage } = useMessage();
//table
const {prefixCls, tableContext, onExportXls, onImportXls} = useListPage({
const {prefixCls, tableContext, onExportXls,onExportXlsMb} = useListPage({
tableProps: {
title: '年度比赛项目管理',
api: list,
@ -107,9 +113,10 @@
url: getExportUrl,
params: queryParam,
},
importConfig: {
url: getImportUrl,
success: handleSuccess
exportConfigMb: {
name: "报名模板",
url: getExportUrlMb,
params: null,
},
});
const [registerTable, {
@ -144,6 +151,15 @@
registerModal.value.edit(record);
}
function onImportXls(d) {
if(selectedRowKeys.value.length===1){
handleImportXls(d, '/AnnualCompPoint/annualCompPoint/importExcel?ndbsxmid='+selectedRowKeys.value[0],() => {
handleSuccess;
});
}else {
createMessage.warning("请选择一条数据进行导入报名");
}
}
/**
* 详情
*/

Loading…
Cancel
Save