Merge branch 'P-29' into P-25
This commit is contained in:
commit
ecc2a4c7ea
5 files changed
+123
-70
No files matched your search
@@ -12,14 +12,11 @@ class FileResponsiblitySerializer(serializers.ModelSerializer):
|
|||||||
fields = ['file_name', 'id', 'id_order_responsibility']
|
fields = ['file_name', 'id', 'id_order_responsibility']
|
||||||
|
|
||||||
class CommeetePersonSerializer(serializers.ModelSerializer):
|
class CommeetePersonSerializer(serializers.ModelSerializer):
|
||||||
fio=serializers.CharField()
|
|
||||||
id = serializers.IntegerField()
|
|
||||||
login = serializers.CharField()
|
|
||||||
|
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model=DictEmployee
|
model=DictEmployee
|
||||||
fields=['fio','id', 'login']
|
fields=['fio','id', 'login', 'tel', 'room', 'email', 'post', 'department']
|
||||||
|
|
||||||
class ResponsibilityUsersSerializer(serializers.ModelSerializer):
|
class ResponsibilityUsersSerializer(serializers.ModelSerializer):
|
||||||
fio=serializers.CharField(source='id_dict_employee.fio')
|
fio=serializers.CharField(source='id_dict_employee.fio')
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<v-row no-gutters class="flex-column gap pa-1">
|
<v-row no-gutters class="flex-column gap pa-1">
|
||||||
<v-col class="bg-green flex-grow-0">
|
<v-col class="v-col-auto">
|
||||||
<v-card>
|
<v-card>
|
||||||
<v-tabs
|
<v-tabs
|
||||||
v-model="tab"
|
v-model="tab"
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
</v-card>
|
</v-card>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col class="flex-column">
|
<v-col class="">
|
||||||
<v-window v-model="tab" class="h-100">
|
<v-window v-model="tab" class="h-100">
|
||||||
<slot name="item" />
|
<slot name="item" />
|
||||||
</v-window>
|
</v-window>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<v-app>
|
<v-app >
|
||||||
<v-app-bar
|
<v-app-bar
|
||||||
:elevation="accountStore.cod2user ? 2 : 0"
|
:elevation="accountStore.cod2user ? 2 : 0"
|
||||||
density="compact"
|
density="compact"
|
||||||
@@ -266,6 +266,7 @@
|
|||||||
permanent
|
permanent
|
||||||
location="right"
|
location="right"
|
||||||
@click="rail = false"
|
@click="rail = false"
|
||||||
|
|
||||||
>
|
>
|
||||||
<Online-users />
|
<Online-users />
|
||||||
</v-navigation-drawer>
|
</v-navigation-drawer>
|
||||||
|
|||||||
@@ -1,13 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<pattern-tabs :tabs="tabs_items">
|
<pattern-tabs :tabs="tabs_items">
|
||||||
<template v-slot:item>
|
<template v-slot:item>
|
||||||
<v-window-item class="gap h-100" value="mainInfo">
|
<v-window-item class="gap h-100 " value="mainInfo">
|
||||||
<MainInfoSafety
|
<MainInfoSafety
|
||||||
:formainpage="safetyData.mainpage_file"
|
:formainpage="safetyData.mainpage_file"
|
||||||
|
:responsibility="safetyData.type_resp"
|
||||||
|
:commitee="safetyData.type_comm"
|
||||||
></MainInfoSafety>
|
></MainInfoSafety>
|
||||||
</v-window-item>
|
</v-window-item>
|
||||||
<v-window-item class="gap h-100" value="document">
|
<v-window-item class="gap h-100" value="document">
|
||||||
<documentation-safety :docSections = "safetyData" />
|
<documentation-safety />
|
||||||
</v-window-item>
|
</v-window-item>
|
||||||
<v-window-item class="gap h-100" value="testings">
|
<v-window-item class="gap h-100" value="testings">
|
||||||
<TestSafety></TestSafety>
|
<TestSafety></TestSafety>
|
||||||
@@ -17,7 +19,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { ref, onUpdated } from "vue";
|
import { ref, onMounted, onUpdated } from "vue";
|
||||||
|
|
||||||
import { pagecounter } from "@/utils/universal_functions";
|
import { pagecounter } from "@/utils/universal_functions";
|
||||||
import PatternTabs from "@/components/UI/PatternTabs.vue";
|
import PatternTabs from "@/components/UI/PatternTabs.vue";
|
||||||
@@ -51,8 +53,9 @@ export default {
|
|||||||
console.log(safetyData.value, "-------------------------------");
|
console.log(safetyData.value, "-------------------------------");
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
getSafety()
|
|
||||||
onUpdated(() => getSafety());
|
onMounted(() => getSafety())
|
||||||
|
onUpdated(() => getSafety())
|
||||||
|
|
||||||
return {
|
return {
|
||||||
safetyData,
|
safetyData,
|
||||||
|
|||||||
@@ -1,37 +1,95 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<v-row no-gutters class="h-100">
|
||||||
<v-row no-gutters class="gap h-100 ">
|
<v-col cols="9" class="flex-column">
|
||||||
<v-col cols="9" class="flex-column" >
|
<v-row no-gutters class="h-100 justify-center">
|
||||||
<v-row no-gutters class="h-100 justify-center">
|
<v-col
|
||||||
<v-col lg="6" class="meheight" v-for="schema in formainpage" :key="schema.id">
|
lg="6"
|
||||||
<VuePdfEmbed v-if="schema.url.endsWith('.pdf')"
|
class="meheight"
|
||||||
:source="burl + schema.url"
|
v-for="schema in formainpage"
|
||||||
width="500"
|
:key="schema.id"
|
||||||
@click="openFirstPlan_opener(schema)"/>
|
>
|
||||||
<v-img v-else
|
<VuePdfEmbed
|
||||||
class="cursor-pointer"
|
v-if="schema.url.endsWith('.pdf')"
|
||||||
:src="burl + schema.url"
|
:source="burl + schema.url"
|
||||||
@click="openFirstPlan_opener(schema)">
|
width="500"
|
||||||
</v-img>
|
@click="openFirstPlan_opener(schema)"
|
||||||
</v-col>
|
/>
|
||||||
</v-row>
|
<v-img
|
||||||
|
v-else
|
||||||
|
class="cursor-pointer"
|
||||||
|
:src="burl + schema.url"
|
||||||
|
@click="openFirstPlan_opener(schema)"
|
||||||
|
>
|
||||||
|
</v-img>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col class="w100">
|
</v-row>
|
||||||
<v-card class="h-100 d-flex flex-column">
|
</v-col>
|
||||||
<v-card-title class="text-wrap">Ответственные за противопожарную безопасность</v-card-title>
|
<v-col cols="3" class="d-flex flex-column h-100">
|
||||||
|
<v-row no-gutters class="h-0 overflow-auto">
|
||||||
|
<v-col>
|
||||||
|
<v-col class="v-col-auto ">
|
||||||
|
<div class="text-h6 d-flex justify-center">Ответственные</div>
|
||||||
|
</v-col>
|
||||||
|
<v-col class="v-col-auto">
|
||||||
|
<div v-if="responsibility != undefined && responsibility.length > 0" >
|
||||||
|
<v-expansion-panels>
|
||||||
|
<v-expansion-panel v-for="item in responsibility">
|
||||||
|
<v-expansion-panel-title class="font-weight-medium">
|
||||||
|
{{ item.resp.sphere_of_responsibility }}
|
||||||
|
</v-expansion-panel-title>
|
||||||
|
<v-expansion-panel-text>
|
||||||
|
<list-user
|
||||||
|
v-for="user in item.resp.employee"
|
||||||
|
:key=user
|
||||||
|
:author="user">
|
||||||
|
</list-user>
|
||||||
|
</v-expansion-panel-text>
|
||||||
|
</v-expansion-panel>
|
||||||
|
</v-expansion-panels>
|
||||||
|
</div>
|
||||||
|
<div v-else>
|
||||||
|
<div class="text-caption text-grey d-flex justify-center">Данные по ответственным отсутствуют</div>
|
||||||
|
</div>
|
||||||
|
</v-col>
|
||||||
|
<v-col class="v-col-auto">
|
||||||
|
<div class="text-h6 d-flex justify-center">Комиссии</div>
|
||||||
|
</v-col>
|
||||||
|
<v-col class="v-col-auto">
|
||||||
|
<div v-if="commitee != undefined && commitee.length > 0" >
|
||||||
|
<v-expansion-panels >
|
||||||
|
<v-expansion-panel v-for="item in commitee">
|
||||||
|
<v-expansion-panel-title class="font-weight-medium">
|
||||||
|
{{ item.comm.name }}
|
||||||
|
</v-expansion-panel-title>
|
||||||
|
<v-expansion-panel-text>
|
||||||
|
<list-user
|
||||||
|
v-for="user in item.comm.com_members"
|
||||||
|
:key=user
|
||||||
|
:author="user">
|
||||||
|
</list-user>
|
||||||
|
</v-expansion-panel-text>
|
||||||
|
</v-expansion-panel>
|
||||||
|
</v-expansion-panels>
|
||||||
|
</div>
|
||||||
|
<div v-else>
|
||||||
|
<div class="text-caption text-grey d-flex justify-center">Данные по комиссиям отсутствуют</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</v-col>
|
||||||
|
</v-col>
|
||||||
|
</v-row>
|
||||||
|
<!-- <div class=" overflow-y-auto h-100 bg-orange">
|
||||||
|
|
||||||
|
|
||||||
|
</div> -->
|
||||||
|
</v-col>
|
||||||
|
</v-row>
|
||||||
|
|
||||||
|
<!-- <v-dialog v-model="openFirstPlan" :width="900" height="100%">
|
||||||
<v-row class="ma-0 overflow-auto h-0">
|
<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">
|
<v-card class="h-100 w-100 pa-0">
|
||||||
<!-- <list-user
|
|
||||||
v-for="item in responsibility"
|
|
||||||
:key=item
|
|
||||||
:author="item">
|
|
||||||
</list-user> -->
|
|
||||||
</v-card>
|
|
||||||
</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">
|
|
||||||
<v-card-actions class="d-flex justify-space-between">
|
<v-card-actions class="d-flex justify-space-between">
|
||||||
<v-btn
|
<v-btn
|
||||||
density="compact"
|
density="compact"
|
||||||
@@ -56,48 +114,42 @@
|
|||||||
@click="openFirstPlan = false">
|
@click="openFirstPlan = false">
|
||||||
</v-img>
|
</v-img>
|
||||||
</v-card>
|
</v-card>
|
||||||
|
|
||||||
</v-row>
|
</v-row>
|
||||||
</v-dialog>
|
</v-dialog> -->
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { baseURL, axiosApiInstance } from '@/utils/axios-api'
|
import { baseURL, axiosApiInstance } from "@/utils/axios-api";
|
||||||
import { ref } from 'vue';
|
import { ref } from "vue";
|
||||||
|
|
||||||
import VuePdfEmbed from 'vue-pdf-embed';
|
import VuePdfEmbed from "vue-pdf-embed";
|
||||||
import { saveAs } from 'file-saver';
|
import { saveAs } from "file-saver";
|
||||||
|
|
||||||
defineProps(
|
defineProps({
|
||||||
{
|
formainpage: Object,
|
||||||
formainpage: Object,
|
responsibility: Array,
|
||||||
require:true
|
commitee: Array,
|
||||||
},
|
require: true,
|
||||||
)
|
});
|
||||||
|
|
||||||
const downloadFile = (url, fileName) => {
|
const downloadFile = (url, fileName) => {
|
||||||
axiosApiInstance.get(url, { responseType: 'blob' })
|
axiosApiInstance.get(url, { responseType: "blob" }).then((response) => {
|
||||||
.then(response => {
|
saveAs(response.data, fileName);
|
||||||
saveAs(response.data, fileName)
|
});
|
||||||
})
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const urlschema=ref(null)
|
const urlschema = ref(null);
|
||||||
const burl = baseURL.slice(0,-1)
|
const burl = baseURL.slice(0, -1);
|
||||||
const openFirstPlan = ref(false)
|
const openFirstPlan = ref(false);
|
||||||
|
|
||||||
function openFirstPlan_opener(schema){
|
function openFirstPlan_opener(schema) {
|
||||||
urlschema.value = burl + schema.url
|
urlschema.value = burl + schema.url;
|
||||||
openFirstPlan.value = true
|
openFirstPlan.value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.meheight {
|
.meheight {
|
||||||
max-height: 44vh;
|
max-height: 44vh;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
Reference in new issue
Block a user