Алерты

This commit is contained in:
iriska-gri committed 2023-11-27 15:53:14 +03:00
1 parent 1ba8607f40
commit da0d0b4dcb
8 files changed
+121 -173

No files matched your search

+28 -13
View File
@@ -1,25 +1,40 @@
<template>
<v-alert
v-model="alert"
border="start"
variant="tonal"
closable
close-label="Close Alert"
color="deep-purple-accent-4"
title="Closable Alert"
>
Aenean imperdiet. Quisque id odio. Cras dapibus. Pellentesque ut neque. Cras dapibus.
Vivamus consectetuer hendrerit lacus. Sed mollis, eros et ultrices tempus, mauris ipsum aliquam libero, non adipiscing dolor urna a orci. Sed mollis, eros et ultrices tempus, mauris ipsum aliquam libero, non adipiscing dolor urna a orci. Curabitur blandit mollis lacus. Curabitur ligula sapien, tincidunt non, euismod vitae, posuere imperdiet, leo.
</v-alert>
width = "500"
position="fixed"
class="bottom-alert"
type="success"
title="Успех!"
text="Файл загружен"
:value="alert"
closable
></v-alert>
</template>
<script>
import { ref } from 'vue'
export default {
// props: {
// alert: {
// type: Boolean,
// default: false
// }
// },
setup(){
defineProps(['alert'])
// defineEmits(['update:alert'])
// const alert = ref(true)
return {defineProps}
}
}
</script>
<style>
.bottom-alert {
bottom: 10px;
left: 40%;
}
</style>
+35 -51
View File
@@ -3,14 +3,15 @@
<v-col class="flex-column d-flex">
<v-row class="flex-grow-0 mhight">
<v-col class=" flex-column d-flex">
<v-card class="ml-2 mt-2" width="400" >
<v-card class="ml-2 mt-2" width="500" >
<v-card-title class="text-wrap pb-3">
Ежедневная статистика по сотрудникам
<!-- <v-icon icon="mdi-comment-question-outline" size="xsmall"></v-icon> -->
</v-card-title>
<v-row class="flex-grow-0 align-self-end">
<v-col class="d-flex">
<v-card-subtitle class="mt-2 align-self-end">Файл ежедневной статистики</v-card-subtitle>
<v-card-subtitle class="mt-2 align-self-end">
1. Скачать файл ежедневной статистики
</v-card-subtitle>
<v-icon
class="pt-2 pl-2"
icon="mdi-file-excel"
@@ -22,21 +23,24 @@
</v-row>
<v-row>
<v-col>
<v-card-subtitle class="align-self-center ml-3">
2. Загрузить данные на сервер
</v-card-subtitle>
<v-col class="pr-0">
<v-file-input
accept=".xlsx"
v-model="dailyfiles"
variant="underlined"
density="compact"
label="Выберите файл"
label="Прикрепить файл"
hide-details
class="mr-2 pb-2"
/>
</v-col>
<v-col class="flex-grow-0 align-self-center mb-2">
<v-col class="flex-grow-0 align-self-center pl-0 pr-6">
<v-icon
icon="mdi-download"
icon="mdi-chevron-double-right"
color="blue-grey-darken-2"
@click="onPickFile('roundfilse')"
/>
@@ -49,47 +53,25 @@
</v-col>
<v-col class=" flex-column d-flex">
<!-- <v-row class="flex-grow-0 align-self-end">
<v-col>
<v-icon
class="pt-2"
icon="mdi-file-excel"
color="green-darken-3"
@click="excelOp('vacationsExcel')"
/>
</v-col>
</v-row> -->
<!-- <v-row>
<v-col>
<v-file-input
accept=".xlsx"
v-model="dailyfiles"
variant="underlined"
density="compact"
label="Выберите файл"
hide-details
class="mr-2"
/>
</v-col>
<v-col class="flex-grow-0 align-self-center mb-2">
<v-icon
icon="mdi-download"
color="blue-grey-darken-2"
@click="onPickFile('vacationsExcel')"
/>
</v-col>
</v-row> -->
</v-col>
<v-col></v-col>
<v-col></v-col>
<v-col></v-col>
<v-col></v-col>
<v-alert
width = "500"
position="fixed"
class="bottom-alert"
:type='info.mess=="Файл загружен"?"success":"error"'
:title='info.mess=="Файл загружен"?"Успеssх!":"Упс!"'
:text="info.mess"
v-model="alert"
:color='info.mess=="Файл загружен"?"teal-accent-4":"error"'
closable
></v-alert>
</v-row>
<!-- <v-row>
<v-col v-for="(x) in 6" :key=x class=" flex-column d-flex">
@@ -110,11 +92,12 @@ import { axiosApiInstance } from '@/utils/axios-api'
export default {
setup(){
const dailyfiles = ref('')
const dailyfiles = ref([])
const visiting = ref({})
const info = ref({})
const t_dailyRound = ref('')
const alert = ref(false)
@@ -127,11 +110,7 @@ export default {
})
}
// const excelVacation = () => {
// }
const onPickFile = (ex) => {
@@ -141,10 +120,10 @@ export default {
axiosApiInstance.post(`api/general_vacation/dailyroundup/?excel=${ex}`, sdata).then(result => {
info.value = result.data
console.log(result.data, '----------------')
console.log(info.value, '----------------result.data')
})
showInfo.value = true
dailyfiles.value = ''
dailyfiles.value = []
alert.value = true
@@ -184,4 +163,9 @@ export default {
.mhight {
height: 150px;
}
.bottom-alert {
bottom: 10px;
left: 40%;
}
</style>
+3 -1
View File
@@ -23,7 +23,9 @@
</v-col>
<v-col class="flex-column d-flex ma-3">
<v-row >
<v-col cols="3" class="flex-grow-0 pa-0 pb-3"> <digital-letna/></v-col>
<v-col cols="4" class="flex-grow-0 pa-0 pb-3">
<digital-letna/>
</v-col>
<v-col class="flex-column d-flex pr-0 pt-0 pb-0">
<v-card class=" flex-column pik overflow-auto">
+11 -1
View File
@@ -1,19 +1,29 @@
<template>
<v-row >
<load-round/>
</v-row>
<!-- -->
</template>
<script>
import LoadRound from '@/components/load-round.vue'
import {pagecounter} from '@/utils/universal_functions'
export default {
components: {
LoadRound
},
setup(){
pagecounter()
}
}