From 0cfb08788aeb18179e6a967c03ed6e89a4f23ab4 Mon Sep 17 00:00:00 2001 From: a0049873 <79py69t9wb@privaterelay.appleid.com> Date: Tue, 14 Jun 2022 17:33:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E8=B5=84=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- front/src/api/file.js | 22 ++++- front/src/views/home/DetailsPageconetent.vue | 87 ++++++++++++------- .../home/components/searchResultList.vue | 15 ++-- 3 files changed, 84 insertions(+), 40 deletions(-) diff --git a/front/src/api/file.js b/front/src/api/file.js index 9777ab36..9e6f2583 100644 --- a/front/src/api/file.js +++ b/front/src/api/file.js @@ -1,8 +1,8 @@ /* * @Author: hisense.wuhongjian * @Date: 2022-04-20 17:16:35 - * @LastEditors: hisense.wuhongjian - * @LastEditTime: 2022-05-26 22:40:46 + * @LastEditors: hisense.liangjunhua + * @LastEditTime: 2022-06-14 17:29:06 * @Description: 告诉大家这是什么 */ import request from '@/utils/request' @@ -46,3 +46,21 @@ export function correct(params) { export function paddleocr(params) { return axios.post('http://15.72.183.90:7008/paddleocr', params, config2) } + +export function getRecord(params) { + return axios.get( + 'http://10.134.135.24:30090/api/share-portal/platform/catalogue/query?serviceName=' + + params.serviceName + + '&orderField=' + + params.orderField + + '&orderType=' + + params.orderType + + '&pageNum=' + + params.pageNum + + '&pageSize=' + + params.pageSize + + '&serviceType=' + + params.serviceType, + config2 + ) +} diff --git a/front/src/views/home/DetailsPageconetent.vue b/front/src/views/home/DetailsPageconetent.vue index 6ee2fd7c..9284d9c2 100644 --- a/front/src/views/home/DetailsPageconetent.vue +++ b/front/src/views/home/DetailsPageconetent.vue @@ -366,6 +366,7 @@ } from '@ant-design/icons-vue' import { selectDicStoreAll, pageWithAttrs, zywMessage } from '@/api/home.js' import { getSgcList } from '@/api/personalCenter' + import { getRecord } from '@/api/file' import { useRouter } from 'vue-router' // import { useStore } from 'vuex' import HomeHeader from '@/views/home/components/header' @@ -992,39 +993,61 @@ const getAppResources = () => { paramsGetResources.name = searchValue.value paramsGetResources.type = Cardsname.value - pageWithAttrs(paramsGetResources).then((res) => { - console.log('查询列表============>', resourceList, res.data.data) - resourceList.data = [] - videoList.data = [] - if (Cardsname.value === '基础设施') { - // videoList.data = res.data.data.records || [] - resourceTotal.value = infrastructure.value.data.total || '' - getShoppingCartList(infrastructure.value.data.records) - console.log( - '基础设施~~~~~~~~~~~', - resourceTotal.value, - resourceList.data - ) - } else if (Cardsname.value === '数据资源') { - resourceTotal.value = resourceData.value.data.total || '' - getShoppingCartList(resourceData.value.data.records) - console.log( - '数据资源~~~~~~~~~~~', - resourceTotal.value, - resourceList.data - ) - // debugger - } else { - // resourceList.data = res.data.data.records || [] - resourceTotal.value = res.data.data.total || '' - getShoppingCartList(res.data.data.records) - console.log( - '其他~~~~~~~~~~~', - resourceList.data, - resourceTotal.value - ) + if(paramsGetResources.type=='组件服务' || paramsGetResources.type=='应用资源'){ + pageWithAttrs(paramsGetResources).then((res) => { + console.log('查询列表============>', resourceList, res.data.data) + resourceList.data = [] + videoList.data = [] + // resourceList.data = res.data.data.records || [] + resourceTotal.value = res.data.data.total || '' + getShoppingCartList(res.data.data.records) + console.log( + '其他~~~~~~~~~~~', + resourceList.data, + resourceTotal.value + ) + }) + }else if(paramsGetResources.type=='基础设施'){ + // videoList.data = res.data.data.records || [] + resourceTotal.value = infrastructure.value.data.total || '' + getShoppingCartList(infrastructure.value.data.records) + console.log( + '基础设施~~~~~~~~~~~', + resourceTotal.value, + resourceList.data + ) + }else if(paramsGetResources.type=='数据资源'){ + const obj ={ + serviceName:paramsGetResources.name, + orderField:'updateTime', + orderType:'desc', + pageNum:paramsGetResources.pageNum, + pageSize:paramsGetResources.pageSize, + serviceType:'data', + // rq=1655196484308.0234 } - }) + getRecord(obj).then(res => { + if(res.data.data){ + res.data.data.list.forEach(val =>{ + val.name = val.serviceName + val.createDate = val.updateTime + val.id = val.serviceId + // "requestNum": 0, + // "requestQuantity": 0, + // "starNum": 4, + // "shareStatus": "2" + }) + resourceList.data = res.data.data.list || [] + resourceTotal.value = resourceData.value.data.total || '' + // getShoppingCartList(resourceData.value.data.records) + console.log( + '数据资源~~~~~~~~~~~', + resourceTotal.value, + resourceList.data + ) + } + }) + } } let shoppingCartList = ref([]) // 获取申购车列表 diff --git a/front/src/views/home/components/searchResultList.vue b/front/src/views/home/components/searchResultList.vue index 5e60e4d8..666c1f3c 100644 --- a/front/src/views/home/components/searchResultList.vue +++ b/front/src/views/home/components/searchResultList.vue @@ -82,12 +82,15 @@
发布时间: - {{ item.createDate || '--' }} + + +
- -
@@ -113,7 +116,7 @@