generated from VLADIMIR/template_frontend
add image and door
This commit is contained in:
@@ -17,7 +17,11 @@ const emptyNode: GraphNode = {
|
||||
code: "",
|
||||
name: "",
|
||||
text: "",
|
||||
image: "",
|
||||
applications: [],
|
||||
hidden: false,
|
||||
doors: [],
|
||||
|
||||
id: "",
|
||||
label: "",
|
||||
links: [],
|
||||
@@ -28,7 +32,11 @@ const selectedNode = ref<GraphNode>({
|
||||
code: "",
|
||||
name: "",
|
||||
text: "",
|
||||
image: "",
|
||||
applications: [],
|
||||
hidden: false,
|
||||
doors: [],
|
||||
|
||||
id: "",
|
||||
label: "",
|
||||
links: [],
|
||||
@@ -38,7 +46,11 @@ const focusedNode = ref<GraphNode>({
|
||||
code: "",
|
||||
name: "",
|
||||
text: "",
|
||||
image: "",
|
||||
applications: [],
|
||||
hidden: false,
|
||||
doors: [],
|
||||
|
||||
id: "",
|
||||
label: "",
|
||||
links: [],
|
||||
@@ -226,11 +238,17 @@ function showGraph(show: boolean) {
|
||||
<div class="message-header" :class="[action.code == selectedNode.code ? 'selected-message-header' : '']">
|
||||
{{ action.code }}: {{ action.name }}
|
||||
</div>
|
||||
<div v-if="action.image !== ''">
|
||||
{{ action.image }}
|
||||
</div>
|
||||
<hr class="hr" />
|
||||
<div class="message-content">
|
||||
{{ action.text }}
|
||||
</div>
|
||||
<hr class="hr" v-if="action.applications.length" />
|
||||
<div class="message-footer" v-for="door in action.doors" :key="door.code">
|
||||
Дверь: [{{ door.code }}] - "{{ door.name }}"
|
||||
</div>
|
||||
<div class="message-footer" v-for="application in action.applications" :key="application.name">
|
||||
Приложение: {{ application.name }}
|
||||
</div>
|
||||
@@ -428,7 +446,8 @@ function showGraph(show: boolean) {
|
||||
max-height: calc(100vh - 70px);
|
||||
}
|
||||
|
||||
.scroll-y::-webkit-scrollbar, .scroll-y-right::-webkit-scrollbar {
|
||||
.scroll-y::-webkit-scrollbar,
|
||||
.scroll-y-right::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
@@ -31,7 +31,10 @@ export type GraphNode = {
|
||||
code: string
|
||||
name: string
|
||||
text: string
|
||||
image: string
|
||||
applications: Array<GraphApplication>
|
||||
hidden: boolean
|
||||
doors: Array<GraphDoor>
|
||||
|
||||
// fields for graph
|
||||
id: string
|
||||
@@ -50,3 +53,9 @@ export type GraphEdge = {
|
||||
export type GraphApplication = {
|
||||
name: string
|
||||
}
|
||||
|
||||
export type GraphDoor = {
|
||||
code: string
|
||||
name: string
|
||||
show: boolean
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user