151 lines
6.1 KiB
Vue
151 lines
6.1 KiB
Vue
<template>
|
|
|
|
<v-row no-gutters class="gap h-100 ">
|
|
<v-col class="bg-red flex-column" >
|
|
<v-row no-gutters class="h-100 justify-center">
|
|
<v-col lg="6" class="bg-yellow meheight " v-for="x in formainpage" :key="key">
|
|
<v-img
|
|
class="cursor-pointer"
|
|
:src="burl + x.url"
|
|
@click="openFirstPlan_opener(schema)">
|
|
</v-img>
|
|
</v-col>
|
|
<!-- <v-col lg="6" class="bg-green">2</v-col>
|
|
<v-col lg="6" class="bg-pink">2</v-col> -->
|
|
</v-row>
|
|
</v-col>
|
|
|
|
</v-row>
|
|
<!-- <v-card class="h-100 black_and_white">
|
|
<my-helper :pretext=" formainpage" /> -->
|
|
<!-- <v-row no-gutters class="h-100">
|
|
<v-col cols="9">
|
|
<v-card class="h-100 d-flex flex-column black_and_white">
|
|
<v-row class="ma-0 overflow-auto h-0">
|
|
<v-col v-for="(schema,index) in formainpage" :key="index"
|
|
cols="6"
|
|
class="h-100 gap">
|
|
|
|
<v-card class="h-100">
|
|
<VuePdfEmbed v-if="schema.url.endsWith('.pdf')" :source="burl + schema.url" width="500" />
|
|
<v-img v-else
|
|
class="cursor-pointer"
|
|
:src="burl + schema.url"
|
|
height="100%"
|
|
@click="openFirstPlan_opener(schema)">
|
|
</v-img>
|
|
|
|
</v-card>
|
|
|
|
</v-col>
|
|
|
|
</v-row>
|
|
<v-row class="ma-0 overflow-auto h-0">
|
|
<v-col class="h-100 gap">
|
|
<v-card class="h-100">
|
|
<v-img
|
|
:src="`${burl}/media/safety/schemas/План.jpg`" @click="openImg = true"
|
|
class="cursor-pointer"
|
|
height="100%"
|
|
width="100%">
|
|
</v-img>
|
|
<v-dialog v-model="openImg" :width="900" height="100%">
|
|
<v-row class="ma-0 overflow-auto h-0">
|
|
<v-card class="h-100 w-100 pa-0 flex-grow-0">
|
|
<v-btn
|
|
density="compact"
|
|
variant="text"
|
|
icon="mdi-close"
|
|
@click="openImg = false">
|
|
</v-btn>
|
|
<v-img
|
|
:src="`${burl}/media/safety/schemas/План.jpg`"
|
|
class="cursor-pointer"
|
|
height="100%"
|
|
width="100%"
|
|
@click="openImg = false">
|
|
</v-img>
|
|
</v-card>
|
|
</v-row>
|
|
</v-dialog>
|
|
</v-card>
|
|
</v-col>
|
|
</v-row>
|
|
</v-card>
|
|
<v-dialog v-model="openFirstPlan" :width="900" height="100%">
|
|
<v-row class="ma-0 overflow-auto h-0">
|
|
<v-card class="h-100 w-100 pa-0 flex-grow-0">
|
|
{{ index }}
|
|
<v-btn
|
|
density="compact"
|
|
variant="text"
|
|
icon="mdi-close"
|
|
@click="openFirstPlan = false">
|
|
</v-btn>
|
|
<v-img
|
|
:src="urlschema"
|
|
class="cursor-pointer"
|
|
height="100%"
|
|
width="100%"
|
|
@click="openFirstPlan = false">
|
|
</v-img>
|
|
</v-card>
|
|
</v-row>
|
|
</v-dialog>
|
|
</v-col>
|
|
<v-col cols="3" class="w100">
|
|
<v-card class="h-100 d-flex flex-column">
|
|
<v-card-title class="text-wrap">Ответственные за противопожарную безопасность</v-card-title>
|
|
<v-row class="ma-0 overflow-auto h-0">
|
|
<v-card class="pa-1 overflow-y-auto flex-grow-1 flex-shrink-1 h-100">
|
|
<list-user
|
|
v-for="item in responsibility"
|
|
:key=item
|
|
:author="item">
|
|
</list-user>
|
|
</v-card>
|
|
</v-row>
|
|
</v-card>
|
|
</v-col>
|
|
</v-row> -->
|
|
<!-- </v-card> -->
|
|
</template>
|
|
|
|
<script setup>
|
|
|
|
import { baseURL, axiosApiInstance } from '@/utils/axios-api'
|
|
import { ref } from 'vue';
|
|
import VuePdfEmbed from 'vue-pdf-embed';
|
|
defineProps(
|
|
{
|
|
formainpage: Object,
|
|
require:true
|
|
},
|
|
)
|
|
const urlschema=ref(null)
|
|
const burl = baseURL.slice(0,-1)
|
|
const openImg = ref(false)
|
|
const openFirstPlan = ref(false)
|
|
const openSecondPlan = ref(false)
|
|
const responsibility = ref([])
|
|
function openFirstPlan_opener(schema){
|
|
urlschema.value = burl + schema.url
|
|
openFirstPlan.value = true
|
|
}
|
|
|
|
function getResponsibility() {
|
|
axiosApiInstance.get(`api/safety/responsibility/`).then(result => {
|
|
responsibility.value = result.data.users
|
|
})
|
|
}
|
|
|
|
getResponsibility()
|
|
|
|
|
|
</script>
|
|
|
|
<style>
|
|
.meheight {
|
|
max-height: 44vh;
|
|
}
|
|
</style> |