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