Merge branch 'dev-denzel' into cja_new
This commit is contained in:
commit
9a21d5bf20
7 files changed
+63
-49
No files matched your search
@@ -11,7 +11,7 @@
|
|||||||
<v-row class="flex-grow-0">
|
<v-row class="flex-grow-0">
|
||||||
<v-col class="d-flex flex-column ">
|
<v-col class="d-flex flex-column ">
|
||||||
<v-img
|
<v-img
|
||||||
:src="`${burl}${news.link}`"
|
:src="news.link ? `${burl}${news.link}` : defaultImage"
|
||||||
height="170px"
|
height="170px"
|
||||||
width="92%"
|
width="92%"
|
||||||
class="mx-auto"
|
class="mx-auto"
|
||||||
@@ -125,6 +125,7 @@ import { axiosApiInstance } from '@/utils/axios-api'
|
|||||||
import {splitname} from '@/utils/universal_functions'
|
import {splitname} from '@/utils/universal_functions'
|
||||||
import moment from 'moment'
|
import moment from 'moment'
|
||||||
import icoUser from '@/components/UI/fiousercard/icoUser.vue'
|
import icoUser from '@/components/UI/fiousercard/icoUser.vue'
|
||||||
|
import defaultImage from '@/assets/emblem.png'
|
||||||
|
|
||||||
const accountStore = useAccountStore()
|
const accountStore = useAccountStore()
|
||||||
|
|
||||||
@@ -179,7 +180,8 @@ export default {
|
|||||||
splitname,
|
splitname,
|
||||||
toggleIncrementLike,
|
toggleIncrementLike,
|
||||||
openOneImg,
|
openOneImg,
|
||||||
formatDate
|
formatDate,
|
||||||
|
defaultImage
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -35,6 +35,7 @@
|
|||||||
v-model="selectedDate"
|
v-model="selectedDate"
|
||||||
show-adjacent-months
|
show-adjacent-months
|
||||||
hide-header
|
hide-header
|
||||||
|
:min="new Date().toISOString().slice(0, 10)"
|
||||||
@update:modelValue="dateStart"
|
@update:modelValue="dateStart"
|
||||||
border
|
border
|
||||||
/>
|
/>
|
||||||
@@ -53,24 +54,21 @@ export default {
|
|||||||
props: {
|
props: {
|
||||||
datedefault: {
|
datedefault: {
|
||||||
type: Date,
|
type: Date,
|
||||||
default: ''
|
default: () => new Date()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
setup(props, {emit}) {
|
setup(props, {emit}) {
|
||||||
const appStore = useAppStore()
|
const appStore = useAppStore()
|
||||||
const maxdate = formatDash(new Date())
|
|
||||||
const menudate = ref(false)
|
const menudate = ref(false)
|
||||||
const selectedDate = ref(null)
|
const selectedDate = ref(props.datedefault ? formatDash(new Date(props.datedefault)) : formatDash(new Date()))
|
||||||
|
|
||||||
const dateStart = () => {
|
const dateStart = () => {
|
||||||
|
if (selectedDate.value) {
|
||||||
emit('returndate', selectedDate.value)
|
emit('returndate', selectedDate.value)
|
||||||
menudate.value=false
|
menudate.value = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
menudate,
|
menudate,
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<v-col class="flex-column d-flex">
|
<v-col class="flex-column d-flex">
|
||||||
<v-row class="flex-grow-0">
|
<v-row class="flex-grow-0">
|
||||||
<v-col class="pb-0 pr-0">
|
<v-col class="pb-0 pr-0">
|
||||||
<v-card height="350px" class="rounded-b-0">
|
<v-card class="rounded-b-0">
|
||||||
<v-card-title class="pt-0 pb-1 flex-column d-flex">
|
<v-card-title class="pt-0 pb-1 flex-column d-flex">
|
||||||
<v-row>
|
<v-row>
|
||||||
<v-col lg="9" class="pt-4">
|
<v-col lg="9" class="pt-4">
|
||||||
@@ -58,11 +58,11 @@
|
|||||||
|
|
||||||
<!-- -->
|
<!-- -->
|
||||||
<v-img
|
<v-img
|
||||||
:src="`${burl}${newsFull.link}`"
|
:src="newsFull.link ? `${burl}${newsFull.link}` : defaultImage"
|
||||||
height="450px"
|
height="450px"
|
||||||
width="96%"
|
width="96%"
|
||||||
class="mx-auto"
|
class="mx-auto"
|
||||||
cover
|
contain
|
||||||
@click="openOneImg(newsFull.link)"
|
@click="openOneImg(newsFull.link)"
|
||||||
/>
|
/>
|
||||||
</v-card>
|
</v-card>
|
||||||
@@ -446,6 +446,7 @@ import { spravURL } from "@/utils/axios-api";
|
|||||||
import { useAccountStore } from "@/store/AccountStore";
|
import { useAccountStore } from "@/store/AccountStore";
|
||||||
import { format } from "date-fns";
|
import { format } from "date-fns";
|
||||||
import icoUser from "@/components/UI/fiousercard/icoUser.vue";
|
import icoUser from "@/components/UI/fiousercard/icoUser.vue";
|
||||||
|
import defaultImage from '@/assets/emblem.png';
|
||||||
|
|
||||||
const accountStore = useAccountStore();
|
const accountStore = useAccountStore();
|
||||||
|
|
||||||
@@ -586,6 +587,7 @@ export default {
|
|||||||
spravURL,
|
spravURL,
|
||||||
splitname,
|
splitname,
|
||||||
accountStore,
|
accountStore,
|
||||||
|
defaultImage,
|
||||||
formatText,
|
formatText,
|
||||||
dateformat,
|
dateformat,
|
||||||
textcomment,
|
textcomment,
|
||||||
|
|||||||
@@ -180,12 +180,18 @@ export default {
|
|||||||
setup(props, { emit }) {
|
setup(props, { emit }) {
|
||||||
const selectedEmployees = ref([]);
|
const selectedEmployees = ref([]);
|
||||||
const publishNews = ref(false);
|
const publishNews = ref(false);
|
||||||
const defaultEndDate = new Date();
|
|
||||||
defaultEndDate.setHours(18, 0, 0, 0);
|
// Устанавливаем начальные даты
|
||||||
const defaultStartDate = new Date();
|
const currentDate = new Date();
|
||||||
|
const defaultStartDate = new Date(currentDate);
|
||||||
defaultStartDate.setHours(9, 0, 0, 0);
|
defaultStartDate.setHours(9, 0, 0, 0);
|
||||||
const completionDate = ref(defaultEndDate);
|
|
||||||
|
const defaultEndDate = new Date(currentDate);
|
||||||
|
defaultEndDate.setHours(18, 0, 0, 0);
|
||||||
|
|
||||||
const startDate = ref(defaultStartDate);
|
const startDate = ref(defaultStartDate);
|
||||||
|
const completionDate = ref(defaultEndDate);
|
||||||
|
|
||||||
const snackbar = ref({
|
const snackbar = ref({
|
||||||
show: false,
|
show: false,
|
||||||
text: '',
|
text: '',
|
||||||
@@ -205,40 +211,24 @@ export default {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const handleDateChange = (date, type = 'end') => {
|
const handleDateChange = (date, type = 'end') => {
|
||||||
if (date) {
|
if (!date) return;
|
||||||
|
|
||||||
const newDate = new Date(date);
|
const newDate = new Date(date);
|
||||||
if (type === 'end') {
|
if (type === 'end') {
|
||||||
newDate.setHours(18, 0, 0, 0);
|
newDate.setHours(18, 0, 0, 0);
|
||||||
|
completionDate.value = newDate;
|
||||||
|
|
||||||
|
if (startDate.value && newDate < startDate.value) {
|
||||||
|
startDate.value = newDate;
|
||||||
|
startDate.value.setHours(9, 0, 0, 0);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
newDate.setHours(9, 0, 0, 0);
|
newDate.setHours(9, 0, 0, 0);
|
||||||
}
|
|
||||||
|
|
||||||
const today = new Date();
|
|
||||||
today.setHours(0, 0, 0, 0);
|
|
||||||
if (newDate < today) {
|
|
||||||
showSnackbar('Нельзя назначить прошедшую дату');
|
|
||||||
if (type === 'end') {
|
|
||||||
completionDate.value = null;
|
|
||||||
} else {
|
|
||||||
startDate.value = null;
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (type === 'end') {
|
|
||||||
if (startDate.value && newDate < startDate.value) {
|
|
||||||
showSnackbar('Дата окончания не может быть раньше даты начала');
|
|
||||||
completionDate.value = null;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
completionDate.value = newDate;
|
|
||||||
} else {
|
|
||||||
if (completionDate.value && newDate > completionDate.value) {
|
|
||||||
showSnackbar('Дата начала не может быть позже даты окончания');
|
|
||||||
startDate.value = null;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
startDate.value = newDate;
|
startDate.value = newDate;
|
||||||
|
|
||||||
|
if (completionDate.value && newDate > completionDate.value) {
|
||||||
|
completionDate.value = newDate;
|
||||||
|
completionDate.value.setHours(18, 0, 0, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -9,6 +9,14 @@
|
|||||||
{ 'border-b-thin': !isDialog, 'pa-0': isDialog }
|
{ 'border-b-thin': !isDialog, 'pa-0': isDialog }
|
||||||
]">
|
]">
|
||||||
<div class="test-info">
|
<div class="test-info">
|
||||||
|
<div class="d-flex justify-center mb-4">
|
||||||
|
<v-img
|
||||||
|
:src="data?.file || defaultImage"
|
||||||
|
class="rounded-lg"
|
||||||
|
max-height="200"
|
||||||
|
contain
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
<div class="text-body-1 mb-4" v-html="formatDescription(data?.description)"></div>
|
<div class="text-body-1 mb-4" v-html="formatDescription(data?.description)"></div>
|
||||||
|
|
||||||
<div class="d-flex align-center mb-3">
|
<div class="d-flex align-center mb-3">
|
||||||
@@ -58,6 +66,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import { computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
|
import defaultImage from '@/assets/emblem.png';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
@@ -115,7 +124,8 @@ export default {
|
|||||||
isExamMode,
|
isExamMode,
|
||||||
timeWordDeclension,
|
timeWordDeclension,
|
||||||
formatDescription,
|
formatDescription,
|
||||||
formatTime
|
formatTime,
|
||||||
|
defaultImage
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -7,11 +7,11 @@
|
|||||||
Вопрос {{ currentQuestion + 1 }} из {{ totalQuestions }}
|
Вопрос {{ currentQuestion + 1 }} из {{ totalQuestions }}
|
||||||
</v-card-title>
|
</v-card-title>
|
||||||
<h3 class="mb-2 px-4">{{ question.name }}</h3>
|
<h3 class="mb-2 px-4">{{ question.name }}</h3>
|
||||||
<v-card-text style="overflow-y: scroll">
|
<v-card-text>
|
||||||
<v-img
|
<v-img
|
||||||
v-if="question.file"
|
v-if="question.file"
|
||||||
:src="`http://127.0.0.1:8000${question.file}`"
|
:src="`http://127.0.0.1:8000${question.file}`"
|
||||||
class="w-50 mx-auto"
|
class="w-50 mx-auto mb-4"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- Одиночный выбор -->
|
<!-- Одиночный выбор -->
|
||||||
@@ -145,6 +145,11 @@ export default {
|
|||||||
padding: 16px !important;
|
padding: 16px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.v-card-text {
|
||||||
|
max-height: 550px;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
|
||||||
.v-radio-group :deep(.v-radio),
|
.v-radio-group :deep(.v-radio),
|
||||||
.v-checkbox {
|
.v-checkbox {
|
||||||
margin-bottom: 12px;
|
margin-bottom: 12px;
|
||||||
@@ -186,4 +191,9 @@ export default {
|
|||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.v-img {
|
||||||
|
max-width: 100% !important;
|
||||||
|
height: auto !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -349,6 +349,7 @@ export default {
|
|||||||
const testImage = ref(null);
|
const testImage = ref(null);
|
||||||
const imagePreview = ref(null);
|
const imagePreview = ref(null);
|
||||||
const selectedEmployees = ref([]);
|
const selectedEmployees = ref([]);
|
||||||
|
const imageError = ref('');
|
||||||
|
|
||||||
const rules = {
|
const rules = {
|
||||||
required: (value) => !!value || 'Это поле обязательно для заполнения',
|
required: (value) => !!value || 'Это поле обязательно для заполнения',
|
||||||
@@ -688,7 +689,8 @@ export default {
|
|||||||
getImagePreviewUrl,
|
getImagePreviewUrl,
|
||||||
actualQuestionCount,
|
actualQuestionCount,
|
||||||
actualTestQuestionCount,
|
actualTestQuestionCount,
|
||||||
isTest: props.isTest
|
isTest: props.isTest,
|
||||||
|
imageError
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in new issue
Block a user