Fixes for settings, insert scripts, table header and fuzzy logic
This commit is contained in:
parent
b3964b3a97
commit
9f8d758b6e
@ -77,7 +77,8 @@ def get_fuzzy_response(request_params, objects_list):
|
||||
car.combustion,
|
||||
)
|
||||
)
|
||||
if min(comparator) > settings.COMPARATOR:
|
||||
if comparator and min(comparator) > settings.COMPARATOR:
|
||||
end_object_list.append(car)
|
||||
|
||||
print(end_object_list)
|
||||
return end_object_list
|
||||
|
@ -13,7 +13,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import axios from 'axios';
|
||||
import axios from "axios";
|
||||
export default {
|
||||
name: "Table",
|
||||
|
||||
@ -22,8 +22,8 @@ export default {
|
||||
production_year: {
|
||||
label: "Rok produkcji",
|
||||
items: [
|
||||
{ label: "Dawno", value: "1960,1960,2001" },
|
||||
{ label: "Średnio", value: "1960,2001,2022" },
|
||||
{ label: "Dawno", value: "2000,2000,2009" },
|
||||
{ label: "Średnio", value: "2009,2012,2022" },
|
||||
{ label: "Niedawno", value: "2017,2022,2022" },
|
||||
],
|
||||
},
|
||||
@ -52,22 +52,17 @@ export default {
|
||||
],
|
||||
},
|
||||
comparator: {
|
||||
label: "Stopień przynależności",
|
||||
items: [
|
||||
{ label: "",
|
||||
value: 0.75
|
||||
}
|
||||
],
|
||||
}
|
||||
label: "Stopień przynależności",
|
||||
items: [{ label: "", value: 0.75 }],
|
||||
},
|
||||
},
|
||||
}),
|
||||
computed: {
|
||||
},
|
||||
computed: {},
|
||||
methods: {
|
||||
changeSettings() {
|
||||
axios.post('http://localhost:8000/settings', this.settings)
|
||||
}
|
||||
}
|
||||
changeSettings() {
|
||||
axios.post("http://localhost:8000/settings", this.settings);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
|
@ -1,54 +1,58 @@
|
||||
<template>
|
||||
<v-container>
|
||||
<v-row>
|
||||
<v-col md="12">
|
||||
<v-data-table :headers="headers" :items="getCars" class="elevation-1"></v-data-table>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-container>
|
||||
<v-container>
|
||||
<v-row>
|
||||
<v-col md="12">
|
||||
<v-data-table
|
||||
:headers="headers"
|
||||
:items="getCars"
|
||||
class="elevation-1"
|
||||
></v-data-table>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
import { mapGetters } from "vuex";
|
||||
export default {
|
||||
name: "Table",
|
||||
name: "Table",
|
||||
|
||||
data: () => ({
|
||||
headers: [
|
||||
{ text: "Marka", value: "mark" },
|
||||
{ text: "Model", value: "model" },
|
||||
{ text: "Przebieg (km)", value: "mileage" },
|
||||
{ text: "Rok produkcji", value: "production_year" },
|
||||
{ text: "Pojemnośc silnika (cm^3)", value: "engine_capacity" },
|
||||
{ text: "Spalanie (L/100km)", value: "combustion" },
|
||||
{ text: "Cena (zł)", value: "price" },
|
||||
],
|
||||
items: [{
|
||||
brand: "Ford",
|
||||
model: "Focus",
|
||||
mileage: 230000,
|
||||
production_year: 2008,
|
||||
engine_capacity: 2.0,
|
||||
combustion: 7.6,
|
||||
price: 12200,
|
||||
},
|
||||
{
|
||||
brand: "Fiat",
|
||||
model: "Punto",
|
||||
mileage: 430000,
|
||||
production_year: 2003,
|
||||
engine_capacity: 1.3,
|
||||
combustion: 5.5,
|
||||
price: 3500,
|
||||
},
|
||||
],
|
||||
}),
|
||||
computed: {
|
||||
...mapGetters(['getCars'])
|
||||
}
|
||||
data: () => ({
|
||||
headers: [
|
||||
{ text: "Marka", value: "mark" },
|
||||
{ text: "Model", value: "model" },
|
||||
{ text: "Przebieg (km)", value: "mileage" },
|
||||
{ text: "Rok produkcji", value: "production_year" },
|
||||
{ text: "Pojemnośc silnika (cm^3)", value: "engine_capacity" },
|
||||
{ text: "Spalanie (L/100km)", value: "combustion" },
|
||||
{ text: "Cena (USD)", value: "price" },
|
||||
],
|
||||
items: [
|
||||
{
|
||||
brand: "Ford",
|
||||
model: "Focus",
|
||||
mileage: 230000,
|
||||
production_year: 2008,
|
||||
engine_capacity: 2.0,
|
||||
combustion: 7.6,
|
||||
price: 12200,
|
||||
},
|
||||
{
|
||||
brand: "Fiat",
|
||||
model: "Punto",
|
||||
mileage: 430000,
|
||||
production_year: 2003,
|
||||
engine_capacity: 1.3,
|
||||
combustion: 5.5,
|
||||
price: 3500,
|
||||
},
|
||||
],
|
||||
}),
|
||||
computed: {
|
||||
...mapGetters(["getCars"]),
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
|
15812
insert-data.sql
15812
insert-data.sql
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user