ปรับui เพิ่มactivepopup
This commit is contained in:
parent
4a5314cf5f
commit
0a3d99bd07
1 changed files with 81 additions and 120 deletions
|
|
@ -234,10 +234,10 @@ const templateDetail = async () => {
|
||||||
};
|
};
|
||||||
const appointModal = ref<boolean>(false);
|
const appointModal = ref<boolean>(false);
|
||||||
|
|
||||||
const nodeTree = async (isDraft: boolean) => {
|
const nodeTree = async () => {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.getDraftTreeRoot)
|
.get(config.API.getTreeRoot)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
nodesTree.value = data;
|
nodesTree.value = data;
|
||||||
|
|
@ -287,7 +287,7 @@ const clickEditRow = () => {
|
||||||
};
|
};
|
||||||
const getClass = (val: boolean) => {
|
const getClass = (val: boolean) => {
|
||||||
return {
|
return {
|
||||||
"full-width inputgreen cursor-pointer": val,
|
"full-width inputgreen cursor-pointer ": val,
|
||||||
"full-width cursor-pointer": !val,
|
"full-width cursor-pointer": !val,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
@ -371,7 +371,7 @@ placementData.mappingPosition.columns.length == 0
|
||||||
const columns = ref<QTableProps["columns"]>([
|
const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
name: "position",
|
name: "position",
|
||||||
align: "left",
|
align: "center",
|
||||||
label: "ลำดับ",
|
label: "ลำดับ",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "position",
|
field: "position",
|
||||||
|
|
@ -391,7 +391,7 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "ExamOrder",
|
name: "ExamOrder",
|
||||||
align: "left",
|
align: "center",
|
||||||
label: "ลำดับที่สอบได้",
|
label: "ลำดับที่สอบได้",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "ExamOrder",
|
field: "ExamOrder",
|
||||||
|
|
@ -422,7 +422,7 @@ const columns = ref<QTableProps["columns"]>([
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "BMAOfficer",
|
name: "BMAOfficer",
|
||||||
align: "left",
|
align: "center",
|
||||||
label: "ข้าราชการฯ กทม.",
|
label: "ข้าราชการฯ กทม.",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: "BMAOfficer",
|
field: "BMAOfficer",
|
||||||
|
|
@ -1067,7 +1067,6 @@ onMounted(async () => {
|
||||||
// await fetchData();
|
// await fetchData();
|
||||||
});
|
});
|
||||||
const fetchChildrenByParentId = async (node: any) => {
|
const fetchChildrenByParentId = async (node: any) => {
|
||||||
// console.log(isDraft);
|
|
||||||
console.log("Call API4");
|
console.log("Call API4");
|
||||||
showLoader();
|
showLoader();
|
||||||
let request = "";
|
let request = "";
|
||||||
|
|
@ -1094,6 +1093,17 @@ const onLazyLoad = (node: any) => {
|
||||||
node.done(node.node.children); //return ค่าให้ q-tree generate children
|
node.done(node.node.children); //return ค่าให้ q-tree generate children
|
||||||
}, 10);
|
}, 10);
|
||||||
};
|
};
|
||||||
|
const listKeyId = (data: any) => {
|
||||||
|
const { node } = data;
|
||||||
|
console.log("test", node);
|
||||||
|
posNoId.value = node.positionNum;
|
||||||
|
positionId.value = node.positionName;
|
||||||
|
positionPathSideId.value = node.executivePositionSide;
|
||||||
|
positionTypeId.value = node.positionType;
|
||||||
|
positionLineId.value = node.organizationName;
|
||||||
|
positionLevelId.value = node.positionLevel;
|
||||||
|
return node.keyId;
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<q-form ref="myForm">
|
<q-form ref="myForm">
|
||||||
|
|
@ -1146,7 +1156,26 @@ const onLazyLoad = (node: any) => {
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="col.name == 'Name'" class="table_ellipsis">
|
<div v-else-if="col.name == 'Name'" class="table_ellipsis">
|
||||||
{{ col.value }}
|
{{ col.value }}
|
||||||
<p>{{ props.row.fullName }}</p>
|
<div class="row col-12 text-no-wrap items-center">
|
||||||
|
<img
|
||||||
|
v-if="props.row.avatar == null"
|
||||||
|
src="@/assets/avatar_user.jpg"
|
||||||
|
class="col-4 img-info"
|
||||||
|
/>
|
||||||
|
<img
|
||||||
|
v-else
|
||||||
|
:src="props.row.avatar"
|
||||||
|
class="col-4 img-info"
|
||||||
|
/>
|
||||||
|
<div class="col-4">
|
||||||
|
<div class="text-weight-medium">
|
||||||
|
{{ props.row.fullName }}
|
||||||
|
</div>
|
||||||
|
<div class="text-weight-light">
|
||||||
|
{{ props.row.profileID }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="col.name == 'Unit'" class="table_ellipsis">
|
<div v-else-if="col.name == 'Unit'" class="table_ellipsis">
|
||||||
<div v-if="editvisible && props.row.Status == 'ยังไม่บรรจุ'">
|
<div v-if="editvisible && props.row.Status == 'ยังไม่บรรจุ'">
|
||||||
|
|
@ -1176,7 +1205,7 @@ const onLazyLoad = (node: any) => {
|
||||||
-
|
-
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
{{ props.row.examResult }}
|
{{ props.row.UnitGroup }}
|
||||||
<p>{{ col.value }}</p>
|
<p>{{ col.value }}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -1357,8 +1386,8 @@ const onLazyLoad = (node: any) => {
|
||||||
|
|
||||||
<q-space />
|
<q-space />
|
||||||
</div>
|
</div>
|
||||||
<div class="col items-center q-px-xs q-pt-xs ">
|
<div class="col items-center q-px-xs q-pt-xs">
|
||||||
<div class="text-weight-medium text-grey-7 ">
|
<div class="text-weight-medium text-grey-7">
|
||||||
{{ prop.node.governmentCode }}
|
{{ prop.node.governmentCode }}
|
||||||
{{ prop.node.organizationShortName }}
|
{{ prop.node.organizationShortName }}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -1369,7 +1398,7 @@ const onLazyLoad = (node: any) => {
|
||||||
<q-item
|
<q-item
|
||||||
clickable
|
clickable
|
||||||
:active="clickAction === prop.node.keyId"
|
:active="clickAction === prop.node.keyId"
|
||||||
@click="clickAction = '1-1-3'"
|
@click="clickAction = listKeyId(prop)"
|
||||||
active-class="my-list-link text-primary text-weight-medium"
|
active-class="my-list-link text-primary text-weight-medium"
|
||||||
class="row items-center text-dark q-py-xs q-pl-sm rounded-borders my-list"
|
class="row items-center text-dark q-py-xs q-pl-sm rounded-borders my-list"
|
||||||
>
|
>
|
||||||
|
|
@ -1490,153 +1519,75 @@ const onLazyLoad = (node: any) => {
|
||||||
</datepicker>
|
</datepicker>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6 col-sm-6 col-md-6">
|
<div class="col-xs-6 col-sm-6 col-md-6">
|
||||||
<selector
|
<q-input
|
||||||
:class="getClass(edit)"
|
disable
|
||||||
:outlined="edit"
|
standout
|
||||||
|
readonly
|
||||||
|
class="custom-input"
|
||||||
dense
|
dense
|
||||||
lazy-rules
|
lazy-rules
|
||||||
:readonly="!edit"
|
|
||||||
:borderless="!edit"
|
|
||||||
v-model="posNoId"
|
v-model="posNoId"
|
||||||
:rules="[
|
|
||||||
(val:string) => !!val || `${'กรุณาเลือกเลขที่ตำแหน่ง'}`,
|
|
||||||
]"
|
|
||||||
:label="`${'เลขที่ตำแหน่ง'}`"
|
:label="`${'เลขที่ตำแหน่ง'}`"
|
||||||
@update:modelValue="clickEditRow"
|
|
||||||
emit-value
|
|
||||||
map-options
|
|
||||||
option-label="name"
|
|
||||||
:options="posNoOptions"
|
|
||||||
option-value="id"
|
|
||||||
hide-bottom-space
|
|
||||||
use-input
|
|
||||||
input-debounce="0"
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6 col-sm-6 col-md-6">
|
<div class="col-xs-6 col-sm-6 col-md-6">
|
||||||
<selector
|
<q-input
|
||||||
:class="getClass(edit)"
|
disable
|
||||||
:outlined="edit"
|
readonly
|
||||||
|
class="custom-input"
|
||||||
|
standout
|
||||||
dense
|
dense
|
||||||
lazy-rules
|
lazy-rules
|
||||||
:readonly="!edit"
|
|
||||||
:borderless="!edit"
|
|
||||||
v-model="positionId"
|
v-model="positionId"
|
||||||
:rules="[(val:string) => !!val || `${'กรุณาเลือกตำแหน่ง'}`]"
|
|
||||||
:label="`${'ตำแหน่ง'}`"
|
:label="`${'ตำแหน่ง'}`"
|
||||||
@update:modelValue="clickEditRow"
|
|
||||||
emit-value
|
|
||||||
map-options
|
|
||||||
option-label="name"
|
|
||||||
:options="positionOptions"
|
|
||||||
option-value="id"
|
|
||||||
hide-bottom-space
|
|
||||||
use-input
|
|
||||||
input-debounce="0"
|
|
||||||
@filter="(inputValue:any,
|
|
||||||
doneFn:Function) => filterSelector(inputValue, doneFn,'2'
|
|
||||||
) "
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6 col-sm-6 col-md-6">
|
<div class="col-xs-6 col-sm-6 col-md-6">
|
||||||
<selector
|
<q-input
|
||||||
:class="getClass(edit)"
|
disable
|
||||||
:outlined="edit"
|
readonly
|
||||||
|
class="custom-input"
|
||||||
|
standout
|
||||||
dense
|
dense
|
||||||
lazy-rules
|
lazy-rules
|
||||||
:readonly="!edit"
|
|
||||||
:borderless="!edit"
|
|
||||||
v-model="positionPathSideId"
|
v-model="positionPathSideId"
|
||||||
:label="`${'ด้าน/สาขา'}`"
|
:label="`${'ด้าน/สาขา'}`"
|
||||||
@update:modelValue="clickEditRow"
|
|
||||||
emit-value
|
|
||||||
map-options
|
|
||||||
option-label="name"
|
|
||||||
:options="positionSideOptions"
|
|
||||||
option-value="id"
|
|
||||||
hide-bottom-space
|
|
||||||
use-input
|
|
||||||
input-debounce="0"
|
|
||||||
@filter="(inputValue:any,
|
|
||||||
doneFn:Function) => filterSelector(inputValue, doneFn,'3'
|
|
||||||
) "
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6 col-sm-6 col-md-6">
|
<div class="col-xs-6 col-sm-6 col-md-6">
|
||||||
<selector
|
<q-input
|
||||||
:class="getClass(edit)"
|
disable
|
||||||
:outlined="edit"
|
readonly
|
||||||
|
class="custom-input"
|
||||||
|
standout
|
||||||
dense
|
dense
|
||||||
lazy-rules
|
lazy-rules
|
||||||
:readonly="!edit"
|
|
||||||
:borderless="!edit"
|
|
||||||
v-model="positionTypeId"
|
v-model="positionTypeId"
|
||||||
:rules="[
|
|
||||||
(val:string) => !!val || `${'กรุณาเลือกประเภทตำแหน่ง'}`,
|
|
||||||
]"
|
|
||||||
:label="`${'ประเภทตำแหน่ง'}`"
|
:label="`${'ประเภทตำแหน่ง'}`"
|
||||||
@update:modelValue="clickEditRow"
|
|
||||||
emit-value
|
|
||||||
map-options
|
|
||||||
option-label="name"
|
|
||||||
:options="positionTypeOptions"
|
|
||||||
option-value="id"
|
|
||||||
hide-bottom-space
|
|
||||||
use-input
|
|
||||||
input-debounce="0"
|
|
||||||
@filter="(inputValue:any,
|
|
||||||
doneFn:Function) => filterSelector(inputValue, doneFn,'4'
|
|
||||||
) "
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6 col-sm-6 col-md-6">
|
<div class="col-xs-6 col-sm-6 col-md-6">
|
||||||
<selector
|
<q-input
|
||||||
:class="getClass(edit)"
|
disable
|
||||||
:outlined="edit"
|
readonly
|
||||||
|
class="custom-input"
|
||||||
|
standout
|
||||||
dense
|
dense
|
||||||
lazy-rules
|
lazy-rules
|
||||||
:readonly="!edit"
|
|
||||||
:borderless="!edit"
|
|
||||||
v-model="positionLineId"
|
v-model="positionLineId"
|
||||||
:rules="[(val:string) => !!val || `${'กรุณาเลือกสายงาน'}`]"
|
|
||||||
:label="`${'สายงาน'}`"
|
:label="`${'สายงาน'}`"
|
||||||
@update:modelValue="clickEditRow"
|
|
||||||
emit-value
|
|
||||||
map-options
|
|
||||||
option-label="name"
|
|
||||||
:options="positionLineOptions"
|
|
||||||
option-value="id"
|
|
||||||
hide-bottom-space
|
|
||||||
use-input
|
|
||||||
input-debounce="0"
|
|
||||||
@filter="(inputValue:any,
|
|
||||||
doneFn:Function) => filterSelector(inputValue, doneFn,'5'
|
|
||||||
) "
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6 col-sm-6 col-md-6">
|
<div class="col-xs-6 col-sm-6 col-md-6">
|
||||||
<selector
|
<q-input
|
||||||
:class="getClass(edit)"
|
disable
|
||||||
:outlined="edit"
|
readonly
|
||||||
|
class="custom-input"
|
||||||
|
standout
|
||||||
dense
|
dense
|
||||||
lazy-rules
|
lazy-rules
|
||||||
:readonly="!edit"
|
|
||||||
:borderless="!edit"
|
|
||||||
v-model="positionLevelId"
|
v-model="positionLevelId"
|
||||||
:rules="[(val:string) => !!val || `${'กรุณาเลือกระดับ'}`]"
|
|
||||||
:label="`${'ระดับ'}`"
|
:label="`${'ระดับ'}`"
|
||||||
@update:modelValue="clickEditRow"
|
|
||||||
emit-value
|
|
||||||
map-options
|
|
||||||
option-label="name"
|
|
||||||
:options="positionLevelOptions"
|
|
||||||
option-value="id"
|
|
||||||
hide-bottom-space
|
|
||||||
use-input
|
|
||||||
input-debounce="0"
|
|
||||||
@filter="(inputValue:any,
|
|
||||||
doneFn:Function) => filterSelector(inputValue, doneFn,'6'
|
|
||||||
) "
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6 col-sm-6 col-md-6"></div>
|
<div class="col-xs-6 col-sm-6 col-md-6"></div>
|
||||||
|
|
@ -1869,6 +1820,9 @@ const onLazyLoad = (node: any) => {
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
.custom-input {
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
.my-list-link {
|
.my-list-link {
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
|
|
||||||
|
|
@ -1880,4 +1834,11 @@ const onLazyLoad = (node: any) => {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
color: #818181;
|
color: #818181;
|
||||||
}
|
}
|
||||||
|
.img-info {
|
||||||
|
width: 30px !important;
|
||||||
|
height: 30px !important;
|
||||||
|
border-radius: 50%;
|
||||||
|
object-fit: cover;
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue