Переделана структура инспекции
This commit is contained in:
1 parent
7b0cb7ed8c
commit
6c9b5a103e
7 files changed
+219
-220
No files matched your search
@@ -1,108 +0,0 @@
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import { VueFlow, useVueFlow } from '@vue-flow/core'
|
||||
import { ControlButton, Controls } from '@vue-flow/controls'
|
||||
import { Background } from '@vue-flow/background'
|
||||
import "@vue-flow/core/dist/style.css"
|
||||
import { initialEdges, initialNodes } from './structure_com/initial-elements'
|
||||
import Icon from './structure_com/Icon.vue'
|
||||
|
||||
/**
|
||||
* useVueFlow provides all event handlers and store properties
|
||||
* You can pass the composable an object that has the same properties as the VueFlow component props
|
||||
*/
|
||||
const { onPaneReady, onNodeDragStop, onConnect, addEdges, setViewport, toObject } = useVueFlow()
|
||||
defineProps(['label'])
|
||||
const nodes = ref(initialNodes)
|
||||
|
||||
const edges = ref(initialEdges)
|
||||
|
||||
// our dark mode toggle flag
|
||||
const dark = ref(false)
|
||||
|
||||
/**
|
||||
* This is a Vue Flow event-hook which can be listened to from anywhere you call the composable, instead of only on the main component
|
||||
* Any event that is available as `@event-name` on the VueFlow component is also available as `onEventName` on the composable and vice versa
|
||||
*
|
||||
* onPaneReady is called when viewpane & nodes have visible dimensions
|
||||
*/
|
||||
onPaneReady(({ fitView }) => {
|
||||
fitView()
|
||||
})
|
||||
|
||||
/**
|
||||
* onNodeDragStop is called when a node is done being dragged
|
||||
*
|
||||
* Node drag events provide you with:
|
||||
* 1. the event object
|
||||
* 2. the nodes array (if multiple nodes are dragged)
|
||||
* 3. the node that initiated the drag
|
||||
* 4. any intersections with other nodes
|
||||
*/
|
||||
onNodeDragStop(({ event, nodes, node, intersections }) => {
|
||||
console.log('Node Drag Stop', { event, nodes, node, intersections })
|
||||
})
|
||||
|
||||
/**
|
||||
* onConnect is called when a new connection is created.
|
||||
*
|
||||
* You can add additional properties to your new edge (like a type or label) or block the creation altogether by not calling `addEdges`
|
||||
*/
|
||||
onConnect((connection) => {
|
||||
addEdges(connection)
|
||||
})
|
||||
|
||||
/**
|
||||
* To update a node or multiple nodes, you can
|
||||
* 1. Mutate the node objects *if* you're using `v-model`
|
||||
* 2. Use the `updateNode` method (from `useVueFlow`) to update the node(s)
|
||||
* 3. Create a new array of nodes and pass it to the `nodes` ref
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Resets the current viewport transformation (zoom & pan)
|
||||
*/
|
||||
function resetTransform() {
|
||||
setViewport({ x: 0, y: 0, zoom: 1 })
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<VueFlow :nodes="nodes" :edges="edges" :class="{ dark }" class="basicflow" :default-viewport="{ zoom: 1 }" :min-zoom="1"
|
||||
:max-zoom="1" fit-view-on-init>
|
||||
<Background bgColor="#ffff" />
|
||||
<Controls position="top-right">
|
||||
<ControlButton title="Reset Transform" @click="resetTransform">
|
||||
<Icon name="reset" />
|
||||
</ControlButton>
|
||||
</Controls>
|
||||
</VueFlow>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
.up-bosses {
|
||||
width: 300px;
|
||||
border-radius: 5px;
|
||||
background-color: #ffff;
|
||||
text-transform: uppercase;
|
||||
text-align: center;
|
||||
font-size: .95em;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
|
||||
.bosses {
|
||||
width: 12%;
|
||||
padding: .5%;
|
||||
border-radius: 5px;
|
||||
background-color: #ffff;
|
||||
text-transform: uppercase;
|
||||
text-align: center;
|
||||
font-size: .95em;
|
||||
}
|
||||
</style>
|
||||
File renamed without changes.
@@ -0,0 +1,25 @@
|
||||
|
||||
|
||||
<template>
|
||||
<v-card :elevation="3" :width="width" :height="height">
|
||||
|
||||
<Handle type="source" :position="Position.Right" />
|
||||
<v-card-text class="nodrag nopan d-flex justify-center align-center
|
||||
text-h6
|
||||
bg-teal-lighten-5 text-center text-teal-darken-4 h-50 pa-3">
|
||||
<p class="pa-5">{{ label }}</p>
|
||||
</v-card-text>
|
||||
<v-card-text class=" text-center text-h6 d-flex justify-center align-center pa-3">
|
||||
<p>{{ data }}</p>
|
||||
</v-card-text>
|
||||
|
||||
<Handle type="source" :position="Position.Bottom" />
|
||||
</v-card>
|
||||
</template>
|
||||
<script setup>
|
||||
import { Position, Handle } from '@vue-flow/core'
|
||||
import "@vue-flow/core/dist/style.css"
|
||||
|
||||
// props were passed from the slot using `v-bind="customNodeProps"`
|
||||
const props = defineProps(['label', 'data', 'width', 'height'])
|
||||
</script>
|
||||
File renamed without changes.
@@ -0,0 +1,190 @@
|
||||
|
||||
|
||||
<template>
|
||||
<VueFlow :nodes="nodes" :edges="edges" :class="{ dark }" class="basicflow" :default-viewport="{ zoom: 1 }" :min-zoom="1"
|
||||
:max-zoom="1" fit-view-on-init>
|
||||
<template #node-boss="bossNodeProps">
|
||||
<BossNode :width="500" :height="100" v-bind="bossNodeProps" />
|
||||
</template>
|
||||
<template #node-middleboss="bossNodeProps">
|
||||
<BossNode :width="230" :height="170" v-bind="bossNodeProps" />
|
||||
</template>
|
||||
<template #node-deps="bossNodeProps">
|
||||
<BossNode :width="250" :height="180" v-bind="bossNodeProps" />
|
||||
</template>
|
||||
|
||||
<Background bgColor="#ffff" />
|
||||
<Controls position="top-right">
|
||||
<ControlButton title="Reset Transform" @click="resetTransform">
|
||||
<Icon name="reset" />
|
||||
</ControlButton>
|
||||
</Controls>
|
||||
</VueFlow>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { ref } from 'vue'
|
||||
import { VueFlow, useVueFlow, Position } from '@vue-flow/core'
|
||||
import { ControlButton, Controls } from '@vue-flow/controls'
|
||||
import { Background } from '@vue-flow/background'
|
||||
import "@vue-flow/core/dist/style.css"
|
||||
import "@vue-flow/core/dist/theme-default.css"
|
||||
import Icon from './Icon.vue'
|
||||
import BossNode from './BossNode.vue'
|
||||
|
||||
|
||||
export default {
|
||||
components: {
|
||||
VueFlow,
|
||||
useVueFlow,
|
||||
Position,
|
||||
ControlButton,
|
||||
Controls,
|
||||
Background,
|
||||
Icon,
|
||||
BossNode
|
||||
},
|
||||
|
||||
setup() {
|
||||
const dark = ref(false)
|
||||
|
||||
const { onPaneReady, onConnect, addEdges, setViewport } = useVueFlow()
|
||||
|
||||
function resetTransform() {
|
||||
setViewport({ x: 0, y: 0, zoom: 1 })
|
||||
}
|
||||
|
||||
onConnect((connection) => {
|
||||
addEdges(connection)
|
||||
})
|
||||
|
||||
onPaneReady(({ fitView }) => {
|
||||
fitView()
|
||||
})
|
||||
|
||||
resetTransform()
|
||||
return {
|
||||
dark,
|
||||
nodes: ref([
|
||||
{
|
||||
id: '1',
|
||||
label: 'Руководитель МИ ФНС России по ЦОД №2',
|
||||
data: 'Борис Борисович Толоко ',
|
||||
type: 'boss',
|
||||
position: { x: 280, y: 50 }
|
||||
},
|
||||
{
|
||||
id: '2',
|
||||
type: 'middleboss',
|
||||
label: 'Заместитель начальника',
|
||||
data: 'Андреева Наталья Владимировна',
|
||||
position: { x: 140, y: 280 }
|
||||
},
|
||||
{
|
||||
id: '3',
|
||||
type: 'middleboss',
|
||||
label: 'Заместитель начальника',
|
||||
data: 'Ахкубеков Мухамат Алиевич',
|
||||
position: { x: 680, y: 280 }
|
||||
},
|
||||
{
|
||||
id: '4',
|
||||
type: 'middleboss',
|
||||
label: 'Заместитель начальника',
|
||||
data: 'Послухаев Артем Николаевич',
|
||||
position: { x: 1220, y: 280 }
|
||||
},
|
||||
{
|
||||
id: '5',
|
||||
type: 'middleboss',
|
||||
label: 'Общий отдел',
|
||||
data: ' Начальник Золина Татьяна Евгеньевна ',
|
||||
position: { x: 792, y: 20 }
|
||||
},
|
||||
{
|
||||
id: '6',
|
||||
type: 'middleboss',
|
||||
label: 'Отдел кадров и безопасности',
|
||||
data: 'Начальник Фролова Ирина Николаевна',
|
||||
position: { x: 1030, y: 20 }
|
||||
},
|
||||
{
|
||||
id: '7',
|
||||
type: 'middleboss',
|
||||
label: 'Отдел управления качеством данных',
|
||||
data: ' Начальник Гончаров Церен Викторович',
|
||||
position: { x: 1268, y: 20 }
|
||||
},
|
||||
{
|
||||
id: '8',
|
||||
type: 'deps',
|
||||
label: 'Отдел по сопровождению интернет-сервисов',
|
||||
data: ' Начальник Лосева Екатерина Владимировна',
|
||||
position: { x: 1080, y: 500 }
|
||||
},
|
||||
|
||||
{
|
||||
id: '9',
|
||||
type: 'deps',
|
||||
label: 'Отдел внедрения технологических процессов',
|
||||
data: ' Начальник Туркова Мария Николаевна',
|
||||
position: { x: 1340, y: 500 }
|
||||
},
|
||||
{
|
||||
id: '10',
|
||||
type: 'deps',
|
||||
label: 'Отдел контроля технологических процессов',
|
||||
data: ' Начальник Михайлов Виктор Валентинович',
|
||||
position: { x: 800, y: 500 }
|
||||
},
|
||||
{
|
||||
id: '11',
|
||||
type: 'deps',
|
||||
label: 'Отдел ведения ведомственной модели данных',
|
||||
data: ' Начальник Щедрин Владимир Дмитриевич',
|
||||
position: { x: 540, y: 500 }
|
||||
},
|
||||
{
|
||||
id: '12',
|
||||
type: 'deps',
|
||||
label: 'Отдел развития личного кабинеита налогоплательщика физического лица',
|
||||
data: 'И.О.начальника Романова Марина Александровна',
|
||||
position: { x: 0, y: 500 }
|
||||
},
|
||||
{
|
||||
id: '13',
|
||||
type: 'deps',
|
||||
label: 'Отдел обработки обращений граждан',
|
||||
data: 'Начальник Ванюшкина Наталья Николаевна',
|
||||
position: { x: 260, y: 500 }
|
||||
},
|
||||
|
||||
|
||||
]),
|
||||
|
||||
edges: ref([
|
||||
// { id: 'e1-6', type: 'step', source: '1', target: '6' },
|
||||
// { id: 'e1-7', type: 'step', source: '1', target: '7' },
|
||||
// { id: 'e1-5', type: 'step', source: '1', target: '5' },
|
||||
// { id: 'e1-2', type: 'step', source: '1', target: '2' },
|
||||
// { id: 'e1-3', type: 'step', source: '1', target: '3' },
|
||||
// { id: 'e1-4', type: 'step', source: '1', target: '4' },
|
||||
// { id: 'e1-5', type: 'step', source: '1', target: '5' },
|
||||
// { id: 'e1-7', type: 'step', source: '1', target: '7' },
|
||||
// { id: 'e4-9', source: '4', target: '8' },
|
||||
// { id: 'e4-10', source: '4', target: '9' },
|
||||
// { id: 'e3-11', source: '3', target: '10' },
|
||||
// { id: 'e3-12', source: '3', target: '11' },
|
||||
// { id: 'e2-13', source: '2', target: '12' },
|
||||
// { id: 'e2-14', source: '2', target: '13' },
|
||||
])
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style></style>
|
||||
@@ -1,109 +0,0 @@
|
||||
|
||||
|
||||
export const initialNodes = [
|
||||
{
|
||||
id: '1',
|
||||
class: 'up-bosses',
|
||||
label: '<p>Андрей Владимирович Бударин</p><p>Заместитель руководителя Федеральной Налоговой Службы</p>',
|
||||
position: { x: 590, y: 0 }
|
||||
},
|
||||
|
||||
{
|
||||
id: '2',
|
||||
class: 'up-bosses',
|
||||
label: '<p>Борис Борисович Толоко</p><p>Руководитель МИ ФНС России по ЦОД №2</p>',
|
||||
position: { x: 590, y: 100 }
|
||||
},
|
||||
{
|
||||
id: '3',
|
||||
class: 'bosses',
|
||||
label: '<p>Андреева Наталья Владимировна</p><p>Заместитель начальника</p>',
|
||||
position: { x: 0, y: 250 }
|
||||
},
|
||||
{
|
||||
id: '4',
|
||||
class: 'bosses',
|
||||
label: '<p>Ахкубеков Мухамат Алиевич</p><p>Заместитель начальника</p>',
|
||||
position: { x: 220, y: 250 }
|
||||
},
|
||||
{
|
||||
id: '5',
|
||||
class: 'bosses',
|
||||
label: '<p>Послухаев Артем Николаевич</p><p>Заместитель начальника</p>',
|
||||
position: { x: 440, y: 250 }
|
||||
},
|
||||
{
|
||||
id: '6',
|
||||
class: 'bosses',
|
||||
label: '<p>Общий отдел</p><p>Золина Татьяна Евгеньевна</p><p>Начальник</p> ',
|
||||
position: { x: 850, y: 250 }
|
||||
},
|
||||
{
|
||||
id: '7',
|
||||
class: 'bosses',
|
||||
label: '<p>Отдел кадров и безопасности</p><p>Фролова Ирина Николаевна</p><p>Начальник</p> ',
|
||||
position: { x: 1070, y: 250 }
|
||||
},
|
||||
{
|
||||
id: '8',
|
||||
class: 'bosses',
|
||||
label: '<p>Отдел управления качеством данных</p><p>Гончаров Церен Викторович</p><p>Начальник</p>',
|
||||
position: { x: 1290, y: 250 }
|
||||
},
|
||||
{
|
||||
id: '9',
|
||||
class: 'bosses',
|
||||
label: '<p>Отдел по сопровождению интернет-сервисов</p><p>Лосева Екатерина Владимировна</p><p>Начальник</p>',
|
||||
position: { x: 970, y: 600 }
|
||||
},
|
||||
|
||||
{
|
||||
id: '10',
|
||||
class: 'bosses',
|
||||
label: '<p>Отдел внедрения технологических процессов</p><p>Туркова Мария Николаевна</p><p>Начальник</p>',
|
||||
position: { x: 1170, y: 600 }
|
||||
},
|
||||
{
|
||||
id: '11',
|
||||
class: 'bosses',
|
||||
label: '<p>Отдел контроля технологических процессов</p><p>Михайлов Виктор Валентинович</p><p>Начальник</p>',
|
||||
position: { x: 680, y: 600 }
|
||||
},
|
||||
{
|
||||
id: '12',
|
||||
class: 'bosses',
|
||||
label: '<p>Отдел ведения ведомственной модели данных</p><p>Щедрин Владимир Дмитриевич</p><p>Начальник</p>',
|
||||
position: { x: 480, y: 600 }
|
||||
},
|
||||
{
|
||||
id: '13',
|
||||
class: 'bosses',
|
||||
label: '<p>Отдел развития личного кабинеита налогоплательщика физического лица</p><p>Романова Марина Александровна</p><p>И.О.начальника</p>',
|
||||
position: { x: 0, y: 600 }
|
||||
},
|
||||
{
|
||||
id: '14',
|
||||
class: 'bosses',
|
||||
label: '<p>Отдел обработки обращений граждан</p><p>Ванюшкина Наталья Николаевна</p><p>Начальник</p>',
|
||||
position: { x: 200, y: 600 }
|
||||
},
|
||||
|
||||
|
||||
]
|
||||
|
||||
export const initialEdges = [
|
||||
{ id: 'e1-2', type: 'step', source: '1', target: '2' },
|
||||
{ id: 'e2-3', type: 'step', source: '2', target: '3' },
|
||||
{ id: 'e2-4', type: 'step', source: '2', target: '4' },
|
||||
{ id: 'e2-5', type: 'step', source: '2', target: '5' },
|
||||
{ id: 'e2-6', type: 'step', source: '2', target: '6' },
|
||||
{ id: 'e2-7', type: 'step', source: '2', target: '7' },
|
||||
{ id: 'e2-8', type: 'step', source: '2', target: '8' },
|
||||
{ id: 'e5-9', source: '5', target: '9' },
|
||||
{ id: 'e5-10', source: '5', target: '10' },
|
||||
{ id: 'e4-11', source: '4', target: '11' },
|
||||
{ id: 'e4-12', source: '4', target: '12' },
|
||||
{ id: 'e3-13', source: '3', target: '13' },
|
||||
{ id: 'e3-14', source: '3', target: '14' },
|
||||
|
||||
]
|
||||
@@ -92,7 +92,8 @@
|
||||
<v-col v-for="direction in directionworks" :key="direction.id" lg="12">
|
||||
<v-card class="ma-3 d-flex" :elevation="3" :height="100">
|
||||
<v-col class="d-flex align-center justify-center">
|
||||
<v-avatar class="mt-1 ml-1 pa-0 elevation-10" color="blue-darken-2">
|
||||
<v-avatar class="mt-1 ml-1 pa-0 elevation-10 text-teal-darken-4"
|
||||
color="teal-lighten-5">
|
||||
<v-icon :icon="direction.icon_name"></v-icon>
|
||||
</v-avatar>
|
||||
</v-col>
|
||||
@@ -127,8 +128,8 @@ import { ref } from 'vue'
|
||||
import { axiosApiInstance } from '@/utils/axios-api'
|
||||
import { checkremote } from '@/utils/universal_functions'
|
||||
import { spravURL, baseURL } from '@/utils/axios-api'
|
||||
import StructureInspection from '@/components/StructureInspection.vue';
|
||||
import ContactInfo from '@/components/ContactInfo.vue';
|
||||
import StructureInspection from '@/components/about_inspection/structure/StructureInspection.vue';
|
||||
import ContactInfo from '@/components/about_inspection/contacts/ContactInfo.vue';
|
||||
import { pagecounter } from '@/utils/universal_functions'
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user