Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nghyd
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Cassiopée
nghyd
Commits
6ca4b079
Commit
6ca4b079
authored
4 years ago
by
mathias.chouet
Browse files
Options
Downloads
Patches
Plain Diff
Fix bug in PbCloison parameters display in results table
parent
4902d338
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!93
Resolve "Ajout du module Prébarrage"
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/app/formulaire/definition/form-prebarrage.ts
+28
-13
28 additions, 13 deletions
src/app/formulaire/definition/form-prebarrage.ts
src/locale/messages.en.json
+1
-0
1 addition, 0 deletions
src/locale/messages.en.json
src/locale/messages.fr.json
+1
-0
1 addition, 0 deletions
src/locale/messages.fr.json
with
30 additions
and
13 deletions
src/app/formulaire/definition/form-prebarrage.ts
+
28
−
13
View file @
6ca4b079
import
{
CalculatorType
,
PbBassin
,
PbCloison
,
IObservable
,
PreBarrage
,
VariatedDetails
}
from
"
jalhyd
"
;
import
{
CalculatorType
,
PbBassin
,
PbCloison
,
IObservable
,
PreBarrage
,
VariatedDetails
,
ParamDefinition
}
from
"
jalhyd
"
;
import
{
FormulaireFixedVar
}
from
"
./form-fixedvar
"
;
import
{
PbSchema
}
from
"
../elements/pb-schema
"
;
...
...
@@ -235,15 +235,6 @@ export class FormulairePrebarrage extends FormulaireFixedVar {
if
(
computedParam
!==
undefined
)
{
this
.
pbResults
.
cloisonResults
.
calculatedParameter
=
computedParam
;
}
// if some parameter is variating, add id too (trick with PbResultsComponent
for
(
const
s
of
this
.
_selectedItem
.
structures
)
{
for
(
const
p
of
s
.
parameterIterator
)
{
if
(
p
.
hasMultipleValues
)
{
const
ngp
=
this
.
getParamFromSymbol
(
p
.
symbol
);
this
.
_pbResults
.
cloisonResults
.
addFixedParameter
(
ngp
);
}
}
}
// transmission des suffixes de cloisons calculés par l'algo de tri de PbSchemaComponent,
// pour le sélecteur de conditions limites
const
pbs
=
this
.
kids
[
0
]
as
PbSchema
;
...
...
@@ -260,10 +251,34 @@ export class FormulairePrebarrage extends FormulaireFixedVar {
}
}
/**
* Trouve le Ngparameter correspondant au paramètre "p", parmi tous les
* éléments du formulaire de PbCloison, qui peut contenir plusieurs
* structures ayant des paramètres de même nom
* @param param ParamDefinition
*/
public
getCloisonParam
(
param
:
ParamDefinition
):
NgParameter
{
for
(
const
p
of
this
.
allFormElements
)
{
if
(
p
instanceof
NgParameter
)
{
if
(
p
.
paramDefinition
===
param
)
{
return
p
;
}
}
}
}
public
addFixedParameters
()
{
if
(
this
.
wallForm
!==
undefined
)
{
for
(
const
p
of
this
.
wallForm
.
getFixedParameters
())
{
this
.
_pbResults
.
cloisonResults
.
addFixedParameter
(
p
);
if
(
this
.
_selectedItem
!==
undefined
&&
this
.
_selectedItem
instanceof
PbCloison
)
{
for
(
const
s
of
this
.
_selectedItem
.
structures
)
{
for
(
const
p
of
s
.
parameterIterator
)
{
// if some parameter is variating, add id too (trick with PbResultsComponent)
if
(
p
.
visible
)
{
const
ngp
=
this
.
getCloisonParam
(
p
);
if
(
ngp
)
{
this
.
_pbResults
.
cloisonResults
.
addFixedParameter
(
ngp
);
}
}
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
src/locale/messages.en.json
+
1
−
0
View file @
6ca4b079
...
...
@@ -344,6 +344,7 @@
"INFO_LIB_STRUCTURE_SEUILTRIANGULAIRE"
:
"Triangular weir"
,
"INFO_LIB_STRUCTURE_SEUILTRIANGULAIRETRUNC"
:
"Truncated triangular weir"
,
"INFO_LIB_STRUCTURE_VANNERECTANGULAIRE"
:
"Rectangular gate"
,
"INFO_LIB_STRUCTURE_N_COURT"
:
"D"
,
"INFO_LIB_TAU0"
:
"Tractive force"
,
"INFO_LIB_TOR"
:
"Supercritical water line"
,
"INFO_LIB_TOTAL"
:
"Total"
,
...
...
This diff is collapsed.
Click to expand it.
src/locale/messages.fr.json
+
1
−
0
View file @
6ca4b079
...
...
@@ -345,6 +345,7 @@
"INFO_LIB_STRUCTURE_SEUILTRIANGULAIRE"
:
"Seuil triangulaire"
,
"INFO_LIB_STRUCTURE_SEUILTRIANGULAIRETRUNC"
:
"Seuil triangulaire tronqué"
,
"INFO_LIB_STRUCTURE_VANNERECTANGULAIRE"
:
"Vanne rectangulaire"
,
"INFO_LIB_STRUCTURE_N_COURT"
:
"O"
,
"INFO_LIB_TAU0"
:
"Force tractrice"
,
"INFO_LIB_TOR"
:
"Ligne d'eau torrentielle"
,
"INFO_LIB_TOTAL"
:
"Total"
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment