能力集市分页bug

This commit is contained in:
851673013@qq.com 2022-06-29 11:37:47 +08:00
parent 3fb7474426
commit cf1f75fd83
1 changed files with 15 additions and 5 deletions

View File

@ -1038,8 +1038,8 @@
const resourceList = reactive({ data: [] }) const resourceList = reactive({ data: [] })
const videoList = reactive({ data: [] }) const videoList = reactive({ data: [] })
const resourceTotal = ref('') const resourceTotal = ref('')
const getAppResources = () => { const getAppResources = (switchIndex) => {
paramsGetResources.pageNum = 1 //switchIndex
paramsGetResources.name = searchValue.value paramsGetResources.name = searchValue.value
paramsGetResources.type = Cardsname.value paramsGetResources.type = Cardsname.value
console.log( console.log(
@ -1050,7 +1050,10 @@
!whoShow1.value.itShowBaoTou && !whoShow1.value.itShowBaoTou &&
paramsGetResources.type === '数据资源' paramsGetResources.type === '数据资源'
) { ) {
getDataResource({ if (switchIndex != '分页查询') {
paramsGetResources.pageNum = 1
}
let dataResourceParams = {
serviceName: paramsGetResources.name, // serviceName: paramsGetResources.name, //
orderField: whoShow1.value.itShowQingDao orderField: whoShow1.value.itShowQingDao
? paramsGetResources.orderField == 'applyCount' ? paramsGetResources.orderField == 'applyCount'
@ -1062,7 +1065,8 @@
orderType: paramsGetResources.orderType.toLowerCase(), //descasc orderType: paramsGetResources.orderType.toLowerCase(), //descasc
pageNum: paramsGetResources.pageNum, // pageNum: paramsGetResources.pageNum, //
pageSize: paramsGetResources.pageSize, // pageSize: paramsGetResources.pageSize, //
}).then((res) => { }
getDataResource(dataResourceParams).then((res) => {
console.log('数据资源==================>', res.data.data) console.log('数据资源==================>', res.data.data)
if (whoShow1.value.itShowQingDao) { if (whoShow1.value.itShowQingDao) {
res.data.data.data.forEach((val) => { res.data.data.data.forEach((val) => {
@ -1092,6 +1096,10 @@
} }
}) })
} else if (paramsGetResources.type !== '数据资源') { } else if (paramsGetResources.type !== '数据资源') {
if (switchIndex != '分页查询') {
paramsGetResources.pageNum = 1
}
debugger
pageWithAttrs(paramsGetResources).then((res) => { pageWithAttrs(paramsGetResources).then((res) => {
console.log('查询列表============>', resourceList, res.data.data) console.log('查询列表============>', resourceList, res.data.data)
resourceList.data = [] resourceList.data = []
@ -1183,7 +1191,9 @@
loading.value = true loading.value = true
currentPage.value = val currentPage.value = val
paramsGetResources.pageNum = val paramsGetResources.pageNum = val
getAppResources() let params = '分页查询' //
getAppResources(params)
debugger
} }
// const findZywMessage = () => { // const findZywMessage = () => {
// zywMessage().then((res) => { // zywMessage().then((res) => {