Refactoring code module 16_positionEmployee
This commit is contained in:
parent
4678ead38e
commit
94109a6f15
10 changed files with 527 additions and 600 deletions
|
|
@ -1,8 +1,11 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, reactive, watch } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { usePositionEmp } from "@/modules/16_positionEmployee/store/organizational";
|
||||
|
||||
/**
|
||||
* importType
|
||||
|
|
@ -29,12 +32,6 @@ import type {
|
|||
*/
|
||||
import DialogHeader from "@/components/DialogHeader.vue";
|
||||
|
||||
/**
|
||||
* import*Store
|
||||
*/
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { usePositionEmp } from "@/modules/16_positionEmployee/store/organizational";
|
||||
|
||||
/**
|
||||
* use
|
||||
*/
|
||||
|
|
@ -70,12 +67,12 @@ const props = defineProps({
|
|||
});
|
||||
|
||||
const isReadonly = ref<boolean>(false); // อ่านได้อย่างเดียว
|
||||
const typeOpsMain = ref<DataOption[]>([]);
|
||||
const levelOpsMain = ref<DataOption[]>([]);
|
||||
const typeOps = ref<DataOption[]>([]);
|
||||
const levelOps = ref<DataOption[]>([]);
|
||||
const typeOpsMain = ref<DataOption[]>([]); //ข้อมูลกลุ่มงาน
|
||||
const levelOpsMain = ref<DataOption[]>([]); //ข้อมูลระดับกลุ่มงาน
|
||||
const typeOps = ref<DataOption[]>([]); //รายการกลุ่มงาน
|
||||
const levelOps = ref<DataOption[]>([]); //รายการระดับกลุ่มงาน
|
||||
const dataLevel = ref<TypePos[]>([]);
|
||||
const selected = ref<Position[]>([]);
|
||||
const selected = ref<Position[]>([]); //ตำแหน่งที่เลือก
|
||||
const isSit = ref<boolean>(false);
|
||||
|
||||
const formData = reactive<FormPositionFilter>({
|
||||
|
|
@ -201,14 +198,15 @@ const columnsResult = ref<QTableProps["columns"]>([
|
|||
*/
|
||||
function close() {
|
||||
modal.value = false;
|
||||
clearForm();
|
||||
}
|
||||
|
||||
/**
|
||||
* function เรียกข้อมูลประเภทตำแหน่ง
|
||||
*/
|
||||
function fetchType() {
|
||||
async function fetchType() {
|
||||
showLoader();
|
||||
http
|
||||
await http
|
||||
.get(config.API.orgEmployeeType)
|
||||
.then((res) => {
|
||||
dataLevel.value = res.data.result;
|
||||
|
|
@ -377,7 +375,6 @@ watch(
|
|||
() => modal.value,
|
||||
async () => {
|
||||
if (modal.value == true) {
|
||||
await clearForm();
|
||||
await fetchType();
|
||||
|
||||
if (props.dataDetailPos) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue