-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathResults.vue
144 lines (140 loc) · 3.43 KB
/
Results.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
<template>
<v-row justify="center" class="mb-3">
<v-col cols="11" align="center">
<div class="font-weight-bold text-h5 mt-2">
Simulation Results
</div>
</v-col>
<v-col cols="11" sm="11" md="6">
<v-card elevation="3">
<v-card-title class="font-weight-bold">
Days Between Arrival to Placement by Area
</v-card-title>
<v-card-text>
<BarChart
:labels="labels"
:data="datasetArea"
:scales="scalesByArea"
/>
</v-card-text>
</v-card>
</v-col>
<v-col cols="11" sm="11" md="6">
<v-card elevation="3">
<v-card-title class="font-weight-bold">
Packages in the Logistics Center by Size
</v-card-title>
<v-card-text>
<BarChart
:labels="labels"
:data="dataset"
:scales="scalesBySize"
/>
</v-card-text>
</v-card>
</v-col>
<v-col cols="11" sm="3" align="center">
<v-card elevation="3" class="mb-3">
<v-simple-table>
<template v-slot:default>
<thead>
<tr>
<th v-if="policy == 1" class="text-left">
Expected Package Returns
</th>
<th class="text-left">
Expected Malfunction Revisits
</th>
</tr>
</thead>
<tbody>
<tr>
<td v-if="policy == 1">{{ expectedPackageReturns }}</td>
<td>{{ expectedMalfunctionsRevisits }}</td>
</tr>
</tbody>
</template>
</v-simple-table>
</v-card>
</v-col>
</v-row>
</template>
<script>
import BarChart from "../components/BarChart";
import { mapState } from 'vuex';
export default {
name: 'Results',
components: { BarChart },
computed: {
...mapState([
'policy',
'expectedPackageReturns',
'expectedMalfunctionsRevisits',
'datasetArrivalByArea',
'datasetPackagesBySize',
])
},
data: () => ({
scalesByArea: {
x: 'Days',
y: 'Packages',
},
scalesBySize: {
x: 'Packages',
y: 'Days',
},
labels: ['a', 'b', 'c'],
datasetArea: [
{
label: "Area 1",
backgroundColor: "#F9AA33",
data: [40, 20, 12]
},
{
label: "Area 2",
backgroundColor: "#232F34",
data: [65, 12, 14]
},
{
label: "Area 3",
backgroundColor: "#FFCF44",
data: [65, 12, 14]
},
{
label: "Area 4",
backgroundColor: "#1EB980",
data: [65, 12, 14]
},
{
label: "Area 5",
backgroundColor: "#72DEFF",
data: [65, 12, 14]
},
{
label: "Area 6",
backgroundColor: "#045D56",
data: [65, 12, 14]
},
],
dataset: [
{
label: "Small",
backgroundColor: "#F9AA33",
data: [40, 20, 12]
},
{
label: "Medium",
backgroundColor: "#232F34",
data: [65, 12, 14]
},
{
label: "Medium",
backgroundColor: "#FFCF44",
data: [65, 12, 14]
}
],
})
}
</script>
<style>
</style>