From a5cf33553bac30750dc6af4927ef5ae9e2475952 Mon Sep 17 00:00:00 2001 From: iriska-gri <79623434+iriska-gri@users.noreply.github.com> Date: Mon, 9 Oct 2023 17:00:12 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9A=D0=BE=D0=BC=D0=BC=D0=B5=D1=82=D0=BD?= =?UTF-8?q?=D0=B0=D1=80=D0=B8=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db.sqlite3 | Bin 323584 -> 323584 bytes front/package-lock.json | 14 ++ front/package.json | 1 + front/src/components/UI/Calendar-full.vue | 22 ++-- front/src/components/news-list.vue | 139 ++++++++++++++------ front/src/layouts/default/DefaultPortal.vue | 48 +++---- front/src/main.js | 5 +- front/src/views/AboutPortalPage.vue | 12 +- front/src/views/HomePage.vue | 3 +- navigation/views.py | 6 +- 10 files changed, 163 insertions(+), 87 deletions(-) diff --git a/db.sqlite3 b/db.sqlite3 index 746f01cb4e6a0c6a5125b7d13a8f75f85303a491..4e03a9708b1d27a1cb023dd77e8847ede0c5b16c 100644 GIT binary patch delta 972 zcmZ9~PiWI{6bJD9`K_}}($}>`N10Fr5oO7K=|9_w!lK}5Cl6jkt!p=jZIQOHU8L25 zRj6nkE+;_`DhjfVQEIJj3KIt+q{@&f;y^EgH*b2-U!s-#)20)u0Gl-1SU$Y0fznx?QVP2pB=v#j24aK~77Ne$ja+`c1o8{7z6 zuZ7pSR(PGC*fY9ily!!1C@ia3#)%+KBtwa07%L$a<46>Ca1Mq%!rC8+CnNEs8dG8+ zH5O6z_rLgEBf@va_e=$cx#hh%jNTNA1_#@gtQ=rUTnl^Lk zvK=M2X_O59M=gRvvy(JRvh77lqD?ZenPuyXSpVi(TuZZRL#?IJtZR9Jjt!=B04*(TxC2k z&A>hQ3?HEjuiyo&KpU3eAzX$koP%k22S0k%!ne=~*a}~nLGY9A1s~}mcu9BYcjnRI zLjxYfFwB6&lP*9X&$1A3!5mprVc-jVf(OumI{bvU@ETsibLc=5=HVh#V53(pynrSw i+HY>LPA+ptpMHM@9rSxSYX@iT;5fuP*}&ar2>%9P96Qbc delta 457 zcmZXNF=!J}0EXXt_l#WLUH&!~Y?UaXOB*HEcX_!s4P?man#sXMu`XS@bjwt@Qm_cx zT1)!|L7G8DMOrEGkb;e%D2kw!BDE9?icoM6oJxn9WOe!YfB5;oaL)<%oZF|^iC^>S zpv7mS?{cw|y;Z}f+RO6Pbl}beE{y`0y{=QHkAGs9DO>Y0_c$wE)PJ^_OU)Uz#Uiz3 zjGe8R6>8>XUgbQQlYYi4l%!wseRrf-RH}$R79*rW>3IM2@}wCB2gV`QWx<~_mC{YY zv-*t1<4ig2(%&^yDh#{QACZMT29q(OuUS0D&vnO0bjRWo3+_H~P$PJVAK1lbe83xQ z;04z36m{IiBIa-d)0jjJU$Gy_WquX=12.0.0" } }, + "node_modules/bezier-easing": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/bezier-easing/-/bezier-easing-2.1.0.tgz", + "integrity": "sha512-gbIqZ/eslnUFC1tjEvtz0sgx+xTK20wDnYMIA27VA04R7w6xxXQPZDbibjA9DTWZRA2CXtwHykkVzlCaAJAZig==" + }, "node_modules/big-integer": { "version": "1.6.51", "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.51.tgz", @@ -12970,6 +12976,14 @@ "vue": "^3.2.0" } }, + "node_modules/vue-scrollto": { + "version": "2.20.0", + "resolved": "https://registry.npmjs.org/vue-scrollto/-/vue-scrollto-2.20.0.tgz", + "integrity": "sha512-7i+AGKJTThZnMEkhIPgrZjyAX+fXV7/rGdg+CV283uZZwCxwiMXaBLTmIc5RTA4uwGnT+E6eJle3mXQfM2OD3A==", + "dependencies": { + "bezier-easing": "2.1.0" + } + }, "node_modules/vue3-autocounter": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/vue3-autocounter/-/vue3-autocounter-1.0.6.tgz", diff --git a/front/package.json b/front/package.json index f33cf75f7..b636231d3 100644 --- a/front/package.json +++ b/front/package.json @@ -27,6 +27,7 @@ "vue": "^3.2.0", "vue-jwt-decode": "^0.1.0", "vue-router": "^4.0.0", + "vue-scrollto": "^2.20.0", "vue3-autocounter": "^1.0.6", "vuelidate": "^0.7.7", "vuetify": "^3.0.0", diff --git a/front/src/components/UI/Calendar-full.vue b/front/src/components/UI/Calendar-full.vue index 2857b8862..220e0b908 100644 --- a/front/src/components/UI/Calendar-full.vue +++ b/front/src/components/UI/Calendar-full.vue @@ -69,15 +69,15 @@ export default { } , - eventRender: function(eventObj, $el) { - $el.popover({ - title: eventObj.title, - content: eventObj.description, - trigger: 'hover', - placement: 'top', - container: 'body' - }); - }, + // eventRender: function(eventObj, $el) { + // $el.popover({ + // title: eventObj.title, + // content: eventObj.description, + // trigger: 'hover', + // placement: 'top', + // container: 'body' + // }); + // }, // eventDidMount: function(info) { @@ -120,7 +120,7 @@ export default { data.data[x].map(e=>{ let d = new Date(e.planned_date) - // console.log(, 'e---------d.addDays(e.count_days)--------e') + calendarOptions.events.push({ description: 'description for All Day Event', title: x, start: e.planned_date, end: new Date(d.setDate(d.getDate() + e.count_days)).toISOString().split('T')[0]}) } @@ -128,7 +128,7 @@ export default { ) } - console.log(data.data , 'genvacation--------------------'); + }) } diff --git a/front/src/components/news-list.vue b/front/src/components/news-list.vue index 344ad8bbc..2a9c892d1 100644 --- a/front/src/components/news-list.vue +++ b/front/src/components/news-list.vue @@ -3,15 +3,18 @@ + @@ -26,22 +29,52 @@ :src="`${burl}${x.link}`" height="164px" cover - width="96%" + width="92%" + class="mx-auto" /> + + + + - - + {{limitText(x.text)}} + + + Подробнее + + + + - + + + + + @@ -49,8 +82,7 @@ + :image=accountStore.user.photo> {{x.author.fio}} @@ -101,28 +133,37 @@
+ + + + - {{ splitname(y.author) }} - - {{dateformat(y.cdate)}} - + {{ splitname(y.author) }} + + {{dateformat(y.cdate)}} + + +
+ + + - - + + + + + + +
@@ -154,6 +203,7 @@
+ + @@ -207,6 +258,7 @@ import myHelper from './UI/my-helper.vue' import { axiosApiInstance } from '@/utils/axios-api' import { format } from 'date-fns' + const accountStore = useAccountStore() export default { @@ -219,7 +271,6 @@ export default { } }, - setup(props){ const newss=ref([]) const dialogCommentShow = ref(false) @@ -238,6 +289,10 @@ export default { return format(new Date(datas), 'dd.MM.yyyy HH:mm') } + const newses =() => { + + } + const openComent = (news) => { dialogCommentShow.value=!dialogCommentShow.value idnews.value = news @@ -245,19 +300,19 @@ export default { } + + const addComment = () => { axiosApiInstance.post(`api/navigation/news/`, {news: idnews.value, text: textcomment.value}).then(result => { dialogCommentShow.value=!dialogCommentShow.value newss.value[newss.value.findIndex(e=> e.id==result.data['news'])].comment = result.data.comment - console.log(result.data, 'result.data-----------------') + }) } const limitText=(text)=> { const t = text.split(' ').slice(0, 25) - console.log(text.split(' ').slice(0, 25).join(' ')); - console.log(t.length<25?'':'...'); return `${text.split(' ').slice(0, 25).join(' ')} ${t.length<25?'':'...'}` } @@ -270,15 +325,15 @@ export default { watch(()=>accountStore.cod2user ,(newValue,oldValue)=>{ if(newValue){ - getfromserver("api/navigation/news/",newss) + getfromserver(`api/navigation/news/`,newss) } }, {deep:true}) const deletComment = (id, news) => { axiosApiInstance.post(`api/navigation/news/`, {delid: id, news: news}).then(result => { - // dialogCommentShow.value=!dialogCommentShow.value + newss.value[newss.value.findIndex(e=> e.id==result.data['news'])].comment = result.data.comment - console.log(result.data, 'result.data-----------------') + }) @@ -298,8 +353,8 @@ export default { openComent, addComment, idnews, - deletComment - + deletComment, + newses } } @@ -312,7 +367,7 @@ export default { height: 93vh; } - .comWy { + /* .comWy { width: 96%; - } + } */ \ No newline at end of file diff --git a/front/src/layouts/default/DefaultPortal.vue b/front/src/layouts/default/DefaultPortal.vue index b1c86e285..c7506be02 100644 --- a/front/src/layouts/default/DefaultPortal.vue +++ b/front/src/layouts/default/DefaultPortal.vue @@ -19,23 +19,7 @@ title="Портал МиФНС по ЦОД № 2" variant="text" :to="'/'" /> - - - @@ -111,7 +95,7 @@ - + @@ -127,11 +111,12 @@ color="navigation"> + > @@ -167,8 +153,8 @@ - - + +

Посещений всего: {{ appStore.countvisitor.totalvisit }}

@@ -180,12 +166,12 @@
- + @@ -398,9 +384,12 @@ export default { const drawer_right = ref(true) const menuGetUserDialog = ref(false) const LikeDialog = ref(false) - const rail = ref(true) + const rail = ref(false) const showTooltip = ref(false) - + + const menuTruncated = (menus) => { + return menus.slice(0,2).toUpperCase() + } const toggleTheme = () => { theme.global.name.value = theme.global.current.value.dark ? 'light' : 'dark' @@ -485,7 +474,8 @@ export default { // userlinks, appStore, rail, - showTooltip + showTooltip, + menuTruncated } } @@ -504,4 +494,8 @@ export default { display: flex; align-items: center; } + +.railmenu .v-list-group__items .v-list-item { + padding-inline-start: 11px!important; +} \ No newline at end of file diff --git a/front/src/main.js b/front/src/main.js index 10b7bc5a3..b14309d47 100644 --- a/front/src/main.js +++ b/front/src/main.js @@ -14,6 +14,8 @@ import { createApp } from 'vue' import { registerPlugins } from '@/plugins' import components from '@/components/UI/index' import Vue3Autocounter from 'vue3-autocounter'; +import VueScrollTo from 'vue-scrollto' + const app = createApp(App) components.forEach((component) => { @@ -21,7 +23,8 @@ components.forEach((component) => { }) app.component('vue3-autocounter', Vue3Autocounter) - +app.component('vue-scrollto', VueScrollTo) +// Vue.use(VueScrollTo) registerPlugins(app) diff --git a/front/src/views/AboutPortalPage.vue b/front/src/views/AboutPortalPage.vue index e773b1574..144e97587 100644 --- a/front/src/views/AboutPortalPage.vue +++ b/front/src/views/AboutPortalPage.vue @@ -1,11 +1,19 @@