From 869264bd66da33aef94f10ea41bd79689bf784bc Mon Sep 17 00:00:00 2001 From: Denzel Date: Fri, 28 Feb 2025 09:54:47 +0300 Subject: [PATCH] =?UTF-8?q?refactor=20[P-36]:=20=D0=B4=D0=B5=D0=BA=D0=BE?= =?UTF-8?q?=D0=BC=D0=BF=D0=BE=D0=B7=D0=B8=D1=86=D0=B8=D1=8F=20=D0=BA=D0=BE?= =?UTF-8?q?=D0=BD=D1=81=D1=82=D1=80=D1=83=D0=BA=D1=82=D0=BE=D1=80=D0=B0=20?= =?UTF-8?q?+=20=D0=B0=D0=B4=D0=B0=D0=BF=D1=82=D0=B0=D1=86=D0=B8=D1=8F=20?= =?UTF-8?q?=D0=BF=D0=BE=D0=B4=20=D1=81=D0=BE=D0=B7=D0=B4=D0=B0=D0=BD=D0=B8?= =?UTF-8?q?=D1=8F=20=D1=82=D0=B5=D1=81=D1=82=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .git-hooks/{pre-commit => pre-commit2} | 0 docker/entries/backend-entrypoint.sh | 22 +- .../theme/components/TestRunner.vue | 181 -------- docs/.vitepress/theme/index.js | 19 - docs/README.md | 3 - docs/index.md | 27 -- docs/src/components/CountDown.md | 16 - .../components/UI/aboutportal/line-chart.md | 75 ---- .../components/UI/fiousercard/infoUserCard.md | 22 - .../UI_calendar/timeSelect.md | 25 -- docs/src/components/carousel-list.md | 18 - docs/src/components/carousel-numbers.md | 28 -- docs/src/components/vote/VoteAdmin.md | 25 -- docs/src/components/vote/VoteCard.md | 22 - docs/src/components/vote/VoteForm.md | 25 -- docs/tests.md | 7 - documentation/docs/.vitepress/config.mjs | 34 ++ .../src/components/vote/VoteConstructor.md | 4 +- .../vote/ConstructorVote/AnswerList.vue | 98 ++++ .../vote/ConstructorVote/CreatedVote.vue | 13 + .../vote/ConstructorVote/MainInfo.vue | 171 +++++++ .../vote/ConstructorVote/NewQuestion.vue | 127 ++++++ .../vote/ConstructorVote/QuestionHeader.vue | 59 +++ .../vote/ConstructorVote/QuestionItem.vue | 266 +++++++++++ .../vote/ConstructorVote/QuestionSettings.vue | 63 +++ .../src/components/vote/VoteConstructor.vue | 423 ++---------------- src/front/src/views/TestHomePage.vue | 26 +- 27 files changed, 889 insertions(+), 910 deletions(-) rename .git-hooks/{pre-commit => pre-commit2} (100%) delete mode 100644 docs/.vitepress/theme/components/TestRunner.vue delete mode 100644 docs/.vitepress/theme/index.js delete mode 100644 docs/README.md delete mode 100644 docs/index.md delete mode 100644 docs/src/components/CountDown.md delete mode 100644 docs/src/components/UI/aboutportal/line-chart.md delete mode 100644 docs/src/components/UI/fiousercard/infoUserCard.md delete mode 100644 docs/src/components/calendar_of_events/UI_calendar/timeSelect.md delete mode 100644 docs/src/components/carousel-list.md delete mode 100644 docs/src/components/carousel-numbers.md delete mode 100644 docs/src/components/vote/VoteAdmin.md delete mode 100644 docs/src/components/vote/VoteCard.md delete mode 100644 docs/src/components/vote/VoteForm.md delete mode 100644 docs/tests.md create mode 100644 src/front/src/components/vote/ConstructorVote/AnswerList.vue create mode 100644 src/front/src/components/vote/ConstructorVote/CreatedVote.vue create mode 100644 src/front/src/components/vote/ConstructorVote/MainInfo.vue create mode 100644 src/front/src/components/vote/ConstructorVote/NewQuestion.vue create mode 100644 src/front/src/components/vote/ConstructorVote/QuestionHeader.vue create mode 100644 src/front/src/components/vote/ConstructorVote/QuestionItem.vue create mode 100644 src/front/src/components/vote/ConstructorVote/QuestionSettings.vue diff --git a/.git-hooks/pre-commit b/.git-hooks/pre-commit2 similarity index 100% rename from .git-hooks/pre-commit rename to .git-hooks/pre-commit2 diff --git a/docker/entries/backend-entrypoint.sh b/docker/entries/backend-entrypoint.sh index 48b35a12f..3d294a183 100644 --- a/docker/entries/backend-entrypoint.sh +++ b/docker/entries/backend-entrypoint.sh @@ -5,17 +5,17 @@ do echo "Жду запуска сервера..." done -until python manage.py makemigrations -do - echo "Создаю миграции..." -done - - -until python manage.py migrate -do - echo "Применяю при необходимости..." - sleep 2 -done +#until python manage.py makemigrations +#do +# echo "Создаю миграции..." +#done +# +# +#until python manage.py migrate +#do +# echo "Применяю при необходимости..." +# sleep 2 +#done python manage.py runserver 0.0.0.0:$BACKEND_INTERNAL_PORT diff --git a/docs/.vitepress/theme/components/TestRunner.vue b/docs/.vitepress/theme/components/TestRunner.vue deleted file mode 100644 index da702d4ec..000000000 --- a/docs/.vitepress/theme/components/TestRunner.vue +++ /dev/null @@ -1,181 +0,0 @@ - - - - - diff --git a/docs/.vitepress/theme/index.js b/docs/.vitepress/theme/index.js deleted file mode 100644 index 66163ce60..000000000 --- a/docs/.vitepress/theme/index.js +++ /dev/null @@ -1,19 +0,0 @@ -import DefaultTheme from 'vitepress/theme'; -import { withMermaid } from 'vitepress-plugin-mermaid'; -import TestRunner from './components/TestRunner.vue'; - -export default withMermaid({ - ...DefaultTheme, - themeConfig: { - search: { - provider: 'local', - }, - }, - mermaid: {}, - mermaidPlugin: { - class: 'mermaid my-class', - }, - enhanceApp({ app }) { - app.component('TestRunner', TestRunner); - }, -}); diff --git a/docs/README.md b/docs/README.md deleted file mode 100644 index 8ce466674..000000000 --- a/docs/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Документация - -⚠️ Оригинальный README.md не найден. \ No newline at end of file diff --git a/docs/index.md b/docs/index.md deleted file mode 100644 index fcde745f3..000000000 --- a/docs/index.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -# https://vitepress.dev/reference/default-theme-home-page -layout: home - -hero: - name: "Портал" - text: "Документация по порталу" - actions: - - theme: brand - text: Документация - link: /README - -features: - - title: Инструкция - details: Подробная инструкция по установке - link: /guides/install - - title: Инструкция по ведению и заполнению - details: Подробная инструкция по ведению и заполнению - link: /guides/usage - - title: Правила коммитов - details: Подробная инструкция по наименованию коммитов - link: /guides/commits - - title: Тестирование проекта - details: Запуск автотестов - link: /tests ---- - diff --git a/docs/src/components/CountDown.md b/docs/src/components/CountDown.md deleted file mode 100644 index 78e47c772..000000000 --- a/docs/src/components/CountDown.md +++ /dev/null @@ -1,16 +0,0 @@ -# CountDown - -Описание отсутствует. - -## Пример использования - -```vue -import CountDown from '@/components/components/CountDown'; -``` - -```vue - -``` - ---- -> Документация сгенерирована автоматически. diff --git a/docs/src/components/UI/aboutportal/line-chart.md b/docs/src/components/UI/aboutportal/line-chart.md deleted file mode 100644 index a2c098c6a..000000000 --- a/docs/src/components/UI/aboutportal/line-chart.md +++ /dev/null @@ -1,75 +0,0 @@ -# line-chart - -## Описание пропсов - -| Пропс | Тип | Значение по умолчанию | Комментарий | -|-------|-----|-----------------------|-------------| -| `dataLineChart` | `Object` | `() => {` | нет комментария | -| `period` | `Object` | `() => {` | нет комментария | -| `filter` | `String` | `'d'` | нет комментария | -## Описание переменных - -| Переменная | Значение | Описание | -|------------|----------|----------| -| `baseunic` |
unicperson(fullper.value.filter(e
=> new Date(e.visitdate)
>moment(new
Date(date)).subtract(between.value*2,
'd') && new Date(e.visitdate)
<= moment(new
Date(date)).subtract(between.value,
'd')))
- let crrunic =
unicperson(fullper.value.filter(e
=> new Date(e.visitdate)
>moment(new
Date(date)).subtract(between.value,
'd') && new Date(e.visitdate)
<= new Date(date)))
- let bothuser = new
Set([...baseunic].filter(element
=> crrunic.has(element)))
-
- if (date
==formatDash(filterStore.date_period.enddate))
{
-
editCRR(bothuser.size*100/baseunic.size)
- }
-
- return baseunic.size
==0?0:bothuser.size*100/baseunic.size
- }
- - const editCRR = (val) =>
{
-
- emit('getCRR', val)
- }
-
- const unicperson = (arr)
=> {
-
- let arrnew =[]
- arr.forEach(e =>
arrnew.push(...e.user) )
- return new Set(arrnew)
- }
- - const data=computed({get()
{
-
- return
JSON.parse(JSON.stringify(dataf.value))
- }
- })
- const linear=ref(null)
- - - - const options = {
- - plugins: {
-
- datalabels: {
- color: 'grey',
- align: 'top',
- display:
'auto'
- },
- legend: {
- onHover:
(event, chartElement) => {
-
event.native.target.style.cursor
='pointer'
|
Расчет значения crr, и передача в
родительский компонент значения, на
последнюю дату в периоде для
компонента card-total
- @constructor
- @param {object} date - по
каждому дню, в указанном периоде
(пример - 2024-03-22)
- @description Для расчетного
периода с 04
| - - - -## Пример использования - -```vue -import line-chart from '@/components/components/UI/aboutportal/line-chart'; -``` - -```vue - -``` - ---- -> Документация сгенерирована автоматически. diff --git a/docs/src/components/UI/fiousercard/infoUserCard.md b/docs/src/components/UI/fiousercard/infoUserCard.md deleted file mode 100644 index 7b2aca862..000000000 --- a/docs/src/components/UI/fiousercard/infoUserCard.md +++ /dev/null @@ -1,22 +0,0 @@ -# infoUserCard - -## Описание пропсов - -| Пропс | Тип | Значение по умолчанию | Комментарий | -|-------|-----|-----------------------|-------------| -| `opendialog` | `Boolean` | `false` | нет комментария | -| `author` | `Object` | `{` | нет комментария | - - -## Пример использования - -```vue -import infoUserCard from '@/components/components\UI\fiousercard\infoUserCard'; -``` - -```vue - -``` - ---- -> Документация сгенерирована автоматически. diff --git a/docs/src/components/calendar_of_events/UI_calendar/timeSelect.md b/docs/src/components/calendar_of_events/UI_calendar/timeSelect.md deleted file mode 100644 index e2a58cbb8..000000000 --- a/docs/src/components/calendar_of_events/UI_calendar/timeSelect.md +++ /dev/null @@ -1,25 +0,0 @@ -# timeSelect - -## Описание пропсов - -| Пропс | Тип | Значение по умолчанию | Комментарий | -|-------|-----|-----------------------|-------------| -| `dateEvent` | `String` | `""` | нет комментария | -| `limitation` | `String` | `""` | нет комментария | -| `order` | `Array` | `[0` | нет комментария | -| `chek` | `Boolean` | `false` | нет комментария | -| `rule` | `Number` | `-1` | нет комментария | - - -## Пример использования - -```vue -import timeSelect from '@/components/components/calendar_of_events/UI_calendar/timeSelect'; -``` - -```vue - -``` - ---- -> Документация сгенерирована автоматически. diff --git a/docs/src/components/carousel-list.md b/docs/src/components/carousel-list.md deleted file mode 100644 index 0b6339507..000000000 --- a/docs/src/components/carousel-list.md +++ /dev/null @@ -1,18 +0,0 @@ -# carousel-list - -### currentslide=currentslide -``` - ---- -> Документация сгенерирована автоматически. diff --git a/docs/src/components/carousel-numbers.md b/docs/src/components/carousel-numbers.md deleted file mode 100644 index 6e2379c15..000000000 --- a/docs/src/components/carousel-numbers.md +++ /dev/null @@ -1,28 +0,0 @@ -# carousel-numbers - -### - -## Описание пропсов - -| Пропс | Тип | Значение по умолчанию | Комментарий | -|-------|-----|-----------------------|-------------| -| `digitalData` | `Object` | `{` | нет комментария | - - -## Пример использования - -```vue -import carousel-numbers from '@/components/components/carousel-numbers'; -``` - -```vue - -``` - ---- -> Документация сгенерирована автоматически. diff --git a/docs/src/components/vote/VoteAdmin.md b/docs/src/components/vote/VoteAdmin.md deleted file mode 100644 index 48cced183..000000000 --- a/docs/src/components/vote/VoteAdmin.md +++ /dev/null @@ -1,25 +0,0 @@ -# VoteAdmin - -### Голосование - -## Описание пропсов - -| Пропс | Тип | Значение по умолчанию | Комментарий | -|-------|-----|-----------------------|-------------| -| `usersvotedbest` | `Array` | `()=>[]` | нет комментария | -| `uservotedthanks` | `Array` | `()=>[]` | нет комментария | -| `all_cod` | `Array` | `()=>[]` | нет комментария | - - -## Пример использования - -```vue -import VoteAdmin from '@/components/components\vote\VoteAdmin'; -``` - -```vue - -``` - ---- -> Документация сгенерирована автоматически. diff --git a/docs/src/components/vote/VoteCard.md b/docs/src/components/vote/VoteCard.md deleted file mode 100644 index 2bbed2a23..000000000 --- a/docs/src/components/vote/VoteCard.md +++ /dev/null @@ -1,22 +0,0 @@ -# VoteCard - -## Описание пропсов - -| Пропс | Тип | Значение по умолчанию | Комментарий | -|-------|-----|-----------------------|-------------| -| `isFinished` | `Boolean` | `false` | нет комментария | -| `voteCard` | `Object` | `() => {` | нет комментария | - - -## Пример использования - -```vue -import VoteCard from '@/components/components\vote\VoteCard'; -``` - -```vue - -``` - ---- -> Документация сгенерирована автоматически. diff --git a/docs/src/components/vote/VoteForm.md b/docs/src/components/vote/VoteForm.md deleted file mode 100644 index 118b7dedb..000000000 --- a/docs/src/components/vote/VoteForm.md +++ /dev/null @@ -1,25 +0,0 @@ -# VoteForm - -### Форма голосования - -## Описание пропсов - -| Пропс | Тип | Значение по умолчанию | Комментарий | -|-------|-----|-----------------------|-------------| -| `type_fetch` | `String` | `'best'` | нет комментария | -| `persons` | `Array` | `() => []` | нет комментария | -| `myrealdep` | `Object` | `() => {` | нет комментария | - - -## Пример использования - -```vue -import VoteForm from '@/components/components\vote\VoteForm'; -``` - -```vue - -``` - ---- -> Документация сгенерирована автоматически. diff --git a/docs/tests.md b/docs/tests.md deleted file mode 100644 index e939aff79..000000000 --- a/docs/tests.md +++ /dev/null @@ -1,7 +0,0 @@ - - # Тестирование - - - - - \ No newline at end of file diff --git a/documentation/docs/.vitepress/config.mjs b/documentation/docs/.vitepress/config.mjs index 4753a892d..8acc801d7 100644 --- a/documentation/docs/.vitepress/config.mjs +++ b/documentation/docs/.vitepress/config.mjs @@ -418,6 +418,40 @@ export default withMermaid({ "text": "vote", "collapsed": true, "items": [ + { + "text": "ConstructorVote", + "collapsed": true, + "items": [ + { + "text": "AnswerList", + "link": "/src/components/vote/ConstructorVote/AnswerList" + }, + { + "text": "CreatedVote", + "link": "/src/components/vote/ConstructorVote/CreatedVote" + }, + { + "text": "MainInfo", + "link": "/src/components/vote/ConstructorVote/MainInfo" + }, + { + "text": "NewQuestion", + "link": "/src/components/vote/ConstructorVote/NewQuestion" + }, + { + "text": "QuestionHeader", + "link": "/src/components/vote/ConstructorVote/QuestionHeader" + }, + { + "text": "QuestionItem", + "link": "/src/components/vote/ConstructorVote/QuestionItem" + }, + { + "text": "QuestionSettings", + "link": "/src/components/vote/ConstructorVote/QuestionSettings" + } + ] + }, { "text": "CurrentVote", "link": "/src/components/vote/CurrentVote" diff --git a/documentation/docs/src/components/vote/VoteConstructor.md b/documentation/docs/src/components/vote/VoteConstructor.md index f18edf288..799bfb05a 100644 --- a/documentation/docs/src/components/vote/VoteConstructor.md +++ b/documentation/docs/src/components/vote/VoteConstructor.md @@ -1,6 +1,8 @@ # VoteConstructor -Описание отсутствует. +### Основная информация + + ## Пример использования diff --git a/src/front/src/components/vote/ConstructorVote/AnswerList.vue b/src/front/src/components/vote/ConstructorVote/AnswerList.vue new file mode 100644 index 000000000..43225bda4 --- /dev/null +++ b/src/front/src/components/vote/ConstructorVote/AnswerList.vue @@ -0,0 +1,98 @@ + + + diff --git a/src/front/src/components/vote/ConstructorVote/CreatedVote.vue b/src/front/src/components/vote/ConstructorVote/CreatedVote.vue new file mode 100644 index 000000000..5c7b7295b --- /dev/null +++ b/src/front/src/components/vote/ConstructorVote/CreatedVote.vue @@ -0,0 +1,13 @@ + + diff --git a/src/front/src/components/vote/ConstructorVote/MainInfo.vue b/src/front/src/components/vote/ConstructorVote/MainInfo.vue new file mode 100644 index 000000000..dc2af910e --- /dev/null +++ b/src/front/src/components/vote/ConstructorVote/MainInfo.vue @@ -0,0 +1,171 @@ + + + + + diff --git a/src/front/src/components/vote/ConstructorVote/NewQuestion.vue b/src/front/src/components/vote/ConstructorVote/NewQuestion.vue new file mode 100644 index 000000000..2b09eb100 --- /dev/null +++ b/src/front/src/components/vote/ConstructorVote/NewQuestion.vue @@ -0,0 +1,127 @@ + + + diff --git a/src/front/src/components/vote/ConstructorVote/QuestionHeader.vue b/src/front/src/components/vote/ConstructorVote/QuestionHeader.vue new file mode 100644 index 000000000..862b4a95c --- /dev/null +++ b/src/front/src/components/vote/ConstructorVote/QuestionHeader.vue @@ -0,0 +1,59 @@ + + + diff --git a/src/front/src/components/vote/ConstructorVote/QuestionItem.vue b/src/front/src/components/vote/ConstructorVote/QuestionItem.vue new file mode 100644 index 000000000..74c13a14d --- /dev/null +++ b/src/front/src/components/vote/ConstructorVote/QuestionItem.vue @@ -0,0 +1,266 @@ + + + diff --git a/src/front/src/components/vote/ConstructorVote/QuestionSettings.vue b/src/front/src/components/vote/ConstructorVote/QuestionSettings.vue new file mode 100644 index 000000000..9f3087231 --- /dev/null +++ b/src/front/src/components/vote/ConstructorVote/QuestionSettings.vue @@ -0,0 +1,63 @@ + + + + + diff --git a/src/front/src/components/vote/VoteConstructor.vue b/src/front/src/components/vote/VoteConstructor.vue index d977d4fd2..d65f6b2f0 100644 --- a/src/front/src/components/vote/VoteConstructor.vue +++ b/src/front/src/components/vote/VoteConstructor.vue @@ -1,21 +1,13 @@ @@ -54,9 +57,11 @@ import { axiosApiInstance } from '@/utils/axios-api'; import { computed, ref, watch } from 'vue'; import { useRouter } from 'vue-router'; +import VoteConstructor from '@/components/vote/VoteConstructor.vue'; export default { components: { + VoteConstructor, CatalogTest, }, setup() { @@ -92,6 +97,7 @@ export default { { value: 0, title: `Назначенные (${currentTest.value})` }, { value: 1, title: 'Завершенные' }, { value: 2, title: 'Каталог' }, + { value: 3, title: 'Создать новый тест' }, ]); const goToTest = (id) => router.push(`/test/testdetail/${id}`);