Display Bytes in Memory,
- SearchMultipleInput novy subor
This commit is contained in:
@@ -16,6 +16,7 @@ export default {
|
|||||||
xlabel: 'Dátum',
|
xlabel: 'Dátum',
|
||||||
labels: ['Dátum','Celkom','Pouzita','Volna'],
|
labels: ['Dátum','Celkom','Pouzita','Volna'],
|
||||||
ylabel: 'Bytes',
|
ylabel: 'Bytes',
|
||||||
|
labelsKMG2: true,
|
||||||
fillGraph: true
|
fillGraph: true
|
||||||
},
|
},
|
||||||
series: [],
|
series: [],
|
||||||
|
|||||||
57
resources/js/components/SearchMultipleInput.vue
Normal file
57
resources/js/components/SearchMultipleInput.vue
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="ssel1">Typ:</label>
|
||||||
|
<select v-model="type" class="form-control" id="ssel1">
|
||||||
|
<option>Užívateľ</option>
|
||||||
|
<option>Meno PC</option>
|
||||||
|
<option>Ip adresa</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<vue-suggestion :items="items"
|
||||||
|
v-model="item"
|
||||||
|
:setLabel="setLabel"
|
||||||
|
:itemTemplate="itemTemplate"
|
||||||
|
@changed="inputChange"
|
||||||
|
@selected="itemSelected">
|
||||||
|
</vue-suggestion>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import itemTemplate from './item-template.vue';
|
||||||
|
export default {
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
item: {},
|
||||||
|
type: null,
|
||||||
|
items: [
|
||||||
|
|
||||||
|
],
|
||||||
|
itemTemplate,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
itemSelected (item) {
|
||||||
|
this.item = item;
|
||||||
|
},
|
||||||
|
setLabel (item) {
|
||||||
|
return item.computer;
|
||||||
|
},
|
||||||
|
inputChange (text) {
|
||||||
|
axios.get("search/multicomplete", {
|
||||||
|
params: {
|
||||||
|
type: this.type,
|
||||||
|
term: text,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.then((response) => {
|
||||||
|
this.items = response.data;
|
||||||
|
})
|
||||||
|
.catch(function (error) {
|
||||||
|
console.log(error);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
@@ -7,13 +7,12 @@
|
|||||||
|
|
||||||
<title>Laravel</title>
|
<title>Laravel</title>
|
||||||
|
|
||||||
<!-- Fonts -->
|
<!-- Javascript -->
|
||||||
|
|
||||||
|
|
||||||
<link href="{{ asset('css/app.css') }}" rel="stylesheet">
|
|
||||||
<script src="{{ asset('/js/app.js') }}"></script>
|
<script src="{{ asset('/js/app.js') }}"></script>
|
||||||
|
|
||||||
<!-- Styles -->
|
<!-- Styles -->
|
||||||
|
<link href="{{ asset('css/app.css') }}" rel="stylesheet">
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
html, body {
|
html, body {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
|
|||||||
Reference in New Issue
Block a user