Commit 8e68d04c authored by Patrick's avatar Patrick
Browse files

texte upgedated

1 merge request!1update some ui
Showing with 110 additions and 239 deletions
+110 -239
...@@ -2,75 +2,75 @@ const http = require('http'); ...@@ -2,75 +2,75 @@ const http = require('http');
const fs = require('fs'); const fs = require('fs');
const express = require('express') const express = require('express')
const app = express(); const app = express();
const bodyParser = require('body-parser') // const bodyParser = require('body-parser')
const soap = require('soap'); // const soap = require('soap');
app.use(bodyParser.urlencoded({ extended: false })) // app.use(bodyParser.urlencoded({ extended: false }))
app.use(bodyParser.json()) // app.use(bodyParser.json())
const request = require('ajax-request'); // const request = require('ajax-request');
app.use(express.static('vcm')); app.use(express.static('vcm'));
app.listen(process.env.PORT || 8083); app.listen(process.env.PORT || 8083);
console.log("on 8080"); console.log("on 8083");
var url = 'http://193.196.137.147:8990/orchestration/services/SimStadt2MonthlyenergyBalance?wsdl'; // var url = 'http://193.196.137.147:8990/orchestration/services/SimStadt2MonthlyenergyBalance?wsdl';
var args = { // var args = {
gmlid: 'DENW22AL80000AQv', // an example of a building in Essen DENW22AL700004Lv ----DEBW522AA0003113b---in Stockach // gmlid: 'DENW22AL80000AQv', // an example of a building in Essen DENW22AL700004Lv ----DEBW522AA0003113b---in Stockach
cityID: 3,// Essen 3 // Stockach 1 // cityID: 3,// Essen 3 // Stockach 1
ui: { // ui: {
attic: true, // attic: true,
atticHeating: true, // atticHeating: true,
basement: true, // basement: true,
basementHeating: true, // basementHeating: true,
buildingType: "EFH", // other options: "RH", "MFH", "GFH", "HH" // buildingType: "EFH", // other options: "RH", "MFH", "GFH", "HH"
flatRoof: true, // flatRoof: true,
id: 'DENW22AL80000AQv', // equal with glmid // id: 'DENW22AL80000AQv', // equal with glmid
latitude: 50.774414,//51.44679140365339, // an example of a building in Essen // latitude: 50.774414,//51.44679140365339, // an example of a building in Essen
longitude: 6.086995,//6.967781962878631, // an example of a building in Essen // longitude: 6.086995,//6.967781962878631, // an example of a building in Essen
refurbishment: "statuQuo", // other options: "medium", "advanced" // refurbishment: "statuQuo", // other options: "medium", "advanced"
simulationName: "MonthlyEnergyBalance", // just use this value for Heat/Cooling Demand // simulationName: "MonthlyEnergyBalance", // just use this value for Heat/Cooling Demand
storeyCount: 3, // storeyCount: 3,
timestep: 1, // dummy integer, not yet integrated but mandatory // timestep: 1, // dummy integer, not yet integrated but mandatory
usageProfile: "Single Family House", // // other options: "Multi Family House" // usageProfile: "Single Family House", // // other options: "Multi Family House"
yearOfConstruction: 1946 // yearOfConstruction: 1946
} // }
}; // };
app.post('/getSimS', function(req,res){ // app.post('/getSimS', function(req,res){
try { // try {
const data = req.body; // const data = req.body;
console.log("data ==============") // console.log("data ==============")
console.log(data.id); // console.log(data.id);
args.gmlid = data.id // args.gmlid = data.id
console.log(data[0]); // console.log(data[0]);
console.log(data[1]); // console.log(data[1]);
console.log("args ==============") // console.log("args ==============")
console.log(args); // console.log(args);
//asdf // //asdf
const returnedTarget = Object.assign(args.ui,data); // const returnedTarget = Object.assign(args.ui,data);
args.ui = data; // args.ui = data;
args.gmlid = data.id; // args.gmlid = data.id;
console.log("returned ==============") // console.log("returned ==============")
console.log(returnedTarget) // console.log(returnedTarget)
console.log("args ==============") // console.log("args ==============")
console.log(args); // console.log(args);
soap.createClient(url, function(err, client) { // soap.createClient(url, function(err, client) {
client.getMonthlyEnergyBalance(args, function(err, result) { // client.getMonthlyEnergyBalance(args, function(err, result) {
if (err) throw err; // if (err) throw err;
console.log(result); // console.log(result);
// const obj = JSON.parse(result); // // const obj = JSON.parse(result);
// console.log(obj) // // console.log(obj)
return res.send(result); // return res.send(result);
// res.json(result); // // res.json(result);
// return result; // // return result;
}); // });
}); // });
} // }
catch (err) { // catch (err) {
console.log('.../getSimS failed!\n' + err); // console.log('.../getSimS failed!\n' + err);
} // }
}); // });
......
This diff is collapsed.
...@@ -147,7 +147,7 @@ function addcont(content){ ...@@ -147,7 +147,7 @@ function addcont(content){
var heatdem = '<div style="width:100%;margin-top:200px;" id="chartNordB"></div>' var heatdem = '<div style="width:100%;margin-top:200px;" id="chartNordB"></div>'
var nordbstuff = "<h3 style='color: #000000;'>Nordbahnhof Planungskonzept</h3>" + var nordbstuff = "" +
"<div class='box-3'>"+ "<div class='box-3'>"+
"<div class='btn btn-three' onclick='newPlan()'>"+ "<div class='btn btn-three' onclick='newPlan()'>"+
"<span>Neue Planung</span>"+ "<span>Neue Planung</span>"+
......
...@@ -266,7 +266,7 @@ h1.sticky { ...@@ -266,7 +266,7 @@ h1.sticky {
height:35px; height:35px;
top: 30px; top: 30px;
font-size: 20px; font-size: 20px;
padding:5px; /* padding:5px; */
padding-bottom:15px; padding-bottom:15px;
/* background-color: white; */ /* background-color: white; */
z-index: 99; z-index: 99;
......
...@@ -279,7 +279,7 @@ function showtourSpecific(specify) { ...@@ -279,7 +279,7 @@ function showtourSpecific(specify) {
} else if (layer04.indexOf(layer.name) >= 0){ } else if (layer04.indexOf(layer.name) >= 0){
layer.activate(true); layer.activate(true);
} else if (layer05.indexOf(layer.name) >= 0){ } else if (layer05.indexOf(layer.name) >= 0){
layer.activate(true); layer.activate(false);
} else if (layerfix.indexOf(layer.name) >= 0){ } else if (layerfix.indexOf(layer.name) >= 0){
layer.activate(true); layer.activate(true);
} else if (layerfix01.indexOf(layer.name) >= 0){ } else if (layerfix01.indexOf(layer.name) >= 0){
...@@ -773,7 +773,7 @@ function Expert() { ...@@ -773,7 +773,7 @@ function Expert() {
}else if (layer08.indexOf(layer.name) >= 0){ }else if (layer08.indexOf(layer.name) >= 0){
layer.activate(true); layer.activate(true);
} else if (layer09.indexOf(layer.name) >= 0){ } else if (layer09.indexOf(layer.name) >= 0){
layer.activate(true); layer.activate(false);
} else if (layer10.indexOf(layer.name) >= 0){ } else if (layer10.indexOf(layer.name) >= 0){
layer.activate(true); layer.activate(true);
} else if (layerfix.indexOf(layer.name) >= 0){ } else if (layerfix.indexOf(layer.name) >= 0){
......
Supports Markdown
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