This commit is contained in:
iriska-gri committed 2023-09-05 16:07:55 +03:00
commit 8c95bbf909
126 files changed
+16922

No files matched your search

+147
View File
@@ -0,0 +1,147 @@
<template>
<v-card>
<v-card-title>
<span class="text-h5">Карточка пользователя</span>
</v-card-title>
<v-card-text class="flex-column d-flex pb-0">
<v-row class="flex-grow-0">
<v-divider/>
<v-col
class="pa-0"
lg=4
>
<v-img
class="h-100"
cover
:src="accountStore.user.photo"
/>
</v-col>
<v-col class="pa-0">
<v-list class="pt-0 custom_subtitle">
<v-list-item
v-for="n in basicInformation()"
:key="n"
>
<template #title>
<span class="font-weight-medium">
{{n.title}}
</span>
</template>
<template #subtitle>
<span class="text-subtitle-1">
{{n.info}}
</span>
</template>
</v-list-item>
</v-list>
</v-col>
<v-divider/>
</v-row>
<v-row class="flex-grow-0">
<v-list class="pa-0 pt-3 custom_subtitle">
<v-list-item
v-for="n in subInformation()"
:key="n"
class="py-0"
density
>
<template #title>
<span class="font-weight-medium">
{{n.title}}
</span>
<span class="text-subtitle-1">
{{n.info}}
</span>
</template>
</v-list-item>
</v-list>
</v-row>
</v-card-text>
<v-card-actions class="align-self-end pt-0">
<v-btn
color="blue-darken-1"
variant="text"
@click="menusCloses"
>
Отмена
</v-btn>
</v-card-actions>
</v-card>
</template>
<script>
import { clearAxios } from '@/utils/axios-api'
import { ref, onMounted } from 'vue'
import {useAccountStore} from '@/store/AccountStore'
export default {
props: {
menuGetUserDialog: {
type: Boolean,
default: false
},
loging: {
type: String,
default: ''
}
},
setup(props, context) {
const accountStore = useAccountStore()
const userlinks = ref([])
const loadlinksUser=async()=>{
// console.log(`accountStore`, accountStore);
const res = await clearAxios.get('api/accounts/getuser/?userlogin='+props.loging)
userlinks.value=res.data
}
const basicInformation = () => [
{title: 'Отдел:', info: userlinks.value.department},
{title: 'ФИО:', info: userlinks.value.fio},
{title: 'Должность:', info: userlinks.value.post},
]
const subInformation = () => [
{title: 'E-mail: ', info: userlinks.value.email},
{title: 'Телефон: ', info: userlinks.value.tel},
{title: 'Комната: ', info: userlinks.value.room},
{title: 'Логин: ', info: userlinks.value.login},
]
function menusCloses() {
context.emit('menusClose')
}
onMounted(() => {
loadlinksUser()
})
return {
menusCloses,
userlinks,
accountStore,
basicInformation,
subInformation
}
}
}
</script>
<style>
.custom_subtitle .v-list-item-subtitle {
opacity: 1!important;
}
</style>