This commit is contained in:
iriska-gri committed 2024-05-06 17:02:18 +03:00
1 parent be6f3dbd2b
commit f804598e9e
4 files changed
+31 -31

No files matched your search

@@ -85,7 +85,7 @@
label="File input w/ chips"
chips
multiple
@change="onFileChange"
v-model="eventFiles"
></v-file-input>
<strong>Время:</strong>
@@ -157,27 +157,23 @@ export default {
}
};
const onFileChange = (event) => {
}
const confirmation = () => {
const sdata = new FormData();
sdata.append("dailyfiles", eventFiles.value[0]);
const postFile = new FormData()
const participants = dataToEdit.value.bigname;
console.log(sdata,
'sdata')
console.log(eventFiles.value[0],
'sdata1')
postFile.append("file", eventFiles.value[0]);
postFile.append("calendar", JSON.stringify(dataToEdit.value))
postFile.append("participants", JSON.stringify(dataToEdit.value.bigname))
axiosApiInstance
.post(`api/calendar_of_events/calendarEvents/`, {
participants: participants,
calendar: dataToEdit.value,
files: sdata,
.post(`api/calendar_of_events/calendarEvents/`,
// participants: dataToEdit.value.bigname,
// calendar: dataToEdit.value,
postFile
},
// {
// headers: {
// "Content-Type": "multipart/form-data"
+1
View File
@@ -77,6 +77,7 @@ export default {
const onPickFile = (ex) => {
const sdata = new FormData()
sdata.append('dailyfiles', dailyfiles.value[0])
axiosApiInstance.post(`api/general_vacation/dailyroundup/?excel=${ex}`, sdata).then(result => {
textFromAlert(result.data['mess'])
})