ข้อมูลหลัก => fix bug
This commit is contained in:
parent
0531cf2bb3
commit
0d04f6a3b5
13 changed files with 336 additions and 320 deletions
|
|
@ -158,6 +158,10 @@ const visibleColumns = ref<string[]>([
|
||||||
|
|
||||||
function closeDialog() {
|
function closeDialog() {
|
||||||
dialog.value = false;
|
dialog.value = false;
|
||||||
|
name.value = "";
|
||||||
|
isActive.value = false;
|
||||||
|
shortName.value = "";
|
||||||
|
note.value = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
function validateForm() {
|
function validateForm() {
|
||||||
|
|
@ -210,7 +214,7 @@ async function addData() {
|
||||||
name: name.value,
|
name: name.value,
|
||||||
isActive: isActive.value,
|
isActive: isActive.value,
|
||||||
shortName: shortName.value,
|
shortName: shortName.value,
|
||||||
note: note.value == "" ? "-" : note.value,
|
note: note.value == "" || note.value == null ? "" : note.value,
|
||||||
insigniaTypeId: id.value,
|
insigniaTypeId: id.value,
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
|
@ -231,7 +235,7 @@ async function editData(idData: string) {
|
||||||
name: name.value,
|
name: name.value,
|
||||||
isActive: isActive.value,
|
isActive: isActive.value,
|
||||||
shortName: shortName.value,
|
shortName: shortName.value,
|
||||||
note: note.value == "" ? "-" : note.value,
|
note: note.value == "" || note.value == null ? "" : note.value,
|
||||||
insigniaTypeId: id.value,
|
insigniaTypeId: id.value,
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
|
@ -261,8 +265,6 @@ async function deleteData(idData: string) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
import { defineEmits } from "vue";
|
|
||||||
|
|
||||||
const emit = defineEmits(["nameType"]);
|
const emit = defineEmits(["nameType"]);
|
||||||
const dialogOrder = ref<boolean>(false);
|
const dialogOrder = ref<boolean>(false);
|
||||||
</script>
|
</script>
|
||||||
|
|
@ -403,101 +405,105 @@ const dialogOrder = ref<boolean>(false);
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
</d-table>
|
</d-table>
|
||||||
|
|
||||||
<q-dialog v-model="dialog" class="dialog" persistent>
|
|
||||||
<q-card style="min-width: 350px">
|
|
||||||
<form @submit.prevent="validateForm">
|
|
||||||
<q-card-section class="flex justify-between" style="padding: 0">
|
|
||||||
<dialog-header
|
|
||||||
:tittle="dialogStatus == 'edit' ? 'แก้ไขข้อมูล' : 'เพิ่มข้อมูล'"
|
|
||||||
:close="closeDialog"
|
|
||||||
/>
|
|
||||||
</q-card-section>
|
|
||||||
|
|
||||||
<q-separator color="grey-4" />
|
|
||||||
<q-card-section class="q-pa-none">
|
|
||||||
<div class="col-12 q-ma-md">
|
|
||||||
<q-input
|
|
||||||
outlined
|
|
||||||
:model-value="insigniaTypeId"
|
|
||||||
label="ลำดับชั้นเครื่องราชฯ"
|
|
||||||
dense
|
|
||||||
lazy-rules
|
|
||||||
borderless
|
|
||||||
hide-bottom-space
|
|
||||||
readonly
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div class="col-12 q-ma-md">
|
|
||||||
<q-input
|
|
||||||
ref="nameRef"
|
|
||||||
outlined
|
|
||||||
v-model="name"
|
|
||||||
label="ชื่อเครื่องราชฯ"
|
|
||||||
dense
|
|
||||||
lazy-rules
|
|
||||||
borderless
|
|
||||||
:rules="[
|
|
||||||
(val) => val.length > 0 || 'กรุณากรอกลำดับชั้นเครื่องราชฯ',
|
|
||||||
]"
|
|
||||||
hide-bottom-space
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div class="col-12 q-ma-md">
|
|
||||||
<q-input
|
|
||||||
ref="shortNameRef"
|
|
||||||
outlined
|
|
||||||
v-model="shortName"
|
|
||||||
label="ชื่อย่อ"
|
|
||||||
dense
|
|
||||||
lazy-rules
|
|
||||||
borderless
|
|
||||||
:rules="[
|
|
||||||
(val) => val.length > 0 || 'กรุณากรอกลำดับชั้นเครื่องราชฯ',
|
|
||||||
]"
|
|
||||||
hide-bottom-space
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div class="col-12 q-ma-md">
|
|
||||||
<q-input
|
|
||||||
outlined
|
|
||||||
v-model="note"
|
|
||||||
label="หมายเหตุ"
|
|
||||||
dense
|
|
||||||
type="textarea"
|
|
||||||
borderless
|
|
||||||
hide-bottom-space
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
class="col q-ma-md q-pa-sm bg-white border_custom text-weight-medium"
|
|
||||||
>
|
|
||||||
<div class="row items-center q-my-sm justify-between">
|
|
||||||
<p class="q-ma-none">สถานะการใช้งาน</p>
|
|
||||||
<label class="toggle-control">
|
|
||||||
<input type="checkbox" dense v-model="isActive" @change="" />
|
|
||||||
<span class="control"></span>
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</q-card-section>
|
|
||||||
|
|
||||||
<q-card-actions align="right">
|
|
||||||
<q-btn
|
|
||||||
id="onSubmit"
|
|
||||||
type="submit"
|
|
||||||
dense
|
|
||||||
unelevated
|
|
||||||
label="บันทึก"
|
|
||||||
color="public"
|
|
||||||
>
|
|
||||||
<q-tooltip>บันทึกข้อมูล</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
</q-card-actions>
|
|
||||||
</form>
|
|
||||||
</q-card>
|
|
||||||
</q-dialog>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<q-dialog v-model="dialog" class="dialog" persistent>
|
||||||
|
<q-card style="min-width: 350px">
|
||||||
|
<form @submit.prevent="validateForm">
|
||||||
|
<q-card-section class="flex justify-between" style="padding: 0">
|
||||||
|
<dialog-header
|
||||||
|
:tittle="dialogStatus == 'edit' ? 'แก้ไขข้อมูล' : 'เพิ่มข้อมูล'"
|
||||||
|
:close="closeDialog"
|
||||||
|
/>
|
||||||
|
</q-card-section>
|
||||||
|
|
||||||
|
<q-separator color="grey-4" />
|
||||||
|
<q-card-section class="q-pa-none">
|
||||||
|
<div class="col-12 q-ma-md">
|
||||||
|
<q-input
|
||||||
|
outlined
|
||||||
|
:model-value="insigniaTypeId"
|
||||||
|
label="ลำดับชั้นเครื่องราชฯ"
|
||||||
|
dense
|
||||||
|
lazy-rules
|
||||||
|
borderless
|
||||||
|
hide-bottom-space
|
||||||
|
readonly
|
||||||
|
class="inputgreen"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 q-ma-md">
|
||||||
|
<q-input
|
||||||
|
ref="nameRef"
|
||||||
|
outlined
|
||||||
|
v-model="name"
|
||||||
|
label="ชื่อเครื่องราชฯ"
|
||||||
|
dense
|
||||||
|
lazy-rules
|
||||||
|
borderless
|
||||||
|
:rules="[
|
||||||
|
(val) => val.length > 0 || 'กรุณากรอกลำดับชั้นเครื่องราชฯ',
|
||||||
|
]"
|
||||||
|
hide-bottom-space
|
||||||
|
class="inputgreen"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 q-ma-md">
|
||||||
|
<q-input
|
||||||
|
ref="shortNameRef"
|
||||||
|
outlined
|
||||||
|
v-model="shortName"
|
||||||
|
label="ชื่อย่อ"
|
||||||
|
dense
|
||||||
|
lazy-rules
|
||||||
|
borderless
|
||||||
|
:rules="[
|
||||||
|
(val) => val.length > 0 || 'กรุณากรอกลำดับชั้นเครื่องราชฯ',
|
||||||
|
]"
|
||||||
|
hide-bottom-space
|
||||||
|
class="inputgreen"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 q-ma-md">
|
||||||
|
<q-input
|
||||||
|
outlined
|
||||||
|
v-model="note"
|
||||||
|
label="หมายเหตุ"
|
||||||
|
dense
|
||||||
|
type="textarea"
|
||||||
|
borderless
|
||||||
|
hide-bottom-space
|
||||||
|
class="inputgreen"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="col q-ma-md q-pa-sm bg-white border_custom text-weight-medium"
|
||||||
|
>
|
||||||
|
<div class="row items-center q-my-sm justify-between">
|
||||||
|
<p class="q-ma-none">สถานะการใช้งาน</p>
|
||||||
|
<label class="toggle-control">
|
||||||
|
<input type="checkbox" dense v-model="isActive" @change="" />
|
||||||
|
<span class="control"></span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</q-card-section>
|
||||||
|
|
||||||
|
<q-card-actions align="right">
|
||||||
|
<q-btn
|
||||||
|
id="onSubmit"
|
||||||
|
type="submit"
|
||||||
|
dense
|
||||||
|
unelevated
|
||||||
|
label="บันทึก"
|
||||||
|
color="public"
|
||||||
|
>
|
||||||
|
<q-tooltip>บันทึกข้อมูล</q-tooltip>
|
||||||
|
</q-btn>
|
||||||
|
</q-card-actions>
|
||||||
|
</form>
|
||||||
|
</q-card>
|
||||||
|
</q-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|
|
||||||
|
|
@ -116,6 +116,8 @@ onMounted(async () => {
|
||||||
|
|
||||||
function closeDialog() {
|
function closeDialog() {
|
||||||
dialog.value = false;
|
dialog.value = false;
|
||||||
|
name.value = "";
|
||||||
|
isActive.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function onclickDetail(id: string) {
|
function onclickDetail(id: string) {
|
||||||
|
|
@ -339,6 +341,7 @@ async function onSubmit() {
|
||||||
(val) => val.length > 0 || 'กรุณากรอกลำดับชั้นเครื่องราชฯ',
|
(val) => val.length > 0 || 'กรุณากรอกลำดับชั้นเครื่องราชฯ',
|
||||||
]"
|
]"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
|
class="inputgreen"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,25 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted } from "vue";
|
import { ref, onMounted } from "vue";
|
||||||
import type { QTableProps } from "quasar";
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
|
||||||
import { usePersonalDataStore } from "@/modules/01_metadata/stores/personalStore";
|
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import DialogForm from "@/modules/01_metadata/components/personal/DialogForm.vue";
|
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
||||||
|
/** importType*/
|
||||||
|
import type { QTableProps } from "quasar";
|
||||||
|
|
||||||
|
/** importComponents*/
|
||||||
|
import DialogForm from "@/modules/01_metadata/components/personal/DialogForm.vue";
|
||||||
|
|
||||||
|
/** importStore*/
|
||||||
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
import { usePersonalDataStore } from "@/modules/01_metadata/stores/personalStore";
|
||||||
|
|
||||||
|
const $q = useQuasar();
|
||||||
|
const store = usePersonalDataStore();
|
||||||
|
const mixin = useCounterMixin();
|
||||||
|
const { dialogRemove, messageError, showLoader, hideLoader, success } = mixin;
|
||||||
|
|
||||||
|
/** Table*/
|
||||||
const TABLE_COLUMNS = [
|
const TABLE_COLUMNS = [
|
||||||
{
|
{
|
||||||
name: "prefix",
|
name: "prefix",
|
||||||
|
|
@ -53,11 +66,12 @@ const TABLE_COLUMNS = [
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
},
|
},
|
||||||
] as const satisfies QTableProps["columns"];
|
] as const satisfies QTableProps["columns"];
|
||||||
|
const visibleColumns = ref<string[]>([
|
||||||
const $q = useQuasar();
|
"prefix",
|
||||||
const store = usePersonalDataStore();
|
"createdAt",
|
||||||
const mixin = useCounterMixin();
|
"lastUpdatedAt",
|
||||||
const { dialogRemove, messageError, showLoader, hideLoader, success } = mixin;
|
"lastUpdateFullName",
|
||||||
|
]);
|
||||||
|
|
||||||
const filterKeyword = ref<string>("");
|
const filterKeyword = ref<string>("");
|
||||||
const dialog = ref<boolean>(false);
|
const dialog = ref<boolean>(false);
|
||||||
|
|
@ -65,12 +79,6 @@ const prefix = ref<string>("");
|
||||||
const editId = ref<string>("");
|
const editId = ref<string>("");
|
||||||
const dialogStatus = ref<string>("");
|
const dialogStatus = ref<string>("");
|
||||||
const personalName = ref<string>("คำนำหน้าชื่อ");
|
const personalName = ref<string>("คำนำหน้าชื่อ");
|
||||||
const visibleColumns = ref<string[]>([
|
|
||||||
"prefix",
|
|
||||||
"createdAt",
|
|
||||||
"lastUpdatedAt",
|
|
||||||
"lastUpdateFullName",
|
|
||||||
]);
|
|
||||||
|
|
||||||
async function fetchData() {
|
async function fetchData() {
|
||||||
showLoader();
|
showLoader();
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,19 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
|
||||||
import dialogHeader from "@/components/DialogHeader.vue";
|
|
||||||
import { QInput, useQuasar } from "quasar";
|
import { QInput, useQuasar } from "quasar";
|
||||||
|
|
||||||
|
/** importComponents*/
|
||||||
|
import dialogHeader from "@/components/DialogHeader.vue";
|
||||||
|
|
||||||
|
/** importStore*/
|
||||||
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
|
/** use*/
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { dialogConfirm } = mixin;
|
const { dialogConfirm } = mixin;
|
||||||
|
|
||||||
const dataRef = ref<QInput | null>(null);
|
/** props*/
|
||||||
const zipCodeRef = ref<QInput | null>(null);
|
|
||||||
const educationRankRef = ref<QInput | null>(null);
|
|
||||||
const data = defineModel<string>("data", {
|
const data = defineModel<string>("data", {
|
||||||
required: true,
|
required: true,
|
||||||
});
|
});
|
||||||
|
|
@ -34,8 +37,13 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const dataRef = ref<QInput | null>(null);
|
||||||
|
const zipCodeRef = ref<QInput | null>(null);
|
||||||
|
const educationRankRef = ref<QInput | null>(null);
|
||||||
|
|
||||||
function closeDialog() {
|
function closeDialog() {
|
||||||
dialog.value = false;
|
dialog.value = false;
|
||||||
|
data.value = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
function validateForm() {
|
function validateForm() {
|
||||||
|
|
@ -54,7 +62,6 @@ async function onSubmit() {
|
||||||
? props.addData()
|
? props.addData()
|
||||||
: props.editData(editId.value);
|
: props.editData(editId.value);
|
||||||
closeDialog();
|
closeDialog();
|
||||||
data.value = "";
|
|
||||||
educationRank.value = undefined;
|
educationRank.value = undefined;
|
||||||
},
|
},
|
||||||
"ยืนยันการบันทึกข้อมูล",
|
"ยืนยันการบันทึกข้อมูล",
|
||||||
|
|
@ -109,6 +116,7 @@ async function onSubmit() {
|
||||||
min="1"
|
min="1"
|
||||||
:rules="[(val) => val != undefined || 'กรุณากรอกลำดับ']"
|
:rules="[(val) => val != undefined || 'กรุณากรอกลำดับ']"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
|
class="inputgreen"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
|
|
|
||||||
|
|
@ -430,6 +430,7 @@ onMounted(() => {
|
||||||
lazy-rules
|
lazy-rules
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอกชื่อตำแหน่ง'}`]"
|
:rules="[(val) => !!val || `${'กรุณากรอกชื่อตำแหน่ง'}`]"
|
||||||
|
class="inputgreen"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -449,6 +450,7 @@ onMounted(() => {
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:rules="[(val) => !!val || `${'กรุณาเลือกกลุ่มงาน'}`]"
|
:rules="[(val) => !!val || `${'กรุณาเลือกกลุ่มงาน'}`]"
|
||||||
@update:model-value="updatePosTypeName"
|
@update:model-value="updatePosTypeName"
|
||||||
|
class="inputgreen"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -468,6 +470,7 @@ onMounted(() => {
|
||||||
lazy-rules
|
lazy-rules
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:rules="[(val) => !!val || `${'กรุณาเลือกระดับชั้นงาน'}`]"
|
:rules="[(val) => !!val || `${'กรุณาเลือกระดับชั้นงาน'}`]"
|
||||||
|
class="inputgreen"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -317,6 +317,8 @@ onMounted(() => {
|
||||||
bg-color="white"
|
bg-color="white"
|
||||||
:rules="[(val) => val.length > 0 || 'กรุณากรอกชื่อกลุ่มงาน']"
|
:rules="[(val) => val.length > 0 || 'กรุณากรอกชื่อกลุ่มงาน']"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
|
class="inputgreen"
|
||||||
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -331,6 +333,8 @@ onMounted(() => {
|
||||||
lazy-rules
|
lazy-rules
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอกอักษรย่อกลุ่มงาน'}`]"
|
:rules="[(val) => !!val || `${'กรุณากรอกอักษรย่อกลุ่มงาน'}`]"
|
||||||
|
class="inputgreen"
|
||||||
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -348,6 +352,8 @@ onMounted(() => {
|
||||||
:rules="[(val) => val != undefined || 'กรุณากรอกระดับกลุ่มงาน']"
|
:rules="[(val) => val != undefined || 'กรุณากรอกระดับกลุ่มงาน']"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
mask="############"
|
mask="############"
|
||||||
|
class="inputgreen"
|
||||||
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
|
|
|
||||||
|
|
@ -1,53 +1,27 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive, onMounted } from "vue";
|
import { ref, reactive, onMounted } from "vue";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useQuasar } from "quasar";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import { useQuasar } from "quasar";
|
|
||||||
|
import type { QTableProps } from "quasar";
|
||||||
import type {
|
import type {
|
||||||
DataOption,
|
DataOption,
|
||||||
FormPositionSelect,
|
FormPositionSelect,
|
||||||
ListMenu,
|
|
||||||
RowDetailPositions,
|
RowDetailPositions,
|
||||||
} from "@/modules/01_metadata/interface/request/position/index";
|
} from "@/modules/01_metadata/interface/request/position/index";
|
||||||
import type { QTableProps } from "quasar";
|
|
||||||
import DialogAddPosition from "@/modules/01_metadata/components/position/DialogAddPosition.vue";
|
import DialogAddPosition from "@/modules/01_metadata/components/position/DialogAddPosition.vue";
|
||||||
|
|
||||||
const editPosition = ref<boolean>(false);
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
const modalAddPosition = ref<boolean>(false);
|
|
||||||
const levelOpsMain = ref<DataOption[]>([]);
|
|
||||||
const dataLevel = ref<any>();
|
|
||||||
const levelOps = ref<DataOption[]>([]);
|
|
||||||
|
|
||||||
const isSpecial = ref<boolean>(false);
|
const $q = useQuasar();
|
||||||
const formPositionSelect = reactive<FormPositionSelect>({
|
const rowsPositionSelect = ref<RowDetailPositions[]>([]);
|
||||||
positionId: "",
|
const mixin = useCounterMixin();
|
||||||
posTypeId: "",
|
const { showLoader, hideLoader, messageError, success, dialogRemove } = mixin;
|
||||||
positionName: "",
|
|
||||||
positionField: "",
|
|
||||||
positionType: "",
|
|
||||||
positionLevel: "",
|
|
||||||
positionExecutive: "",
|
|
||||||
positionExecutiveField: "",
|
|
||||||
positionArea: "",
|
|
||||||
isSpecial: false,
|
|
||||||
});
|
|
||||||
|
|
||||||
|
/** Table*/
|
||||||
const rows = ref<RowDetailPositions[]>([]);
|
const rows = ref<RowDetailPositions[]>([]);
|
||||||
const listMenu = ref<ListMenu[]>([
|
|
||||||
{
|
|
||||||
label: "คัดลอก",
|
|
||||||
icon: "mdi-content-copy",
|
|
||||||
type: "copy",
|
|
||||||
color: "blue-6",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "ลบ",
|
|
||||||
icon: "delete",
|
|
||||||
type: "remove",
|
|
||||||
color: "red",
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
const columns = ref<QTableProps["columns"]>([
|
const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "no",
|
name: "no",
|
||||||
|
|
@ -133,17 +107,22 @@ const visibleColumns = ref<string[]>([
|
||||||
"positionArea",
|
"positionArea",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const $q = useQuasar();
|
const formPositionSelect = reactive<FormPositionSelect>({
|
||||||
const rowsPositionSelect = ref<RowDetailPositions[]>([]);
|
positionId: "",
|
||||||
const mixin = useCounterMixin();
|
posTypeId: "",
|
||||||
const {
|
positionName: "",
|
||||||
dialogConfirm,
|
positionField: "",
|
||||||
showLoader,
|
positionType: "",
|
||||||
hideLoader,
|
positionLevel: "",
|
||||||
messageError,
|
positionExecutive: "",
|
||||||
success,
|
positionExecutiveField: "",
|
||||||
dialogRemove,
|
positionArea: "",
|
||||||
} = mixin;
|
isSpecial: false,
|
||||||
|
});
|
||||||
|
const editPosition = ref<boolean>(false);
|
||||||
|
const copyPosition = ref<boolean>(false);
|
||||||
|
|
||||||
|
const modalAddPosition = ref<boolean>(false);
|
||||||
|
|
||||||
/** input ค้นหา */
|
/** input ค้นหา */
|
||||||
const searchRef = ref<any>(null);
|
const searchRef = ref<any>(null);
|
||||||
|
|
@ -175,13 +154,13 @@ function copyDetiail(data: RowDetailPositions) {
|
||||||
formPositionSelect.positionExecutiveField = data.positionExecutiveField;
|
formPositionSelect.positionExecutiveField = data.positionExecutiveField;
|
||||||
formPositionSelect.positionArea = data.positionArea;
|
formPositionSelect.positionArea = data.positionArea;
|
||||||
modalAddPosition.value = true;
|
modalAddPosition.value = true;
|
||||||
|
copyPosition.value = true;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* แก้ไขข้อมูล
|
* แก้ไขข้อมูล
|
||||||
* @param data ข้อมูลตำแหน่ง
|
* @param data ข้อมูลตำแหน่ง
|
||||||
*/
|
*/
|
||||||
function editDetiail(data: RowDetailPositions) {
|
function editDetiail(data: RowDetailPositions) {
|
||||||
console.log(data);
|
|
||||||
formPositionSelect.positionId = data.id;
|
formPositionSelect.positionId = data.id;
|
||||||
formPositionSelect.posTypeId = data.posTypeId;
|
formPositionSelect.posTypeId = data.posTypeId;
|
||||||
formPositionSelect.positionName = data.positionName;
|
formPositionSelect.positionName = data.positionName;
|
||||||
|
|
@ -438,10 +417,14 @@ onMounted(() => {
|
||||||
</template>
|
</template>
|
||||||
</d-table>
|
</d-table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
copyPosition
|
||||||
<DialogAddPosition
|
<DialogAddPosition
|
||||||
v-model:add-position="modalAddPosition"
|
v-model:add-position="modalAddPosition"
|
||||||
v-model:form-data="formPositionSelect"
|
v-model:form-data="formPositionSelect"
|
||||||
v-model:edit-check="editPosition"
|
v-model:edit-check="editPosition"
|
||||||
|
v-model:copy-check="copyPosition"
|
||||||
|
|
||||||
:get-data="searchInput"
|
:get-data="searchInput"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -162,6 +162,8 @@ onMounted(async () => {
|
||||||
|
|
||||||
function closeDialog() {
|
function closeDialog() {
|
||||||
dialog.value = false;
|
dialog.value = false;
|
||||||
|
posTypeName.value = "";
|
||||||
|
posTypeRank.value = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
function onclickDetail(id: string) {
|
function onclickDetail(id: string) {
|
||||||
|
|
@ -322,6 +324,7 @@ async function onSubmit() {
|
||||||
borderless
|
borderless
|
||||||
:rules="[(val) => val.length > 0 || 'กรุณากรอกประเภทตำแหน่ง']"
|
:rules="[(val) => val.length > 0 || 'กรุณากรอกประเภทตำแหน่ง']"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
|
class="inputgreen"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 q-ma-md">
|
<div class="col-12 q-ma-md">
|
||||||
|
|
@ -337,6 +340,8 @@ async function onSubmit() {
|
||||||
:rules="[(val) => val != undefined || 'กรุณากรอกระดับตำแหน่ง']"
|
:rules="[(val) => val != undefined || 'กรุณากรอกระดับตำแหน่ง']"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
mask="############"
|
mask="############"
|
||||||
|
class="inputgreen"
|
||||||
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
|
|
|
||||||
|
|
@ -375,101 +375,109 @@ onMounted(async () => {
|
||||||
</template>
|
</template>
|
||||||
</d-table>
|
</d-table>
|
||||||
|
|
||||||
<q-dialog v-model="dialog" class="dialog" persistent>
|
|
||||||
<q-card style="width: 350px">
|
|
||||||
<form @submit.prevent="validateForm">
|
|
||||||
<q-card-section class="flex justify-between" style="padding: 0">
|
|
||||||
<dialog-header
|
|
||||||
:tittle="dialogStatus == 'edit' ? 'แก้ไขข้อมูล' : 'เพิ่มข้อมูล'"
|
|
||||||
:close="closeDialog"
|
|
||||||
/>
|
|
||||||
</q-card-section>
|
|
||||||
|
|
||||||
<q-separator color="grey-4" />
|
|
||||||
<q-card-section class="row q-gutter-y-md">
|
|
||||||
<div class="col-12">
|
|
||||||
<q-input
|
|
||||||
outlined
|
|
||||||
ref="posLevelNameRef"
|
|
||||||
v-model="posLevelName"
|
|
||||||
label="ชื่อระดับตำแหน่ง"
|
|
||||||
dense
|
|
||||||
lazy-rules
|
|
||||||
borderless
|
|
||||||
bg-color="white"
|
|
||||||
hide-bottom-space
|
|
||||||
:rules="[(val) => val.length > 0 || 'กรุณากรอกระดับตำแหน่ง']"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-12">
|
|
||||||
<q-input
|
|
||||||
ref="posLevelRankRef"
|
|
||||||
outlined
|
|
||||||
v-model="posLevelRank"
|
|
||||||
label="ระดับ"
|
|
||||||
dense
|
|
||||||
lazy-rules
|
|
||||||
borderless
|
|
||||||
min="1"
|
|
||||||
bg-color="white"
|
|
||||||
:rules="[(val) => val > 0 || 'กรุณากรอกระดับ']"
|
|
||||||
hide-bottom-space
|
|
||||||
mask="############"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-12">
|
|
||||||
<q-select
|
|
||||||
ref="posLevelAuthorityRef"
|
|
||||||
outlined
|
|
||||||
v-model="posLevelAuthority"
|
|
||||||
emit-value
|
|
||||||
map-options
|
|
||||||
:options="storeOption.posLevelAuthorityOption"
|
|
||||||
option-value="id"
|
|
||||||
label="ผู้มีอำนาจสั่งบรรจุ"
|
|
||||||
dense
|
|
||||||
lazy-rules
|
|
||||||
:rules="[(val) => !!val || 'กรุณาเลือกผู้มีอำนาจสั่งบรรจุ']"
|
|
||||||
borderless
|
|
||||||
bg-color="white"
|
|
||||||
hide-bottom-space
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-12">
|
|
||||||
<q-select
|
|
||||||
ref="posTypeIdRef"
|
|
||||||
v-model="posName"
|
|
||||||
label="ประเภทตำแหน่ง"
|
|
||||||
outlined
|
|
||||||
dense
|
|
||||||
bg-color="white"
|
|
||||||
options-cover
|
|
||||||
hide-bottom-space
|
|
||||||
readonly
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</q-card-section>
|
|
||||||
|
|
||||||
<q-card-actions align="right">
|
|
||||||
<q-btn
|
|
||||||
id="onSubmit"
|
|
||||||
type="submit"
|
|
||||||
dense
|
|
||||||
unelevated
|
|
||||||
label="บันทึก"
|
|
||||||
color="public"
|
|
||||||
class="q-px-md"
|
|
||||||
>
|
|
||||||
<q-tooltip>บันทึกข้อมูล</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
</q-card-actions>
|
|
||||||
</form>
|
|
||||||
</q-card>
|
|
||||||
</q-dialog>
|
|
||||||
</div>
|
</div>
|
||||||
|
<q-dialog v-model="dialog" class="dialog" persistent>
|
||||||
|
<q-card style="width: 350px">
|
||||||
|
<form @submit.prevent="validateForm">
|
||||||
|
<q-card-section class="flex justify-between" style="padding: 0">
|
||||||
|
<dialog-header
|
||||||
|
:tittle="dialogStatus == 'edit' ? 'แก้ไขข้อมูล' : 'เพิ่มข้อมูล'"
|
||||||
|
:close="closeDialog"
|
||||||
|
/>
|
||||||
|
</q-card-section>
|
||||||
|
|
||||||
|
<q-separator color="grey-4" />
|
||||||
|
<q-card-section class="row q-gutter-y-md">
|
||||||
|
<div class="col-12">
|
||||||
|
<q-input
|
||||||
|
outlined
|
||||||
|
ref="posLevelNameRef"
|
||||||
|
v-model="posLevelName"
|
||||||
|
label="ชื่อระดับตำแหน่ง"
|
||||||
|
dense
|
||||||
|
lazy-rules
|
||||||
|
borderless
|
||||||
|
bg-color="white"
|
||||||
|
hide-bottom-space
|
||||||
|
:rules="[(val) => val.length > 0 || 'กรุณากรอกระดับตำแหน่ง']"
|
||||||
|
class="inputgreen"
|
||||||
|
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-12">
|
||||||
|
<q-input
|
||||||
|
ref="posLevelRankRef"
|
||||||
|
outlined
|
||||||
|
v-model="posLevelRank"
|
||||||
|
label="ระดับ"
|
||||||
|
dense
|
||||||
|
lazy-rules
|
||||||
|
borderless
|
||||||
|
min="1"
|
||||||
|
bg-color="white"
|
||||||
|
:rules="[(val) => val > 0 || 'กรุณากรอกระดับ']"
|
||||||
|
hide-bottom-space
|
||||||
|
mask="############"
|
||||||
|
class="inputgreen"
|
||||||
|
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-12">
|
||||||
|
<q-select
|
||||||
|
ref="posLevelAuthorityRef"
|
||||||
|
outlined
|
||||||
|
v-model="posLevelAuthority"
|
||||||
|
emit-value
|
||||||
|
map-options
|
||||||
|
:options="storeOption.posLevelAuthorityOption"
|
||||||
|
option-value="id"
|
||||||
|
label="ผู้มีอำนาจสั่งบรรจุ"
|
||||||
|
dense
|
||||||
|
lazy-rules
|
||||||
|
:rules="[(val) => !!val || 'กรุณาเลือกผู้มีอำนาจสั่งบรรจุ']"
|
||||||
|
borderless
|
||||||
|
bg-color="white"
|
||||||
|
hide-bottom-space
|
||||||
|
class="inputgreen"
|
||||||
|
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-12">
|
||||||
|
<q-select
|
||||||
|
ref="posTypeIdRef"
|
||||||
|
v-model="posName"
|
||||||
|
label="ประเภทตำแหน่ง"
|
||||||
|
outlined
|
||||||
|
dense
|
||||||
|
bg-color="white"
|
||||||
|
options-cover
|
||||||
|
hide-bottom-space
|
||||||
|
readonly
|
||||||
|
class="inputgreen"
|
||||||
|
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</q-card-section>
|
||||||
|
|
||||||
|
<q-card-actions align="right">
|
||||||
|
<q-btn
|
||||||
|
id="onSubmit"
|
||||||
|
type="submit"
|
||||||
|
dense
|
||||||
|
unelevated
|
||||||
|
label="บันทึก"
|
||||||
|
color="public"
|
||||||
|
class="q-px-md"
|
||||||
|
>
|
||||||
|
<q-tooltip>บันทึกข้อมูล</q-tooltip>
|
||||||
|
</q-btn>
|
||||||
|
</q-card-actions>
|
||||||
|
</form>
|
||||||
|
</q-card>
|
||||||
|
</q-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|
|
||||||
|
|
@ -3,17 +3,19 @@ import { ref, reactive, watch, defineProps } from "vue";
|
||||||
import { useQuasar } from "quasar";
|
import { useQuasar } from "quasar";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import type { QTableProps } from "quasar";
|
|
||||||
import DialogHeader from "@/components/DialogHeader.vue";
|
|
||||||
import type {
|
import type {
|
||||||
DataOption,
|
DataOption,
|
||||||
FormPositionSelectDialog,
|
FormPositionSelectDialog,
|
||||||
FormPositionSelectRef,
|
|
||||||
OptionType,
|
OptionType,
|
||||||
OptionLevel,
|
OptionLevel,
|
||||||
OptionExecutive,
|
OptionExecutive,
|
||||||
} from "@/modules/01_metadata/interface/request/position/index";
|
} from "@/modules/01_metadata/interface/request/position/index";
|
||||||
|
|
||||||
|
import DialogHeader from "@/components/DialogHeader.vue";
|
||||||
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
const executiveOpsMain = ref<DataOption[]>([]);
|
const executiveOpsMain = ref<DataOption[]>([]);
|
||||||
const levelOps = ref<DataOption[]>([]);
|
const levelOps = ref<DataOption[]>([]);
|
||||||
const levelOpsMain = ref<DataOption[]>([]);
|
const levelOpsMain = ref<DataOption[]>([]);
|
||||||
|
|
@ -43,50 +45,31 @@ const isReadonly = ref<boolean>(false); // อ่านได้อย่าง
|
||||||
const modal = defineModel<boolean>("addPosition", { required: true });
|
const modal = defineModel<boolean>("addPosition", { required: true });
|
||||||
const formData = defineModel<any>("formData", { required: true });
|
const formData = defineModel<any>("formData", { required: true });
|
||||||
const editCheck = defineModel<boolean>("editCheck", { required: true });
|
const editCheck = defineModel<boolean>("editCheck", { required: true });
|
||||||
|
const copyCheck = defineModel<boolean>("copyCheck", { required: true });
|
||||||
const positionNameRef = ref<Object | null>(null);
|
|
||||||
const positionFieldRef = ref<Object | null>(null);
|
|
||||||
const positionTypeRef = ref<Object | null>(null);
|
|
||||||
const positionLevelRef = ref<Object | null>(null);
|
|
||||||
const positionExecutiveRef = ref<Object | null>(null);
|
|
||||||
const positionExecutiveFieldRef = ref<Object | null>(null);
|
|
||||||
const positionAreaRef = ref<Object | null>(null);
|
|
||||||
|
|
||||||
const objectPositionSelectRef: FormPositionSelectRef = {
|
|
||||||
positionName: positionNameRef,
|
|
||||||
positionField: positionFieldRef,
|
|
||||||
positionType: positionTypeRef,
|
|
||||||
positionLevel: positionLevelRef,
|
|
||||||
positionExecutive: positionExecutiveRef,
|
|
||||||
positionExecutiveField: positionExecutiveFieldRef,
|
|
||||||
positionArea: positionAreaRef,
|
|
||||||
};
|
|
||||||
|
|
||||||
/** ฟังก์ชั่นตรวจสอบความถูกต้องของข้อมูลในฟอร์ม */
|
/** ฟังก์ชั่นตรวจสอบความถูกต้องของข้อมูลในฟอร์ม */
|
||||||
function validateFormPositionEdit() {
|
function validateFormPositionEdit() {
|
||||||
const hasError = [];
|
// const hasError = [];
|
||||||
for (const key in objectPositionSelectRef) {
|
// for (const key in objectPositionSelectRef) {
|
||||||
if (Object.prototype.hasOwnProperty.call(objectPositionSelectRef, key)) {
|
// if (Object.prototype.hasOwnProperty.call(objectPositionSelectRef, key)) {
|
||||||
const property = objectPositionSelectRef[key];
|
// const property = objectPositionSelectRef[key];
|
||||||
if (property.value && typeof property.value.validate === "function") {
|
// if (property.value && typeof property.value.validate === "function") {
|
||||||
const isValid = property.value.validate();
|
// const isValid = property.value.validate();
|
||||||
hasError.push(isValid);
|
// hasError.push(isValid);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
if (hasError.every((result) => result === true)) {
|
// if (hasError.every((result) => result === true)) {
|
||||||
if (editCheck.value == true) {
|
if (editCheck.value == true) {
|
||||||
saveSelectEdit();
|
saveSelectEdit();
|
||||||
} else {
|
} else {
|
||||||
onSubmitSelectEdit();
|
onSubmitSelectEdit();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
/** ฟังชั่น บันทึก */
|
/** ฟังชั่น บันทึก */
|
||||||
function saveSelectEdit() {
|
function saveSelectEdit() {
|
||||||
console.log(formPositionSelect.positionExecutive);
|
|
||||||
console.log(formPositionSelect.positionArea);
|
|
||||||
dialogConfirm(
|
dialogConfirm(
|
||||||
$q,
|
$q,
|
||||||
async () => {
|
async () => {
|
||||||
|
|
@ -197,7 +180,9 @@ async function fetchType() {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
hideLoader();
|
setTimeout(() => {
|
||||||
|
hideLoader();
|
||||||
|
}, 1000);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -217,7 +202,9 @@ async function fetchExecutive() {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
hideLoader();
|
setTimeout(() => {
|
||||||
|
hideLoader();
|
||||||
|
}, 1000);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -227,7 +214,7 @@ watch(
|
||||||
if (modal.value == true) {
|
if (modal.value == true) {
|
||||||
fetchType();
|
fetchType();
|
||||||
fetchExecutive();
|
fetchExecutive();
|
||||||
if (formData.value) {
|
if (editCheck.value || copyCheck.value) {
|
||||||
const dataList = formData.value;
|
const dataList = formData.value;
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
updateSelectType(dataList.posTypeId);
|
updateSelectType(dataList.posTypeId);
|
||||||
|
|
@ -259,13 +246,15 @@ function updateSelectType(val: string) {
|
||||||
function close() {
|
function close() {
|
||||||
modal.value = false;
|
modal.value = false;
|
||||||
editCheck.value = false;
|
editCheck.value = false;
|
||||||
|
copyCheck.value = false;
|
||||||
|
clearFormPositionSelect();
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<q-dialog v-model="modal" persistent>
|
<q-dialog v-model="modal" persistent>
|
||||||
<q-card style="min-width: 50vw">
|
<q-card style="min-width: 50vw">
|
||||||
<form @submit.prevent="validateFormPositionEdit">
|
<q-form greedy @submit.prevent="validateFormPositionEdit">
|
||||||
<DialogHeader
|
<DialogHeader
|
||||||
:tittle="`${editCheck ? 'แก้ไขข้อมูลตำแหน่ง' : 'เพิ่มข้อมูลตำแหน่ง'}`"
|
:tittle="`${editCheck ? 'แก้ไขข้อมูลตำแหน่ง' : 'เพิ่มข้อมูลตำแหน่ง'}`"
|
||||||
:close="close"
|
:close="close"
|
||||||
|
|
@ -398,7 +387,7 @@ function close() {
|
||||||
<q-card-actions align="right" class="bg-white text-teal">
|
<q-card-actions align="right" class="bg-white text-teal">
|
||||||
<q-btn type="submit" :label="`บันทึก`" color="public" />
|
<q-btn type="submit" :label="`บันทึก`" color="public" />
|
||||||
</q-card-actions>
|
</q-card-actions>
|
||||||
</form>
|
</q-form>
|
||||||
</q-card>
|
</q-card>
|
||||||
</q-dialog>
|
</q-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -25,16 +25,6 @@ interface FormPositionEmployeeSelectDialog {
|
||||||
positionLevel: string;
|
positionLevel: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface FormPositionSelectRef {
|
|
||||||
positionName: object | null;
|
|
||||||
positionField: object | null;
|
|
||||||
positionType: object | null;
|
|
||||||
positionLevel: object | null;
|
|
||||||
positionExecutive: object | null;
|
|
||||||
positionExecutiveField: object | null;
|
|
||||||
positionArea: object | null;
|
|
||||||
[key: string]: any;
|
|
||||||
}
|
|
||||||
interface FormPositionEmployeeSelectRef {
|
interface FormPositionEmployeeSelectRef {
|
||||||
positionName: object | null;
|
positionName: object | null;
|
||||||
positionType: object | null;
|
positionType: object | null;
|
||||||
|
|
@ -108,7 +98,6 @@ export type {
|
||||||
Pagination,
|
Pagination,
|
||||||
DataOption,
|
DataOption,
|
||||||
FormPositionSelect,
|
FormPositionSelect,
|
||||||
FormPositionSelectRef,
|
|
||||||
OptionType,
|
OptionType,
|
||||||
OptionLevel,
|
OptionLevel,
|
||||||
OptionExecutive,
|
OptionExecutive,
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted } from "vue";
|
import { ref, onMounted } from "vue";
|
||||||
import { usePersonalDataStore } from "@/modules/01_metadata/stores/personalStore";
|
|
||||||
|
/** importCompopnents*/
|
||||||
import ListPrefix from "@/modules/01_metadata/components/personal/01ListPrefix.vue";
|
import ListPrefix from "@/modules/01_metadata/components/personal/01ListPrefix.vue";
|
||||||
import ListRank from "@/modules/01_metadata/components/personal/02ListRank.vue";
|
import ListRank from "@/modules/01_metadata/components/personal/02ListRank.vue";
|
||||||
import ListBloodGroup from "@/modules/01_metadata/components/personal/03ListBloodGroup.vue";
|
import ListBloodGroup from "@/modules/01_metadata/components/personal/03ListBloodGroup.vue";
|
||||||
|
|
@ -10,9 +11,15 @@ import ListRelationship from "@/modules/01_metadata/components/personal/06ListRe
|
||||||
import ListEducation from "@/modules/01_metadata/components/personal/07ListEducationLevel.vue";
|
import ListEducation from "@/modules/01_metadata/components/personal/07ListEducationLevel.vue";
|
||||||
import ListProvince from "@/modules/01_metadata/components/personal/08ListProvince.vue";
|
import ListProvince from "@/modules/01_metadata/components/personal/08ListProvince.vue";
|
||||||
|
|
||||||
|
/** importStores*/
|
||||||
|
import { usePersonalDataStore } from "@/modules/01_metadata/stores/personalStore";
|
||||||
|
|
||||||
|
/** use*/
|
||||||
const store = usePersonalDataStore();
|
const store = usePersonalDataStore();
|
||||||
|
|
||||||
const tabs = ref<Array<any>>([]);
|
const tabs = ref<Array<any>>([]);
|
||||||
|
|
||||||
|
/** HOOK*/
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
const tabsPerson = [
|
const tabsPerson = [
|
||||||
{ label: "คำนำหน้าชื่อ", value: "list_prefix" },
|
{ label: "คำนำหน้าชื่อ", value: "list_prefix" },
|
||||||
|
|
@ -54,8 +61,8 @@ onMounted(() => {
|
||||||
/>
|
/>
|
||||||
</q-tabs>
|
</q-tabs>
|
||||||
<q-separator />
|
<q-separator />
|
||||||
<!-- person -->
|
|
||||||
|
|
||||||
|
<!-- person -->
|
||||||
<q-tab-panels v-model="store.currentTab" animated>
|
<q-tab-panels v-model="store.currentTab" animated>
|
||||||
<q-tab-panel name="list_prefix">
|
<q-tab-panel name="list_prefix">
|
||||||
<ListPrefix v-if="store.currentTab == 'list_prefix'" />
|
<ListPrefix v-if="store.currentTab == 'list_prefix'" />
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,12 @@
|
||||||
div
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted } from "vue";
|
import { ref, onMounted } from "vue";
|
||||||
|
|
||||||
import ListPosition from "@/modules/01_metadata/components/position/01ListPosition.vue";
|
import ListPosition from "@/modules/01_metadata/components/position/01ListPosition.vue";
|
||||||
import ListType from "@/modules/01_metadata/components/position/02ListType.vue";
|
import ListType from "@/modules/01_metadata/components/position/02ListType.vue";
|
||||||
import ListExecutive from "@/modules/01_metadata/components/position/04ListExecutive.vue";
|
import ListExecutive from "@/modules/01_metadata/components/position/04ListExecutive.vue";
|
||||||
|
|
||||||
import { usePositionDataStore } from "../stores/positionListStore";
|
import { usePositionDataStore } from "../stores/positionListStore";
|
||||||
// const store.pathLocation = ref<string>("list_position");
|
|
||||||
const tabs = ref<Array<any>>([]);
|
const tabs = ref<Array<any>>([]);
|
||||||
const store = usePositionDataStore();
|
const store = usePositionDataStore();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue