西海岸视频平台对接

This commit is contained in:
wuhongjian 2022-06-14 17:08:20 +08:00
parent 7e1eaa8410
commit 0ba396e9d3
3 changed files with 91 additions and 9 deletions

View File

@ -2,7 +2,7 @@
* @Author: hisense.wuhongjian
* @Date: 2022-04-20 17:16:35
* @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-05-26 22:40:46
* @LastEditTime: 2022-06-14 16:53:39
* @Description: 告诉大家这是什么
*/
import request from '@/utils/request'
@ -46,3 +46,9 @@ export function correct(params) {
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)
}
export function getHls(params) {
return axios.get('http://10.134.135.9:8001/hx-weather-warning/camera/getCameraLiveStream', params, config2)
}

View File

@ -365,6 +365,7 @@
// VideoCameraOutlined,
} from '@ant-design/icons-vue'
import { selectDicStoreAll, pageWithAttrs, zywMessage } from '@/api/home.js'
import { getVideoList } from '@/api/file.js'
import { getSgcList } from '@/api/personalCenter'
import { useRouter } from 'vue-router'
// import { useStore } from 'vuex'
@ -996,15 +997,71 @@
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
)
// resourceTotal.value = '300'
// getShoppingCartList(infrastructure.value.data.records)
//
const params = {
name: searchValue.value,
pageNo: paramsGetResources.pageNum,
pageSize: paramsGetResources.pageSize
}
resourceTotal.value = 10
resourceList.data = [
{
"id": "689299957948436480",//id
"cameraIndexCode": "37021100001316660963",//
"cameraSerial": null,//
"gbIndexCode": "37021100001316660963",//
"name": "216省道与星海滩路桥底南",//
"deviceIndexCode": "",//
"longitude": "120.05622780039626",//WGS84
"latitude": "35.9411893638582",//WGS84
"altitude": "",//WGS84
"pixel": "1",//1-2-1303-2004-300
"cameraType": "2",//(0-1-2-3-)
"cameraTypeName": "Fast Ball Camera",//
"installPlace": "",//
"matrixCode": "",//
"chanNum": null,//
"viewshed": "",//JSON使
"capabilitySet": "@vss@",//
"capabilitySetName": "@Video capability@",//
"intelligentSet": "",//
"intelligentSetName": "",//
"recordLocation": "0",//0-1-
"recordLocationName": "Central storage",//
"ptzController": null,//(1-DVR2-3-MU40004-NC600)
"ptzControllerName": "",//
"deviceResourceType": "",//
"deviceResourceTypeName": "",//
"channelType": "analog",//
"channelTypeName": "Analog channel",//
"transType": "1",//0-UDP1-TCP
"transTypeName": "TCP",//
"updateTime": "2022-05-18T02:04:24.166+08:00",//ISO8601yyyy-MM-dd'T'HH:mm:ss.SSSzzz
"unitIndexCode": "37021100001310001004",//
"treatyType": "",//
"treatyTypeName": "",//
"createTime": null,//ISO8601yyyy-MM-dd'T'HH:mm:ss.SSSzzz
"status": "1",// 线0-线1-线
"statusName": "Online",//
"locationLong": 120.05622780039626,//使
"locationLat": 35.9411893638582,//使
"delFlag": 0,//(01)
"createdBy": null,//code
"createdTime": "2022-05-25 12:38:47",//
"updatedBy": null,//code
"updatedTime": "2022-06-08 17:05:26"//
}
]
// getVideoList(params).then((res) => {
// //
// 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)

View File

@ -153,7 +153,10 @@
免费试用
</a-button>
</div>
<a-button type="primary" @click="toView('details', item)">
<a-button type="primary" v-if="item.cameraIndexCode" @click="openVideo( item)">
视频预览
</a-button>
<a-button type="primary" v-else @click="toView('details', item)">
查看详情
</a-button>
<a-button type="primary" @click="toView('apply', item)">
@ -174,6 +177,7 @@
import { message } from 'ant-design-vue'
import { useRouter } from 'vue-router'
import { getUser, sgcInsert } from '@/api/home'
import { getHls } from '@/api/file.js'
import { scInsert, scDel } from '@/api/personalCenter'
import mybus from '@/myplugins/mybus'
@ -280,6 +284,7 @@
components: {},
setup(props) {
let shoppingKey = ref(1)
let videoUrl = ref('')
// id
const selList = ref([
{ name: '发布时间', value: 'tdr.create_date' },
@ -314,6 +319,7 @@
}
function toView(type, item) {
console.log('item', item)
if (type === 'apply') {
// window.open(newpage.href, '_blank')
router.push({
@ -399,6 +405,18 @@
})
console.log('选择===========》', val, selData.value)
}
//
const openVideo = (item) => {
videoUrl.value = ''
const param = {
cameraId: item.cameraIndexCode,
protocol: 'hls',
}
getHls(param).then((res) => {
console.log('获取视频地址===============>', res)
videoUrl.value = res.data.data
})
}
mybus.on('chongzhi', () => {
selData.value = 'total'
})
@ -414,6 +432,7 @@
cardType,
findComponentName,
shoppingKey,
openVideo,
}
},
beforeUnmount() {