fix CurrentPage ===> รายการคำสั่ง
This commit is contained in:
parent
28c3c2273f
commit
07338cdb63
1 changed files with 11 additions and 0 deletions
|
|
@ -6,6 +6,7 @@ import { useRouter } from "vue-router";
|
|||
import { checkPermission } from "@/utils/permissions";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useCommandListStore } from "@/modules/18_command/store/ListStore";
|
||||
import { updateCurrentPage } from "@/utils/function";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
||||
|
|
@ -83,6 +84,11 @@ function onReCommand(id: string) {
|
|||
await http
|
||||
.put(config.API.commandAction(id, "resume"))
|
||||
.then(async () => {
|
||||
page.value = await updateCurrentPage(
|
||||
page.value,
|
||||
store.maxPage,
|
||||
store.rows.length
|
||||
);
|
||||
await fetchListCommand();
|
||||
success($q, "ดึงไปทำคำสั่งใหม่สำเร็จ");
|
||||
})
|
||||
|
|
@ -105,6 +111,11 @@ function onDeleteCommand(id: string) {
|
|||
await http
|
||||
.delete(config.API.command + `/${id}`)
|
||||
.then(async () => {
|
||||
page.value = await updateCurrentPage(
|
||||
page.value,
|
||||
store.maxPage,
|
||||
store.rows.length
|
||||
);
|
||||
await fetchListCommand();
|
||||
success($q, "ลบรายการสำเร็จ");
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue