测试问题修复

This commit is contained in:
wuhongjian 2022-10-27 15:48:24 +08:00
parent 5132d3ec60
commit 09d56091fa
4 changed files with 640 additions and 557 deletions

View File

@ -2,7 +2,7 @@
* @Author: hisense.wuhongjian
* @Date: 2022-04-20 17:16:35
* @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-08-25 14:13:30
* @LastEditTime: 2022-10-26 17:57:52
* @Description: 告诉大家这是什么
*/
import request from '@/utils/request'
@ -99,14 +99,37 @@ export function getHls(params) {
}
// 西-- (10.134.135.92:9537)
let _cameraUrl = _global && _global.config && _global.config.camreaInfo && _global.config.camreaInfo.cameraUrl || '10.134.135.92:9537';
let _cameraUrl =
(_global &&
_global.config &&
_global.config.camreaInfo &&
_global.config.camreaInfo.cameraUrl) ||
'10.134.135.92:9537'
//-
export function getCameraInfoByAreaId(params) {
return axios.get(`http://${_cameraUrl}/data_service/getCamera/getCameraInfoByAreaId?areaId=${params.areaId}`,
return axios.get(
`http://${_cameraUrl}/data_service/getCamera/getCameraInfoByAreaId?areaId=${params.areaId}`,
config2
)
}
//-
export function getCameraByCondition(params) {
return axios.post(`http://${_cameraUrl}/data_service/getCamera/getCameraByCondition`, params, config2)
return axios.post(
`http://${_cameraUrl}/data_service/getCamera/getCameraByCondition`,
params,
config2
)
}
export function initiateMeet(data) {
// return request({
// url: '/enke/initiateMeet',
// method: 'post',
// data: data,
// })
return axios.post(
'http://10.134.135.92:8888/renren-admin/enke/initiateMeet',
data,
config2
)
}

View File

@ -776,7 +776,8 @@
defineExpose,
computed,
} from 'vue'
import { getUser, initiateMeet, getEnkeUsers } from '@/api/home'
import { getUser, getEnkeUsers } from '@/api/home'
import { initiateMeet } from '@/api/file'
import {
getCameraByParentId,
getStreamByChannelCode,

View File

@ -1,8 +1,8 @@
<!--
* @Author: hisense.liangjunhua
* @Date: 2022-07-12 09:42:44
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-08-04 10:41:06
* @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-10-26 18:15:01
* @Description:我的申请 能力申请 查看详情
-->
<template>
@ -52,18 +52,31 @@
<span class="img"></span>
<span>{{ item.name }}</span>
</div>
<div style="
<div
style="
display: flex;
justify-content: space-between;
align-items: center;
">
"
>
<div class="oddNumbers">子单号{{ item.instanceId }}</div>
<div style="display: flex; align-items: center">
<a-button type="primary" @click="modify(props.refObj.id, item)" v-if="item.backToFirst">
<a-button
type="primary"
@click="modify(props.refObj.id, item)"
v-if="item.backToFirst"
>
修改
</a-button>
<a-popconfirm class="aaa" v-if="!item.ended" title="是否撤回此流程?" ok-text="" cancel-text=""
@confirm="endThis(item.instanceId)" @cancel="cancel">
<a-popconfirm
class="aaa"
v-if="!item.ended"
title="是否撤回此流程?"
ok-text="是"
cancel-text="否"
@confirm="endThis(item.instanceId)"
@cancel="cancel"
>
<a-button type="primary" danger style="margin-left: 10px">
撤回申请
</a-button>
@ -72,9 +85,15 @@
</div>
<div class="box" v-if="item.list.length > 0">
<div class="ability" v-for="val in item.list" :key="val.id"
:class="item.approveStatus === '通过' ? 'clickCursor' : ''">
<div class="left" :class="
<div
class="ability"
v-for="val in item.list"
:key="val.id"
:class="item.approveStatus === '通过' ? 'clickCursor' : ''"
>
<div
class="left"
:class="
val.type == '应用资源'
? 'yyzy'
: val.infoList.filter(
@ -94,7 +113,8 @@
)[0].attrValue == '业务组件'
? 'ywzj'
: 'yyzy'
"></div>
"
></div>
<div class="right">
<div class="ability-top">
<div class="name">
@ -134,15 +154,23 @@
申请结果{{
item.ended ? item.approveStatus || '审核完成' : '审核中'
}}
<a-button v-if="
<a-button
v-if="
item.approveStatus === '通过' &&
val.infoList.filter(
(item) => item.attrType == '上传附件'
)[0]
" @click.stop="downloadFile(item, '附件下载')" class="DownloadAttachment">
"
@click.stop="downloadFile(item, '附件下载')"
class="DownloadAttachment"
>
附件下载
</a-button>
<a-button type="primary" v-if="item.approveStatus === '通过'" @click.stop="switchFunction(item)">
<a-button
type="primary"
v-if="item.approveStatus === '通过'"
@click.stop="switchFunction(item)"
>
查看详情
</a-button>
</div>
@ -160,31 +188,49 @@
<span class="type">基础设施</span>
</div>
<div>
<a-button type="primary" v-if="item.approveStatus == '通过' && whoShow1.itShowXiHaiAn"
@click.stop="openVideo(val)">
<a-button
type="primary"
v-if="
item.approveStatus == '通过' && whoShow1.itShowXiHaiAn
"
@click.stop="openVideo(val)"
>
视频预览
</a-button>
<div class="channelName" style="color:#ff7875" v-if="whoShow1.itShowXiHaiAn && item.ended">该流程已终止
</div>
<!-- <div class="channelName" style="color:#ff7875" v-if="whoShow1.itShowXiHaiAn && item.ended">该流程已终止
</div> -->
</div>
</div>
<div class="ability-bottom">
<div class="dec2">位置{{ val.nodeName }}</div>
<div class="result" v-if="item.approveStatus == '通过'">
申请结果
<span>列表地址</span><span style="cursor: pointer;" @click="openView(backUrl +
'resource/getApplyCameraList/' +
item.instanceId)">{{
<span>列表地址</span>
<span
style="cursor: pointer"
@click="
openView(
backUrl +
'resource/getApplyCameraList/' +
item.instanceId }}</span>
item.instanceId
)
"
>
{{
backUrl + 'resource/getApplyCameraList/' + item.instanceId
}}
</span>
<span>视频流地址</span>
<span style="cursor: pointer" @click="openView(backUrl +
'resource/hls/getHls/?key=' +
val.channelId)">{{
backUrl +
'resource/hls/getHls/?key=' +
val.channelId}}</span>
<span
style="cursor: pointer"
@click="
openView(
backUrl + 'resource/hls/getHls/?key=' + val.channelId
)
"
>
{{ backUrl + 'resource/hls/getHls/?key=' + val.channelId }}
</span>
</div>
</div>
</div>
@ -194,42 +240,51 @@
</div>
<!-- 单个预览弹窗 -->
<a-modal wrapClassName="single-preview-modal" v-model:visible="visible" title="视频预览" :width="960" destroyOnClose>
<a-modal
wrapClassName="single-preview-modal"
v-model:visible="visible"
title="视频预览"
:width="960"
destroyOnClose
>
<template #footer></template>
<div style="width: 100%; display: flex; justify-content: center">
<div style="width: 100%; height: 100%;position: relative">
<div style="width: 100%; height: 100%; position: relative">
<!-- 预览视频--遮罩 -->
<div class="waterMark waterMark-left-top">{{userInfo.usernameShow}}</div>
<div class="waterMark waterMark-right-top">{{userInfo.realNameShow}}</div>
<div class="waterMark waterMark-left-bottom">{{userInfo.usernameShow}}</div>
<div class="waterMark waterMark-right-bottom">{{userInfo.realNameShow}}</div>
<div class="waterMark waterMark-left-top">
{{ userInfo.usernameShow }}
</div>
<div class="waterMark waterMark-right-top">
{{ userInfo.realNameShow }}
</div>
<div class="waterMark waterMark-left-bottom">
{{ userInfo.usernameShow }}
</div>
<div class="waterMark waterMark-right-bottom">
{{ userInfo.realNameShow }}
</div>
<vue3VideoPlay v-bind="options" />
</div>
</div>
</a-modal>
</div>
</template>
<script setup>
import { ref, defineProps, reactive, onMounted } from 'vue'
import mybus from '@/myplugins/mybus'
import { message } from 'ant-design-vue'
import { endProcess, getApplyForm } from '@/api/personalCenter.js'
import { useRouter } from 'vue-router'
import {
getStreamByChannelCode,
} from '@/api/videoSurveillance'
import {
getUser,
} from '@/api/home'
const router = useRouter()
const backUrl = ref(window.SITE_CONFIG.apiURL + '/')
const props = defineProps({
import { ref, defineProps, reactive, onMounted } from 'vue'
import mybus from '@/myplugins/mybus'
import { message } from 'ant-design-vue'
import { endProcess, getApplyForm } from '@/api/personalCenter.js'
import { useRouter } from 'vue-router'
import { getStreamByChannelCode } from '@/api/videoSurveillance'
import { getUser } from '@/api/home'
const router = useRouter()
const backUrl = ref(window.SITE_CONFIG.apiURL + '/')
const props = defineProps({
refObj: { type: Object, default: null },
})
const whoShow1 = ref(whoShow)
let visible = ref(false)
const options = reactive({
})
const whoShow1 = ref(whoShow)
let visible = ref(false)
const options = reactive({
width: '912px', //
height: '513px', //
color: '#409eff', //
@ -255,26 +310,26 @@ const options = reactive({
'pageFullScreen',
'fullScreen',
], //,
})
})
const dept = reactive({})
// eslint-disable-next-line no-undef
if (infrastructure) {
const dept = reactive({})
// eslint-disable-next-line no-undef
if (infrastructure) {
// eslint-disable-next-line no-undef
dept.deptId = infrastructure.deptId
// eslint-disable-next-line no-undef
dept.deptName = infrastructure.deptName
}
const showThis = () => {
}
const showThis = () => {
window.open(
window.SITE_CONFIG.previewUrl +
'hisense_office/onlinePreview?url=' +
btoa(encodeURI(props.refObj.enclosure))
)
}
const showArr = ref([])
console.log(props.refObj, '=====================================')
const endThis = (instanceId) => {
}
const showArr = ref([])
console.log(props.refObj, '=====================================')
const endThis = (instanceId) => {
endProcess({ instanceId: instanceId }).then((res) => {
if (res.data.code == 0) {
message.success('撤回申请成功!')
@ -283,8 +338,8 @@ const endThis = (instanceId) => {
message.warning('撤回申请失败!')
}
})
}
const modify = (id, item) => {
}
const modify = (id, item) => {
getApplyForm(id).then((res) => {
console.log('修改==============>', res.data.data, item)
if (item.list.length > 0) {
@ -347,8 +402,8 @@ const modify = (id, item) => {
})
}
})
}
if (props.refObj.resourceApplication) {
}
if (props.refObj.resourceApplication) {
showArr.value = []
for (const key in props.refObj.resourceApplication) {
if (props.refObj.resourceApplication[key].length > 0) {
@ -372,8 +427,8 @@ if (props.refObj.resourceApplication) {
showArr.value.push(obj)
}
}
}
const switchFunction = (data) => {
}
const switchFunction = (data) => {
if (data.approveStatus === '通过') {
let id = data.list[0].id
const applypage = router.resolve({
@ -384,8 +439,8 @@ const switchFunction = (data) => {
})
window.open(applypage.href, '_blank')
}
}
const downloadFile = (data, name) => {
}
const downloadFile = (data, name) => {
let path = data.list[0].infoList.filter(
(item) => item.attrType === '上传附件'
)[0].attrValue
@ -414,10 +469,10 @@ const downloadFile = (data, name) => {
URL.revokeObjectURL(url)
}
}
}
}
//
const openVideo = (item) => {
//
const openVideo = (item) => {
console.log('打开视频', item)
if (item && item.status != 1) {
return message.error('当前视频离线不可预览!')
@ -425,67 +480,73 @@ const openVideo = (item) => {
const param = {
key: item.cameraId,
}
getStreamByChannelCode(param).then((res) => {
console.log('视频预览------------>', res);
getStreamByChannelCode(param)
.then((res) => {
console.log('视频预览------------>', res)
console.log(res)
visible.value = true
options.src = res.data.data || ''
}).catch(err => {
})
.catch((err) => {
message.error(err)
})
// --
// visible.value = true
// options.src = 'http://playertest.longtailvideo.com/adaptive/bipbop/gear4/prog_index.m3u8'
}
}
onMounted(() => {
onMounted(() => {
handleUser()
})
})
//
const userInfo = ref(null)
const handleUser = () => {
getUser().then(res => {
console.log('res-----获取用户信息------->', res);
//
const userInfo = ref(null)
const handleUser = () => {
getUser()
.then((res) => {
console.log('res-----获取用户信息------->', res)
if (res.data.code != 0) {
return message.warning(res.data.msg)
}
userInfo.value = res.data.data || {}
userInfo.value.usernameShow = '西海岸能力超市' + (userInfo.value.deptName || '') + (userInfo.value.username || '');
userInfo.value.realNameShow = '西海岸能力超市' + (userInfo.value.deptName || '') + (userInfo.value.realName || '');
}).catch(err => {
userInfo.value.usernameShow =
'西海岸能力超市' +
(userInfo.value.deptName || '') +
(userInfo.value.username || '')
userInfo.value.realNameShow =
'西海岸能力超市' +
(userInfo.value.deptName || '') +
(userInfo.value.realName || '')
})
.catch((err) => {
message.warning(err)
})
}
}
const openView = (url) => {
const openView = (url) => {
window.open(url, '_blank')
}
}
</script>
<style lang="less" scoped>
.aaa{
.aaa {
margin-right: 30px;
}
}
:deep(.ant-popover-inner) {
position: fixed !important;
margin-right: 100px;
}
.title {
.title {
font-size: 0.18rem;
color: #000;
font-weight: bold;
margin-bottom: 0.2rem;
padding-left: 0.1rem;
border-left: 0.06rem #0058e1 solid;
}
}
.top {
.top {
margin-bottom: 0.1rem;
.main {
@ -496,7 +557,7 @@ const openView = (url) => {
display: flex;
justify-content: space-between;
&>span {
& > span {
width: 100%;
}
@ -521,9 +582,9 @@ const openView = (url) => {
}
}
}
}
}
.bottom {
.bottom {
.main {
.item {
border-top: 1px #eee solid;
@ -698,9 +759,9 @@ const openView = (url) => {
}
}
}
}
}
.single-preview-modal {
.single-preview-modal {
.ant-modal-header {
background: url(~@/assets/home/video-background.png) no-repeat;
background-size: cover;
@ -715,38 +776,37 @@ const openView = (url) => {
.anticon {
color: #ffffff;
}
}
}
//
.waterMark-left-top {
//
.waterMark-left-top {
left: 50px;
top: 100px;
text-align: left;
}
}
//
.waterMark-right-top {
//
.waterMark-right-top {
right: 50px;
top: 100px;
text-align: right;
}
}
//
.waterMark-left-bottom {
//
.waterMark-left-bottom {
left: 50px;
bottom: 100px;
text-align: left;
}
}
//
.waterMark-right-bottom {
//
.waterMark-right-bottom {
right: 50px;
bottom: 100px;
text-align: right;
}
}
.waterMark {
.waterMark {
position: absolute;
z-index: 99999999;
color: #0058e1;
@ -755,6 +815,5 @@ const openView = (url) => {
opacity: 0.4;
transform: rotate(-25deg);
width: 470px;
}
}
</style>