This commit is contained in:
@@ -20,7 +20,6 @@
|
||||
<v-icon>fa-ellipsis-v</v-icon>
|
||||
</v-btn>
|
||||
</v-toolbar>
|
||||
|
||||
<v-data-table
|
||||
v-model="selected"
|
||||
:headers="headers"
|
||||
@@ -81,7 +80,6 @@ export default {
|
||||
throw err;
|
||||
});
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
formReady: false,
|
||||
@@ -127,14 +125,12 @@ export default {
|
||||
this.dialogdata.showeditdialog = true;
|
||||
},
|
||||
getDataFromApi() {
|
||||
//debugger;
|
||||
var listOptions = {
|
||||
offset: 0,
|
||||
limit: 5,
|
||||
sort: "name",
|
||||
asc: true
|
||||
};
|
||||
|
||||
if (this.pagination.rowsPerPage && this.pagination.rowsPerPage > 0) {
|
||||
listOptions.offset =
|
||||
(this.pagination.page - 1) * this.pagination.rowsPerPage;
|
||||
@@ -142,12 +138,9 @@ export default {
|
||||
}
|
||||
listOptions.sort = this.pagination.sortBy;
|
||||
listOptions.asc = !this.pagination.descending;
|
||||
|
||||
this.loading = true;
|
||||
//debugger;
|
||||
var listUrl = "Widget/ListWidgets?" + this.$gzapi.buildQuery(listOptions);
|
||||
this.$gzapi.get(listUrl).then(res => {
|
||||
// debugger;
|
||||
this.loading = false;
|
||||
this.Items = res.data;
|
||||
this.totalItems = res.paging.count;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<v-layout column wrap class="my-5" align-center>
|
||||
<v-layout column wrap class="my-5" align-center v-if="this.formReady">
|
||||
<v-flex xs12>
|
||||
<v-container grid-list-xl>
|
||||
<v-layout row wrap align-top>
|
||||
@@ -39,7 +39,12 @@ import PartAssemblyTop from "../components/inventorypartassemblytop";
|
||||
|
||||
export default {
|
||||
beforeCreate() {
|
||||
this.$gzlocale.fetch(["Inventory"]);
|
||||
this.$gzlocale
|
||||
.fetch(["Inventory"])
|
||||
.then(() => (this.formReady = true))
|
||||
.catch(err => {
|
||||
throw err;
|
||||
});
|
||||
},
|
||||
components: {
|
||||
WidgetList,
|
||||
@@ -49,7 +54,9 @@ export default {
|
||||
PartAssemblyTop
|
||||
},
|
||||
data() {
|
||||
return {};
|
||||
return {
|
||||
formReady: false
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -21,6 +21,7 @@ export default {
|
||||
.fetch(["Log"])
|
||||
.then(() => (this.formReady = true))
|
||||
.catch(err => {
|
||||
this.formReady = true;
|
||||
throw err;
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user