Merge branch 'develop' into 52_fire
This commit is contained in:
commit
fe58daff9c
62 files changed
+1683
-1805
No files matched your search
Generated
+6
@@ -26,6 +26,7 @@
|
||||
"date-fns": "^2.30.0",
|
||||
"express-vue": "^5.12.0",
|
||||
"file-saver": "^2.0.5",
|
||||
"ical.js": "^2.0.0",
|
||||
"moment": "^2.30.1",
|
||||
"pinia": "^2.0.23",
|
||||
"roboto-fontface": "*",
|
||||
@@ -9873,6 +9874,11 @@
|
||||
"node": ">=10.17.0"
|
||||
}
|
||||
},
|
||||
"node_modules/ical.js": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/ical.js/-/ical.js-2.0.0.tgz",
|
||||
"integrity": "sha512-eb/KPJlF1IxRNvbjkGtt3lXQg1TeGEh8RzmCQk65qIFw5p+SONy8FUCFoclsfxpX1CFjyShzO/Lm0bdig7vFPg=="
|
||||
},
|
||||
"node_modules/iconv-lite": {
|
||||
"version": "0.4.24",
|
||||
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
"date-fns": "^2.30.0",
|
||||
"express-vue": "^5.12.0",
|
||||
"file-saver": "^2.0.5",
|
||||
"ical.js": "^2.0.0",
|
||||
"moment": "^2.30.1",
|
||||
"pinia": "^2.0.23",
|
||||
"roboto-fontface": "*",
|
||||
|
||||
@@ -1,198 +0,0 @@
|
||||
<template>
|
||||
<full-calendar :options="calendarOptions" />
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {reactive, ref, onMounted} from 'vue'
|
||||
|
||||
|
||||
import { axiosApiInstance } from '@/utils/axios-api'
|
||||
|
||||
|
||||
|
||||
export default {
|
||||
name: 'calendar-full',
|
||||
|
||||
props: {
|
||||
initial: {
|
||||
type: String,
|
||||
default: 'multiMonthYear'
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
|
||||
setup(props) {
|
||||
|
||||
const calendarOptions = reactive({
|
||||
plugins: [ dayGridPlugin, interactionPlugin, timeGridPlugin, listPlugin, multiMonthPlugin ],
|
||||
initialView: props.initial,
|
||||
dayMaxEventRows: 3
|
||||
,
|
||||
locale: 'ru',
|
||||
buttonText: {
|
||||
today: 'Сегодня',
|
||||
month: 'Месяц',
|
||||
week: 'Неделя',
|
||||
day: 'День',
|
||||
list: 'Список',
|
||||
year: 'Год'
|
||||
},
|
||||
firstDay:'1',
|
||||
events: [],
|
||||
|
||||
|
||||
editable: true,
|
||||
headerToolbar: {
|
||||
left: 'prev',
|
||||
center: 'title',
|
||||
right: 'next'
|
||||
}
|
||||
|
||||
,
|
||||
|
||||
aspectRatio: 1,
|
||||
multiMonthMaxColumns: 2,
|
||||
displayEventEnd: true,
|
||||
height: '100%',
|
||||
stickyHeaderDates: true,
|
||||
dayMaxEventRows: 2,
|
||||
moreLinkContent: function(arg) {
|
||||
return arg.shortText + ' события'
|
||||
},
|
||||
views: {
|
||||
multiMonthYear: {
|
||||
|
||||
moreLinkContent: function(arg) {
|
||||
return arg.num
|
||||
},
|
||||
|
||||
},
|
||||
},
|
||||
|
||||
allDayText: 'Весь день',
|
||||
noEventsContent: 'На сегодня событий нет',
|
||||
selectable: true,
|
||||
|
||||
})
|
||||
|
||||
function f_generalvacation() {
|
||||
axiosApiInstance.get('api/general_vacation/generalvacation/')
|
||||
.then(data => {
|
||||
|
||||
for (let x in data.data) {
|
||||
|
||||
if (x=="План-график") {
|
||||
data.data[x].map(e=>{
|
||||
|
||||
|
||||
calendarOptions.events.push({ description: 'description for All Day Event', title: e.name, start: e.start_work_period, end: e.end_work_period})
|
||||
|
||||
}
|
||||
|
||||
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
f_generalvacation()
|
||||
|
||||
|
||||
})
|
||||
// genvacation.value[0].planned_date
|
||||
|
||||
|
||||
|
||||
return { calendarOptions }
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
#fc-dom-1:first-letter {
|
||||
text-transform: capitalize;
|
||||
}
|
||||
|
||||
.fc-toolbar {
|
||||
/* padding: 0px; */
|
||||
background-color: #f8f8f8;
|
||||
}
|
||||
.fc-day-header {
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
}
|
||||
.fc-day {
|
||||
border: none;
|
||||
}
|
||||
.fc-time-grid-event {
|
||||
background-color: #e6e6e6;
|
||||
border: none;
|
||||
color: #000;
|
||||
}
|
||||
.fc-event-title {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.fc .fc-toolbar.fc-header-toolbar {
|
||||
padding-bottom: 0.2em;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.fc .fc-popover {
|
||||
top: 0px!important
|
||||
;
|
||||
left: 450px!important;
|
||||
overflow: auto;
|
||||
min-width: 500px;
|
||||
height: 380px;
|
||||
}
|
||||
|
||||
.fc-h-event .fc-event-title {
|
||||
display: initial!important;
|
||||
}
|
||||
|
||||
/* .fc .fc-daygrid-day-events {
|
||||
margin-top: -7px;
|
||||
} */
|
||||
.fc {
|
||||
/* background-color: #ffffff; */
|
||||
background-color: var('bg-main_theme');
|
||||
}
|
||||
|
||||
.fc-button {
|
||||
|
||||
padding: 1px!important;
|
||||
border-radius: 1em!important;
|
||||
line-height: 0!important;
|
||||
background-color: transparent!important;
|
||||
border-color: transparent!important;
|
||||
|
||||
}
|
||||
|
||||
.fc-icon {
|
||||
color: #000;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.fc-button:focus, .fc-icon {
|
||||
outline: none!important;
|
||||
}
|
||||
|
||||
.fc-button,
|
||||
.fc-buttonactive,
|
||||
.fc-button:focus {
|
||||
border:none!important;
|
||||
}
|
||||
|
||||
.fc-header-toolbar {
|
||||
background: white !important;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
@@ -8,7 +8,7 @@
|
||||
<v-row no-gutters v-if="top.comment[0].time_create != '1990-01-01'">
|
||||
<v-col lg=5 class="bg-teal-lighten-4 align-self-center">
|
||||
<list-user
|
||||
:author= "top.author"
|
||||
:author= "top.author"
|
||||
:from_which="'top_comment'"
|
||||
/>
|
||||
</v-col>
|
||||
|
||||
@@ -2,7 +2,11 @@
|
||||
<v-card max-width='400' density="compact" class="bg-transparent">
|
||||
<v-card-text class="pb-0">Оставлено комментариев</v-card-text>
|
||||
<v-card-subtitle>Последний комментарий оставлен {{formaComaTime(comment.time_create)}}</v-card-subtitle>
|
||||
<v-card-title>{{comment.comment}}</v-card-title>
|
||||
|
||||
<v-card-text class="text-caption">
|
||||
{{comment.comment}}
|
||||
</v-card-text>
|
||||
<!-- <v-card-title class="text-wrap"></v-card-title> -->
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -1,287 +1,281 @@
|
||||
<template>
|
||||
<pattern-card
|
||||
:title="'Рейтинг посещаемости страниц портала'"
|
||||
:ico="'mdi-chart-bar'"
|
||||
>
|
||||
<template v-slot:filling>
|
||||
<v-data-table-virtual
|
||||
:headers="headers"
|
||||
:items="tabledata"
|
||||
height="400"
|
||||
class="mytable"
|
||||
item-value="name"
|
||||
@update:sortBy=customSort
|
||||
v-model:sort-by="sortBy"
|
||||
density="compact"
|
||||
<pattern-card
|
||||
:title="'Рейтинг посещаемости страниц портала'"
|
||||
:ico="'mdi-chart-bar'"
|
||||
>
|
||||
<template v-slot:header.name>
|
||||
<!-- v-model:sort-by="sortBy" -->
|
||||
<v-switch
|
||||
:label="untot"
|
||||
false-value='уникальные'
|
||||
true-value='всего'
|
||||
hide-details
|
||||
v-model="untot"
|
||||
class="myleft ml-n4"
|
||||
|
||||
/>
|
||||
|
||||
</template>
|
||||
<template v-slot:item.name="{ value }">
|
||||
<span class="font-weight-medium text-grey-darken-3 myleft text-subtitle-2">
|
||||
{{ value }}
|
||||
</span>
|
||||
</template>
|
||||
<template v-slot:item.now="{ value, item }">
|
||||
<span class="font-weight-medium text-subtitle-2 ">
|
||||
<v-tooltip
|
||||
v-if="value>0"
|
||||
location="bottom"
|
||||
>
|
||||
<template v-slot:activator="{ props }">
|
||||
<span v-bind="props" :class="'untot'=='уникальные'?getColorTooday1(value):getColorTooday2(value) " class="cursor-help font-weight-medium text-subtitle-1 " >
|
||||
{{value}}
|
||||
</span>
|
||||
</template>
|
||||
<v-row
|
||||
no-gutters
|
||||
>
|
||||
<v-col>
|
||||
<v-row
|
||||
no-gutters v-for="n in item.now.unic"
|
||||
:key="n"
|
||||
>
|
||||
<v-col >
|
||||
{{n}}
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
</v-tooltip>
|
||||
|
||||
</span>
|
||||
|
||||
</template>
|
||||
<template v-slot:item.period="{ value, item }">
|
||||
<span class="font-weight-medium text-subtitle-2">
|
||||
<v-tooltip
|
||||
v-if="value>0"
|
||||
location="bottom"
|
||||
>
|
||||
<template v-slot:activator="{ props }">
|
||||
<span v-bind="props" :class="'untot'=='уникальные'?getColorPeriod1(value):getColorPeriod2(value)" class="cursor-help font-weight-medium text-subtitle-1" >
|
||||
{{value}}
|
||||
<!-- {{modelrating?val.now.unique.length:val.now.countall}} -->
|
||||
</span>
|
||||
</template>
|
||||
<v-row
|
||||
no-gutters
|
||||
>
|
||||
<v-col>
|
||||
<v-row
|
||||
no-gutters v-for="n in item.period.unic"
|
||||
:key="n"
|
||||
>
|
||||
<v-col>
|
||||
{{n}}
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
</v-tooltip>
|
||||
|
||||
</span>
|
||||
|
||||
</template>
|
||||
|
||||
|
||||
|
||||
|
||||
</v-data-table-virtual>
|
||||
|
||||
<template v-slot:filling>
|
||||
<v-data-table-virtual
|
||||
:headers="headers"
|
||||
:items="tabledata"
|
||||
height="400"
|
||||
class="mytable"
|
||||
item-value="name"
|
||||
@update:sortBy="customSort"
|
||||
v-model:sort-by="sortBy"
|
||||
density="compact"
|
||||
>
|
||||
<template v-slot:header.name>
|
||||
<v-switch
|
||||
:label="untot"
|
||||
false-value="уникальные"
|
||||
true-value="всего"
|
||||
hide-details
|
||||
v-model="untot"
|
||||
class="myleft ml-n4"
|
||||
/>
|
||||
</template>
|
||||
</pattern-card>
|
||||
<template v-slot:item.name="{ value }">
|
||||
<span class="font-weight-medium cursor-default text-grey-darken-3 myleft text-subtitle-2"
|
||||
>
|
||||
{{ value }}
|
||||
</span>
|
||||
</template>
|
||||
<template v-slot:item.now="{ value, item }">
|
||||
<span class="font-weight-medium text-subtitle-2">
|
||||
<v-tooltip v-if="value > 0" location="bottom">
|
||||
<template v-slot:activator="{ props }">
|
||||
<span
|
||||
v-bind="props"
|
||||
:class="
|
||||
'untot' == 'уникальные'
|
||||
? getColorTooday1(value)
|
||||
: getColorTooday2(value)
|
||||
"
|
||||
class="cursor-help font-weight-medium text-subtitle-1"
|
||||
>
|
||||
{{ value }}
|
||||
</span>
|
||||
</template>
|
||||
<v-row no-gutters>
|
||||
<v-col>
|
||||
<v-row no-gutters v-for="n in item.now.unic" :key="n">
|
||||
<v-col>
|
||||
{{ n }}
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-tooltip>
|
||||
</span>
|
||||
</template>
|
||||
<template v-slot:item.period="{ value, item }">
|
||||
<span class="font-weight-medium text-subtitle-2">
|
||||
<v-tooltip v-if="value > 0" location="bottom">
|
||||
<template v-slot:activator="{ props }">
|
||||
<span
|
||||
v-bind="props"
|
||||
:class="
|
||||
'untot' == 'уникальные'
|
||||
? getColorPeriod1(value)
|
||||
: getColorPeriod2(value)
|
||||
"
|
||||
class="cursor-help font-weight-medium text-subtitle-1"
|
||||
>
|
||||
{{ value }}
|
||||
</span>
|
||||
</template>
|
||||
<v-row no-gutters>
|
||||
<v-col>
|
||||
<v-row no-gutters v-for="n in item.period.unic" :key="n">
|
||||
<v-col>
|
||||
{{ n }}
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-tooltip>
|
||||
</span>
|
||||
</template>
|
||||
</v-data-table-virtual>
|
||||
</template>
|
||||
</pattern-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { ref, watch } from 'vue'
|
||||
import PatternCard from '@/components/UI/aboutportal/pattern-card.vue'
|
||||
import TooltipText from '@/components/UI/tooltip-text.vue'
|
||||
import {splitname, formatDash} from '@/utils/universal_functions'
|
||||
import { ref, watch } from "vue";
|
||||
import PatternCard from "@/components/UI/aboutportal/pattern-card.vue";
|
||||
import TooltipText from "@/components/UI/tooltip-text.vue";
|
||||
import { splitname, formatDash } from "@/utils/universal_functions";
|
||||
|
||||
export default {
|
||||
components: { TooltipText, PatternCard },
|
||||
|
||||
components: { TooltipText, PatternCard },
|
||||
|
||||
props: {
|
||||
pages_count: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
|
||||
}
|
||||
props: {
|
||||
pages_count: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
},
|
||||
|
||||
setup(props) {
|
||||
|
||||
const sortBy = ref([
|
||||
{
|
||||
"key": "now",
|
||||
"order": "desc"
|
||||
}
|
||||
])
|
||||
setup(props) {
|
||||
const sortBy = ref([
|
||||
{
|
||||
key: "now",
|
||||
order: "desc",
|
||||
},
|
||||
]);
|
||||
|
||||
const untot=ref('уникальные')
|
||||
let headers = ref([
|
||||
{ title: '', align: 'start', key: 'name' },
|
||||
{ title: 'сегодня', align: 'center', key: 'now',
|
||||
value: item => `${untot.value=='уникальные'?item.now.unic.size:item.now.total}`,
|
||||
},
|
||||
{ title: 'за период', align: 'center', key: 'period',
|
||||
value: item => `${untot.value=='уникальные'?item.period.unic.size:item.period.total}` },
|
||||
])
|
||||
const untot = ref("уникальные");
|
||||
let headers = ref([
|
||||
{ title: "", align: "start", key: "name" },
|
||||
{
|
||||
title: "сегодня",
|
||||
align: "center",
|
||||
key: "now",
|
||||
value: (item) =>
|
||||
`${
|
||||
untot.value == "уникальные" ? item.now.unic.size : item.now.total
|
||||
}`,
|
||||
},
|
||||
{
|
||||
title: "за период",
|
||||
align: "center",
|
||||
key: "period",
|
||||
value: (item) =>
|
||||
`${
|
||||
untot.value == "уникальные"
|
||||
? item.period.unic.size
|
||||
: item.period.total
|
||||
}`,
|
||||
},
|
||||
]);
|
||||
|
||||
const datas = ()=>{
|
||||
|
||||
let data = []
|
||||
props.pages_count.forEach((e) => {
|
||||
|
||||
let ind = data.findIndex(el=>el.name==e.pages)
|
||||
if(ind==-1){
|
||||
let ob = {name:e.pages, now:{unic:new Set(),total:0}, period:{unic:new Set(),total:0}}
|
||||
if (e.visitdate == formatDash(new Date())){
|
||||
ob.now.unic.add(splitname(e.user))
|
||||
ob.now.total = e.count
|
||||
|
||||
}
|
||||
ob.period.unic.add(splitname(e.user))
|
||||
ob.period.total = e.count
|
||||
data.push(ob)
|
||||
}
|
||||
else{
|
||||
if (e.visitdate == formatDash(new Date())){
|
||||
data[ind].now.unic.add(splitname(e.user))
|
||||
data[ind].now.total +=e.count
|
||||
}
|
||||
|
||||
data[ind].period.unic.add(splitname(e.user))
|
||||
data[ind].period.total +=e.count
|
||||
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
|
||||
return data
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const modelrating = ref(false)
|
||||
|
||||
const getColorTooday1 = (pages) => {
|
||||
if (pages > 10) return 'text-green'
|
||||
else if (pages > 5) return 'text-orange'
|
||||
else return 'text-red'
|
||||
}
|
||||
|
||||
const getColorPeriod1 = (pages) => {
|
||||
|
||||
if (pages > 30) return 'text-green'
|
||||
else if (pages > 15) return 'text-orange'
|
||||
else return 'text-red'
|
||||
}
|
||||
|
||||
const getColorTooday2 = (pages) => {
|
||||
if (pages > 50) return 'text-green'
|
||||
else if (pages > 25) return 'text-orange'
|
||||
else return 'text-red'
|
||||
}
|
||||
|
||||
const getColorPeriod2 = (pages) => {
|
||||
|
||||
if (pages > 100) return 'text-green'
|
||||
else if (pages > 50) return 'text-orange'
|
||||
else return 'text-red'
|
||||
}
|
||||
|
||||
const getColorNow = (pages) => {
|
||||
if (pages > 10) return 'text-green'
|
||||
else if (pages > 5) return 'text-orange'
|
||||
else return 'text-red'
|
||||
}
|
||||
|
||||
const customSort= ()=> {
|
||||
let arr=tabledata.value
|
||||
|
||||
if (sortBy.value!==undefined && sortBy.value.length>0){
|
||||
let factor=sortBy.value[0].order=='desc'?[-1,1]:[1,-1]
|
||||
if (untot.value=='уникальные'){
|
||||
arr.sort((a,b)=>{
|
||||
|
||||
if (a[sortBy.value[0].key].unic.size>b[sortBy.value[0].key].unic.size) return factor[0]
|
||||
if (a[sortBy.value[0].key].unic.size<b[sortBy.value[0].key].unic.size) return factor[1]
|
||||
return 0 })
|
||||
}else{
|
||||
arr.sort((a,b)=>{
|
||||
|
||||
if (a[sortBy.value[0].key].total>b[sortBy.value[0].key].total) return factor[0]
|
||||
if (a[sortBy.value[0].key].total<b[sortBy.value[0].key].total) return factor[1]
|
||||
return 0 })
|
||||
const datas = () => {
|
||||
let data = [];
|
||||
props.pages_count.forEach((e) => {
|
||||
let ind = data.findIndex((el) => el.name == e.pages);
|
||||
if (ind == -1) {
|
||||
let ob = {
|
||||
name: e.pages,
|
||||
now: { unic: new Set(), total: 0 },
|
||||
period: { unic: new Set(), total: 0 },
|
||||
};
|
||||
if (e.visitdate == formatDash(new Date())) {
|
||||
ob.now.unic.add(splitname(e.user));
|
||||
ob.now.total = e.count;
|
||||
}
|
||||
ob.period.unic.add(splitname(e.user));
|
||||
ob.period.total = e.count;
|
||||
data.push(ob);
|
||||
} else {
|
||||
if (e.visitdate == formatDash(new Date())) {
|
||||
data[ind].now.unic.add(splitname(e.user));
|
||||
data[ind].now.total += e.count;
|
||||
}
|
||||
|
||||
data[ind].period.unic.add(splitname(e.user));
|
||||
data[ind].period.total += e.count;
|
||||
}
|
||||
});
|
||||
|
||||
return data;
|
||||
};
|
||||
|
||||
const modelrating = ref(false);
|
||||
|
||||
const getColorTooday1 = (pages) => {
|
||||
if (pages > 10) return "text-green";
|
||||
else if (pages > 5) return "text-orange";
|
||||
else return "text-red";
|
||||
};
|
||||
|
||||
const getColorPeriod1 = (pages) => {
|
||||
if (pages > 30) return "text-green";
|
||||
else if (pages > 15) return "text-orange";
|
||||
else return "text-red";
|
||||
};
|
||||
|
||||
const getColorTooday2 = (pages) => {
|
||||
if (pages > 50) return "text-green";
|
||||
else if (pages > 25) return "text-orange";
|
||||
else return "text-red";
|
||||
};
|
||||
|
||||
const getColorPeriod2 = (pages) => {
|
||||
if (pages > 100) return "text-green";
|
||||
else if (pages > 50) return "text-orange";
|
||||
else return "text-red";
|
||||
};
|
||||
|
||||
const getColorNow = (pages) => {
|
||||
if (pages > 10) return "text-green";
|
||||
else if (pages > 5) return "text-orange";
|
||||
else return "text-red";
|
||||
};
|
||||
|
||||
const customSort = () => {
|
||||
let arr = tabledata.value;
|
||||
|
||||
if (sortBy.value !== undefined && sortBy.value.length > 0) {
|
||||
let factor = sortBy.value[0].order == "desc" ? [-1, 1] : [1, -1];
|
||||
if (untot.value == "уникальные") {
|
||||
arr.sort((a, b) => {
|
||||
if (
|
||||
a[sortBy.value[0].key].unic.size >
|
||||
b[sortBy.value[0].key].unic.size
|
||||
)
|
||||
return factor[0];
|
||||
if (
|
||||
a[sortBy.value[0].key].unic.size <
|
||||
b[sortBy.value[0].key].unic.size
|
||||
)
|
||||
return factor[1];
|
||||
return 0;
|
||||
});
|
||||
} else {
|
||||
arr.sort((a, b) => {
|
||||
if (a[sortBy.value[0].key].total > b[sortBy.value[0].key].total)
|
||||
return factor[0];
|
||||
if (a[sortBy.value[0].key].total < b[sortBy.value[0].key].total)
|
||||
return factor[1];
|
||||
return 0;
|
||||
});
|
||||
}
|
||||
tabledata.value=arr
|
||||
|
||||
|
||||
}
|
||||
const tabledata = ref(datas())
|
||||
watch(()=>props.pages_count,(newValue)=>{
|
||||
if (newValue!==[]){
|
||||
tabledata.value=datas()
|
||||
customSort()
|
||||
}
|
||||
tabledata.value = arr;
|
||||
};
|
||||
const tabledata = ref(datas());
|
||||
watch(
|
||||
() => props.pages_count,
|
||||
(newValue) => {
|
||||
if (newValue !== []) {
|
||||
tabledata.value = datas();
|
||||
customSort();
|
||||
}
|
||||
})
|
||||
// tabledata.value=datas.value
|
||||
return {
|
||||
tabledata,
|
||||
sortBy,
|
||||
customSort,
|
||||
untot,
|
||||
modelrating,
|
||||
getColorTooday1,
|
||||
getColorPeriod1,
|
||||
getColorTooday2,
|
||||
getColorPeriod2,
|
||||
getColorNow,
|
||||
headers,
|
||||
datas
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
// tabledata.value=datas.value
|
||||
return {
|
||||
tabledata,
|
||||
sortBy,
|
||||
customSort,
|
||||
untot,
|
||||
modelrating,
|
||||
getColorTooday1,
|
||||
getColorPeriod1,
|
||||
getColorTooday2,
|
||||
getColorPeriod2,
|
||||
getColorNow,
|
||||
headers,
|
||||
datas,
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.v-table {
|
||||
flex: 1!important;
|
||||
|
||||
.v-table {
|
||||
flex: 1 !important;
|
||||
}
|
||||
|
||||
.mytable tr {
|
||||
font-size: 13px;
|
||||
font-size: 13px;
|
||||
}
|
||||
.mytable i{
|
||||
font-size: 10px;
|
||||
.mytable i {
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
|
||||
.myleft {
|
||||
float: left;
|
||||
float: left;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
@@ -12,7 +12,7 @@
|
||||
v-model:expanded="expanded"
|
||||
:headers="dessertHeaders"
|
||||
:items="dataActivusers"
|
||||
item-value="user.id"
|
||||
item-value="user"
|
||||
show-expand
|
||||
class="h-0 cursor-default bg-grey_white"
|
||||
:sort-by="[{ key: 'info.count', order: 'desc' }]"
|
||||
@@ -169,7 +169,7 @@ export default {
|
||||
let res = []
|
||||
|
||||
props.activusers.forEach((e) => {
|
||||
|
||||
|
||||
let ind = res.findIndex(el => el.user.id == e.user.id)
|
||||
if (ind == -1) {
|
||||
res.push({user: e.user,
|
||||
|
||||
@@ -1,191 +1,126 @@
|
||||
<template>
|
||||
<v-row>
|
||||
<v-row>
|
||||
<v-col class="flex-column pr-0">
|
||||
<v-card class="h-100">
|
||||
|
||||
|
||||
<!-- xsmall
|
||||
:time="false"
|
||||
hide-view-selector
|
||||
active-view="month"
|
||||
:disable-views="['years', 'year', 'week', 'day']"
|
||||
@cell-focus="selectedDate = $event"
|
||||
|
||||
:events="events"
|
||||
class="vuecal--blue-theme vuecal--rounded-theme" -->
|
||||
<v-card class="h-100">
|
||||
<vue-cal
|
||||
locale="ru"
|
||||
xsmall
|
||||
:time="false"
|
||||
hide-view-selector
|
||||
:disable-views="['years', 'year', 'week', 'day']"
|
||||
events-count-on-year-view
|
||||
active-view="month"
|
||||
:events="events"
|
||||
todayButton
|
||||
@cell-focus="selectedDate = $event"
|
||||
locale="ru"
|
||||
xsmall
|
||||
:time="false"
|
||||
hide-view-selector
|
||||
:disable-views="['years', 'year', 'week', 'day']"
|
||||
events-count-on-year-view
|
||||
active-view="month"
|
||||
:events="events"
|
||||
todayButton
|
||||
@cell-focus="selectedDate = $event"
|
||||
>
|
||||
<template #arrow-prev>
|
||||
<v-icon icon="mdi-menu-left"></v-icon>
|
||||
</template>
|
||||
<template #arrow-next>
|
||||
<v-icon icon="mdi-menu-right"></v-icon>
|
||||
</template>
|
||||
<template #today-button>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<v-tooltip text="Сегодня" location="bottom">
|
||||
<template v-slot:activator="{ props }">
|
||||
|
||||
<v-icon @click="selectedDate =new Date()" v-bind="props" icon="mdi-crosshairs-gps" size="x-small" class="pt-1 pr-3" color="more_details_btn"/>
|
||||
</template>
|
||||
</v-tooltip>
|
||||
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
|
||||
<template #arrow-prev>
|
||||
<v-icon icon="mdi-menu-left"></v-icon>
|
||||
</template>
|
||||
<template #arrow-next>
|
||||
<v-icon icon="mdi-menu-right"></v-icon>
|
||||
</template>
|
||||
<template #today-button>
|
||||
<v-tooltip text="Сегодня" location="bottom">
|
||||
<template v-slot:activator="{ props }">
|
||||
<v-icon
|
||||
@click="selectedDate = new Date()"
|
||||
v-bind="props"
|
||||
icon="mdi-crosshairs-gps"
|
||||
size="x-small"
|
||||
class="pt-1 pr-3"
|
||||
color="more_details_btn"
|
||||
/>
|
||||
</template>
|
||||
</v-tooltip>
|
||||
</template>
|
||||
</vue-cal>
|
||||
</v-card>
|
||||
</v-card>
|
||||
</v-col>
|
||||
<v-col>
|
||||
<!-- todayButton -->
|
||||
|
||||
<v-card class="h-100">
|
||||
<v-card-title class="text-center">События на {{dayformat(selectedDate)}}</v-card-title>
|
||||
<!-- <v-card-text>ddd</v-card-text> -->
|
||||
<vue-cal
|
||||
locale="ru"
|
||||
xsmall
|
||||
:time="false"
|
||||
hide-view-selector
|
||||
hideTitleBar
|
||||
split
|
||||
header-format= "DD"
|
||||
:events="events"
|
||||
active-view="day"
|
||||
:disable-views="['years', 'year', 'month', 'week']"
|
||||
:selected-date="selectedDate"
|
||||
|
||||
|
||||
<v-card class="h-100">
|
||||
<v-card-title class="text-center"
|
||||
>События на {{ dayformat(selectedDate) }}</v-card-title
|
||||
>
|
||||
<template #arrow-prev>
|
||||
<v-icon icon="mdi-menu-left"></v-icon>
|
||||
</template>
|
||||
<template #arrow-next>
|
||||
<v-icon icon="mdi-menu-right"></v-icon>
|
||||
</template>
|
||||
<template #today-button>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- <v-tooltip text="Сегодня" location="bottom">
|
||||
<template v-slot:activator="{ props }">
|
||||
<v-icon v-bind="props" icon="mdi-crosshairs-gps" size="x-small" class="pt-1 pr-3" color="more_details_btn"/>
|
||||
</template>
|
||||
</v-tooltip> -->
|
||||
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<vue-cal
|
||||
locale="ru"
|
||||
xsmall
|
||||
:time="false"
|
||||
hide-view-selector
|
||||
hideTitleBar
|
||||
split
|
||||
header-format="DD"
|
||||
:events="events"
|
||||
active-view="day"
|
||||
:disable-views="['years', 'year', 'month', 'week']"
|
||||
:selected-date="selectedDate"
|
||||
>
|
||||
<template #arrow-prev>
|
||||
<v-icon icon="mdi-menu-left"></v-icon>
|
||||
</template>
|
||||
<template #arrow-next>
|
||||
<v-icon icon="mdi-menu-right"></v-icon>
|
||||
</template>
|
||||
<template #today-button>
|
||||
</template>
|
||||
</vue-cal>
|
||||
</v-card>
|
||||
</v-card>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</v-row>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import VueCal from 'vue-cal'
|
||||
import 'vue-cal/dist/vuecal.css'
|
||||
import { ref, onMounted } from 'vue'
|
||||
import { axiosApiInstance } from '@/utils/axios-api'
|
||||
|
||||
import VueCal from "vue-cal";
|
||||
import "vue-cal/dist/vuecal.css";
|
||||
import { ref, onMounted } from "vue";
|
||||
import { axiosApiInstance } from "@/utils/axios-api";
|
||||
|
||||
export default {
|
||||
components: { VueCal },
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
components: { VueCal },
|
||||
|
||||
setup() {
|
||||
const events = ref([
|
||||
|
||||
])
|
||||
function f_generalvacation() {
|
||||
axiosApiInstance.get('api/general_vacation/generalvacation/')
|
||||
.then(data => {
|
||||
|
||||
|
||||
for (let x in data.data) {
|
||||
|
||||
if (x=="План-график") {
|
||||
data.data[x].map(e=>{
|
||||
|
||||
|
||||
events.value.push({ name: e.name, start: e.start_work_period, end: e.end_work_period, content: e.name})
|
||||
|
||||
}
|
||||
|
||||
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
|
||||
onMounted(() => {
|
||||
f_generalvacation()
|
||||
})
|
||||
|
||||
|
||||
|
||||
const selectedDate = ref(null)
|
||||
|
||||
function dayformat(days) {
|
||||
const d = new Date(days)
|
||||
let mess= 'сегодня'
|
||||
if (d.getFullYear() != '1970'){
|
||||
mess = `${d.getDate()} число`
|
||||
setup() {
|
||||
const events = ref([]);
|
||||
function f_generalvacation() {
|
||||
axiosApiInstance
|
||||
.get("api/general_vacation/generalvacation/")
|
||||
.then((data) => {
|
||||
for (let x in data.data) {
|
||||
if (x == "План-график") {
|
||||
data.data[x].map((e) => {
|
||||
events.value.push({
|
||||
name: e.name,
|
||||
start: e.start_work_period,
|
||||
end: e.end_work_period,
|
||||
content: e.name,
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return mess
|
||||
}
|
||||
onMounted(() => {
|
||||
f_generalvacation();
|
||||
});
|
||||
|
||||
|
||||
const selectedDate = ref(null);
|
||||
|
||||
|
||||
function dayformat(days) {
|
||||
const d = new Date(days);
|
||||
let mess = "сегодня";
|
||||
if (d.getFullYear() != "1970") {
|
||||
mess = `${d.getDate()} число`;
|
||||
}
|
||||
|
||||
return mess;
|
||||
}
|
||||
|
||||
|
||||
return { events, selectedDate, f_generalvacation, dayformat }
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
return { events, selectedDate, f_generalvacation, dayformat };
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
|
||||
/* Dot indicator */
|
||||
.vuecal__cell-events-count {
|
||||
width: 20px;
|
||||
@@ -196,90 +131,94 @@ export default {
|
||||
}
|
||||
|
||||
.vuecal {
|
||||
border-radius: 6px;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.vuecal__title-bar {
|
||||
border-top-left-radius: 3px;
|
||||
border-top-right-radius: 3px;
|
||||
border-top-left-radius: 3px;
|
||||
border-top-right-radius: 3px;
|
||||
}
|
||||
|
||||
.vuecal__title-bar {
|
||||
background: var(--cards)
|
||||
/* background: linear-gradient(to top right, rgba(19,84,122,.8), rgba(128,208,199,.8)); */
|
||||
background: var(--cards);
|
||||
/* background: linear-gradient(to top right, rgba(19,84,122,.8), rgba(128,208,199,.8)); */
|
||||
}
|
||||
.vuecal__flex .vuecal__title {
|
||||
font-family: sans-serif;
|
||||
font-family: sans-serif;
|
||||
}
|
||||
.vuecal__cell-events-count {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 65%;
|
||||
transform: translate(-50%);
|
||||
min-width: 15px;
|
||||
height: 15px;
|
||||
line-height: 15px;
|
||||
padding: 0;
|
||||
background: linear-gradient(to top right, rgba(19,84,122,.8), rgba(128,208,199,.8));
|
||||
color: #f8fff9!important;
|
||||
border-radius: 12px;
|
||||
font-size: 10px;
|
||||
box-sizing: border-box;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 65%;
|
||||
transform: translate(-50%);
|
||||
min-width: 15px;
|
||||
height: 15px;
|
||||
line-height: 15px;
|
||||
padding: 0;
|
||||
background: linear-gradient(
|
||||
to top right,
|
||||
rgba(19, 84, 122, 0.8),
|
||||
rgba(128, 208, 199, 0.8)
|
||||
);
|
||||
color: #f8fff9 !important;
|
||||
border-radius: 12px;
|
||||
font-size: 10px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.vuecal__event {
|
||||
color: #666;
|
||||
background-color: transparent;
|
||||
padding: 10px;
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
z-index: 1;
|
||||
transition: box-shadow .3s,left .3s,width .3s;
|
||||
overflow: hidden;
|
||||
text-align: justify;
|
||||
color: #666;
|
||||
background-color: transparent;
|
||||
padding: 10px;
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
z-index: 1;
|
||||
transition: box-shadow 0.3s, left 0.3s, width 0.3s;
|
||||
overflow: hidden;
|
||||
text-align: justify;
|
||||
}
|
||||
|
||||
.vuecal--rounded-theme .vuecal__cell-content {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
flex-grow: 0;
|
||||
border: 1px solid #00a5bc00;
|
||||
background: #c2e9d78c;
|
||||
border-radius: 30px;
|
||||
color: #333;
|
||||
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
flex-grow: 0;
|
||||
border: 1px solid #00a5bc00;
|
||||
background: #c2e9d78c;
|
||||
border-radius: 30px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.vuecal__cell-content {
|
||||
cursor: pointer;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.vuecal__body {
|
||||
position: relative;
|
||||
overflow: auto;
|
||||
height: 0;
|
||||
position: relative;
|
||||
overflow: auto;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
.vuecal--no-time .vuecal__event {
|
||||
min-height: 20px;
|
||||
}
|
||||
|
||||
.vuecal__cell--selected:before {border-color: rgba(30, 65, 49, 0.5);}
|
||||
|
||||
.vuecal__cell--today, .vuecal__cell--current {
|
||||
background-color: rgba(238, 181, 214, 0.548);
|
||||
|
||||
min-height: 20px;
|
||||
}
|
||||
|
||||
.vuecal__cell--selected:before {
|
||||
border-color: rgba(30, 65, 49, 0);
|
||||
border-color: rgba(30, 65, 49, 0.5);
|
||||
}
|
||||
|
||||
.vuecal__cell--today,
|
||||
.vuecal__cell--current {
|
||||
background-color: rgba(238, 181, 214, 0.548);
|
||||
}
|
||||
|
||||
.vuecal__cell--selected:before {
|
||||
border-color: rgba(30, 65, 49, 0);
|
||||
}
|
||||
|
||||
.vuecal__cell--selected {
|
||||
background-color: #3a97694a;
|
||||
z-index: 2;
|
||||
background-color: #3a97694a;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
</style>
|
||||
</style>
|
||||
@@ -10,8 +10,8 @@
|
||||
{{splitname(author)}}
|
||||
</span>
|
||||
<info-user-card
|
||||
:author=author
|
||||
:opendialog = open
|
||||
:loging="author.login"
|
||||
@update:opendialog="open = $event"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
# H1 Для отрисовки карточки, необходимы поля от пользователя
|
||||
|
||||
department
|
||||
fio
|
||||
post
|
||||
email
|
||||
tel
|
||||
room
|
||||
login
|
||||
|
||||
Использовать серриализатор InfoUserCardSerializer из userauth для сбора
|
||||
|
||||
Пример
|
||||
```
|
||||
class PagesSerializer(serializers.ModelSerializer):
|
||||
user = serializers.SerializerMethodField('get_user')
|
||||
pages = serializers.CharField(source='pages.page')
|
||||
fullPath = serializers.CharField(source='pages.fullPath')
|
||||
ico = serializers.CharField(source='pages.ico')
|
||||
|
||||
class Meta:
|
||||
model = CountVisitor
|
||||
fields = ['user', 'pages', 'fullPath', 'ico', 'visitdate', 'count']
|
||||
|
||||
def get_user(self, obj):
|
||||
|
||||
return InfoUserCardSerializer(obj.user.user).data
|
||||
```
|
||||
`
|
||||
const basicInformation = () => [
|
||||
{title: 'Отдел:', info: department},
|
||||
{title: 'ФИО:', info: fio},
|
||||
{title: 'Должность:', info: post},
|
||||
]
|
||||
|
||||
const subInformation = () => [
|
||||
{title: 'E-mail: ', info: email},
|
||||
{title: 'Телефон: ', info: tel},
|
||||
{title: 'Комната: ', info: room},
|
||||
{title: 'Логин: ', info: login},
|
||||
]
|
||||
`
|
||||
+15
-28
@@ -20,7 +20,7 @@
|
||||
cover
|
||||
min-height="222px"
|
||||
max-height="222px"
|
||||
:src="checkremote(`${spravURL}${userlinks.login}.jpg`)"
|
||||
:src="checkremote(`${spravURL}${author.login}.jpg`)"
|
||||
/>
|
||||
|
||||
</v-col>
|
||||
@@ -77,62 +77,49 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { ref, computed, watch } from 'vue'
|
||||
import { axiosApiInstance } from '@/utils/axios-api'
|
||||
import {checkremote} from '@/utils/universal_functions'
|
||||
import { computed } from 'vue'
|
||||
import { checkremote } from '@/utils/universal_functions'
|
||||
import { spravURL } from '@/utils/axios-api'
|
||||
|
||||
export default {
|
||||
|
||||
name: "InfoUserCard",
|
||||
|
||||
props: {
|
||||
|
||||
opendialog: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
|
||||
loging: {
|
||||
type: String,
|
||||
default: ''
|
||||
author: {
|
||||
type: Object,
|
||||
default: {}
|
||||
}
|
||||
},
|
||||
|
||||
setup (props, {emit}) {
|
||||
const userlinks = ref([])
|
||||
|
||||
const infouser = () => {
|
||||
axiosApiInstance.get('api/accounts/getuser/?userlogin='+props.loging).then(res => {
|
||||
userlinks.value=res.data
|
||||
})}
|
||||
|
||||
const mydialog = computed({
|
||||
get: () => props.opendialog,
|
||||
set: (value) => emit('update:opendialog', value)
|
||||
})
|
||||
|
||||
watch(()=>props.opendialog,(newValue,oldValue)=>{
|
||||
if(newValue){
|
||||
infouser()
|
||||
}
|
||||
}, {deep:true})
|
||||
|
||||
const basicInformation = () => [
|
||||
{title: 'Отдел:', info: userlinks.value.department},
|
||||
{title: 'ФИО:', info: userlinks.value.fio},
|
||||
{title: 'Должность:', info: userlinks.value.post},
|
||||
{title: 'Отдел:', info: props.author.department},
|
||||
{title: 'ФИО:', info: props.author.fio},
|
||||
{title: 'Должность:', info: props.author.post},
|
||||
]
|
||||
|
||||
const subInformation = () => [
|
||||
{title: 'E-mail: ', info: userlinks.value.email},
|
||||
{title: 'Телефон: ', info: userlinks.value.tel},
|
||||
{title: 'Комната: ', info: userlinks.value.room},
|
||||
{title: 'Логин: ', info: userlinks.value.login},
|
||||
{title: 'E-mail: ', info: props.author.email},
|
||||
{title: 'Телефон: ', info: props.author.tel},
|
||||
{title: 'Комната: ', info: props.author.room},
|
||||
{title: 'Логин: ', info: props.author.login},
|
||||
]
|
||||
|
||||
return {
|
||||
mydialog,
|
||||
userlinks,
|
||||
infouser,
|
||||
spravURL,
|
||||
checkremote,
|
||||
basicInformation,
|
||||
@@ -31,6 +31,7 @@
|
||||
/>
|
||||
<span class="font-weight-medium text-grey-darken-3 myleft text-caption">
|
||||
{{splitname(author)}}
|
||||
|
||||
</span>
|
||||
</v-chip>
|
||||
|
||||
@@ -49,6 +50,7 @@
|
||||
|
||||
|
||||
<info-user-card
|
||||
:author="author"
|
||||
:opendialog = open
|
||||
:loging="author.login"
|
||||
@update:opendialog="open = $event"
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<template>
|
||||
<div class="align-center d-flex flex-column py-1">
|
||||
|
||||
|
||||
<v-btn
|
||||
variant="text"
|
||||
v-for="x in onlineuser"
|
||||
@@ -16,6 +18,7 @@
|
||||
</v-avatar>
|
||||
</v-btn>
|
||||
<info-user-card
|
||||
|
||||
:opendialog = open
|
||||
:loging="loging"
|
||||
@update:opendialog="open = $event"
|
||||
@@ -39,6 +42,7 @@ export default {
|
||||
const wsfuncs={onliner:function(data){
|
||||
let newset = new Set(data)
|
||||
let arr= Array.from(newset)
|
||||
|
||||
arr.splice(arr.findIndex(e=> e == accountStore.user.login), 1)
|
||||
onlineuser.value = arr
|
||||
}}
|
||||
@@ -46,7 +50,6 @@ export default {
|
||||
let onlineuser= ref([])
|
||||
|
||||
const connect = new WebSocket(baseWS+"ws/watcher/?token="+localStorage.access)
|
||||
|
||||
const whatuser=(x)=> {
|
||||
loging.value = x
|
||||
open.value = true
|
||||
@@ -54,6 +57,7 @@ export default {
|
||||
|
||||
connect.onmessage=(e)=>{
|
||||
let data = JSON.parse(e.data)
|
||||
|
||||
wsfuncs[data['message']['action']](data.message.data)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
|
||||
<v-card
|
||||
class="bg-transparent"
|
||||
|
||||
density="compact"
|
||||
:prepend-avatar="checkremote(`${spravURL}${author.login}.jpg`)"
|
||||
:title="author.fio"
|
||||
@@ -11,6 +9,7 @@
|
||||
variant="text" @click="open=true"
|
||||
/>
|
||||
<info-user-card
|
||||
:author=author
|
||||
:opendialog = open
|
||||
:loging="author.login"
|
||||
@update:opendialog="open = $event"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import myHelper from '@/components/UI/my-helper';
|
||||
import InfoUserCard from '@/components/UI/infoUserCard.vue';
|
||||
import InfoUserCard from '@/components/UI/fiousercard/infoUserCard.vue';
|
||||
import TooltipText from '@/components/UI/tooltip-text.vue'
|
||||
import AlertDefault from '@/layouts/default/alertDefault.vue'
|
||||
import listUser from '@/components/UI/fiousercard/listUser.vue';
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<v-menu
|
||||
v-model="menu"
|
||||
:close-on-content-click="false"
|
||||
:nudge-width="500"
|
||||
:max-width="800"
|
||||
offset-x
|
||||
>
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
|
||||
@@ -1,56 +1,63 @@
|
||||
<template>
|
||||
<v-row lg="12" class="mt-10 ml-13">
|
||||
<v-col lg="5" no-gutters class="d-flex justify-end align-start">
|
||||
<v-card :width="640" :height="600" :elevation="5">
|
||||
<div style="width:640px;height:600px; ">
|
||||
<l-map :zoom="13" :min-zoom="13" :center="[55.83451, 37.40848]">
|
||||
<l-tile-layer :url="`${baseURL}media/Tiles/{z}/{x}/{y}.png`"></l-tile-layer>
|
||||
<l-marker :lat-lng="[55.83451, 37.40848]" :icon="icon_cod"> </l-marker>
|
||||
<l-marker :lat-lng="[55.83309, 37.39933]" :icon="icon_mcd"> </l-marker>
|
||||
<l-marker :lat-lng="[55.83463, 37.38335]" :icon="icon_metro"> </l-marker>
|
||||
<l-marker :lat-lng="[55.83213, 37.38247]" :icon="icon_mcd"> </l-marker>
|
||||
<l-marker :lat-lng="[55.82741, 37.43715]" :icon="icon_metro"> </l-marker>
|
||||
<l-marker :lat-lng="[55.82705, 37.4411]" :icon="icon_mcd"> </l-marker>
|
||||
<l-marker :lat-lng="[55.8496, 37.43925]" :icon="icon_metro"> </l-marker>
|
||||
<l-marker :lat-lng="[55.8252, 37.3853]" :icon="icon_metro"> </l-marker>
|
||||
<v-row class="ma-1">
|
||||
<v-col lg="6" class="d-flex justify-center align-start">
|
||||
<v-card :elevation="5">
|
||||
<div style="width:915px;height:823px; ">
|
||||
<l-map :zoom="13" :min-zoom="13" :center="markers[0].coordinate">
|
||||
<l-tile-layer :url="`${baseURL}media/Tiles/{z}/{x}/{y}.png`" />
|
||||
<l-marker v-for="marker in markers" :key="marker" :lat-lng="marker.coordinate"
|
||||
:icon="icon(marker.icon)" />
|
||||
</l-map>
|
||||
</div>
|
||||
</v-card>
|
||||
</v-col>
|
||||
<v-col lg="6" no-gutters class="d-flex flex-column ml-16">
|
||||
<v-row lg="12" class="pt-3">
|
||||
<v-card :elevation="5">
|
||||
<v-card-title class="text-h6 d-flex justify-center bg-teal-lighten-5 text-teal-darken-4">
|
||||
Способ проезда
|
||||
</v-card-title>
|
||||
<v-card-text class="pt-15">
|
||||
<v-list>
|
||||
<v-list-item class="text-subtitle-2" v-for="(address_path, i) in address_pathes" :key="i">
|
||||
{{ address_path.path }}
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-row>
|
||||
|
||||
<v-row lg="12">
|
||||
<v-card :elevation="5" class="w-100 mb-2 mt-2">
|
||||
<v-card-title class="text-h6 d-flex justify-center bg-teal-lighten-5 text-teal-darken-4">
|
||||
Адрес
|
||||
</v-card-title>
|
||||
<v-card-text class="text-h6 d-flex justify-center pt-10">
|
||||
{{ address.building }}
|
||||
</v-card-text>
|
||||
<v-card-text class="text-h6 d-flex justify-center">
|
||||
<p>{{ address.phone }}</p>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-row>
|
||||
<v-col lg="6" class="d-flex flex-column gap">
|
||||
|
||||
<v-card :elevation="5">
|
||||
<v-card-title class="text-h6 d-flex justify-center bg-teal-lighten-5 text-teal-darken-4">
|
||||
Способ проезда
|
||||
</v-card-title>
|
||||
<v-card-text class="text-subtitle-1">
|
||||
<v-list>
|
||||
<v-list-item v-for="address_path in address_pathes">
|
||||
{{ address_path.path }}
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
|
||||
<v-card :elevation="5" class="h-50">
|
||||
<v-card-title class="d-flex justify-center bg-teal-lighten-5 text-teal-darken-4">
|
||||
Адрес
|
||||
</v-card-title>
|
||||
<v-card-text class="text-h6 d-flex justify-center align-end pa-4">
|
||||
{{ address.building }}
|
||||
</v-card-text>
|
||||
<v-card-text class="text-h6 d-flex justify-center align-center">
|
||||
<p>{{ address.phone }}</p>
|
||||
</v-card-text>
|
||||
<v-card-title class=" d-flex justify-center">
|
||||
Время работы
|
||||
</v-card-title>
|
||||
<v-card-text class="text-subtitle-1">
|
||||
<v-list>
|
||||
<v-list-item v-for="work_time in work_times">
|
||||
<v-row class="d-flex justify-center">
|
||||
<v-col lg="4">{{ work_time.day }}</v-col>
|
||||
<v-col lg="3">{{ work_time.time }}</v-col>
|
||||
</v-row>
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
|
||||
</v-col>
|
||||
|
||||
</v-row>
|
||||
</template>
|
||||
<script>
|
||||
import { ref } from 'vue'
|
||||
import { baseURL } from '@/utils/axios-api'
|
||||
import "leaflet/dist/leaflet.css";
|
||||
import { LMap, LTileLayer, LMarker } from "@vue-leaflet/vue-leaflet";
|
||||
@@ -65,34 +72,67 @@ export default {
|
||||
icon
|
||||
},
|
||||
setup() {
|
||||
return {
|
||||
icon_cod: icon({
|
||||
iconUrl: `${baseURL}media/map_icons/fns.png`,
|
||||
|
||||
const pathbuild = (icon) => {
|
||||
return `${baseURL}media/map_icons/${icon}.png`
|
||||
}
|
||||
const icons = {
|
||||
icon_cod: {
|
||||
iconUrl: pathbuild(`fns`),
|
||||
iconSize: [30, 30],
|
||||
iconAnchor: [16, 40]
|
||||
}),
|
||||
|
||||
icon_mcd: icon({
|
||||
iconUrl: `${baseURL}media/map_icons/mcd_d2.png`,
|
||||
iconSize: [32, 18],
|
||||
iconAnchor: [10, 20]
|
||||
}),
|
||||
|
||||
icon_metro: icon({
|
||||
iconUrl: `${baseURL}media/map_icons/mos_metro.png`,
|
||||
},
|
||||
icon_metro: {
|
||||
iconUrl: pathbuild(`mos_metro`),
|
||||
iconSize: [30, 25],
|
||||
iconAnchor: [10, 20]
|
||||
}),
|
||||
},
|
||||
icon_mcd: {
|
||||
iconUrl: pathbuild(`mcd_d2`),
|
||||
iconSize: [32, 18],
|
||||
iconAnchor: [10, 20]
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
const markers = ref([
|
||||
{ coordinate: [55.83451, 37.40848], icon: icons.icon_cod },
|
||||
{ coordinate: [55.83309, 37.39933], icon: icons.icon_mcd },
|
||||
{ coordinate: [55.83463, 37.38335], icon: icons.icon_metro },
|
||||
{ coordinate: [55.83213, 37.38247], icon: icons.icon_mcd },
|
||||
{ coordinate: [55.82741, 37.43715], icon: icons.icon_metro },
|
||||
{ coordinate: [55.82705, 37.4411], icon: icons.icon_mcd },
|
||||
{ coordinate: [55.8496, 37.43925], icon: icons.icon_metro },
|
||||
{ coordinate: [55.8252, 37.3853], icon: icons.icon_metro }
|
||||
|
||||
|
||||
])
|
||||
|
||||
return {
|
||||
icons,
|
||||
markers,
|
||||
icon,
|
||||
|
||||
address: {
|
||||
"building": "125373, Москва, Походный проезд, двл.3, стр 1",
|
||||
"phone": "Телефон: 8(495) 198-53 - 12"
|
||||
"phone": "Телефон: 8(495) 198-53-12"
|
||||
},
|
||||
address_pathes: [
|
||||
{ "path": "От станции метро «Волоколамская», 837 автобусом до остановки «Таксомоторный парк», или маршрутным такси № 441" },
|
||||
{ "path": "От станции метро «Сходненская», 1-й вагон из центра, маршрутное такси № 368, последний вагон из центра, автобусы № 678, № 199" },
|
||||
{ "path": "От станции метро «Тушинская», последний вагон из центра, автобусы № 2, № 266 до остановки «пл. Трикотажная», автобусы № 88, №177 до остановки «17 Таксомоторный парк»" }
|
||||
{ "path": "От станции метро «Волоколамская», автобус 368, до остановки \"Налоговый городок\"" },
|
||||
{ "path": "От платформы МЦД «Волоколамская» проехать одну остановку до платформы МЦД «Трикотажная», далее на автобусе 368 до остановки \"Налоговый городок\" или пешком (10 минут) до территории Налоговго городка" },
|
||||
{ "path": "От станции МЦД «Трикотажная», далее на автобусе 368, до остановки \"Налоговый городок\" или пешком (10 минут) до территории Налоговго городка" },
|
||||
{ "path": "От станции метро «Сходненская», 1-й вагон из центра, далее на автобусе № 368" },
|
||||
{ "path": "От станции метро «Тушинская», последний вагон из центра, автобусы № 400, № 741, 741к, 856, 436, 575 до остановки «пл. Трикотажная» или от станции МЦД «Тушинская» проехать одну остановку до станции МЦД «Трикотажная» на автобусе 368 до остановки «Налоговый городок» или пешком(10 минут) до территории Налогового городка" },
|
||||
{ "path": "От станции МЦД «Трикотажная» на автобусе 368 до остановки «Налоговый городок» или пешком(10 минут) до территории Налогового городка" },
|
||||
],
|
||||
|
||||
work_times: [
|
||||
{ "day": "Понедельник-Четверг", "time": "09:00 - 18:00" },
|
||||
{ "day": "Пятница", "time": "09:00 - 16:45" },
|
||||
{ "day": "Суббота-Воскресенье", "time": "не работает" },
|
||||
],
|
||||
baseURL,
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
|
||||
|
||||
<template>
|
||||
<v-card :elevation="3" :width="width" :height="height">
|
||||
|
||||
<!-- <Handle type="source" :position="Position.Right" />
|
||||
<Handle type="target" :position="Position.Left" />
|
||||
<Handle type="source" :position="Position.Top" />
|
||||
<Handle type="target" :position="Position.Bottom" /> -->
|
||||
<v-card-text class="nodrag nopan d-flex justify-center align-center
|
||||
text-h6
|
||||
bg-teal-lighten-5 text-center text-teal-darken-4 h-50 pa-3">
|
||||
<p class="pa-5">{{ label }}</p>
|
||||
</v-card-text>
|
||||
<v-card-text class=" text-center text-h6 d-flex justify-center align-center pa-3">
|
||||
<p>{{ data }}</p>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</template>
|
||||
<script setup>
|
||||
import { Position, Handle } from '@vue-flow/core'
|
||||
import "@vue-flow/core/dist/style.css"
|
||||
|
||||
// props were passed from the slot using `v-bind="customNodeProps"`
|
||||
const props = defineProps(['label', 'data', 'width', 'height'])
|
||||
</script>
|
||||
@@ -1,206 +1,177 @@
|
||||
|
||||
|
||||
<template>
|
||||
<VueFlow :nodes="nodes" :edges="edges" :class="{ dark }" class="basicflow" :default-viewport="{ zoom: 1 }" :min-zoom="1"
|
||||
:max-zoom="1" fit-view-on-init>
|
||||
<template #node-boss="bossNodeProps">
|
||||
<BossNode :width="500" :height="100" v-bind="bossNodeProps" />
|
||||
</template>
|
||||
<template #node-middleboss="bossNodeProps">
|
||||
<BossNode :width="230" :height="170" v-bind="bossNodeProps" />
|
||||
</template>
|
||||
<template #node-deps="bossNodeProps">
|
||||
<BossNode :width="250" :height="180" v-bind="bossNodeProps" />
|
||||
</template>
|
||||
<div>
|
||||
<v-row no-gutters class="gap h-100 flex-column">
|
||||
<v-col lg="3" class="flex-column w100">
|
||||
<structure-inspection-row :sText="'Руковдство'">
|
||||
<template v-slot:cardboss>
|
||||
<v-col lg="3" v-for="x in structures" :key="x">
|
||||
<v-card class="flex-column d-flex mr-1">
|
||||
<v-card-text class="pa-0">
|
||||
<v-row no-gutters>
|
||||
<v-col lg="4" class="pa-1 w100">
|
||||
<v-img
|
||||
class="h-100"
|
||||
:src="checkremote(`${spravURL}${x.login}.jpg`)"
|
||||
cover
|
||||
/>
|
||||
</v-col>
|
||||
<v-col class="text-center align-self-center text-h6">
|
||||
{{ x.fio }}
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-col>
|
||||
</template>
|
||||
</structure-inspection-row>
|
||||
</v-col>
|
||||
<v-col>
|
||||
<structure-inspection-row :sText="'Структурные подразделения'">
|
||||
<template v-slot:cardboss>
|
||||
<v-col
|
||||
class="flex-column"
|
||||
v-for="bosses in structures"
|
||||
:key="bosses"
|
||||
>
|
||||
<div v-for="x in bosses.deps" :key="x">
|
||||
<!-- <v-col class="text-wrap text-center">
|
||||
{{x.name}}
|
||||
</v-col> -->
|
||||
<v-card class="flex-column d-flex mb-1 mr-1">
|
||||
<v-card-text class="pa-1 pt-3 px-3 flex-column">
|
||||
<v-col lg="12" class=" minh pa-0">
|
||||
<v-row no-gutters>
|
||||
<v-col
|
||||
class="text-wrap text-center text-body-2 font-weight-medium text-uppercase"
|
||||
>
|
||||
{{ x.name }}
|
||||
</v-col>
|
||||
<v-col class="flex-grow-0">
|
||||
<v-tooltip location="top">
|
||||
<template v-slot:activator="{ props }">
|
||||
<span v-bind="props">
|
||||
<v-icon
|
||||
size="large"
|
||||
color="green"
|
||||
icon="mdi-arrow-top-right"
|
||||
/>
|
||||
</span>
|
||||
</template>
|
||||
<v-row>
|
||||
<v-col> Перейти на страницу отдела </v-col>
|
||||
</v-row>
|
||||
</v-tooltip>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-col>
|
||||
|
||||
<Background bgColor="#ffff" />
|
||||
<Controls position="top-right">
|
||||
<ControlButton title="Reset Transform" @click="resetTransform">
|
||||
</ControlButton>
|
||||
</Controls>
|
||||
</VueFlow>
|
||||
<v-row no-gutters>
|
||||
<v-col lg="4" class="pa-1 w100">
|
||||
<v-img
|
||||
class="h-100"
|
||||
:src="
|
||||
checkremote(`${spravURL}${x.chief_deps.login}.jpg`)
|
||||
"
|
||||
cover
|
||||
/>
|
||||
</v-col>
|
||||
<v-col class="text-center align-self-center text-h6 px-3">
|
||||
<!-- <v-card-subtitle>
|
||||
{{x.name}}
|
||||
<my-helper :pretext="x" />
|
||||
</v-card-subtitle> -->
|
||||
{{ x.chief_deps.fio }}
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</div>
|
||||
</v-col>
|
||||
</template>
|
||||
</structure-inspection-row>
|
||||
</v-col>
|
||||
|
||||
<!-- <v-col lg="3" v-for="structure in structures" :key="structure">
|
||||
|
||||
<v-card class="ma-2">
|
||||
<v-card-item class="bg-teal-lighten-5 text-teal-darken-4 text-h6">
|
||||
{{ structure.post }}
|
||||
</v-card-item>
|
||||
<v-avatar rounded="0" size="90">
|
||||
<v-img :src="checkremote(`${spravURL}${structure.login}.jpg`)"></v-img>
|
||||
</v-avatar>
|
||||
<v-card-item>{{ structure.fio }}</v-card-item>
|
||||
</v-card>
|
||||
|
||||
<v-card class="ma-2" v-for="dep in structure.deps">
|
||||
<v-card-item class=" bg-teal-lighten-5 text-teal-darken-4 text-h6 deps-title">
|
||||
{{ dep.name }}
|
||||
</v-card-item>
|
||||
<v-avatar rounded="0" size="70">
|
||||
<v-img :src="checkremote(`${spravURL}${structure.login}.jpg`)"></v-img>
|
||||
</v-avatar>
|
||||
<v-card-item>
|
||||
{{ dep.chief_deps.post }}
|
||||
</v-card-item>
|
||||
<v-card-item>
|
||||
{{ dep.chief_deps.fio }}
|
||||
</v-card-item>
|
||||
</v-card>
|
||||
|
||||
</v-col> -->
|
||||
</v-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { ref } from 'vue'
|
||||
import { VueFlow, useVueFlow, Position } from '@vue-flow/core'
|
||||
import { ControlButton, Controls } from '@vue-flow/controls'
|
||||
import { Background } from '@vue-flow/background'
|
||||
import "@vue-flow/core/dist/style.css"
|
||||
import "@vue-flow/core/dist/theme-default.css"
|
||||
import BossNode from './BossNode.vue'
|
||||
|
||||
import { ref } from "vue";
|
||||
import { spravURL } from "@/utils/axios-api";
|
||||
import { checkremote } from "@/utils/universal_functions";
|
||||
import { axiosApiInstance } from "@/utils/axios-api";
|
||||
import StructureInspectionRow from "./StructureInspectionRow.vue";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
VueFlow,
|
||||
useVueFlow,
|
||||
Position,
|
||||
ControlButton,
|
||||
Controls,
|
||||
Background,
|
||||
BossNode
|
||||
},
|
||||
components: { StructureInspectionRow },
|
||||
setup() {
|
||||
const structures = ref([]);
|
||||
|
||||
setup() {
|
||||
const dark = ref(false)
|
||||
|
||||
const { onPaneReady, onConnect, addEdges, setViewport } = useVueFlow()
|
||||
|
||||
function resetTransform() {
|
||||
setViewport({ x: 0, y: 0, zoom: 1 })
|
||||
}
|
||||
|
||||
onConnect((connection) => {
|
||||
addEdges(connection)
|
||||
})
|
||||
|
||||
onPaneReady(({ fitView }) => {
|
||||
fitView()
|
||||
})
|
||||
|
||||
resetTransform()
|
||||
return {
|
||||
dark,
|
||||
nodes: ref([
|
||||
{
|
||||
id: '1',
|
||||
type: 'boss',
|
||||
label: 'Руководитель МИ ФНС России по ЦОД №2',
|
||||
data: 'Борис Борисович Толоко ',
|
||||
position: { x: 180, y: 50 },
|
||||
sourcePosition: Position.Right,
|
||||
targetPosition: Position.Bottom,
|
||||
|
||||
},
|
||||
{
|
||||
id: '2',
|
||||
type: 'middleboss',
|
||||
label: 'Заместитель начальника',
|
||||
data: 'Андреева Наталья Владимировна',
|
||||
position: { x: 140, y: 280 },
|
||||
targetPosition: Position.Top,
|
||||
},
|
||||
{
|
||||
id: '3',
|
||||
type: 'middleboss',
|
||||
label: 'Заместитель начальника',
|
||||
data: 'Ахкубеков Мухамат Алиевич',
|
||||
position: { x: 680, y: 280 },
|
||||
sourcePosition: Position.Top,
|
||||
},
|
||||
{
|
||||
id: '4',
|
||||
type: 'middleboss',
|
||||
label: 'Заместитель начальника',
|
||||
data: 'Послухаев Артем Николаевич',
|
||||
position: { x: 1220, y: 280 },
|
||||
targetPosition: Position.Top,
|
||||
},
|
||||
{
|
||||
id: '5',
|
||||
type: 'middleboss',
|
||||
label: 'Общий отдел',
|
||||
data: ' Начальник Золина Татьяна Евгеньевна ',
|
||||
position: { x: 792, y: 15 },
|
||||
targetPosition: Position.Left,
|
||||
sourcePosition: Position.Right,
|
||||
},
|
||||
{
|
||||
id: '6',
|
||||
type: 'middleboss',
|
||||
label: 'Отдел кадров и безопасности',
|
||||
data: 'Начальник Фролова Ирина Николаевна',
|
||||
position: { x: 1030, y: 15 },
|
||||
targetPosition: Position.Left,
|
||||
sourcePosition: Position.Right,
|
||||
},
|
||||
{
|
||||
id: '7',
|
||||
type: 'middleboss',
|
||||
label: 'Отдел управления качеством данных',
|
||||
data: ' Начальник Гончаров Церен Викторович',
|
||||
position: { x: 1268, y: 15 },
|
||||
targetPosition: Position.Left,
|
||||
sourcePosition: Position.Right,
|
||||
},
|
||||
{
|
||||
id: '8',
|
||||
type: 'deps',
|
||||
label: 'Отдел по сопровождению интернет-сервисов',
|
||||
data: ' Начальник Лосева Екатерина Владимировна',
|
||||
position: { x: 1080, y: 500 },
|
||||
targetPosition: Position.Top,
|
||||
},
|
||||
|
||||
{
|
||||
id: '9',
|
||||
type: 'deps',
|
||||
label: 'Отдел внедрения технологических процессов',
|
||||
data: ' Начальник Туркова Мария Николаевна',
|
||||
position: { x: 1340, y: 500 },
|
||||
targetPosition: Position.Top,
|
||||
},
|
||||
{
|
||||
id: '10',
|
||||
type: 'deps',
|
||||
label: 'Отдел контроля технологических процессов',
|
||||
data: ' Начальник Михайлов Виктор Валентинович',
|
||||
position: { x: 800, y: 500 },
|
||||
targetPosition: Position.Top,
|
||||
},
|
||||
{
|
||||
id: '11',
|
||||
type: 'deps',
|
||||
label: 'Отдел ведения ведомственной модели данных',
|
||||
data: ' Начальник Щедрин Владимир Дмитриевич',
|
||||
position: { x: 540, y: 500 },
|
||||
targetPosition: Position.Top,
|
||||
},
|
||||
{
|
||||
id: '12',
|
||||
type: 'deps',
|
||||
label: 'Отдел развития личного кабинеита налогоплательщика физического лица',
|
||||
data: 'И.О.начальника Романова Марина Александровна',
|
||||
position: { x: 0, y: 500 },
|
||||
targetPosition: Position.Top,
|
||||
},
|
||||
{
|
||||
id: '13',
|
||||
type: 'deps',
|
||||
label: 'Отдел обработки обращений граждан',
|
||||
data: 'Начальник Ванюшкина Наталья Николаевна',
|
||||
position: { x: 260, y: 500 },
|
||||
targetPosition: Position.Top,
|
||||
},
|
||||
|
||||
|
||||
]),
|
||||
|
||||
edges: ref([
|
||||
// { id: 'e1-5', type: 'step', source: '1', target: '5' },
|
||||
// { id: 'e5-6', type: 'step', source: '5', target: '6' },
|
||||
// { id: 'e6-7', type: 'step', source: '6', target: '7' },
|
||||
// { id: 'e1-2', type: 'step', source: '1', target: '2' },
|
||||
// { id: 'e1-3', type: 'step', source: '1', target: '3' },
|
||||
//{ id: 'e1-4', type: 'step', source: '1', target: '4' },
|
||||
// { id: 'e1-4', type: 'step', source: '1', target: '4' },
|
||||
// { id: 'e1-5', type: 'step', source: '1', target: '5' },
|
||||
// { id: 'e1-7', type: 'step', source: '1', target: '7' },
|
||||
// { id: 'e4-9', source: '4', target: '8' },
|
||||
// { id: 'e4-10', source: '4', target: '9' },
|
||||
// { id: 'e3-11', source: '3', target: '10' },
|
||||
// { id: 'e3-12', source: '3', target: '11' },
|
||||
// { id: 'e2-13', source: '2', target: '12' },
|
||||
// { id: 'e2-14', source: '2', target: '13' },
|
||||
])
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
const getStructure = () => {
|
||||
axiosApiInstance.get("api/about_inspection/getstructure/").then((res) => {
|
||||
structures.value = res.data;
|
||||
console.log(structures.value, "-----------");
|
||||
});
|
||||
};
|
||||
|
||||
getStructure();
|
||||
return {
|
||||
structures,
|
||||
checkremote,
|
||||
spravURL,
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style></style>
|
||||
<style>
|
||||
.deps-title {
|
||||
height: 90px;
|
||||
}
|
||||
|
||||
.rotate-text {
|
||||
transform: rotate(-90deg);
|
||||
}
|
||||
|
||||
.page_block {
|
||||
margin: 0px;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
/* .container {
|
||||
text-align: center;
|
||||
background: #fdd835;
|
||||
} */
|
||||
|
||||
.minh {
|
||||
min-height: 43px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,48 @@
|
||||
<template>
|
||||
<v-row no-gutters class="h-100">
|
||||
<v-col class="align-self-center flex-grow-0">
|
||||
<span class="vertext text-button my-1 pb-13">{{ sText }}</span>
|
||||
</v-col>
|
||||
|
||||
<v-col class="w100">
|
||||
<v-row no-gutters class="text-center text-button py-2" v-if="sText=='Руковдство'">
|
||||
<v-col lg="3">Начальник инспекции</v-col>
|
||||
<v-col>Заместители начальника инспекции</v-col>
|
||||
</v-row>
|
||||
<v-row no-gutters class="text-center text-button py-2" v-else>
|
||||
<v-col> Координируемые структурные подразделения</v-col>
|
||||
</v-row>
|
||||
<v-row no-gutters class="h-100">
|
||||
<slot name="cardboss"></slot>
|
||||
</v-row>
|
||||
</v-col>
|
||||
|
||||
</v-row>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { spravURL } from "@/utils/axios-api";
|
||||
import { checkremote } from "@/utils/universal_functions";
|
||||
|
||||
export default {
|
||||
props: {
|
||||
sText: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
},
|
||||
setup() {
|
||||
return {
|
||||
checkremote,
|
||||
spravURL,
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.vertext {
|
||||
writing-mode: vertical-rl;
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,88 @@
|
||||
<template>
|
||||
<div>
|
||||
<!-- <my-helper :pretext="kl" /> -->
|
||||
<v-btn @click="useICalReader"> ical</v-btn>
|
||||
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import {useICalReader} from '@/utils/universal_functions'
|
||||
import { baseURL, axiosApiInstance } from '@/utils/axios-api'
|
||||
import { ref } from 'vue';
|
||||
import ical from "ical.js";
|
||||
import { formatDash } from '@/utils/universal_functions'
|
||||
|
||||
const burl = baseURL.slice(0,-1)
|
||||
|
||||
export default {
|
||||
setup() {
|
||||
const participant = ref('')
|
||||
const calendar = ref('')
|
||||
const useICalReader = async () => {
|
||||
const response = await fetch(`${burl}/media/ical/calendar.ics`);
|
||||
const data = await response.text();
|
||||
const jcalData = ical.parse(data);
|
||||
const icalComponent = new ical.Component(jcalData);
|
||||
const name = icalComponent.getFirstPropertyValue("x-wr-calname");
|
||||
|
||||
const events = icalComponent
|
||||
.getAllSubcomponents("vevent")
|
||||
.map((vevent) => new ical.Event(vevent));
|
||||
|
||||
const calendarEvents = events.map((event) => {
|
||||
return {
|
||||
summary: event.summary,
|
||||
description: event.description,
|
||||
organizer: event.organizer,
|
||||
start: event.startDate.toJSDate(),
|
||||
end: event.endDate.toJSDate(),
|
||||
location: event.location,
|
||||
attendees: event.attendees
|
||||
}
|
||||
})
|
||||
participant.value = name
|
||||
calendar.value = calendarEvents
|
||||
console.log(name, 'name')
|
||||
console.log(calendarEvents, 'calendarEventse')
|
||||
f_feedbackdata()
|
||||
// return {
|
||||
// type: "calendar",
|
||||
// title: name,
|
||||
// calendar: calendarEvents,
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// const s= useICalReader(`${burl}/media/ical/calendar.ics`)
|
||||
// console.log(s.value, 'ddddddddd')
|
||||
function f_feedbackdata() {
|
||||
axiosApiInstance.post(`api/calendar_of_events/calendarEvents/`, {
|
||||
participants: participant.value,
|
||||
calendar: calendar.value
|
||||
})
|
||||
.then(data => {
|
||||
console.log(data,'datas')
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return {
|
||||
useICalReader
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
@@ -123,7 +123,10 @@ export default {
|
||||
|
||||
function feedSend() {
|
||||
|
||||
axiosApiInstance.post(`api/feedback/feedbackdata/`, {nowrating : feedbackdata.value.nowrating, nowcomment: feedbackdata.value.nowcomment} ).then(data => {})
|
||||
axiosApiInstance.post(`api/feedback/feedbackdata/`, {
|
||||
nowrating: feedbackdata.value.nowrating,
|
||||
nowcomment: feedbackdata.value.nowcomment
|
||||
}).then(data => {})
|
||||
feedalert.alert = true
|
||||
textFromAlert()
|
||||
menusCloses()
|
||||
|
||||
@@ -1,116 +0,0 @@
|
||||
<template>
|
||||
<v-dialog
|
||||
v-model="getUserDialog"
|
||||
persistent
|
||||
width="600">
|
||||
<v-card >
|
||||
|
||||
|
||||
|
||||
|
||||
<v-card-actions class="align-self-end pt-0 ">
|
||||
<v-btn
|
||||
color="modal_btn"
|
||||
variant="text"
|
||||
@click="menusCloses()"
|
||||
>
|
||||
Закрыть {{UserDialog}}
|
||||
</v-btn>
|
||||
|
||||
|
||||
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import { clearAxios } from '@/utils/axios-api'
|
||||
import { ref, computed } from 'vue'
|
||||
import {useAccountStore} from '@/store/AccountStore'
|
||||
import {checkremote} from '@/utils/universal_functions'
|
||||
import { spravURL } from '@/utils/axios-api'
|
||||
|
||||
export default {
|
||||
|
||||
props: {
|
||||
UserDialog: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
|
||||
loging: {
|
||||
type: Number,
|
||||
default: 0
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
setup(props, { emit }) {
|
||||
|
||||
const accountStore = useAccountStore()
|
||||
const userlinks = ref([])
|
||||
const tab = ref(false)
|
||||
|
||||
const loadlinksUser=async()=>{
|
||||
|
||||
const res = await clearAxios.get('api/accounts/getuser/?userlogin='+props.loging)
|
||||
userlinks.value=res.data
|
||||
}
|
||||
|
||||
const basicInformation = () => [
|
||||
{title: 'Отдел:', info: userlinks.value.department},
|
||||
{title: 'ФИО:', info: userlinks.value.fio},
|
||||
{title: 'Должность:', info: userlinks.value.post},
|
||||
]
|
||||
|
||||
const subInformation = () => [
|
||||
{title: 'E-mail: ', info: userlinks.value.email},
|
||||
{title: 'Телефон: ', info: userlinks.value.tel},
|
||||
{title: 'Комната: ', info: userlinks.value.room},
|
||||
{title: 'Логин: ', info: userlinks.value.login},
|
||||
]
|
||||
|
||||
function menusCloses() {
|
||||
props.UserDialog=false
|
||||
|
||||
}
|
||||
|
||||
const getUserDialog = computed({
|
||||
|
||||
get: () => props.UserDialog,
|
||||
set: (value) => emit('update:UserDialog', value)
|
||||
})
|
||||
|
||||
loadlinksUser()
|
||||
|
||||
return {
|
||||
menusCloses,
|
||||
userlinks,
|
||||
accountStore,
|
||||
basicInformation,
|
||||
subInformation,
|
||||
checkremote,
|
||||
spravURL,
|
||||
tab,
|
||||
getUserDialog,
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.custom_subtitle .v-list-item-subtitle {
|
||||
opacity: 1!important;
|
||||
}
|
||||
|
||||
.highttext {
|
||||
height: 400px;
|
||||
}
|
||||
|
||||
.isActiveTab {
|
||||
background-color: #68c3ff70;
|
||||
}
|
||||
</style>
|
||||
@@ -1,109 +1,119 @@
|
||||
<template>
|
||||
|
||||
<v-carousel
|
||||
cycle
|
||||
interval="10000"
|
||||
cover
|
||||
height="450"
|
||||
hide-delimiters
|
||||
hide-delimiter-background
|
||||
show-arrows="hover"
|
||||
color="white"
|
||||
<v-carousel
|
||||
cycle
|
||||
interval="10000"
|
||||
cover
|
||||
height="450"
|
||||
hide-delimiters
|
||||
hide-delimiter-background
|
||||
show-arrows="hover"
|
||||
color="white"
|
||||
>
|
||||
<v-carousel-item
|
||||
v-for="(x, i) in carous"
|
||||
:key="i"
|
||||
:src="`${burl}${x.link}`"
|
||||
cover
|
||||
eager
|
||||
>
|
||||
|
||||
<v-carousel-item
|
||||
v-for="(x, i) in carous" :key="i"
|
||||
:src="`${burl}${x.link}`"
|
||||
cover
|
||||
eager
|
||||
<v-container
|
||||
fill-height
|
||||
fluid
|
||||
pa-0
|
||||
ma-0
|
||||
pb-3
|
||||
class="flex-column h-100 d-flex"
|
||||
>
|
||||
<v-card
|
||||
v-if="x.text != '' || x.title != null"
|
||||
class="bgCard h-100 d-flex flex-column"
|
||||
>
|
||||
<v-container
|
||||
fill-height
|
||||
fluid
|
||||
pa-0 ma-0 pb-3
|
||||
class="flex-column h-100 d-flex"
|
||||
>
|
||||
<v-card
|
||||
v-if="x.text != '' || x.title != null"
|
||||
class="bgCard h-100 d-flex flex-column"
|
||||
>
|
||||
|
||||
<v-card-title v-if="x.title != null"
|
||||
class="text-h3 text-uppercase titles text-text_carous ma-1 mb-0">
|
||||
<v-row no-gutters >
|
||||
<v-col class="align-self-center">
|
||||
{{x.title}}
|
||||
|
||||
</v-col>
|
||||
<v-col class="flex-grow-0">
|
||||
<v-img
|
||||
width="50"
|
||||
:aspect-ratio="1"
|
||||
:src="`${burl}${x.sender}`"
|
||||
cover
|
||||
/>
|
||||
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card-title>
|
||||
<v-card-text
|
||||
v-if="x.text != ''"
|
||||
class=" w-50 flex-grow-0 text-h6 bgText overflow-auto ma-1 pa-0"
|
||||
>
|
||||
|
||||
<v-textarea
|
||||
class="text-text_caroustext-black textareas font-weight-medium nocursor"
|
||||
:model-value=x.text
|
||||
variant='solo'
|
||||
readonly
|
||||
auto-grow
|
||||
rows="1"
|
||||
hide-details
|
||||
flat
|
||||
bg-color="transparent"
|
||||
/>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-container>
|
||||
</v-carousel-item>
|
||||
</v-carousel>
|
||||
<v-card-title
|
||||
v-if="x.title != null"
|
||||
class="text-h3 text-uppercase titles text-text_carous ma-1 mb-0"
|
||||
>
|
||||
<v-row no-gutters>
|
||||
<v-col class="align-self-center">
|
||||
{{ x.title }}
|
||||
</v-col>
|
||||
<v-col class="flex-grow-0">
|
||||
<v-img
|
||||
width="50"
|
||||
:aspect-ratio="1"
|
||||
:src="`${burl}${x.sender}`"
|
||||
cover
|
||||
/>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card-title>
|
||||
<v-card-text
|
||||
v-if="x.text != ''"
|
||||
class="w-50 flex-grow-0 text-h6 bgText overflow-auto ma-1 pa-0"
|
||||
>
|
||||
<v-textarea
|
||||
class="text-text_caroustext-black textareas font-weight-medium nocursor"
|
||||
:model-value="x.text"
|
||||
variant="solo"
|
||||
readonly
|
||||
auto-grow
|
||||
rows="1"
|
||||
hide-details
|
||||
flat
|
||||
bg-color="transparent"
|
||||
/>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-container>
|
||||
</v-carousel-item>
|
||||
</v-carousel>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { ref } from 'vue'
|
||||
import {getfromserver} from '@/utils/universal_functions'
|
||||
import { baseURL } from '@/utils/axios-api'
|
||||
import { ref } from "vue";
|
||||
import { baseURL } from "@/utils/axios-api";
|
||||
import { axiosApiInstance } from "@/utils/axios-api";
|
||||
import { useAlertStore } from "@/store/useAlertStore";
|
||||
|
||||
export default {
|
||||
setup() {
|
||||
const burl = baseURL.slice(0, -1);
|
||||
|
||||
setup() {
|
||||
const burl = baseURL.slice(0,-1)
|
||||
const carous = ref([{ link: "newsimage/default.jpg" }]);
|
||||
const feedalert = useAlertStore().alert;
|
||||
|
||||
const carous=ref([{link: "newsimage/default.jpg"}])
|
||||
|
||||
getfromserver("api/navigation/carousels/", carous)
|
||||
|
||||
return {
|
||||
burl,
|
||||
carous
|
||||
const getfromserver = () => {
|
||||
axiosApiInstance.get("api/navigation/carousels/").then((result) => {
|
||||
if (result.data.mess != "") {
|
||||
feedalert.alert = true;
|
||||
feedalert.text = result.data.mess;
|
||||
feedalert.color = "red-darken-2";
|
||||
feedalert.ico = "mdi-alert-outline";
|
||||
}
|
||||
}
|
||||
carous.value = result.data.result;
|
||||
});
|
||||
};
|
||||
|
||||
}
|
||||
getfromserver();
|
||||
|
||||
return {
|
||||
burl,
|
||||
carous,
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
.titles {
|
||||
font-family: cursive!important;
|
||||
background: #ffffff8c;
|
||||
font-family: cursive !important;
|
||||
background: #ffffff8c;
|
||||
}
|
||||
|
||||
.textareas .v-field__input {
|
||||
font-size: 1.3em!important;
|
||||
font-size: 1.3em !important;
|
||||
}
|
||||
|
||||
.nocursor textarea {
|
||||
cursor: default !important;
|
||||
cursor: default !important;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
@@ -45,7 +45,7 @@
|
||||
</v-card>
|
||||
<v-card
|
||||
v-else class="h-100 w-100 d-flex justify-center flex-column"
|
||||
:image="`${burl}/media/newsimage/2023/09/28/sea.jpg`">
|
||||
:image="`${burl}/media/default/sea.jpg`">
|
||||
|
||||
<v-row class="flex-grow-0">
|
||||
<v-col class="py-0">
|
||||
@@ -55,7 +55,7 @@
|
||||
class="pl-3 d-flex justify-end"
|
||||
color="white"
|
||||
@click="changeData=!changeData">
|
||||
</v-switch>
|
||||
</v-switch>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row class="ma-3">
|
||||
@@ -132,19 +132,17 @@
|
||||
import { axiosApiInstance } from '@/utils/axios-api'
|
||||
import {checkremote} from '@/utils/universal_functions'
|
||||
import { spravURL } from '@/utils/axios-api'
|
||||
import CardUsers from '@/components/cardUsers.vue'
|
||||
|
||||
import DialogSearch from './dialog-search.vue'
|
||||
import { baseURL } from '@/utils/axios-api'
|
||||
import {useAccountStore} from '@/store/AccountStore'
|
||||
export default {
|
||||
|
||||
components: {
|
||||
CardUsers,
|
||||
DialogSearch
|
||||
DialogSearch
|
||||
},
|
||||
|
||||
setup(){
|
||||
const t_baseCriteria = ref([])
|
||||
const t_daily = ref('')
|
||||
const idpos = ref('')
|
||||
const namepos = ref('')
|
||||
@@ -179,12 +177,6 @@ export default {
|
||||
|
||||
const burl = baseURL.slice(0,-1)
|
||||
|
||||
function proba(){
|
||||
axiosApiInstance.get('api/feedback/feedbackdata/')
|
||||
.then(data => {
|
||||
t_baseCriteria.value = data.data.results
|
||||
})
|
||||
}
|
||||
|
||||
const onPickFile = (ex) => {
|
||||
const sdata = new FormData()
|
||||
@@ -208,8 +200,7 @@ export default {
|
||||
|
||||
onMounted(() => {
|
||||
|
||||
dailyfun(),
|
||||
proba()
|
||||
dailyfun()
|
||||
})
|
||||
|
||||
return {t_daily,
|
||||
|
||||
@@ -1,103 +1,69 @@
|
||||
<template>
|
||||
<v-row>
|
||||
<v-col class="flex-column d-flex">
|
||||
<v-row class="flex-grow-0 mhight">
|
||||
<v-col class=" flex-column d-flex">
|
||||
<v-card class="ml-2 mt-2" width="500" >
|
||||
<v-card-title class="text-wrap pb-3">
|
||||
Ежедневная статистика по сотрудникам
|
||||
</v-card-title>
|
||||
<v-row class="flex-grow-0 align-self-end">
|
||||
<v-col class="d-flex">
|
||||
<v-card-subtitle class="mt-2 align-self-end">
|
||||
1. Скачать файл ежедневной статистики {{info}}
|
||||
</v-card-subtitle>
|
||||
<v-icon
|
||||
class="pt-2 pl-2"
|
||||
icon="mdi-file-excel"
|
||||
color="green-darken-3"
|
||||
@click="excelOp('excround')"
|
||||
>
|
||||
</v-icon>
|
||||
</v-col>
|
||||
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-card-subtitle class="align-self-center ml-3">
|
||||
2. Загрузить данные на сервер
|
||||
</v-card-subtitle>
|
||||
<v-col class="pr-0">
|
||||
|
||||
<v-file-input
|
||||
accept=".xlsx"
|
||||
v-model="dailyfiles"
|
||||
variant="underlined"
|
||||
density="compact"
|
||||
label="Прикрепить файл"
|
||||
hide-details
|
||||
class="mr-2 pb-2"
|
||||
/>
|
||||
</v-col>
|
||||
<v-col class="flex-grow-0 align-self-center pl-0 pr-6">
|
||||
<v-icon
|
||||
icon="mdi-chevron-double-right"
|
||||
color="blue-grey-darken-2"
|
||||
@click="onPickFile('roundfilse')"
|
||||
/>
|
||||
</v-col>
|
||||
|
||||
</v-row>
|
||||
|
||||
</v-card>
|
||||
|
||||
</v-col>
|
||||
|
||||
<v-col class=" flex-column d-flex">
|
||||
|
||||
|
||||
</v-col>
|
||||
<v-col></v-col>
|
||||
<v-col></v-col>
|
||||
<v-col></v-col>
|
||||
<v-col></v-col>
|
||||
|
||||
<!-- <v-alert
|
||||
width = "500"
|
||||
position="fixed"
|
||||
class="bottom-alert"
|
||||
:type='info=="Файл загружен"?"success":"error"'
|
||||
:title='info=="Файл загружен"?"Успех!":"Упс!"'
|
||||
:text="info"
|
||||
v-model="alert"
|
||||
|
||||
:color='info=="Файл загружен"?"teal-darken-2":"red-darken-2"'
|
||||
closable
|
||||
></v-alert> -->
|
||||
</v-row>
|
||||
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
|
||||
<v-row no-gutters class="gap ma-3 flex-column">
|
||||
<v-col lg=2 class='w100 d-flex flex-column'>
|
||||
<v-row no-gutters class="gap">
|
||||
<v-col lg=4>
|
||||
<v-card class="h-100">
|
||||
<v-card-title>
|
||||
Ежедневная статистика по сотрудникам
|
||||
</v-card-title>
|
||||
<v-row no-gutters class="gap">
|
||||
<v-col class="flex-grow-0">
|
||||
<v-card-subtitle class="mt-2 align-self-end">
|
||||
1. Скачать файл ежедневной статистики
|
||||
</v-card-subtitle>
|
||||
</v-col>
|
||||
<v-col class="flex-grow-0">
|
||||
<v-icon
|
||||
icon="mdi-file-excel"
|
||||
color="green-darken-3"
|
||||
@click="excelOp('excround')"
|
||||
/>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row no-gutters class="gap mt-5">
|
||||
<v-col class="flex-grow-0">
|
||||
<v-card-subtitle class="mt-3 align-self-end">
|
||||
2. Загрузить данные на сервер
|
||||
</v-card-subtitle>
|
||||
</v-col>
|
||||
<v-col >
|
||||
<v-file-input
|
||||
accept=".xlsx"
|
||||
v-model="dailyfiles"
|
||||
variant="underlined"
|
||||
density="compact"
|
||||
label="Прикрепить файл"
|
||||
hide-details
|
||||
/>
|
||||
</v-col>
|
||||
<v-col class="flex-grow-0 pr-2">
|
||||
<v-icon
|
||||
icon="mdi-chevron-double-right"
|
||||
color="blue-grey-darken-2"
|
||||
@click="onPickFile('roundfilse')"
|
||||
/>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { ref } from 'vue'
|
||||
import { baseURL } from '@/utils/axios-api'
|
||||
import {getfromserver} from '@/utils/universal_functions'
|
||||
import { axiosApiInstance } from '@/utils/axios-api'
|
||||
import { useAlertStore } from '@/store/useAlertStore'
|
||||
|
||||
export default {
|
||||
|
||||
setup(){
|
||||
|
||||
const dailyfiles = ref([])
|
||||
const visiting = ref({})
|
||||
const info = ref('')
|
||||
const t_dailyRound = ref('')
|
||||
const feedalert = useAlertStore().alert
|
||||
|
||||
|
||||
|
||||
|
||||
const excelOp = (ex) => {
|
||||
axiosApiInstance.get(`api/general_vacation/dailyroundup/?excel=${ex}`).then(result => {
|
||||
@@ -105,70 +71,41 @@ export default {
|
||||
link.href = baseURL+result.data.path
|
||||
link.click()
|
||||
link.remove()
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
const onPickFile = (ex) => {
|
||||
const sdata = new FormData()
|
||||
sdata.append('dailyfiles', dailyfiles.value[0])
|
||||
|
||||
axiosApiInstance.post(`api/general_vacation/dailyroundup/?excel=${ex}`, sdata).then(result => {
|
||||
info.value = result.data['mess']
|
||||
|
||||
})
|
||||
showInfo.value = true
|
||||
dailyfiles.value = []
|
||||
feedalert.alert = true
|
||||
textFromAlert()
|
||||
|
||||
|
||||
|
||||
}
|
||||
textFromAlert(result.data['mess'])
|
||||
})
|
||||
dailyfiles.value = []
|
||||
}
|
||||
|
||||
const textFromAlert = () => {
|
||||
if (info.value=="Файл загружен") {
|
||||
feedalert.text = "Файл загружен"
|
||||
feedalert.ico = "mdi-check"
|
||||
feedalert.color="green-darken-4"
|
||||
}
|
||||
|
||||
else {
|
||||
feedalert.text = "Ошибка загрузки"
|
||||
feedalert.ico = "mdi-alert-circle-outline"
|
||||
feedalert.color="pink-accent-4"
|
||||
}
|
||||
}
|
||||
|
||||
const detailRound = () => {
|
||||
|
||||
axiosApiInstance.get(`api/general_vacation/dailyload/?id=6`)
|
||||
.then(data => {
|
||||
|
||||
|
||||
t_dailyRound.value = data.data
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
const showInfo = ref(false)
|
||||
const textFromAlert = (info) => {
|
||||
feedalert.alert = true
|
||||
if (info == "Файл загружен") {
|
||||
feedalert.text = "Файл загружен"
|
||||
feedalert.ico = "mdi-check"
|
||||
feedalert.color ="green-darken-4"
|
||||
}
|
||||
else {
|
||||
feedalert.text = "Ошибка загрузки"
|
||||
feedalert.ico = "mdi-alert-circle-outline"
|
||||
feedalert.color="pink-accent-4"
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
visiting,
|
||||
excelOp,
|
||||
baseURL,
|
||||
dailyfiles,
|
||||
onPickFile,
|
||||
info,
|
||||
detailRound,
|
||||
t_dailyRound,
|
||||
showInfo,
|
||||
|
||||
}
|
||||
feedalert
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
class="d-flex pa-1 flex-column "
|
||||
>
|
||||
<news-card :news="x"/>
|
||||
|
||||
{{aNewsAll}}
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row class="flex-grow-0 ">
|
||||
@@ -69,6 +69,7 @@ export default {
|
||||
|
||||
const loadNewsAll = () => {
|
||||
axiosApiInstance.get( `api/navigation/newscrossroad/?name=${route.path}&page=${page.value-1}&countpage=${countpage.value}`).then(result => {
|
||||
|
||||
newsAll.value= result.data.result
|
||||
countetnews.value = result.data.countpage/countpage.value
|
||||
visiblePage.value = countetnews.value <= 1 ? 1 : countetnews.value+1
|
||||
@@ -80,6 +81,7 @@ export default {
|
||||
|
||||
return {
|
||||
newsAll,
|
||||
|
||||
countetnews,
|
||||
page,
|
||||
countpage,
|
||||
|
||||
@@ -231,7 +231,7 @@
|
||||
:class="accountStore.user.login==y.author.login?'bgchatnot':'bgchat'"
|
||||
|
||||
>
|
||||
<!-- <my-helper :pretext = newsFull /> -->
|
||||
|
||||
<v-col class="flex-grow-1 text-subtitle-2 pl-2 pa-0 "
|
||||
|
||||
>
|
||||
|
||||
@@ -214,7 +214,8 @@
|
||||
|
||||
<v-row class="flex-grow-0" v-if="accountStore.user.is_staff">
|
||||
<v-col>
|
||||
<v-list nav density active-class="noneoutline">
|
||||
<default-portal-menu-list :rail=rail />
|
||||
<!-- <v-list nav density="compact" active-class="noneoutline">
|
||||
<default-portal-menu-list :aMenuItem="supperuser"/>
|
||||
<div v-if="getDevelopment()">
|
||||
|
||||
@@ -223,7 +224,7 @@
|
||||
|
||||
|
||||
|
||||
</v-list>
|
||||
</v-list> -->
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row no-gutters class="flex-grow-0">
|
||||
@@ -240,9 +241,11 @@
|
||||
|
||||
<v-main v-if="accountStore.cod2user" class="d-flex bg-main_theme">
|
||||
<router-view />
|
||||
<v-expand-x-transition>
|
||||
|
||||
|
||||
<alert-default />
|
||||
</v-expand-x-transition>
|
||||
|
||||
|
||||
|
||||
</v-main>
|
||||
<v-main v-else class="d-flex align-center text-h3 bg-teal-lighten-2">
|
||||
@@ -299,6 +302,7 @@ import VcardUser from '@/components/UI/fiousercard/vcardUser.vue'
|
||||
import PageCounter from '@/components/UI/defaultportal/page-counter.vue'
|
||||
import DefaultPortalMenuList from '@/layouts/default/DefaultPortalMenuList.vue'
|
||||
import {getDevelopment} from '@/utils/universal_functions'
|
||||
|
||||
export default {
|
||||
|
||||
components: {
|
||||
@@ -357,15 +361,6 @@ export default {
|
||||
|
||||
// 'https://materialdesignicons.com/cdn/1.6.50-dev/'
|
||||
|
||||
const supperuser = [
|
||||
|
||||
{
|
||||
name: 'Панель администратора',
|
||||
ico: 'mdi-wrench',
|
||||
link: baseURL+'admin'
|
||||
|
||||
},
|
||||
]
|
||||
|
||||
const oRasrab = [
|
||||
{
|
||||
@@ -447,7 +442,11 @@ export default {
|
||||
ico: 'mdi-city',
|
||||
path: "/inspection"
|
||||
},
|
||||
|
||||
{
|
||||
name: 'ical',
|
||||
ico: 'mdi-calendar',
|
||||
path: "/ical"
|
||||
},
|
||||
|
||||
// {
|
||||
// name: 'К празднику',
|
||||
@@ -485,7 +484,7 @@ export default {
|
||||
// feedalert,
|
||||
alert,
|
||||
burl,
|
||||
supperuser,
|
||||
|
||||
closeinfo,
|
||||
baseURL,
|
||||
getDevelopment
|
||||
|
||||
@@ -1,40 +1,88 @@
|
||||
<template>
|
||||
<div>
|
||||
<v-list-item
|
||||
v-for="(x, key) in aMenuItem"
|
||||
:key="key"
|
||||
:title="x.name"
|
||||
:value="x.name"
|
||||
:href="x.link"
|
||||
:target="x.link?'_blank':''"
|
||||
slim
|
||||
class="text-blue-grey-lighten-1"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<v-icon :icon="x.ico" size="x_small"/>
|
||||
<v-tooltip
|
||||
v-if="rail"
|
||||
activator="parent"
|
||||
location="top"
|
||||
>
|
||||
{{ x.name }}
|
||||
</v-tooltip>
|
||||
</template>
|
||||
</v-list-item>
|
||||
</div>
|
||||
<div>
|
||||
<v-list nav density="compact" class="text-blue-grey-lighten-1">
|
||||
<div v-for="(list, key) in aMenuItem" :key="key">
|
||||
<div v-if="showProm(key)">
|
||||
<v-list-item
|
||||
v-for="x in list"
|
||||
:key="x"
|
||||
:title="x.name"
|
||||
:value="x.name"
|
||||
:href="x.link"
|
||||
:target="x.link ? '_blank' : ''"
|
||||
slim
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<v-icon :icon="x.ico" size="x_small" />
|
||||
<v-tooltip v-if="rail" activator="parent" location="top">
|
||||
</v-tooltip>
|
||||
</template>
|
||||
</v-list-item>
|
||||
</div>
|
||||
</div>
|
||||
</v-list>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { baseURL } from "@/utils/axios-api";
|
||||
import { getDevelopment } from "@/utils/universal_functions";
|
||||
|
||||
export default {
|
||||
props: {
|
||||
aMenuItem: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
props: {
|
||||
rail: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
},
|
||||
|
||||
setup() {
|
||||
const gittlink = () => {
|
||||
const link =
|
||||
baseURL == "http://127.0.0.1:8000/"
|
||||
? "http://sulaco.nodered.ru:5223/COD2/PORTAL_COD2/projects"
|
||||
: "http://maestro.cod2.regions.tax.nalog.ru:3333/COD2/PORTAL_COD2/projects/22";
|
||||
return link;
|
||||
};
|
||||
const aMenuItem = {
|
||||
prom: [
|
||||
{
|
||||
name: "Панель администратора",
|
||||
ico: "mdi-wrench",
|
||||
link: baseURL + "admin",
|
||||
},
|
||||
}
|
||||
}
|
||||
],
|
||||
my: [
|
||||
{
|
||||
name: "Gitt",
|
||||
ico: "mdi-github",
|
||||
link: gittlink(),
|
||||
},
|
||||
{
|
||||
name: "Swagger",
|
||||
ico: "mdi-puzzle",
|
||||
link: "http://127.0.0.1:8000/swagger/",
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
const showProm = (data) => {
|
||||
let show = true;
|
||||
|
||||
if (data == "my" && getDevelopment() == false) {
|
||||
show = false;
|
||||
}
|
||||
|
||||
return show;
|
||||
};
|
||||
|
||||
return {
|
||||
aMenuItem,
|
||||
getDevelopment,
|
||||
showProm,
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
<style></style>
|
||||
@@ -4,4 +4,21 @@
|
||||
|
||||
Импорт глобальный, прописан в src/front/src/components/UI/index.js
|
||||
|
||||
*Описание входящих параметров в useAlertStore.md*
|
||||
#### Строка импорта:
|
||||
```
|
||||
import { useAlertStore } from '@/store/useAlertStore'
|
||||
|
||||
```
|
||||
|
||||
#### Переменная в setup:
|
||||
```
|
||||
const feedalert = useAlertStore().alert
|
||||
```
|
||||
|
||||
#### Переменная alert содержит ключи:
|
||||
|Ключ|Тип|Значение по умолчанию|Описание|
|
||||
|-|--------|--------|--------|
|
||||
|alert|boolean|false|Запуск/скрытие отоборажения на экране|
|
||||
|text|string|''|Тект, который будет отображаться в алерте|
|
||||
|ico|string|'mdi-plus'|Замена иконки, отображаемой слева от текста|
|
||||
|color|string|''|Замена цвета|
|
||||
@@ -4,14 +4,14 @@
|
||||
:color=feedalert.color
|
||||
:icon=feedalert.ico
|
||||
theme="dark"
|
||||
max-height="40"
|
||||
width = "500"
|
||||
min-height="40"
|
||||
min-width = "500"
|
||||
position="fixed"
|
||||
location = "bottom"
|
||||
class="mb-2"
|
||||
v-model="feedalert.alert"
|
||||
:text=feedalert.text
|
||||
variant = "tonal"
|
||||
|
||||
density="compact"
|
||||
>
|
||||
</v-alert>
|
||||
@@ -35,7 +35,7 @@ export default {
|
||||
feedalert.ico=""
|
||||
feedalert.color=""
|
||||
feedalert.alert = false
|
||||
}, 3000)
|
||||
}, 8000)
|
||||
|
||||
}, {deep:true})
|
||||
|
||||
|
||||
@@ -136,6 +136,15 @@ const routes = [
|
||||
ico: "mdi-city"
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/ical',
|
||||
name: 'UsersInfoPage',
|
||||
component: () => import('@/components/calendar_of_events/load-ical.vue'),
|
||||
meta:{
|
||||
title:"Для работы над календарем",
|
||||
ico: "mdi-account"
|
||||
}
|
||||
},
|
||||
],
|
||||
},
|
||||
]
|
||||
|
||||
@@ -1,96 +1,161 @@
|
||||
const str = 'hello';
|
||||
import {useAccountStore} from '@/store/AccountStore'
|
||||
import {useAppStore} from '@/store/app'
|
||||
import { baseURL } from '@/utils/axios-api'
|
||||
import { axiosApiInstance, clearAxios } from '@/utils/axios-api'
|
||||
import { useRouter } from 'vue-router'
|
||||
import moment from 'moment'
|
||||
const str = "hello";
|
||||
import { useAccountStore } from "@/store/AccountStore";
|
||||
import { useAppStore } from "@/store/app";
|
||||
import { baseURL } from "@/utils/axios-api";
|
||||
import { axiosApiInstance, clearAxios } from "@/utils/axios-api";
|
||||
import { useRouter } from "vue-router";
|
||||
import moment from "moment";
|
||||
import { ref, onMounted } from "vue";
|
||||
|
||||
|
||||
|
||||
export function formatComa(date) {
|
||||
return moment(date).format('DD.MM.YYYY')
|
||||
}
|
||||
|
||||
export function formatDash(date) {
|
||||
return moment(date).format('YYYY-MM-DD')
|
||||
}
|
||||
|
||||
export function formaComaTime(date) {
|
||||
return moment(date).format('DD.MM.YYYY H:mm')
|
||||
}
|
||||
|
||||
export function checking_for_entry (where, what) {
|
||||
if (!where.includes(what))
|
||||
{
|
||||
where.push(what)
|
||||
}
|
||||
return moment(date).format("DD.MM.YYYY");
|
||||
}
|
||||
|
||||
export function getfromserver(path, reactive){
|
||||
try{
|
||||
|
||||
axiosApiInstance.get(path).then(result => {
|
||||
reactive.value = result.data})}
|
||||
catch(e){
|
||||
console.log(e);
|
||||
}
|
||||
export function formatDash(date) {
|
||||
return moment(date).format("YYYY-MM-DD");
|
||||
}
|
||||
|
||||
export function formaComaTime(date) {
|
||||
return moment(date).format("DD.MM.YYYY H:mm");
|
||||
}
|
||||
|
||||
export function checking_for_entry(where, what) {
|
||||
if (!where.includes(what)) {
|
||||
where.push(what);
|
||||
}
|
||||
}
|
||||
|
||||
export function getfromserverfree(path, reactive){
|
||||
try{
|
||||
clearAxios.get(path).then(result => {
|
||||
reactive.value = result.data})}
|
||||
catch(e){
|
||||
console.log(e);
|
||||
}
|
||||
export function getfromserver(path, reactive) {
|
||||
try {
|
||||
axiosApiInstance.get(path).then((result) => {
|
||||
reactive.value = result.data;
|
||||
});
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export function checkremote(filecheck){
|
||||
|
||||
return process.env.NODE_ENV == 'development'? "https://pixelbox.ru/wp-content/uploads/2021/11/avatar-whatsapp-pixelbox.ru-36.jpg":filecheck
|
||||
|
||||
export function getfromserverfree(path, reactive) {
|
||||
try {
|
||||
clearAxios.get(path).then((result) => {
|
||||
reactive.value = result.data;
|
||||
});
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
export function checkremote(filecheck) {
|
||||
return process.env.NODE_ENV == "development"
|
||||
? "https://pixelbox.ru/wp-content/uploads/2021/11/avatar-whatsapp-pixelbox.ru-36.jpg"
|
||||
: filecheck;
|
||||
}
|
||||
|
||||
export default str;
|
||||
|
||||
export function splitname (name) {
|
||||
return name.familyname + ' ' + name.name[0] + '.' + name.parentname[0]+ '.'
|
||||
}
|
||||
|
||||
export function pagecounter(){
|
||||
|
||||
const router = useRouter()
|
||||
const accountStore = useAccountStore()
|
||||
const appStore = useAppStore()
|
||||
export function splitname(name) {
|
||||
return name.familyname + " " + name.name[0] + "." + name.parentname[0] + ".";
|
||||
}
|
||||
|
||||
export function pagecounter() {
|
||||
const router = useRouter();
|
||||
const accountStore = useAccountStore();
|
||||
const appStore = useAppStore();
|
||||
|
||||
let postdata = {
|
||||
user__id: "user" in accountStore &&"id" in accountStore.user? accountStore.user.id: null,
|
||||
user__id:
|
||||
"user" in accountStore && "id" in accountStore.user
|
||||
? accountStore.user.id
|
||||
: null,
|
||||
page: router.currentRoute.value.meta.title,
|
||||
fullPath: router.currentRoute.value.fullPath,
|
||||
ico: router.currentRoute.value.meta.ico
|
||||
}
|
||||
ico: router.currentRoute.value.meta.ico,
|
||||
};
|
||||
|
||||
clearAxios.post(`${baseURL}api/watcher/counter/`, postdata).then((result) => {
|
||||
appStore.countvisitor = result.data;
|
||||
});
|
||||
}
|
||||
|
||||
clearAxios.post(`${baseURL}api/watcher/counter/`, postdata)
|
||||
.then(result => {
|
||||
export function getDevelopment() {
|
||||
return process.env.NODE_ENV == "development" ? true : false;
|
||||
}
|
||||
|
||||
appStore.countvisitor = result.data
|
||||
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
export function useICalReader(url) {
|
||||
///
|
||||
const events = ref([]);
|
||||
|
||||
export function getDevelopment() {
|
||||
return process.env.NODE_ENV == 'development'?true:false
|
||||
}
|
||||
const loadICalFile = async () => {
|
||||
try {
|
||||
const response = await fetch(url);
|
||||
const data = await response.text();
|
||||
const jcalData = ical.parse(data);
|
||||
const icalComponent = new ical.Component(jcalData);
|
||||
const name = icalComponent.getFirstPropertyValue("x-wr-calname");
|
||||
|
||||
const events = icalComponent
|
||||
.getAllSubcomponents("vevent")
|
||||
.map((vevent) => new ical.Event(vevent));
|
||||
|
||||
const calendarEvents = events.map((event) => {
|
||||
return {
|
||||
summary: event.summary,
|
||||
description: event.description,
|
||||
organizer: event.organizer,
|
||||
attendee_count: event.attendees.length,
|
||||
duration_seconds: event.duration.toSeconds(),
|
||||
start: event.startDate.toJSDate().getTime() / 1000,
|
||||
end: event.endDate.toJSDate().getTime() / 1000,
|
||||
location: event.location,
|
||||
}
|
||||
})
|
||||
|
||||
return {
|
||||
type: "calendar",
|
||||
title: name,
|
||||
calendar: calendarEvents,
|
||||
}
|
||||
|
||||
// const vevents = comp.getAllSubcomponents('vevent')
|
||||
// const eventsData = vevents.map(vevent => ({
|
||||
// vevent: vevent,
|
||||
|
||||
// summary: vevent.getFirstPropertyValue('summary'),
|
||||
// start: vevent.getFirstPropertyValue('dtstart'),
|
||||
// end: vevent.getFirstPropertyValue('dtend')
|
||||
// }))
|
||||
// events.value = eventsData
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
loadICalFile();
|
||||
});
|
||||
|
||||
return {
|
||||
events,
|
||||
};
|
||||
}
|
||||
|
||||
// export function useICalReader(filePath) {
|
||||
// const icsContent = ref('')
|
||||
|
||||
// const fetchICalFile = async () => {
|
||||
// try {
|
||||
// const response = await fetch(filePath)
|
||||
// if (!response.ok) {
|
||||
// throw new Error('Ошибка при загрузке файла')
|
||||
// }
|
||||
// const data = await response.text()
|
||||
// icsContent.value = data
|
||||
// } catch (error) {
|
||||
// console.error('Ошибка при чтении файла:', error)
|
||||
// }
|
||||
// }
|
||||
|
||||
// return { icsContent, fetchICalFile }
|
||||
// }
|
||||
@@ -1,17 +1,17 @@
|
||||
<template>
|
||||
<v-row no-gutters class="flex-column h-100 gap pa-1">
|
||||
<v-col class="w100 h-100 flex-grow-0">
|
||||
<v-card>
|
||||
<v-tabs v-model="tab" bg-color="teal-darken-1" slider-color="teal-lighten-3" selected-class="active-tab"
|
||||
:grow="true">
|
||||
<v-tab v-for="tabitem in tabs_items" :value="tabitem.value">{{ tabitem.title }}</v-tab>
|
||||
</v-tabs>
|
||||
</v-card>
|
||||
</v-col>
|
||||
<v-row no-gutters class="flex-column">
|
||||
|
||||
<v-card>
|
||||
<v-tabs v-model="tab" bg-color="teal-darken-1" slider-color="teal-lighten-3" selected-class="active-tab"
|
||||
:grow="true">
|
||||
<v-tab v-for="tabitem in tabs_items" :value="tabitem.value">{{ tabitem.title }}</v-tab>
|
||||
</v-tabs>
|
||||
</v-card>
|
||||
|
||||
<v-col>
|
||||
<v-window v-model="tab" class="h-100">
|
||||
<v-window-item value="mainInfo">
|
||||
<v-row no-gutters>
|
||||
<v-row>
|
||||
<v-col lg="3">
|
||||
<v-card class="ml-2 mb-2 mt-1">
|
||||
<v-card-text class="text-h6 text-center">
|
||||
@@ -110,13 +110,13 @@
|
||||
</v-row>
|
||||
|
||||
</v-window-item>
|
||||
<v-window-item no-gutters class="gap h-100" value="structureInspection">
|
||||
<v-window-item no-gutters class="gap flex-column h-100" value="structureInspection">
|
||||
<structure-inspection />
|
||||
</v-window-item>
|
||||
<v-window-item no-gutters class="gap h-100" value="openVacancies">
|
||||
<h1>Открытые вакансии</h1>
|
||||
</v-window-item>
|
||||
<v-window-item no-gutters class="gap h-100" value="contactInfo">
|
||||
<v-window-item class="gap h-100" value="contactInfo">
|
||||
<contact-info />
|
||||
</v-window-item>
|
||||
</v-window>
|
||||
@@ -172,7 +172,6 @@ export default {
|
||||
const getInspectionDirections = () => {
|
||||
axiosApiInstance.get('api/about_inspection/getinspectiondirections/').then(res => {
|
||||
directionworks.value = res.data
|
||||
console.log(directionworks.value)
|
||||
})
|
||||
|
||||
|
||||
|
||||
@@ -170,7 +170,6 @@ setup(){
|
||||
|
||||
let periodusers = new Set([])
|
||||
let brdata = {}
|
||||
|
||||
let filtr = alldata.value.period
|
||||
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
|
||||
import CarouselList from '@/components/carousel-list.vue'
|
||||
import CarouselNumbers from '@/components/carousel-numbers.vue'
|
||||
import CalendarFull from '@/components/UI/Calendar-full.vue'
|
||||
|
||||
|
||||
import NewsHome from '@/components/news-home.vue'
|
||||
import LoadRound from '@/components/load-round.vue'
|
||||
@@ -124,7 +124,7 @@
|
||||
|
||||
CarouselList,
|
||||
CarouselNumbers,
|
||||
CalendarFull,
|
||||
|
||||
|
||||
LoadRound,
|
||||
DigitalLetna,
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
|
||||
Сотрудники
|
||||
{{userlinks}}
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import {pagecounter} from '@/utils/universal_functions'
|
||||
import {useAccountStore} from '@/store/AccountStore'
|
||||
import { clearAxios } from '@/utils/axios-api'
|
||||
import { ref } from 'vue'
|
||||
export default {
|
||||
|
||||
props: {
|
||||
|
||||
loging: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
|
||||
setup(props, context){
|
||||
const accountStore = useAccountStore()
|
||||
const userlinks = ref([])
|
||||
const login =ref('')
|
||||
|
||||
const loadlinksUser=async()=>{
|
||||
if (props.loging==""){
|
||||
login.value=accountStore.user.login
|
||||
}
|
||||
else {
|
||||
login.value=props.loging
|
||||
|
||||
}
|
||||
|
||||
const res = await clearAxios.get('api/accounts/getuser/?userlogin='+login.value)
|
||||
userlinks.value=res.data
|
||||
}
|
||||
|
||||
pagecounter()
|
||||
loadlinksUser()
|
||||
|
||||
|
||||
return {
|
||||
|
||||
userlinks,
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
@@ -132,7 +132,6 @@ const responsibility = ref([])
|
||||
function getResponsibility() {
|
||||
axiosApiInstance.get(`api/safety/responsibility/`).then(result => {
|
||||
responsibility.value = result.data.users
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user