This commit is contained in:
@@ -67,7 +67,7 @@ export default {
|
|||||||
selectedReport: null
|
selectedReport: null
|
||||||
}),
|
}),
|
||||||
methods: {
|
methods: {
|
||||||
open(ayaType, idList) {
|
async open(ayaType, idList) {
|
||||||
let vm = this;
|
let vm = this;
|
||||||
if (ayaType == null || idList == null || idList.length == 0) {
|
if (ayaType == null || idList == null || idList.length == 0) {
|
||||||
throw "report-selector:Open missing type and or idList";
|
throw "report-selector:Open missing type and or idList";
|
||||||
@@ -75,15 +75,14 @@ export default {
|
|||||||
this.ayaType = ayaType;
|
this.ayaType = ayaType;
|
||||||
this.idList = idList;
|
this.idList = idList;
|
||||||
//get report list from server
|
//get report list from server
|
||||||
//for now we'll fake it
|
|
||||||
let fakeReportList = [];
|
let res = await window.$gz.api.get(`report/list/${ayaType}`);
|
||||||
for (let i = 0; i < 3; i++) {
|
console.log("report-selectr report list from server is: ", res);
|
||||||
fakeReportList.push({
|
if (res.error) {
|
||||||
name: "Fake report with the number " + i,
|
throw res.error;
|
||||||
id: i
|
} else {
|
||||||
});
|
this.reportList = res.data;
|
||||||
}
|
}
|
||||||
this.reportList = fakeReportList;
|
|
||||||
|
|
||||||
this.isVisible = true;
|
this.isVisible = true;
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user