Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Luciano Barletta
/
Pruebas-RTO
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit cd8de7e5
authored
2024-06-19 11:49:05 -0300
by
Tu Nombre
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Modificado reporte de Frenos
1 parent
25d320be
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
20 deletions
main.py
static/src/pdf2.js
main.py
View file @
cd8de7e
...
...
@@ -312,12 +312,12 @@ def readdata(s, r):
##################################CALCULADOS##############################################
fre
[
f
'peso_derecho_{i + 1}'
]
=
DividirPeso
(
pSo
)
fre
[
f
'peso_izquierdo_{i + 1}'
]
=
DividirPeso
(
pSo
)
r
[
'frenos'
]
.
update
(
fre
)
r
[
'frenos'
][
"pesoTotalFreno"
]
=
PuntoComa
(
s
.
traerTextDiv
(
f
"divTotalPesoBascula"
))
r
[
'frenos'
][
"totalFzaIzq"
]
=
PuntoComa
(
s
.
traerTextDiv
(
f
"divTotalFuerzaIzq"
))
r
[
'frenos'
][
"totalFzaDer"
]
=
PuntoComa
(
s
.
traerTextDiv
(
f
"divTotalFuerzaDer"
))
r
[
'frenos'
][
"totalEficacia"
]
=
PuntoComa
(
s
.
traerTextDiv
(
f
"divTotalEficiencia"
))
r
[
'frenos'
][
"totalEficacia"
]
=
PuntoComa
(
s
.
traerTextDiv
(
f
"divTotalEficiencia"
))
.
replace
(
"
%
"
,
""
)
# freno trasero
...
...
static/src/pdf2.js
View file @
cd8de7e
...
...
@@ -149,7 +149,7 @@ class PDF2 {
new
Div
(
new
Vector
(
Pos
.
beg_margin
+
2
,
Pos
.
three_quarters
),
divsize
)
]);
const
table
=
(
container
,
eje
,
FI
,
RI
,
OI
,
peso
,
FD
,
RD
,
OD
,
DFT
)
=>
{
const
table
=
(
container
,
eje
,
FI
,
RI
,
OI
,
peso
,
FD
,
RD
,
OD
,
DFT
,
Pi
,
Pd
)
=>
{
if
(
FI
===
RI
===
OI
===
peso
===
FD
===
RD
===
OD
)
{
console
.
log
(
eje
)
...
...
@@ -157,22 +157,30 @@ class PDF2 {
container
.
addRelativeChildren
([
new
Text
(
`
${
this
.
Dominio
}
- Diagnóstico de Frenos - Eje
${
eje
}
`
,
new
Vector
(
Pos
.
beg
,
Pos
.
beg_margin
+
10
),
this
.
font
),
new
Text
(
"Fuerza IZ"
,
new
Vector
(
Pos
.
beg_margin
,
Pos
.
quarter
),
this
.
font
),
new
Text
(
`
${
FI
}
KN`
,
new
Vector
(
Pos
.
beg_margin
+
3
,
Pos
.
quarter
+
10
),
this
.
font
),
new
Text
(
"Res.Rodadura IZ"
,
new
Vector
(
Pos
.
beg_margin
,
Pos
.
middle
),
this
.
font
),
new
Text
(
`
${
RI
}
Kg`
,
new
Vector
(
Pos
.
beg_margin
+
3
,
Pos
.
middle
+
10
),
this
.
font
),
new
Text
(
"Ovalidad IZ"
,
new
Vector
(
Pos
.
beg_margin
,
Pos
.
three_quarters
),
this
.
font
),
new
Text
(
`
${
OI
}
`
,
new
Vector
(
Pos
.
beg_margin
+
3
,
Pos
.
three_quarters
+
10
),
this
.
font
),
new
Text
(
"Peso del Eje"
,
new
Vector
(
Pos
.
middle
-
10
,
Pos
.
middle
),
this
.
font
),
new
Text
(
`
${
peso
}
Kg`
,
new
Vector
(
Pos
.
middle
-
5
,
Pos
.
middle
+
10
),
this
.
font
),
new
Text
(
"Diferencia "
,
new
Vector
(
Pos
.
middle
-
10
,
Pos
.
quarter
),
this
.
font
),
new
Text
(
`
${
DFT
}
%`
,
new
Vector
(
Pos
.
middle
-
5
,
Pos
.
quarter
+
10
),
this
.
font
),
new
Text
(
"Fuerza DE"
,
new
Vector
(
Pos
.
three_quarters
,
Pos
.
quarter
),
this
.
font
),
new
Text
(
`
${
FD
}
KN`
,
new
Vector
(
Pos
.
three_quarters
+
3
,
Pos
.
quarter
+
10
),
this
.
font
),
new
Text
(
"Res.Rodadura DE"
,
new
Vector
(
Pos
.
three_quarters
,
Pos
.
middle
),
this
.
font
),
new
Text
(
`
${
RD
}
Kg`
,
new
Vector
(
Pos
.
three_quarters
+
3
,
Pos
.
middle
+
10
),
this
.
font
),
new
Text
(
"Ovalidad DE"
,
new
Vector
(
Pos
.
three_quarters
,
Pos
.
three_quarters
),
this
.
font
),
new
Text
(
`
${
OD
}
`
,
new
Vector
(
Pos
.
three_quarters
+
3
,
Pos
.
three_quarters
+
10
),
this
.
font
)
//new Text("Fuerza IZ", new Vector(Pos.beg_margin, Pos.quarter), this.font),
//new Text(`${FI} KN`, new Vector(Pos.beg_margin + 3, Pos.quarter + 10), this.font),
new
Text
(
"Peso Lado Izquierdo"
,
new
Vector
(
Pos
.
beg_margin
,
Pos
.
quarter
),
this
.
font
),
new
Text
(
`
${
Pi
}
Kg`
,
new
Vector
(
Pos
.
beg_margin
+
3
,
Pos
.
quarter
+
10
),
this
.
font
),
new
Text
(
"Fuerza IZ"
,
new
Vector
(
Pos
.
beg_margin
,
Pos
.
middle
),
this
.
font
),
new
Text
(
`
${
FI
}
KN`
,
new
Vector
(
Pos
.
beg_margin
+
3
,
Pos
.
middle
+
10
),
this
.
font
),
//new Text("Res.Rodadura IZ", new Vector(Pos.beg_margin, Pos.middle), this.font),
//new Text(`${RI} Kg`, new Vector(Pos.beg_margin + 3, Pos.middle + 10), this.font),
//new Text("Ovalidad IZ", new Vector(Pos.beg_margin, Pos.three_quarters), this.font),
//new Text(`${OI}`, new Vector(Pos.beg_margin + 3, Pos.three_quarters + 10), this.font),
new
Text
(
"Diferencia"
,
new
Vector
(
Pos
.
middle
-
10
,
Pos
.
middle
),
this
.
font
),
new
Text
(
`
${
DFT
}
Kg`
,
new
Vector
(
Pos
.
middle
-
5
,
Pos
.
middle
+
10
),
this
.
font
),
new
Text
(
"Peso del Eje "
,
new
Vector
(
Pos
.
middle
-
10
,
Pos
.
quarter
),
this
.
font
),
new
Text
(
`
${
peso
}
%`
,
new
Vector
(
Pos
.
middle
-
5
,
Pos
.
quarter
+
10
),
this
.
font
),
//new Text("Fuerza DE", new Vector(Pos.three_quarters, Pos.quarter), this.font),
//new Text(`${FD} KN`, new Vector(Pos.three_quarters + 3, Pos.quarter + 10), this.font),
new
Text
(
"Peso Lado Derecho"
,
new
Vector
(
Pos
.
three_quarters
,
Pos
.
quarter
),
this
.
font
),
new
Text
(
`
${
Pd
}
KG`
,
new
Vector
(
Pos
.
three_quarters
+
3
,
Pos
.
quarter
+
10
),
this
.
font
),
//new Text("Res.Rodadura DE", new Vector(Pos.three_quarters, Pos.middle), this.font),
//new Text(`${RD} Kg`, new Vector(Pos.three_quarters + 3, Pos.middle + 10), this.font),
new
Text
(
"Fuerza DE"
,
new
Vector
(
Pos
.
three_quarters
,
Pos
.
middle
),
this
.
font
),
new
Text
(
`
${
FD
}
KN`
,
new
Vector
(
Pos
.
three_quarters
+
3
,
Pos
.
middle
+
10
),
this
.
font
)
//new Text("Ovalidad DE", new Vector(Pos.three_quarters, Pos.three_quarters), this.font),
//new Text(`${OD}`, new Vector(Pos.three_quarters + 3, Pos.three_quarters + 10), this.font)
]);
}
};
...
...
@@ -188,7 +196,9 @@ class PDF2 {
data
[
`fuerza_derecha_
${
i
+
1
}
`
],
data
[
`resistencia_derecha_
${
i
+
1
}
`
],
data
[
`ovalidad_derecha_
${
i
+
1
}
`
],
data
[
`diferencia_freno_
${
i
+
1
}
`
]
data
[
`diferencia_freno_
${
i
+
1
}
`
],
data
[
`peso_izquierdo_
${
i
+
1
}
`
],
data
[
`peso_derecho_
${
i
+
1
}
`
],
);
//console.log(data);
}
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment