Commit 7326cccd by 孙香冬

no message

parent 0ac7e5de
......@@ -3,5 +3,6 @@
/out
/node_modules
/test
/public
*test*
*.log
\ No newline at end of file
import { tyjrPopTableData, tyjrTableData } from "../data/table/jcsjData";
import { tablePackage } from "../dataPackage/inFrontOut";
// 退役军人
export function getData(req, res) {
let excelData = tyjrTableData();
let popExcelData = tyjrPopTableData();
let ret:any = {};
let tyjrPopBodyList = popExcelData['退役军人详细数据'].bodyList;
let tyjrPopHeaderList = popExcelData['退役军人详细数据'].headerList[0];
let tyjrPopDataList = [];
for (let i = 0; i < tyjrPopBodyList.length; i++) {
let a = {};
for (let x = 0; x < tyjrPopBodyList[i].length; x++) {
a[tyjrPopHeaderList[x]] = tyjrPopBodyList[i][x];
}
tyjrPopDataList.push(a);
}
for (let i = 0; i < tyjrPopDataList.length; i++) {
let tyjrInfo = tyjrPopDataList[i];
//浮窗数据
let fcsjPackageData = [];
//基本信息
let jbxxPackageData = [];
//图片
let imgPackageData = [];
//服务资源
let fwzyPackageData = [];
for (let key in tyjrInfo) {
switch (key) {
case "退役军人总数":
case "非劳动年龄人数":
case "求职人数":
jbxxPackageData.push({name: key, value: tyjrInfo[key], unit: ""});
break;
case "图片":
imgPackageData.push({name: key, value: tyjrInfo[key], unit: ""});
break;
case "家门口服务站":
fwzyPackageData.push({name: key, value: tyjrInfo[key], unit: ""});
break;
}
ret['jbxx'] = {title: '基本信息', dataList: jbxxPackageData};
ret['tp'] = {title: '图片', dataList: imgPackageData};
ret['fwzy'] = {title: '服务资源', dataList: fwzyPackageData};
}
}
let tyjrData = tablePackage(excelData['求职人员详细信息'].headerList[0], excelData['求职人员详细信息'].bodyList);
let titleList = [];
let tyjrDataList = [];
let index = 1;
tyjrData.dataList.forEach( info => {
let {A, B, C, D, E, F, G} = info;
titleList = ["序号", "姓名", "性别", "身份证号", "年龄", "政治面貌", "户籍地详细地址", "目前状态"];
tyjrDataList.push([index, A, B, C, D, E, F, G]);
index++;
})
ret['tyjr'] = {name: '求职人员详细信息', titleList, dataList: tyjrDataList};
res.send(ret);
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment