Описание серилизаторов плюс карта
This commit is contained in:
1 parent
fd2644a2d6
commit
def0372449
10 files changed
+59
-286
No files matched your search
@@ -1,20 +1,15 @@
|
||||
<template>
|
||||
<v-row lg="12" class="mt-10 ml-13">
|
||||
<v-col lg="5" no-gutters class="d-flex justify-end align-start">
|
||||
|
||||
<v-card :width="640" :height="600" :elevation="5">
|
||||
<div style="width:640px;height:600px; ">
|
||||
|
||||
|
||||
<l-map :zoom="13" :min-zoom="13" :center="[55.83451, 37.40848]">
|
||||
<l-tile-layer :url="`${baseURL}media/Tiles/{z}/{x}/{y}.png`"></l-tile-layer>
|
||||
<l-marker :lat-lng="[55.83451, 37.40848]" :icon="icon_cod"> </l-marker>
|
||||
<l-marker :lat-lng="[55.83309, 37.39933]" :icon="icon_mcd"> </l-marker>
|
||||
<l-marker :lat-lng="[55.83463, 37.38335]" :icon="icon_metro"> </l-marker>
|
||||
<l-marker :lat-lng="[55.83213, 37.38247]" :icon="icon_mcd"> </l-marker>
|
||||
<l-marker :lat-lng="[55.82741, 37.43715]" :icon="icon_metro"> </l-marker>
|
||||
<l-marker :lat-lng="[55.82705, 37.4411]" :icon="icon_mcd"> </l-marker>
|
||||
<l-marker :lat-lng="[55.8496, 37.43925]" :icon="icon_metro"> </l-marker>
|
||||
<l-marker :lat-lng="[55.8252, 37.3853]" :icon="icon_metro"> </l-marker>
|
||||
<l-marker v-for="x in markers" :key="x" :lat-lng="x.coordinate" :icon="icon(x.icon)"> </l-marker>
|
||||
</l-map>
|
||||
</div>
|
||||
|
||||
</v-card>
|
||||
</v-col>
|
||||
<v-col lg="6" no-gutters class="d-flex flex-column ml-16">
|
||||
@@ -55,7 +50,7 @@ import { baseURL } from '@/utils/axios-api'
|
||||
import "leaflet/dist/leaflet.css";
|
||||
import { LMap, LTileLayer, LMarker } from "@vue-leaflet/vue-leaflet";
|
||||
import { L, icon } from "leaflet"
|
||||
|
||||
import { ref } from 'vue'
|
||||
export default {
|
||||
components: {
|
||||
LMap,
|
||||
@@ -65,27 +60,48 @@ export default {
|
||||
icon
|
||||
},
|
||||
setup() {
|
||||
return {
|
||||
icon_cod: icon({
|
||||
iconUrl: `${baseURL}media/map_icons/fns.png`,
|
||||
iconSize: [30, 30],
|
||||
iconAnchor: [16, 40]
|
||||
}),
|
||||
|
||||
icon_mcd: icon({
|
||||
iconUrl: `${baseURL}media/map_icons/mcd_d2.png`,
|
||||
const pathbuild=(icon)=>{
|
||||
return `${baseURL}media/map_icons/${icon}.png`
|
||||
}
|
||||
const icons = {
|
||||
icon_cod:{
|
||||
iconUrl: pathbuild(`fns`),
|
||||
iconSize: [30, 30],
|
||||
iconAnchor: [16, 40]
|
||||
},
|
||||
icon_metro:{
|
||||
iconUrl: pathbuild(`mos_metro`),
|
||||
iconSize: [30, 25],
|
||||
iconAnchor: [10, 20]
|
||||
},
|
||||
icon_mcd :{
|
||||
iconUrl: pathbuild(`mcd_d2`),
|
||||
iconSize: [32, 18],
|
||||
iconAnchor: [10, 20]
|
||||
}),
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
const markers= ref([{
|
||||
coordinate:[55.83451, 37.40848],icon:icons.icon_cod},
|
||||
{coordinate:[55.83309, 37.39933],icon:icons.icon_mcd },
|
||||
{coordinate:[55.83463, 37.38335],icon:icons.icon_metro },
|
||||
{coordinate:[55.83213, 37.38247],icon:icons.icon_mcd },
|
||||
{coordinate:[55.82741, 37.43715],icon:icons.icon_metro },
|
||||
{coordinate:[55.82705, 37.4411], icon:icons.icon_mcd},
|
||||
{coordinate:[55.8496, 37.43925], icon:icons.icon_metro },
|
||||
{coordinate:[55.8252, 37.3853], icon:icons.icon_metro }
|
||||
|
||||
|
||||
])
|
||||
return {
|
||||
markers,
|
||||
|
||||
|
||||
|
||||
icon_metro: icon({
|
||||
iconUrl: `${baseURL}media/map_icons/mos_metro.png`,
|
||||
iconSize: [30, 25],
|
||||
iconAnchor: [10, 20]
|
||||
}),
|
||||
address: {
|
||||
"building": "125373, Москва, Походный проезд, двл.3, стр 1",
|
||||
"phone": "Телефон: 8(495) 198-53 - 12"
|
||||
"phone": "Телефон: 8(495) 198-53-12"
|
||||
},
|
||||
address_pathes: [
|
||||
{ "path": "От станции метро «Волоколамская», 837 автобусом до остановки «Таксомоторный парк», или маршрутным такси № 441" },
|
||||
@@ -93,6 +109,7 @@ export default {
|
||||
{ "path": "От станции метро «Тушинская», последний вагон из центра, автобусы № 2, № 266 до остановки «пл. Трикотажная», автобусы № 88, №177 до остановки «17 Таксомоторный парк»" }
|
||||
],
|
||||
baseURL,
|
||||
icon
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,116 +0,0 @@
|
||||
<template>
|
||||
<v-dialog
|
||||
v-model="getUserDialog"
|
||||
persistent
|
||||
width="600">
|
||||
<v-card >
|
||||
|
||||
|
||||
|
||||
|
||||
<v-card-actions class="align-self-end pt-0 ">
|
||||
<v-btn
|
||||
color="modal_btn"
|
||||
variant="text"
|
||||
@click="menusCloses()"
|
||||
>
|
||||
Закрыть {{UserDialog}}
|
||||
</v-btn>
|
||||
|
||||
|
||||
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import { clearAxios } from '@/utils/axios-api'
|
||||
import { ref, computed } from 'vue'
|
||||
import {useAccountStore} from '@/store/AccountStore'
|
||||
import {checkremote} from '@/utils/universal_functions'
|
||||
import { spravURL } from '@/utils/axios-api'
|
||||
|
||||
export default {
|
||||
|
||||
props: {
|
||||
UserDialog: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
|
||||
loging: {
|
||||
type: Number,
|
||||
default: 0
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
setup(props, { emit }) {
|
||||
|
||||
const accountStore = useAccountStore()
|
||||
const userlinks = ref([])
|
||||
const tab = ref(false)
|
||||
|
||||
const loadlinksUser=async()=>{
|
||||
|
||||
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() {
|
||||
props.UserDialog=false
|
||||
|
||||
}
|
||||
|
||||
const getUserDialog = computed({
|
||||
|
||||
get: () => props.UserDialog,
|
||||
set: (value) => emit('update:UserDialog', value)
|
||||
})
|
||||
|
||||
loadlinksUser()
|
||||
|
||||
return {
|
||||
menusCloses,
|
||||
userlinks,
|
||||
accountStore,
|
||||
basicInformation,
|
||||
subInformation,
|
||||
checkremote,
|
||||
spravURL,
|
||||
tab,
|
||||
getUserDialog,
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.custom_subtitle .v-list-item-subtitle {
|
||||
opacity: 1!important;
|
||||
}
|
||||
|
||||
.highttext {
|
||||
height: 400px;
|
||||
}
|
||||
|
||||
.isActiveTab {
|
||||
background-color: #68c3ff70;
|
||||
}
|
||||
</style>
|
||||
@@ -132,15 +132,14 @@
|
||||
import { axiosApiInstance } from '@/utils/axios-api'
|
||||
import {checkremote} from '@/utils/universal_functions'
|
||||
import { spravURL } from '@/utils/axios-api'
|
||||
import CardUsers from '@/components/cardUsers.vue'
|
||||
|
||||
import DialogSearch from './dialog-search.vue'
|
||||
import { baseURL } from '@/utils/axios-api'
|
||||
import {useAccountStore} from '@/store/AccountStore'
|
||||
export default {
|
||||
|
||||
components: {
|
||||
CardUsers,
|
||||
DialogSearch
|
||||
DialogSearch
|
||||
},
|
||||
|
||||
setup(){
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
|
||||
Сотрудники
|
||||
{{userlinks}}
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import {pagecounter} from '@/utils/universal_functions'
|
||||
import {useAccountStore} from '@/store/AccountStore'
|
||||
import { clearAxios } from '@/utils/axios-api'
|
||||
import { ref } from 'vue'
|
||||
export default {
|
||||
|
||||
props: {
|
||||
|
||||
loging: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
|
||||
setup(props, context){
|
||||
const accountStore = useAccountStore()
|
||||
const userlinks = ref([])
|
||||
const login =ref('')
|
||||
|
||||
const loadlinksUser=async()=>{
|
||||
if (props.loging==""){
|
||||
login.value=accountStore.user.login
|
||||
}
|
||||
else {
|
||||
login.value=props.loging
|
||||
|
||||
}
|
||||
|
||||
const res = await clearAxios.get('api/accounts/getuser/?userlogin='+login.value)
|
||||
userlinks.value=res.data
|
||||
}
|
||||
|
||||
pagecounter()
|
||||
loadlinksUser()
|
||||
|
||||
|
||||
return {
|
||||
|
||||
userlinks,
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
Reference in new issue
Block a user