{{ item.people.name }} @@ -54,6 +56,7 @@ import { pinyin } from 'pinyin-pro' import { ref, defineProps, watch } from 'vue' let dataFrom = ref({ + link: '', title: '使用方式', englishTitle: 'USAGE', content: [ @@ -81,25 +84,35 @@ const flag = ref(true) if (props.dataList.infoList) { let obj = props.dataList.infoList.filter( - (item) => item.attrType === '技术文档' + (item) => + item.attrType === '技术文档' || + item.attrType === '服务商' || + item.attrType === '服务商联系人' || + item.attrType === '使用手册' || + item.attrType === '服务地址' || + item.attrType === '样式服务地址' || + item.attrType === '服务商联系电话' )[0] if (!obj) { flag.value = false } else { // eslint-disable-next-line vue/no-setup-props-destructure - dataFrom.value.content[0].link.value = props.dataList.apiUrl - dataFrom.value.content[0].facilitator.values = props.dataList.deptContacts + // dataFrom.value.content[0].link.value = props.dataList.apiUrl + dataFrom.value.content[0].facilitator.values = props.dataList.deptName + dataFrom.value.content[0].people.value = props.dataList.deptContacts + dataFrom.value.content[0].phone.value = props.dataList.deptPhone console.log('dataList', props.dataList) props.dataList.infoList.map((item) => { - if (item.attrType === '组件地址') { + if (item.attrType === '使用手册') { + dataFrom.value.link = item.attrValue || '--' + } else if (item.attrType === '服务地址') { dataFrom.value.content[0].linkValue = item.attrValue || '--' - } else if (item.attrType === '服务商') { - dataFrom.value.content[0].facilitator.value = item.attrValue || '--' - } else if (item.attrType === '服务商联系人') { - dataFrom.value.content[0].people.value = item.attrValue || '--' - } else if (item.attrType === '服务商联系电话') { - dataFrom.value.content[0].phone.value = item.attrValue || '--' + } else if (item.attrType === '样式服务地址') { + dataFrom.value.content[0].csslnkValue = item.attrValue || '--' } + // else if (item.attrType === '服务商联系电话') { + // dataFrom.value.content[0].phone.value = item.deptPhone || '--' + // } }) } } @@ -107,24 +120,40 @@ () => props.dataList, (val) => { if (val) { - let obj = val.infoList.filter((item) => item.attrType === '技术文档')[0] + let obj = val.infoList.filter( + (item) => + item.attrType === '技术文档' || + item.attrType === '服务商' || + item.attrType === '服务商联系人' || + item.attrType === '使用手册' || + item.attrType === '服务地址' || + item.attrType === '样式服务地址' || + item.attrType === '服务商联系电话' + )[0] if (!obj) { flag.value = false } else { - dataFrom.value.content[0].link.value = val.apiUrl - dataFrom.value.content[0].facilitator.value = val.deptContacts + // dataFrom.value.content[0].link.value = val.apiUrl + dataFrom.value.content[0].facilitator.values = val.deptName + dataFrom.value.content[0].people.value = val.deptContacts + dataFrom.value.content[0].phone.value = val.deptPhone console.log('dataList', val) val.infoList.map((item) => { - if (item.attrType === '组件地址') { + if (item.attrType === '使用手册') { + dataFrom.value.link = item.attrValue || '--' + } else if (item.attrType === '服务地址') { dataFrom.value.content[0].linkValue = item.attrValue || '--' - } else if (item.attrType === '服务商') { - dataFrom.value.content[0].facilitator.value = - item.attrValue || '--' - } else if (item.attrType === '服务商联系人') { - dataFrom.value.content[0].people.value = item.attrValue || '--' - } else if (item.attrType === '服务商联系电话') { - dataFrom.value.content[0].phone.value = item.attrValue || '--' + } else if (item.attrType === '样式服务地址') { + dataFrom.value.content[0].csslnkValue = item.attrValue || '--' } + // else if (item.attrType === '服务商') { + // dataFrom.value.content[0].facilitator.value = + // item.attrValue || '--' + // } else if (item.attrType === '服务商联系人') { + // dataFrom.value.content[0].people.value = item.attrValue || '--' + // } else if (item.attrType === '服务商联系电话') { + // dataFrom.value.content[0].phone.value = item.attrValue || '--' + // } }) } } diff --git a/front/src/views/home/DetailsPageconetent.vue b/front/src/views/home/DetailsPageconetent.vue index 17616056..5060a8ba 100644 --- a/front/src/views/home/DetailsPageconetent.vue +++ b/front/src/views/home/DetailsPageconetent.vue @@ -1018,7 +1018,6 @@ }) console.log('paramsGetResources', paramsGetResources) } - // debugger tecHnosphere = router.currentRoute.value.query.tecHnosphere appLiCation = router.currentRoute.value.query.appLiCation if (val.typeList && val.typeList.length > 6) { @@ -1038,7 +1037,8 @@ const resourceList = reactive({ data: [] }) const videoList = reactive({ data: [] }) const resourceTotal = ref('') - const getAppResources = () => { + const getAppResources = (switchIndex) => { + //switchIndex这个参数是下面的分页传过来的参数 paramsGetResources.name = searchValue.value paramsGetResources.type = Cardsname.value console.log( @@ -1049,7 +1049,10 @@ !whoShow1.value.itShowBaoTou && paramsGetResources.type === '数据资源' ) { - getDataResource({ + if (switchIndex != '分页查询') { + paramsGetResources.pageNum = 1 + } + let dataResourceParams = { serviceName: paramsGetResources.name, //资源名称 orderField: whoShow1.value.itShowQingDao ? paramsGetResources.orderField == 'applyCount' @@ -1061,7 +1064,8 @@ orderType: paramsGetResources.orderType.toLowerCase(), //排序方式:desc,asc pageNum: paramsGetResources.pageNum, //页码 pageSize: paramsGetResources.pageSize, //分页大小 - }).then((res) => { + } + getDataResource(dataResourceParams).then((res) => { console.log('数据资源==================>', res.data.data) if (whoShow1.value.itShowQingDao) { res.data.data.data.forEach((val) => { @@ -1091,6 +1095,9 @@ } }) } else if (paramsGetResources.type !== '数据资源') { + if (switchIndex != '分页查询') { + paramsGetResources.pageNum = 1 + } pageWithAttrs(paramsGetResources).then((res) => { console.log('查询列表============>', resourceList, res.data.data) resourceList.data = [] @@ -1182,7 +1189,8 @@ loading.value = true currentPage.value = val paramsGetResources.pageNum = val - getAppResources() + let params = '分页查询' //判断是否是点击下面的分页的调用模糊查询方法还是点击搜索调用模糊查询方法 + getAppResources(params) } // const findZywMessage = () => { // zywMessage().then((res) => { @@ -1235,7 +1243,6 @@ router.currentRoute.value.query.appLiCation = '' tecHnosphere = router.currentRoute.value.query.tecHnosphere appLiCation = router.currentRoute.value.query.appLiCation - // debugger let newQuery = JSON.parse( JSON.stringify(router.currentRoute.value.query) ) diff --git a/front/src/views/home/components/searchResultList.vue b/front/src/views/home/components/searchResultList.vue index 4b5b212f..53aea18c 100644 --- a/front/src/views/home/components/searchResultList.vue +++ b/front/src/views/home/components/searchResultList.vue @@ -46,7 +46,7 @@