ปรับ fe sprint2
This commit is contained in:
parent
8576f3c387
commit
0d6ff7be0a
83 changed files with 6932 additions and 2571 deletions
|
|
@ -8,7 +8,7 @@
|
|||
<template>
|
||||
<div v-if="isAddNew" class="row col-12 items-center q-pt-md">
|
||||
<div class="bg-white q-px-sm topCard">
|
||||
<span class="text-weight-medium">เพิ่มตำแหน่ง</span>
|
||||
<span class="text-weight-bold">เพิ่มตำแหน่ง</span>
|
||||
<q-btn
|
||||
flat
|
||||
color="primary"
|
||||
|
|
@ -47,7 +47,12 @@
|
|||
<template v-slot:option="scope">
|
||||
<q-item v-bind="scope.itemProps">
|
||||
<q-item-section>
|
||||
<q-item-label>{{ scope.opt.positionPath }}</q-item-label>
|
||||
<q-item-label>
|
||||
<span class="text-weight-bold">
|
||||
{{ scope.opt.positionPath }}</span
|
||||
>
|
||||
{{ scope.opt.positionLevel }}
|
||||
</q-item-label>
|
||||
<q-item-label caption>
|
||||
<q-icon
|
||||
class="q-mr-sm"
|
||||
|
|
@ -56,19 +61,36 @@
|
|||
name="mdi-bookmark"
|
||||
v-if="scope.opt.isDirector"
|
||||
></q-icon>
|
||||
{{ scope.opt.positionExecutive }}
|
||||
{{ scope.opt.positionExecutiveSide }}
|
||||
{{ scope.opt.positionLevel }}
|
||||
{{ scope.opt.positionLine }}
|
||||
{{ scope.opt.positionPathSide }}
|
||||
{{ scope.opt.positionType }}
|
||||
{{
|
||||
scope.opt.positionExecutive == null
|
||||
? ""
|
||||
: `ตำแหน่งทางการบริหาร: ${scope.opt.positionExecutive}`
|
||||
}}
|
||||
{{
|
||||
scope.opt.positionExecutiveSide == null
|
||||
? ""
|
||||
: `ด้านทางการบริหาร: ${scope.opt.positionExecutiveSide}`
|
||||
}}
|
||||
<!-- {{
|
||||
scope.opt.positionLevel == null
|
||||
? ""
|
||||
: `ระดับตำแหน่ง: ${scope.opt.positionLevel}`
|
||||
}} -->
|
||||
{{
|
||||
scope.opt.positionPathSide == null
|
||||
? ""
|
||||
: `ด้าน/สาขา: ${scope.opt.positionPathSide}`
|
||||
}}
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</template>
|
||||
<template v-slot:selected-item="scope">
|
||||
<q-chip dense square class="q-my-none q-ml-xs q-mr-none">
|
||||
{{ scope.opt.positionPath }}
|
||||
<span class="text-weight-bold">
|
||||
{{ scope.opt.positionPath }}</span
|
||||
>
|
||||
{{ scope.opt.positionLevel }}
|
||||
</q-chip>
|
||||
<q-item-label caption>
|
||||
<q-icon
|
||||
|
|
@ -78,12 +100,31 @@
|
|||
name="mdi-bookmark"
|
||||
v-if="scope.opt.isDirector"
|
||||
></q-icon>
|
||||
{{ scope.opt.positionExecutive }}
|
||||
{{ scope.opt.positionExecutiveSide }}
|
||||
{{ scope.opt.positionLevel }}
|
||||
{{ scope.opt.positionLine }}
|
||||
{{ scope.opt.positionPathSide }}
|
||||
{{ scope.opt.positionType }}
|
||||
{{
|
||||
scope.opt.positionExecutive == null
|
||||
? ""
|
||||
: `ตำแหน่งทางการบริหาร: ${scope.opt.positionExecutive}`
|
||||
}}
|
||||
{{
|
||||
scope.opt.positionExecutiveSide == null
|
||||
? ""
|
||||
: `ด้านทางการบริหาร: ${scope.opt.positionExecutiveSide}`
|
||||
}}
|
||||
<!-- {{
|
||||
scope.opt.positionLevel == null
|
||||
? ""
|
||||
: `ระดับตำแหน่ง: ${scope.opt.positionLevel}`
|
||||
}} -->
|
||||
{{
|
||||
scope.opt.positionPathSide == null
|
||||
? ""
|
||||
: `ด้าน/สาขา: ${scope.opt.positionPathSide}`
|
||||
}}
|
||||
<!-- {{ scope.opt.positionExecutiveSide }} -->
|
||||
<!-- {{ scope.opt.positionLevel }} -->
|
||||
<!-- {{ scope.opt.positionLine }} -->
|
||||
<!-- {{ scope.opt.positionPathSide }} -->
|
||||
<!-- {{ scope.opt.positionType }} -->
|
||||
</q-item-label>
|
||||
</template>
|
||||
<template v-slot:no-option>
|
||||
|
|
@ -103,7 +144,11 @@
|
|||
:label="`${'หมายเหตุ'}`"
|
||||
type="textarea"
|
||||
/>
|
||||
<!-- :rules="[(val) => !!val || `${'กรุณากรอกเงื่อนไขตำแหน่ง'}`]" -->
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-12 col-md-12">
|
||||
<q-toggle v-model="item.isActive" dense size="34px" color="positive">
|
||||
ปกติ
|
||||
</q-toggle>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -157,7 +202,12 @@
|
|||
<template v-slot:option="scope">
|
||||
<q-item v-bind="scope.itemProps">
|
||||
<q-item-section>
|
||||
<q-item-label>{{ scope.opt.positionPath }}</q-item-label>
|
||||
<q-item-label>
|
||||
<span class="text-weight-bold">
|
||||
{{ scope.opt.positionPath }}</span
|
||||
>
|
||||
{{ scope.opt.positionLevel }}
|
||||
</q-item-label>
|
||||
<q-item-label caption>
|
||||
<q-icon
|
||||
class="q-mr-sm"
|
||||
|
|
@ -166,19 +216,36 @@
|
|||
name="mdi-bookmark"
|
||||
v-if="scope.opt.isDirector"
|
||||
></q-icon>
|
||||
{{ scope.opt.positionExecutive }}
|
||||
{{ scope.opt.positionExecutiveSide }}
|
||||
{{ scope.opt.positionLevel }}
|
||||
{{ scope.opt.positionLine }}
|
||||
{{ scope.opt.positionPathSide }}
|
||||
{{ scope.opt.positionType }}
|
||||
{{
|
||||
scope.opt.positionExecutive == null
|
||||
? ""
|
||||
: `ตำแหน่งทางการบริหาร: ${scope.opt.positionExecutive}`
|
||||
}}
|
||||
{{
|
||||
scope.opt.positionExecutiveSide == null
|
||||
? ""
|
||||
: `ด้านทางการบริหาร: ${scope.opt.positionExecutiveSide}`
|
||||
}}
|
||||
<!-- {{
|
||||
scope.opt.positionLevel == null
|
||||
? ""
|
||||
: `ระดับตำแหน่ง: ${scope.opt.positionLevel}`
|
||||
}} -->
|
||||
{{
|
||||
scope.opt.positionPathSide == null
|
||||
? ""
|
||||
: `ด้าน/สาขา: ${scope.opt.positionPathSide}`
|
||||
}}
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</template>
|
||||
<template v-slot:selected-item="scope">
|
||||
<q-chip dense square class="q-my-none q-ml-xs q-mr-none">
|
||||
{{ scope.opt.positionPath }}
|
||||
<span class="text-weight-bold">
|
||||
{{ scope.opt.positionPath }}</span
|
||||
>
|
||||
{{ scope.opt.positionLevel }}
|
||||
</q-chip>
|
||||
<q-item-label caption>
|
||||
<q-icon
|
||||
|
|
@ -188,13 +255,29 @@
|
|||
name="mdi-bookmark"
|
||||
v-if="scope.opt.isDirector"
|
||||
></q-icon>
|
||||
{{ scope.opt.positionPathSide }}
|
||||
<!-- {{ scope.opt.positionPathSide }}
|
||||
{{ scope.opt.positionExecutive }}
|
||||
{{ scope.opt.positionLevel }}
|
||||
{{ scope.opt.positionLine }}
|
||||
{{ scope.opt.positionLevel }} -->
|
||||
<!-- {{ scope.opt.positionLine }} -->
|
||||
|
||||
<!-- {{ scope.opt.positionType }}
|
||||
{{ scope.opt.positionExecutiveSide }} -->
|
||||
|
||||
{{
|
||||
scope.opt.positionPathSide == null
|
||||
? ""
|
||||
: `ด้าน/สาขา: ${scope.opt.positionPathSide}`
|
||||
}}
|
||||
{{
|
||||
scope.opt.positionExecutive == null
|
||||
? ""
|
||||
: `ตำแหน่งทางการบริหาร: ${scope.opt.positionExecutive}`
|
||||
}}
|
||||
{{
|
||||
scope.opt.positionLevel == null
|
||||
? ""
|
||||
: `ระดับตำแหน่ง: ${scope.opt.positionLevel}`
|
||||
}}
|
||||
</q-item-label>
|
||||
</template>
|
||||
<template v-slot:no-option>
|
||||
|
|
@ -224,7 +307,16 @@
|
|||
:label="`${'หมายเหตุ'}`"
|
||||
type="textarea"
|
||||
/>
|
||||
<!-- :rules="[(val) => !!val || `${'กรุณากรอกเงื่อนไขตำแหน่ง'}`]" -->
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-12 col-md-12">
|
||||
<q-toggle
|
||||
v-model="item.isActive"
|
||||
dense
|
||||
size="34px"
|
||||
color="positive"
|
||||
>
|
||||
ปกติ
|
||||
</q-toggle>
|
||||
</div>
|
||||
</div>
|
||||
</q-card>
|
||||
|
|
@ -240,14 +332,10 @@ import { useDataStore } from "@/stores/data";
|
|||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import type { DataOption } from "../../interface/index/Main";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
||||
const ddNoResultMsg = defineAsyncComponent(
|
||||
() => import("@/components/DropDownNoResultMsg.vue")
|
||||
); //แสดงข้อความเมื่อ Dropdown Filter ไม่เจอข้อมูล
|
||||
|
||||
const mixin = useCounterMixin();
|
||||
const { showLoader, hideLoader } = mixin;
|
||||
const dataStore = useDataStore();
|
||||
const { loaderPage } = dataStore;
|
||||
const $q = useQuasar(); // show dialog
|
||||
|
|
@ -273,6 +361,7 @@ watch(myForm, (form: QForm | null, prevForm: QForm | null) => {
|
|||
// console.log("props.editObj", props.editObj);
|
||||
positions.value[0].positionMasterId = props.editObj?.positionMasterId;
|
||||
positions.value[0].positionUserNote = props.editObj?.positionUserNote;
|
||||
positions.value[0].isActive = props.editObj?.isActive;
|
||||
}
|
||||
}
|
||||
emit("update:formprops", form);
|
||||
|
|
@ -283,6 +372,7 @@ const positionSet = ref<object>({
|
|||
count: 1, // จำนวนตำแหน่งที่จะเพิ่ม
|
||||
positionMasterId: "", // ชื่อตำแหน่ง จากระบบข้อมูลหลัก Table PositionMaster เช่น นักจัดการงานทั่วไป,พยาบาลชำนาญการ
|
||||
positionUserNote: "",
|
||||
isActive: true,
|
||||
}); //เก็บข้อมูลที่จะเลือกใน Drop Down แต่ละตัวจะต้องมี key ของมัน เพื่อส่งไปให้ API
|
||||
emit("update:positions", positions.value);
|
||||
|
||||
|
|
@ -290,12 +380,12 @@ const positionFilter = ref<Array<any>>([]); //for DropDown
|
|||
const position = ref<Array<any>>([]); //for DropDown
|
||||
|
||||
onMounted(async () => {
|
||||
hideLoader();
|
||||
loaderPage(false);
|
||||
await fetchPositionMaster();
|
||||
});
|
||||
|
||||
const fetchPositionMaster = async () => {
|
||||
showLoader();
|
||||
loaderPage(true);
|
||||
await http
|
||||
// .get(config.API.getPostionMasterDraft(false))
|
||||
.get(config.API.getPostionMaster(false))
|
||||
|
|
@ -322,6 +412,7 @@ const fetchPositionMaster = async () => {
|
|||
positionExecutiveSideId: e.positionExecutiveSideId,
|
||||
positionLevelId: e.positionLevelId,
|
||||
positionStatusId: e.positionStatusId,
|
||||
qualification: e.qualification,
|
||||
positionCondition: e.positionCondition,
|
||||
positionMasterUserNote: e.positionMasterUserNote,
|
||||
isDirector: e.isDirector,
|
||||
|
|
@ -333,7 +424,7 @@ const fetchPositionMaster = async () => {
|
|||
console.log(e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
loaderPage(false);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@
|
|||
v-model="item.organizationOrganizationId"
|
||||
:options="organizationOri"
|
||||
label="หน่วยงาน"
|
||||
class="col-xs-12 col-sm-4 col-md-3"
|
||||
class="col-xs-12 col-sm-6 col-md-6"
|
||||
use-input
|
||||
input-debounce="0"
|
||||
@filter="
|
||||
|
|
@ -75,7 +75,7 @@
|
|||
v-model="item.organizationAgencyCode"
|
||||
:options="organizationAgencyCode"
|
||||
label="รหัสหน่วยงาน"
|
||||
class="col-xs-12 col-sm-4 col-md-3"
|
||||
class="col-xs-12 col-sm-2 col-md-2"
|
||||
use-input
|
||||
input-debounce="0"
|
||||
@filter="
|
||||
|
|
@ -98,7 +98,7 @@
|
|||
v-model="item.organizationGovernmentCode"
|
||||
:options="item.organizationGovernmentCodeOption"
|
||||
label="รหัสส่วนราชการ"
|
||||
class="col-xs-12 col-sm-4 col-md-3"
|
||||
class="col-xs-12 col-sm-2 col-md-2"
|
||||
use-input
|
||||
input-debounce="0"
|
||||
@filter="
|
||||
|
|
@ -121,51 +121,36 @@
|
|||
outlined
|
||||
:modelValue="item.organizationShortName.toString() ?? ''"
|
||||
label="ชื่อย่อหน่วยงาน"
|
||||
class="col-xs-12 col-sm-4 col-md-3"
|
||||
class="col-xs-12 col-sm-2 col-md-2"
|
||||
/>
|
||||
|
||||
<selector
|
||||
hide-bottom-space
|
||||
<q-input
|
||||
dense
|
||||
outlined
|
||||
v-model="item.organizationAgencyId"
|
||||
:options="organizationAgency"
|
||||
label="หน่วยงานต้นสังกัด"
|
||||
class="col-xs-12 col-sm-4 col-md-3"
|
||||
use-input
|
||||
input-debounce="0"
|
||||
@filter="
|
||||
(inputValue:any, doneFn:Function) =>
|
||||
filterSelector(inputValue, doneFn, '1')
|
||||
"
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
map-options
|
||||
emit-value
|
||||
clearable
|
||||
v-model="item.agency"
|
||||
class="col-xs-12 col-sm-2 col-md-2"
|
||||
label="เลขที่หน่วยงาน"
|
||||
/>
|
||||
|
||||
<selector
|
||||
hide-bottom-space
|
||||
<q-input
|
||||
dense
|
||||
outlined
|
||||
v-model="item.organizationGovernmentAgencyId"
|
||||
:options="organizationGovernmentAgency"
|
||||
label="ส่วนราชการต้นสังกัด"
|
||||
class="col-xs-12 col-sm-4 col-md-3"
|
||||
use-input
|
||||
input-debounce="0"
|
||||
@filter="
|
||||
(inputValue:any, doneFn:Function) =>
|
||||
filterSelector(inputValue, doneFn, '1')
|
||||
"
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
map-options
|
||||
emit-value
|
||||
clearable
|
||||
v-model="item.government"
|
||||
class="col-xs-12 col-sm-2 col-md-2"
|
||||
label="เลขที่ส่วนราชการ"
|
||||
/>
|
||||
<q-input
|
||||
dense
|
||||
outlined
|
||||
v-model="item.department"
|
||||
class="col-xs-12 col-sm-2 col-md-2"
|
||||
label="เลขที่ฝ่าย/ส่วน"
|
||||
/>
|
||||
<q-input
|
||||
dense
|
||||
outlined
|
||||
v-model="item.pile"
|
||||
class="col-xs-12 col-sm-2 col-md-2"
|
||||
label="เลขที่กอง"
|
||||
/>
|
||||
|
||||
<selector
|
||||
hide-bottom-space
|
||||
dense
|
||||
|
|
@ -173,7 +158,7 @@
|
|||
v-model="item.organizationTypeId"
|
||||
:options="organizationType"
|
||||
label="ประเภทหน่วยงาน"
|
||||
class="col-xs-12 col-sm-4 col-md-3"
|
||||
class="col-xs-12 col-sm-2 col-md-2"
|
||||
use-input
|
||||
input-debounce="0"
|
||||
@filter="
|
||||
|
|
@ -193,7 +178,7 @@
|
|||
v-model="item.organizationLevelId"
|
||||
:options="organizationLevel"
|
||||
label="ระดับหน่วยงาน"
|
||||
class="col-xs-12 col-sm-4 col-md-3"
|
||||
class="col-xs-12 col-sm-2 col-md-2"
|
||||
use-input
|
||||
input-debounce="0"
|
||||
@filter="
|
||||
|
|
@ -207,6 +192,54 @@
|
|||
clearable
|
||||
:rules="[(val:any) => !!val || `${'กรุณาเลือกระดับหน่วยงาน'}`]"
|
||||
/>
|
||||
<selector
|
||||
hide-bottom-space
|
||||
dense
|
||||
outlined
|
||||
v-model="item.organizationAgencyId"
|
||||
:options="organizationAgency"
|
||||
label="หน่วยงานต้นสังกัด"
|
||||
class="col-xs-12 col-sm-4 col-md-4"
|
||||
use-input
|
||||
input-debounce="0"
|
||||
@filter="
|
||||
(inputValue:any, doneFn:Function) =>
|
||||
filterSelector(inputValue, doneFn, '1')
|
||||
"
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
map-options
|
||||
emit-value
|
||||
clearable
|
||||
/>
|
||||
<selector
|
||||
hide-bottom-space
|
||||
dense
|
||||
outlined
|
||||
v-model="item.organizationGovernmentAgencyId"
|
||||
:options="organizationGovernmentAgency"
|
||||
label="ส่วนราชการต้นสังกัด"
|
||||
class="col-xs-12 col-sm-6 col-md-6"
|
||||
use-input
|
||||
input-debounce="0"
|
||||
@filter="
|
||||
(inputValue:any, doneFn:Function) =>
|
||||
filterSelector(inputValue, doneFn, '1')
|
||||
"
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
map-options
|
||||
emit-value
|
||||
clearable
|
||||
/>
|
||||
<q-input
|
||||
dense
|
||||
outlined
|
||||
v-model="item.organizationOrder"
|
||||
class="col-xs-12 col-sm-2 col-md-2"
|
||||
type="number"
|
||||
label="ลำดับผังโครงสร้าง"
|
||||
/>
|
||||
<selector
|
||||
hide-bottom-space
|
||||
dense
|
||||
|
|
@ -214,7 +247,7 @@
|
|||
v-model="item.organizationExternalPhoneId"
|
||||
:options="organizationTelExternal"
|
||||
label="หมายเลขโทรศัพท์ติดต่อจากภายนอก"
|
||||
class="col-xs-12 col-sm-4 col-md-3"
|
||||
class="col-xs-12 col-sm-4 col-md-4"
|
||||
use-input
|
||||
input-debounce="0"
|
||||
@filter="
|
||||
|
|
@ -234,7 +267,7 @@
|
|||
v-model="item.organizationInternalPhoneId"
|
||||
:options="organizationTelInternal"
|
||||
label="หมายเลขโทรศัพท์ติดต่อจากภายใน"
|
||||
class="col-xs-12 col-sm-4 col-md-3"
|
||||
class="col-xs-12 col-sm-4 col-md-4"
|
||||
use-input
|
||||
input-debounce="0"
|
||||
@filter="
|
||||
|
|
@ -254,7 +287,7 @@
|
|||
v-model="item.organizationFaxId"
|
||||
:options="organizationFax"
|
||||
label="หมายเลขโทรสาร"
|
||||
class="col-xs-12 col-sm-4 col-md-3"
|
||||
class="col-xs-12 col-sm-4 col-md-4"
|
||||
use-input
|
||||
input-debounce="0"
|
||||
@filter="
|
||||
|
|
@ -267,43 +300,6 @@
|
|||
emit-value
|
||||
clearable
|
||||
/>
|
||||
<q-input
|
||||
dense
|
||||
outlined
|
||||
v-model="item.agency"
|
||||
class="col-xs-12 col-sm-4 col-md-3"
|
||||
label="หน่วยงาน"
|
||||
/>
|
||||
<q-input
|
||||
dense
|
||||
outlined
|
||||
v-model="item.government"
|
||||
class="col-xs-12 col-sm-4 col-md-3"
|
||||
label="ส่วนราชการ"
|
||||
/>
|
||||
<q-input
|
||||
dense
|
||||
outlined
|
||||
v-model="item.department"
|
||||
class="col-xs-12 col-sm-4 col-md-3"
|
||||
label="ฝ่าย/ส่วน"
|
||||
/>
|
||||
<q-input
|
||||
dense
|
||||
outlined
|
||||
v-model="item.pile"
|
||||
class="col-xs-12 col-sm-4 col-md-3"
|
||||
label="กอง"
|
||||
/>
|
||||
|
||||
<q-input
|
||||
dense
|
||||
outlined
|
||||
:modelValue="Number(item.organizationOrder) ?? 0"
|
||||
class="col-xs-12 col-sm-4 col-md-3"
|
||||
type="number"
|
||||
label="ลำดับผังโครงสร้าง"
|
||||
/>
|
||||
<div class="col-xs-12 col-sm-12 col-md-12">
|
||||
<q-input
|
||||
:class="getClass(true)"
|
||||
|
|
@ -317,7 +313,6 @@
|
|||
:label="`${'หน้าที่รับผิดชอบ'}`"
|
||||
type="textarea"
|
||||
/>
|
||||
<!-- :rules="[(val) => !!val || `${'กรุณากรอกเงื่อนไขตำแหน่ง'}`]" -->
|
||||
</div>
|
||||
</div>
|
||||
</q-card>
|
||||
|
|
@ -339,8 +334,6 @@ import type {
|
|||
} from "../../interface/index/Main";
|
||||
import { log } from "console";
|
||||
import { useDataStore } from "@/stores/data";
|
||||
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
// import { organizationSet } from "../interface/index/Main";
|
||||
|
||||
const props = defineProps({
|
||||
|
|
@ -350,8 +343,6 @@ const props = defineProps({
|
|||
|
||||
const emit = defineEmits(["update:organizprops", "update:formprops"]);
|
||||
|
||||
const mixin = useCounterMixin();
|
||||
const {showLoader, hideLoader } = mixin;
|
||||
const dataStore = useDataStore();
|
||||
const { loaderPage } = dataStore;
|
||||
const $q = useQuasar(); // show dialog
|
||||
|
|
@ -390,7 +381,7 @@ const organizationAgencyCode = ref<GovermentOption[]>([]);
|
|||
const organizationAgencyCodeFilter = ref<GovermentOption[]>([]);
|
||||
|
||||
onMounted(async () => {
|
||||
hideLoader();
|
||||
loaderPage(false);
|
||||
await fetchOrganizationOri();
|
||||
await fetchOrganizationAgencyCode();
|
||||
await fetchOrganizationGovernmentCode();
|
||||
|
|
@ -409,7 +400,7 @@ onMounted(async () => {
|
|||
* หน่วยงาน
|
||||
*/
|
||||
const fetchOrganizationOri = async () => {
|
||||
showLoader();
|
||||
loaderPage(true);
|
||||
await http
|
||||
.get(config.API.organization)
|
||||
.then((res) => {
|
||||
|
|
@ -425,14 +416,14 @@ const fetchOrganizationOri = async () => {
|
|||
console.log(e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
loaderPage(false);
|
||||
});
|
||||
};
|
||||
/**
|
||||
* รหัสหน่วยงาน
|
||||
*/
|
||||
const fetchOrganizationAgencyCode = async () => {
|
||||
showLoader();
|
||||
loaderPage(true);
|
||||
await http
|
||||
.get(config.API.organizationCode)
|
||||
.then((res) => {
|
||||
|
|
@ -454,14 +445,14 @@ const fetchOrganizationAgencyCode = async () => {
|
|||
console.log(e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
loaderPage(false);
|
||||
});
|
||||
};
|
||||
/**
|
||||
* รหัสส่วนราชการ
|
||||
*/
|
||||
const fetchOrganizationGovernmentCode = async () => {
|
||||
showLoader();
|
||||
loaderPage(true);
|
||||
await http
|
||||
.get(config.API.organizationShortName)
|
||||
.then((res) => {
|
||||
|
|
@ -483,14 +474,14 @@ const fetchOrganizationGovernmentCode = async () => {
|
|||
console.log(e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
loaderPage(false);
|
||||
});
|
||||
};
|
||||
// /**
|
||||
// * ชื่อย่อหน่วยงาน
|
||||
// */
|
||||
// const fetchOrganizationShortName = async () => {
|
||||
// showLoader();
|
||||
// loaderPage(true);
|
||||
// await http
|
||||
// .get(config.API.organizationShortName)
|
||||
// .then((res) => {
|
||||
|
|
@ -512,16 +503,16 @@ const fetchOrganizationGovernmentCode = async () => {
|
|||
// console.log(e);
|
||||
// })
|
||||
// .finally(() => {
|
||||
// hideLoader();
|
||||
// loaderPage(false);
|
||||
// });
|
||||
// };
|
||||
/**
|
||||
* หน่วยงานต้นสังกัด
|
||||
*/
|
||||
const fetchOrganizationAgency = async () => {
|
||||
showLoader();
|
||||
loaderPage(true);
|
||||
await http
|
||||
.get(config.API.listOrganizationAgency("หน่วยงาน"))
|
||||
.get(config.API.listOrganizationHistoryAgency("หน่วยงาน"))
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
let option: DataOption[] = [];
|
||||
|
|
@ -538,16 +529,16 @@ const fetchOrganizationAgency = async () => {
|
|||
console.log(e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
loaderPage(false);
|
||||
});
|
||||
};
|
||||
/**
|
||||
* ส่วนราชการต้นสังกัด
|
||||
*/
|
||||
const fetchOrganizationGovernmentAgency = async () => {
|
||||
showLoader();
|
||||
loaderPage(true);
|
||||
await http
|
||||
.get(config.API.listOrganizationAgency("ส่วนราชการ"))
|
||||
.get(config.API.listOrganizationHistoryAgency("ส่วนราชการ"))
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
let option: DataOption[] = [];
|
||||
|
|
@ -564,14 +555,14 @@ const fetchOrganizationGovernmentAgency = async () => {
|
|||
console.log(e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
loaderPage(false);
|
||||
});
|
||||
};
|
||||
/**
|
||||
* ประเภทหน่วยงาน
|
||||
*/
|
||||
const fetchOrganizationType = async () => {
|
||||
showLoader();
|
||||
loaderPage(true);
|
||||
await http
|
||||
.get(config.API.organizationType)
|
||||
.then((res) => {
|
||||
|
|
@ -587,14 +578,14 @@ const fetchOrganizationType = async () => {
|
|||
console.log(e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
loaderPage(false);
|
||||
});
|
||||
};
|
||||
/**
|
||||
* ระดับหน่วยงาน
|
||||
*/
|
||||
const fetchOrganizationLevel = async () => {
|
||||
showLoader();
|
||||
loaderPage(true);
|
||||
await http
|
||||
.get(config.API.organizationLevel)
|
||||
.then((res) => {
|
||||
|
|
@ -610,14 +601,14 @@ const fetchOrganizationLevel = async () => {
|
|||
console.log(e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
loaderPage(false);
|
||||
});
|
||||
};
|
||||
/**
|
||||
* เบอร์ติดต่อภายใน
|
||||
*/
|
||||
const fetchOrganizationTelInternal = async () => {
|
||||
showLoader();
|
||||
loaderPage(true);
|
||||
await http
|
||||
.get(config.API.organizationTelInternal)
|
||||
.then((res) => {
|
||||
|
|
@ -633,14 +624,14 @@ const fetchOrganizationTelInternal = async () => {
|
|||
console.log(e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
loaderPage(false);
|
||||
});
|
||||
};
|
||||
/**
|
||||
* เบอร์ติดต่อภายนอก
|
||||
*/
|
||||
const fetchOrganizationTelExternal = async () => {
|
||||
showLoader();
|
||||
loaderPage(true);
|
||||
await http
|
||||
.get(config.API.organizationTelExternal)
|
||||
.then((res) => {
|
||||
|
|
@ -656,14 +647,14 @@ const fetchOrganizationTelExternal = async () => {
|
|||
console.log(e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
loaderPage(false);
|
||||
});
|
||||
};
|
||||
/**
|
||||
* เบอร์โทรสาร
|
||||
*/
|
||||
const fetchOrganizationFax = async () => {
|
||||
showLoader();
|
||||
loaderPage(true);
|
||||
await http
|
||||
.get(config.API.organizationFax)
|
||||
.then((res) => {
|
||||
|
|
@ -679,7 +670,7 @@ const fetchOrganizationFax = async () => {
|
|||
console.log(e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
loaderPage(false);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -771,6 +762,7 @@ const addOrganizationItem = async () => {
|
|||
organizationGovernmentCodeOption: organizationGovernmentCode.value,
|
||||
organizationGovernmentCodeOptionFilter:
|
||||
organizationGovernmentCodeFilter.value,
|
||||
isActive: true,
|
||||
});
|
||||
emit("update:organizprops", organizations.value);
|
||||
// console.log(organizations);
|
||||
|
|
@ -780,7 +772,7 @@ const addOrganizationItem = async () => {
|
|||
|
||||
const fetchAgencyCode = async (val: string, item: OrganizaOption) => {
|
||||
let option: GovermentOption[] = [];
|
||||
showLoader();
|
||||
loaderPage(true);
|
||||
await http
|
||||
.get(config.API.organizationGovernmentCode(val))
|
||||
.then((res) => {
|
||||
|
|
@ -800,14 +792,14 @@ const fetchAgencyCode = async (val: string, item: OrganizaOption) => {
|
|||
console.log(e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
loaderPage(false);
|
||||
});
|
||||
return option;
|
||||
};
|
||||
|
||||
const fetchGovernmentCode = async (val: string, item: OrganizaOption) => {
|
||||
let option: GovermentOption[] = [];
|
||||
showLoader();
|
||||
loaderPage(true);
|
||||
await http
|
||||
.get(config.API.organizationAgencyCode(val))
|
||||
.then((res) => {
|
||||
|
|
@ -827,7 +819,7 @@ const fetchGovernmentCode = async (val: string, item: OrganizaOption) => {
|
|||
console.log(e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
loaderPage(false);
|
||||
});
|
||||
return option;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
v-model="organization.organizationOrganizationId"
|
||||
:options="organizationOri"
|
||||
label="หน่วยงาน"
|
||||
class="col-xs-12 col-sm-4 col-md-3"
|
||||
class="col-xs-12 col-sm-6 col-md-6"
|
||||
use-input
|
||||
input-debounce="0"
|
||||
@filter="
|
||||
|
|
@ -31,7 +31,7 @@
|
|||
v-model="organization.organizationAgencyCode"
|
||||
:options="organizationAgencyCode"
|
||||
label="รหัสหน่วยงาน"
|
||||
class="col-xs-12 col-sm-4 col-md-3"
|
||||
class="col-xs-12 col-sm-2 col-md-2"
|
||||
use-input
|
||||
input-debounce="0"
|
||||
@filter="
|
||||
|
|
@ -53,7 +53,7 @@
|
|||
v-model="organization.organizationGovernmentCode"
|
||||
:options="organization.organizationGovernmentCodeOption"
|
||||
label="รหัสส่วนราชการ"
|
||||
class="col-xs-12 col-sm-4 col-md-3"
|
||||
class="col-xs-12 col-sm-2 col-md-2"
|
||||
use-input
|
||||
input-debounce="0"
|
||||
@filter="
|
||||
|
|
@ -68,16 +68,81 @@
|
|||
clearable
|
||||
:rules="[(val:any) => !!val || `${'กรุณาเลือกรหัสส่วนราชการ'}`]"
|
||||
/>
|
||||
|
||||
<q-input
|
||||
dense
|
||||
readonly
|
||||
outlined
|
||||
:modelValue="organization.organizationShortName.toString() ?? ''"
|
||||
label="ชื่อย่อหน่วยงาน"
|
||||
class="col-xs-12 col-sm-4 col-md-3"
|
||||
class="col-xs-12 col-sm-2 col-md-2"
|
||||
/>
|
||||
<q-input
|
||||
dense
|
||||
outlined
|
||||
v-model="organization.agency"
|
||||
class="col-xs-12 col-sm-2 col-md-2"
|
||||
label="เลขที่หน่วยงาน"
|
||||
/>
|
||||
<q-input
|
||||
dense
|
||||
outlined
|
||||
v-model="organization.government"
|
||||
class="col-xs-12 col-sm-2 col-md-2"
|
||||
label="เลขที่ส่วนราชการ"
|
||||
/>
|
||||
<q-input
|
||||
dense
|
||||
outlined
|
||||
v-model="organization.department"
|
||||
class="col-xs-12 col-sm-2 col-md-2"
|
||||
label="เลขที่ฝ่าย/ส่วน"
|
||||
/>
|
||||
<q-input
|
||||
dense
|
||||
outlined
|
||||
v-model="organization.pile"
|
||||
class="col-xs-12 col-sm-2 col-md-2"
|
||||
label="เลขที่กอง"
|
||||
/>
|
||||
<selector
|
||||
dense
|
||||
outlined
|
||||
v-model="organization.organizationTypeId"
|
||||
:options="organizationType"
|
||||
label="ประเภทหน่วยงาน"
|
||||
class="col-xs-12 col-sm-2 col-md-2"
|
||||
use-input
|
||||
input-debounce="0"
|
||||
@filter="
|
||||
(inputValue:any, doneFn:Function) =>
|
||||
filterSelector(inputValue, doneFn, '5')
|
||||
"
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
map-options
|
||||
emit-value
|
||||
clearable
|
||||
/><!-- :rules="[(val:any) => !!val || `${'กรุณาเลือกประเภทหน่วยงาน'}`]" -->
|
||||
<selector
|
||||
dense
|
||||
outlined
|
||||
v-model="organization.organizationLevelId"
|
||||
:options="organizationLevel"
|
||||
label="ระดับหน่วยงาน"
|
||||
class="col-xs-12 col-sm-2 col-md-2"
|
||||
use-input
|
||||
input-debounce="0"
|
||||
@filter="
|
||||
(inputValue:any, doneFn:Function) =>
|
||||
filterSelector(inputValue, doneFn, '6')
|
||||
"
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
map-options
|
||||
emit-value
|
||||
clearable
|
||||
:rules="[(val:any) => !!val || `${'กรุณาเลือกระดับหน่วยงาน'}`]"
|
||||
/>
|
||||
|
||||
<selector
|
||||
dense
|
||||
disable
|
||||
|
|
@ -85,7 +150,7 @@
|
|||
v-model="organization.organizationAgencyId"
|
||||
:options="organizationAgency"
|
||||
label="หน่วยงานต้นสังกัด"
|
||||
class="col-xs-12 col-sm-4 col-md-3"
|
||||
class="col-xs-12 col-sm-4 col-md-4"
|
||||
use-input
|
||||
input-debounce="0"
|
||||
@filter="
|
||||
|
|
@ -106,7 +171,7 @@
|
|||
v-model="organization.organizationGovernmentAgencyId"
|
||||
:options="organizationGovernmentAgency"
|
||||
label="ส่วนราชการต้นสังกัด"
|
||||
class="col-xs-12 col-sm-4 col-md-3"
|
||||
class="col-xs-12 col-sm-6 col-md-6"
|
||||
use-input
|
||||
input-debounce="0"
|
||||
@filter="
|
||||
|
|
@ -120,44 +185,14 @@
|
|||
clearable
|
||||
/>
|
||||
<!-- :rules="[(val:any) => !!val || `${'กรุณาเลือกส่วนราชการต้นสังกัด'}`]" -->
|
||||
<selector
|
||||
<q-input
|
||||
dense
|
||||
outlined
|
||||
v-model="organization.organizationTypeId"
|
||||
:options="organizationType"
|
||||
label="ประเภทหน่วยงาน"
|
||||
class="col-xs-12 col-sm-4 col-md-3"
|
||||
use-input
|
||||
input-debounce="0"
|
||||
@filter="
|
||||
(inputValue:any, doneFn:Function) =>
|
||||
filterSelector(inputValue, doneFn, '5')
|
||||
"
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
map-options
|
||||
emit-value
|
||||
clearable
|
||||
/><!-- :rules="[(val:any) => !!val || `${'กรุณาเลือกประเภทหน่วยงาน'}`]" -->
|
||||
<selector
|
||||
dense
|
||||
outlined
|
||||
v-model="organization.organizationLevelId"
|
||||
:options="organizationLevel"
|
||||
label="ระดับหน่วยงาน"
|
||||
class="col-xs-12 col-sm-4 col-md-3"
|
||||
use-input
|
||||
input-debounce="0"
|
||||
@filter="
|
||||
(inputValue:any, doneFn:Function) =>
|
||||
filterSelector(inputValue, doneFn, '6')
|
||||
"
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
map-options
|
||||
emit-value
|
||||
clearable
|
||||
:rules="[(val:any) => !!val || `${'กรุณาเลือกระดับหน่วยงาน'}`]"
|
||||
:modelValue="Number(organization.organizationOrder) ?? 0"
|
||||
class="col-xs-12 col-sm-2 col-md-2"
|
||||
type="number"
|
||||
label="ลำดับ"
|
||||
@update:model-value="(value) => updateNumber(organization, value)"
|
||||
/>
|
||||
<selector
|
||||
dense
|
||||
|
|
@ -165,7 +200,7 @@
|
|||
v-model="organization.organizationExternalPhoneId"
|
||||
:options="organizationTelExternal"
|
||||
label="หมายเลขโทรศัพท์ติดต่อจากภายนอก"
|
||||
class="col-xs-12 col-sm-4 col-md-3"
|
||||
class="col-xs-12 col-sm-4 col-md-4"
|
||||
use-input
|
||||
input-debounce="0"
|
||||
@filter="
|
||||
|
|
@ -184,7 +219,7 @@
|
|||
v-model="organization.organizationInternalPhoneId"
|
||||
:options="organizationTelInternal"
|
||||
label="หมายเลขโทรศัพท์ติดต่อจากภายใน"
|
||||
class="col-xs-12 col-sm-4 col-md-3"
|
||||
class="col-xs-12 col-sm-4 col-md-4"
|
||||
use-input
|
||||
input-debounce="0"
|
||||
@filter="
|
||||
|
|
@ -203,7 +238,7 @@
|
|||
v-model="organization.organizationFaxId"
|
||||
:options="organizationFax"
|
||||
label="หมายเลขโทรสาร"
|
||||
class="col-xs-12 col-sm-4 col-md-3"
|
||||
class="col-xs-12 col-sm-2 col-md-2"
|
||||
use-input
|
||||
input-debounce="0"
|
||||
@filter="
|
||||
|
|
@ -217,23 +252,13 @@
|
|||
clearable
|
||||
/>
|
||||
|
||||
<q-input
|
||||
dense
|
||||
outlined
|
||||
:modelValue="Number(organization.organizationOrder) ?? 0"
|
||||
class="col-xs-12 col-sm-4 col-md-1"
|
||||
type="number"
|
||||
label="ลำดับ"
|
||||
@update:model-value="(value) => updateNumber(organization, value)"
|
||||
/>
|
||||
|
||||
<selector
|
||||
dense
|
||||
outlined
|
||||
v-model="organization.organizationStatusId"
|
||||
:options="organizationStatus"
|
||||
label="สถานะหน่วยงาน"
|
||||
class="col-xs-12 col-sm-4 col-md-2"
|
||||
class="col-xs-12 col-sm-2 col-md-2"
|
||||
use-input
|
||||
input-debounce="0"
|
||||
@filter="
|
||||
|
|
@ -245,35 +270,6 @@
|
|||
map-options
|
||||
emit-value
|
||||
/>
|
||||
<q-input
|
||||
dense
|
||||
outlined
|
||||
v-model="organization.agency"
|
||||
class="col-xs-12 col-sm-4 col-md-3"
|
||||
label="หน่วยงาน"
|
||||
/>
|
||||
<q-input
|
||||
dense
|
||||
outlined
|
||||
v-model="organization.government"
|
||||
class="col-xs-12 col-sm-4 col-md-3"
|
||||
label="ส่วนราชการ"
|
||||
/>
|
||||
<q-input
|
||||
dense
|
||||
outlined
|
||||
v-model="organization.department"
|
||||
class="col-xs-12 col-sm-4 col-md-3"
|
||||
label="ฝ่าย/ส่วน"
|
||||
/>
|
||||
<q-input
|
||||
dense
|
||||
outlined
|
||||
v-model="organization.pile"
|
||||
class="col-xs-12 col-sm-4 col-md-3"
|
||||
label="กอง"
|
||||
/>
|
||||
|
||||
<q-input
|
||||
:class="getClass(true)"
|
||||
hide-bottom-space
|
||||
|
|
@ -286,7 +282,6 @@
|
|||
:label="`${'หน้าที่รับผิดชอบ'}`"
|
||||
type="textarea"
|
||||
/>
|
||||
<!-- :rules="[(val) => !!val || `${'กรุณากรอกเงื่อนไขตำแหน่ง'}`]" -->
|
||||
|
||||
<!-- v-model.number="item.organizationOrder" -->
|
||||
<!--<q-select
|
||||
|
|
@ -318,7 +313,6 @@ import { log } from "console";
|
|||
import { useDataStore } from "@/stores/data";
|
||||
import type { EnumStringMember } from "@babel/types";
|
||||
// import { organizationSet } from "../interface/index/Main";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
||||
const props = defineProps({
|
||||
organizprops: Object as PropType<OrganizaOption>,
|
||||
|
|
@ -329,8 +323,6 @@ const props = defineProps({
|
|||
},
|
||||
});
|
||||
|
||||
const mixin = useCounterMixin();
|
||||
const { showLoader, hideLoader } = mixin;
|
||||
const dataStore = useDataStore();
|
||||
const { loaderPage } = dataStore;
|
||||
const emit = defineEmits(["update:organizprops", "update:formprops"]);
|
||||
|
|
@ -396,11 +388,12 @@ const organization = ref<OrganizaOption>({
|
|||
organizationGovernmentCodeOption: organizationGovernmentCode.value,
|
||||
organizationGovernmentCodeOptionFilter:
|
||||
organizationGovernmentCodeFilter.value,
|
||||
isActive: true,
|
||||
});
|
||||
emit("update:organizprops", organization.value);
|
||||
|
||||
onMounted(async () => {
|
||||
hideLoader();
|
||||
loaderPage(false);
|
||||
// await fillOrgEdit(); //มาแค่ตรง selector(q-select)
|
||||
await fetchOrganizationOri();
|
||||
// await fetchOrganizationShortName();
|
||||
|
|
@ -434,7 +427,7 @@ const getClass = (val: boolean) => {
|
|||
* @param node node that you want to edit data
|
||||
*/
|
||||
const fillOrgEdit = async () => {
|
||||
showLoader();
|
||||
loaderPage(true);
|
||||
await http
|
||||
.get(config.API.getOrgDraft(props.org.organizationId))
|
||||
.then((res) => {
|
||||
|
|
@ -506,7 +499,7 @@ const fillOrgEdit = async () => {
|
|||
console.log(e);
|
||||
})
|
||||
.finally(async () => {
|
||||
hideLoader();
|
||||
loaderPage(false);
|
||||
});
|
||||
console.log("success");
|
||||
};
|
||||
|
|
@ -515,7 +508,7 @@ const fillOrgEdit = async () => {
|
|||
* หน่วยงาน
|
||||
*/
|
||||
const fetchOrganizationOri = async () => {
|
||||
showLoader();
|
||||
loaderPage(true);
|
||||
await http
|
||||
.get(config.API.organization)
|
||||
.then((res) => {
|
||||
|
|
@ -531,14 +524,14 @@ const fetchOrganizationOri = async () => {
|
|||
console.log(e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
loaderPage(false);
|
||||
});
|
||||
};
|
||||
/**
|
||||
* รหัสหน่วยงาน
|
||||
*/
|
||||
const fetchOrganizationAgencyCode = async () => {
|
||||
showLoader();
|
||||
loaderPage(true);
|
||||
await http
|
||||
.get(config.API.organizationCode)
|
||||
.then((res) => {
|
||||
|
|
@ -560,14 +553,14 @@ const fetchOrganizationAgencyCode = async () => {
|
|||
console.log(e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
loaderPage(false);
|
||||
});
|
||||
};
|
||||
/**
|
||||
* รหัสส่วนราชการ
|
||||
*/
|
||||
const fetchOrganizationGovernmentCode = async () => {
|
||||
showLoader();
|
||||
loaderPage(true);
|
||||
await http
|
||||
.get(config.API.organizationShortName)
|
||||
.then((res) => {
|
||||
|
|
@ -592,14 +585,14 @@ const fetchOrganizationGovernmentCode = async () => {
|
|||
console.log(e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
loaderPage(false);
|
||||
});
|
||||
};
|
||||
// /**
|
||||
// * ชื่อย่อหน่วยงาน
|
||||
// */
|
||||
// const fetchOrganizationShortName = async () => {
|
||||
// showLoader();
|
||||
// loaderPage(true);
|
||||
// await http
|
||||
// .get(config.API.organizationShortName)
|
||||
// .then((res) => {
|
||||
|
|
@ -621,17 +614,17 @@ const fetchOrganizationGovernmentCode = async () => {
|
|||
// console.log(e);
|
||||
// })
|
||||
// .finally(() => {
|
||||
// hideLoader();
|
||||
// loaderPage(false);
|
||||
// });
|
||||
// };
|
||||
/**
|
||||
* หน่วยงานต้นสังกัด
|
||||
*/
|
||||
const fetchOrganizationAgency = async () => {
|
||||
showLoader();
|
||||
loaderPage(true);
|
||||
await http
|
||||
// .get(config.API.organizationAgency)
|
||||
.get(config.API.listOrganizationAgency("หน่วยงาน"))
|
||||
.get(config.API.listOrganizationHistoryAgency("หน่วยงาน"))
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
let option: DataOption[] = [];
|
||||
|
|
@ -648,17 +641,17 @@ const fetchOrganizationAgency = async () => {
|
|||
console.log(e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
loaderPage(false);
|
||||
});
|
||||
};
|
||||
/**
|
||||
* ส่วนราชการต้นสังกัด
|
||||
*/
|
||||
const fetchOrganizationGovernmentAgency = async () => {
|
||||
showLoader();
|
||||
loaderPage(true);
|
||||
await http
|
||||
// .get(config.API.organizationGovernmentAgency)
|
||||
.get(config.API.listOrganizationAgency("ส่วนราชการ"))
|
||||
.get(config.API.listOrganizationHistoryAgency("ส่วนราชการ"))
|
||||
.then((res) => {
|
||||
const data = res.data.result;
|
||||
let option: DataOption[] = [];
|
||||
|
|
@ -676,14 +669,14 @@ const fetchOrganizationGovernmentAgency = async () => {
|
|||
console.log(e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
loaderPage(false);
|
||||
});
|
||||
};
|
||||
/**
|
||||
* ประเภทหน่วยงาน
|
||||
*/
|
||||
const fetchOrganizationType = async () => {
|
||||
showLoader();
|
||||
loaderPage(true);
|
||||
await http
|
||||
.get(config.API.organizationType)
|
||||
.then((res) => {
|
||||
|
|
@ -699,7 +692,7 @@ const fetchOrganizationType = async () => {
|
|||
console.log(e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
loaderPage(false);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -707,7 +700,7 @@ const fetchOrganizationType = async () => {
|
|||
* สถานะหน่วยงาน
|
||||
*/
|
||||
const fetchOrganizationStatus = async () => {
|
||||
showLoader();
|
||||
loaderPage(true);
|
||||
await http
|
||||
.get(config.API.organizationStatus)
|
||||
.then((res) => {
|
||||
|
|
@ -723,7 +716,7 @@ const fetchOrganizationStatus = async () => {
|
|||
console.log(e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
loaderPage(false);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -731,7 +724,7 @@ const fetchOrganizationStatus = async () => {
|
|||
* ระดับหน่วยงาน
|
||||
*/
|
||||
const fetchOrganizationLevel = async () => {
|
||||
showLoader();
|
||||
loaderPage(true);
|
||||
await http
|
||||
.get(config.API.organizationLevel)
|
||||
.then((res) => {
|
||||
|
|
@ -747,14 +740,14 @@ const fetchOrganizationLevel = async () => {
|
|||
console.log(e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
loaderPage(false);
|
||||
});
|
||||
};
|
||||
/**
|
||||
* เบอร์ติดต่อภายใน
|
||||
*/
|
||||
const fetchOrganizationTelInternal = async () => {
|
||||
showLoader();
|
||||
loaderPage(true);
|
||||
await http
|
||||
.get(config.API.organizationTelInternal)
|
||||
.then((res) => {
|
||||
|
|
@ -770,14 +763,14 @@ const fetchOrganizationTelInternal = async () => {
|
|||
console.log(e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
loaderPage(false);
|
||||
});
|
||||
};
|
||||
/**
|
||||
* เบอร์ติดต่อภายนอก
|
||||
*/
|
||||
const fetchOrganizationTelExternal = async () => {
|
||||
showLoader();
|
||||
loaderPage(true);
|
||||
await http
|
||||
.get(config.API.organizationTelExternal)
|
||||
.then((res) => {
|
||||
|
|
@ -793,14 +786,14 @@ const fetchOrganizationTelExternal = async () => {
|
|||
console.log(e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
loaderPage(false);
|
||||
});
|
||||
};
|
||||
/**
|
||||
* เบอร์โทรสาร
|
||||
*/
|
||||
const fetchOrganizationFax = async () => {
|
||||
showLoader();
|
||||
loaderPage(true);
|
||||
await http
|
||||
.get(config.API.organizationFax)
|
||||
.then((res) => {
|
||||
|
|
@ -816,13 +809,13 @@ const fetchOrganizationFax = async () => {
|
|||
console.log(e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
loaderPage(false);
|
||||
});
|
||||
};
|
||||
|
||||
const fetchAgencyCode = async (val: string, item: OrganizaOption) => {
|
||||
let option: GovermentOption[] = [];
|
||||
showLoader();
|
||||
loaderPage(true);
|
||||
await http
|
||||
.get(config.API.organizationGovernmentCode(val))
|
||||
.then((res) => {
|
||||
|
|
@ -842,14 +835,14 @@ const fetchAgencyCode = async (val: string, item: OrganizaOption) => {
|
|||
console.log(e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
loaderPage(false);
|
||||
});
|
||||
return option;
|
||||
};
|
||||
|
||||
const fetchGovernmentCode = async (val: string, item: OrganizaOption) => {
|
||||
let option: GovermentOption[] = [];
|
||||
showLoader();
|
||||
loaderPage(true);
|
||||
await http
|
||||
.get(config.API.organizationAgencyCode(val))
|
||||
.then((res) => {
|
||||
|
|
@ -869,7 +862,7 @@ const fetchGovernmentCode = async (val: string, item: OrganizaOption) => {
|
|||
console.log(e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
loaderPage(false);
|
||||
});
|
||||
return option;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@
|
|||
<q-tooltip>เผยแพร่</q-tooltip>
|
||||
</q-btn>
|
||||
<!-- refresh data -->
|
||||
<q-btn
|
||||
<!-- <q-btn
|
||||
flat
|
||||
round
|
||||
icon="mdi-refresh"
|
||||
|
|
@ -74,7 +74,7 @@
|
|||
class="q-mr-sm"
|
||||
>
|
||||
<q-tooltip>รีเฟรชข้อมูล</q-tooltip>
|
||||
</q-btn>
|
||||
</q-btn> -->
|
||||
<q-space />
|
||||
</div>
|
||||
<!-- ข้อมูลการเผยแพร่ข้อมูล -->
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue