P-19 Прикрепить файл резюме
This commit is contained in:
1 parent
c0144fffb0
commit
137c9b31a2
8 files changed
+153
-79
No files matched your search
@@ -5,14 +5,14 @@ from userauth.serializers import *
|
|||||||
|
|
||||||
# Сериализатор модели StateSize (Штатная численность)
|
# Сериализатор модели StateSize (Штатная численность)
|
||||||
class StateSizeSerializer(serializers.ModelSerializer):
|
class StateSizeSerializer(serializers.ModelSerializer):
|
||||||
|
size= serializers.IntegerField(source='statesize')
|
||||||
class Meta:
|
class Meta:
|
||||||
model = StateSize
|
model = StateSize
|
||||||
fields ='__all__'
|
fields ='__all__'
|
||||||
|
|
||||||
# Сериализатор модели FactSize (Фактическая численность)
|
# Сериализатор модели FactSize (Фактическая численность)
|
||||||
class FactSizeSerializer(serializers.ModelSerializer):
|
class FactSizeSerializer(serializers.ModelSerializer):
|
||||||
|
size= serializers.IntegerField(source='factsize')
|
||||||
class Meta:
|
class Meta:
|
||||||
model = FactSize
|
model = FactSize
|
||||||
fields ='__all__'
|
fields ='__all__'
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ urlpatterns = [
|
|||||||
path('getinspectiondirections/', GetInspectionDirections.as_view(), name='getinspectiondirections'),
|
path('getinspectiondirections/', GetInspectionDirections.as_view(), name='getinspectiondirections'),
|
||||||
path('getstructure/', GetStructure.as_view(), name='getstructure'),
|
path('getstructure/', GetStructure.as_view(), name='getstructure'),
|
||||||
path('getvacancy/', GetVacancies.as_view(), name='getvacancy'),
|
path('getvacancy/', GetVacancies.as_view(), name='getvacancy'),
|
||||||
|
path('postresponsevacancy/', PostResponseVacancies.as_view(), name='postresponsevacancy'),
|
||||||
|
|
||||||
|
|
||||||
]
|
]
|
||||||
@@ -14,6 +14,7 @@ class GetStateSize(ListAPIView):
|
|||||||
state_size = StateSizeSerializer(StateSize.objects.latest('date_created')).data
|
state_size = StateSizeSerializer(StateSize.objects.latest('date_created')).data
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
pass
|
pass
|
||||||
|
print(state_size, 'state_sizestate_sizestate_sizestate_sizestate_sizestate_sizestate_sizestate_sizestate_sizestate_sizestate_sizestate_sizestate_sizestate_sizestate_size')
|
||||||
return Response(state_size)
|
return Response(state_size)
|
||||||
|
|
||||||
|
|
||||||
@@ -43,3 +44,8 @@ class GetVacancies(ListAPIView):
|
|||||||
def get(self, request):
|
def get(self, request):
|
||||||
queryset = Vacancies.objects.filter(published=True).order_by('department__order_department')
|
queryset = Vacancies.objects.filter(published=True).order_by('department__order_department')
|
||||||
return Response(VacanciesSerializer(queryset, many=True).data)
|
return Response(VacanciesSerializer(queryset, many=True).data)
|
||||||
|
|
||||||
|
class PostResponseVacancies(ListAPIView):
|
||||||
|
def post(self, request):
|
||||||
|
print(request.data['resp'],'poooooooooooooost----------------------------------------------')
|
||||||
|
return Response('ki')
|
||||||
+10
-6
@@ -48,17 +48,21 @@
|
|||||||
</v-card-text>
|
</v-card-text>
|
||||||
</v-card>
|
</v-card>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col class="w100 flex-column d-flex" >
|
<v-col class="w100 flex-column d-flex">
|
||||||
<general-information-size :size="getstatesize" :title="'Фактическая численнность'"/>
|
<general-information-size
|
||||||
|
:size="getstatesize"
|
||||||
|
:title="'Фактическая численнность'"
|
||||||
|
/>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col class="w100 flex-column d-flex">
|
<v-col class="w100 flex-column d-flex">
|
||||||
<general-information-size :size="getfactsize" :title="'Штатная численность'"/>
|
<general-information-size
|
||||||
|
:size="getfactsize"
|
||||||
|
:title="'Штатная численность'"
|
||||||
|
/>
|
||||||
</v-col>
|
</v-col>
|
||||||
|
|
||||||
</v-row>
|
</v-row>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col>
|
<v-col>
|
||||||
|
|
||||||
<v-card class="h-100 flex-column d-flex">
|
<v-card class="h-100 flex-column d-flex">
|
||||||
<v-card-title class="text-h6 text-uppercase text-center">
|
<v-card-title class="text-h6 text-uppercase text-center">
|
||||||
Основные направления деятельности инспекции
|
Основные направления деятельности инспекции
|
||||||
@@ -132,7 +136,7 @@ import { axiosApiInstance } from "@/utils/axios-api";
|
|||||||
import { checkremote } from "@/utils/universal_functions";
|
import { checkremote } from "@/utils/universal_functions";
|
||||||
import { spravURL, baseURL } from "@/utils/axios-api";
|
import { spravURL, baseURL } from "@/utils/axios-api";
|
||||||
import { useDisplay } from "vuetify";
|
import { useDisplay } from "vuetify";
|
||||||
import GeneralInformationSize from '@/components/about_inspection/general_information/GeneralInformationSize.vue';
|
import GeneralInformationSize from "@/components/about_inspection/general_information/GeneralInformationSize.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: { GeneralInformationSize },
|
components: { GeneralInformationSize },
|
||||||
|
|||||||
+35
-4
@@ -1,18 +1,49 @@
|
|||||||
<template>
|
<template>
|
||||||
<v-card class="flex-grow-1 d-flex flex-column">
|
<v-card class="flex-grow-1 d-flex flex-column ">
|
||||||
|
|
||||||
<v-card-title class="text-h6 text-center text-uppercase">
|
<v-card-title class="text-h6 text-center text-uppercase">
|
||||||
{{title}}
|
{{title}}
|
||||||
</v-card-title>
|
</v-card-title>
|
||||||
<template v-if="Object.keys(size).length > 0">
|
<template v-if="Object.keys(size).length > 0">
|
||||||
<v-card-text class="text-h2 text-center">
|
<!-- <v-card-text class="text-h2 text-center">
|
||||||
|
|
||||||
<vue3-autocounter
|
<vue3-autocounter
|
||||||
ref="counter"
|
ref="counter"
|
||||||
:startAmount="0"
|
:startAmount="0"
|
||||||
:endAmount="size.factsize"
|
:endAmount="size.statesize"
|
||||||
:duration="2"
|
:duration="2"
|
||||||
/>
|
/>
|
||||||
</v-card-text>
|
</v-card-text> -->
|
||||||
|
|
||||||
|
<!-- <v-card-subtitle class="text-center"
|
||||||
|
>по состоянию на
|
||||||
|
{{
|
||||||
|
new Date(size.date_created).toLocaleDateString(
|
||||||
|
"ru-RU"
|
||||||
|
)
|
||||||
|
}}
|
||||||
|
</v-card-subtitle> -->
|
||||||
|
<v-card
|
||||||
|
class="h-100 flex-column d-flex align-center justify-center text-center elevation-0"
|
||||||
|
>
|
||||||
|
<vue3-autocounter
|
||||||
|
class="text-h2 font-weight-regular pb-2"
|
||||||
|
ref="counter"
|
||||||
|
:startAmount="0"
|
||||||
|
:endAmount="size.size"
|
||||||
|
:duration="2"
|
||||||
|
/>
|
||||||
|
<!-- <v-card-text class="text-h2 text-center">
|
||||||
|
<vue3-autocounter
|
||||||
|
|
||||||
|
ref="counter"
|
||||||
|
:startAmount="0"
|
||||||
|
:endAmount="size.size"
|
||||||
|
:duration="2"
|
||||||
|
/>
|
||||||
|
</v-card-text> -->
|
||||||
|
|
||||||
|
</v-card>
|
||||||
<v-card-subtitle class="text-center"
|
<v-card-subtitle class="text-center"
|
||||||
>по состоянию на
|
>по состоянию на
|
||||||
{{
|
{{
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<v-row no-gutters class="h-100 gap" v-if="vacancy.length > 0">
|
<v-row no-gutters class="h-100 gap" v-if="vacancy.length > 0" >
|
||||||
<v-col lg="4" class="flex-column d-flex">
|
<v-col lg="4" class="flex-column d-flex">
|
||||||
<v-card class="h-100 pa-1 d-flex flex-column rounded-0">
|
<v-card class="h-100 pa-1 d-flex flex-column rounded-0">
|
||||||
<v-card-title
|
<v-card-title
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
<v-row no-gutters class="h-0 gap overflow-auto">
|
<v-row no-gutters class="h-0 gap overflow-auto">
|
||||||
<v-col>
|
<v-col>
|
||||||
<v-card class="mx-auto h-100">
|
<v-card class="mx-auto h-100">
|
||||||
<v-list density="compact px-0 ">
|
<v-list density="compact" class="px-0">
|
||||||
<v-list-item
|
<v-list-item
|
||||||
v-for="vac in vacancy"
|
v-for="vac in vacancy"
|
||||||
:key="vac.id"
|
:key="vac.id"
|
||||||
@@ -56,7 +56,7 @@
|
|||||||
>
|
>
|
||||||
Описание
|
Описание
|
||||||
</v-card-title>
|
</v-card-title>
|
||||||
<v-row no-gutters class="h-0 gap overflow-auto">
|
<v-row no-gutters class="h-0 gap overflow-auto" id="goto-container-example">
|
||||||
<v-col>
|
<v-col>
|
||||||
<v-card
|
<v-card
|
||||||
class="rounded-0 h-100"
|
class="rounded-0 h-100"
|
||||||
@@ -66,14 +66,30 @@
|
|||||||
<span class="text-h4 text-wrap">
|
<span class="text-h4 text-wrap">
|
||||||
{{ vacancyDescription.name }}
|
{{ vacancyDescription.name }}
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
</v-card-title>
|
</v-card-title>
|
||||||
|
|
||||||
<v-card-title class="pt-0">
|
<v-card-title class="pt-0">
|
||||||
|
|
||||||
<span class="text-h5">
|
<span class="text-h5">
|
||||||
{{ vacancyDescription.department.name }}
|
{{ vacancyDescription.department.name }}
|
||||||
</span>
|
</span>
|
||||||
|
</v-card-title>
|
||||||
|
<v-card-title>
|
||||||
|
<v-btn
|
||||||
|
type="submit"
|
||||||
|
class="text-subtitle-1 font-weight-light"
|
||||||
|
color="btn_text"
|
||||||
|
elevation=1
|
||||||
|
@click="goTo('#response', { container: '#goto-container-example' })"
|
||||||
|
>
|
||||||
|
Откликнуться
|
||||||
|
</v-btn>
|
||||||
|
|
||||||
|
|
||||||
</v-card-title>
|
</v-card-title>
|
||||||
<v-card-title class="pt-6">
|
<v-card-title class="pt-6">
|
||||||
|
|
||||||
<span class="text-h6">
|
<span class="text-h6">
|
||||||
Направление деятельности подразделения
|
Направление деятельности подразделения
|
||||||
</span>
|
</span>
|
||||||
@@ -90,7 +106,7 @@
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</v-card-text>
|
</v-card-text>
|
||||||
<v-card-title>
|
<v-card-title >
|
||||||
<span class="text-h6">
|
<span class="text-h6">
|
||||||
Функционал и должностные обязанности
|
Функционал и должностные обязанности
|
||||||
</span>
|
</span>
|
||||||
@@ -105,7 +121,9 @@
|
|||||||
<div class="py-1" v-html="vacancyDescription.functional"></div>
|
<div class="py-1" v-html="vacancyDescription.functional"></div>
|
||||||
</v-card-text>
|
</v-card-text>
|
||||||
<v-divider />
|
<v-divider />
|
||||||
<response-vacancies/>
|
<response-vacancies id="response"/>
|
||||||
|
|
||||||
|
|
||||||
</v-card>
|
</v-card>
|
||||||
|
|
||||||
<v-card
|
<v-card
|
||||||
@@ -148,13 +166,15 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
|
import { useGoTo } from 'vuetify'
|
||||||
import { clearAxios } from "@/utils/axios-api";
|
import { clearAxios } from "@/utils/axios-api";
|
||||||
import { baseURL } from "@/utils/axios-api";
|
import { baseURL } from "@/utils/axios-api";
|
||||||
import ResponseVacancies from '@/components/about_inspection/open_vacancies/ResponseVacancies.vue';
|
import ResponseVacancies from "@/components/about_inspection/open_vacancies/ResponseVacancies.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: { ResponseVacancies },
|
components: { ResponseVacancies },
|
||||||
setup() {
|
setup() {
|
||||||
|
const goTo = useGoTo()
|
||||||
let vacancyDescription = ref({ name: "", department: { name: "" } });
|
let vacancyDescription = ref({ name: "", department: { name: "" } });
|
||||||
let vacancySelect = ref(-1);
|
let vacancySelect = ref(-1);
|
||||||
|
|
||||||
@@ -193,6 +213,7 @@ export default {
|
|||||||
vacancyDescription,
|
vacancyDescription,
|
||||||
getIndVacation,
|
getIndVacation,
|
||||||
vacancySelect,
|
vacancySelect,
|
||||||
|
goTo
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -3,83 +3,91 @@
|
|||||||
<v-card-text class="text-center">
|
<v-card-text class="text-center">
|
||||||
<span class="text-h4">Откликнуться на вакансию</span>
|
<span class="text-h4">Откликнуться на вакансию</span>
|
||||||
</v-card-text>
|
</v-card-text>
|
||||||
|
<v-card-text class="d-flex flex-column pt-0">
|
||||||
<form @submit.prevent="submit">
|
<form @submit.prevent="submit">
|
||||||
|
<v-row no-gutters class="justify-center">
|
||||||
|
<v-col lg="8">
|
||||||
<v-text-field
|
<v-text-field
|
||||||
v-model="name.value.value"
|
v-model="name.value.value"
|
||||||
:counter="10"
|
:counter="10"
|
||||||
:error-messages="name.errorMessage.value"
|
:error-messages="name.errorMessage.value"
|
||||||
label="Name"
|
label="Фамилия, имя, отчество"
|
||||||
></v-text-field>
|
/>
|
||||||
|
<v-row no-gutters class="gap">
|
||||||
<!-- <v-text-field
|
<v-col>
|
||||||
|
<v-text-field
|
||||||
|
v-model="email.value.value"
|
||||||
|
:error-messages="email.errorMessage.value"
|
||||||
|
label="E-mail или почта Lotus"
|
||||||
|
/>
|
||||||
|
</v-col>
|
||||||
|
<v-col>
|
||||||
|
<v-text-field
|
||||||
v-model="phone.value.value"
|
v-model="phone.value.value"
|
||||||
:counter="7"
|
:counter="7"
|
||||||
:error-messages="phone.errorMessage.value"
|
:error-messages="phone.errorMessage.value"
|
||||||
label="Phone Number"
|
label="Телефон"
|
||||||
></v-text-field> -->
|
/>
|
||||||
|
</v-col>
|
||||||
|
</v-row>
|
||||||
|
<v-textarea
|
||||||
|
v-model="message.value.value"
|
||||||
|
no-resize
|
||||||
|
rows="4"
|
||||||
|
label="Сопроводительное письмо"
|
||||||
|
></v-textarea>
|
||||||
|
<v-file-input
|
||||||
|
label="Резюме"
|
||||||
|
hide-details
|
||||||
|
|
||||||
<!-- <v-text-field
|
/>
|
||||||
v-model="email.value.value"
|
<v-btn block type="submit" class="mt-4 text-none" color="btn_text">
|
||||||
:error-messages="email.errorMessage.value"
|
Отправить
|
||||||
label="E-mail"
|
</v-btn>
|
||||||
></v-text-field> -->
|
</v-col>
|
||||||
|
</v-row>
|
||||||
<!-- <v-btn class="me-4" type="submit"> submit </v-btn>
|
|
||||||
|
|
||||||
<v-btn @click="handleReset"> clear </v-btn> -->
|
|
||||||
</form>
|
</form>
|
||||||
|
</v-card-text>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script setup>
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import { useField, useForm } from "vee-validate";
|
import { useField, useForm } from "vee-validate";
|
||||||
import * as yup from "yup";
|
import * as yup from "yup";
|
||||||
|
import { clearAxios } from "@/utils/axios-api";
|
||||||
|
|
||||||
export default {
|
const { handleSubmit } = useForm({
|
||||||
setup() {
|
validationSchema: yup.object({
|
||||||
const { handleSubmit, handleReset } = useForm({
|
email: yup
|
||||||
validationSchema: {
|
.string()
|
||||||
name (value) {
|
.email("Введите корректный email")
|
||||||
if (value?.length >= 2) return true
|
.required("Поле обязательно для заполнения"),
|
||||||
|
name: yup
|
||||||
|
.string()
|
||||||
|
.matches(/^[а-яА-ЯЁё]+$/, "Имя должно содержать только русские буквы")
|
||||||
|
.required("Поле обязательно для заполнения"),
|
||||||
|
phone: yup
|
||||||
|
.string()
|
||||||
|
.matches(
|
||||||
|
/^[[\d-]*\d[\d-]*$/,
|
||||||
|
"Номер телефона должен содержать только цифры"
|
||||||
|
)
|
||||||
|
.required("Поле обязательно для заполнения"),
|
||||||
|
message: yup.string(),
|
||||||
|
}),
|
||||||
|
});
|
||||||
|
const name = useField("name");
|
||||||
|
const phone = useField("phone");
|
||||||
|
const email = useField("email");
|
||||||
|
const message = useField("message");
|
||||||
|
|
||||||
return 'Name needs to be at least 2 characters.'
|
const submit = handleSubmit((values) => {
|
||||||
},
|
clearAxios
|
||||||
phone (value) {
|
.post(`api/about_inspection/postresponsevacancy/`, { resp: values })
|
||||||
if (value?.length > 9 && /[0-9-]+/.test(value)) return true
|
.then((data) => {
|
||||||
|
console.log("datas");
|
||||||
return 'Phone number needs to be at least 9 digits.'
|
});
|
||||||
},
|
alert(JSON.stringify(values, null, 2));
|
||||||
email (value) {
|
});
|
||||||
if (/^[a-z.-]+@[a-z.-]+\.[a-z]+$/i.test(value)) return true
|
|
||||||
|
|
||||||
return 'Must be a valid e-mail.'
|
|
||||||
},
|
|
||||||
select (value) {
|
|
||||||
if (value) return true
|
|
||||||
|
|
||||||
return 'Select an item.'
|
|
||||||
},
|
|
||||||
checkbox (value) {
|
|
||||||
if (value === '1') return true
|
|
||||||
|
|
||||||
return 'Must be checked.'
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
const name = useField('name')
|
|
||||||
const phone = useField('phone')
|
|
||||||
const email = useField('email')
|
|
||||||
|
|
||||||
const submit = handleSubmit(values => {
|
|
||||||
console.log('helloooo');
|
|
||||||
})
|
|
||||||
return {
|
|
||||||
email,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style></style>
|
|
||||||
@@ -9,13 +9,16 @@ import { fileURLToPath, URL } from 'node:url'
|
|||||||
// https://vitejs.dev/config/
|
// https://vitejs.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [
|
plugins: [
|
||||||
|
|
||||||
vue({
|
vue({
|
||||||
template: { transformAssetUrls }
|
template: { transformAssetUrls }
|
||||||
}),
|
}),
|
||||||
// https://github.com/vuetifyjs/vuetify-loader/tree/next/packages/vite-plugin
|
// https://github.com/vuetifyjs/vuetify-loader/tree/next/packages/vite-plugin
|
||||||
vuetify({
|
vuetify({
|
||||||
autoImport: true,
|
autoImport: true,
|
||||||
|
|
||||||
}),
|
}),
|
||||||
|
|
||||||
],
|
],
|
||||||
define: { 'process.env': {} },
|
define: { 'process.env': {} },
|
||||||
resolve: {
|
resolve: {
|
||||||
|
|||||||
Reference in new issue
Block a user