Карточка пользователя
This commit is contained in:
1 parent
a6e43d4cd0
commit
20eccbf800
1 file changed
+83
-30
@@ -1,31 +1,85 @@
|
|||||||
<template>
|
<template>
|
||||||
<v-dialog
|
<v-dialog
|
||||||
v-model="mydialog"
|
v-model="mydialog"
|
||||||
persistent
|
persistent
|
||||||
width="600">
|
width="600"
|
||||||
<v-card
|
class="mx-auto"
|
||||||
height="350">
|
>
|
||||||
<v-card-text>
|
<v-card height="440">
|
||||||
dfd
|
<v-card-title class="pl-6">
|
||||||
</v-card-text>
|
Информация
|
||||||
<v-divider/>
|
</v-card-title>
|
||||||
<v-card-actions class="align-self-end pt-0 ">
|
<v-divider/>
|
||||||
|
<v-card-text>
|
||||||
<v-btn
|
<v-row
|
||||||
color="modal_btn"
|
no-gutters
|
||||||
variant="text"
|
class="flex-grow-0"
|
||||||
@click= "$emit('update:opendialog', value)"
|
>
|
||||||
>
|
<v-col lg=4>
|
||||||
Закрыть
|
<v-img
|
||||||
</v-btn>
|
cover
|
||||||
</v-card-actions>
|
min-height="180px"
|
||||||
</v-card>
|
max-height="180px"
|
||||||
|
:src="checkremote(`${spravURL}${userlinks.login}.jpg`)"
|
||||||
|
/>
|
||||||
|
</v-col>
|
||||||
|
<v-col class="d-flex flex-column">
|
||||||
|
<v-row
|
||||||
|
no-gutters
|
||||||
|
class="flex-grow-0 mx-3 my-1"
|
||||||
|
v-for="n in basicInformation()"
|
||||||
|
:key="n"
|
||||||
|
>
|
||||||
|
<v-col>
|
||||||
|
<span class="font-weight-medium">
|
||||||
|
{{n.title}}
|
||||||
|
</span>
|
||||||
|
<br/>
|
||||||
|
<span class="text-subtitle-1">
|
||||||
|
{{n.info}}
|
||||||
|
</span>
|
||||||
|
</v-col>
|
||||||
|
</v-row>
|
||||||
|
</v-col>
|
||||||
|
</v-row>
|
||||||
|
</v-card-text>
|
||||||
|
<v-divider/>
|
||||||
|
<v-card-text class="d-flex flex-column py-2">
|
||||||
|
<v-row
|
||||||
|
no-gutters
|
||||||
|
class="flex-grow-0"
|
||||||
|
v-for="n in subInformation()"
|
||||||
|
:key="n"
|
||||||
|
>
|
||||||
|
<v-col>
|
||||||
|
<span class="font-weight-medium">
|
||||||
|
{{n.title}}
|
||||||
|
</span>
|
||||||
|
<span class="text-subtitle-1">
|
||||||
|
{{n.info}}
|
||||||
|
</span>
|
||||||
|
</v-col>
|
||||||
|
</v-row>
|
||||||
|
</v-card-text>
|
||||||
|
<v-divider/>
|
||||||
|
<v-card-actions class="align-self-end pt-0">
|
||||||
|
<v-btn
|
||||||
|
color="modal_btn"
|
||||||
|
variant="text"
|
||||||
|
@click= "$emit('update:opendialog', value)"
|
||||||
|
>
|
||||||
|
Закрыть
|
||||||
|
</v-btn>
|
||||||
|
</v-card-actions>
|
||||||
|
</v-card>
|
||||||
</v-dialog>
|
</v-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { ref, computed, watch } from 'vue'
|
import { ref, computed, watch } from 'vue'
|
||||||
import { axiosApiInstance } from '@/utils/axios-api'
|
import { axiosApiInstance } from '@/utils/axios-api'
|
||||||
|
import {checkremote} from '@/utils/universal_functions'
|
||||||
|
import { spravURL } from '@/utils/axios-api'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
@@ -46,7 +100,6 @@ export default {
|
|||||||
const infouser = () => {
|
const infouser = () => {
|
||||||
axiosApiInstance.get('api/accounts/getuser/?userlogin='+props.loging).then(res => {
|
axiosApiInstance.get('api/accounts/getuser/?userlogin='+props.loging).then(res => {
|
||||||
userlinks.value=res.data
|
userlinks.value=res.data
|
||||||
console.log(userlinks.value.fio);
|
|
||||||
})}
|
})}
|
||||||
|
|
||||||
const mydialog = computed({
|
const mydialog = computed({
|
||||||
@@ -54,7 +107,6 @@ export default {
|
|||||||
set: (value) => emit('update:opendialog', value)
|
set: (value) => emit('update:opendialog', value)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
watch(()=>props.opendialog,(newValue,oldValue)=>{
|
watch(()=>props.opendialog,(newValue,oldValue)=>{
|
||||||
if(newValue){
|
if(newValue){
|
||||||
infouser()
|
infouser()
|
||||||
@@ -74,14 +126,15 @@ export default {
|
|||||||
{title: 'Логин: ', info: userlinks.value.login},
|
{title: 'Логин: ', info: userlinks.value.login},
|
||||||
]
|
]
|
||||||
|
|
||||||
|
return {
|
||||||
|
mydialog,
|
||||||
|
userlinks,
|
||||||
return {
|
infouser,
|
||||||
mydialog,
|
spravURL,
|
||||||
userlinks,
|
checkremote,
|
||||||
infouser
|
basicInformation,
|
||||||
}
|
subInformation
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in new issue
Block a user