This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2025-04-17 10:07:15 +07:00
parent bf175c7750
commit 8a5a9f3e20
4 changed files with 168 additions and 183 deletions

View file

@ -134,7 +134,7 @@ const columns = ref<QTableProps["columns"]>([
{
name: "posTypeName",
align: "left",
label: "ประเภทตำเเหน่ง",
label: "ตำแหน่งประเภท",
sortable: true,
field: "posTypeName",
headerStyle: "font-size: 14px",

View file

@ -7,28 +7,20 @@ import config from "@/app.config";
import { useCounterMixin } from "@/stores/mixin";
import { useOrganizational } from "@/modules/02_organization/store/organizational";
/**
* importType
*/
/** importType*/
import type { QTableProps } from "quasar";
import type { DataSortPos } from "@/modules/02_organization/interface/index/organizational";
/**
* importComponents
*/
/** importComponents*/
import DialogHeader from "@/components/DialogHeader.vue";
/**
* use
*/
/** use*/
const $q = useQuasar();
const store = useOrganizational();
const { dialogConfirm, showLoader, success, hideLoader, messageError } =
useCounterMixin();
/**
* props
*/
/** props*/
const modal = defineModel<boolean>("sortPosition", { required: true });
const props = defineProps({
fetchDataTable: Function,
@ -56,9 +48,7 @@ function onDrop(from: number, to: number) {
rows.value.splice(to, 0, rows.value.splice(from, 1)[0]);
}
/**
* function นทกการจดลำด
*/
/** function บันทึกการจัดลำดับ*/
function save() {
dialogConfirm($q, () => {
const data = rows.value;
@ -84,9 +74,7 @@ function save() {
});
}
/**
* function เรยกรายการขอมลตำแหน
*/
/** function เรียกรายการข้อมูลตำแหน่ง*/
function getData() {
showLoader();
http
@ -103,7 +91,7 @@ function getData() {
const dataList = res.data.result.data;
const dataMap = dataList.map((item: any) => ({
id: item.id,
name: `${item.orgShortname}${
name: `${item.orgShortname} ${
item.posMasterNoPrefix ? item.posMasterNoPrefix : ""
}${item.posMasterNo ? item.posMasterNo : ""}${
item.posMasterNoSuffix ? item.posMasterNoSuffix : ""
@ -123,9 +111,7 @@ function getData() {
});
}
/**
* callback function ทำงานเม modal = true ทำการเรยกขอมลตำแหน
*/
/** callback function ทำงานเมื่อ modal = true ทำการเรียกข้อมูลตำแหน่ง*/
watch(
() => modal.value,
() => {
@ -135,6 +121,7 @@ watch(
}
);
</script>
<template>
<template>
<q-dialog v-model="modal" persistent>