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
This commit is contained in:
commit
69e71e841a
|
@ -2,7 +2,7 @@
|
|||
* @Author: hisense.wuhongjian
|
||||
* @Date: 2022-04-20 17:16:35
|
||||
* @LastEditors: hisense.liangjunhua
|
||||
* @LastEditTime: 2022-06-14 17:29:06
|
||||
* @LastEditTime: 2022-06-14 17:37:18
|
||||
* @Description: 告诉大家这是什么
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
@ -46,21 +46,25 @@ export function correct(params) {
|
|||
export function paddleocr(params) {
|
||||
return axios.post('http://15.72.183.90:7008/paddleocr', params, config2)
|
||||
}
|
||||
|
||||
export function getRecord(params) {
|
||||
export function getVideoList(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,
|
||||
'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
|
||||
)
|
||||
}
|
||||
|
||||
export function getRecord(params) {
|
||||
return axios.get(
|
||||
'http://10.134.135.24:30090/api/share-portal/platform/catalogue/query',
|
||||
params,
|
||||
config2
|
||||
)
|
||||
}
|
||||
|
|
|
@ -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 { getRecord } from '@/api/file'
|
||||
import { useRouter } from 'vue-router'
|
||||
|
@ -373,7 +374,7 @@
|
|||
import detailsPageconetentTree from '@/views/home/detailsPageconetentTree.vue'
|
||||
import searchResultList from '@/views/home/components/searchResultList.vue'
|
||||
import KnowledgeBase from '@/views/home/components/KnowledgeBase.vue'
|
||||
import VideoSurveillance from '@/views/home/videoSurveillance'
|
||||
// import VideoSurveillance from '@/views/home/videoSurveillance'
|
||||
export default defineComponent({
|
||||
setup() {
|
||||
// const store = useStore()
|
||||
|
@ -1009,16 +1010,31 @@
|
|||
})
|
||||
}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
|
||||
)
|
||||
// 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,
|
||||
pageSize: paramsGetResources.pageSize
|
||||
}
|
||||
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(paramsGetResources.type=='数据资源'){
|
||||
const obj ={
|
||||
serviceName:paramsGetResources.name,
|
||||
serviceName:searchValue.value,
|
||||
orderField:'updateTime',
|
||||
orderType:'desc',
|
||||
pageNum:paramsGetResources.pageNum,
|
||||
|
@ -1277,7 +1293,7 @@
|
|||
DownOutlined,
|
||||
KnowledgeBase,
|
||||
// VideoCameraOutlined,
|
||||
VideoSurveillance,
|
||||
// VideoSurveillance,
|
||||
},
|
||||
beforeUnmount() {
|
||||
mybus.off('selectCardsitem')
|
||||
|
|
|
@ -156,7 +156,14 @@
|
|||
免费试用
|
||||
</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)">
|
||||
|
@ -169,14 +176,28 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<a-modal
|
||||
v-model:visible="visible"
|
||||
title="视频预览"
|
||||
:width="750"
|
||||
destroyOnClose
|
||||
>
|
||||
<template #footer></template>
|
||||
<div style="width: 100%; display: flex; justify-content: center">
|
||||
<div style="width: 100%; height: 100%">
|
||||
<vue3VideoPlay v-bind="options" />
|
||||
</div>
|
||||
</div>
|
||||
</a-modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { ref } from 'vue'
|
||||
import { ref, reactive } from 'vue'
|
||||
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'
|
||||
|
||||
|
@ -283,6 +304,34 @@
|
|||
components: {},
|
||||
setup(props) {
|
||||
let shoppingKey = ref(1)
|
||||
let videoUrl = ref('')
|
||||
let visible = ref(false)
|
||||
const options = reactive({
|
||||
width: '700px', //播放器宽度
|
||||
height: '400px', //播放器高度
|
||||
color: '#409eff', //主题色
|
||||
title: '', //视频名称
|
||||
src: '', //视频源
|
||||
muted: false, //静音
|
||||
webFullScreen: false,
|
||||
speedRate: ['0.75', '1.0', '1.25', '1.5', '2.0'], //播放倍速
|
||||
autoPlay: true, //自动播放
|
||||
loop: false, //循环播放
|
||||
mirror: false, //镜像画面
|
||||
ligthOff: false, //关灯模式
|
||||
volume: 0.3, //默认音量大小
|
||||
control: true, //是否显示控制
|
||||
controlBtns: [
|
||||
'audioTrack',
|
||||
'quality',
|
||||
'speedRate',
|
||||
'volume',
|
||||
'setting',
|
||||
'pip',
|
||||
'pageFullScreen',
|
||||
'fullScreen',
|
||||
], //显示所有按钮,
|
||||
})
|
||||
// 购物车id列表
|
||||
const selList = ref([
|
||||
{ name: '发布时间', value: 'tdr.create_date' },
|
||||
|
@ -317,6 +366,7 @@
|
|||
}
|
||||
|
||||
function toView(type, item) {
|
||||
console.log('item', item)
|
||||
if (type === 'apply') {
|
||||
// window.open(newpage.href, '_blank')
|
||||
router.push({
|
||||
|
@ -402,10 +452,27 @@
|
|||
})
|
||||
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
|
||||
options.value.src = res.data.data
|
||||
visible.value = true
|
||||
})
|
||||
}
|
||||
mybus.on('chongzhi', () => {
|
||||
selData.value = 'total'
|
||||
})
|
||||
return {
|
||||
visible,
|
||||
videoUrl,
|
||||
options,
|
||||
onSearch,
|
||||
resultList,
|
||||
toView,
|
||||
|
@ -417,6 +484,7 @@
|
|||
cardType,
|
||||
findComponentName,
|
||||
shoppingKey,
|
||||
openVideo,
|
||||
}
|
||||
},
|
||||
beforeUnmount() {
|
||||
|
|
|
@ -17,16 +17,26 @@
|
|||
</div>
|
||||
<div class="item">
|
||||
<div class="zj">组件服务</div>
|
||||
<div class="name" v-for="(item, index) in zjList" :key="item.id" :class="index == 4 ? 'name-last' : ''"
|
||||
@click="selectOne(item.id)">
|
||||
<div
|
||||
class="name"
|
||||
v-for="(item, index) in zjList"
|
||||
:key="item.id"
|
||||
:class="index == 4 ? 'name-last' : ''"
|
||||
@click="selectOne(item.id)"
|
||||
>
|
||||
{{ index + 1 }}-{{ item.name }}
|
||||
</div>
|
||||
<div class="btn" @click="jumpPage('组件服务')">查看更多</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="yy">应用资源</div>
|
||||
<div class="name" v-for="(item, index) in yyList" :key="item.id" :class="index == 4 ? 'name-last' : ''"
|
||||
@click="selectOne(item.id)">
|
||||
<div
|
||||
class="name"
|
||||
v-for="(item, index) in yyList"
|
||||
:key="item.id"
|
||||
:class="index == 4 ? 'name-last' : ''"
|
||||
@click="selectOne(item.id)"
|
||||
>
|
||||
{{ index + 1 }}-{{ item.name }}
|
||||
</div>
|
||||
<div class="btn" @click="jumpPage('应用资源')">查看更多</div>
|
||||
|
@ -68,183 +78,183 @@
|
|||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { pageWithAttrs } from '@/api/home.js'
|
||||
import { ref } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useStore } from 'vuex'
|
||||
const store = useStore()
|
||||
const router = useRouter()
|
||||
const zjList = ref([])
|
||||
const yyList = ref([])
|
||||
// const jcList = ref([])
|
||||
const paramsGetResources = {
|
||||
districtId: '',
|
||||
pageNum: 1,
|
||||
pageSize: 5,
|
||||
type: '',
|
||||
name: '',
|
||||
infoList: [],
|
||||
orderField: 'total', // total 综合 visits 访问量 applyCount 申请量 score 评分 collectCount 收藏量
|
||||
orderType: 'DESC', // ASC 升序 DESC 降序
|
||||
}
|
||||
const getAppResources = (type, obj) => {
|
||||
paramsGetResources.type = type
|
||||
pageWithAttrs(paramsGetResources).then((res) => {
|
||||
console.log('查询列表============>', res.data.data.records)
|
||||
obj.value = res.data.data.records
|
||||
})
|
||||
}
|
||||
getAppResources('组件服务', zjList)
|
||||
getAppResources('应用资源', yyList)
|
||||
// getAppResources('基础设施', jcList)
|
||||
import { pageWithAttrs } from '@/api/home.js'
|
||||
import { ref } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useStore } from 'vuex'
|
||||
const store = useStore()
|
||||
const router = useRouter()
|
||||
const zjList = ref([])
|
||||
const yyList = ref([])
|
||||
// const jcList = ref([])
|
||||
const paramsGetResources = {
|
||||
districtId: '',
|
||||
pageNum: 1,
|
||||
pageSize: 5,
|
||||
type: '',
|
||||
name: '',
|
||||
infoList: [],
|
||||
orderField: 'total', // total 综合 visits 访问量 applyCount 申请量 score 评分 collectCount 收藏量
|
||||
orderType: 'DESC', // ASC 升序 DESC 降序
|
||||
}
|
||||
const getAppResources = (type, obj) => {
|
||||
paramsGetResources.type = type
|
||||
pageWithAttrs(paramsGetResources).then((res) => {
|
||||
console.log('查询列表============>', res.data.data.records)
|
||||
obj.value = res.data.data.records
|
||||
})
|
||||
}
|
||||
getAppResources('组件服务', zjList)
|
||||
getAppResources('应用资源', yyList)
|
||||
// getAppResources('基础设施', jcList)
|
||||
|
||||
function jumpPage(type) {
|
||||
// 点击内存入store
|
||||
store.commit('home/selectCardsData', {
|
||||
selectCardsnum: type,
|
||||
})
|
||||
console.log(
|
||||
'选中===================>',
|
||||
store.getters['home/selectCardsnum']
|
||||
)
|
||||
// router.push({ path: '/DetailsPageconetent' })
|
||||
router.push({
|
||||
path: '/DetailsPageconetent',
|
||||
query: {
|
||||
select: type,
|
||||
},
|
||||
})
|
||||
}
|
||||
const selectOne = (id) => {
|
||||
console.log('点击===============》', id)
|
||||
router.push({
|
||||
path: '/details',
|
||||
query: {
|
||||
id: id,
|
||||
},
|
||||
})
|
||||
}
|
||||
function jumpPage(type) {
|
||||
// 点击内存入store
|
||||
store.commit('home/selectCardsData', {
|
||||
selectCardsnum: type,
|
||||
})
|
||||
console.log(
|
||||
'选中===================>',
|
||||
store.getters['home/selectCardsnum']
|
||||
)
|
||||
// router.push({ path: '/DetailsPageconetent' })
|
||||
router.push({
|
||||
path: '/DetailsPageconetent',
|
||||
query: {
|
||||
select: type,
|
||||
},
|
||||
})
|
||||
}
|
||||
const selectOne = (id) => {
|
||||
console.log('点击===============》', id)
|
||||
router.push({
|
||||
path: '/details',
|
||||
query: {
|
||||
id: id,
|
||||
},
|
||||
})
|
||||
}
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.capability-convergence {
|
||||
height: 7.2rem;
|
||||
background: url('~@/assets/newHome/Convergence-bg.png') no-repeat;
|
||||
background-size: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
||||
.main {
|
||||
width: 13rem;
|
||||
margin-top: 1.8rem;
|
||||
.capability-convergence {
|
||||
height: 7.2rem;
|
||||
background: url('~@/assets/newHome/Convergence-bg.png') no-repeat;
|
||||
background-size: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
|
||||
.top {
|
||||
font-size: 0.3rem;
|
||||
color: #212121;
|
||||
text-align: center;
|
||||
.main {
|
||||
width: 13rem;
|
||||
margin-top: 1.8rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
.line {
|
||||
width: 0.34rem;
|
||||
height: 0.03rem;
|
||||
background-color: #0058e1;
|
||||
margin-top: 0.08rem;
|
||||
.top {
|
||||
font-size: 0.3rem;
|
||||
color: #212121;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
.line {
|
||||
width: 0.34rem;
|
||||
height: 0.03rem;
|
||||
background-color: #0058e1;
|
||||
margin-top: 0.08rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.bottom {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 0.4rem;
|
||||
.bottom {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 0.4rem;
|
||||
|
||||
.item {
|
||||
width: 2.44rem;
|
||||
height: 3.91rem;
|
||||
font-size: 0.16rem;
|
||||
background-color: #fff;
|
||||
border-radius: 0.02rem;
|
||||
box-shadow: 0 0.05rem 0.2rem #ccc;
|
||||
|
||||
div:nth-of-type(1) {
|
||||
height: 1.02rem;
|
||||
line-height: 1.02rem;
|
||||
font-size: 0.2rem;
|
||||
color: #fff;
|
||||
padding-left: 0.15rem;
|
||||
background-size: 100%;
|
||||
}
|
||||
|
||||
.jc {
|
||||
background: url('~@/assets/newHome/Convergence-jc.png') no-repeat;
|
||||
}
|
||||
|
||||
.sj {
|
||||
background: url('~@/assets/newHome/Convergence-sj.png') no-repeat;
|
||||
}
|
||||
|
||||
.zj {
|
||||
background: url('~@/assets/newHome/Convergence-zj.png') no-repeat;
|
||||
}
|
||||
|
||||
.yy {
|
||||
background: url('~@/assets/newHome/Convergence-yy.png') no-repeat;
|
||||
}
|
||||
|
||||
.zs {
|
||||
background: url('~@/assets/newHome/Convergence-zs.png') no-repeat;
|
||||
}
|
||||
.name {
|
||||
height: 0.47rem;
|
||||
line-height: 0.47rem;
|
||||
margin: 0 0.16rem;
|
||||
border-bottom: 0.01rem solid #e9e9e9;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 1;
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
||||
|
||||
.name:hover {
|
||||
color: #0058e1;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.name-last {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.btn {
|
||||
cursor: pointer;
|
||||
width: 0.8rem;
|
||||
height: 0.24rem;
|
||||
border: 0.01rem solid #0058e1;
|
||||
font-size: 0.14rem;
|
||||
color: #0058e1;
|
||||
.item {
|
||||
width: 2.44rem;
|
||||
height: 3.91rem;
|
||||
font-size: 0.16rem;
|
||||
background-color: #fff;
|
||||
border-radius: 0.02rem;
|
||||
text-align: center;
|
||||
margin-top: 0.1rem;
|
||||
margin-left: 0.85rem;
|
||||
box-shadow: 0 0.05rem 0.2rem #ccc;
|
||||
|
||||
div:nth-of-type(1) {
|
||||
height: 1.02rem;
|
||||
line-height: 1.02rem;
|
||||
font-size: 0.2rem;
|
||||
color: #fff;
|
||||
padding-left: 0.15rem;
|
||||
background-size: 100%;
|
||||
}
|
||||
|
||||
.jc {
|
||||
background: url('~@/assets/newHome/Convergence-jc.png') no-repeat;
|
||||
}
|
||||
|
||||
.sj {
|
||||
background: url('~@/assets/newHome/Convergence-sj.png') no-repeat;
|
||||
}
|
||||
|
||||
.zj {
|
||||
background: url('~@/assets/newHome/Convergence-zj.png') no-repeat;
|
||||
}
|
||||
|
||||
.yy {
|
||||
background: url('~@/assets/newHome/Convergence-yy.png') no-repeat;
|
||||
}
|
||||
|
||||
.zs {
|
||||
background: url('~@/assets/newHome/Convergence-zs.png') no-repeat;
|
||||
}
|
||||
.name {
|
||||
height: 0.47rem;
|
||||
line-height: 0.47rem;
|
||||
margin: 0 0.16rem;
|
||||
border-bottom: 0.01rem solid #e9e9e9;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 1;
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
||||
|
||||
.name:hover {
|
||||
color: #0058e1;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.name-last {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.btn {
|
||||
cursor: pointer;
|
||||
width: 0.8rem;
|
||||
height: 0.24rem;
|
||||
border: 0.01rem solid #0058e1;
|
||||
font-size: 0.14rem;
|
||||
color: #0058e1;
|
||||
border-radius: 0.02rem;
|
||||
text-align: center;
|
||||
margin-top: 0.1rem;
|
||||
margin-left: 0.85rem;
|
||||
}
|
||||
|
||||
.btn:hover {
|
||||
background: rgba(0, 88, 225, 0.3);
|
||||
color: #000;
|
||||
}
|
||||
}
|
||||
|
||||
.btn:hover {
|
||||
background: rgba(0, 88, 225, 0.3);
|
||||
color: #000;
|
||||
.item:hover {
|
||||
border-radius: 0.02rem;
|
||||
border: 0.01rem solid #0058e1;
|
||||
box-shadow: 0rem 0.08rem 0.2rem rgba(0, 88, 225, 0.3);
|
||||
}
|
||||
}
|
||||
|
||||
.item:hover {
|
||||
border-radius: 0.02rem;
|
||||
border: 0.01rem solid #0058e1;
|
||||
box-shadow: 0rem 0.08rem 0.2rem rgba(0, 88, 225, 0.3);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
Loading…
Reference in New Issue