Сериализаторы для Нормативки и главной страницы не доделаны
This commit is contained in:
Nukeap committed 2024-05-17 15:45:47 +03:00
1 parent 4090ee1fb9
commit 175e6ce59f
21 files changed
+422 -235

No files matched your search

@@ -450,6 +450,7 @@ export default {
if (!item.path.startsWith("/")) {
item.path = "/" + item.path;
}
item.path="/safety"+item.path
});
if (response.data.length > 0) {
+1 -1
View File
@@ -75,7 +75,7 @@ const routes = [
}
},
{
path: '/:chapter',
path: '/safety/:chapter',
component: () => import('@/views/safety/ChaptersSafety.vue'),
meta: {
title: "Разделы безопасности",
+16 -15
View File
@@ -120,7 +120,8 @@ const route = useRoute();
// Вынес запрос в отдельную функцию, чтобы избежать дублирования одного и того же запроса на сервер.
function getSafety() {
axiosApiInstance.get(`api/safety/files/?chapter=${route.params.chapter}`).then(result => {
console.log(route.params);
axiosApiInstance.get(`api/safety/?chapter=${route.params.chapter}`).then(result => {
safetyData.value = result.data
// console.log(safetyData.value);
loading.value = true
@@ -143,13 +144,13 @@ const formainpage = computed({
}
})
function getResponsibility() {
axiosApiInstance.get(`api/safety/committee_files/`).then(result => {
responsibilityData.value = result.data
})
}
// function getResponsibility() {
// axiosApiInstance.get(`api/safety/committee_files/`).then(result => {
// responsibilityData.value = result.data
// })
// }
getResponsibility()
// getResponsibility()
onBeforeMount(() => getSafety());
@@ -170,14 +171,14 @@ function get_name(namestr) {
return arr[arr.length - 1]
}
function checkNameFiles(obj) {
if (obj.file_name.includes('/media/comitee_files/')) {
return obj.file_name
}
else {
return spravURLBase + `files/committee1_docs/${obj.id_committee1}/${get_name(obj.file_name)}`
}
}
// function checkNameFiles(obj) {
// if (obj.file_name.includes('/media/comitee_files/')) {
// return obj.file_name
// }
// else {
// return spravURLBase + `files/committee1_docs/${obj.id_committee1}/${get_name(obj.file_name)}`
// }
// }
</script>
<style>
@@ -71,13 +71,13 @@ function openFirstPlan_opener(schema){
openFirstPlan.value = true
}
function getResponsibility() {
axiosApiInstance.get(`api/safety/responsibility/`).then(result => {
responsibility.value = result.data.users
})
}
// function getResponsibility() {
// axiosApiInstance.get(`api/safety/responsibility/`).then(result => {
// responsibility.value = result.data.users
// })
// }
getResponsibility()
// getResponsibility()
</script>