From ad6a1c14de207349284a24cadfdf2dc7d62e4662 Mon Sep 17 00:00:00 2001 From: a0049873 <79py69t9wb@privaterelay.appleid.com> Date: Mon, 31 Oct 2022 20:23:26 +0800 Subject: [PATCH] =?UTF-8?q?BUg=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- front/src/views/home/DetailsPageconetent.vue | 13 +++++++++++++ front/src/views/home/infrastructurePage.vue | 13 ++++++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/front/src/views/home/DetailsPageconetent.vue b/front/src/views/home/DetailsPageconetent.vue index 02e9a0b3..42474b96 100644 --- a/front/src/views/home/DetailsPageconetent.vue +++ b/front/src/views/home/DetailsPageconetent.vue @@ -1190,6 +1190,15 @@ const re = /^[0-9\u4E00-\u9FA5]*$/ const getAppResources2 = () => { globalFlag.value = false + let newQuery = JSON.parse( + JSON.stringify(router.currentRoute.value.query) + ) + newQuery.str = searchValue.value + router + .replace({ + query: newQuery, + }) + .then(() => {}) mybus.emit('changeRoomInput', searchValue.value) if ( whoShow1.value.itShowQingDao && @@ -1544,6 +1553,9 @@ paramsGetResources2.value.regionId = ids getAppResources() }) + mybus.on('changeSearchValue', (val) => { + searchValue.value = val + }) mybus.on('paramsGetResources', (ids) => { if (ids && ids.length > 0) { paramsGetResources.deptIds = ids @@ -1846,6 +1858,7 @@ }, beforeUnmount() { mybus.off('getCameraByParentId') + mybus.off('changeSearchValue') mybus.off('selectCardsitem') mybus.off('paramsGetResources') mybus.off('changeCondition') diff --git a/front/src/views/home/infrastructurePage.vue b/front/src/views/home/infrastructurePage.vue index a6b971d5..80efcaff 100644 --- a/front/src/views/home/infrastructurePage.vue +++ b/front/src/views/home/infrastructurePage.vue @@ -943,6 +943,10 @@ const fileList = ref([]) const useForm = Form.useForm const roomInput = ref('') + let roomStr = router.currentRoute.value.query.str + if (roomStr) { + roomInput.value = roomStr + } const rulesRef = reactive({ bookDate: [ { @@ -1238,7 +1242,14 @@ } // 搜索 const onSearch = (searchValue) => { - debugger + let newQuery = JSON.parse(JSON.stringify(router.currentRoute.value.query)) + newQuery.str = roomInput.value + router + .replace({ + query: newQuery, + }) + .then(() => {}) + mybus.emit('changeSearchValue', roomInput.value) searchData() chengguoSearch() }