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() }