Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
wotwizard-ui
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
clients
wotwizard-ui
Commits
6ac13f8b
Commit
6ac13f8b
authored
3 years ago
by
Pierre-Jean CHANCELLIER
Browse files
Options
Downloads
Patches
Plain Diff
improve forecasts vue
parent
fb6cd07d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pages/previsions.vue
+11
-17
11 additions, 17 deletions
pages/previsions.vue
with
11 additions
and
17 deletions
pages/previsions.vue
+
11
−
17
View file @
6ac13f8b
...
...
@@ -30,17 +30,15 @@
<div
v-if=
"display=='forecastsByNames'"
>
<h3>
Prévisions par membres
</h3>
<div
class=
"table-responsive"
>
<table
class=
"table
previsions
"
>
<table
class=
"table
table-striped
"
>
<tbody>
<tr
v-for=
"forecast in wwResult.forecastsByNames"
:key=
"forecast.member.uid"
>
<th
scope=
"row"
>
{{
forecast
.
member
.
uid
}}
</th>
<td
class=
"p-0"
>
<table
class=
"table table-borderless mb-0"
>
<tr
class=
"d-flex justify-content-between"
v-for=
"date in forecast.forecasts"
:key=
"date.date"
>
<td>
{{
date
.
date
|
formatDateHeure
}}
</td>
<td>
{{
date
.
proba
*
100
}}
%
</td>
</tr>
</table>
<div
class=
"d-flex justify-content-between p-3"
v-for=
"date in forecast.forecasts"
:key=
"date.date"
>
<div>
{{
date
.
date
|
formatDateHeure
}}
</div>
<div>
{{
date
.
proba
*
100
}}
%
</div>
</div>
</td>
</tr>
</tbody>
...
...
@@ -50,17 +48,15 @@
<div
v-if=
"display=='forecastsByDates'"
>
<h3>
Prévisions par dates
</h3>
<div
class=
"table-responsive"
>
<table
class=
"table
previsions
"
>
<table
class=
"table
table-striped
"
>
<tbody>
<tr
v-for=
"forecast in wwResult.forecastsByDates"
:key=
"forecast.date"
>
<th
scope=
"row"
>
{{
forecast
.
date
|
formatDateHeure
}}
</th>
<td
class=
"p-0"
>
<table
class=
"table table-borderless mb-0"
>
<tr
class=
"d-flex justify-content-between"
v-for=
"member in forecast.forecasts"
:key=
"member.member.uid"
>
<td>
{{
member
.
member
.
uid
}}
</td>
<td>
{{
member
.
proba
*
100
}}
%
</td>
</tr>
</table>
<div
class=
"d-flex justify-content-between p-3"
v-for=
"member in forecast.forecasts"
:key=
"member.member.uid"
>
<div>
{{
member
.
member
.
uid
}}
</div>
<div>
{{
member
.
proba
*
100
}}
%
</div>
</div>
</td>
</tr>
</tbody>
...
...
@@ -167,9 +163,7 @@ export default {
}
}
// On tri les résultats pour être sûr
// result['byName'].sort((a, b) => (a.member.uid.toLowerCase() > b.member.uid.toLowerCase()) ? 1 : -1)
// result['byDate'].sort((a, b) => (a.date > b.date) ? 1 : -1)
result
[
'
byDate
'
].
sort
((
a
,
b
)
=>
(
a
.
date
>
b
.
date
)
?
1
:
-
1
)
return
{
permutations_nb
:
data
.
wwResult
.
permutations_nb
,
...
...
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