Сохранит файл
This commit is contained in:
1 parent
5666c46de8
commit
bb27a5360b
4 files changed
+13
-3
No files matched your search
BIN
Binary file not shown.
@@ -8,6 +8,14 @@
|
||||
@click="excelOp">
|
||||
Excel
|
||||
</v-btn>
|
||||
<v-btn
|
||||
:href="`${baseURL}media/DailyRoundUp.xlsx`"
|
||||
download
|
||||
>
|
||||
Скачать
|
||||
</v-btn>
|
||||
|
||||
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
@@ -15,6 +23,7 @@
|
||||
|
||||
<script>
|
||||
import { ref } from 'vue'
|
||||
import { baseURL } from '@/utils/axios-api'
|
||||
import {getfromserver} from '@/utils/universal_functions'
|
||||
export default {
|
||||
setup(){
|
||||
@@ -25,7 +34,8 @@ export default {
|
||||
|
||||
return {
|
||||
visiting,
|
||||
excelOp
|
||||
excelOp,
|
||||
baseURL
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -200,12 +200,12 @@ class DailyRoundUpAPIView(APIView):
|
||||
|
||||
wb.save(file_path)
|
||||
|
||||
urllib.request.urlretrieve(file_path, 'Пупка.xlsx')
|
||||
# urllib.request.urlretrieve(file_path, 'Пупка.xlsx')
|
||||
|
||||
# file_path = 'media/DailyRoundUp.xlsx'
|
||||
|
||||
|
||||
return Response('')
|
||||
return Response(file_path)
|
||||
|
||||
# with ExcelWriter(file_path, mode="a" if os.path.exists(file_path) else "w" , if_sheet_exists='replace') as writer:
|
||||
# #
|
||||
|
||||
Binary file not shown.
Reference in new issue
Block a user