This commit is contained in:
2018-11-28 20:28:17 +00:00
parent e06bd7ae47
commit e232182447

View File

@@ -29,6 +29,7 @@
:pagination.sync="pagination" :pagination.sync="pagination"
:total-items="totalItems" :total-items="totalItems"
:loading="loading" :loading="loading"
:rows-per-page-items="rowsPerPageItems"
class="elevation-1" class="elevation-1"
> >
<template slot="items" slot-scope="props"> <template slot="items" slot-scope="props">
@@ -50,7 +51,7 @@
<script> <script>
/* Xeslint-disable */ /* eslint-disable */
import localeText from "../api/locale"; import localeText from "../api/locale";
import pagedList from "../api/pagedlist"; import pagedList from "../api/pagedlist";
import WidgetEdit from "../components/inventorywidgetedit"; import WidgetEdit from "../components/inventorywidgetedit";
@@ -81,6 +82,7 @@ export default {
loading: true, loading: true,
pagination: {}, pagination: {},
selected: [], selected: [],
rowsPerPageItems: [5, 10, 25, 99],
headers: [ headers: [
{ {
text: this.lt("Widget"), text: this.lt("Widget"),
@@ -125,9 +127,11 @@ export default {
this.dialogdata.showeditdialog = true; this.dialogdata.showeditdialog = true;
}, },
getDataFromApi() { getDataFromApi() {
// debugger;
var listOptions = { var listOptions = {
Offset: 0, Offset: 0,
Limit: 5 Limit: 5,
SortBy: "name"
}; };
if (this.pagination.rowsPerPage && this.pagination.rowsPerPage > 0) { if (this.pagination.rowsPerPage && this.pagination.rowsPerPage > 0) {
@@ -135,7 +139,7 @@ export default {
(this.pagination.page - 1) * this.pagination.rowsPerPage; (this.pagination.page - 1) * this.pagination.rowsPerPage;
listOptions.Limit = this.pagination.rowsPerPage; listOptions.Limit = this.pagination.rowsPerPage;
} }
listOptions.SortBy = this.pagination.sortBy;
this.loading = true; this.loading = true;
pagedList.fetch("Widget/ListWidgets", listOptions).then(res => { pagedList.fetch("Widget/ListWidgets", listOptions).then(res => {
// debugger; // debugger;