fixing
This commit is contained in:
parent
a201594756
commit
216a3ff8d7
5 changed files with 78 additions and 9 deletions
|
|
@ -22,12 +22,13 @@ import DialogDataDiff from "@/modules/03_logs/components/DialogDataDiff.vue";
|
|||
const route = useRoute();
|
||||
|
||||
import type { ResLog } from "@/modules/03_logs/interface/response/Main";
|
||||
import generateTxt from "@/plugins/generateTxt";
|
||||
|
||||
/** use*/
|
||||
const $q = useQuasar();
|
||||
const storeData = useDataStore();
|
||||
const { logData, size, searchAfter, systemName, date } = storeToRefs(storeData);
|
||||
const { date2Thai, messageError, hideLoader,dateToISO } = useCounterMixin();
|
||||
const { date2Thai, messageError, hideLoader, dateToISO } = useCounterMixin();
|
||||
|
||||
const startTime = ref<Date | null>(null); // เวลาเริ่มต้น
|
||||
const endTime = ref<Date | null>(null); //เวลาสินสุด
|
||||
|
|
@ -452,16 +453,31 @@ function onSendCSV() {
|
|||
params: queryString,
|
||||
})
|
||||
.then((res) => {
|
||||
const data = res.data
|
||||
genReportXLSX(data,`LOG_${date2Thai(new Date(startDate.value))}`)
|
||||
const data = res.data;
|
||||
genReportXLSX(data, `LOG_${date2Thai(new Date(startDate.value))}`);
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {});
|
||||
}
|
||||
function onSend() {
|
||||
console.log(1);
|
||||
|
||||
function downloadTxt() {
|
||||
const queryString = {
|
||||
id: currentlogData.value?.id,
|
||||
};
|
||||
http
|
||||
.get(`${config.API.log}/report/logsDetail`, {
|
||||
params: queryString,
|
||||
})
|
||||
.then((res) => {
|
||||
const data = res.data;
|
||||
generateTxt(data, `LOG_${date2Thai(new Date(startDate.value))}`);
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {});
|
||||
}
|
||||
|
||||
onBeforeMount(async () => {
|
||||
|
|
@ -872,6 +888,7 @@ onMounted(async () => {
|
|||
() => {
|
||||
currentDataDiff = col.value;
|
||||
currentlogData = {
|
||||
id: props.row.id,
|
||||
startTimeStamp: props.row.startTimeStamp,
|
||||
username: props.row.userName,
|
||||
host: props.row.host,
|
||||
|
|
@ -911,7 +928,7 @@ onMounted(async () => {
|
|||
<DialogDataDiff
|
||||
v-model:open-dialog="openDialog"
|
||||
title="รายละเอียดข้อมูล"
|
||||
:onSend="onSend"
|
||||
:downloadTxt="downloadTxt"
|
||||
:close="
|
||||
() => {
|
||||
openDialog = false;
|
||||
|
|
@ -940,6 +957,7 @@ onMounted(async () => {
|
|||
>
|
||||
{{
|
||||
{
|
||||
id: "ID",
|
||||
startTimeStamp: "เวลา",
|
||||
username: "ผู้ใช้",
|
||||
host: "Host",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue