DefineTreatment.vue 1.08 KB
Newer Older
1
2
3
4
5
6
<template>
  <v-container class="my-5">
    <v-card outlined class="px-6 mb-5">
      <v-card-title class="justify-center py-6">
        <h1 class="display-3">Choix des modules</h1>
      </v-card-title>
Quentin David's avatar
Quentin David committed
7
8
      <DefinePipeline class="my-5" @add-module="updateChain" />
      <ModuleChain class="my-5" @delete-module="deleteModuleFromChain" :added_modules="chain"/>
9
    </v-card>
Quentin David's avatar
Quentin David committed
10
    <v-btn block color="success" to="/validation"> Lancer le traitement </v-btn>
11
12
13
14
15
  </v-container>
</template>

<script>
  import DefinePipeline from '@/components/DefineTreatment/DefinePipeline'
Quentin David's avatar
Quentin David committed
16
  import ModuleChain from '@/components/DefineTreatment/ModuleChain'
17
18
19
20
  export default {
    name: 'Treatment',
    components: {
      DefinePipeline,
Quentin David's avatar
Quentin David committed
21
      ModuleChain,
22
    },
Quentin David's avatar
Quentin David committed
23
24
25
26
27
28
29
30
31
32
33
34
35
36
    data: () => ({
      chain: [],
    }),
    methods: {
      updateChain: function(module) {
        this.chain.push(module);
        console.log("CHain:");
        console.log(this.chain);
      },
      deleteModuleFromChain: function(index) {
        this.chain.splice(index, 1);
        console.log("Removed from list");
      }
    }
37
38
  }
</script>