อัตรากำลังลูกจ้างประจำ ฯ
This commit is contained in:
parent
68bbde3f04
commit
ac0bc84da3
11 changed files with 114 additions and 98 deletions
|
|
@ -316,6 +316,43 @@ async function onCheckIsDeputy() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** ถ้ามีการเลือก สกจ. และเคยมีเลือกไปแล้วระบบจะถามและให้ยืนยันการเลือกสกจ. */
|
||||||
|
function onChangeIsOfficer() {
|
||||||
|
if (formData.isOfficer === true && checkIsOfficer.value === true) {
|
||||||
|
dialogConfirm(
|
||||||
|
$q,
|
||||||
|
() => (formData.isOfficer = true),
|
||||||
|
"ยืนยันการแก้ไข",
|
||||||
|
"คุณต้องการแก้ไข สกจ. เป็นส่วนราชการนี้ใช่หรือไม่?",
|
||||||
|
() => (formData.isOfficer = false)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** ถ้ามีการเลือก สำนักปลัด และเคยมีเลือกไปแล้วระบบจะถามและให้ยืนยันการเลือกสำนักปลัด */
|
||||||
|
function onChangeIsDeputy() {
|
||||||
|
if (formData.isDeputy == true && checkIsDeputy.value == true) {
|
||||||
|
dialogConfirm(
|
||||||
|
$q,
|
||||||
|
() => (formData.isDeputy = true),
|
||||||
|
"ยืนยันการแก้ไข",
|
||||||
|
"คุณต้องการแก้ไข สำนักปลัด เป็นส่วนราชการนี้ใช่หรือไม่?",
|
||||||
|
() => (formData.isDeputy = false)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* class input
|
||||||
|
* @param val
|
||||||
|
*/
|
||||||
|
function classInput(val: boolean) {
|
||||||
|
return {
|
||||||
|
"full-width cursor-pointer ": val,
|
||||||
|
"full-width cursor-pointer inputgreen": !val,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* callback function ทำงานเมื่อ props.modal เป็น true
|
* callback function ทำงานเมื่อ props.modal เป็น true
|
||||||
*/
|
*/
|
||||||
|
|
@ -375,32 +412,6 @@ watch(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
/** ถ้ามีการเลือก สกจ. และเคยมีเลือกไปแล้วระบบจะถามและให้ยืนยันการเลือกสกจ. */
|
|
||||||
function onChangeIsOfficer() {
|
|
||||||
if (formData.isOfficer === true && checkIsOfficer.value === true) {
|
|
||||||
dialogConfirm(
|
|
||||||
$q,
|
|
||||||
() => (formData.isOfficer = true),
|
|
||||||
"ยืนยันการแก้ไข",
|
|
||||||
"คุณต้องการแก้ไข สกจ. เป็นส่วนราชการนี้ใช่หรือไม่?",
|
|
||||||
() => (formData.isOfficer = false)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/** ถ้ามีการเลือก สำนักปลัด และเคยมีเลือกไปแล้วระบบจะถามและให้ยืนยันการเลือกสำนักปลัด */
|
|
||||||
function onChangeIsDeputy() {
|
|
||||||
if (formData.isDeputy == true && checkIsDeputy.value == true) {
|
|
||||||
dialogConfirm(
|
|
||||||
$q,
|
|
||||||
() => (formData.isDeputy = true),
|
|
||||||
"ยืนยันการแก้ไข",
|
|
||||||
"คุณต้องการแก้ไข สำนักปลัด เป็นส่วนราชการนี้ใช่หรือไม่?",
|
|
||||||
() => (formData.isDeputy = false)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -414,6 +425,7 @@ function onChangeIsDeputy() {
|
||||||
<div class="row q-col-gutter-sm">
|
<div class="row q-col-gutter-sm">
|
||||||
<div class="col-4">
|
<div class="col-4">
|
||||||
<q-input
|
<q-input
|
||||||
|
:class="classInput(false)"
|
||||||
v-model="formData.orgName"
|
v-model="formData.orgName"
|
||||||
ref="orgNameRef"
|
ref="orgNameRef"
|
||||||
dense
|
dense
|
||||||
|
|
@ -434,6 +446,14 @@ function onChangeIsDeputy() {
|
||||||
</div>
|
</div>
|
||||||
<div class="col-2">
|
<div class="col-2">
|
||||||
<q-input
|
<q-input
|
||||||
|
:class="
|
||||||
|
classInput(
|
||||||
|
(actionType === 'ADD' &&
|
||||||
|
props?.dataNode?.orgLevel !== 0 &&
|
||||||
|
level !== 0) ||
|
||||||
|
(actionType === 'EDIT' && props?.dataNode?.orgLevel > 1)
|
||||||
|
)
|
||||||
|
"
|
||||||
v-model="formData.orgShortName"
|
v-model="formData.orgShortName"
|
||||||
:readonly="
|
:readonly="
|
||||||
(actionType === 'ADD' &&
|
(actionType === 'ADD' &&
|
||||||
|
|
@ -452,6 +472,14 @@ function onChangeIsDeputy() {
|
||||||
</div>
|
</div>
|
||||||
<div class="col-2">
|
<div class="col-2">
|
||||||
<q-input
|
<q-input
|
||||||
|
:class="
|
||||||
|
classInput(
|
||||||
|
(actionType === 'ADD' &&
|
||||||
|
props?.dataNode?.orgLevel !== 0 &&
|
||||||
|
level !== 0) ||
|
||||||
|
(actionType === 'EDIT' && props?.dataNode?.orgLevel > 1)
|
||||||
|
)
|
||||||
|
"
|
||||||
:readonly="
|
:readonly="
|
||||||
(actionType === 'ADD' &&
|
(actionType === 'ADD' &&
|
||||||
props?.dataNode?.orgLevel !== 0 &&
|
props?.dataNode?.orgLevel !== 0 &&
|
||||||
|
|
@ -479,6 +507,11 @@ function onChangeIsDeputy() {
|
||||||
</div>
|
</div>
|
||||||
<div class="col-4">
|
<div class="col-4">
|
||||||
<q-select
|
<q-select
|
||||||
|
:class="
|
||||||
|
classInput(
|
||||||
|
level === 0 || formData.orgLevel === 'DEPARTMENT'
|
||||||
|
)
|
||||||
|
"
|
||||||
:readonly="level === 0 || formData.orgLevel === 'DEPARTMENT'"
|
:readonly="level === 0 || formData.orgLevel === 'DEPARTMENT'"
|
||||||
for="#ocLevel"
|
for="#ocLevel"
|
||||||
ref="orgLevelRef"
|
ref="orgLevelRef"
|
||||||
|
|
@ -509,6 +542,7 @@ function onChangeIsDeputy() {
|
||||||
</div>
|
</div>
|
||||||
<div class="col-4" v-if="formData.orgLevel !== ''">
|
<div class="col-4" v-if="formData.orgLevel !== ''">
|
||||||
<q-select
|
<q-select
|
||||||
|
:class="classInput(false)"
|
||||||
ref="orgLevelSubRef"
|
ref="orgLevelSubRef"
|
||||||
dense
|
dense
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
|
|
@ -535,6 +569,7 @@ function onChangeIsDeputy() {
|
||||||
for="#telOut"
|
for="#telOut"
|
||||||
label="หมายเลขโทรศัพท์ที่ติดต่อจากภายนอก"
|
label="หมายเลขโทรศัพท์ที่ติดต่อจากภายนอก"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
|
:class="classInput(false)"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-4">
|
<div class="col-4">
|
||||||
|
|
@ -546,6 +581,7 @@ function onChangeIsDeputy() {
|
||||||
for="#telIn"
|
for="#telIn"
|
||||||
label="หมายเลขโทรศัพท์ที่ติดต่อจากภายใน"
|
label="หมายเลขโทรศัพท์ที่ติดต่อจากภายใน"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
|
:class="classInput(false)"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-4">
|
<div class="col-4">
|
||||||
|
|
@ -557,6 +593,7 @@ function onChangeIsDeputy() {
|
||||||
for="#tel"
|
for="#tel"
|
||||||
label="หมายเลขโทรสาร"
|
label="หมายเลขโทรสาร"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
|
:class="classInput(false)"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
|
|
@ -570,6 +607,7 @@ function onChangeIsDeputy() {
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
type="textarea"
|
type="textarea"
|
||||||
rows="4"
|
rows="4"
|
||||||
|
:class="classInput(false)"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
|
|
|
||||||
|
|
@ -127,6 +127,7 @@ watch(
|
||||||
:enableTimePicker="false"
|
:enableTimePicker="false"
|
||||||
week-start="0"
|
week-start="0"
|
||||||
:min-date="minDate"
|
:min-date="minDate"
|
||||||
|
class="inputgreen"
|
||||||
>
|
>
|
||||||
<template #year="{ year }">
|
<template #year="{ year }">
|
||||||
{{ year + 543 }}
|
{{ year + 543 }}
|
||||||
|
|
|
||||||
|
|
@ -326,7 +326,7 @@ async function searchInput() {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(
|
.get(
|
||||||
config.API.orgPosPosition + `?keyword=${search.value}&type=${type.value}`
|
config.API.orgPosPosition + `?keyword=${search.value.trim()}&type=${type.value}`
|
||||||
)
|
)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
rowsPositionSelect.value = res.data.result;
|
rowsPositionSelect.value = res.data.result;
|
||||||
|
|
@ -556,7 +556,7 @@ watch(
|
||||||
lazy-rules
|
lazy-rules
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:rules="[
|
:rules="[
|
||||||
(val) => !!val || `${'กรุณากรอกตำแหน่งเลขที่'}`,
|
(val:string) => !!val || `${'กรุณากรอกตำแหน่งเลขที่'}`,
|
||||||
]"
|
]"
|
||||||
mask="########################"
|
mask="########################"
|
||||||
/>
|
/>
|
||||||
|
|
@ -757,11 +757,8 @@ watch(
|
||||||
|
|
||||||
<div class="col-12 col-sm-6 col-md-6">
|
<div class="col-12 col-sm-6 col-md-6">
|
||||||
<q-input
|
<q-input
|
||||||
:class="inputEdit(isReadonly)"
|
|
||||||
v-model="search"
|
v-model="search"
|
||||||
outlined
|
outlined
|
||||||
clearable
|
|
||||||
@clear="search = ''"
|
|
||||||
dense
|
dense
|
||||||
lazy-rules
|
lazy-rules
|
||||||
label="คำค้น"
|
label="คำค้น"
|
||||||
|
|
@ -772,6 +769,7 @@ watch(
|
||||||
|
|
||||||
<div class="col-12 col-sm-6 col-md-3">
|
<div class="col-12 col-sm-6 col-md-3">
|
||||||
<q-btn
|
<q-btn
|
||||||
|
outline
|
||||||
color="primary"
|
color="primary"
|
||||||
icon="search"
|
icon="search"
|
||||||
label="ค้นหา"
|
label="ค้นหา"
|
||||||
|
|
|
||||||
|
|
@ -130,6 +130,9 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
field: "posExecutive",
|
field: "posExecutive",
|
||||||
headerStyle: "font-size: 14px",
|
headerStyle: "font-size: 14px",
|
||||||
style: "font-size: 14px",
|
style: "font-size: 14px",
|
||||||
|
format(val, row) {
|
||||||
|
return !val ? "-" : val;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "lastUpdatedAt",
|
name: "lastUpdatedAt",
|
||||||
|
|
|
||||||
|
|
@ -206,7 +206,11 @@ watch(
|
||||||
<q-space />
|
<q-space />
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<q-input outlined dense v-model="filterTable" label="ค้นหา" />
|
<q-input outlined dense v-model="filterTable" label="ค้นหา">
|
||||||
|
<template v-slot:append>
|
||||||
|
<q-icon name="search" />
|
||||||
|
</template>
|
||||||
|
</q-input>
|
||||||
</div>
|
</div>
|
||||||
</q-toolbar>
|
</q-toolbar>
|
||||||
|
|
||||||
|
|
@ -216,7 +220,7 @@ watch(
|
||||||
:rows="rows"
|
:rows="rows"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
row-key="id"
|
row-key="id"
|
||||||
:filter="filterTable"
|
:filter="filterTable.trim()"
|
||||||
no-data-label="ไม่มีข้อมูล"
|
no-data-label="ไม่มีข้อมูล"
|
||||||
selection="multiple"
|
selection="multiple"
|
||||||
v-model:selected="selectedFilter"
|
v-model:selected="selectedFilter"
|
||||||
|
|
@ -296,12 +300,7 @@ watch(
|
||||||
label="ค้นหา"
|
label="ค้นหา"
|
||||||
>
|
>
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<q-icon
|
<q-icon name="search" />
|
||||||
v-if="filterTree !== ''"
|
|
||||||
name="clear"
|
|
||||||
class="cursor-pointer"
|
|
||||||
@click="resetFilter"
|
|
||||||
/>
|
|
||||||
</template>
|
</template>
|
||||||
</q-input>
|
</q-input>
|
||||||
<q-tree
|
<q-tree
|
||||||
|
|
@ -311,7 +310,7 @@ watch(
|
||||||
:nodes="nodeTree"
|
:nodes="nodeTree"
|
||||||
node-key="orgTreeId"
|
node-key="orgTreeId"
|
||||||
label-key="labelName"
|
label-key="labelName"
|
||||||
:filter="filterTree"
|
:filter="filterTree.trim()"
|
||||||
no-results-label="ไม่พบข้อมูลที่ค้นหา"
|
no-results-label="ไม่พบข้อมูลที่ค้นหา"
|
||||||
no-nodes-label="ไม่มีข้อมูล"
|
no-nodes-label="ไม่มีข้อมูล"
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -194,6 +194,7 @@ watch(
|
||||||
<div class="row q-col-gutter-sm">
|
<div class="row q-col-gutter-sm">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-input
|
<q-input
|
||||||
|
class="inputgreen"
|
||||||
v-model="formData.orgRevisionName"
|
v-model="formData.orgRevisionName"
|
||||||
ref="orgRevisionNameRef"
|
ref="orgRevisionNameRef"
|
||||||
dense
|
dense
|
||||||
|
|
@ -207,6 +208,7 @@ watch(
|
||||||
|
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-input
|
<q-input
|
||||||
|
class="inputgreen"
|
||||||
v-model="formData.remark"
|
v-model="formData.remark"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
|
|
|
||||||
|
|
@ -127,7 +127,10 @@ const selectedPos = ref<PosMaster[]>([]);
|
||||||
async function fetchTable() {
|
async function fetchTable() {
|
||||||
selectedPos.value = [];
|
selectedPos.value = [];
|
||||||
await http
|
await http
|
||||||
.post(config.API.orgPosMasterList, reqMaster)
|
.post(config.API.orgPosMasterList, {
|
||||||
|
...reqMaster,
|
||||||
|
keyword: reqMaster.keyword.trim(),
|
||||||
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
totalRow.value = Math.ceil(res.data.result.total / reqMaster.pageSize);
|
totalRow.value = Math.ceil(res.data.result.total / reqMaster.pageSize);
|
||||||
const data = res.data.result.data;
|
const data = res.data.result.data;
|
||||||
|
|
@ -238,7 +241,7 @@ watch([() => reqMaster.page, () => reqMaster.pageSize], async () => {
|
||||||
:tittle="'เลือกตำแหน่งที่ต้องการสืบทอดจากโครงสร้างปัจจุบัน'"
|
:tittle="'เลือกตำแหน่งที่ต้องการสืบทอดจากโครงสร้างปัจจุบัน'"
|
||||||
:close="
|
:close="
|
||||||
() => {
|
() => {
|
||||||
modal = false;
|
(modal = false), (filterTree = '');
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
/>
|
/>
|
||||||
|
|
@ -265,12 +268,7 @@ watch([() => reqMaster.page, () => reqMaster.pageSize], async () => {
|
||||||
label="ค้นหา"
|
label="ค้นหา"
|
||||||
>
|
>
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<q-icon
|
<q-icon name="search" />
|
||||||
v-if="filterTree !== ''"
|
|
||||||
name="clear"
|
|
||||||
class="cursor-pointer"
|
|
||||||
@click="resetFilter"
|
|
||||||
/>
|
|
||||||
</template>
|
</template>
|
||||||
</q-input>
|
</q-input>
|
||||||
<q-tree
|
<q-tree
|
||||||
|
|
@ -281,7 +279,7 @@ watch([() => reqMaster.page, () => reqMaster.pageSize], async () => {
|
||||||
:nodes="nodeTree"
|
:nodes="nodeTree"
|
||||||
node-key="orgTreeId"
|
node-key="orgTreeId"
|
||||||
label-key="labelName"
|
label-key="labelName"
|
||||||
:filter="filterTree"
|
:filter="filterTree.trim()"
|
||||||
no-results-label="ไม่พบข้อมูลที่ค้นหา"
|
no-results-label="ไม่พบข้อมูลที่ค้นหา"
|
||||||
no-nodes-label="ไม่มีข้อมูล"
|
no-nodes-label="ไม่มีข้อมูล"
|
||||||
>
|
>
|
||||||
|
|
@ -327,7 +325,11 @@ watch([() => reqMaster.page, () => reqMaster.pageSize], async () => {
|
||||||
v-model="reqMaster.keyword"
|
v-model="reqMaster.keyword"
|
||||||
label="ค้นหา"
|
label="ค้นหา"
|
||||||
@keyup.enter="filterKeyword"
|
@keyup.enter="filterKeyword"
|
||||||
/>
|
>
|
||||||
|
<template v-slot:append>
|
||||||
|
<q-icon name="search" />
|
||||||
|
</template>
|
||||||
|
</q-input>
|
||||||
</div>
|
</div>
|
||||||
</q-toolbar>
|
</q-toolbar>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ import type { FilterMaster } from "@/modules/02_organization/interface/request/o
|
||||||
|
|
||||||
/** importComponents*/
|
/** importComponents*/
|
||||||
import TreeMain from "@/modules/02_organization/components/TreeMain.vue";
|
import TreeMain from "@/modules/02_organization/components/TreeMain.vue";
|
||||||
import TreeTable from "@/modules/02_organization/components/TreeTable.vue";
|
import TreeTable from "@/modules/02_organization/components/TableMain.vue";
|
||||||
import LoadView from "@/components/LoadView.vue";
|
import LoadView from "@/components/LoadView.vue";
|
||||||
|
|
||||||
/** use*/
|
/** use*/
|
||||||
|
|
@ -108,7 +108,10 @@ async function fetchDataTable(id: string, level: number, action: boolean) {
|
||||||
}
|
}
|
||||||
|
|
||||||
await http
|
await http
|
||||||
.post(config.API.orgPosMasterList, reqMaster)
|
.post(config.API.orgPosMasterList, {
|
||||||
|
...reqMaster,
|
||||||
|
keyword: reqMaster.keyword.trim(),
|
||||||
|
})
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
posMaster.value = [];
|
posMaster.value = [];
|
||||||
const dataMain: PosMaster[] = [];
|
const dataMain: PosMaster[] = [];
|
||||||
|
|
@ -138,9 +141,7 @@ async function fetchDataTable(id: string, level: number, action: boolean) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** ดึงข้อมูลสถิติจำนวนด้านบน*/
|
||||||
* ดึงข้อมูลสถิติจำนวนด้านบน
|
|
||||||
*/
|
|
||||||
function getSummary() {
|
function getSummary() {
|
||||||
http
|
http
|
||||||
.post(config.API.orgSummary, {
|
.post(config.API.orgSummary, {
|
||||||
|
|
@ -165,9 +166,7 @@ function getSummary() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** funcion ค้นหาข้อมูลใน Table*/
|
||||||
* funcion ค้นหาข้อมูลใน Table
|
|
||||||
*/
|
|
||||||
async function filterKeyword() {
|
async function filterKeyword() {
|
||||||
reqMaster.page = 1;
|
reqMaster.page = 1;
|
||||||
action1.value === false &&
|
action1.value === false &&
|
||||||
|
|
@ -201,9 +200,7 @@ watch(
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/** callblck function ทำการ fetch ข้อมูล Tree เมื่อมีการเปลี่ยนโครงสร้าง*/
|
||||||
* callblck function ทำการ fetch ข้อมูล Tree เมื่อมีการเปลี่ยนโครงสร้าง
|
|
||||||
*/
|
|
||||||
watch(
|
watch(
|
||||||
() => store.typeOrganizational,
|
() => store.typeOrganizational,
|
||||||
() => {
|
() => {
|
||||||
|
|
@ -216,17 +213,13 @@ watch(
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/** callblck function ทำการ fetch ข้อมูล Table เมื่อมีการเปลี่ยนหน้า */
|
||||||
* callblck function ทำการ fetch ข้อมูล Table เมื่อมีการเปลี่ยนหน้า
|
|
||||||
*/
|
|
||||||
watch([() => reqMaster.page, () => reqMaster.pageSize], () => {
|
watch([() => reqMaster.page, () => reqMaster.pageSize], () => {
|
||||||
action1.value === false &&
|
action1.value === false &&
|
||||||
fetchDataTable(reqMaster.id, reqMaster.type, false);
|
fetchDataTable(reqMaster.id, reqMaster.type, false);
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/** callblck function ทำการ fetch ข้อมูล Table เมื่อแสดงตำแหน่งทั้งหมด*/
|
||||||
* callblck function ทำการ fetch ข้อมูล Table เมื่อแสดงตำแหน่งทั้งหมด
|
|
||||||
*/
|
|
||||||
watch(
|
watch(
|
||||||
() => reqMaster.isAll,
|
() => reqMaster.isAll,
|
||||||
() => {
|
() => {
|
||||||
|
|
@ -402,7 +402,7 @@ watch(
|
||||||
<div
|
<div
|
||||||
:class="
|
:class="
|
||||||
store.typeOrganizational === 'draft' &&
|
store.typeOrganizational === 'draft' &&
|
||||||
checkPermission($route)?.attrOwnership == 'OWNER ' &&
|
checkPermission($route)?.attrOwnership == 'OWNER' &&
|
||||||
!store.isLosck
|
!store.isLosck
|
||||||
? 'col-10'
|
? 'col-10'
|
||||||
: 'col-12'
|
: 'col-12'
|
||||||
|
|
@ -410,13 +410,7 @@ watch(
|
||||||
>
|
>
|
||||||
<q-input dense outlined v-model="filter" label="ค้นหา">
|
<q-input dense outlined v-model="filter" label="ค้นหา">
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<q-icon
|
<q-icon name="search" color="grey-5" />
|
||||||
v-if="filter !== ''"
|
|
||||||
name="clear"
|
|
||||||
class="cursor-pointer"
|
|
||||||
@click="filter = ''"
|
|
||||||
/>
|
|
||||||
<q-icon name="search" color="grey-5" v-else />
|
|
||||||
</template>
|
</template>
|
||||||
</q-input>
|
</q-input>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -429,7 +423,7 @@ watch(
|
||||||
:nodes="lazy"
|
:nodes="lazy"
|
||||||
node-key="orgTreeId"
|
node-key="orgTreeId"
|
||||||
label-key="labelName"
|
label-key="labelName"
|
||||||
:filter="filter"
|
:filter="filter.trim()"
|
||||||
:no-results-label="notFound"
|
:no-results-label="notFound"
|
||||||
:no-nodes-label="noData"
|
:no-nodes-label="noData"
|
||||||
v-model:expanded="expanded"
|
v-model:expanded="expanded"
|
||||||
|
|
|
||||||
|
|
@ -8,25 +8,20 @@ import { checkPermission } from "@/utils/permissions";
|
||||||
import { useOrganizational } from "@/modules/02_organization/store/organizational";
|
import { useOrganizational } from "@/modules/02_organization/store/organizational";
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
|
|
||||||
/**
|
/** importType*/
|
||||||
* importType
|
|
||||||
*/
|
|
||||||
import type { DataOrgRevision } from "@/modules/02_organization/interface/index/Main";
|
import type { DataOrgRevision } from "@/modules/02_organization/interface/index/Main";
|
||||||
import type { OrgRevision } from "@/modules/02_organization/interface/response/organizational";
|
import type { OrgRevision } from "@/modules/02_organization/interface/response/organizational";
|
||||||
|
|
||||||
/**
|
/** importComponents*/
|
||||||
* importComponents
|
import TreeView from "@/modules/02_organization/components/MainView.vue";
|
||||||
*/
|
|
||||||
import TreeView from "@/modules/02_organization/components/TreeView.vue";
|
|
||||||
import StructureView from "@/modules/02_organization/components/StructureMain.vue";
|
import StructureView from "@/modules/02_organization/components/StructureMain.vue";
|
||||||
import StructureOrgMain from "@/modules/02_organization/components/StructureOrgMain.vue";
|
import StructureOrgMain from "@/modules/02_organization/components/StructureOrgMain.vue";
|
||||||
import DialogFormNewStructure from "@/modules/02_organization/components/DialogNewStructure.vue";
|
import DialogFormNewStructure from "@/modules/02_organization/components/DialogNewStructure.vue";
|
||||||
import DialogDateTime from "@/modules/02_organization/components/DialogFormDateTime.vue";
|
import DialogDateTime from "@/modules/02_organization/components/DialogFormDateTime.vue";
|
||||||
import DialogCreateCommandORG from "@/modules/18_command/components/DialogCreateCommandORG.vue"; //ส่่งไปออกคำสั่ง
|
import DialogCreateCommandORG from "@/modules/18_command/components/DialogCreateCommandORG.vue"; //ส่่งไปออกคำสั่ง
|
||||||
import DialogHeader from "@/components/DialogHeader.vue";
|
import DialogHeader from "@/components/DialogHeader.vue";
|
||||||
/**
|
|
||||||
* use
|
/** use*/
|
||||||
*/
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const { showLoader, hideLoader, messageError, date2Thai } = useCounterMixin();
|
const { showLoader, hideLoader, messageError, date2Thai } = useCounterMixin();
|
||||||
const store = useOrganizational();
|
const store = useOrganizational();
|
||||||
|
|
@ -84,9 +79,7 @@ async function fetchOrganizationActive() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** function เรียกข้อมูรายการลประวัติโครงสร้าง*/
|
||||||
* function เรียกข้อมูรายการลประวัติโครงสร้าง
|
|
||||||
*/
|
|
||||||
async function fetchHistory() {
|
async function fetchHistory() {
|
||||||
await http
|
await http
|
||||||
.get(config.API.organizationHistoryNew)
|
.get(config.API.organizationHistoryNew)
|
||||||
|
|
@ -118,9 +111,7 @@ function ocClickAddStructure(type: string) {
|
||||||
typeStructure.value = type;
|
typeStructure.value = type;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** function openPopup ตั้งเวลาเผยแพร่ */
|
||||||
* function openPopup ตั้งเวลาเผยแพร่
|
|
||||||
*/
|
|
||||||
function onClickDateTime() {
|
function onClickDateTime() {
|
||||||
modalDateTime.value = !modalDateTime.value;
|
modalDateTime.value = !modalDateTime.value;
|
||||||
}
|
}
|
||||||
|
|
@ -138,20 +129,16 @@ function onClickHistory(id: string, name: string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function workflowSystem() {
|
async function workflowSystem() {
|
||||||
showLoader();
|
|
||||||
http
|
http
|
||||||
.get(config.API.workflowKeycloakSystem("SYS_ORG"))
|
.get(config.API.workflowKeycloakSystem("SYS_ORG"))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
store.isOfficer = data.isOfficer;
|
store.isOfficer = data.isOfficer;
|
||||||
store.isStaff = data.isStaff;
|
store.isStaff = data.isStaff;
|
||||||
hideLoader();
|
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
hideLoader();
|
});
|
||||||
})
|
|
||||||
.finally(() => {});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function fetchCheckIslock(id: string) {
|
async function fetchCheckIslock(id: string) {
|
||||||
|
|
@ -183,7 +170,6 @@ watch(
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* lifecycleHook ทำงานเมื่อมีการเรียกใช้ Components
|
* lifecycleHook ทำงานเมื่อมีการเรียกใช้ Components
|
||||||
*
|
|
||||||
* ดึงข้อมูลโครงสร้างและรายการประวัติโครงสร้าง
|
* ดึงข้อมูลโครงสร้างและรายการประวัติโครงสร้าง
|
||||||
*/
|
*/
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue