测试问题修复

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 * @Author: hisense.wuhongjian
* @Date: 2022-04-20 17:16:35 * @Date: 2022-04-20 17:16:35
* @LastEditors: hisense.wuhongjian * @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-08-25 14:13:30 * @LastEditTime: 2022-10-26 17:57:52
* @Description: 告诉大家这是什么 * @Description: 告诉大家这是什么
*/ */
import request from '@/utils/request' import request from '@/utils/request'
@ -99,14 +99,37 @@ export function getHls(params) {
} }
// 西-- (10.134.135.92:9537) // 西-- (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) { 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 config2
) )
} }
//- //-
export function getCameraByCondition(params) { 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, defineExpose,
computed, computed,
} from 'vue' } from 'vue'
import { getUser, initiateMeet, getEnkeUsers } from '@/api/home' import { getUser, getEnkeUsers } from '@/api/home'
import { initiateMeet } from '@/api/file'
import { import {
getCameraByParentId, getCameraByParentId,
getStreamByChannelCode, getStreamByChannelCode,

View File

@ -1,8 +1,8 @@
<!-- <!--
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-07-12 09:42:44 * @Date: 2022-07-12 09:42:44
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-08-04 10:41:06 * @LastEditTime: 2022-10-26 18:15:01
* @Description:我的申请 能力申请 查看详情 * @Description:我的申请 能力申请 查看详情
--> -->
<template> <template>
@ -52,18 +52,31 @@
<span class="img"></span> <span class="img"></span>
<span>{{ item.name }}</span> <span>{{ item.name }}</span>
</div> </div>
<div style=" <div
style="
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
"> "
>
<div class="oddNumbers">子单号{{ item.instanceId }}</div> <div class="oddNumbers">子单号{{ item.instanceId }}</div>
<div style="display: flex; align-items: center"> <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-button>
<a-popconfirm class="aaa" v-if="!item.ended" title="是否撤回此流程?" ok-text="" cancel-text="" <a-popconfirm
@confirm="endThis(item.instanceId)" @cancel="cancel"> 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 type="primary" danger style="margin-left: 10px">
撤回申请 撤回申请
</a-button> </a-button>
@ -72,9 +85,15 @@
</div> </div>
<div class="box" v-if="item.list.length > 0"> <div class="box" v-if="item.list.length > 0">
<div class="ability" v-for="val in item.list" :key="val.id" <div
:class="item.approveStatus === '通过' ? 'clickCursor' : ''"> class="ability"
<div class="left" :class=" v-for="val in item.list"
:key="val.id"
:class="item.approveStatus === '通过' ? 'clickCursor' : ''"
>
<div
class="left"
:class="
val.type == '应用资源' val.type == '应用资源'
? 'yyzy' ? 'yyzy'
: val.infoList.filter( : val.infoList.filter(
@ -94,7 +113,8 @@
)[0].attrValue == '业务组件' )[0].attrValue == '业务组件'
? 'ywzj' ? 'ywzj'
: 'yyzy' : 'yyzy'
"></div> "
></div>
<div class="right"> <div class="right">
<div class="ability-top"> <div class="ability-top">
<div class="name"> <div class="name">
@ -134,15 +154,23 @@
申请结果{{ 申请结果{{
item.ended ? item.approveStatus || '审核完成' : '审核中' item.ended ? item.approveStatus || '审核完成' : '审核中'
}} }}
<a-button v-if=" <a-button
v-if="
item.approveStatus === '通过' && item.approveStatus === '通过' &&
val.infoList.filter( val.infoList.filter(
(item) => item.attrType == '上传附件' (item) => item.attrType == '上传附件'
)[0] )[0]
" @click.stop="downloadFile(item, '附件下载')" class="DownloadAttachment"> "
@click.stop="downloadFile(item, '附件下载')"
class="DownloadAttachment"
>
附件下载 附件下载
</a-button> </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> </a-button>
</div> </div>
@ -160,31 +188,49 @@
<span class="type">基础设施</span> <span class="type">基础设施</span>
</div> </div>
<div> <div>
<a-button type="primary" v-if="item.approveStatus == '通过' && whoShow1.itShowXiHaiAn" <a-button
@click.stop="openVideo(val)"> type="primary"
v-if="
item.approveStatus == '通过' && whoShow1.itShowXiHaiAn
"
@click.stop="openVideo(val)"
>
视频预览 视频预览
</a-button> </a-button>
<div class="channelName" style="color:#ff7875" v-if="whoShow1.itShowXiHaiAn && item.ended">该流程已终止 <!-- <div class="channelName" style="color:#ff7875" v-if="whoShow1.itShowXiHaiAn && item.ended">该流程已终止
</div> </div> -->
</div> </div>
</div> </div>
<div class="ability-bottom"> <div class="ability-bottom">
<div class="dec2">位置{{ val.nodeName }}</div> <div class="dec2">位置{{ val.nodeName }}</div>
<div class="result" v-if="item.approveStatus == '通过'"> <div class="result" v-if="item.approveStatus == '通过'">
申请结果 申请结果
<span>列表地址</span><span style="cursor: pointer;" @click="openView(backUrl + <span>列表地址</span>
'resource/getApplyCameraList/' + <span
item.instanceId)">{{ style="cursor: pointer"
@click="
openView(
backUrl + backUrl +
'resource/getApplyCameraList/' + 'resource/getApplyCameraList/' +
item.instanceId }}</span> item.instanceId
)
"
>
{{
backUrl + 'resource/getApplyCameraList/' + item.instanceId
}}
</span>
<span>视频流地址</span> <span>视频流地址</span>
<span style="cursor: pointer" @click="openView(backUrl + <span
'resource/hls/getHls/?key=' + style="cursor: pointer"
val.channelId)">{{ @click="
backUrl + openView(
'resource/hls/getHls/?key=' + backUrl + 'resource/hls/getHls/?key=' + val.channelId
val.channelId}}</span> )
"
>
{{ backUrl + 'resource/hls/getHls/?key=' + val.channelId }}
</span>
</div> </div>
</div> </div>
</div> </div>
@ -194,20 +240,33 @@
</div> </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> <template #footer></template>
<div style="width: 100%; display: flex; justify-content: center"> <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-left-top">
<div class="waterMark waterMark-right-top">{{userInfo.realNameShow}}</div> {{ userInfo.usernameShow }}
<div class="waterMark waterMark-left-bottom">{{userInfo.usernameShow}}</div> </div>
<div class="waterMark waterMark-right-bottom">{{userInfo.realNameShow}}</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" /> <vue3VideoPlay v-bind="options" />
</div> </div>
</div> </div>
</a-modal> </a-modal>
</div> </div>
</template> </template>
<script setup> <script setup>
@ -216,12 +275,8 @@ import mybus from '@/myplugins/mybus'
import { message } from 'ant-design-vue' import { message } from 'ant-design-vue'
import { endProcess, getApplyForm } from '@/api/personalCenter.js' import { endProcess, getApplyForm } from '@/api/personalCenter.js'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import { import { getStreamByChannelCode } from '@/api/videoSurveillance'
getStreamByChannelCode, import { getUser } from '@/api/home'
} from '@/api/videoSurveillance'
import {
getUser,
} from '@/api/home'
const router = useRouter() const router = useRouter()
const backUrl = ref(window.SITE_CONFIG.apiURL + '/') const backUrl = ref(window.SITE_CONFIG.apiURL + '/')
const props = defineProps({ const props = defineProps({
@ -425,12 +480,14 @@ const openVideo = (item) => {
const param = { const param = {
key: item.cameraId, key: item.cameraId,
} }
getStreamByChannelCode(param).then((res) => { getStreamByChannelCode(param)
console.log('视频预览------------>', res); .then((res) => {
console.log('视频预览------------>', res)
console.log(res) console.log(res)
visible.value = true visible.value = true
options.src = res.data.data || '' options.src = res.data.data || ''
}).catch(err => { })
.catch((err) => {
message.error(err) message.error(err)
}) })
// -- // --
@ -445,15 +502,23 @@ onMounted(() => {
// //
const userInfo = ref(null) const userInfo = ref(null)
const handleUser = () => { const handleUser = () => {
getUser().then(res => { getUser()
console.log('res-----获取用户信息------->', res); .then((res) => {
console.log('res-----获取用户信息------->', res)
if (res.data.code != 0) { if (res.data.code != 0) {
return message.warning(res.data.msg) return message.warning(res.data.msg)
} }
userInfo.value = res.data.data || {} userInfo.value = res.data.data || {}
userInfo.value.usernameShow = '西海岸能力超市' + (userInfo.value.deptName || '') + (userInfo.value.username || ''); userInfo.value.usernameShow =
userInfo.value.realNameShow = '西海岸能力超市' + (userInfo.value.deptName || '') + (userInfo.value.realName || ''); '西海岸能力超市' +
}).catch(err => { (userInfo.value.deptName || '') +
(userInfo.value.username || '')
userInfo.value.realNameShow =
'西海岸能力超市' +
(userInfo.value.deptName || '') +
(userInfo.value.realName || '')
})
.catch((err) => {
message.warning(err) message.warning(err)
}) })
} }
@ -461,7 +526,6 @@ const handleUser = () => {
const openView = (url) => { const openView = (url) => {
window.open(url, '_blank') window.open(url, '_blank')
} }
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
@ -472,9 +536,6 @@ const openView = (url) => {
position: fixed !important; position: fixed !important;
margin-right: 100px; margin-right: 100px;
} }
.title { .title {
font-size: 0.18rem; font-size: 0.18rem;
@ -717,7 +778,6 @@ const openView = (url) => {
} }
} }
// //
.waterMark-left-top { .waterMark-left-top {
left: 50px; left: 50px;
@ -755,6 +815,5 @@ const openView = (url) => {
opacity: 0.4; opacity: 0.4;
transform: rotate(-25deg); transform: rotate(-25deg);
width: 470px; width: 470px;
} }
</style> </style>