แปลง เวลา iso
This commit is contained in:
parent
a74089355f
commit
4a5f7b8389
1 changed files with 10 additions and 6 deletions
|
|
@ -1,6 +1,7 @@
|
||||||
import { defineStore } from "pinia";
|
import { defineStore } from "pinia";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
import moment from "moment";
|
||||||
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
|
|
@ -252,12 +253,12 @@ export const useDataStore = defineStore("systemStore", () => {
|
||||||
date: convertCronToForm(item.schedule, "date") || "",
|
date: convertCronToForm(item.schedule, "date") || "",
|
||||||
timeStartEvery:
|
timeStartEvery:
|
||||||
convertCronToForm(item.schedule, "timeStartEvery") || "",
|
convertCronToForm(item.schedule, "timeStartEvery") || "",
|
||||||
startAt: item.startAt,
|
startAt: moment(item.startAt)
|
||||||
|
.utcOffset(7)
|
||||||
|
.format("YYYY-MM-DD HH:mm"),
|
||||||
enabled: item.enabled,
|
enabled: item.enabled,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log(dataSchedule.value);
|
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
|
|
@ -280,11 +281,14 @@ export const useDataStore = defineStore("systemStore", () => {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async function editSchedule(data: ScheduleCreate) {
|
async function editSchedule(id: string, data: ScheduleCreate) {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.put(config.API.backup + "/schedule", {
|
.put(config.API.backup + "/schedule/" + id, {
|
||||||
data,
|
startAt: data.startAt !== undefined ? data.startAt : undefined,
|
||||||
|
enabled: data.enabled,
|
||||||
|
schedule: data.schedule,
|
||||||
|
name: data.name,
|
||||||
})
|
})
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
return res.data;
|
return res.data;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue