ฟิลเตอร์วินัย ออกคำสั่ง
This commit is contained in:
parent
68e241693a
commit
5528e68bc1
6 changed files with 272 additions and 38 deletions
|
|
@ -53,7 +53,9 @@ const myForm = ref<QForm>();
|
|||
//option
|
||||
const typeOrderOption = ref<DataOption1[]>([]);
|
||||
const byOrderOption = ref<DataOption1[]>([]);
|
||||
const byOrderOptionUse = ref<DataOption1[]>([]);
|
||||
const CommandOption = ref<DataOption1[]>([]);
|
||||
const CommandOptionUse = ref<DataOption1[]>([]);
|
||||
|
||||
//Main
|
||||
const typeOrder = ref<any>();
|
||||
|
|
@ -739,6 +741,7 @@ const columnsModal = ref<QTableProps["columns"]>([
|
|||
const rowsModal = ref<ResponseOrganiz[]>([]);
|
||||
const clickAction = ref<string>("");
|
||||
const filterModal = ref<string>("");
|
||||
const optionCPM = ref<DataOption1[]>([]);
|
||||
// โหลด tree
|
||||
const nodeTree = async () => {
|
||||
showLoader();
|
||||
|
|
@ -812,11 +815,31 @@ const clickSavelist = () => {
|
|||
};
|
||||
|
||||
const filterSelector = (val: any, update: Function, fullname: any) => {
|
||||
update(() => {
|
||||
typeOrderOption.value = typeOrderFilter.value.filter(
|
||||
(v: any) => v.fullname.toLowerCase().indexOf(val.toLowerCase()) > -1
|
||||
);
|
||||
});
|
||||
if (fullname == "typeOrderOption") {
|
||||
update(() => {
|
||||
typeOrderOption.value = typeOrderFilter.value.filter(
|
||||
(v: any) => v.fullname.toLowerCase().indexOf(val.toLowerCase()) > -1
|
||||
);
|
||||
});
|
||||
} else if (fullname == "byOrder") {
|
||||
update(() => {
|
||||
byOrderOptionUse.value = byOrderOption.value.filter(
|
||||
(v: any) => v.name.toLowerCase().indexOf(val.toLowerCase()) > -1
|
||||
);
|
||||
});
|
||||
} else if (fullname == "nameCommand") {
|
||||
update(() => {
|
||||
CommandOptionUse.value = CommandOption.value.filter(
|
||||
(v: any) => v.name.toLowerCase().indexOf(val.toLowerCase()) > -1
|
||||
);
|
||||
});
|
||||
} else if (fullname == "C-PM") {
|
||||
update(() => {
|
||||
optionCPM.value = DataStore.complaintOption.filter(
|
||||
(v: any) => v.name.toLowerCase().indexOf(val.toLowerCase()) > -1
|
||||
);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -855,7 +878,14 @@ const getClass = (val: boolean) => {
|
|||
@filter="(inputValue:any,
|
||||
doneFn:Function) => filterSelector(inputValue, doneFn,'typeOrderOption'
|
||||
) "
|
||||
/>
|
||||
><template v-slot:no-option>
|
||||
<q-item>
|
||||
<q-item-section class="text-grey">
|
||||
ไม่มีข้อมูล
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</template></q-select
|
||||
>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-6">
|
||||
<q-input
|
||||
|
|
@ -951,7 +981,7 @@ const getClass = (val: boolean) => {
|
|||
</datepicker>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-6">
|
||||
<selector
|
||||
<q-select
|
||||
:class="getClass(true)"
|
||||
outlined
|
||||
dense
|
||||
|
|
@ -962,12 +992,23 @@ const getClass = (val: boolean) => {
|
|||
:label="`${'คำสั่งโดย'}`"
|
||||
map-options
|
||||
option-label="name"
|
||||
:options="byOrderOption"
|
||||
:options="byOrderOptionUse"
|
||||
option-value="id"
|
||||
use-input
|
||||
input-debounce="0"
|
||||
@update:model-value="(nameCommand = ''), (positionCommand = '')"
|
||||
/>
|
||||
@filter="(inputValue:any,
|
||||
doneFn:Function) => filterSelector(inputValue, doneFn,'byOrder'
|
||||
) "
|
||||
>
|
||||
<template v-slot:no-option>
|
||||
<q-item>
|
||||
<q-item-section class="text-grey">
|
||||
ไม่มีข้อมูล
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</template>
|
||||
</q-select>
|
||||
</div>
|
||||
<div
|
||||
class="col-xs-12 col-md-6"
|
||||
|
|
@ -983,11 +1024,21 @@ const getClass = (val: boolean) => {
|
|||
:label="`${'ผู้มีอำนาจลงนาม'}`"
|
||||
map-options
|
||||
option-label="name"
|
||||
:options="CommandOption"
|
||||
:options="CommandOptionUse"
|
||||
option-value="id"
|
||||
use-input
|
||||
input-debounce="0"
|
||||
@filter="(inputValue:any,
|
||||
doneFn:Function) => filterSelector(inputValue, doneFn,'nameCommand'
|
||||
) "
|
||||
>
|
||||
<template v-slot:no-option>
|
||||
<q-item>
|
||||
<q-item-section class="text-grey">
|
||||
ไม่มีข้อมูล
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</template>
|
||||
<template v-if="CommandOption.length === 0" v-slot:no-option>
|
||||
<q-item>
|
||||
<q-item-section class="text-primary">
|
||||
|
|
@ -2030,11 +2081,22 @@ const getClass = (val: boolean) => {
|
|||
:label="`${'เรื่องร้องเรียน'}`"
|
||||
map-options
|
||||
option-label="name"
|
||||
:options="DataStore.complaintOption"
|
||||
:options="optionCPM"
|
||||
option-value="id"
|
||||
use-input
|
||||
input-debounce="0"
|
||||
/>
|
||||
@filter="(inputValue:any,
|
||||
doneFn:Function) => filterSelector(inputValue, doneFn,'C-PM'
|
||||
) "
|
||||
>
|
||||
<template v-slot:no-option>
|
||||
<q-item>
|
||||
<q-item-section class="text-grey">
|
||||
ไม่มีข้อมูล
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</template>
|
||||
</selector>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -2248,11 +2310,22 @@ const getClass = (val: boolean) => {
|
|||
:label="`${'เรื่องร้องเรียน'}`"
|
||||
map-options
|
||||
option-label="name"
|
||||
:options="DataStore.complaintOption"
|
||||
:options="optionCPM"
|
||||
option-value="id"
|
||||
use-input
|
||||
input-debounce="0"
|
||||
/>
|
||||
@filter="(inputValue:any,
|
||||
doneFn:Function) => filterSelector(inputValue, doneFn,'C-PM'
|
||||
) "
|
||||
>
|
||||
<template v-slot:no-option>
|
||||
<q-item>
|
||||
<q-item-section class="text-grey">
|
||||
ไม่มีข้อมูล
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</template>
|
||||
</selector>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-6"></div>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue