Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F83473562
InterferenceAddView.vue
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, Sep 17, 08:16
Size
1 KB
Mime Type
text/html
Expires
Thu, Sep 19, 08:16 (2 d)
Engine
blob
Format
Raw Data
Handle
20844319
Attached To
R12546 Sesame - Configurator
InterferenceAddView.vue
View Options
<script setup>
import { ref } from 'vue';
import { useRouter } from 'vue-router';
import { useScenarioStore } from '../stores';
import ElemTypeToggle from '../components/ElemTypeToggle.vue';
import AmbianceInterferenceForm from '../components/AmbianceInterferenceForm.vue';
import SoundInterferenceForm from '../components/SoundInterferenceForm.vue';
import VisualInterferenceForm from '../components/VisualInterferenceForm.vue';
import FullInterferenceForm from '../components/FullInterferenceForm.vue';
import PartialInterferenceForm from '../components/PartialInterferenceForm.vue';
const router = useRouter();
const scenarioStore = useScenarioStore();
await scenarioStore.fetch();
const scenario = scenarioStore.state.find(v => v.id == router.currentRoute.value.params.id);
const type = ref();
const onTypeChange = (n) => {
router.push(router.currentRoute.value.path.replace(type.value, n));
type.value = n;
};
</script>
<template>
<v-container>
<div class="text-h6 text-center">pour {{ scenario.scenarioID }}</div>
<v-row class="ma-4" justify="center">
<ElemTypeToggle
:types="[
{ name: 'ambiance', value: 'ambiance' },
{ name: 'sonore', value: 'sound' },
{ name: 'visuelle', value: 'visual' },
{ name: 'libre', value: 'full' },
{ name: 'liée', value: 'partial' }
]"
@on-type-change="onTypeChange"
/>
</v-row>
<v-row>
<AmbianceInterferenceForm v-if="type === 'ambiance'" />
<SoundInterferenceForm v-if="type === 'sound'" />
<VisualInterferenceForm v-if="type === 'visual'" />
<FullInterferenceForm v-if="type === 'full'" />
<PartialInterferenceForm v-if="type === 'partial'" />
</v-row>
</v-container>
</template>
Event Timeline
Log In to Comment