From ce925b696d01fc62febb40f67e0d1f78068c00fa Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Wed, 21 Aug 2024 10:50:27 +0800 Subject: [PATCH] =?UTF-8?q?HL-5489=E6=89=80=E6=9C=89=E7=AD=9B=E9=80=89?= =?UTF-8?q?=EF=BC=8C=E9=80=89=E6=8B=A9=E5=88=9B=E5=BB=BA=E4=BA=BA=EF=BC=8C?= =?UTF-8?q?=E5=8F=AA=E8=83=BD=E4=B8=8B=E6=8B=89=E9=80=89=E6=8B=A9=EF=BC=8C?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E8=BE=93=E5=85=A5=EF=BC=8C=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E5=BE=88=E5=A4=9A=E6=97=B6=EF=BC=8C=E6=8C=91=E9=80=89=E5=9B=B0?= =?UTF-8?q?=E9=9A=BE=EF=BC=8C=E6=9C=9F=E6=9C=9B=E8=BE=93=E5=85=A5=E4=BA=BA?= =?UTF-8?q?=E5=91=98=E5=A7=93=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/SearchHigh/src/SearchHigh.vue | 50 ++++++++++++++++++-- 1 file changed, 45 insertions(+), 5 deletions(-) diff --git a/src/components/SearchHigh/src/SearchHigh.vue b/src/components/SearchHigh/src/SearchHigh.vue index 728fbd500..62eb8ae89 100644 --- a/src/components/SearchHigh/src/SearchHigh.vue +++ b/src/components/SearchHigh/src/SearchHigh.vue @@ -23,11 +23,30 @@ - + - + + + @@ -68,6 +87,12 @@ UserApi.getUserListAll().then((res) => { value: item.id } }) + options.value = res.map((item) => { + return { + label: item.nickname, + value: item.id + } + }) }) const props = defineProps({ @@ -171,9 +196,9 @@ const getFilterable = (val) => { const type = searchOption_high.value.find(item => (item.field == val)) // 下拉列表过长,去掉筛选功能 if (type?.field == 'creator' || type?.field == 'updater' || type?.field == 'worker') { - return false - }else{ return true + }else{ + return false } } // 判断数字输入框小数点位数 @@ -330,6 +355,21 @@ const changeDateTimePicker = (e, val,from) =>{ val.value = e.join(',') } } +const loading = ref(false) +const options = ref([]) +const remoteMethod = (query, array) => { + if (query) { + loading.value = true + setTimeout(() => { + loading.value = false + options.value = userListAll.value.filter((item) => { + return item.label.toLowerCase().includes(query.toLowerCase()) + }) + }, 200) + } else { + options.value = userListAll.value + } +} defineExpose({ popoverVisible