数据资源

This commit is contained in:
a0049873 2022-06-14 17:33:31 +08:00
parent 7e1eaa8410
commit 0cfb08788a
3 changed files with 84 additions and 40 deletions

View File

@ -1,8 +1,8 @@
/* /*
* @Author: hisense.wuhongjian * @Author: hisense.wuhongjian
* @Date: 2022-04-20 17:16:35 * @Date: 2022-04-20 17:16:35
* @LastEditors: hisense.wuhongjian * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-05-26 22:40:46 * @LastEditTime: 2022-06-14 17:29:06
* @Description: 告诉大家这是什么 * @Description: 告诉大家这是什么
*/ */
import request from '@/utils/request' import request from '@/utils/request'
@ -46,3 +46,21 @@ export function correct(params) {
export function paddleocr(params) { export function paddleocr(params) {
return axios.post('http://15.72.183.90:7008/paddleocr', params, config2) 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
)
}

View File

@ -366,6 +366,7 @@
} from '@ant-design/icons-vue' } from '@ant-design/icons-vue'
import { selectDicStoreAll, pageWithAttrs, zywMessage } from '@/api/home.js' import { selectDicStoreAll, pageWithAttrs, zywMessage } from '@/api/home.js'
import { getSgcList } from '@/api/personalCenter' import { getSgcList } from '@/api/personalCenter'
import { getRecord } from '@/api/file'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
// import { useStore } from 'vuex' // import { useStore } from 'vuex'
import HomeHeader from '@/views/home/components/header' import HomeHeader from '@/views/home/components/header'
@ -992,39 +993,61 @@
const getAppResources = () => { const getAppResources = () => {
paramsGetResources.name = searchValue.value paramsGetResources.name = searchValue.value
paramsGetResources.type = Cardsname.value paramsGetResources.type = Cardsname.value
pageWithAttrs(paramsGetResources).then((res) => { if(paramsGetResources.type=='组件服务' || paramsGetResources.type=='应用资源'){
console.log('查询列表============>', resourceList, res.data.data) pageWithAttrs(paramsGetResources).then((res) => {
resourceList.data = [] console.log('查询列表============>', resourceList, res.data.data)
videoList.data = [] resourceList.data = []
if (Cardsname.value === '基础设施') { videoList.data = []
// videoList.data = res.data.data.records || [] // resourceList.data = res.data.data.records || []
resourceTotal.value = infrastructure.value.data.total || '' resourceTotal.value = res.data.data.total || ''
getShoppingCartList(infrastructure.value.data.records) getShoppingCartList(res.data.data.records)
console.log( console.log(
'基础设施~~~~~~~~~~~', '其他~~~~~~~~~~~',
resourceTotal.value, resourceList.data,
resourceList.data resourceTotal.value
) )
} else if (Cardsname.value === '数据资源') { })
resourceTotal.value = resourceData.value.data.total || '' }else if(paramsGetResources.type=='基础设施'){
getShoppingCartList(resourceData.value.data.records) // videoList.data = res.data.data.records || []
console.log( resourceTotal.value = infrastructure.value.data.total || ''
'数据资源~~~~~~~~~~~', getShoppingCartList(infrastructure.value.data.records)
resourceTotal.value, console.log(
resourceList.data '基础设施~~~~~~~~~~~',
) resourceTotal.value,
// debugger resourceList.data
} else { )
// resourceList.data = res.data.data.records || [] }else if(paramsGetResources.type=='数据资源'){
resourceTotal.value = res.data.data.total || '' const obj ={
getShoppingCartList(res.data.data.records) serviceName:paramsGetResources.name,
console.log( orderField:'updateTime',
'其他~~~~~~~~~~~', orderType:'desc',
resourceList.data, pageNum:paramsGetResources.pageNum,
resourceTotal.value 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([]) let shoppingCartList = ref([])
// //

View File

@ -82,12 +82,15 @@
<div class="header-right"> <div class="header-right">
<div> <div>
发布时间 发布时间
<span>{{ item.createDate || '--' }}</span> <template v-if="item.createDate">
<span>
{{ item.createDate.substring(0, 10) + ' ' }}
</span>
<span>{{ item.createDate.substring(11, 19) }}</span>
</template>
<template v-else>--</template>
<!-- <span>{{ item.createDate || '--' }}</span> -->
</div> </div>
<!-- <div>
更新时间
<span>{{ item.updateDate || '--' }}</span> -->
<!-- </div> -->
</div> </div>
</div> </div>
<div class="dec"> <div class="dec">
@ -113,7 +116,7 @@
<a-rate <a-rate
:value="item.score || 0" :value="item.score || 0"
disabled disabled
v-if="item.score != 0" v-if="item.score && item.score != 0"
/> />
</a-tooltip> </a-tooltip>
</div> </div>