Commit 0f98e4b0 by 孙香冬

no message

parent 5890a82a
...@@ -3,5 +3,6 @@ ...@@ -3,5 +3,6 @@
/out /out
/node_modules /node_modules
/test /test
/public
*test* *test*
*.log *.log
\ No newline at end of file
No preview for this file type
...@@ -54,7 +54,9 @@ export function getData(req, res) { ...@@ -54,7 +54,9 @@ export function getData(req, res) {
if (cjwName == A) dtDataList.push({name: A, x: B, y: C, type: D, fcsj: dataList}); if (cjwName == A) dtDataList.push({name: A, x: B, y: C, type: D, fcsj: dataList});
}) })
} }
else { else if (D == "重点合作企业"){
dtDataList.push({name: A, x: B, y: C, type: D, fcsj: A});
} else {
dtDataList.push({name: A, x: B, y: C, type: D, fcsj: A}); dtDataList.push({name: A, x: B, y: C, type: D, fcsj: A});
} }
}) })
......
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
...@@ -138,4 +138,30 @@ export function gaoQiaoTableData() { ...@@ -138,4 +138,30 @@ export function gaoQiaoTableData() {
let result = packageDataProcess(blockDataList, titltListConfig, keyValueOrTitleList, barChartList, stringList, decollatePlanarList); let result = packageDataProcess(blockDataList, titltListConfig, keyValueOrTitleList, barChartList, stringList, decollatePlanarList);
return result; return result;
}
export function tyjrTableData() {
let blockDataList = onceSheetBecomeOfblockData('退役求职信息.xlsx', '退役军人表格数据');
let keyValueOrTitleList = [];//适配 饼图 键值以及需要多个key的
let barChartList = []; //适配 柱状图 折线图
let stringList = [];
let decollatePlanarList =["求职人员详细信息"];//适配 表格
let titltListConfig = {};
let result = packageDataProcess(blockDataList, titltListConfig, keyValueOrTitleList, barChartList, stringList, decollatePlanarList);
return result;
}
export function tyjrPopTableData() {
let blockDataList = onceSheetBecomeOfblockData('退役求职信息.xlsx', '退役军人弹窗数据');
let keyValueOrTitleList = [];//适配 饼图 键值以及需要多个key的
let barChartList = []; //适配 柱状图 折线图
let stringList = [];
let decollatePlanarList =["退役军人详细数据"];//适配 表格
let titltListConfig = {};
let result = packageDataProcess(blockDataList, titltListConfig, keyValueOrTitleList, barChartList, stringList, decollatePlanarList);
return result;
} }
\ No newline at end of file
...@@ -9,6 +9,7 @@ import * as loginBiz from '../biz/admin'; ...@@ -9,6 +9,7 @@ import * as loginBiz from '../biz/admin';
import * as zcwjBiz from '../biz/policy'; import * as zcwjBiz from '../biz/policy';
import * as gqBiz from '../biz/gq'; import * as gqBiz from '../biz/gq';
import * as qwBiz from '../biz/qw'; import * as qwBiz from '../biz/qw';
import * as tyjrBiz from '../biz/tyjr';
export function setRouter(httpServer){ export function setRouter(httpServer){
httpServer.post('/jcsj', asyncHandler(jcsjBiz.getData)); httpServer.post('/jcsj', asyncHandler(jcsjBiz.getData));
...@@ -28,6 +29,9 @@ export function setRouter(httpServer){ ...@@ -28,6 +29,9 @@ export function setRouter(httpServer){
httpServer.post('/gq', asyncHandler(gqBiz.getData)); httpServer.post('/gq', asyncHandler(gqBiz.getData));
httpServer.get('/gq', asyncHandler(gqBiz.getData)); httpServer.get('/gq', asyncHandler(gqBiz.getData));
httpServer.post('/tyjr', asyncHandler(tyjrBiz.getData));
httpServer.get('/tyjr', asyncHandler(tyjrBiz.getData));
httpServer.post('/api/login', asyncHandler(loginBiz.login)); httpServer.post('/api/login', asyncHandler(loginBiz.login));
httpServer.post('/api/jcsjup', asyncHandler(excelBiz.jcsjExcelUp)); httpServer.post('/api/jcsjup', asyncHandler(excelBiz.jcsjExcelUp));
......
No preview for this file type
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