From 1fbf7acec4f54eab336fddd58366189c38030a03 Mon Sep 17 00:00:00 2001 From: ww664853070 Date: Tue, 20 Dec 2022 09:59:08 +0800 Subject: [PATCH] =?UTF-8?q?(*)=E5=AF=BC=E5=85=A5=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E8=AF=B7=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sections/humanAffairs/actions/personalTrainRecord.js | 8 ++++---- .../humanAffairs/containers/importPersonalTrainRecord.jsx | 4 ++-- web/client/src/utils/webapi.js | 1 + 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/web/client/src/sections/humanAffairs/actions/personalTrainRecord.js b/web/client/src/sections/humanAffairs/actions/personalTrainRecord.js index 277df99..d43fa83 100644 --- a/web/client/src/sections/humanAffairs/actions/personalTrainRecord.js +++ b/web/client/src/sections/humanAffairs/actions/personalTrainRecord.js @@ -2,14 +2,14 @@ import { ApiTable, basicAction } from '$utils' -export function personalTrainRecordAll(values) { +export function postAllPersonalTrainRecord(values) { return dispatch => basicAction({ type: 'post', dispatch: dispatch, - actionType: 'SALES_MEMBER_BULK_ADD', - url: ApiTable.addSalesMemberBulk, + actionType: 'POST_PERSONAL_TRAIN_RECORD_ALL', + url: ApiTable.postAllPersonalTrainRecord, data: values, - msg: { option: '导入销售人员信息' }, + msg: { option: '导入个人培训记录' }, }); } diff --git a/web/client/src/sections/humanAffairs/containers/importPersonalTrainRecord.jsx b/web/client/src/sections/humanAffairs/containers/importPersonalTrainRecord.jsx index fa56b25..49e0a78 100644 --- a/web/client/src/sections/humanAffairs/containers/importPersonalTrainRecord.jsx +++ b/web/client/src/sections/humanAffairs/containers/importPersonalTrainRecord.jsx @@ -39,12 +39,12 @@ const ImportPerformanceSummaryModal = props => { head = head.join(',') + "\n"; //数据 //let data = 1 + ',' + 2 + ',' + 3 + ',' + 4 + ',' + 5 - let templateCsv = "data:text/csv;charset=utf-8,\ufeff" + head; + let templateCsv = "data:text/xlsx;charset=utf-8,\ufeff" + head; //创建一个a标签 let link = document.createElement("a"); //为a标签设置属性 link.setAttribute("href", templateCsv); - link.setAttribute("download", "个人培训记录表模板.csv"); + link.setAttribute("download", "个人培训记录表模板.xlsx"); //点击a标签 link.click(); } diff --git a/web/client/src/utils/webapi.js b/web/client/src/utils/webapi.js index 7a8be15..fc60db4 100644 --- a/web/client/src/utils/webapi.js +++ b/web/client/src/utils/webapi.js @@ -46,6 +46,7 @@ export const ApiTable = { //个人培训记录 getPersonalTrainRecord: 'personal/train/record/list', + postAllPersonalTrainRecord: 'personal/train/record/list', //-培训资料库 getResourceClassify: 'train/trainFiles/resourceRepository/classify',