Прокинут запрос с клиента на сервер для проверки связи с API
This commit is contained in:
1 parent
2e0a85c93c
commit
bae4547681
4 files changed
+33
-10
No files matched your search
@@ -148,10 +148,10 @@
|
||||
:title="x.name"
|
||||
:value="x.name"
|
||||
:href="x.link"
|
||||
:disabled="x.path=='/securyty'"
|
||||
:disabled="x.path==''"
|
||||
:to="x.path"
|
||||
color="navigation">
|
||||
|
||||
<!-- Чтобы сделать неактивным раздел безопасность, не забыть прописать путь до него в disabled для показа -->
|
||||
<template v-slot:prepend>
|
||||
<v-icon :icon="x.ico"/>
|
||||
<v-tooltip
|
||||
|
||||
@@ -61,7 +61,7 @@ const routes = [
|
||||
name: 'LaborProtection',
|
||||
component: () => import('@/views/LaborProtection.vue'),
|
||||
meta:{
|
||||
title:"Безопасность",
|
||||
title:"Охрана труда",
|
||||
ico: "mdi-pharmacy"
|
||||
}
|
||||
},
|
||||
@@ -70,7 +70,7 @@ const routes = [
|
||||
name: 'SecurityPage',
|
||||
component: () => import('@/views/SecurityPage.vue'),
|
||||
meta:{
|
||||
title:"Охрана труда",
|
||||
title:"Безопасность",
|
||||
ico: "mdi-ticket"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1,20 +1,44 @@
|
||||
<template>
|
||||
<v-row>
|
||||
<v-row class="bg-red w-100">
|
||||
<v-col
|
||||
class="text-h6 text-grey text-center align-self-center text--lighten-1 font-weight-light"
|
||||
>
|
||||
Безопасность
|
||||
<!-- Безопасность -->
|
||||
|
||||
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-container class="bg-green">
|
||||
{{ safetyData }}
|
||||
</v-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { ref } from 'vue';
|
||||
import {pagecounter} from '@/utils/universal_functions'
|
||||
import { axiosApiInstance } from '@/utils/axios-api';
|
||||
|
||||
export default {
|
||||
setup(){
|
||||
|
||||
setup() {
|
||||
pagecounter()
|
||||
}
|
||||
|
||||
const safetyData = ref([])
|
||||
|
||||
const safety = () => {
|
||||
axiosApiInstance.get(`api/safety/files/`).then(result => {
|
||||
safetyData.value = result.data
|
||||
})
|
||||
}
|
||||
|
||||
// console.log('Должно прийти с сервера хоть что-то' ,safetyData)
|
||||
|
||||
return {
|
||||
safetyData,
|
||||
safety
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in new issue
Block a user