Display Bytes in Memory,
- SearchMultipleInput novy subor
This commit is contained in:
@@ -16,6 +16,7 @@ export default {
|
||||
xlabel: 'Dátum',
|
||||
labels: ['Dátum','Celkom','Pouzita','Volna'],
|
||||
ylabel: 'Bytes',
|
||||
labelsKMG2: true,
|
||||
fillGraph: true
|
||||
},
|
||||
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>
|
||||
Reference in New Issue
Block a user