新排序
This commit is contained in:
parent
0b972d7bb9
commit
e50dc1ad1f
|
@ -843,7 +843,7 @@
|
||||||
const currentPageSize = ref(5)
|
const currentPageSize = ref(5)
|
||||||
const pageSizeOptions = ref(['5', '10', '20', '50'])
|
const pageSizeOptions = ref(['5', '10', '20', '50'])
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const select = router.currentRoute.value.query.select || '组件服务'
|
let select = router.currentRoute.value.query.select || '组件服务'
|
||||||
const select2 = router.currentRoute.value.query.select
|
const select2 = router.currentRoute.value.query.select
|
||||||
const str = router.currentRoute.value.query.str
|
const str = router.currentRoute.value.query.str
|
||||||
const searchValue = ref(str)
|
const searchValue = ref(str)
|
||||||
|
@ -868,7 +868,7 @@
|
||||||
type: Cardsname.value,
|
type: Cardsname.value,
|
||||||
name: '',
|
name: '',
|
||||||
infoList: [],
|
infoList: [],
|
||||||
orderField: 'visits', // total 综合 visits 访问量 applyCount 申请量 score 评分 collectCount 收藏量
|
orderField: '', // 传空为默认排序 total 综合 visits 访问量 applyCount 申请量 score 评分 collectCount 收藏量
|
||||||
orderType: 'DESC', // ASC 升序 DESC 降序
|
orderType: 'DESC', // ASC 升序 DESC 降序
|
||||||
}
|
}
|
||||||
//西海岸查询参数
|
//西海岸查询参数
|
||||||
|
@ -973,7 +973,7 @@
|
||||||
paramsGetResources.name = ''
|
paramsGetResources.name = ''
|
||||||
paramsGetResources.shareCondition = ''
|
paramsGetResources.shareCondition = ''
|
||||||
paramsGetResources.infoList = []
|
paramsGetResources.infoList = []
|
||||||
paramsGetResources.orderField = 'total'
|
paramsGetResources.orderField = ''
|
||||||
paramsGetResources.orderType = 'DESC'
|
paramsGetResources.orderType = 'DESC'
|
||||||
mybus.emit('chongzhi')
|
mybus.emit('chongzhi')
|
||||||
getAppResources()
|
getAppResources()
|
||||||
|
@ -1129,6 +1129,59 @@
|
||||||
if (!globalFlag.value) {
|
if (!globalFlag.value) {
|
||||||
globalData.data = []
|
globalData.data = []
|
||||||
}
|
}
|
||||||
|
select = router.currentRoute.value.query.select
|
||||||
|
console.log(
|
||||||
|
'url中的select',
|
||||||
|
router.currentRoute.value.query.select,
|
||||||
|
select == '应用资源' &&
|
||||||
|
(paramsGetResources.orderField == '' ||
|
||||||
|
paramsGetResources.orderField == 'deptSort' ||
|
||||||
|
paramsGetResources.orderField == 'pin_top'),
|
||||||
|
paramsGetResources.infoList.filter(
|
||||||
|
(val) => val.attrType == '组件类型'
|
||||||
|
)[0] &&
|
||||||
|
paramsGetResources.infoList.filter(
|
||||||
|
(val) => val.attrType == '组件类型'
|
||||||
|
)[0].attrValue == '图层服务' &&
|
||||||
|
(paramsGetResources.orderField == '' ||
|
||||||
|
paramsGetResources.orderField == 'deptSort' ||
|
||||||
|
paramsGetResources.orderField == 'pin_top')
|
||||||
|
)
|
||||||
|
if (
|
||||||
|
(select == '应用资源' &&
|
||||||
|
(paramsGetResources.orderField == '' ||
|
||||||
|
paramsGetResources.orderField == 'deptSort' ||
|
||||||
|
paramsGetResources.orderField == 'pin_top')) ||
|
||||||
|
(paramsGetResources.infoList.filter(
|
||||||
|
(val) => val.attrType == '组件类型'
|
||||||
|
)[0] &&
|
||||||
|
paramsGetResources.infoList.filter(
|
||||||
|
(val) => val.attrType == '组件类型'
|
||||||
|
)[0].attrValue == '图层服务' &&
|
||||||
|
(paramsGetResources.orderField == '' ||
|
||||||
|
paramsGetResources.orderField == 'deptSort' ||
|
||||||
|
paramsGetResources.orderField == 'pin_top'))
|
||||||
|
) {
|
||||||
|
paramsGetResources.orderField = 'deptSort'
|
||||||
|
} else if (
|
||||||
|
paramsGetResources.infoList.filter(
|
||||||
|
(val) => val.attrType == '组件类型'
|
||||||
|
)[0] &&
|
||||||
|
paramsGetResources.infoList.filter(
|
||||||
|
(val) => val.attrType == '组件类型'
|
||||||
|
)[0].attrValue == '智能算法' &&
|
||||||
|
(paramsGetResources.orderField == '' ||
|
||||||
|
paramsGetResources.orderField == 'deptSort' ||
|
||||||
|
paramsGetResources.orderField == 'pin_top')
|
||||||
|
) {
|
||||||
|
paramsGetResources.orderField = 'pin_top'
|
||||||
|
} else if (
|
||||||
|
paramsGetResources.orderField == '' ||
|
||||||
|
paramsGetResources.orderField == 'deptSort' ||
|
||||||
|
paramsGetResources.orderField == 'pin_top'
|
||||||
|
) {
|
||||||
|
paramsGetResources.orderField = ''
|
||||||
|
}
|
||||||
if (searchValue.value) {
|
if (searchValue.value) {
|
||||||
let str = ''
|
let str = ''
|
||||||
let r = null
|
let r = null
|
||||||
|
|
Loading…
Reference in New Issue