This commit is contained in:
@@ -1,11 +1,5 @@
|
||||
<template>
|
||||
<div>
|
||||
<div v-if="objectType && objectId" class="mb-6">
|
||||
<v-icon data-cy="clickThru" @click="navToTarget()" large>{{
|
||||
iconForType()
|
||||
}}</v-icon
|
||||
><span @click="navToTarget()" class="text-h5"> {{ name }}</span>
|
||||
</div>
|
||||
<gz-report-selector ref="reportSelector"></gz-report-selector>
|
||||
<gz-extensions
|
||||
:aya-type="ayType"
|
||||
@@ -22,6 +16,8 @@
|
||||
:reload="reload"
|
||||
@selection-change="handleSelected"
|
||||
data-cy="reviewsTable"
|
||||
:pre-filter-mode="preFilterMode"
|
||||
@clear-pre-filter="clearPreFilter"
|
||||
>
|
||||
</gz-data-table>
|
||||
</div>
|
||||
@@ -44,6 +40,14 @@ export default {
|
||||
if (vm.objectId && vm.objectId != 0 && vm.objectType) {
|
||||
//OBJECTID,AYATYPE
|
||||
vm.clientCriteria = `${vm.objectId},${vm.objectType}`;
|
||||
|
||||
vm.preFilterMode = {
|
||||
icon: window.$gz.util.iconForType(vm.objectType),
|
||||
id: vm.objectId,
|
||||
ayatype: vm.objectType,
|
||||
viz: vm.$route.params.name,
|
||||
clearable: true
|
||||
};
|
||||
}
|
||||
|
||||
generateMenu(vm);
|
||||
@@ -58,6 +62,7 @@ export default {
|
||||
selectedItems: [],
|
||||
reload: false,
|
||||
clientCriteria: undefined,
|
||||
preFilterMode: null,
|
||||
objectId: null,
|
||||
objectType: null,
|
||||
name: null
|
||||
@@ -69,18 +74,23 @@ export default {
|
||||
// }
|
||||
// },
|
||||
methods: {
|
||||
navToTarget: function() {
|
||||
window.$gz.eventBus.$emit("openobject", {
|
||||
type: this.objectType,
|
||||
id: this.objectId
|
||||
});
|
||||
},
|
||||
// navToTarget: function() {
|
||||
// window.$gz.eventBus.$emit("openobject", {
|
||||
// type: this.objectType,
|
||||
// id: this.objectId
|
||||
// });
|
||||
// },
|
||||
handleSelected(selected) {
|
||||
this.selectedItems = selected;
|
||||
},
|
||||
iconForType() {
|
||||
return window.$gz.util.iconForType(this.objectType, 10);
|
||||
clearPreFilter() {
|
||||
this.clientCriteria = null;
|
||||
this.preFilterMode = null;
|
||||
this.reload = !this.reload;
|
||||
}
|
||||
// iconForType() {
|
||||
// return window.$gz.util.iconForType(this.objectType, 10);
|
||||
// }
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user