我的浏览模糊查询
This commit is contained in:
parent
a52966d68a
commit
4b33b089f1
|
@ -141,7 +141,7 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import { onMounted, ref } from 'vue'
|
import { onMounted, ref, watch } from 'vue'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import { message } from 'ant-design-vue'
|
import { message } from 'ant-design-vue'
|
||||||
import { updateVisits, browsingInsert } from '@/api/home'
|
import { updateVisits, browsingInsert } from '@/api/home'
|
||||||
|
@ -218,6 +218,7 @@
|
||||||
type.value = ''
|
type.value = ''
|
||||||
pageNum.value = '1'
|
pageNum.value = '1'
|
||||||
pageSize.value = '5'
|
pageSize.value = '5'
|
||||||
|
tabIndex.value = 0
|
||||||
showKey.value++
|
showKey.value++
|
||||||
checkAll.value = false
|
checkAll.value = false
|
||||||
getList()
|
getList()
|
||||||
|
@ -229,6 +230,8 @@
|
||||||
getBsList({
|
getBsList({
|
||||||
limit: pageSize.value,
|
limit: pageSize.value,
|
||||||
page: pageNum.value,
|
page: pageNum.value,
|
||||||
|
type: tabList.value[tabIndex.value],
|
||||||
|
name: name.value,
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
checkAll.value = true
|
checkAll.value = true
|
||||||
console.log('申购车列表================>', res)
|
console.log('申购车列表================>', res)
|
||||||
|
@ -328,7 +331,7 @@
|
||||||
showKey.value++
|
showKey.value++
|
||||||
}
|
}
|
||||||
// 切换筛选条件
|
// 切换筛选条件
|
||||||
const tabIndex = ref(-1)
|
const tabIndex = ref(0)
|
||||||
const changeTab = (index) => {
|
const changeTab = (index) => {
|
||||||
console.log('tabIndex', tabIndex.value, index, tabList)
|
console.log('tabIndex', tabIndex.value, index, tabList)
|
||||||
if (tabIndex.value == index) {
|
if (tabIndex.value == index) {
|
||||||
|
@ -381,6 +384,42 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//监听tabindex发生改变调用接口
|
||||||
|
watch(tabIndex, (val) => {
|
||||||
|
getBsList({
|
||||||
|
limit: pageSize.value,
|
||||||
|
page: pageNum.value,
|
||||||
|
type: tabList.value[val],
|
||||||
|
name: name.value,
|
||||||
|
}).then((res) => {
|
||||||
|
checkAll.value = true
|
||||||
|
console.log('申购车列表================>', res)
|
||||||
|
initLoading.value = false
|
||||||
|
list.value = []
|
||||||
|
total.value = res.data.data.total
|
||||||
|
res.data.data.list.forEach((val) => {
|
||||||
|
const obj = {
|
||||||
|
loading: false,
|
||||||
|
name: val.resourceDTO.name,
|
||||||
|
id: val.id,
|
||||||
|
checked: false,
|
||||||
|
visits: val.resourceDTO.visits,
|
||||||
|
type: val.resourceDTO.type,
|
||||||
|
link: val.resourceDTO.link,
|
||||||
|
resourceId: val.resourceId,
|
||||||
|
createDate: val.createDate,
|
||||||
|
description: val.resourceDTO.description,
|
||||||
|
delFlag: val.resourceDTO.delFlag,
|
||||||
|
}
|
||||||
|
if (checkedList.value.indexOf(val.id) == -1) {
|
||||||
|
checkAll.value = false
|
||||||
|
} else {
|
||||||
|
obj.checked = true
|
||||||
|
}
|
||||||
|
list.value.push(obj)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
.ant-list {
|
.ant-list {
|
||||||
|
|
Loading…
Reference in New Issue