BUg修改

This commit is contained in:
a0049873 2022-10-31 20:23:26 +08:00
parent 493151d9f0
commit ad6a1c14de
2 changed files with 25 additions and 1 deletions

View File

@ -1190,6 +1190,15 @@
const re = /^[0-9\u4E00-\u9FA5]*$/ const re = /^[0-9\u4E00-\u9FA5]*$/
const getAppResources2 = () => { const getAppResources2 = () => {
globalFlag.value = false 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) mybus.emit('changeRoomInput', searchValue.value)
if ( if (
whoShow1.value.itShowQingDao && whoShow1.value.itShowQingDao &&
@ -1544,6 +1553,9 @@
paramsGetResources2.value.regionId = ids paramsGetResources2.value.regionId = ids
getAppResources() getAppResources()
}) })
mybus.on('changeSearchValue', (val) => {
searchValue.value = val
})
mybus.on('paramsGetResources', (ids) => { mybus.on('paramsGetResources', (ids) => {
if (ids && ids.length > 0) { if (ids && ids.length > 0) {
paramsGetResources.deptIds = ids paramsGetResources.deptIds = ids
@ -1846,6 +1858,7 @@
}, },
beforeUnmount() { beforeUnmount() {
mybus.off('getCameraByParentId') mybus.off('getCameraByParentId')
mybus.off('changeSearchValue')
mybus.off('selectCardsitem') mybus.off('selectCardsitem')
mybus.off('paramsGetResources') mybus.off('paramsGetResources')
mybus.off('changeCondition') mybus.off('changeCondition')

View File

@ -943,6 +943,10 @@
const fileList = ref([]) const fileList = ref([])
const useForm = Form.useForm const useForm = Form.useForm
const roomInput = ref('') const roomInput = ref('')
let roomStr = router.currentRoute.value.query.str
if (roomStr) {
roomInput.value = roomStr
}
const rulesRef = reactive({ const rulesRef = reactive({
bookDate: [ bookDate: [
{ {
@ -1238,7 +1242,14 @@
} }
// //
const onSearch = (searchValue) => { 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() searchData()
chengguoSearch() chengguoSearch()
} }