网络平台的分页功能完善

lijinlong
吕天方 2 years ago
parent c992a410a6
commit 0c81daef3e

@ -3,7 +3,7 @@
* @Author: kery.chen * @Author: kery.chen
* @Description: 总体概览左侧 * @Description: 总体概览左侧
* @Date: 2021-11-30 11:08:50 * @Date: 2021-11-30 11:08:50
* @LastEditTime: 2023-08-25 10:38:55 * @LastEditTime: 2023-08-25 14:47:17
* @FilePath : \\tcingiocpro\\src\\views\\privateOrder\\ecosphere\\components\\componentLeft.vue * @FilePath : \\tcingiocpro\\src\\views\\privateOrder\\ecosphere\\components\\componentLeft.vue
--> -->
<template> <template>
@ -398,8 +398,8 @@
layout="total, sizes, prev, pager, next, jumper" layout="total, sizes, prev, pager, next, jumper"
:total="total" :total="total"
popper-class="select_bottom" popper-class="select_bottom"
@size-change="handleSizeChange" @size-change="handleSizeChangeZoo"
@current-change="handleCurrentChange" @current-change="handleCurrentChangeZoo"
> >
</el-pagination> </el-pagination>
</div> </div>
@ -522,6 +522,11 @@ export default {
pageNum: 1, pageNum: 1,
pageSize: 10 pageSize: 10
}, },
zooParams: {
pageNum: 1,
pageSize: 10,
type:1,
},
currentPageData: [], // currentPageData: [], //
tableKey: [], tableKey: [],
threeTimer: null, threeTimer: null,
@ -664,10 +669,12 @@ export default {
// //
async networkPlatformClick(val,type) { async networkPlatformClick(val,type) {
this.zooParams.type = type
this.currentPage = 1 this.currentPage = 1
this.pageSize = 10 this.pageSize = 10
this.dialogTitle = val this.dialogTitle = val
this.zoologyIconStatus = true this.zoologyIconStatus = true
let res = await listPlatform({pageNum:1,pageSize:10,type:type});
if (val === 'B站') { if (val === 'B站') {
// getBilibiliData().then((res) => { // getBilibiliData().then((res) => {
this.tableHeader = ['账号ID', 'URL'] this.tableHeader = ['账号ID', 'URL']
@ -676,17 +683,15 @@ export default {
// this.tableData = [ // this.tableData = [
// { ID: 1, URL: 'https://www.bilibili.com/' } // { ID: 1, URL: 'https://www.bilibili.com/' }
// ] // ]
let res = await listPlatform({type:type});
res.rows.map((item)=>{ res.rows.map((item)=>{
let obj = {} let obj = {}
obj['账号ID'] = item.name obj['账号ID'] = item.name
obj['URL'] = item.dns obj['URL'] = item.dns
this.tableData.push(obj) this.tableData.push(obj)
}) })
// res['T_DATA_BILIBILI[]'].forEach((item) => { // res['T_DATA_BILIBILI[]'].forEach((item) => {
// this.tableData.push({ ID: item.account_id, URL: item.url }) // this.tableData.push({ ID: item.account_id, URL: item.url })
// }) // })
this.networkPlatformData()
// }) // })
} else if (val === '小红书') { } else if (val === '小红书') {
// getRedBookData().then((res) => { // getRedBookData().then((res) => {
@ -699,14 +704,12 @@ export default {
// res['T_DATA_RED_BOOK[]'].forEach((item) => { // res['T_DATA_RED_BOOK[]'].forEach((item) => {
// this.tableData.push({ ID: item.account_id, URL: item.url }) // this.tableData.push({ ID: item.account_id, URL: item.url })
// }) // })
let res = await listPlatform({type:type});
res.rows.map((item)=>{ res.rows.map((item)=>{
let obj = {} let obj = {}
obj['账号ID'] = item.name obj['账号ID'] = item.name
obj['URL'] = item.dns obj['URL'] = item.dns
this.tableData.push(obj) this.tableData.push(obj)
}) })
this.networkPlatformData()
// }) // })
} else if (val === '今日头条') { } else if (val === '今日头条') {
// getToDayHeadlineData().then((res) => { // getToDayHeadlineData().then((res) => {
@ -716,7 +719,6 @@ export default {
// this.tableData = [ // this.tableData = [
// { ID: 1, : '2012320128' } // { ID: 1, : '2012320128' }
// ] // ]
let res = await listPlatform({type:type});
res.rows.map((item)=>{ res.rows.map((item)=>{
let obj = {} let obj = {}
obj['账号ID'] = item.name obj['账号ID'] = item.name
@ -729,7 +731,6 @@ export default {
// : item.introduction // : item.introduction
// }) // })
// }) // })
this.networkPlatformData()
// }) // })
} else if (val === '快手') { } else if (val === '快手') {
// getQuickData().then((res) => { // getQuickData().then((res) => {
@ -739,7 +740,6 @@ export default {
// this.tableData = [ // this.tableData = [
// { ID: 1, : ' [1-2]GIF20113GIF2012112015' } // { ID: 1, : ' [1-2]GIF20113GIF2012112015' }
// ] // ]
let res = await listPlatform({type:type});
res.rows.map((item)=>{ res.rows.map((item)=>{
let obj = {} let obj = {}
obj['账号ID'] = item.name obj['账号ID'] = item.name
@ -752,7 +752,6 @@ export default {
// : item.introduction // : item.introduction
// }) // })
// }) // })
this.networkPlatformData()
// }) // })
} else if (val === '微信') { } else if (val === '微信') {
// getWechat().then((res) => { // getWechat().then((res) => {
@ -762,7 +761,6 @@ export default {
// this.tableData = [ // this.tableData = [
// { ID: 1, : '' } // { ID: 1, : '' }
// ] // ]
let res = await listPlatform({type:type});
res.rows.map((item)=>{ res.rows.map((item)=>{
let obj = {} let obj = {}
obj['账号ID'] = item.name obj['账号ID'] = item.name
@ -775,7 +773,6 @@ export default {
// : item.introduction // : item.introduction
// }) // })
// }) // })
this.networkPlatformData()
// }) // })
} else if (val === '网站') { } else if (val === '网站') {
// getWebsite().then((res) => { // getWebsite().then((res) => {
@ -789,7 +786,6 @@ export default {
// : 'ICP030173', // : 'ICP030173',
// numOrder: 1 // numOrder: 1
// }) // })
let res = await listPlatform({type:type});
res.rows.map((item)=>{ res.rows.map((item)=>{
let obj = {} let obj = {}
obj['网站名称'] = item.name obj['网站名称'] = item.name
@ -810,7 +806,6 @@ export default {
// }) // })
// }) // })
this.tableData.sort((a, b) => a.numOrder - b.numOrder) this.tableData.sort((a, b) => a.numOrder - b.numOrder)
this.networkPlatformData()
// }) // })
} else if (val === '微博') { } else if (val === '微博') {
// getWeibo().then((res) => { // getWeibo().then((res) => {
@ -823,7 +818,6 @@ export default {
// : '', // : '',
// : '' // : ''
// }) // })
let res = await listPlatform({type:type});
res.rows.map((item)=>{ res.rows.map((item)=>{
let obj = {} let obj = {}
obj['账号名称'] = item.name obj['账号名称'] = item.name
@ -832,7 +826,6 @@ export default {
this.tableData.push(obj) this.tableData.push(obj)
}) })
// }) // })
this.networkPlatformData()
// }) // })
} else if (val === '抖音') { } else if (val === '抖音') {
// getTikTok().then((res) => { // getTikTok().then((res) => {
@ -845,7 +838,6 @@ export default {
// : '', // : '',
// : 25 // : 25
// }) // })
let res = await listPlatform({type:type});
res.rows.map((item)=>{ res.rows.map((item)=>{
let obj = {}; let obj = {};
obj['账号'] = item.name; obj['账号'] = item.name;
@ -855,9 +847,13 @@ export default {
}) })
this.tableData.sort((a, b) => b.粉丝数 - a.粉丝数) this.tableData.sort((a, b) => b.粉丝数 - a.粉丝数)
// }) // })
} }
this.networkPlatformData() this.total = res.total
this.currentPageData = this.tableData
this.zoologyIconStatus = true
// this.networkPlatformData()
}, },
getProps(props){ getProps(props){
switch(props){ switch(props){
@ -1044,6 +1040,82 @@ export default {
this.currentPage = val this.currentPage = val
this.setCurrentPageData() this.setCurrentPageData()
}, },
handleSizeChangeZoo(val){
this.zooParams.pageSize = val
this.networkPlatformClickTwo(this.zooParams)
},
handleCurrentChangeZoo(val){
this.zooParams.pageNum = val
this.networkPlatformClickTwo(this.zooParams)
},
async networkPlatformClickTwo(params){
console.log(params,'====')
this.tableData = []
let res = await listPlatform(params);
if(params.type == 1){
res.rows.map((item)=>{
let obj = {}
obj['网站名称'] = item.name
obj['真实IP'] = item.ipAddress
obj['网站域名'] = item.dns
obj['备案许可证号'] = item.licenceNum
this.tableData.push(obj)
})
} else if(params.type == 2) {
res.rows.map((item)=>{
let obj = {};
obj['账号'] = item.name;
obj['简介'] = item.intro;
obj['粉丝数'] = item.fansNum;
this.tableData.push(obj)
})
this.tableData.sort((a, b) => b.粉丝数 - a.粉丝数)
} else if(params.type == 3) {
res.rows.map((item)=>{
let obj = {}
obj['账号ID'] = item.name
obj['行业属性'] = this.getProps(item.props)
this.tableData.push(obj)
})
} else if(params.type == 4) {
res.rows.map((item)=>{
let obj = {}
obj['账号名称'] = item.name
obj['认证'] = item.authentication
obj['地区'] = item.area
this.tableData.push(obj)
})
} else if(params.type == 5) {
res.rows.map((item)=>{
let obj = {}
obj['账号ID'] = item.name
obj['简介'] = item.intro
this.tableData.push(obj)
})
} else if(params.type == 6) {
res.rows.map((item)=>{
let obj = {}
obj['账号ID'] = item.name
obj['简介'] = item.intro
this.tableData.push(obj)
})
} else if(params.type == 7) {
res.rows.map((item)=>{
let obj = {}
obj['账号ID'] = item.name
obj['URL'] = item.dns
this.tableData.push(obj)
})
} else if(params.type == 8) {
res.rows.map((item)=>{
let obj = {}
obj['账号ID'] = item.name
obj['URL'] = item.dns
this.tableData.push(obj)
})
}
this.currentPageData = this.tableData
},
async dynamicClick(e) { async dynamicClick(e) {
this.tableData = [] this.tableData = []
this.currentPage = 1 this.currentPage = 1

Loading…
Cancel
Save