This commit is contained in:
@@ -116,12 +116,13 @@ export default {
|
|||||||
}, /////////////////////////////////////
|
}, /////////////////////////////////////
|
||||||
// Show a report list
|
// Show a report list
|
||||||
//
|
//
|
||||||
async getReportChoice(vm, reports) {
|
async getReportChoice(vm, reports, preselected) {
|
||||||
const result = await vm.$dialog.showAndWait(reportChooser, {
|
const result = await vm.$dialog.showAndWait(reportChooser, {
|
||||||
reports: reports,
|
reports: reports,
|
||||||
title: vm.$gzlocale.get("Report"),
|
title: vm.$gzlocale.get("Report"),
|
||||||
oktext: vm.$gzlocale.get("Print"),
|
oktext: vm.$gzlocale.get("Print"),
|
||||||
canceltext: vm.$gzlocale.get("Cancel")
|
canceltext: vm.$gzlocale.get("Cancel"),
|
||||||
|
selectedvalue: preselected
|
||||||
});
|
});
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
/* eslint-disable */
|
/* Xeslint-disable */
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -21,6 +21,11 @@ export default {
|
|||||||
// setTimeout(resolve, 3000)
|
// setTimeout(resolve, 3000)
|
||||||
// })
|
// })
|
||||||
// },
|
// },
|
||||||
|
created() {
|
||||||
|
if (this.selectedvalue) {
|
||||||
|
this.selected = this.selectedvalue;
|
||||||
|
}
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
selected: {}
|
selected: {}
|
||||||
@@ -30,7 +35,8 @@ export default {
|
|||||||
title: String,
|
title: String,
|
||||||
oktext: String,
|
oktext: String,
|
||||||
canceltext: String,
|
canceltext: String,
|
||||||
reports: Array
|
reports: Array,
|
||||||
|
selectedvalue: Number
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
actions() {
|
actions() {
|
||||||
@@ -53,8 +59,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleClick(res) {
|
handleClick() {
|
||||||
// debugger;
|
|
||||||
this.$emit("submit", this.selected);
|
this.$emit("submit", this.selected);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -184,8 +184,10 @@ function clickHandler(menuItem) {
|
|||||||
m.vm.duplicate();
|
m.vm.duplicate();
|
||||||
break;
|
break;
|
||||||
case "report":
|
case "report":
|
||||||
|
var reportList = m.vm.$gzreport.availableReports("WIDGET");
|
||||||
|
var selectedItem = reportList[0].value;
|
||||||
m.vm.$gzdialog
|
m.vm.$gzdialog
|
||||||
.getReportChoice(m.vm, m.vm.$gzreport.availableReports("WIDGET"))
|
.getReportChoice(m.vm, reportList, selectedItem)
|
||||||
.then(result => {
|
.then(result => {
|
||||||
m.vm.$gzevent.$emit(
|
m.vm.$gzevent.$emit(
|
||||||
"notify-success",
|
"notify-success",
|
||||||
|
|||||||
Reference in New Issue
Block a user