Merge branch 'feature/create_app' of http://sulaco.nodered.ru:5223/COD2/PORTAL_COD2 into feature/create_app
This commit is contained in:
commit
8b7b10db0d
4 files changed
+147
-87
No files matched your search
BIN
Binary file not shown.
@@ -1,130 +1,158 @@
|
|||||||
<template>
|
<template>
|
||||||
<v-container class="py-1 newsVH px-0 bg-transparent overflow-auto">
|
<v-container class="py-0 newsVH px-0 bg-transparent overflow-auto">
|
||||||
|
|
||||||
<v-card
|
<v-card
|
||||||
|
v-show="pages=='home'"
|
||||||
class="mx-auto mb-0 "
|
class="mx-auto mb-0 "
|
||||||
v-for="(x, i) in newss" :key= i
|
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"
|
||||||
|
></v-avatar>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<v-list-item-title>{{x.author.fio}}</v-list-item-title>
|
||||||
|
|
||||||
|
<v-list-item-subtitle>Участник</v-list-item-subtitle>
|
||||||
|
</v-list-item>
|
||||||
|
<v-card-title class="pt-0 pb-1">
|
||||||
|
{{x.title}}
|
||||||
|
</v-card-title>
|
||||||
<v-img
|
<v-img
|
||||||
:src="`${burl}${x.link}`"
|
:src="`${burl}${x.link}`"
|
||||||
height="164px"
|
height="164px"
|
||||||
cover
|
cover
|
||||||
|
width="96%"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<v-card-title>
|
|
||||||
|
<v-card-text class="py-3">
|
||||||
|
{{limitText(x.text)}}
|
||||||
|
</v-card-text>
|
||||||
|
|
||||||
|
|
||||||
|
</v-card>
|
||||||
|
|
||||||
|
<!-- ---------------------------------------------------------------------------------- -->
|
||||||
|
|
||||||
|
<v-card v-show="pages=='news'"
|
||||||
|
class="mx-auto rounded-0"
|
||||||
|
|
||||||
|
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"
|
||||||
|
></v-avatar>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<v-list-item-title>{{x.author.fio}}</v-list-item-title>
|
||||||
|
|
||||||
|
<v-list-item-subtitle>Участник</v-list-item-subtitle>
|
||||||
|
</v-list-item>
|
||||||
|
|
||||||
|
<v-card-title class="pt-0 pb-1">
|
||||||
{{x.title}}
|
{{x.title}}
|
||||||
</v-card-title>
|
</v-card-title>
|
||||||
|
<v-img
|
||||||
|
:src="`${burl}${x.link}`"
|
||||||
|
height="350px"
|
||||||
|
width="96%"
|
||||||
|
class="mx-auto"
|
||||||
|
cover
|
||||||
|
/>
|
||||||
|
|
||||||
<v-card-subtitle>
|
<v-list-item class="w-100">
|
||||||
{{limitText(x.text)}}
|
|
||||||
</v-card-subtitle>
|
|
||||||
|
|
||||||
<v-card-actions>
|
<template v-slot:append>
|
||||||
<v-btn
|
<div class="justify-self-end">
|
||||||
color="teal-accent-4"
|
<v-icon 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>
|
||||||
variant="text"
|
<span class="subheading me-2">{{x.scores.filter(e=> e.score==true).length}}</span>
|
||||||
>
|
<span class="me-1">·</span>
|
||||||
{{x.author.fio}}
|
<v-icon class="me-1" icon="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 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-btn>
|
|
||||||
|
|
||||||
<v-spacer></v-spacer>
|
|
||||||
|
|
||||||
<v-btn
|
<div >
|
||||||
:icon="x.show ? 'mdi-chevron-up' : 'mdi-chevron-down'"
|
|
||||||
@click="x.show = !x.show"
|
|
||||||
></v-btn>
|
|
||||||
</v-card-actions>
|
|
||||||
|
|
||||||
<v-expand-transition>
|
|
||||||
<div v-show="x.show">
|
|
||||||
<v-divider/>
|
<v-divider/>
|
||||||
|
|
||||||
<v-card-text>
|
<v-card-text>
|
||||||
{{x.text}}
|
{{x.text}}
|
||||||
</v-card-text>
|
</v-card-text>
|
||||||
<v-divider/>
|
<v-divider/>
|
||||||
<v-card-actions >
|
|
||||||
<v-row >
|
|
||||||
<v-col>
|
|
||||||
<!-- :variant="x.scores.filter(e=> e.user==accountStore.user.id && e.score == true).length>0?'text':'tonal'" -->
|
|
||||||
<v-btn
|
|
||||||
:variant="x.scores.filter(e=> e.user==accountStore.user.id && e.score == true).length>0?'tonal':'text'"
|
|
||||||
icon='mdi-thumb-up-outline'
|
|
||||||
color="blue-darken-3"
|
|
||||||
@click="toggleIncrementLike(x.id, true)"
|
|
||||||
/>
|
|
||||||
{{x.scores.filter(e=> e.score==true).length}}
|
|
||||||
|
|
||||||
</v-col>
|
|
||||||
<v-col class=" ml-8">
|
|
||||||
<v-btn
|
|
||||||
variant="text"
|
|
||||||
icon="mdi-message-text-outline"
|
|
||||||
color="teal"
|
|
||||||
@click="openComent(x.id)"
|
|
||||||
/>
|
|
||||||
<span @click="x.showComment=!x.showComment"
|
|
||||||
class="pointer"
|
|
||||||
>
|
|
||||||
{{ x.comment.length }}
|
|
||||||
</span>
|
|
||||||
|
|
||||||
</v-col>
|
|
||||||
<v-col class="text-center pr-0">
|
|
||||||
<v-btn
|
|
||||||
:variant="x.scores.filter(e=> e.user==accountStore.user.id && e.score == false).length>0?'tonal':'text'"
|
|
||||||
icon='mdi-thumb-down-outline'
|
|
||||||
color="red-lighten-2"
|
|
||||||
@click="toggleIncrementLike(x.id, false)"
|
|
||||||
/>
|
|
||||||
|
|
||||||
{{x.scores.filter(e=> e.score==false).length}}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</v-card-actions>
|
|
||||||
<v-divider class="mb-2"/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</v-expand-transition>
|
|
||||||
<v-expand-transition>
|
<v-expand-transition>
|
||||||
|
|
||||||
<div v-show="x.showComment" v-if="x.comment.length>0">
|
<div v-show="x.showComment" v-if="x.comment.length>0">
|
||||||
<div
|
<div
|
||||||
v-for = "(y, key) in x.comment"
|
v-for = "(y, key) in x.comment"
|
||||||
:key="key"
|
:key="key"
|
||||||
|
class="d-flex flex-column py-3"
|
||||||
|
|
||||||
class="d-flex align-center flex-column py-3"
|
|
||||||
>
|
>
|
||||||
|
<v-row>
|
||||||
<div class="text-subtitle-2">{{dateformat(y.cdate)}}
|
<v-col class="text-subtitle-2">{{ splitname(y.author) }}</v-col>
|
||||||
<v-btn
|
<v-col class="flex-grow-0 text-subtitle-2 ">{{dateformat(y.cdate)}} </v-col>
|
||||||
|
<v-col class="flex-grow-0"> <v-btn
|
||||||
variant="text"
|
variant="text"
|
||||||
size="small"
|
size="small"
|
||||||
icon='mdi-delete'
|
icon='mdi-delete'
|
||||||
color="blue-grey-darken-1"
|
color="blue-grey-darken-1"
|
||||||
@click="deletComment(y.id, x.id)"
|
@click="deletComment(y.id, x.id)"
|
||||||
/>
|
/></v-col>
|
||||||
|
</v-row>
|
||||||
|
<div class="text-subtitle-2">
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<v-card
|
<v-alert
|
||||||
|
|
||||||
|
class="comWy"
|
||||||
|
color="#f9f9f9"
|
||||||
|
|
||||||
|
:border="accountStore.user.login==y.author.login?'end':'start'"
|
||||||
|
:border-color="accountStore.user.login==y.author.login?'success':'deep-purple accent-4'"
|
||||||
|
elevation=0
|
||||||
|
>
|
||||||
|
|
||||||
|
{{ y.text }}
|
||||||
|
|
||||||
|
</v-alert>
|
||||||
|
|
||||||
|
<!-- <v-card
|
||||||
width="400"
|
width="400"
|
||||||
:subtitle=splitname(y.author)
|
:subtitle=splitname(y.author)
|
||||||
:text=y.text
|
:text=y.text
|
||||||
elevation="1"
|
elevation="1"
|
||||||
></v-card>
|
color="red"
|
||||||
|
></v-card> -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</v-expand-transition>
|
</v-expand-transition>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</v-card>
|
</v-card>
|
||||||
|
|
||||||
<v-row justify="center">
|
<v-row justify="center">
|
||||||
<v-dialog
|
<v-dialog
|
||||||
v-model="dialogCommentShow"
|
v-model="dialogCommentShow"
|
||||||
@@ -183,6 +211,14 @@ const accountStore = useAccountStore()
|
|||||||
export default {
|
export default {
|
||||||
components: { myHelper },
|
components: { myHelper },
|
||||||
|
|
||||||
|
props: {
|
||||||
|
pages: {
|
||||||
|
type: String,
|
||||||
|
default: 'home'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
setup(){
|
setup(){
|
||||||
const newss=ref([])
|
const newss=ref([])
|
||||||
const dialogCommentShow = ref(false)
|
const dialogCommentShow = ref(false)
|
||||||
@@ -218,7 +254,10 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const limitText=(text)=> {
|
const limitText=(text)=> {
|
||||||
return text.split(' ').slice(0, 10).join(' ')
|
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?'':'...'}`
|
||||||
}
|
}
|
||||||
|
|
||||||
const splitname = (name) => {
|
const splitname = (name) => {
|
||||||
@@ -270,4 +309,8 @@ export default {
|
|||||||
.newsVH {
|
.newsVH {
|
||||||
height: 93vh;
|
height: 93vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.comWy {
|
||||||
|
width: 96%;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -146,7 +146,8 @@
|
|||||||
:key="k"
|
:key="k"
|
||||||
:value="child.name"
|
:value="child.name"
|
||||||
:title="child.name"
|
:title="child.name"
|
||||||
:to="child.path">
|
:to="child.path"
|
||||||
|
:prepend-icon="child.subIcon">
|
||||||
</v-list-item>
|
</v-list-item>
|
||||||
</v-list-group>
|
</v-list-group>
|
||||||
</template>
|
</template>
|
||||||
@@ -421,7 +422,8 @@ export default {
|
|||||||
submenu: [
|
submenu: [
|
||||||
{
|
{
|
||||||
name: 'Справочник',
|
name: 'Справочник',
|
||||||
link: 'http://10.252.44.33/accounting6/members.php'
|
link: 'http://10.252.44.33/accounting6/members.php',
|
||||||
|
subIcon: 'mdi-account-multiple-outline'
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -431,10 +433,16 @@ export default {
|
|||||||
submenu: [
|
submenu: [
|
||||||
{
|
{
|
||||||
name: 'Обеспечивающая',
|
name: 'Обеспечивающая',
|
||||||
path: "/providing"
|
path: "/providing",
|
||||||
|
subIcon: 'mdi-account-multiple-outline'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'Новости',
|
||||||
|
ico: 'mdi-newspaper',
|
||||||
|
path: "/news"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'Безопасность',
|
name: 'Безопасность',
|
||||||
ico: 'mdi-routes',
|
ico: 'mdi-routes',
|
||||||
|
|||||||
@@ -1,19 +1,28 @@
|
|||||||
<template>
|
<template>
|
||||||
<v-row>
|
<v-row class="justify-center ma-0 bg">
|
||||||
<v-col
|
<v-col
|
||||||
class="text-h6 text-grey text-center align-self-center text--lighten-1 font-weight-light"
|
class="py-2"
|
||||||
|
lg="6"
|
||||||
>
|
>
|
||||||
Новости
|
<News-list
|
||||||
|
:pages="'news'"
|
||||||
|
/>
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import NewsList from '@/components/news-list.vue'
|
||||||
export default {
|
export default {
|
||||||
|
components: {
|
||||||
|
NewsList
|
||||||
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
/* .bg {
|
||||||
|
background: url("@/assets/1.jpg") center center;
|
||||||
|
} */
|
||||||
</style>
|
</style>
|
||||||
Reference in new issue
Block a user