Добавить смену даты
This commit is contained in:
1 parent
da0d0b4dcb
commit
70243dd690
4 files changed
+28
-14
No files matched your search
@@ -56,7 +56,7 @@
|
||||
<!-- todayButton -->
|
||||
|
||||
<v-card class="h-100">
|
||||
<v-card-title class="text-center">События</v-card-title>
|
||||
<v-card-title class="text-center">События на {{dayformat(selectedDate)}}</v-card-title>
|
||||
<!-- <v-card-text>ddd</v-card-text> -->
|
||||
<vue-cal
|
||||
locale="ru"
|
||||
@@ -158,13 +158,27 @@ export default {
|
||||
|
||||
const selectedDate = ref(null)
|
||||
|
||||
function dayformat(days) {
|
||||
const d = new Date(days)
|
||||
const mess= 'сегодня'
|
||||
if (d.getFullYear() != '1970'){
|
||||
mess = d.getDate()
|
||||
}
|
||||
|
||||
// if d.getFullYear() == '1970': {
|
||||
// console.log(d, 'ddddddddddddddddddddddd');
|
||||
// }
|
||||
|
||||
return mess
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return { events, selectedDate, f_generalvacation }
|
||||
return { events, selectedDate, f_generalvacation, dayformat }
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<v-row class="flex-grow-0 align-self-end">
|
||||
<v-col class="d-flex">
|
||||
<v-card-subtitle class="mt-2 align-self-end">
|
||||
1. Скачать файл ежедневной статистики
|
||||
1. Скачать файл ежедневной статистики {{info}}
|
||||
</v-card-subtitle>
|
||||
<v-icon
|
||||
class="pt-2 pl-2"
|
||||
@@ -24,7 +24,7 @@
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-card-subtitle class="align-self-center ml-3">
|
||||
2. Загрузить данные на сервер
|
||||
2. Загрузить данные на сервер
|
||||
</v-card-subtitle>
|
||||
<v-col class="pr-0">
|
||||
|
||||
@@ -64,12 +64,12 @@
|
||||
width = "500"
|
||||
position="fixed"
|
||||
class="bottom-alert"
|
||||
:type='info.mess=="Файл загружен"?"success":"error"'
|
||||
:title='info.mess=="Файл загружен"?"Успеssх!":"Упс!"'
|
||||
:text="info.mess"
|
||||
:type='info=="Файл загружен"?"success":"error"'
|
||||
:title='info=="Файл загружен"?"Успех!":"Упс!"'
|
||||
:text="info"
|
||||
v-model="alert"
|
||||
|
||||
:color='info.mess=="Файл загружен"?"teal-accent-4":"error"'
|
||||
:color='info=="Файл загружен"?"teal-darken-2":"red-darken-2"'
|
||||
closable
|
||||
></v-alert>
|
||||
</v-row>
|
||||
@@ -94,7 +94,7 @@ export default {
|
||||
setup(){
|
||||
const dailyfiles = ref([])
|
||||
const visiting = ref({})
|
||||
const info = ref({})
|
||||
const info = ref('')
|
||||
const t_dailyRound = ref('')
|
||||
const alert = ref(false)
|
||||
|
||||
@@ -114,18 +114,19 @@ export default {
|
||||
|
||||
|
||||
const onPickFile = (ex) => {
|
||||
console.log(ex, 'sdata');
|
||||
|
||||
const sdata = new FormData()
|
||||
sdata.append('dailyfiles', dailyfiles.value[0])
|
||||
|
||||
axiosApiInstance.post(`api/general_vacation/dailyroundup/?excel=${ex}`, sdata).then(result => {
|
||||
info.value = result.data
|
||||
info.value = result.data['mess']
|
||||
console.log(info.value, '----------------result.data')
|
||||
})
|
||||
showInfo.value = true
|
||||
dailyfiles.value = []
|
||||
alert.value = true
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user