This commit is contained in:
2020-04-13 18:29:26 +00:00
parent 67d77e598e
commit 55b14081f7
2 changed files with 27 additions and 8 deletions

View File

@@ -145,16 +145,31 @@ export default {
},
methods: {
openItem(item) {
window.$gz.eventBus.$emit("openobject", {
type: item.objectType,
id: item.objectId
});
if (item.userId) {
window.$gz.eventBus.$emit("openobject", {
type: window.$gz.type.User,
id: item.userId
});
} else {
window.$gz.eventBus.$emit("openobject", {
type: item.objectType,
id: item.objectId
});
}
},
openHistoryOfItem(item) {
this.$router.push({
name: "ay-history",
params: { ayatype: item.objectType, recordid: item.objectId }
});
if (item.userId) {
//object log, so open is for user
this.$router.push({
name: "ay-history",
params: { ayatype: window.$gz.type.User, recordid: item.userId }
});
} else {
this.$router.push({
name: "ay-history",
params: { ayatype: item.objectType, recordid: item.objectId }
});
}
},
canViewUserHistory(objectlogitem) {
//For object log to decide if view history of user in item is allowed