รายการออกคำสั่งย้ายสับเปลี่ยนตำแหน่ง (รอ API)

This commit is contained in:
STW_TTTY\stwtt 2024-06-12 14:37:02 +07:00
parent 49bb827226
commit aad0d88867
5 changed files with 69 additions and 94 deletions

View file

@ -2,7 +2,7 @@
import { ref, onMounted } from "vue";
import type { QTableProps } from "quasar";
import { useQuasar } from "quasar";
import { useRouter } from "vue-router";
import { useRoute, useRouter } from "vue-router";
import { useCounterMixin } from "@/stores/mixin";
import { useTransferDataStore } from "@/modules/05_placement/store";
@ -13,6 +13,12 @@ import config from "@/app.config";
import DialogOrgSelect from "@/components/Dialogs/DialogOrgSelect.vue";
import DialogEvalute from '@/modules/05_placement/components/ChangePosition/DialogChange.vue'
const router = useRouter();
const route = useRoute();
const id = ref<string>(
route.params.id ? route.params.id.toString() : ""
);
const modalDialog = ref<boolean>(false)
const posType = ref<string>("");
const posLevel = ref<string>("");
@ -34,7 +40,7 @@ const {
dialogRemove,
} = mixin;
const router = useRouter();
const rows = ref<any>([]);
const modalTree = ref<boolean>(false);
const personalId = ref<string>("");
@ -144,20 +150,20 @@ const addPerson = () => {
// API
const fecthLists = async () => {
// showLoader();
// rows.value = [];
// await http
// .get(config.API.appointmentMain())
// .then((res) => {
// let response = res.data.result;
// rows.value = response;
// })
// .catch((e) => {
// messageError($q, e);
// })
// .finally(() => {
// hideLoader();
// });
showLoader();
rows.value = [];
await http
.get(config.API.changePosition+`/${id.value}`)
.then((res) => {
let response = res.data.result;
rows.value = response;
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {
hideLoader();
});
rows.value = [
{
@ -598,8 +604,7 @@ onMounted(() => {
:onSubmit="onSave"
/>
<DialogEvalute
v-model:modal="modalDialog"/>
<DialogEvalute v-model:modal="modalDialog" />
</template>
<style scoped lang="scss"></style>