|
@@ -61,9 +61,11 @@ const dealRouteQuery = (data) => {
|
|
|
if (str) router.push(`${route.path}?${str}`)
|
|
|
}
|
|
|
|
|
|
+const content = ref('')
|
|
|
// 搜索
|
|
|
const handleSearch = async (val, key) => {
|
|
|
if (!val && key !== 'name') return
|
|
|
+ if (key === 'name') content.value = val
|
|
|
query.value.pageNo = 1
|
|
|
// val为-1时选择的是不限或者全国, 此时选中的字段不传
|
|
|
if (!val || val === -1 || val[0] === -1) delete query.value[key]
|
|
@@ -98,10 +100,13 @@ const getCompanyData = async () => {
|
|
|
const handleClear = () => {
|
|
|
clear.value = true
|
|
|
query.value = {
|
|
|
+ name: content.value,
|
|
|
pageNo: 1,
|
|
|
pageSize: 12
|
|
|
}
|
|
|
- router.push(route.path)
|
|
|
+ if (content.value) router.push(`${route.path}?name=${content.value}`)
|
|
|
+ else router.push(route.path)
|
|
|
+ //
|
|
|
getCompanyData()
|
|
|
}
|
|
|
|