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 ef8223e3
authored
2024-07-01 13:03:15 -0300
by
Tu Nombre
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Se agrega titulo de ejes
1 parent
2131b959
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
14 deletions
main.py
pruebas.py
static/src/pdf2.js
templates/form.html
titulos.py
main.py
View file @
ef8223e
...
...
@@ -4,6 +4,7 @@ from iselenium import SeleniumInterface as SI
import
random
,
json
,
os
,
datetime
,
ingenieros
,
apollo
,
fosadiaria
import
configuracion
from
matematika
import
*
from
titulos
import
*
import
pruebas
ing
=
ingenieros
.
ingenieros
()
...
...
@@ -294,6 +295,7 @@ def readdata(s, r):
sus
=
r
[
'suspension'
]
for
i
in
range
(
2
):
# si valores de rendimiento son numeros, leer el peso
sus
[
f
"titulo_eje_{i+1}"
]
=
EjesTitulosOrden
(
i
+
1
)
if
sus
[
f
'rendimiento_izquierdo_{i + 1}'
]
.
isnumeric
()
or
sus
[
f
'rendimiento_derecho_{i + 1}'
]
.
isnumeric
():
sus
[
f
'peso_estatico_{i + 1}'
]
=
_e2q
(
_attempt
(
reach
(
f
"pesoBascula-{i}"
),
"?"
)(
s
))
else
:
...
...
@@ -307,6 +309,7 @@ def readdata(s, r):
for
i
in
range
(
4
):
fre
=
{}
pSo
=
PuntoComa
(
_e2q
(
_attempt
(
reach
(
f
"pesoBascula-{i}"
),
"?"
)(
s
)))
fre
[
f
"titulo_eje_freno_{i+1}"
]
=
EjesTitulosOrden
(
i
+
1
)
fre
[
f
'peso_estatico_{i + 1}'
]
=
pSo
fre
[
f
'fuerza_izquierda_{i + 1}'
]
=
PuntoComa
(
_e2q
(
_attempt
(
reach
(
f
"fuerzaIzq-{i}"
),
"?"
)(
s
)))
fre
[
f
'fuerza_derecha_{i + 1}'
]
=
PuntoComa
(
_e2q
(
_attempt
(
reach
(
f
"fuerzaDer-{i}"
),
"?"
)(
s
)))
...
...
pruebas.py
View file @
ef8223e
...
...
@@ -9,6 +9,8 @@ report = {
'suspension'
:
{
'rendimiento_izquierdo_1'
:
'?'
,
'rendimiento_derecho_1'
:
'?'
,
'titulo_eje_1'
:
'primer'
,
'titulo_eje_2'
:
'segundo'
,
'rendimiento_izquierdo_2'
:
'?'
,
'rendimiento_derecho_2'
:
'?'
,
'peso_estatico_1'
:
'?'
,
...
...
@@ -45,6 +47,10 @@ report = {
'pesoTotalFreno'
:
'4888'
,
'totalFzaIzq'
:
'11,39'
,
'totalFzaDer'
:
'11,30'
,
'titulo_eje_freno_1'
:
'primer'
,
'titulo_eje_freno_2'
:
'segundo'
,
'titulo_eje_freno_3'
:
'tercer'
,
'titulo_eje_freno_4'
:
'cuarto'
,
'totalEficacia'
:
'47,32'
},
'trasero'
:
{
'peso_estatico'
:
'4888'
,
...
...
static/src/pdf2.js
View file @
ef8223e
...
...
@@ -152,38 +152,26 @@ 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
,
Pi
,
Pd
)
=>
{
const
table
=
(
container
,
eje
,
FI
,
RI
,
OI
,
peso
,
FD
,
RD
,
OD
,
DFT
,
Pi
,
Pd
,
tiEj
)
=>
{
if
(
FI
===
RI
===
OI
===
peso
===
FD
===
RD
===
OD
)
{
console
.
log
(
eje
)
}
else
{
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
(
`
${
this
.
Dominio
}
- Diagnóstico de Frenos -
${
tiEj
}
eje`
,
new
Vector
(
Pos
.
beg
,
Pos
.
beg_margin
+
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)
]);
}
};
...
...
@@ -204,6 +192,7 @@ class PDF2 {
data
[
`diferencia_freno_
${
i
+
1
}
`
],
data
[
`peso_izquierdo_
${
i
+
1
}
`
],
data
[
`peso_derecho_
${
i
+
1
}
`
],
data
[
`titulo_eje_freno_
${
i
+
1
}
`
],
);
//console.log(data);
}
...
...
templates/form.html
View file @
ef8223e
...
...
@@ -56,6 +56,8 @@
{% for eje in range(2) %}
<h3>
Eje {{ eje + 1 }}
</h3>
Titulo Eje
<input
readonly=
"1"
sub=
"suspension"
type=
"text"
name=
"titulo_eje_{{ eje + 1 }}"
>
<br>
Rend. Izquerdo
<input
sub=
"suspension"
type=
"text"
name=
"rendimiento_izquierdo_{{ eje + 1 }}"
>
<br>
Rend. Derecho
<input
sub=
"suspension"
type=
"text"
name=
"rendimiento_derecho_{{ eje + 1 }}"
>
...
...
@@ -71,6 +73,8 @@
<!--Aca Trabajamos para repoorte cliente corrientes-->
<h3>
Eje {{ eje + 1 }}
</h3>
Titulo Eje
<input
readonly=
"1"
sub=
"frenos"
type=
"text"
id=
"titulo_eje_freno_{{ eje + 1 }}"
name=
"titulo_eje_freno_{{ eje + 1 }}"
>
<br>
Fuerza Izquierda
<input
sub=
"frenos"
type=
"text"
id=
"fuerza_izquierda_{{ eje + 1 }}"
name=
"fuerza_izquierda_{{ eje + 1 }}"
>
<br>
Fuerza Derecha
<input
sub=
"frenos"
type=
"text"
id=
"fuerza_derecha_{{ eje + 1 }}"
name=
"fuerza_derecha_{{ eje + 1 }}"
>
...
...
titulos.py
0 → 100644
View file @
ef8223e
def
EjesTitulosOrden
(
n
):
tr
=
{
"1"
:
"primer"
,
"2"
:
"segundo"
,
"3"
:
"tercero"
,
"4"
:
"cuarto"
}
try
:
rta
=
tr
[
str
(
n
)]
except
:
rta
=
str
(
n
)
print
(
f
"titulos.EjesTituloOrden {n} no definido se usa ingreso"
)
print
(
rta
)
return
rta
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