upload test, viac senzorov

This commit is contained in:
2021-01-30 14:27:23 +01:00
parent ec5c81a587
commit 8fce0013f7
9 changed files with 89 additions and 10 deletions

12
resources/js/app.js vendored
View File

@@ -48,6 +48,9 @@ Vue.use(TabsPlugin);
import { CardPlugin } from 'bootstrap-vue'
Vue.use(CardPlugin);
import { BButton } from 'bootstrap-vue'
Vue.component('b-button', BButton);
//(function () {
var app = new Vue({
el: '#app',
@@ -58,6 +61,7 @@ Vue.use(CardPlugin);
time: null,
startdate: null,
enddate: null,
host: 'balkon',
componentKey: 0,
ti: 0, //Tab Index
graphShow: [],
@@ -111,6 +115,11 @@ Vue.use(CardPlugin);
displayResults: function () {
this.getData();
},
sethost: function (host) {
this.host = host;
this.getData();
console.log(host);
},
resizeGraph: function (i) {
console.log("RESIZE");
let index = "dg[" + i + "]";
@@ -149,7 +158,8 @@ Vue.use(CardPlugin);
params: {
type: vts[t],
startdate: this.startdate,
enddate: this.enddate
enddate: this.enddate,
host: this.host
}
})
.then(function (response) {

View File

@@ -6,7 +6,7 @@
<script>
export default {
props: ['fromdate','todate','type','range'],
props: ['fromdate','todate','type','range','host'],
name: 'Stats',
data() {
return {
@@ -34,7 +34,8 @@ export default {
type: this.type,
startdate: this.fromdate,
enddate: this.todate,
range: this.range
range: this.range,
host: this.host
}
})
.then(function (response) {

View File

@@ -92,6 +92,12 @@
<div class="row">
<vue-thermometer class="justify-content-center col-sm-3" :value="temperature" :min="tmin" :max="tmax"></vue-thermometer>
<div class="col-sm-9" id="values">
<div>
<b-button variant="primary" v-on:click="sethost('balkon')">Balkón</b-button>
<b-button variant="secondary" v-on:click="sethost('decka')">Decká</b-button>
<b-button variant="success" v-on:click="sethost('strecha')">Strecha</b-button>
</div>
<vue-table-dynamic :params="params"></vue-table-dynamic>
<ul>
<li>Čas: @{{time}}</li>