Browse Source

(*)导入接口请求

master
ww664853070 2 years ago
parent
commit
1fbf7acec4
  1. 8
      web/client/src/sections/humanAffairs/actions/personalTrainRecord.js
  2. 4
      web/client/src/sections/humanAffairs/containers/importPersonalTrainRecord.jsx
  3. 1
      web/client/src/utils/webapi.js

8
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: '导入个人培训记录' },
});
}

4
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();
}

1
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',

Loading…
Cancel
Save