Комметнарии
This commit is contained in:
1 parent
eb48b4360c
commit
a5cf33553b
10 files changed
+163
-87
No files matched your search
@@ -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--------------------');
|
||||
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,15 +3,18 @@
|
||||
|
||||
<v-card
|
||||
v-show="pages=='home'"
|
||||
class="mx-auto mb-0 "
|
||||
:ref="i"
|
||||
class="mx-auto"
|
||||
:class="i>0?'mt-1':''"
|
||||
v-for="(x, i) in newss" :key= i
|
||||
>
|
||||
|
||||
<v-list-item class="w-100 pl-4 py-2 pt-3">
|
||||
<template v-slot:prepend>
|
||||
<v-avatar
|
||||
|
||||
color="grey-darken-3"
|
||||
image="https://avataaars.io/?avatarStyle=Transparent&topType=ShortHairShortCurly&accessoriesType=Prescription02&hairColor=Black&facialHairType=Blank&clotheType=Hoodie&clotheColor=White&eyeType=Default&eyebrowType=DefaultNatural&mouthType=Default&skinColor=Light"
|
||||
:image="accountStore.user.photo"
|
||||
></v-avatar>
|
||||
</template>
|
||||
|
||||
@@ -26,22 +29,52 @@
|
||||
:src="`${burl}${x.link}`"
|
||||
height="164px"
|
||||
cover
|
||||
width="96%"
|
||||
width="92%"
|
||||
class="mx-auto"
|
||||
/>
|
||||
<v-list-item class="w-100">
|
||||
|
||||
<template v-slot:append>
|
||||
<div class="justify-self-end">
|
||||
<v-icon size="x-small" class="me-1" :icon="x.scores.filter(e=> e.user==accountStore.user.id && e.score == true).length>0?'mdi-thumb-up':'mdi-thumb-up-outline'" @click="toggleIncrementLike(x.id, true)"></v-icon>
|
||||
<span class="subheading me-2">{{x.scores.filter(e=> e.score==true).length}}</span>
|
||||
<span class="me-1">·</span>
|
||||
<v-icon size="x-small" class="me-1" :icon="x.scores.filter(e=> e.user==accountStore.user.id && e.score == false).length>0?'mdi-thumb-down':'mdi-thumb-down-outline'" @click="toggleIncrementLike(x.id, false)"/>
|
||||
<span class="subheading me-2">{{x.scores.filter(e=> e.score==false).length}}</span>
|
||||
<span class="me-1">·</span>
|
||||
<v-icon size="x-small" class="me-1" icon="mdi-message-text-outline" @click="openComent(x.id)"/>
|
||||
<span @click="x.showComment=!x.showComment" class="pointer subheading">{{ x.comment.length }}</span>
|
||||
</div>
|
||||
</template>
|
||||
</v-list-item>
|
||||
|
||||
|
||||
<v-card-text class="py-3">
|
||||
<v-card-text class="py-0">
|
||||
{{limitText(x.text)}}
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-btn
|
||||
color="#3E8890"
|
||||
variant="text"
|
||||
:to="'/news'"
|
||||
>
|
||||
Подробнее
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
|
||||
<!-- :to="'/news'" -->
|
||||
|
||||
|
||||
</v-card>
|
||||
|
||||
<!-- ---------------------------------------------------------------------------------- -->
|
||||
<!-- ------------------------------ @click="scrollMeTo('porto')"---------------------------------------------------- -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<v-card v-show="pages=='news'"
|
||||
class="mx-auto rounded-0"
|
||||
|
||||
:ref="i"
|
||||
v-for="(x, i) in newss" :key= i
|
||||
>
|
||||
<v-list-item class="w-100 pl-4 py-2 pt-3">
|
||||
@@ -49,8 +82,7 @@
|
||||
<v-avatar
|
||||
|
||||
color="grey-darken-3"
|
||||
image="https://avataaars.io/?avatarStyle=Transparent&topType=ShortHairShortCurly&accessoriesType=Prescription02&hairColor=Black&facialHairType=Blank&clotheType=Hoodie&clotheColor=White&eyeType=Default&eyebrowType=DefaultNatural&mouthType=Default&skinColor=Light"
|
||||
></v-avatar>
|
||||
:image=accountStore.user.photo></v-avatar>
|
||||
</template>
|
||||
|
||||
<v-list-item-title>{{x.author.fio}}</v-list-item-title>
|
||||
@@ -101,28 +133,37 @@
|
||||
<div
|
||||
v-for = "(y, key) in x.comment"
|
||||
:key="key"
|
||||
class="d-flex flex-column py-3"
|
||||
class="d-flex flex-column pa-3"
|
||||
>
|
||||
|
||||
|
||||
<!-- :class="accountStore.user.login==y.author.login?'text-end mr-6':''" -->
|
||||
|
||||
<v-row class="justify-space-between">
|
||||
<v-col class="flex-grow-1 text-subtitle-2">{{ splitname(y.author) }}
|
||||
<v-btn
|
||||
variant="text"
|
||||
size="small"
|
||||
icon='mdi-delete'
|
||||
color="blue-grey-darken-1"
|
||||
@click="deletComment(y.id, x.id)"
|
||||
/></v-col>
|
||||
<v-col class="flex-grow-2 text-subtitle-2 order-3">{{dateformat(y.cdate)}} </v-col>
|
||||
<v-col class="flex-grow-0"></v-col>
|
||||
<v-col class="flex-grow-1 text-nowrap text-subtitle-2 pb-4"
|
||||
|
||||
>{{ splitname(y.author) }}
|
||||
</v-col>
|
||||
<v-col class="pa-0 text-center text-subtitle-2 order-3">{{dateformat(y.cdate)}} </v-col>
|
||||
|
||||
|
||||
</v-row>
|
||||
<!-- <div style="text-align: center;">
|
||||
<div style="display: inline-block; text-align: left;">
|
||||
Centered
|
||||
Content
|
||||
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="text-subtitle-2">
|
||||
|
||||
|
||||
</div>
|
||||
<v-row>
|
||||
<v-col class="pr-0">
|
||||
<v-alert
|
||||
|
||||
<v-alert
|
||||
|
||||
class="comWy"
|
||||
|
||||
color="#f9f9f9"
|
||||
|
||||
:border="accountStore.user.login==y.author.login?'end':'start'"
|
||||
@@ -133,14 +174,22 @@
|
||||
{{ y.text }}
|
||||
|
||||
</v-alert>
|
||||
|
||||
<!-- <v-card
|
||||
width="400"
|
||||
:subtitle=splitname(y.author)
|
||||
:text=y.text
|
||||
elevation="1"
|
||||
color="red"
|
||||
></v-card> -->
|
||||
</v-col>
|
||||
<v-col class="flex-grow-0 d-flex pa-0 align-center"
|
||||
:class="accountStore.user.login==y.author.login?'pa-0':'pa-5'"
|
||||
>
|
||||
<v-btn
|
||||
v-if="accountStore.user.login==y.author.login"
|
||||
variant="text"
|
||||
size="small"
|
||||
icon='mdi-delete'
|
||||
color="blue-grey-darken-1"
|
||||
@click="deletComment(y.id, x.id)"
|
||||
/>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -154,6 +203,7 @@
|
||||
|
||||
</v-card>
|
||||
|
||||
|
||||
<v-row justify="center">
|
||||
<v-dialog
|
||||
v-model="dialogCommentShow"
|
||||
@@ -193,6 +243,7 @@
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
</v-row>
|
||||
|
||||
</v-container>
|
||||
|
||||
</template>
|
||||
@@ -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%;
|
||||
}
|
||||
} */
|
||||
</style>
|
||||
@@ -19,23 +19,7 @@
|
||||
title="Портал МиФНС по ЦОД № 2"
|
||||
variant="text"
|
||||
:to="'/'" />
|
||||
<!-- @click="drawer = !drawer" -->
|
||||
<!-- <v-app-bar-nav-icon
|
||||
:to="'/'"
|
||||
>
|
||||
<img
|
||||
|
||||
style="cursor:pointer"
|
||||
:src="imageSrc"
|
||||
/>
|
||||
</v-app-bar-nav-icon> -->
|
||||
<!-- <v-toolbar-title >
|
||||
|
||||
Портал МиФНС по ЦОД № 2
|
||||
|
||||
|
||||
|
||||
</v-toolbar-title> -->
|
||||
<template v-slot:image>
|
||||
<v-img gradient="to top right, rgba(19,84,122,.8), rgba(128,208,199,.8)" />
|
||||
</template>
|
||||
@@ -111,7 +95,7 @@
|
||||
</template>
|
||||
</template>
|
||||
</v-app-bar>
|
||||
<v-navigation-drawer :rail="rail" permanent v-model="drawer">
|
||||
<v-navigation-drawer :width="245" :rail="rail" permanent v-model="drawer">
|
||||
<v-row class="my-0 h-100">
|
||||
<v-col class="flex-column d-flex">
|
||||
<v-row><v-col>
|
||||
@@ -127,11 +111,12 @@
|
||||
color="navigation">
|
||||
|
||||
<template v-slot:prepend>
|
||||
<v-icon :icon="x.ico" />
|
||||
<v-icon :icon="x.ico"/>
|
||||
</template>
|
||||
</v-list-item>
|
||||
|
||||
<v-list-group v-else
|
||||
:class="rail?'railmenu':''"
|
||||
:key="key"
|
||||
:value="x.name">
|
||||
<template v-slot:activator="{ props }">
|
||||
@@ -141,12 +126,13 @@
|
||||
:prepend-icon="x.ico" />
|
||||
</template>
|
||||
<v-list-item v-for="(child, k) in x.submenu"
|
||||
|
||||
:href="child.link"
|
||||
:key="k"
|
||||
:value="child.name"
|
||||
:title="child.name"
|
||||
:title="!rail?child.name:menuTruncated(child.name)"
|
||||
:to="child.path"
|
||||
:prepend-icon="child.subIcon">
|
||||
>
|
||||
</v-list-item>
|
||||
</v-list-group>
|
||||
</template>
|
||||
@@ -167,8 +153,8 @@
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row class="flex-grow-0">
|
||||
<v-col class="py-0 pl-1">
|
||||
<v-list>
|
||||
<v-col class="py-0 pl-1 d-flex flex-column">
|
||||
<v-list class=" d-flex flex-column ">
|
||||
|
||||
<v-list-item v-if="!rail" class="text-caption font-weight-bold text-truncate">
|
||||
<p>Посещений всего: {{ appStore.countvisitor.totalvisit }}</p>
|
||||
@@ -180,12 +166,12 @@
|
||||
|
||||
</v-list-item>
|
||||
|
||||
<v-list-item v-else>
|
||||
<v-list-item v-else class="align-center ml-2">
|
||||
<v-tooltip
|
||||
v-model="showTooltip"
|
||||
location="top">
|
||||
<template v-slot:activator="{ props }">
|
||||
<v-icon v-bind="props" color="grey">
|
||||
<v-icon v-bind="props" color="#7A7A7A">
|
||||
mdi-account-eye
|
||||
</v-icon>
|
||||
</template>
|
||||
@@ -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;
|
||||
}
|
||||
</style>
|
||||
+4
-1
@@ -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)
|
||||
|
||||
|
||||
@@ -1,11 +1,19 @@
|
||||
<template>
|
||||
<!-- <div id="app">
|
||||
<a href="#" id="return-top" v-scroll-to="'#top'">Top</a>
|
||||
<div ref="top">Hi. I'm #top</div> -->
|
||||
<!-- </div> -->
|
||||
<v-row>
|
||||
<v-col
|
||||
class="text-h6 text-grey text-center align-self-center text--lighten-1 font-weight-light"
|
||||
>
|
||||
О портале
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
|
||||
</v-col>
|
||||
|
||||
</v-row>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
elevation="0"
|
||||
>
|
||||
|
||||
<News-list v-if="accountStore.cod2user"/>
|
||||
<News-list :page="'home'" v-if="accountStore.cod2user"/>
|
||||
|
||||
|
||||
|
||||
@@ -190,7 +190,6 @@
|
||||
function proba(){
|
||||
axiosApiInstance.get('api/feedback/feedbackdata/')
|
||||
.then(data => {
|
||||
console.log(data.data);
|
||||
t_baseCriteria.value = data.data.results
|
||||
})
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user