.
This commit is contained in:
@@ -917,12 +917,28 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<!-- Кнопка создания стратегии -->
|
||||||
|
<section v-if="report && !embedded" class="space-y-3">
|
||||||
|
<div class="rounded-2xl bg-white shadow-sm border border-slate-200/60 p-4 md:p-6">
|
||||||
|
<div class="flex items-center justify-center">
|
||||||
|
<Button
|
||||||
|
label="Создать стратегию"
|
||||||
|
icon="pi pi-magic"
|
||||||
|
severity="success"
|
||||||
|
size="large"
|
||||||
|
@click="goToStrategy"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import katex from 'katex';
|
import katex from 'katex';
|
||||||
|
import Button from 'primevue/button';
|
||||||
import Dropdown from 'primevue/dropdown';
|
import Dropdown from 'primevue/dropdown';
|
||||||
import InputText from 'primevue/inputtext';
|
import InputText from 'primevue/inputtext';
|
||||||
import Message from 'primevue/message';
|
import Message from 'primevue/message';
|
||||||
@@ -931,9 +947,9 @@ import ProgressSpinner from 'primevue/progressspinner';
|
|||||||
import Textarea from 'primevue/textarea';
|
import Textarea from 'primevue/textarea';
|
||||||
import { useToast } from 'primevue/usetoast';
|
import { useToast } from 'primevue/usetoast';
|
||||||
import { computed, ref } from 'vue';
|
import { computed, ref } from 'vue';
|
||||||
|
import { useRoute, useRouter } from 'vue-router';
|
||||||
|
|
||||||
import PptConclusionBox from '@/components/marketing/PptConclusionBox.vue';
|
import PptConclusionBox from '@/components/marketing/PptConclusionBox.vue';
|
||||||
import PptFunnel from '@/components/marketing/PptFunnel.vue';
|
|
||||||
import PptKpiCard from '@/components/marketing/PptKpiCard.vue';
|
import PptKpiCard from '@/components/marketing/PptKpiCard.vue';
|
||||||
import MarketingService from '@/service/MarketingService';
|
import MarketingService from '@/service/MarketingService';
|
||||||
|
|
||||||
@@ -945,6 +961,8 @@ const props = defineProps({
|
|||||||
});
|
});
|
||||||
|
|
||||||
const toast = useToast();
|
const toast = useToast();
|
||||||
|
const route = useRoute();
|
||||||
|
const router = useRouter();
|
||||||
|
|
||||||
const localReport = ref(null);
|
const localReport = ref(null);
|
||||||
const localLoading = ref(false);
|
const localLoading = ref(false);
|
||||||
@@ -1045,6 +1063,23 @@ function resetDashboard() {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function goToStrategy() {
|
||||||
|
const analysisId = route.query.analysisId;
|
||||||
|
if (analysisId) {
|
||||||
|
router.push({
|
||||||
|
name: 'marketing-promotion',
|
||||||
|
query: { analysisId }
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
toast.add({
|
||||||
|
severity: 'warn',
|
||||||
|
summary: 'Предупреждение',
|
||||||
|
detail: 'Не найден ID анализа',
|
||||||
|
life: 3000
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const PPT_BLUE = '#5B89FF';
|
const PPT_BLUE = '#5B89FF';
|
||||||
const PPT_ORANGE = '#FF8E4F';
|
const PPT_ORANGE = '#FF8E4F';
|
||||||
const PPT_GREEN = '#52C41A';
|
const PPT_GREEN = '#52C41A';
|
||||||
|
|||||||
@@ -775,14 +775,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- Кнопки действий (всегда видны) -->
|
<!-- Кнопки действий (всегда видны, когда есть анализ) -->
|
||||||
<div class="card">
|
<div v-if="(status === 'completed' && report) || v2ReportNormalized" class="card">
|
||||||
<div class="card-content text-center">
|
<div class="card-content text-center">
|
||||||
<div class="flex gap-3 justify-content-center flex-wrap">
|
<div class="flex gap-3 justify-content-center flex-wrap">
|
||||||
<Button label="Создать стратегию на основе анализа" icon="pi pi-magic" severity="success" @click="goToStrategy" />
|
<Button label="Создать стратегию на основе анализа" icon="pi pi-magic" severity="success" @click="goToStrategy" />
|
||||||
<Button label="Создать новый анализ" icon="pi pi-plus" severity="secondary" @click="resetAnalysis" />
|
<Button label="Создать новый анализ" icon="pi pi-plus" severity="secondary" @click="resetAnalysis" />
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user