Commit 29a3f5c2 by chenjinjing

Merge branch 'master' of http://123.207.147.179:8888/node_server/sportsschoolserver

# Conflicts:
#	src/serverConfig.ts
parents 52dc96ea 0bc7f546
...@@ -34,7 +34,7 @@ export async function getData(req, res) { ...@@ -34,7 +34,7 @@ export async function getData(req, res) {
ret["jqbsgl"] = jqbsglInfo; ret["jqbsgl"] = jqbsglInfo;
let mid = 1; let mid = 1;
if (jqbsglInfo.list[0] && jqbsglInfo.list[0].mid ) mid = jqbsglInfo.list[0].mid; if (jqbsglInfo.list[0] && jqbsglInfo.list[0].mid ) mid = parseInt(`${jqbsglInfo.list[0].mid}`);
let bsjbxxInfo = await 比赛信息(mid); let bsjbxxInfo = await 比赛信息(mid);
ret["bsjbxx"] = bsjbxxInfo["基本信息"]; ret["bsjbxx"] = bsjbxxInfo["基本信息"];
ret["videourl"] = bsjbxxInfo["url"]; ret["videourl"] = bsjbxxInfo["url"];
...@@ -113,7 +113,8 @@ export async function get图表数据(req, res) { ...@@ -113,7 +113,8 @@ export async function get图表数据(req, res) {
async function 近期比赛概览(pid, inTime) { async function 近期比赛概览(pid, inTime) {
let time = inTime || new Date(); let today = new Date();
let time = inTime || `${today.getFullYear()}-${today.getMonth()+1}-${today.getDate()}`;
let {dataList, firstDate} = await get近期比赛概览(pid, time); let {dataList, firstDate} = await get近期比赛概览(pid, time);
return { return {
title:"近期比赛概览", title:"近期比赛概览",
......
...@@ -164,7 +164,13 @@ export function getScatterFigureOutData(title, data) { ...@@ -164,7 +164,13 @@ export function getScatterFigureOutData(title, data) {
return { title, xMax:xMaxMinInfo.maxNumber, xMin:xMaxMinInfo.minNumber, yMax:yMaxMinInfo.maxNumber, yMin:yMaxMinInfo.minNumber, dataList }; return { title, xMax:xMaxMinInfo.maxNumber, xMin:xMaxMinInfo.minNumber, yMax:yMaxMinInfo.maxNumber, yMin:yMaxMinInfo.minNumber, dataList };
} }
/**
*
* @param title 标题
* @param data 数据 格式 => {key:[str1,str2...,strN] }
*/
export function getKeyValueListData(title, data) {
}
...@@ -63,7 +63,7 @@ function checkUnit(checkString, data, allUnit?) { ...@@ -63,7 +63,7 @@ function checkUnit(checkString, data, allUnit?) {
export async function get近期比赛概览(PID, checkDate) { export async function get近期比赛概览(PID, checkDate) {
let sql = "select * from recent_match where self_pid = Placeholder1 and m_date <= Placeholder2"; let sql = "select * from recent_match where self_pid = Placeholder1 and m_date <= to_date(Placeholder2,'yyyy-MM-dd')";
let selectResult = await selectData(sql, PID, checkDate); let selectResult = await selectData(sql, PID, checkDate);
let result = []; let result = [];
let firstDate = ""; let firstDate = "";
......
...@@ -5,7 +5,7 @@ import pyfl from 'pyfl'; ...@@ -5,7 +5,7 @@ import pyfl from 'pyfl';
const percentStr = '&%'; const percentStr = '&%';
const sqlKeyValueConfig = { const sqlKeyValueConfig = {
"左上数据":{ "左上数据":{
sql:"select * from train_stu_and_video", sql:"select * from train_stu_and_video",
analysis:{ "训练学生数" : "TRAIN_STU_NUM", "训练学生数增幅" : "TRAIN_STU_VARY", "训练视频采集数": "TRAIN_VIDEO_NUM", "训练视频采集数增幅": "TRAIN_VIDEO_VARY" } analysis:{ "训练学生数" : "TRAIN_STU_NUM", "训练学生数增幅" : "TRAIN_STU_VARY", "训练视频采集数": "TRAIN_VIDEO_NUM", "训练视频采集数增幅": "TRAIN_VIDEO_VARY" }
}, },
"运动员年龄分布":{ "运动员年龄分布":{
......
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