แก้ select /input

This commit is contained in:
setthawutttty 2024-12-02 15:12:53 +07:00
parent a934497083
commit 97879802b1
45 changed files with 138 additions and 279 deletions

View file

@ -537,6 +537,8 @@ watch(
lazy-rules
:options="groupOldOp"
map-options
hide-selected
fill-input
option-label="name"
option-value="id"
emit-value

View file

@ -186,7 +186,7 @@ function getData() {
http
.get(
config.API.salaryFormula() +
`/?page=${formFilter.page}&pageSize=${formFilter.pageSize}&keyword=${formFilter.keyword}&posTypeId=${posType.value}`
`/?page=${formFilter.page}&pageSize=${formFilter.pageSize}&keyword=${formFilter.keyword.trim()}&posTypeId=${posType.value}`
)
.then((res) => {
const data = res.data.result.data;
@ -317,6 +317,8 @@ onMounted(async () => {
option-value="id"
emit-value
map-options
hide-selected
fill-input
use-input
@update:model-value="filterFn"
@filter="(inputValue: string,

View file

@ -102,7 +102,7 @@ async function fetchListChart() {
await http
.get(
config.API.salaryEmployeeChart +
`?page=${formFilter.page}&pageSize=${formFilter.pageSize}&keyword=${formFilter.keyword}`
`?page=${formFilter.page}&pageSize=${formFilter.pageSize}&keyword=${formFilter.keyword.trim()}`
)
.then((res) => {
rows.value = res.data.result.data;

View file

@ -105,7 +105,7 @@ async function fetchListSalaly() {
showLoader();
const page = formQuery.page.toString();
const pageSize = formQuery.pageSize.toString();
const keyword = formQuery.keyword.toString();
const keyword = formQuery.keyword.toString().trim();
await http
.get(
config.API.salaryChart +

View file

@ -366,7 +366,6 @@ function filterSelector(val: string, update: Function, refData: string) {
switch (refData) {
case "agencyFilter":
update(() => {
agencyFilter.value = val === "" ? agencyFilter.value : "";
agencyOptions.value = agencyOptionsMain.value.filter(
(v: DataOption) => v.name.indexOf(val) > -1
);
@ -501,6 +500,8 @@ onMounted(async () => {
outlined
emit-value
map-options
hide-selected
fill-input
option-label="name"
option-value="id"
:options="agencyOptions"

View file

@ -357,7 +357,6 @@ function filterSelector(val: string, update: Function, refData: string) {
switch (refData) {
case "agencyFilter":
update(() => {
agencyFilter.value = val === "" ? agencyFilter.value : "";
agencyOptions.value = agencyOptionsMain.value.filter(
(v: DataOption) => v.name.indexOf(val) > -1
);
@ -493,6 +492,8 @@ onMounted(async () => {
map-options
option-label="name"
option-value="id"
hide-selected
fill-input
:options="agencyOptions"
lazy-rules
hide-bottom-space