P-13 начало валидации
This commit is contained in:
1 parent
8662dca882
commit
c0144fffb0
10 files changed
+461
-284
No files matched your search
+9
-49
@@ -48,58 +48,17 @@
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-col>
|
||||
<v-col class="w100 flex-column d-flex">
|
||||
<v-card class="flex-grow-1">
|
||||
<v-card-title class="text-h6 text-center text-uppercase">
|
||||
Штатная численность
|
||||
</v-card-title>
|
||||
<v-card-text class="text-h2 text-center">
|
||||
<vue3-autocounter
|
||||
ref="counter"
|
||||
:startAmount="0"
|
||||
:endAmount="getstatesize.statesize"
|
||||
:duration="2"
|
||||
/>
|
||||
</v-card-text>
|
||||
|
||||
<v-card-subtitle class="text-center"
|
||||
>по состоянию на
|
||||
{{
|
||||
new Date(getstatesize.date_created).toLocaleDateString(
|
||||
"ru-RU"
|
||||
)
|
||||
}}
|
||||
</v-card-subtitle>
|
||||
</v-card>
|
||||
<!-- <v-divider></v-divider> -->
|
||||
<v-card class="flex-grow-1 mt-1">
|
||||
<v-card-title class="text-h6 text-center text-uppercase">
|
||||
Фактическая численность
|
||||
</v-card-title>
|
||||
|
||||
<v-card-text class="text-h2 text-center">
|
||||
<vue3-autocounter
|
||||
ref="counter"
|
||||
:startAmount="0"
|
||||
:endAmount="getfactsize.factsize"
|
||||
:duration="2"
|
||||
/>
|
||||
</v-card-text>
|
||||
|
||||
<v-card-subtitle class="text-center"
|
||||
>по состоянию на
|
||||
{{
|
||||
new Date(getfactsize.date_created).toLocaleDateString(
|
||||
"ru-RU"
|
||||
)
|
||||
}}
|
||||
</v-card-subtitle>
|
||||
</v-card>
|
||||
<v-col class="w100 flex-column d-flex" >
|
||||
<general-information-size :size="getstatesize" :title="'Фактическая численнность'"/>
|
||||
</v-col>
|
||||
<v-col class="w100 flex-column d-flex">
|
||||
<general-information-size :size="getfactsize" :title="'Штатная численность'"/>
|
||||
</v-col>
|
||||
|
||||
</v-row>
|
||||
</v-col>
|
||||
<v-col>
|
||||
<!-- v-for="direction in " -->
|
||||
|
||||
<v-card class="h-100 flex-column d-flex">
|
||||
<v-card-title class="text-h6 text-uppercase text-center">
|
||||
Основные направления деятельности инспекции
|
||||
@@ -173,8 +132,10 @@ import { axiosApiInstance } from "@/utils/axios-api";
|
||||
import { checkremote } from "@/utils/universal_functions";
|
||||
import { spravURL, baseURL } from "@/utils/axios-api";
|
||||
import { useDisplay } from "vuetify";
|
||||
import GeneralInformationSize from '@/components/about_inspection/general_information/GeneralInformationSize.vue';
|
||||
|
||||
export default {
|
||||
components: { GeneralInformationSize },
|
||||
setup() {
|
||||
const { lgAndUp } = useDisplay();
|
||||
const userlinks = ref([]);
|
||||
@@ -206,7 +167,6 @@ export default {
|
||||
.get("api/about_inspection/getinspectiondirections/")
|
||||
.then((res) => {
|
||||
directionworks.value = res.data;
|
||||
console.log(directionworks.value);
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
<template>
|
||||
<v-card class="flex-grow-1 d-flex flex-column">
|
||||
<v-card-title class="text-h6 text-center text-uppercase">
|
||||
{{title}}
|
||||
</v-card-title>
|
||||
<template v-if="Object.keys(size).length > 0">
|
||||
<v-card-text class="text-h2 text-center">
|
||||
<vue3-autocounter
|
||||
ref="counter"
|
||||
:startAmount="0"
|
||||
:endAmount="size.factsize"
|
||||
:duration="2"
|
||||
/>
|
||||
</v-card-text>
|
||||
|
||||
<v-card-subtitle class="text-center"
|
||||
>по состоянию на
|
||||
{{
|
||||
new Date(size.date_created).toLocaleDateString(
|
||||
"ru-RU"
|
||||
)
|
||||
}}
|
||||
</v-card-subtitle>
|
||||
</template>
|
||||
<template v-else>
|
||||
<v-card
|
||||
class="h-100 d-flex align-center justify-center text-center"
|
||||
>
|
||||
<span class="text-subtitle-1 text-grey"
|
||||
>Данных нет</span
|
||||
>
|
||||
</v-card>
|
||||
|
||||
</template>
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
title: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
size: {
|
||||
type: Object,
|
||||
default: () => {},
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style></style>
|
||||
@@ -1,132 +1,132 @@
|
||||
<template>
|
||||
<v-row no-gutters class="h-100 gap" v-if="vacancy.length > 0">
|
||||
<v-col lg="4" class="flex-column d-flex">
|
||||
<v-card class="h-100 pa-1 ">
|
||||
<v-card class="h-100 pa-1 d-flex flex-column rounded-0">
|
||||
<v-card-title
|
||||
class="d-flex justify-center bg-teal-lighten-5 text-teal-darken-4"
|
||||
>
|
||||
<!-- :to='`/newsfull?id=${news.id}`' -->
|
||||
<v-row>
|
||||
<v-col class="d-flex justify-center">Вакансии</v-col>
|
||||
</v-row>
|
||||
Вакансии
|
||||
</v-card-title>
|
||||
<v-card-text class="h-100 pa-0 d-flex flex-column">
|
||||
<v-row no-gutters class="h-0 gap overflow-auto">
|
||||
<v-col>
|
||||
<!-- <my-helper :pretext="vacancy" /> -->
|
||||
<v-card class="mx-auto h-100 ">
|
||||
<v-list density="compact px-0 ">
|
||||
<v-list-item
|
||||
v-for="vac in vacancy"
|
||||
:key="vac.id"
|
||||
:value="vac"
|
||||
class="border-b-sm"
|
||||
|
||||
active-class="custom-active"
|
||||
color="teal-darken-3"
|
||||
@click="getIndVacation(vac.id)"
|
||||
>
|
||||
<v-card class="rounded-0 bg-transparent " >
|
||||
<v-card-title class="text-wrap">
|
||||
{{ vac.name }}
|
||||
</v-card-title>
|
||||
<v-card-text class="pb-2">
|
||||
<v-row no-gutters class="gap ">
|
||||
<v-col>{{ vac.department.name }}</v-col>
|
||||
<v-col class="flex-grow-0 text-subtitle-1 text-btn_text">
|
||||
Подробнее
|
||||
</v-col>
|
||||
<v-col class="flex-grow-0 align-self-center pl-2">
|
||||
<v-icon icon="mdi-arrow-right" color="btn_text" size="small"/>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
</v-card-text>
|
||||
|
||||
</v-card>
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
</v-card>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card-text>
|
||||
<v-row no-gutters class="h-0 gap overflow-auto">
|
||||
<v-col>
|
||||
<v-card class="mx-auto h-100">
|
||||
<v-list density="compact px-0 ">
|
||||
<v-list-item
|
||||
v-for="vac in vacancy"
|
||||
:key="vac.id"
|
||||
:value="vac"
|
||||
class="border-b-sm"
|
||||
active-class="custom-active"
|
||||
color="teal-darken-3"
|
||||
@click="getIndVacation(vac.id)"
|
||||
>
|
||||
<v-card class="rounded-0 bg-transparent">
|
||||
<v-card-title class="text-wrap">
|
||||
{{ vac.name }}
|
||||
</v-card-title>
|
||||
<v-card-text class="pb-2">
|
||||
<v-row no-gutters class="gap">
|
||||
<v-col>{{ vac.department.name }}</v-col>
|
||||
<v-col
|
||||
class="flex-grow-0 text-subtitle-1 text-btn_text"
|
||||
>
|
||||
Подробнее
|
||||
</v-col>
|
||||
<v-col class="flex-grow-0 align-self-center pl-2">
|
||||
<v-icon
|
||||
icon="mdi-arrow-right"
|
||||
color="btn_text"
|
||||
size="small"
|
||||
/>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
</v-card>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card>
|
||||
</v-col>
|
||||
<v-col>
|
||||
<v-card class="h-100 pa-1">
|
||||
<v-col class="flex-column d-flex">
|
||||
<v-card class="h-100 pa-1 d-flex flex-column rounded-0">
|
||||
<v-card-title
|
||||
class="d-flex justify-center bg-teal-lighten-5 text-teal-darken-4"
|
||||
>
|
||||
<v-row>
|
||||
<v-col class="d-flex justify-center">Описание</v-col>
|
||||
</v-row>
|
||||
Описание
|
||||
</v-card-title>
|
||||
<v-card-text class="h-100 pa-0 d-flex flex-column">
|
||||
<v-row no-gutters class="h-0 overflow-auto">
|
||||
<v-col class="flex-column d-flex">
|
||||
<v-card class="rounded-0 h-100" v-if="vacancyDescription.name!=''">
|
||||
<v-card-title class="mt-4">
|
||||
<span class="text-h4 text-wrap">
|
||||
{{ vacancyDescription.name }}
|
||||
</span>
|
||||
</v-card-title>
|
||||
<v-row no-gutters class="h-0 gap overflow-auto">
|
||||
<v-col>
|
||||
<v-card
|
||||
class="rounded-0 h-100"
|
||||
v-if="vacancyDescription.name != ''"
|
||||
>
|
||||
<v-card-title class="mt-4">
|
||||
<span class="text-h4 text-wrap">
|
||||
{{ vacancyDescription.name }}
|
||||
</span>
|
||||
</v-card-title>
|
||||
|
||||
<v-card-title class="pt-0">
|
||||
<span class="text-h5">
|
||||
{{ vacancyDescription.department.name }}
|
||||
</span>
|
||||
</v-card-title>
|
||||
<v-card-title class="pt-6">
|
||||
<span class="text-h6">
|
||||
Направление деятельности подразделения
|
||||
</span>
|
||||
</v-card-title>
|
||||
<v-card-text class="mx-5 my-1">
|
||||
<ul>
|
||||
<li
|
||||
class="py-1"
|
||||
v-for="directionTitle in vacancyDescription.department
|
||||
.department_directions"
|
||||
:key="directionTitle"
|
||||
>
|
||||
{{ directionTitle.direction_title }}
|
||||
</li>
|
||||
</ul>
|
||||
</v-card-text>
|
||||
<v-card-title>
|
||||
<span class="text-h6">
|
||||
Функционал и должностные обязанности
|
||||
</span>
|
||||
</v-card-title>
|
||||
<v-card-text class="mx-5 my-0 ckeditor_ul">
|
||||
<div
|
||||
<v-card-title class="pt-0">
|
||||
<span class="text-h5">
|
||||
{{ vacancyDescription.department.name }}
|
||||
</span>
|
||||
</v-card-title>
|
||||
<v-card-title class="pt-6">
|
||||
<span class="text-h6">
|
||||
Направление деятельности подразделения
|
||||
</span>
|
||||
</v-card-title>
|
||||
<v-card-text class="mx-5 my-1">
|
||||
<ul>
|
||||
<li
|
||||
class="py-1"
|
||||
v-html="vacancyDescription.functional"
|
||||
></div>
|
||||
</v-card-text>
|
||||
<v-card-title>
|
||||
<span class="text-h6"> Базовые требования к соискателю </span>
|
||||
</v-card-title>
|
||||
<v-card-text class="mx-5 my-0 ckeditor_ul">
|
||||
<div
|
||||
class="py-1"
|
||||
v-html="vacancyDescription.functional"
|
||||
></div>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
<v-card class="h-100 pa-1 d-flex align-center justify-center text-center" v-else>
|
||||
<v-card-subtitle>
|
||||
<v-icon icon="mdi-format-list-bulleted" color="grey" size="x-large" />
|
||||
<br />
|
||||
<span class="text-h5 text-grey"
|
||||
>Для подробного описания вакансии <br> выберите её из списка слева</span
|
||||
>
|
||||
</v-card-subtitle>
|
||||
</v-card>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card-text>
|
||||
|
||||
v-for="directionTitle in vacancyDescription.department
|
||||
.department_directions"
|
||||
:key="directionTitle"
|
||||
>
|
||||
{{ directionTitle.direction_title }}
|
||||
</li>
|
||||
</ul>
|
||||
</v-card-text>
|
||||
<v-card-title>
|
||||
<span class="text-h6">
|
||||
Функционал и должностные обязанности
|
||||
</span>
|
||||
</v-card-title>
|
||||
<v-card-text class="mx-5 my-0 ckeditor_ul">
|
||||
<div class="py-1" v-html="vacancyDescription.functional"></div>
|
||||
</v-card-text>
|
||||
<v-card-title>
|
||||
<span class="text-h6"> Базовые требования к соискателю </span>
|
||||
</v-card-title>
|
||||
<v-card-text class="mx-5 my-0 ckeditor_ul">
|
||||
<div class="py-1" v-html="vacancyDescription.functional"></div>
|
||||
</v-card-text>
|
||||
<v-divider />
|
||||
<response-vacancies/>
|
||||
</v-card>
|
||||
|
||||
<v-card
|
||||
class="h-100 pa-1 d-flex align-center justify-center text-center"
|
||||
v-else
|
||||
>
|
||||
<v-card-subtitle>
|
||||
<v-icon
|
||||
icon="mdi-format-list-bulleted"
|
||||
color="grey"
|
||||
size="x-large"
|
||||
/>
|
||||
<br />
|
||||
<span class="text-h5 text-grey"
|
||||
>Для подробного описания вакансии <br />
|
||||
выберите её из списка слева</span
|
||||
>
|
||||
</v-card-subtitle>
|
||||
</v-card>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card>
|
||||
</v-col>
|
||||
</v-row>
|
||||
@@ -134,7 +134,7 @@
|
||||
<v-col class="flex-column d-flex">
|
||||
<v-card class="h-100 pa-1 d-flex align-center justify-center text-center">
|
||||
<v-card-subtitle>
|
||||
<v-icon icon="mdi-credit-card-off" size="x-large" color="grey"/>
|
||||
<v-icon icon="mdi-credit-card-off" size="x-large" color="grey" />
|
||||
<br />
|
||||
<span class="text-h5 text-grey"
|
||||
>Сейчас вакансий нет, <br />
|
||||
@@ -150,24 +150,20 @@
|
||||
import { ref } from "vue";
|
||||
import { clearAxios } from "@/utils/axios-api";
|
||||
import { baseURL } from "@/utils/axios-api";
|
||||
import myHelper from "../../UI/my-helper.vue";
|
||||
import ResponseVacancies from '@/components/about_inspection/open_vacancies/ResponseVacancies.vue';
|
||||
|
||||
export default {
|
||||
components: { myHelper },
|
||||
components: { ResponseVacancies },
|
||||
setup() {
|
||||
let vacancyDescription = ref({ name: "", department: { name: "" } });
|
||||
let vacancySelect = ref(-1);
|
||||
|
||||
|
||||
|
||||
let vacancy = ref({});
|
||||
|
||||
|
||||
|
||||
const getVacancies = () => {
|
||||
clearAxios.get(`api/about_inspection/getvacancy/`).then((data) => {
|
||||
vacancy.value = data.data;
|
||||
vacancyDescription.value = vacancy.value[0]
|
||||
vacancyDescription.value = vacancy.value[0];
|
||||
// console.log(, 'data')
|
||||
});
|
||||
};
|
||||
@@ -180,21 +176,15 @@ export default {
|
||||
};
|
||||
|
||||
const getIndVacation = (ind) => {
|
||||
// vacancySelect.value = ind
|
||||
// vacancySelect.value = !vacancySelect.value;
|
||||
console.log(vacancy.value[0], '-----------------');
|
||||
if (vacancySelect.value != ind) {
|
||||
|
||||
vacancySelect.value = ind
|
||||
vacancySelect.value = ind;
|
||||
vacancyDescription.value = vacancy.value.find((el) => el.id == ind);
|
||||
} else {
|
||||
vacancySelect.value = -1
|
||||
vacancySelect.value = -1;
|
||||
vacancyDescription.value = { name: "", department: { name: "" } };
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
getVacancies();
|
||||
|
||||
return {
|
||||
@@ -213,9 +203,8 @@ export default {
|
||||
padding-top: 8px;
|
||||
}
|
||||
|
||||
|
||||
.custom-active .v-card-title {
|
||||
color:#001e19;
|
||||
color: #001e19;
|
||||
}
|
||||
|
||||
.custom-active .v-card-text {
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
<template>
|
||||
<div>
|
||||
<v-card-text class="text-center">
|
||||
<span class="text-h4">Откликнуться на вакансию</span>
|
||||
</v-card-text>
|
||||
<form @submit.prevent="submit">
|
||||
|
||||
<v-text-field
|
||||
v-model="name.value.value"
|
||||
:counter="10"
|
||||
:error-messages="name.errorMessage.value"
|
||||
label="Name"
|
||||
></v-text-field>
|
||||
|
||||
<!-- <v-text-field
|
||||
v-model="phone.value.value"
|
||||
:counter="7"
|
||||
:error-messages="phone.errorMessage.value"
|
||||
label="Phone Number"
|
||||
></v-text-field> -->
|
||||
|
||||
<!-- <v-text-field
|
||||
v-model="email.value.value"
|
||||
:error-messages="email.errorMessage.value"
|
||||
label="E-mail"
|
||||
></v-text-field> -->
|
||||
|
||||
<!-- <v-btn class="me-4" type="submit"> submit </v-btn>
|
||||
|
||||
<v-btn @click="handleReset"> clear </v-btn> -->
|
||||
</form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { ref } from "vue";
|
||||
import { useField, useForm } from "vee-validate";
|
||||
import * as yup from "yup";
|
||||
|
||||
export default {
|
||||
setup() {
|
||||
const { handleSubmit, handleReset } = useForm({
|
||||
validationSchema: {
|
||||
name (value) {
|
||||
if (value?.length >= 2) return true
|
||||
|
||||
return 'Name needs to be at least 2 characters.'
|
||||
},
|
||||
phone (value) {
|
||||
if (value?.length > 9 && /[0-9-]+/.test(value)) return true
|
||||
|
||||
return 'Phone number needs to be at least 9 digits.'
|
||||
},
|
||||
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>
|
||||
|
||||
<style></style>
|
||||
@@ -135,7 +135,6 @@ export default {
|
||||
const getStructure = () => {
|
||||
axiosApiInstance.get("api/about_inspection/getstructure/").then((res) => {
|
||||
structures.value = res.data;
|
||||
console.log(structures.value);
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user