Merge branch 'nice_dev' into develop
This commit is contained in:
commit
c161c0b332
2 changed files with 181 additions and 178 deletions
|
|
@ -520,174 +520,176 @@ watch([() => page.value, () => pageSize.value], () => {
|
|||
ค้นหาคนครอง
|
||||
</div>
|
||||
<div class="col-12"><q-separator /></div>
|
||||
<div class="row q-col-gutter-sm q-pa-sm">
|
||||
<div class="col-2">
|
||||
<q-input
|
||||
ref="positionExecutiveFieldRef"
|
||||
v-model="formData.personal"
|
||||
:class="inputEdit(isReadonly)"
|
||||
dense
|
||||
outlined
|
||||
for="#search"
|
||||
label="ค้นหาจากชื่อ-นามสกุล หรือเลขประจำตัวประชาชน"
|
||||
lazy-rules
|
||||
hide-bottom-space
|
||||
/>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<q-input
|
||||
ref="positionRef"
|
||||
v-model="formData.position"
|
||||
:class="inputEdit(isReadonly)"
|
||||
dense
|
||||
outlined
|
||||
for="#position"
|
||||
label="ตำแหน่งในสายงาน"
|
||||
lazy-rules
|
||||
hide-bottom-space
|
||||
/>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<q-select
|
||||
ref="positionTypeRef"
|
||||
:class="inputEdit(isReadonly)"
|
||||
label="ประเภทตำแหน่ง"
|
||||
v-model="formData.positionType"
|
||||
:options="typeOps"
|
||||
emit-value
|
||||
dense
|
||||
@update:model-value="updateSelectType"
|
||||
map-options
|
||||
outlined
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
lazy-rules
|
||||
hide-bottom-space
|
||||
><template v-if="formData.positionType" v-slot:append>
|
||||
<q-icon
|
||||
name="cancel"
|
||||
@click.stop.prevent="clearPosition()"
|
||||
class="cursor-pointer"
|
||||
/> </template
|
||||
></q-select>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<q-select
|
||||
ref="positionLevelRef"
|
||||
:class="inputEdit(isReadonly)"
|
||||
label="ระดับตำแหน่ง"
|
||||
v-model="formData.positionLevel"
|
||||
:disable="formData.positionType == ''"
|
||||
:options="levelOps"
|
||||
emit-value
|
||||
dense
|
||||
map-options
|
||||
outlined
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
lazy-rules
|
||||
hide-bottom-space
|
||||
>
|
||||
<template v-if="formData.positionLevel" v-slot:append>
|
||||
<q-icon
|
||||
name="cancel"
|
||||
@click.stop.prevent="formData.positionLevel = ''"
|
||||
class="cursor-pointer"
|
||||
/> </template
|
||||
></q-select>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<q-btn
|
||||
label="ค้นหา"
|
||||
color="teal-5"
|
||||
class="full-height"
|
||||
icon="search"
|
||||
@click="searchData"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="row q-col-gutter-sm q-pa-sm">
|
||||
<div class="col-2">
|
||||
<q-input
|
||||
ref="positionExecutiveFieldRef"
|
||||
v-model="formData.personal"
|
||||
:class="inputEdit(isReadonly)"
|
||||
dense
|
||||
outlined
|
||||
for="#search"
|
||||
label="ค้นหาจากชื่อ-นามสกุล หรือเลขประจำตัวประชาชน"
|
||||
lazy-rules
|
||||
hide-bottom-space
|
||||
/>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<q-input
|
||||
ref="positionRef"
|
||||
v-model="formData.position"
|
||||
:class="inputEdit(isReadonly)"
|
||||
dense
|
||||
outlined
|
||||
for="#position"
|
||||
label="ตำแหน่งในสายงาน"
|
||||
lazy-rules
|
||||
hide-bottom-space
|
||||
/>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<q-select
|
||||
ref="positionTypeRef"
|
||||
:class="inputEdit(isReadonly)"
|
||||
label="ประเภทตำแหน่ง"
|
||||
v-model="formData.positionType"
|
||||
:options="typeOps"
|
||||
emit-value
|
||||
dense
|
||||
@update:model-value="updateSelectType"
|
||||
map-options
|
||||
outlined
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
lazy-rules
|
||||
hide-bottom-space
|
||||
><template v-if="formData.positionType" v-slot:append>
|
||||
<q-icon
|
||||
name="cancel"
|
||||
@click.stop.prevent="clearPosition()"
|
||||
class="cursor-pointer"
|
||||
/> </template
|
||||
></q-select>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<q-select
|
||||
ref="positionLevelRef"
|
||||
:class="inputEdit(isReadonly)"
|
||||
label="ระดับตำแหน่ง"
|
||||
v-model="formData.positionLevel"
|
||||
:disable="formData.positionType == ''"
|
||||
:options="levelOps"
|
||||
emit-value
|
||||
dense
|
||||
map-options
|
||||
outlined
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
lazy-rules
|
||||
hide-bottom-space
|
||||
>
|
||||
<template v-if="formData.positionLevel" v-slot:append>
|
||||
<q-icon
|
||||
name="cancel"
|
||||
@click.stop.prevent="formData.positionLevel = ''"
|
||||
class="cursor-pointer"
|
||||
/> </template
|
||||
></q-select>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<q-btn
|
||||
label="ค้นหา"
|
||||
color="teal-5"
|
||||
class="full-height"
|
||||
icon="search"
|
||||
@click="searchData"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<q-select
|
||||
for="#select"
|
||||
v-model="visibleColumnsResult"
|
||||
multiple
|
||||
outlined
|
||||
dense
|
||||
options-dense
|
||||
:display-value="$q.lang.table.columns"
|
||||
emit-value
|
||||
map-options
|
||||
:options="columnsResult"
|
||||
option-value="name"
|
||||
options-cover
|
||||
style="min-width: 150px"
|
||||
class="col-xs-12 col-sm-3 col-md-2"
|
||||
/>
|
||||
<div class="col-12">
|
||||
<d-table
|
||||
ref="table"
|
||||
flat
|
||||
:columns="columnsResult"
|
||||
:rows="rowResult"
|
||||
row-key="id"
|
||||
<q-select
|
||||
for="#select"
|
||||
v-model="visibleColumnsResult"
|
||||
multiple
|
||||
outlined
|
||||
dense
|
||||
class="custom-header-table"
|
||||
:paging="true"
|
||||
:rows-per-page-options="[10, 25, 50, 100]"
|
||||
@update:pagination="updatePagination"
|
||||
selection="single"
|
||||
v-model:selected="selectedProfile"
|
||||
>
|
||||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
<q-th auto-width />
|
||||
<q-th
|
||||
v-for="col in props.cols"
|
||||
:key="col.name"
|
||||
:props="props"
|
||||
>
|
||||
<span class="text-weight-medium">{{
|
||||
col.label
|
||||
}}</span>
|
||||
</q-th>
|
||||
</q-tr>
|
||||
</template>
|
||||
<template v-slot:body="props">
|
||||
<q-tr :props="props" class="cursor-pointer">
|
||||
<q-td>
|
||||
<q-checkbox
|
||||
keep-color
|
||||
color="primary"
|
||||
dense
|
||||
v-model="props.selected"
|
||||
/>
|
||||
</q-td>
|
||||
<q-td
|
||||
v-for="col in props.cols"
|
||||
:key="col.name"
|
||||
:props="props"
|
||||
>
|
||||
<div v-if="col.name == 'no'">
|
||||
{{ props.rowIndex + 1 }}
|
||||
</div>
|
||||
options-dense
|
||||
:display-value="$q.lang.table.columns"
|
||||
emit-value
|
||||
map-options
|
||||
:options="columnsResult"
|
||||
option-value="name"
|
||||
options-cover
|
||||
style="min-width: 150px"
|
||||
class="col-xs-12 col-sm-3 col-md-2"
|
||||
/>
|
||||
<div class="col-12">
|
||||
<d-table
|
||||
ref="table"
|
||||
flat
|
||||
:columns="columnsResult"
|
||||
:rows="rowResult"
|
||||
row-key="id"
|
||||
dense
|
||||
class="custom-header-table"
|
||||
:paging="true"
|
||||
:rows-per-page-options="[10, 25, 50, 100]"
|
||||
@update:pagination="updatePagination"
|
||||
selection="single"
|
||||
v-model:selected="selectedProfile"
|
||||
>
|
||||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
<q-th auto-width />
|
||||
<q-th
|
||||
v-for="col in props.cols"
|
||||
:key="col.name"
|
||||
:props="props"
|
||||
>
|
||||
<span class="text-weight-medium">{{
|
||||
col.label
|
||||
}}</span>
|
||||
</q-th>
|
||||
</q-tr>
|
||||
</template>
|
||||
<template v-slot:body="props">
|
||||
<q-tr :props="props" class="cursor-pointer">
|
||||
<q-td>
|
||||
<q-checkbox
|
||||
keep-color
|
||||
color="primary"
|
||||
dense
|
||||
v-model="props.selected"
|
||||
/>
|
||||
</q-td>
|
||||
<q-td
|
||||
v-for="col in props.cols"
|
||||
:key="col.name"
|
||||
:props="props"
|
||||
>
|
||||
<div v-if="col.name == 'no'">
|
||||
{{ props.rowIndex + 1 }}
|
||||
</div>
|
||||
|
||||
<div v-else>
|
||||
{{ col.value }}
|
||||
</div>
|
||||
</q-td>
|
||||
</q-tr>
|
||||
</template>
|
||||
<template v-slot:pagination="scope">
|
||||
<q-pagination
|
||||
v-model="page"
|
||||
active-color="primary"
|
||||
color="dark"
|
||||
:max="totalPage"
|
||||
size="sm"
|
||||
boundary-links
|
||||
direction-links
|
||||
></q-pagination>
|
||||
</template>
|
||||
</d-table>
|
||||
<div v-else>
|
||||
{{ col.value }}
|
||||
</div>
|
||||
</q-td>
|
||||
</q-tr>
|
||||
</template>
|
||||
<template v-slot:pagination="scope">
|
||||
<q-pagination
|
||||
v-model="page"
|
||||
active-color="primary"
|
||||
color="dark"
|
||||
:max="totalPage"
|
||||
size="sm"
|
||||
boundary-links
|
||||
direction-links
|
||||
></q-pagination>
|
||||
</template>
|
||||
</d-table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</q-card>
|
||||
|
|
|
|||
|
|
@ -114,19 +114,20 @@ function updateSelected(data: DataTree) {
|
|||
})
|
||||
.then(async (res: any) => {
|
||||
const data = await res.data.result;
|
||||
|
||||
store.getSumPosition({
|
||||
totalPosition: data.totalPosition,
|
||||
totalPositionCurrentUse: data.totalPositionCurrentUse,
|
||||
totalPositionCurrentVacant: data.totalPositionCurrentVacant,
|
||||
totalPositionNextUse: data.totalPositionNextUse,
|
||||
totalPositionNextVacant: data.totalPositionNextVacant,
|
||||
totalRootPosition: data.totalPosition,
|
||||
totalRootPositionCurrentUse: data.totalPositionCurrentUse,
|
||||
totalRootPositionCurrentVacant: data.totalPositionCurrentVacant,
|
||||
totalRootPositionNextUse: data.totalPositionNextUse,
|
||||
totalRootPositionNextVacant: data.totalPositionNextVacant,
|
||||
});
|
||||
if (data) {
|
||||
store.getSumPosition({
|
||||
totalPosition: data.totalPosition,
|
||||
totalPositionCurrentUse: data.totalPositionCurrentUse,
|
||||
totalPositionCurrentVacant: data.totalPositionCurrentVacant,
|
||||
totalPositionNextUse: data.totalPositionNextUse,
|
||||
totalPositionNextVacant: data.totalPositionNextVacant,
|
||||
totalRootPosition: data.totalPosition,
|
||||
totalRootPositionCurrentUse: data.totalPositionCurrentUse,
|
||||
totalRootPositionCurrentVacant: data.totalPositionCurrentVacant,
|
||||
totalRootPositionNextUse: data.totalPositionNextUse,
|
||||
totalRootPositionNextVacant: data.totalPositionNextVacant,
|
||||
});
|
||||
}
|
||||
});
|
||||
// }
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue