P-47
This commit is contained in:
1 parent
11f45daf67
commit
41ec40fedb
9 files changed
+177
-79
No files matched your search
@@ -52,6 +52,8 @@ class PostResponseVacancies(ListAPIView):
|
|||||||
def post(self, request):
|
def post(self, request):
|
||||||
|
|
||||||
a = ResponseVacancy.objects.create(**json.loads(request.data['data']), file = request.data['file'] if 'file' in request.data else None)
|
a = ResponseVacancy.objects.create(**json.loads(request.data['data']), file = request.data['file'] if 'file' in request.data else None)
|
||||||
|
print(request.data, 'aaaaaaaaaaaaaa')
|
||||||
|
|
||||||
okib = DictDepartment.objects.get(id=22)
|
okib = DictDepartment.objects.get(id=22)
|
||||||
data = {'sendto':[a.vacancy.department.id_chief.lotus, okib.id_chief.lotus], 'subject': f'Отклик на вакансию {a.vacancy.name} от {a.fio}', 'body_text':f'Почта:{a.email} ----- Телефон: {a.tel} ---- Сопроводительное письмо: {a.text}'}
|
data = {'sendto':[a.vacancy.department.id_chief.lotus, okib.id_chief.lotus], 'subject': f'Отклик на вакансию {a.vacancy.name} от {a.fio}', 'body_text':f'Почта:{a.email} ----- Телефон: {a.tel} ---- Сопроводительное письмо: {a.text}'}
|
||||||
|
|
||||||
|
|||||||
@@ -146,18 +146,26 @@ class MyEvents(APIView):
|
|||||||
# 'files':[]
|
# 'files':[]
|
||||||
# })
|
# })
|
||||||
created=True
|
created=True
|
||||||
|
|
||||||
try:
|
try:
|
||||||
event = json.loads(request.data['event'])
|
event = json.loads(request.data['event'])
|
||||||
# event = json.loads(event)
|
# event = json.loads(event)
|
||||||
|
|
||||||
filesadd = request.FILES.getlist('files')
|
filesadd = request.FILES.getlist('files')
|
||||||
|
|
||||||
# participant=request.POST['participant']
|
# participant=request.POST['participant']
|
||||||
|
participant= event['participant']
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
event['calendar']=Calendar(id=event['calendar'])
|
event['calendar']=Calendar(id=event['calendar'])
|
||||||
participant = event['participant']
|
|
||||||
files = [x['id'] for x in event['files']]
|
files = [x['id'] for x in event['files']]
|
||||||
|
|
||||||
del event['files']
|
del event['files']
|
||||||
del event['participant']
|
del event['participant']
|
||||||
|
|
||||||
|
|
||||||
evnt=None
|
evnt=None
|
||||||
if 'id' in event:
|
if 'id' in event:
|
||||||
evnt,created=Event.objects.update_or_create(id=event['id'], defaults = event)
|
evnt,created=Event.objects.update_or_create(id=event['id'], defaults = event)
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ export default {
|
|||||||
JSON.stringify({ ...form.value, vacancy_id: props.idVacations })
|
JSON.stringify({ ...form.value, vacancy_id: props.idVacations })
|
||||||
);
|
);
|
||||||
if (file.value !== null) {
|
if (file.value !== null) {
|
||||||
console.log(file.value, 'file.valuefile.valuefile.value')
|
|
||||||
postFile.append("file", file.value[0]);
|
postFile.append("file", file.value[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -152,14 +152,9 @@ export default {
|
|||||||
.then((res) => {
|
.then((res) => {
|
||||||
eventFromCalendar.value = res.data
|
eventFromCalendar.value = res.data
|
||||||
if (idEvent.value==null) {
|
if (idEvent.value==null) {
|
||||||
eventFromCalendar.value.event = {name:'', participant: [accountStore.user.is_idEmployee], files: [], date_start: "", date_end: "", period: null, description: '', calendar: null}
|
eventFromCalendar.value.event = {name:'', participant: [accountStore.user.is_idEmployee], files: [], date_start: new Date(), date_end: new Date(), period: null, description: '', calendar: null}
|
||||||
}
|
}
|
||||||
|
|
||||||
// res.data.forEach(
|
|
||||||
// (e) =>
|
|
||||||
// (e.visible = accountStore.calendar.includes(e.id) ? false : true)
|
|
||||||
// );
|
|
||||||
// calendarForMy.value = res.data;
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
border
|
border
|
||||||
no-time
|
no-time
|
||||||
:max="new Date(max_date)"
|
:max="new Date(max_date)"
|
||||||
:min="new Date(min_date)"
|
:min="new Date(min_date).setDate(new Date(min_date).getDate()-1)"
|
||||||
></v-date-picker>
|
></v-date-picker>
|
||||||
</v-locale-provider>
|
</v-locale-provider>
|
||||||
</v-menu>
|
</v-menu>
|
||||||
@@ -86,12 +86,12 @@ export default {
|
|||||||
default: "2024-07-01",
|
default: "2024-07-01",
|
||||||
},
|
},
|
||||||
max_date: {
|
max_date: {
|
||||||
type: Date,
|
type: String,
|
||||||
default: new Date('2555-07-01')
|
default: '2555-07-01'
|
||||||
},
|
},
|
||||||
min_date: {
|
min_date: {
|
||||||
type: Date,
|
type: String,
|
||||||
default: new Date("1970-01-01")
|
default: "1970-01-01"
|
||||||
},
|
},
|
||||||
|
|
||||||
order: {
|
order: {
|
||||||
@@ -106,7 +106,8 @@ export default {
|
|||||||
|
|
||||||
const myDate = computed({
|
const myDate = computed({
|
||||||
get() {
|
get() {
|
||||||
return new Date(props.date);
|
|
||||||
|
return props.date;
|
||||||
},
|
},
|
||||||
set(newValue) {
|
set(newValue) {
|
||||||
// console.log( , 'newValue')
|
// console.log( , 'newValue')
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
<template v-slot:prepend-item>
|
<template v-slot:prepend-item>
|
||||||
<v-list-item
|
<v-list-item
|
||||||
@click="selectedStaff = staffed"
|
@click="selectedStaff = staffed"
|
||||||
:disabled="staffed.length == 1 && staffed[0][okey] == true"
|
:disabled="disable()"
|
||||||
class="text-body-2"
|
class="text-body-2"
|
||||||
>
|
>
|
||||||
<span class="text-body-2"> ВСЕ СОТРУДНИКИ </span>
|
<span class="text-body-2"> ВСЕ СОТРУДНИКИ </span>
|
||||||
@@ -55,7 +55,7 @@
|
|||||||
@click.stop=""
|
@click.stop=""
|
||||||
density="compact"
|
density="compact"
|
||||||
class="text-body-2"
|
class="text-body-2"
|
||||||
:disabled="staffed.length == 1 && staffed[0][okey] == true"
|
:disabled="disable()"
|
||||||
>
|
>
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
<v-checkbox-btn
|
<v-checkbox-btn
|
||||||
@@ -67,11 +67,7 @@
|
|||||||
item.raw.employees.some((e) => e[okey] == true) &&
|
item.raw.employees.some((e) => e[okey] == true) &&
|
||||||
!item.raw.employees.every((e) => e[okey] == true)
|
!item.raw.employees.every((e) => e[okey] == true)
|
||||||
"
|
"
|
||||||
:model-value="
|
:model-value="disable() ? true : item.raw[okey]"
|
||||||
staffed.length == 1 && staffed[0][okey] == true
|
|
||||||
? true
|
|
||||||
: item.raw[okey]
|
|
||||||
"
|
|
||||||
></v-checkbox-btn>
|
></v-checkbox-btn>
|
||||||
</template>
|
</template>
|
||||||
</v-list-item>
|
</v-list-item>
|
||||||
@@ -173,12 +169,12 @@ export default {
|
|||||||
staff: item.employees,
|
staff: item.employees,
|
||||||
});
|
});
|
||||||
} else if (item.length) {
|
} else if (item.length) {
|
||||||
|
console.log(item, 'newvalue')
|
||||||
let val = item.every((e) => e[props.okey] == true) ? false : true;
|
let val = item.every((e) => e[props.okey] == true) ? false : true;
|
||||||
cbstaff(item, val);
|
cbstaff(item, val);
|
||||||
|
|
||||||
emit("returnIdParticant", { okey: props.okey, staff: back.value });
|
emit("returnIdParticant", { okey: props.okey, staff: back.value });
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
item[props.okey] = !item[props.okey];
|
item[props.okey] = !item[props.okey];
|
||||||
|
|
||||||
emit("returnIdParticant", { okey: props.okey, staff: [item] });
|
emit("returnIdParticant", { okey: props.okey, staff: [item] });
|
||||||
@@ -186,10 +182,8 @@ export default {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
const cbstaff = (item, value) => {
|
const cbstaff = (item, value) => {
|
||||||
item.forEach((e) => {
|
item.forEach((e) => {
|
||||||
|
|
||||||
if (e.id != accountStore.user.is_idEmployee) {
|
if (e.id != accountStore.user.is_idEmployee) {
|
||||||
e[props.okey] = value;
|
e[props.okey] = value;
|
||||||
}
|
}
|
||||||
@@ -201,10 +195,8 @@ export default {
|
|||||||
cbstaff(e.employees, value);
|
cbstaff(e.employees, value);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
function onFilter(item, itemText) {
|
function onFilter(item, itemText) {
|
||||||
return (
|
return (
|
||||||
item.includes(filtered.value) ||
|
item.includes(filtered.value) ||
|
||||||
@@ -214,6 +206,14 @@ export default {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const disable = () => {
|
||||||
|
|
||||||
|
return (
|
||||||
|
staffed.value.length == 1 && staffed.value[0].employees.length == 1
|
||||||
|
);
|
||||||
|
// return false
|
||||||
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
staffed,
|
staffed,
|
||||||
filtered,
|
filtered,
|
||||||
@@ -221,6 +221,7 @@ export default {
|
|||||||
selectedStaff,
|
selectedStaff,
|
||||||
splitname,
|
splitname,
|
||||||
onFilter,
|
onFilter,
|
||||||
|
disable,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -2,13 +2,14 @@
|
|||||||
<dialog-create
|
<dialog-create
|
||||||
:title="titleCard"
|
:title="titleCard"
|
||||||
:newOrOld="newEvent"
|
:newOrOld="newEvent"
|
||||||
|
@postData="postData"
|
||||||
@closeDialog="$emit('closeDialog')"
|
@closeDialog="$emit('closeDialog')"
|
||||||
>
|
>
|
||||||
<template v-slot:card_text>
|
<template v-slot:card_text>
|
||||||
<v-row no-gutters class="flex-column">
|
<v-row no-gutters class="flex-column">
|
||||||
<v-col class="d-flex flex-column">
|
<v-col class="d-flex flex-column">
|
||||||
<v-row no-gutters class="align-center">
|
<v-row no-gutters class="align-center">
|
||||||
<my-helper :pretext="propsEvent.event" />
|
<my-helper :pretext="propsEvent" />
|
||||||
|
|
||||||
<v-col class="text-body-2 text-text_grey pb-5" lg="2">
|
<v-col class="text-body-2 text-text_grey pb-5" lg="2">
|
||||||
Название
|
Название
|
||||||
@@ -86,12 +87,11 @@
|
|||||||
</v-col>
|
</v-col>
|
||||||
<v-col class="d-flex flex-column">
|
<v-col class="d-flex flex-column">
|
||||||
<v-row no-gutters class="gap">
|
<v-row no-gutters class="gap">
|
||||||
|
|
||||||
<time-select
|
<time-select
|
||||||
:date="propsEvent.event.date_start"
|
:date="propsEvent.event.date_start"
|
||||||
:max_date ="new Date(propsEvent.event.date_end)"
|
:max_date="propsEvent.event.date_end"
|
||||||
@update:date="propsEvent.event.date_start = $event"
|
@update:date="propsEvent.event.date_start = $event"
|
||||||
:order="[2,1]"
|
:order="[2, 1]"
|
||||||
/>
|
/>
|
||||||
<!-- -->
|
<!-- -->
|
||||||
<!-- -->
|
<!-- -->
|
||||||
@@ -101,12 +101,10 @@
|
|||||||
|
|
||||||
<time-select
|
<time-select
|
||||||
:date="propsEvent.event.date_end"
|
:date="propsEvent.event.date_end"
|
||||||
:order="[4,5]"
|
:order="[4, 5]"
|
||||||
:min_date ="new Date(propsEvent.event.date_start).setDate(new Date(propsEvent.event.date_start).getDate()-1)"
|
:min_date="propsEvent.event.date_start"
|
||||||
@update:date="propsEvent.event.date_end = $event"
|
@update:date="propsEvent.event.date_end = $event"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
||||||
</v-row>
|
</v-row>
|
||||||
<v-row no-gutters>
|
<v-row no-gutters>
|
||||||
<v-col>
|
<v-col>
|
||||||
@@ -123,18 +121,39 @@
|
|||||||
></v-row>
|
></v-row>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-row no-gutters class="align-center">
|
<v-row no-gutters class="align-center">
|
||||||
<v-col class="text-body-2 text-text_grey pb-5" lg="2">
|
<v-col class="text-body-2 text-text_grey pb-5" lg="2"> Файлы </v-col>
|
||||||
Файлы
|
|
||||||
</v-col>
|
|
||||||
<v-col>
|
<v-col>
|
||||||
<v-file-input
|
<v-file-input
|
||||||
label="File input w/ chips"
|
label="Файлы"
|
||||||
chips
|
chips
|
||||||
multiple
|
multiple
|
||||||
v-model="eventFiles"
|
v-model="eventFiles"
|
||||||
></v-file-input>
|
variant="outlined"
|
||||||
</v-col
|
>
|
||||||
></v-row>
|
</v-file-input>
|
||||||
|
<!-- <v-file-input
|
||||||
|
label="Файлы"
|
||||||
|
chips
|
||||||
|
multiple
|
||||||
|
v-model="eventFiles"
|
||||||
|
>
|
||||||
|
<template v-slot:selection="{ fileNames }">
|
||||||
|
<v-chip v-for="x in fileNames" :key=x>
|
||||||
|
<span> {{ x }}</span>
|
||||||
|
|
||||||
|
<v-icon
|
||||||
|
|
||||||
|
icon="mdi-close-circle"
|
||||||
|
size="x-small"
|
||||||
|
class="ml-3"
|
||||||
|
@click="proverka()"
|
||||||
|
/>
|
||||||
|
</v-chip>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
</v-file-input> -->
|
||||||
|
</v-col></v-row
|
||||||
|
>
|
||||||
<v-row no-gutters class="align-center">
|
<v-row no-gutters class="align-center">
|
||||||
<v-col>
|
<v-col>
|
||||||
<v-textarea
|
<v-textarea
|
||||||
@@ -156,9 +175,9 @@ import { computed, ref } from "vue";
|
|||||||
import { axiosApiInstance } from "@/utils/axios-api";
|
import { axiosApiInstance } from "@/utils/axios-api";
|
||||||
import DialogCreate from "@/components/calendar_of_events/UI_calendar/dialogCreate.vue";
|
import DialogCreate from "@/components/calendar_of_events/UI_calendar/dialogCreate.vue";
|
||||||
import calendarCreateSelect from "@/components/calendar_of_events/calendar-create-select.vue";
|
import calendarCreateSelect from "@/components/calendar_of_events/calendar-create-select.vue";
|
||||||
import { formatComa } from "@/utils/universal_functions";
|
import { formatComa, get_name } from "@/utils/universal_functions";
|
||||||
import TimeSelect from "@/components/calendar_of_events/UI_calendar/timeSelect.vue";
|
import TimeSelect from "@/components/calendar_of_events/UI_calendar/timeSelect.vue";
|
||||||
|
import { useAccountStore } from "@/store/AccountStore";
|
||||||
export default {
|
export default {
|
||||||
components: { calendarCreateSelect, DialogCreate, TimeSelect },
|
components: { calendarCreateSelect, DialogCreate, TimeSelect },
|
||||||
|
|
||||||
@@ -184,51 +203,99 @@ export default {
|
|||||||
staff.value = res.data.filter((e) => e.employees.length > 0);
|
staff.value = res.data.filter((e) => e.employees.length > 0);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const accountStore = useAccountStore();
|
||||||
const newStaff = computed({
|
const newStaff = computed({
|
||||||
get() {
|
get() {
|
||||||
|
|
||||||
|
let ns = []
|
||||||
|
let indCal = propsEvent.value.mycalendars.findIndex(e=>e.id ==propsEvent.value.event.calendar )
|
||||||
|
|
||||||
|
|
||||||
staff.value.forEach((e) => {
|
staff.value.forEach((e) => {
|
||||||
if (propsEvent.value.event.participant.length > 0) {
|
let emp = { ...e };
|
||||||
e.employees.forEach((empl) => {
|
emp.employees = e.employees.filter((n) =>
|
||||||
let ab = propsEvent.value.event.participant.find(
|
{
|
||||||
(a) => a === empl.id
|
if (n.id ==accountStore.user.is_idEmployee) {
|
||||||
|
n.selected = true
|
||||||
|
}
|
||||||
|
|
||||||
|
return propsEvent.value.mycalendars[indCal].participant.some(part => part.id === n.id)
|
||||||
|
// == n.id
|
||||||
|
}
|
||||||
|
|
||||||
);
|
);
|
||||||
if (ab) {
|
|
||||||
empl.selected = true;
|
if (emp.employees.length > 0) ns.push(emp)
|
||||||
} else {
|
|
||||||
empl.selected = false;
|
// if (propsEvent.value.event.participant.length > 0) {
|
||||||
}
|
// e.employees.forEach((empl) => {
|
||||||
});
|
// let ab = propsEvent.value.event.participant.find(
|
||||||
}
|
// (a) => a === empl.id
|
||||||
|
// );
|
||||||
|
// if (ab) {
|
||||||
|
// empl.selected = true;
|
||||||
|
// } else {
|
||||||
|
// empl.selected = false;
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// }
|
||||||
});
|
});
|
||||||
|
|
||||||
return staff.value;
|
return ns;
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function dataURLtoFile(dataurl, filename) {
|
||||||
|
var arr = dataurl.split(","),
|
||||||
|
mime = arr[0].match(/:(.*?);/)[1],
|
||||||
|
bstr = atob(arr[1]),
|
||||||
|
n = bstr.length,
|
||||||
|
u8arr = new Uint8Array(n);
|
||||||
|
|
||||||
|
while (n--) {
|
||||||
|
u8arr[n] = bstr.charCodeAt(n);
|
||||||
|
}
|
||||||
|
|
||||||
|
return new File([u8arr], filename, { type: mime });
|
||||||
|
}
|
||||||
|
|
||||||
|
const files = ref([]);
|
||||||
|
|
||||||
const eventFiles = computed({
|
const eventFiles = computed({
|
||||||
get() {
|
get() {
|
||||||
console.log(propsEvent.value.event.files)
|
if (propsEvent.value.event.files.length > 0) {
|
||||||
return propsEvent.value.event.files
|
propsEvent.value.event.files.forEach((e) =>
|
||||||
|
files.value.push(
|
||||||
|
dataURLtoFile(
|
||||||
|
"data:text/plain;base64,aGVsbG8gd29ybGQ=",
|
||||||
|
get_name(decodeURI(e.file))
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
// let file = dataURLtoFile(
|
||||||
|
// "data:text/plain;base64,aGVsbG8gd29ybGQ=",
|
||||||
|
// get_name(
|
||||||
|
// decodeURI(propsEvent.value.event.files[0].file)
|
||||||
|
// )
|
||||||
|
// );
|
||||||
|
|
||||||
|
// files.value.push(file);
|
||||||
}
|
}
|
||||||
,
|
|
||||||
|
return files.value;
|
||||||
|
},
|
||||||
set(newValue) {
|
set(newValue) {
|
||||||
// propsEvent.value.event.files.push(newValue)
|
|
||||||
newValue.forEach((e) => {
|
newValue.forEach((e) => {
|
||||||
let ind = propsEvent.value.event.files.findIndex(f => f.name == e.name)
|
if (!files.value.some((l) => l.name == e.name.split(" ").join("_"))) {
|
||||||
console.log(ind, 'ind')
|
files.value.push(e);
|
||||||
if(ind==-1) {
|
|
||||||
propsEvent.value.event.files.push(e)
|
|
||||||
}
|
}
|
||||||
else {
|
});
|
||||||
propsEvent.value.event.files.slice(ind, 0)
|
if (newValue.length == 0) {
|
||||||
|
files.value = [];
|
||||||
|
propsEvent.value.event.files = [];
|
||||||
}
|
}
|
||||||
|
},
|
||||||
})
|
});
|
||||||
console.log(newValue)
|
|
||||||
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
const calendar = computed({
|
const calendar = computed({
|
||||||
get() {
|
get() {
|
||||||
@@ -280,7 +347,7 @@ export default {
|
|||||||
|
|
||||||
// propsEvent.value.event.participant.push(e.id)
|
// propsEvent.value.event.participant.push(e.id)
|
||||||
);
|
);
|
||||||
console.log(idPart, "idPart");
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const dateEvent = computed({
|
const dateEvent = computed({
|
||||||
@@ -290,7 +357,7 @@ export default {
|
|||||||
|
|
||||||
set(newValue) {
|
set(newValue) {
|
||||||
let dateParts = newValue.split(".");
|
let dateParts = newValue.split(".");
|
||||||
console.log(dateParts, timeEvent.value, "1111111111111111111111111111");
|
|
||||||
// let d = new Date(propsEvent.value.event.date_start).setFullYear(parseInt(dateParts[2], 10), parseInt(dateParts[1], 10), parseInt(dateParts[0], 10))
|
// let d = new Date(propsEvent.value.event.date_start).setFullYear(parseInt(dateParts[2], 10), parseInt(dateParts[1], 10), parseInt(dateParts[0], 10))
|
||||||
// let d = new Date(propsEvent.value.event.date_start).setDate(new Date(2024,01,01))
|
// let d = new Date(propsEvent.value.event.date_start).setDate(new Date(2024,01,01))
|
||||||
// propsEvent.value.event.date_start = new Date(2024,01,01);
|
// propsEvent.value.event.date_start = new Date(2024,01,01);
|
||||||
@@ -299,6 +366,26 @@ export default {
|
|||||||
|
|
||||||
const menudate = ref(false);
|
const menudate = ref(false);
|
||||||
|
|
||||||
|
const postData = (validate) => {
|
||||||
|
let postEvent = new FormData();
|
||||||
|
postEvent.append("event", JSON.stringify({ ...propsEvent.value.event }));
|
||||||
|
if (propsEvent.value.event.files !== null) {
|
||||||
|
|
||||||
|
files.value.forEach((e) => postEvent.append("files", e));
|
||||||
|
// postEvent.append("files", propsEvent.value.event.files[0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
axiosApiInstance
|
||||||
|
.post("api/calendar_of_events/my_events/", postEvent)
|
||||||
|
.then((res) => {
|
||||||
|
console.log(res, "res");
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const proverka = () => {
|
||||||
|
console.log("Проверка");
|
||||||
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
menudate,
|
menudate,
|
||||||
titleCard,
|
titleCard,
|
||||||
@@ -309,7 +396,10 @@ export default {
|
|||||||
staff,
|
staff,
|
||||||
newStaff,
|
newStaff,
|
||||||
returnIdParticant,
|
returnIdParticant,
|
||||||
eventFiles
|
eventFiles,
|
||||||
|
postData,
|
||||||
|
files,
|
||||||
|
proverka,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -8,6 +8,10 @@ import moment from "moment";
|
|||||||
import { ref, onMounted } from "vue";
|
import { ref, onMounted } from "vue";
|
||||||
|
|
||||||
|
|
||||||
|
export function get_name(namestr) {
|
||||||
|
let arr = namestr.split("/");
|
||||||
|
return arr[arr.length - 1];
|
||||||
|
};
|
||||||
|
|
||||||
export function formatComa(date) {
|
export function formatComa(date) {
|
||||||
return moment(date).format("DD.MM.YYYY");
|
return moment(date).format("DD.MM.YYYY");
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ import { ref, computed } from "vue";
|
|||||||
import { axiosApiInstance, baseURL, spravURLBase } from "@/utils/axios-api";
|
import { axiosApiInstance, baseURL, spravURLBase } from "@/utils/axios-api";
|
||||||
import { saveAs } from "file-saver";
|
import { saveAs } from "file-saver";
|
||||||
import VuePdfEmbed from "vue-pdf-embed";
|
import VuePdfEmbed from "vue-pdf-embed";
|
||||||
|
import { get_name } from "@/utils/universal_functions";
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
docSections: {
|
docSections: {
|
||||||
@@ -183,10 +183,7 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
const get_name = (namestr) => {
|
|
||||||
let arr = namestr.split("/");
|
|
||||||
return arr[arr.length - 1];
|
|
||||||
};
|
|
||||||
|
|
||||||
const closeFile = () => {
|
const closeFile = () => {
|
||||||
err.value = "Файл не выбран"
|
err.value = "Файл не выбран"
|
||||||
|
|||||||
Reference in new issue
Block a user