การลา ลง เวลา select/input
This commit is contained in:
parent
f81b69b828
commit
fc1f6acb9d
10 changed files with 27 additions and 29 deletions
|
|
@ -129,7 +129,7 @@ async function fetchListTimeRecord() {
|
|||
status: filetStatus.value, //*สถานะ
|
||||
page: page.value, //*หน้า
|
||||
pageSize: rowsPerPage.value, //*จำนวนแถวต่อหน้า
|
||||
keyword: keyword.value, //keyword ค้นหา
|
||||
keyword: keyword.value.trim(), //keyword ค้นหา
|
||||
};
|
||||
showLoader();
|
||||
await http
|
||||
|
|
|
|||
|
|
@ -123,6 +123,8 @@ function calculateMaxDate() {
|
|||
label="สถานะ"
|
||||
use-input
|
||||
v-model="filetStatus"
|
||||
hide-selected
|
||||
fill-input
|
||||
:options="option"
|
||||
@update:model-value="filterFn"
|
||||
@filter="filterOptionFn"
|
||||
|
|
@ -172,7 +174,6 @@ function calculateMaxDate() {
|
|||
map-options
|
||||
:options="workStore.columns"
|
||||
option-value="name"
|
||||
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ const querySting = reactive<QuerySting>({
|
|||
//** เรียกข้อมูลจาก API*/
|
||||
async function fecthLeaveList() {
|
||||
leaveStore.rows = [];
|
||||
querySting.keyword = querySting.keyword.trim()
|
||||
querySting.status = await (querySting.status == null
|
||||
? "ALL"
|
||||
: querySting.status);
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ const querySting = reactive<QuerySting>({
|
|||
//** เรียกข้อมูลจาก API*/
|
||||
async function fecthLeaveList() {
|
||||
leaveStore.rows = [];
|
||||
querySting.keyword = querySting.keyword.trim()
|
||||
querySting.status = await (querySting.status == null
|
||||
? "ALL"
|
||||
: querySting.status);
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ const props = defineProps({
|
|||
getList: Function,
|
||||
});
|
||||
|
||||
|
||||
/** Option*/
|
||||
const optionTypeMain = ref<DataOption[]>([]);
|
||||
const optionType = ref<DataOption[]>([]);
|
||||
|
|
@ -156,6 +155,8 @@ watch(
|
|||
emit-value
|
||||
map-options
|
||||
outlined
|
||||
hide-selected
|
||||
fill-input
|
||||
dense
|
||||
v-model="querySting.type"
|
||||
:options="optionType"
|
||||
|
|
@ -175,18 +176,15 @@ watch(
|
|||
</q-item>
|
||||
</template>
|
||||
<template
|
||||
v-if="
|
||||
querySting.type !== '00000000-0000-0000-0000-000000000000'
|
||||
"
|
||||
v-if="querySting.type !== '00000000-0000-0000-0000-000000000000'"
|
||||
v-slot:append
|
||||
>
|
||||
<q-icon
|
||||
name="cancel"
|
||||
@click.stop.prevent="
|
||||
(optionType = optionTypeMain),
|
||||
(querySting.type =
|
||||
'00000000-0000-0000-0000-000000000000'),
|
||||
props.getSearch?.()
|
||||
(querySting.type = '00000000-0000-0000-0000-000000000000'),
|
||||
props.getSearch?.()
|
||||
"
|
||||
class="cursor-pointer"
|
||||
/>
|
||||
|
|
@ -199,6 +197,8 @@ watch(
|
|||
emit-value
|
||||
map-options
|
||||
outlined
|
||||
hide-selected
|
||||
fill-input
|
||||
dense
|
||||
v-model="querySting.status"
|
||||
:options="optionStatus"
|
||||
|
|
@ -239,7 +239,11 @@ watch(
|
|||
v-model="querySting.keyword"
|
||||
label="ค้นหา"
|
||||
@keydown.enter.prevent="props.getSearch?.()"
|
||||
/>
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon name="search" />
|
||||
</template>
|
||||
</q-input>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-3 col-md-2">
|
||||
<q-select
|
||||
|
|
@ -255,7 +259,6 @@ watch(
|
|||
style="min-width: 140px"
|
||||
:options="leaveStore.columns"
|
||||
option-value="name"
|
||||
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -152,13 +152,7 @@ onMounted(async () => {
|
|||
placeholder="ค้นหา"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon v-if="filterKeyword == ''" name="search" />
|
||||
<q-icon
|
||||
v-if="filterKeyword !== ''"
|
||||
name="clear"
|
||||
class="cursor-pointer"
|
||||
@click="resetFilter"
|
||||
/>
|
||||
<q-icon name="search" />
|
||||
</template>
|
||||
</q-input>
|
||||
|
||||
|
|
@ -183,7 +177,7 @@ onMounted(async () => {
|
|||
ref="table"
|
||||
:columns="dataStore.columns"
|
||||
:rows="dataStore.rows"
|
||||
:filter="filterKeyword"
|
||||
:filter="filterKeyword.trim()"
|
||||
row-key="interrogated"
|
||||
flat
|
||||
bordered
|
||||
|
|
|
|||
|
|
@ -257,7 +257,7 @@ async function fetchData() {
|
|||
await http
|
||||
.get(
|
||||
config.API.specialTime() +
|
||||
`?year=${year.value}&month=${month.value}&page=${pagination.value.page}&pageSize=${pagination.value.rowsPerPage}&keyword=${filterKeyword.value}`
|
||||
`?year=${year.value}&month=${month.value}&page=${pagination.value.page}&pageSize=${pagination.value.rowsPerPage}&keyword=${filterKeyword.value.trim()}`
|
||||
)
|
||||
.then(async (res) => {
|
||||
let data = res.data.result.data;
|
||||
|
|
@ -376,13 +376,7 @@ onMounted(async () => {
|
|||
@keydown.enter.prevent="getSearch()"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon v-if="filterKeyword == ''" name="search" />
|
||||
<q-icon
|
||||
v-if="filterKeyword !== ''"
|
||||
name="clear"
|
||||
class="cursor-pointer"
|
||||
@click="resetFilter"
|
||||
/>
|
||||
<q-icon name="search" />
|
||||
</template>
|
||||
</q-input>
|
||||
|
||||
|
|
|
|||
|
|
@ -234,6 +234,8 @@ onMounted(() => {
|
|||
label="สถานภาพ"
|
||||
emit-value
|
||||
map-options
|
||||
hide-selected
|
||||
fill-input
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
use-input
|
||||
|
|
@ -256,6 +258,8 @@ onMounted(() => {
|
|||
:options="yearTypeOptionOption"
|
||||
emit-value
|
||||
map-options
|
||||
hide-selected
|
||||
fill-input
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
use-input
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ import type {
|
|||
ArrayPerson,
|
||||
ArrayFileList,
|
||||
} from "@/modules/11_discipline/interface/request/complaint";
|
||||
import type { FormData as FormInvestigateFact } from "@/modules/11_discipline/interface/request/investigateFact";
|
||||
import type { FormData as FormInvestigateFact } from "@/modules/11_discipline/interface/request/InvestigateFact";
|
||||
|
||||
import PopupSendToNext from "@/modules/11_discipline/components/PopupSendToNext.vue";
|
||||
import FormComplaints from "@/modules/11_discipline/components/1_Complaint/Form.vue"; //เรื่องร้องเรียน
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ import type {
|
|||
ArrayPerson,
|
||||
ArrayFileList,
|
||||
} from "@/modules/11_discipline/interface/request/complaint";
|
||||
import type { FormData as FormInvestigateFact } from "@/modules/11_discipline/interface/request/investigateFact";
|
||||
import type { FormData as FormInvestigateFact } from "@/modules/11_discipline/interface/request/InvestigateFact";
|
||||
|
||||
import DialogSendToCommand from "@/modules/11_discipline/components/4_Result/DialogSendToCommand.vue";
|
||||
import FormComplaints from "@/modules/11_discipline/components/1_Complaint/Form.vue"; //เรื่องร้องเรียน
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue