fix file .txt
This commit is contained in:
parent
8805627d43
commit
36e21c2e4e
3 changed files with 33 additions and 31 deletions
|
|
@ -28,7 +28,7 @@ import generateTxt from "@/plugins/generateTxt";
|
|||
const $q = useQuasar();
|
||||
const storeData = useDataStore();
|
||||
const { logData, size, searchAfter, systemName, date } = storeToRefs(storeData);
|
||||
const { date2Thai, messageError, hideLoader, dateToISO } = useCounterMixin();
|
||||
const { date2Thai, messageError, hideLoader, showLoader } = useCounterMixin();
|
||||
|
||||
const startTime = ref<Date | null>(null); // เวลาเริ่มต้น
|
||||
const endTime = ref<Date | null>(null); //เวลาสินสุด
|
||||
|
|
@ -463,21 +463,12 @@ function onSendCSV() {
|
|||
}
|
||||
|
||||
async function downloadTxt() {
|
||||
const queryString = {
|
||||
id: currentlogData.value?.id,
|
||||
};
|
||||
await http
|
||||
.get(`${config.API.log}/report/logsDetail`, {
|
||||
params: queryString,
|
||||
})
|
||||
.then(async (res) => {
|
||||
const data = res.data;
|
||||
await generateTxt(data, `LOG_${date2Thai(new Date(startDate.value))}`);
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {});
|
||||
if (currentlogData.value?.id) {
|
||||
await generateTxt(
|
||||
currentlogData.value?.id,
|
||||
`LOG_${date2Thai(new Date(startDate.value))}`
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
onBeforeMount(async () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue