合并代码

This commit is contained in:
a0049873 2022-06-22 16:18:12 +08:00
parent 96993e040f
commit d9350d938c
9 changed files with 341 additions and 578 deletions

View File

@ -1,13 +1,13 @@
/*
* @Author: hisense.wuhongjian
* @Date: 2020-07-07 16:03:23
* @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-04-01 10:51:45
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-06-22 15:25:14
* @Description: 数据资源参数配置
*/
// const newLocation = 'qingdao'
// const newLocation = 'baotou'
const newLocation = 'xihaian'
const newLocation = 'qingdao'
//
const whoShow = {}

View File

@ -1,3 +1,10 @@
/*
* @Author: hisense.liangjunhua
* @Date: 2022-06-20 09:20:28
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-06-22 16:06:08
* @Description: 告诉大家这是什么
*/
import request from '@/utils/request'
//-
export function KnowledgeBaseStatic() {
@ -54,7 +61,22 @@ export function componentServiceRank(params) {
return request({
url: '/census/center/v2/componentServiceRank',
method: 'get',
params
params,
})
}
//-
export function infrastructureInfo(params) {
return request({
url: '/census/center/v2/infrastructureInfo',
method: 'get',
params,
})
}
//-
export function dataResourceInfo(params) {
return request({
url: '/census/center/v2/dataResourceInfo',
method: 'get',
params,
})
}

View File

@ -1,8 +1,8 @@
/*
* @Author: hisense.wuhongjian
* @Date: 2022-04-20 17:16:35
* @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-06-19 18:42:39
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-06-22 14:57:16
* @Description: 告诉大家这是什么
*/
import request from '@/utils/request'
@ -55,15 +55,15 @@ export function count() {
)
}
export function getVideoList(params) {
  return axios.get(
    'http://10.134.135.9:8001/hx-weather-warning/camera/getCameraListByName?name=' +
      params.name +
      '&pageNo=' +
      params.pageNo +
      '&pageSize=' +
      params.pageSize,
    config2
  )
return axios.get(
'http://10.134.135.9:8001/hx-weather-warning/camera/getCameraListByName?name=' +
params.name +
'&pageNo=' +
params.pageNo +
'&pageSize=' +
params.pageSize,
config2
)
}
// --
export function getRecord(params) {
@ -83,3 +83,13 @@ export function getRecord(params) {
config2
)
}
export function getHls(params) {
return axios.get(
'http://10.134.135.9:8001/hx-weather-warning/camera/getCameraLiveStreamByCode?cameraCode=' +
params.cameraId +
'&protocol=' +
params.protocol,
config2
)
}

View File

@ -1,8 +1,8 @@
/*
* @Author: hisense.wuhongjian
* @Date: 2022-04-01 19:19:40
* @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-05-24 19:58:09
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-06-22 15:27:36
* @Description: 告诉大家这是什么
*/
import request from '@/utils/request'
@ -282,3 +282,11 @@ export function mynoticeRead(params) {
params,
})
}
//
export function getDataResource(data) {
return request({
url: '/resource/getDataResource',
method: 'post',
data,
})
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua
* @Date: 2022-06-19 10:15:33
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-06-19 18:08:39
* @LastEditTime: 2022-06-22 16:16:37
* @Description: 告诉大家这是什么
-->
<template>
@ -37,6 +37,7 @@
<script setup>
import { ref } from 'vue'
import { count, getRecord } from '@/api/file'
import { dataResourceInfo } from '@/api/capabilityCloud'
// import { abc } from './dataABC.json'
//
const resourcesLeft = ref([
@ -148,6 +149,27 @@
}
})
//
dataResourceInfo().then((res) => {
// console.log('===================>', res.data.data)
resourcesLeft.value.forEach((val) => {
const object = res.data.data.filter((item) => item.type === val.name)[0]
if (object) {
val.num = obj.amount
}
const arr = res.data.data.filter((item) => item.resourceTop5)[0]
console.log('数据资源数据===================>', arr)
if (arr) {
assignRankings.value.map((val) => {
val.name = ''
val.operation = ''
})
arr.resourceTop5.forEach((val, index) => {
assignRankings.value[index].name = val['服务名称']
assignRankings.value[index].operation = val['申请次数']
})
}
})
})
</script>
<style lang="less" scoped>
.data-resources {

View File

@ -1,8 +1,8 @@
<!--
* @Author: hisense.liangjunhua
* @Date: 2022-06-19 10:15:33
* @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-06-21 17:14:35
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-06-22 16:04:31
* @Description: 告诉大家这是什么
-->
<template>
@ -44,6 +44,7 @@
<script setup>
import { ref } from 'vue'
import { getVideoList } from '@/api/file.js'
import { infrastructureInfo } from '@/api/capabilityCloud'
let myDataList = ref([
{
title: '视频资源数量',
@ -82,10 +83,19 @@
pageNo: 1,
pageSize: 10,
}
infrastructureInfo().then((res) => {
console.log('基础设施==================>', res.data.data)
myDataList.value.forEach((val) => {
const obj = res.data.data.filter((item) => item.type === val.title)[0]
if (obj) {
val.snum = obj.amount
}
})
})
getVideoList(params).then((res) => {
            //
            myDataList.value[1].snum = res.data.data.total
          })
//
myDataList.value[1].snum = res.data.data.total
})
</script>
<style lang="less" scoped>
.infrastructure {

View File

@ -24,10 +24,7 @@
<span>{{ item.name }}</span>
</div>
</div>
<div
v-show="Cardsname !== '基础设施' && Cardsname !== '数据资源'"
class="resultListSearchInput-father"
>
<div class="resultListSearchInput-father">
<div class="resultListSearchInput-son">
模糊搜索
<a-input-search
@ -120,7 +117,7 @@
</template>
</div>
<searchResultList
v-show="resourceList.data?.length > 0 && Cardsname !== '基础设施'"
v-show="resourceList.data?.length > 0"
:key="listKey2"
:resourceList="resourceList"
:resourceTotal="resourceTotal"
@ -128,7 +125,7 @@
/>
<div class="pagination">
<a-pagination
v-if="resourceList.data?.length > 0 && Cardsname !== '基础设施'"
v-if="resourceList.data?.length > 0"
v-model:current="currentPage"
v-model:pageSize="currentPageSize"
show-size-changer
@ -140,174 +137,10 @@
@showSizeChange="onShowSizeChange"
/>
</div>
<div class="jichusheshi" v-if="Cardsname == '基础设施'">
<!-- <div class="yunziyuan">
<div class="yunziyuan-title">
<div class="tupian"></div>
<div class="title" @click="dianjitiaozhaun('青岛市云资源管理平台')">
青岛市云资源管理平台
</div>
</div>
<div class="fenlei">
<div>可用资源情况</div>
<div>更新时间2020-10-29</div>
</div>
<div class="keyongziyuan">
<div v-for="item in keyongziyuanqingkaung" :key="item">
<div>{{ item.name }}</div>
<div>{{ item.value }}</div>
</div>
</div>
<div class="shuoming">
说明政务云资源目前通过青岛市云资源管理平台进行申请
</div>
</div> -->
<!-- <div class="shipin">
<div class="shipin-title">
<div class="tupian"></div>
<div
class="title"
@click="dianjitiaozhaun('青岛市视频资源管理平台')"
>
青岛市视频资源管理平台
</div>
</div>
<div class="fenlei">
<div>
视频总数
<span class="shuzi">23</span>
万路
</div>
<div>更新时间2022-05-06</div>
</div>
<div class="top-content-father">
<div class="top-content-son">
<div class="top-content">
<span class="top-content-title" :style="{ marginRight: '.08rem' }">
标签
</span>
<div
class="leixingsumfather leixingsumfather2"
style="height: unset"
>
<div class="leixingsum" v-for="tag in bqTags" :key="tag">
<a-checkable-tag
:checked="selBqTags.indexOf(tag) > -1"
@change="(checked) => handleChangeBqTags(tag, checked)"
style="width: 1rem"
>
{{ tag }}
</a-checkable-tag>
</div>
</div>
</div>
<div class="top-content">
<span class="top-content-title" :style="{ marginRight: '.08rem' }">
在线状态
</span>
<div class="leixingsumfather leixingsumfather2">
<div class="leixingsum" v-for="tag in stateTags" :key="tag">
<a-checkable-tag
:checked="selStateTags.indexOf(tag) > -1"
@change="(checked) => handleChangeStateTag(tag, checked)"
style="width: 1rem"
>
{{ tag }}
</a-checkable-tag>
</div>
</div>
</div>
</div>
</div>
<a-input-search
v-model:value="searchValue"
placeholder="请输入关键词"
enter-button="搜索"
size="large"
@search="getAppResources"
@change="onSearch"
class="resultListSearchInput"
/>
<button class="button-reset" @click="chongzhi()">重置</button>
<div class="itemList" style="margin-top: .2rem">
<a-card :loading="loading">
<a-card-grid
style="width: 20%; text-align: center"
v-for="item in videoList.data"
:key="item.id"
>
<a-tooltip placement="topLeft">
<template #title>
<span>
{{ item.name }}
</span>
</template>
<video-camera-outlined />
{{ item.name }}
</a-tooltip>
</a-card-grid>
</a-card>
<a-pagination
v-model:current="currentPage"
pageSize="20"
:total="resourceTotal"
show-less-items
@change="pageChange"
hideOnSinglePage
/>
</div>
</div> -->
<VideoSurveillance></VideoSurveillance>
</div>
<div class="shujuziyuan" v-if="Cardsname == '数据资源'">
<div class="yunziyuan">
<div class="yunziyuan-title">
<div class="tupian"></div>
<div
class="title"
@click="dianjitiaozhaun('青岛市政务资源管理平台')"
>
青岛市政务资源管理平台{{ dataShowdev }}
</div>
</div>
<div class="keyongziyuan">
<div v-for="item in shujuziyuanqingkuang" :key="item">
<div>{{ item.name }}</div>
<div>{{ item.value }}</div>
{{ item.danwei }}
</div>
</div>
<div class="shuoming">
说明数据资源目前通过青岛市政务信息网进行申请
</div>
</div>
</div>
<div v-if="resourceList.data?.length <= 0" style="margin-top: 2rem">
<a-empty
v-if="!(Cardsname == '基础设施') && !(Cardsname == '数据资源')"
/>
<a-empty />
</div>
</div>
<!-- <div class="top" v-else-if="Cardsname == '数据资源' && dataShowbt">
<div class="top-title">
<div
v-for="item in titleName"
:key="item.name"
:class="item.name === Cardsname ? 'sel' : ''"
@click="changeCards(item.name)"
>
<span
class="photo"
:style="{
backgroundImage: `url(${item.photo}) `,
backgroundSize: 'cover',
}"
></span>
<span>{{ item.name }}</span>
</div>
</div>
<details-page-resource></details-page-resource>
</div> -->
<div class="top" v-else>
<div class="top-title">
<div
@ -485,11 +318,7 @@
<!-- 分页 -->
<div class="pagination">
<a-pagination
v-if="
resourceList.data?.length > 0 &&
Cardsname != '基础设施' &&
Cardsname != '数据资源'
"
v-if="resourceList.data?.length > 0"
v-model:current="currentPage"
v-model:pageSize="currentPageSize"
show-size-changer
@ -500,161 +329,7 @@
@change="pageChange"
@showSizeChange="onShowSizeChange"
/>
<a-pagination
v-else
v-model:current="currentPage"
v-model:pageSize="currentPageSize"
show-size-changer
show-less-items
show-quick-jumper
:total="resourceTotal"
:page-size-options="pageSizeOptions"
@change="pageChangeOther"
@showSizeChange="onShowSizeChangeOther"
/>
</div>
<!-- <div class="jichusheshi" v-if="Cardsname == '基础设施'">
<div class="yunziyuan">
<div class="yunziyuan-title">
<div class="tupian"></div>
<div class="title" @click="dianjitiaozhaun('青岛市云资源管理平台')">
青岛市云资源管理平台
</div>
</div>
<div class="fenlei">
<div>可用资源情况</div>
<div>更新时间2020-10-29</div>
</div>
<div class="keyongziyuan">
<div v-for="item in keyongziyuanqingkaung" :key="item">
<div>{{ item.name }}</div>
<div>{{ item.value }}</div>
</div>
</div>
<div class="shuoming">
说明政务云资源目前通过青岛市云资源管理平台进行申请
</div>
</div>
<div class="shipin">
<div class="shipin-title">
<div class="tupian"></div>
<div
class="title"
@click="dianjitiaozhaun('青岛市视频资源管理平台')"
>
青岛市视频资源管理平台
</div>
</div>
<div class="fenlei">
<div>
视频总数
<span class="shuzi">23</span>
万路
</div>
<div>更新时间2022-05-06</div>
</div>
<div class="top-content-father">
<div class="top-content-son">
<div class="top-content">
<span class="top-content-title" :style="{ marginRight: '8px' }">
标签
</span>
<div
class="leixingsumfather leixingsumfather2"
style="height: unset"
>
<div class="leixingsum" v-for="tag in bqTags" :key="tag">
<a-checkable-tag
:checked="selBqTags.indexOf(tag) > -1"
@change="(checked) => handleChangeBqTags(tag, checked)"
style="width: 100px"
>
{{ tag }}
</a-checkable-tag>
</div>
</div>
</div>
<div class="top-content">
<span class="top-content-title" :style="{ marginRight: '8px' }">
在线状态
</span>
<div class="leixingsumfather leixingsumfather2">
<div class="leixingsum" v-for="tag in stateTags" :key="tag">
<a-checkable-tag
:checked="selStateTags.indexOf(tag) > -1"
@change="(checked) => handleChangeStateTag(tag, checked)"
style="width: 100px"
>
{{ tag }}
</a-checkable-tag>
</div>
</div>
</div>
</div>
</div>
<a-input-search
v-model:value="searchValue"
placeholder="请输入关键词"
enter-button="搜索"
size="large"
@search="getAppResources"
@change="onSearch"
class="resultListSearchInput"
/>
<button class="button-reset" @click="chongzhi()">重置</button>
<div class="itemList" style="margin-top: 20px">
<a-card :loading="loading">
<a-card-grid
style="width: 20%; text-align: center"
v-for="item in videoList.data"
:key="item.id"
>
<a-tooltip placement="topLeft">
<template #title>
<span>
{{ item.name }}
</span>
</template>
<video-camera-outlined />
{{ item.name }}
</a-tooltip>
</a-card-grid>
</a-card>
<a-pagination
v-model:current="currentPage"
pageSize="20"
:total="resourceTotal"
show-less-items
@change="pageChange"
hideOnSinglePage
/>
</div>
</div>
<VideoSurveillance></VideoSurveillance>
</div> -->
<!-- <div class="shujuziyuan" v-if="Cardsname == '数据资源'">
<div class="yunziyuan">
<div class="yunziyuan-title">
<div class="tupian"></div>
<div
class="title"
@click="dianjitiaozhaun('青岛市政务资源管理平台')"
>
青岛市政务资源管理平台
</div>
</div>
<div class="keyongziyuan">
<div v-for="item in shujuziyuanqingkuang" :key="item">
<div>{{ item.name }}</div>
<div>{{ item.value }}</div>
{{ item.danwei }}
</div>
</div>
<div class="shuoming">
说明数据资源目前通过青岛市政务信息网进行申请
</div>
</div>
</div> -->
<div v-if="resourceList.data?.length <= 0" style="margin-top: 200px">
<a-empty />
</div>
@ -731,7 +406,7 @@
</div>
</div>
<div
v-show="Cardsname !== '基础设施' && Cardsname !== '数据资源'"
v-show="Cardsname !== '数据资源'"
class="resultListSearchInput-father"
>
<div class="resultListSearchInput-son">
@ -826,7 +501,7 @@
</template>
</div>
<searchResultList
v-show="resourceList.data?.length > 0 && Cardsname !== '基础设施'"
v-show="resourceList.data?.length"
:key="listKey2"
:resourceList="resourceList"
:resourceTotal="resourceTotal"
@ -834,7 +509,7 @@
/>
<div class="pagination">
<a-pagination
v-if="resourceList.data?.length > 0 && Cardsname !== '基础设施'"
v-if="resourceList.data?.length > 0"
v-model:current="currentPage"
v-model:pageSize="currentPageSize"
show-size-changer
@ -846,125 +521,6 @@
@showSizeChange="onShowSizeChange"
/>
</div>
<div class="jichusheshi" v-if="Cardsname == '基础设施'">
<!-- <div class="yunziyuan">
<div class="yunziyuan-title">
<div class="tupian"></div>
<div class="title" @click="dianjitiaozhaun('青岛市云资源管理平台')">
青岛市云资源管理平台
</div>
</div>
<div class="fenlei">
<div>可用资源情况</div>
<div>更新时间2020-10-29</div>
</div>
<div class="keyongziyuan">
<div v-for="item in keyongziyuanqingkaung" :key="item">
<div>{{ item.name }}</div>
<div>{{ item.value }}</div>
</div>
</div>
<div class="shuoming">
说明政务云资源目前通过青岛市云资源管理平台进行申请
</div>
</div> -->
<!-- <div class="shipin">
<div class="shipin-title">
<div class="tupian"></div>
<div
class="title"
@click="dianjitiaozhaun('青岛市视频资源管理平台')"
>
青岛市视频资源管理平台
</div>
</div>
<div class="fenlei">
<div>
视频总数
<span class="shuzi">23</span>
万路
</div>
<div>更新时间2022-05-06</div>
</div>
<div class="top-content-father">
<div class="top-content-son">
<div class="top-content">
<span class="top-content-title" :style="{ marginRight: '.08rem' }">
标签
</span>
<div
class="leixingsumfather leixingsumfather2"
style="height: unset"
>
<div class="leixingsum" v-for="tag in bqTags" :key="tag">
<a-checkable-tag
:checked="selBqTags.indexOf(tag) > -1"
@change="(checked) => handleChangeBqTags(tag, checked)"
style="width: 1rem"
>
{{ tag }}
</a-checkable-tag>
</div>
</div>
</div>
<div class="top-content">
<span class="top-content-title" :style="{ marginRight: '.08rem' }">
在线状态
</span>
<div class="leixingsumfather leixingsumfather2">
<div class="leixingsum" v-for="tag in stateTags" :key="tag">
<a-checkable-tag
:checked="selStateTags.indexOf(tag) > -1"
@change="(checked) => handleChangeStateTag(tag, checked)"
style="width: 1rem"
>
{{ tag }}
</a-checkable-tag>
</div>
</div>
</div>
</div>
</div>
<a-input-search
v-model:value="searchValue"
placeholder="请输入关键词"
enter-button="搜索"
size="large"
@search="getAppResources"
@change="onSearch"
class="resultListSearchInput"
/>
<button class="button-reset" @click="chongzhi()">重置</button>
<div class="itemList" style="margin-top: .2rem">
<a-card :loading="loading">
<a-card-grid
style="width: 20%; text-align: center"
v-for="item in videoList.data"
:key="item.id"
>
<a-tooltip placement="topLeft">
<template #title>
<span>
{{ item.name }}
</span>
</template>
<video-camera-outlined />
{{ item.name }}
</a-tooltip>
</a-card-grid>
</a-card>
<a-pagination
v-model:current="currentPage"
pageSize="20"
:total="resourceTotal"
show-less-items
@change="pageChange"
hideOnSinglePage
/>
</div>
</div> -->
<VideoSurveillance></VideoSurveillance>
</div>
<div class="shujuziyuan" v-if="Cardsname == '数据资源'">
<div class="yunziyuan">
<div class="yunziyuan-title">
@ -990,9 +546,7 @@
</div>
-->
<div v-if="resourceList.data?.length <= 0" style="margin-top: 2rem">
<a-empty
v-if="!(Cardsname == '基础设施') && !(Cardsname == '数据资源')"
/>
<a-empty v-if="!(Cardsname == '数据资源')" />
</div>
</div>
<div class="top" v-else-if="Cardsname == '数据资源'">
@ -1079,7 +633,12 @@
DownOutlined,
// VideoCameraOutlined,
} from '@ant-design/icons-vue'
import { selectDicStoreAll, pageWithAttrs, zywMessage } from '@/api/home.js'
import {
selectDicStoreAll,
pageWithAttrs,
zywMessage,
getDataResource,
} from '@/api/home.js'
import { getSgcList } from '@/api/personalCenter'
import { useRouter } from 'vue-router'
// import { useStore } from 'vuex'
@ -1428,19 +987,6 @@
// debugger
tecHnosphere = router.currentRoute.value.query.tecHnosphere
appLiCation = router.currentRoute.value.query.appLiCation
// if (!appLiCation && !tecHnosphere) {
// ListContent.records[0].selectedTags = []
// ListContent.records[1].selectedTags = []
// ListContent.records = []
// ListContent.records = data
// paramsGetResources.infoList = []
// // debugger
// // pageWithAttrs(paramsGetResources).then((res) => {
// // resourceList.data = []
// // resourceList.data = res.data.data.records
// // resourceTotal.value = res.data.data.total
// // })
// }
if (val.typeList?.length > 6) {
val.showShrink = true
val.shrinkFlag = true
@ -1461,13 +1007,56 @@
const getAppResources = () => {
paramsGetResources.name = searchValue.value
paramsGetResources.type = Cardsname.value
console.log(
'执行getAppResources====================》',
paramsGetResources
)
if (
!whoShow1.value.itShowBaoTou &&
paramsGetResources.type === '数据资源'
) {
getDataResource({
serviceName: paramsGetResources.name, //
orderField: paramsGetResources.orderField, //
orderType: paramsGetResources.orderType.toLowerCase(), //descasc
pageNum: paramsGetResources.pageNum, //
pageSize: paramsGetResources.pageSize, //
}).then((res) => {
console.log('数据资源==================>', res.data.data)
if (whoShow1.value.itShowQingDao) {
res.data.data.list.forEach((val) => {
val.id = val.serviceId // id
val.name = val.serviceName //
val.sjlCount = val.requestQuantity //
val.applyCount = val.requestCount //
val.deptName = val.departmentName //
val.createTime = val.createTime.split('.')[0]
val.createDate = val.createTime //
})
resourceList.data = res.data.data.list || []
resourceTotal.value = res.data.data.total || ''
loading.value = false
} else if (whoShow1.value.itShowXiHaiAn) {
res.data.data.data.forEach((val) => {
val.id = val.guid // id
val.name = val.zyname //
val.sjlCount = val.sjcczl //
val.applyCount = val.ygxdsjccl //
val.deptName = val.TGBM //
})
resourceList.data = res.data.data.data || []
resourceTotal.value = res.data.data.rows || ''
loading.value = false
}
})
} else if (paramsGetResources.type !== '数据资源') {
pageWithAttrs(paramsGetResources).then((res) => {
console.log('查询列表============>', resourceList, res.data.data)
resourceList.data = []
videoList.data = []
if (Cardsname.value === '基础设施') {
console.log('基础设施~~~~~~~~~~~')
videoList.data = res.data.data.records || []
resourceList.data = res.data.data.records || []
resourceTotal.value = res.data.data.total || ''
loading.value = false
} else {
@ -1482,6 +1071,7 @@
}
})
}
}
let shoppingCartList = ref([])
//
const getShoppingCartList = (list) => {
@ -1581,6 +1171,7 @@
currentPageSize.value = pageSize
paramsGetResources.pageNum = current
paramsGetResources.pageSize = pageSize
console.log('执行onShowSizeChange', paramsGetResources)
getAppResources()
console.log(current, pageSize)
}

View File

@ -15,6 +15,7 @@
v-for="item in selList"
:key="item.value"
@click="changeCondition(item.value)"
v-show="item.show"
>
{{ item.name }}
<span
@ -40,7 +41,9 @@
? 'znsf'
: 'gis'
"
v-if="selectCardsname !== '基础设施'"
></div>
<div class="left jcss" v-else></div>
<div class="right">
<div class="header">
<span style="display: flex; align-items: center">
@ -78,7 +81,14 @@
<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>
更新时间
@ -87,19 +97,32 @@
</div>
</div>
<div class="dec">
<div>
<div
v-if="
selectCardsname !== '基础设施' && selectCardsname !== '数据资源'
"
>
<span>{{ item.shareType || '--' }}</span>
</div>
<div>
<span>{{ item.deptName || '--' }}</span>
</div>
<div>{{ item.description || '--' }}</div>
<div v-if="selectCardsname !== '基础设施'">
{{ item.description || '--' }}
</div>
<div class="bottom">
</div>
<div class="bottom" v-if="selectCardsname !== '基础设施'">
<div>
<div>浏览量{{ item.visits || 0 }}</div>
<div v-if="selectCardsname !== '数据资源'">
浏览量{{ item.visits || 0 }}
</div>
<div>申请量{{ item.applyCount || 0 }}</div>
<div>收藏量{{ item.collectCount || 0 }}</div>
<div v-if="selectCardsname === '数据资源'">
数据量{{ item.sjlCount || 0 }}
</div>
<div v-if="selectCardsname !== '数据资源'">
收藏量{{ item.collectCount || 0 }}
</div>
</div>
<div class="pingfen">
<a-tooltip placement="top" mouseEnterDelay="1">
@ -115,7 +138,7 @@
</div>
</div>
<div class="btn">
<div class="right">
<div class="right" v-if="selectCardsname !== '基础设施'">
<div class="shopping" :key="shoppingKey">
<span class="shopping-down" v-if="item.isInShoppingCart"></span>
<span
@ -154,20 +177,39 @@
}}
</a-button>
</div>
<div class="right" v-else>
<a-button type="primary" @click="openVideo(item)">
视频预览
</a-button>
</div>
</div>
</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 { scInsert, scDel } from '@/api/personalCenter'
import mybus from '@/myplugins/mybus'
import { getHls } from '@/api/file.js'
export default {
name: '',
@ -274,12 +316,19 @@
let shoppingKey = ref(1)
// id
const selList = ref([
{ name: '发布时间', value: 'tdr.create_date' },
{ name: '浏览量', value: 'visits' },
{ name: '申请量', value: 'applyCount' },
{ name: '收藏量', value: 'collectCount' },
{ name: '评分', value: 'score' },
{ name: '发布时间', value: 'tdr.create_date', show: true },
{ name: '浏览量', value: 'visits', show: true },
{ name: '申请量', value: 'applyCount', show: true },
{ name: '收藏量', value: 'collectCount', show: true },
{ name: '评分', value: 'score', show: true },
])
if (props.selectCardsname === '基础设施') {
selList.value.map((val) => (val.show = false))
} else if (props.selectCardsname === '数据资源') {
selList.value.map(
(val) => (val.show = val.name === '发布时间' || val.name === '申请量')
)
}
const findComponentName = (list, name) => {
if (list.infoList) {
return list.infoList.find((item) => {
@ -395,6 +444,49 @@
mybus.on('chongzhi', () => {
selData.value = 'total'
})
let videoUrl = ref('')
const options = reactive({
width: '700px', //
height: '400px', //
color: '#409eff', //
title: '', //
src: '', //
type: 'm3u8', //
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',
], //,
})
let visible = ref(false)
//
const openVideo = (item) => {
videoUrl.value = ''
const param = {
cameraId: item.link,
protocol: 'hls',
}
getHls(param).then((res) => {
console.log('获取视频地址===============>', res)
// videoUrl.value = res.data.data
options.src = res.data.data
visible.value = true
})
}
return {
onSearch,
resultList,
@ -407,6 +499,10 @@
cardType,
findComponentName,
shoppingKey,
openVideo,
videoUrl,
options,
visible,
}
},
beforeUnmount() {
@ -522,6 +618,10 @@
background: url('~@/assets/home/gis-bg.png') no-repeat;
background-size: 120px 110px;
}
.jcss {
background: url('~@/assets/home/jcss-bg.png') no-repeat;
background-size: 100%;
}
.header {
display: flex;
justify-content: space-between;