Skip to content

Commit

Permalink
Merge pull request #450 from clayzenx/link-redirect-fix
Browse files Browse the repository at this point in the history
Переход по ссылке после смены представления
  • Loading branch information
rpiontik authored Nov 22, 2023
2 parents 721413e + 6e5e398 commit 17f6a03
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions src/frontend/components/Entities/Entity.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div v-bind:style="placeHolderStyle">
<doc
v-if="!isParamsInvalid && !refresh"
v-if="!isParamsInvalid && !refresh"
v-bind:path="presentationPath"
v-bind:params="entityParams"
v-bind:context-menu="toSwitchPres" />
Expand All @@ -20,11 +20,11 @@
import doc from '@front/components/Docs/DocHubDoc.vue';
import query from '@front/manifest/query';
import { uploadDocument } from './EntityUpload';
export default {
name: 'Entity',
name: 'Entity',
components: {
doc
},
Expand Down Expand Up @@ -64,7 +64,7 @@
},
// Стиль на время перестройки документа
placeHolderStyle() {
return this.minHeight ? { 'min-height': `${this.minHeight}px` } : undefined;
return this.minHeight ? { 'min-height': `${this.minHeight}px` } : undefined;
},
// Валидируем входящие параметры, если контракт на параметры определен
isParamsInvalid() {
Expand All @@ -77,15 +77,15 @@
Object.keys(items).map((id) => {
if (id === this.currentPresentation) return;
const schema = items[id].params;
if (!schema || !this.isInvalidParamsToPres(schema))
if (!schema || !this.isInvalidParamsToPres(schema))
result.push({
id,
title: items[id].title || id,
on: () => this.onSelectedPres(id)
});
});
return result;
},
},
// Получаем профиль представления
presProfile() {
return this.profile?.presentations?.[this.presentation] || {};
Expand All @@ -110,6 +110,9 @@
},
manifest() {
this.reloadProfile();
},
currentPresentation() {
this.reloadProfile();
}
},
mounted() {
Expand Down Expand Up @@ -173,7 +176,7 @@
uploadDocument(presProfile, path, this.entityParams, this.manifest);
} else { // Иначе переключаем презентацию
this.switchedPresentation = presentation;
/*
/*
this.$router.push({
path: `/entities/${this.entity}/${presentation}`,
query: this.$route.query
Expand Down

0 comments on commit 17f6a03

Please sign in to comment.