From 6f60eed92de536ada0ab9963a9078252e3ade7b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E5=BA=86?= <18331150170@163.com> Date: Sat, 15 Nov 2025 19:16:11 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=EF=BC=9A=E8=B4=A8?= =?UTF-8?q?=E6=A3=80=E6=8A=A5=E5=B7=A5=E8=B0=83=E6=95=B4=EF=BC=8C=E5=B0=86?= =?UTF-8?q?=E8=BE=93=E5=85=A5=E5=92=8C=E6=89=AB=E7=A0=81=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=E6=8B=86=E5=88=86=E4=B8=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/pages/pgMaster/components/dataItem.vue | 11 +++++++++-- .../components/showpicture.vue | 4 ++-- .../components/showpicture.vue | 4 ++-- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/mes-ui/mini-app/src/pages/pgMaster/components/dataItem.vue b/mes-ui/mini-app/src/pages/pgMaster/components/dataItem.vue index 7e40e7d2..1116f803 100644 --- a/mes-ui/mini-app/src/pages/pgMaster/components/dataItem.vue +++ b/mes-ui/mini-app/src/pages/pgMaster/components/dataItem.vue @@ -12,6 +12,7 @@ const userId = userStore.userInfo.userId const isFinish = ref(false) // 是否继续扫码 const isScan = ref(false) +const isFromScan = ref(false) // 是否触发下拉刷新 const isTriggered = ref(false) // 定义 porps @@ -132,6 +133,10 @@ const handleSearch = async (e) => { saveSearchValue(queryParams.subOrDetailName) await getListData(); }; +const onInputSearch = (e) => { + if (isFromScan.value) return; + handleSearch({ inputValue: e.detail?.value ?? searchVal.value }); +}; const viewClick = async (item) => { const params = { id: item.id @@ -145,8 +150,10 @@ const viewClick = async (item) => { const handleScan = async() => { uni.scanCode({ success: async(res) => { + isFromScan.value = true searchVal.value = res.result - await handleSearch({ inputValue: res.result }) + await handleSearch({ inputValue: res.result }) + isFromScan.value = false if (isScan.value){ handleScan() } @@ -230,7 +237,7 @@ const onRefresherrefresh = async () => { height: 50px; line-height: 50px; " - @input="handleSearch({ inputValue: searchVal })" + @input="onInputSearch" clearable /> import { reactive, ref, toRefs,nextTick,onMounted } from 'vue'; -import { useRoute } from 'vue-router'; +// import { useRoute } from 'vue-router'; import { onLoad, onShow } from '@dcloudio/uni-app' import htzImageUpload from '@/components/htz-image-upload/htz-image-upload.vue' const title = ref('图片预览'); const src = ref([]); -const route = useRoute(); +// const route = useRoute(); const picture = ref(''); const previewImage = ref(null); diff --git a/mes-ui/mini-app/src/pages/unqualifiedNotificationConfirm/components/showpicture.vue b/mes-ui/mini-app/src/pages/unqualifiedNotificationConfirm/components/showpicture.vue index 5b9dbf98..7d8e658b 100644 --- a/mes-ui/mini-app/src/pages/unqualifiedNotificationConfirm/components/showpicture.vue +++ b/mes-ui/mini-app/src/pages/unqualifiedNotificationConfirm/components/showpicture.vue @@ -7,12 +7,12 @@