Skip to content
Snippets Groups Projects
Commit b17135f9 authored by AUBRY JEAN-PASCAL's avatar AUBRY JEAN-PASCAL
Browse files

fix: add devices number for variated parameters in result

Refs #664
parent 4075bd42
No related branches found
No related tags found
2 merge requests!275Release v4.19.0,!255Resolve "Ajout de la passe à rugosité de fond: cas d'un radier incliné"
Pipeline #176243 passed
This commit is part of merge request !255. Comments created here will be created in the context of that merge request.
...@@ -64,16 +64,5 @@ ...@@ -64,16 +64,5 @@
"help": "pam/macrorugo.html#rugosite-de-fond" "help": "pam/macrorugo.html#rugosite-de-fond"
} }
] ]
},
{
"id": "rugofond_container",
"type": "template_container",
"templates": [
"fs_rugofond"
]
},
{
"type": "options",
"help": "pam/macrorugo_complexe.html"
} }
] ]
...@@ -19,6 +19,9 @@ import { longestVarParam } from "../../../app/util/util"; ...@@ -19,6 +19,9 @@ import { longestVarParam } from "../../../app/util/util";
}) })
export class VarResultsComponent extends ResultsComponentDirective implements Observer, OnInit { export class VarResultsComponent extends ResultsComponentDirective implements Observer, OnInit {
@ViewChild("tableContainer")
table: ElementRef;
/** size of the longest variated parameter */ /** size of the longest variated parameter */
public size: number; public size: number;
...@@ -34,9 +37,6 @@ export class VarResultsComponent extends ResultsComponentDirective implements Ob ...@@ -34,9 +37,6 @@ export class VarResultsComponent extends ResultsComponentDirective implements Ob
/** messages de log issus des résultats variés */ /** messages de log issus des résultats variés */
protected _messages: Message[]; protected _messages: Message[];
@ViewChild("tableContainer")
table: ElementRef;
constructor( constructor(
protected intlService: I18nService, protected intlService: I18nService,
protected logEntriesDetailsDialog: MatDialog protected logEntriesDetailsDialog: MatDialog
...@@ -68,6 +68,7 @@ export class VarResultsComponent extends ResultsComponentDirective implements Ob ...@@ -68,6 +68,7 @@ export class VarResultsComponent extends ResultsComponentDirective implements Ob
if (this._messages.length > 0) { // has log messages if (this._messages.length > 0) { // has log messages
this._headers.push("logMessagesColumn"); this._headers.push("logMessagesColumn");
} }
console.log("headers", this._varResults.variableParamHeaders);
this._headers = this._headers.concat(this._varResults.variableParamHeaders); this._headers = this._headers.concat(this._varResults.variableParamHeaders);
this._headers = this._headers.concat(this._varResults.resultHeaders); this._headers = this._headers.concat(this._varResults.resultHeaders);
...@@ -125,12 +126,13 @@ export class VarResultsComponent extends ResultsComponentDirective implements Ob ...@@ -125,12 +126,13 @@ export class VarResultsComponent extends ResultsComponentDirective implements Ob
for (const c of sn.getChildren()) { for (const c of sn.getChildren()) {
if (c.result) { if (c.result) {
for (const k of c.result.resultElements[i].keys) { for (const k of c.result.resultElements[i].keys) {
// console.log("k", k);
const er: number = c.result.resultElements[i].getValue(k); const er: number = c.result.resultElements[i].getValue(k);
// console.log("er", er);
list.push(this.intlService.formatResult(k, er)); list.push(this.intlService.formatResult(k, er));
} }
} }
} }
this._results.push(list); this._results.push(list);
} }
} }
......
...@@ -340,8 +340,9 @@ export class VarResults extends CalculatedParamResults implements PlottableData ...@@ -340,8 +340,9 @@ export class VarResults extends CalculatedParamResults implements PlottableData
} }
public update() { public update() {
// refresh param headers // refresh param headers and build source nub headers
this._variableParamHeaders = this._variatedParams.map((v) => { const parentVariatedParameters = this._variatedParams.filter(v => v.param.nubCalcType === this.result.sourceNub.calcType);
this._variableParamHeaders = parentVariatedParameters.map((v) => {
let h = this.expandLabelFromSymbol(v.param); let h = this.expandLabelFromSymbol(v.param);
h += this.getHelpLink(v.param.symbol); h += this.getHelpLink(v.param.symbol);
return h; return h;
...@@ -382,6 +383,7 @@ export class VarResults extends CalculatedParamResults implements PlottableData ...@@ -382,6 +383,7 @@ export class VarResults extends CalculatedParamResults implements PlottableData
let ct = sn.calcType; let ct = sn.calcType;
if (sn.parent) { if (sn.parent) {
ct = sn.parent.calcType; ct = sn.parent.calcType;
console.log("ct", ct);
} }
// entêtes des résultats // entêtes des résultats
this._resultHeaders = []; this._resultHeaders = [];
...@@ -410,9 +412,17 @@ export class VarResults extends CalculatedParamResults implements PlottableData ...@@ -410,9 +412,17 @@ export class VarResults extends CalculatedParamResults implements PlottableData
rh += this.getHelpLink(k); rh += this.getHelpLink(k);
this._resultHeaders.push(rh); this._resultHeaders.push(rh);
} }
// build header for children variated parameters
for (const v of c.findVariatedParams()) {
let h = sprintf(ServiceFactory.i18nService.localizeText("INFO_STUFF_N"), cn)
+ (c.findPositionInParent() + 1) + " : "
+ ServiceFactory.formulaireService.expandVariableNameAndUnit(ct, v.param.symbol);
h += this.getHelpLink(v.param.symbol);
this.variableParamHeaders.push(h);
}
// this.variableParamHeaders.push()
} }
} }
this.resetDefaultAxisIfNeeded(); this.resetDefaultAxisIfNeeded();
} }
......
...@@ -422,6 +422,7 @@ ...@@ -422,6 +422,7 @@
"INFO_LIB_PVMAXLIM": "Puissance volumique dissipée maximale limite", "INFO_LIB_PVMAXLIM": "Puissance volumique dissipée maximale limite",
"INFO_LIB_PAB_CHART_SEUILS": "Seuils (%s)", "INFO_LIB_PAB_CHART_SEUILS": "Seuils (%s)",
"INFO_LIB_SUBMERGENCE": "Ennoiement", "INFO_LIB_SUBMERGENCE": "Ennoiement",
"INFO_LIB_": "Débit du radier",
"INFO_LINKED_VALUE_CHILD": "%s (%s, %s %s)", "INFO_LINKED_VALUE_CHILD": "%s (%s, %s %s)",
"INFO_LINKED_VALUE_EXTRA_RESULT_OF": "%s (%s)", "INFO_LINKED_VALUE_EXTRA_RESULT_OF": "%s (%s)",
"INFO_LINKED_VALUE_EXTRA_RESULT": "%s (%s)", "INFO_LINKED_VALUE_EXTRA_RESULT": "%s (%s)",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment