Compare commits

...

3 Commits

Author SHA1 Message Date
a0049873 f392764b0a 接口 2022-06-14 17:41:24 +08:00
a0049873 69e71e841a Merge branch 'hi-ucs-xha' of http://15.2.21.221:3000/wuhongjian/hi-ucs into hi-ucs-xha
# Conflicts:
#	front/src/api/file.js
#	front/src/views/home/DetailsPageconetent.vue
2022-06-14 17:38:11 +08:00
a0049873 0cfb08788a 数据资源 2022-06-14 17:33:31 +08:00
3 changed files with 99 additions and 39 deletions

View File

@ -1,8 +1,8 @@
/*
* @Author: hisense.wuhongjian
* @Date: 2022-04-20 17:16:35
* @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-06-14 16:53:39
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-06-14 17:40:14
* @Description: 告诉大家这是什么
*/
import request from '@/utils/request'
@ -47,8 +47,34 @@ export function paddleocr(params) {
return axios.post('http://15.72.183.90:7008/paddleocr', params, config2)
}
export function getVideoList(params) {
return axios.get('http://10.134.135.9:8001/hx-weather-warning/camera/getCameraListByName', params, config2)
return axios.get(
'http://10.134.135.9:8001/hx-weather-warning/camera/getCameraListByName',
params,
config2
)
}
export function getHls(params) {
return axios.get('http://10.134.135.9:8001/hx-weather-warning/camera/getCameraLiveStream', params, config2)
return axios.get(
'http://10.134.135.9:8001/hx-weather-warning/camera/getCameraLiveStream',
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

@ -367,6 +367,7 @@
import { selectDicStoreAll, pageWithAttrs, zywMessage } from '@/api/home.js'
import { getVideoList } from '@/api/file.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'
@ -993,16 +994,29 @@
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 = '300'
// getShoppingCartList(infrastructure.value.data.records)
//
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
// )
const params = {
name: searchValue.value,
pageNo: paramsGetResources.pageNum,
@ -1010,29 +1024,46 @@
}
getVideoList(params).then((res) => {
//
res.data.data.list.forEach(val =>{
val.name = val.serviceName
val.createDate = val.updateTime
val.id = val.serviceId
})
resourceTotal.value = res.data.data.total
resourceList.data = res.data.data.list
})
} 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
)
}else if(paramsGetResources.type=='数据资源'){
const obj ={
serviceName:searchValue.value,
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([])
//

View File

@ -82,12 +82,15 @@
<div class="header-right">
<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>
更新时间
<span>{{ item.updateDate || '--' }}</span> -->
<!-- </div> -->
</div>
</div>
<div class="dec">
@ -113,7 +116,7 @@
<a-rate
:value="item.score || 0"
disabled
v-if="item.score != 0"
v-if="item.score && item.score != 0"
/>
</a-tooltip>
</div>