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 9ac32563
authored
2020-01-31 12:23:37 +0000
by
Luciano Barletta
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix bug peso total, oc -> co, now reads gases
1 parent
2c710e68
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
11 deletions
deploy.py
static/src/pdf1.js
deploy.py
View file @
9ac3256
...
@@ -126,7 +126,6 @@ def readdata(s, r):
...
@@ -126,7 +126,6 @@ def readdata(s, r):
r
[
'suspension'
]
.
update
(
sus
)
r
[
'suspension'
]
.
update
(
sus
)
# frenos
# frenos
frenos
=
s
.
find
(
SI
.
By
.
XPATH
,
"//table[@class='tabla_ensayo']/tbody//tr[@class='odd' or @class='even']"
,
"1-4"
)
for
i
in
range
(
4
):
for
i
in
range
(
4
):
fre
=
{}
fre
=
{}
fre
[
f
'peso_estatico_{i + 1}'
]
=
empty_for_question
(
attempt_do
(
reach
(
f
"pesoBascula-{i}"
),
default
=
"?"
)(
s
))
fre
[
f
'peso_estatico_{i + 1}'
]
=
empty_for_question
(
attempt_do
(
reach
(
f
"pesoBascula-{i}"
),
default
=
"?"
)(
s
))
...
@@ -145,8 +144,8 @@ def readdata(s, r):
...
@@ -145,8 +144,8 @@ def readdata(s, r):
# gases y humos
# gases y humos
r
[
'gaseshumos'
][
'opacidad_logaritmica'
]
=
empty_for_question
(
attempt_do
(
reach
(
f
"opacidadLogaritmica"
),
default
=
"?"
)(
s
))
r
[
'gaseshumos'
][
'opacidad_logaritmica'
]
=
empty_for_question
(
attempt_do
(
reach
(
f
"opacidadLogaritmica"
),
default
=
"?"
)(
s
))
r
[
'gaseshumos'
][
'co'
]
=
empty_for_question
(
attempt_do
(
reach
(
f
"c
o
"
),
default
=
"?"
)(
s
))
r
[
'gaseshumos'
][
'co'
]
=
empty_for_question
(
attempt_do
(
reach
(
f
"c
antCO
"
),
default
=
"?"
)(
s
))
r
[
'gaseshumos'
][
'hc'
]
=
empty_for_question
(
attempt_do
(
reach
(
f
"
hc
"
),
default
=
"?"
)(
s
))
r
[
'gaseshumos'
][
'hc'
]
=
empty_for_question
(
attempt_do
(
reach
(
f
"
cantHC
"
),
default
=
"?"
)(
s
))
return
r
return
r
...
...
static/src/pdf1.js
View file @
9ac3256
...
@@ -336,10 +336,13 @@ class PDF1 {
...
@@ -336,10 +336,13 @@ class PDF1 {
const
a
=
parseFloat
(
data
[
access1
]);
const
a
=
parseFloat
(
data
[
access1
]);
const
b
=
parseFloat
(
data
[
access2
]);
const
b
=
parseFloat
(
data
[
access2
]);
let
sum
=
0.0
;
if
(
isNaN
(
a
))
return
data
[
access1
];
if
(
isNaN
(
a
))
return
data
[
access1
];
if
(
isNaN
(
b
))
return
data
[
access2
];
sum
+=
a
;
if
(
isNaN
(
b
))
return
sum
.
toFixed
(
2
);
sum
+=
b
;
return
(
a
+
b
)
.
toFixed
(
2
);
return
sum
.
toFixed
(
2
);
}
}
const
f
=
data
[
'frenos'
];
const
f
=
data
[
'frenos'
];
...
@@ -389,12 +392,18 @@ class PDF1 {
...
@@ -389,12 +392,18 @@ class PDF1 {
const
c
=
parseFloat
(
text
[
4
]);
const
c
=
parseFloat
(
text
[
4
]);
const
d
=
parseFloat
(
text
[
5
]);
const
d
=
parseFloat
(
text
[
5
]);
if
(
isNaN
(
a
))
return
text
[
2
];
let
sum
=
0.0
;
if
(
isNaN
(
b
))
return
text
[
3
];
if
(
isNaN
(
c
))
return
text
[
4
];
if
(
isNaN
(
d
))
return
text
[
5
];
return
(
a
+
b
+
c
+
d
).
toFixed
(
2
);
if
(
isNaN
(
a
))
return
text
[
2
];
sum
+=
a
;
if
(
isNaN
(
b
))
return
sum
.
toFixed
(
2
);
sum
+=
b
;
if
(
isNaN
(
c
))
return
sum
.
toFixed
(
2
);
sum
+=
c
;
if
(
isNaN
(
d
))
return
sum
.
toFixed
(
2
);
sum
+=
d
;
return
sum
.
toFixed
(
2
);
}
}
evaluacion
.
addRelativeChildren
([
evaluacion
.
addRelativeChildren
([
...
@@ -453,7 +462,7 @@ class PDF1 {
...
@@ -453,7 +462,7 @@ class PDF1 {
),
),
new
Text
(
new
Text
(
`k medio\t
${
data
[
'opacidad_logaritmica'
]}
l/m\t
OC:\t
${
data
[
'oc
'
]}
\tHC:\t
${
data
[
'hc'
]}
`
,
`k medio\t
${
data
[
'opacidad_logaritmica'
]}
l/m\t
CO:\t
${
data
[
'co
'
]}
\tHC:\t
${
data
[
'hc'
]}
`
,
new
Vector
(
Pos
.
beg_margin
+
5
,
Pos
.
two_thirds
),
new
Vector
(
Pos
.
beg_margin
+
5
,
Pos
.
two_thirds
),
tiny_body
tiny_body
),
),
...
...
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