|
@@ -10,13 +10,17 @@ import gql from 'graphql-tag'
|
|
|
import GQL from '@api/graphql-axios'
|
|
|
import EntiteFields from '@api/gql/entite.fragment.gql'
|
|
|
|
|
|
+import SvgIcon from '@jamescoyle/vue-icon';
|
|
|
+import { mdiHeadphones } from '@mdi/js';
|
|
|
+
|
|
|
|
|
|
export default {
|
|
|
props: ['id', 'eid'],
|
|
|
data(){
|
|
|
return {
|
|
|
entite: null,
|
|
|
- opened_besoin_id: null
|
|
|
+ opened_besoin_id: null,
|
|
|
+ headphones_path: mdiHeadphones
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -32,7 +36,10 @@ export default {
|
|
|
...mapState(ConcernementsStore,['p_reception_et_traitement']),
|
|
|
...mapState(ConcernementsStore,['p_mise_en_oeuvre_decision']),
|
|
|
...mapState(ConcernementsStore,['p_reception_application_decision']),
|
|
|
- ...mapState(CommonStore,['hover_elmt'])
|
|
|
+ ...mapState(CommonStore,['hover_elmt']),
|
|
|
+ display_concernement(){
|
|
|
+ return this.ct_concernement && !this.entite && this.map_mode !== 'puissancedagir'&& this.map_mode !== 'doleancer';
|
|
|
+ }
|
|
|
},
|
|
|
created () {
|
|
|
console.log(`Concernement view created, id: ${this.id}, eid: ${this.eid}, opened_concernement:${this.opened_concernement}`);
|
|
@@ -70,6 +77,7 @@ export default {
|
|
|
methods: {
|
|
|
...mapActions(ConcernementsStore,['openCloseConcernements']),
|
|
|
...mapActions(ConcernementsStore,['setOpenedEntityId']),
|
|
|
+ ...mapActions(ConcernementsStore,['setMapMode']),
|
|
|
openEntity(){
|
|
|
this.setOpenedEntityId(parseInt(this.eid))
|
|
|
this.loadEntite()
|
|
@@ -101,6 +109,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
components: {
|
|
|
+ SvgIcon
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -109,15 +118,47 @@ export default {
|
|
|
<template>
|
|
|
<section v-if="opened_concernement" class="concernement">
|
|
|
<header v-if="concernements_loaded">
|
|
|
- <label
|
|
|
- v-if="ct_concernement && !entite && map_mode !== 'puissancedagir'&& map_mode !== 'doleancer'"
|
|
|
+ <div class="pre-header">
|
|
|
+ <!-- concernement -->
|
|
|
+ <label
|
|
|
+ v-if="display_concernement"
|
|
|
>
|
|
|
{{ ct_concernement.title.description }}
|
|
|
</label>
|
|
|
- <h3 v-if="entite">{{ entite.title }}</h3>
|
|
|
- <span v-if="entite && opened_concernement.entites_byid[eid].menacemaintien < 0">menace</span>
|
|
|
- <span v-if="entite && opened_concernement.entites_byid[eid].menacemaintien > 0">maintient</span>
|
|
|
- <h2>{{ opened_concernement.title }}</h2>
|
|
|
+ <!-- entite -->
|
|
|
+ <h3 v-if="entite">{{ entite.title }}</h3>
|
|
|
+ <span v-if="entite && opened_concernement.entites_byid[eid].menacemaintien < 0" class="menacemaintient">menace</span>
|
|
|
+ <span v-if="entite && opened_concernement.entites_byid[eid].menacemaintien > 0" class="menacemaintient">maintient</span>
|
|
|
+ </div>
|
|
|
+ <div class="concernement-cartouche">
|
|
|
+ <h2 :class='{ faded: !display_concernement}'>{{ opened_concernement.title }}</h2>
|
|
|
+ <nav class="icons">
|
|
|
+ <ul>
|
|
|
+ <li v-if="opened_concernement.has_recit" >
|
|
|
+ <svg-icon type="mdi" :path="headphones_path"></svg-icon>
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <a href="#terraindevie" @click="setMapMode('terraindevie')"><span class="icon terraindevie"></span></a>
|
|
|
+ </li>
|
|
|
+ <li v-if="opened_concernement.has_puissancedagir" >
|
|
|
+ <a href="#puissanceagir" @click="setMapMode('puissanceagit')"><span class="icon puissancedagir"></span></a>
|
|
|
+ </li>
|
|
|
+ <li v-if="opened_concernement.has_proximite" >
|
|
|
+ <a href="#proximite" @click="setMapMode('proximite')"><span class="icon proximite"></span></a>
|
|
|
+ </li>
|
|
|
+ <li v-if="opened_concernement.has_superposition" >
|
|
|
+ <a href="#superposition" @click="setMapMode('superposition')"><span class="icon superposition"></span></a>
|
|
|
+ </li>
|
|
|
+ <li v-if="opened_concernement.has_agissantes" >
|
|
|
+ <a href="#action" @click="setMapMode('action')"><span class="icon action"></span></a>
|
|
|
+ </li>
|
|
|
+ <li v-if="opened_concernement.has_doleance" >
|
|
|
+ <a href="#doleancer" @click="setMapMode('doleancer')"><span class="icon doleancer"></span></a>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ </nav>
|
|
|
+
|
|
|
+ </div>
|
|
|
</header>
|
|
|
<!-- concernement -->
|
|
|
<section
|