Commit fac1c0bc by chenjinjing
parents 3c82d295 9741af15
......@@ -185,19 +185,32 @@ export async function get图表(mid, rid, gid) {
}
export async function get散点图(mid, rid, gid) {
let sql = "select * from attack_point where m_id = Placeholder1 and r_id = Placeholder2 and g_id = Placeholder3";
let attack_sql = "select * from attack_point where m_id = Placeholder1 and r_id = Placeholder2 and g_id = Placeholder3";
let defense_sql = "select * from defense_point where m_id = Placeholder1 and r_id = Placeholder2 and g_id = Placeholder3";
let selectResult = await selectData(sql, mid, rid, gid);
let selectResult = await selectData(attack_sql, mid, rid, gid);
let defenseResult = await selectData(defense_sql, mid, rid, gid);
let result = [];
selectResult.forEach(info => {
result.push({
type:1,
time:info.M_TIME,
x:info.X,
y:info.Y
});
});
defenseResult.forEach(info => {
result.push({
type:2,
time:info.M_TIME,
x:info.X,
y:info.Y
});
});
result.sort( (a, b) => {return a.time - b.time});
return result;
}
......
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