我的申请增加水印

This commit is contained in:
guoyue 2022-09-27 09:49:30 +08:00
parent 2f752de364
commit 0b401f5741
2 changed files with 600 additions and 526 deletions

View File

@ -1693,7 +1693,7 @@ const videoShowMsg = (index) => {
message.warning(msg) message.warning(msg)
} }
// todo //
const userInfo = ref(null) const userInfo = ref(null)
const handleUser = () => { const handleUser = () => {
getUser().then(res => { getUser().then(res => {
@ -1706,7 +1706,6 @@ const handleUser = () => {
userInfo.value.realNameShow = '西海岸能力超市' + (userInfo.value.deptName || '') + (userInfo.value.realName || ''); userInfo.value.realNameShow = '西海岸能力超市' + (userInfo.value.deptName || '') + (userInfo.value.realName || '');
}).catch(err => { }).catch(err => {
message.warning(err) message.warning(err)
console.log('err----获取用户信息-------->', err);
}) })
} }
</script> </script>
@ -2160,8 +2159,39 @@ video::-webkit-media-controls {
font-weight: bold; font-weight: bold;
opacity: 0.4; opacity: 0.4;
transform: rotate(-25deg); transform: rotate(-25deg);
width: 470px
} }
//
.waterMark-left-top {
left: 50px;
top: 100px;
text-align: left;
}
//
.waterMark-right-top {
right: 50px;
top: 100px;
text-align: right;
}
//
.waterMark-left-bottom {
left: 50px;
bottom: 100px;
text-align: left;
}
//
.waterMark-right-bottom {
right: 50px;
bottom: 100px;
text-align: right;
}
//
.batch-waterMark { .batch-waterMark {
position: absolute; position: absolute;
z-index: 99999999; z-index: 99999999;
@ -2169,55 +2199,35 @@ video::-webkit-media-controls {
font-size: 14px; font-size: 14px;
opacity: 0.4; opacity: 0.4;
transform: rotate(-25deg); transform: rotate(-25deg);
width: 200px;
} }
//
.waterMark-left-top {
left: 100px;
top: 100px;
}
//
.waterMark-right-top {
right: 100px;
top: 100px;
}
//
.waterMark-left-bottom {
left: 100px;
bottom: 100px;
}
//
.waterMark-right-bottom {
right: 100px;
bottom: 100px;
}
//
// //
.batch-waterMark-left-top { .batch-waterMark-left-top {
left: 30px; left: 30px;
top: 50px; top: 50px;
text-align: left;
} }
// //
.batch-waterMark-right-top { .batch-waterMark-right-top {
text-align: right;
right: 30px; right: 30px;
top: 50px; top: 80px;
} }
// //
.batch-waterMark-left-bottom { .batch-waterMark-left-bottom {
left: 30px; left: 30px;
bottom: 50px; bottom: 50px;
text-align: left;
} }
// //
.batch-waterMark-right-bottom { .batch-waterMark-right-bottom {
right: 30px; right: 20px;
bottom: 50px; bottom: 30px;
text-align: right;
} }
</style> </style>

View File

@ -52,30 +52,18 @@
<span class="img"></span> <span class="img"></span>
<span>{{ item.name }}</span> <span>{{ item.name }}</span>
</div> </div>
<div <div style="
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 <a-button type="primary" @click="modify(props.refObj.id, item)" v-if="item.backToFirst">
type="primary"
@click="modify(props.refObj.id, item)"
v-if="item.backToFirst"
>
修改 修改
</a-button> </a-button>
<a-popconfirm <a-popconfirm v-if="!item.ended" title="是否终止此流程?" ok-text="" cancel-text=""
v-if="!item.ended" @confirm="endThis(item.instanceId)" @cancel="cancel">
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>
@ -84,15 +72,9 @@
</div> </div>
<div class="box" v-if="item.list.length > 0"> <div class="box" v-if="item.list.length > 0">
<div <div class="ability" v-for="val in item.list" :key="val.id"
class="ability" :class="item.approveStatus === '通过' ? 'clickCursor' : ''">
v-for="val in item.list" <div class="left" :class="
:key="val.id"
:class="item.approveStatus === '通过' ? 'clickCursor' : ''"
>
<div
class="left"
:class="
val.type == '应用资源' val.type == '应用资源'
? 'yyzy' ? 'yyzy'
: val.infoList.filter( : val.infoList.filter(
@ -112,8 +94,7 @@
)[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">
@ -153,22 +134,15 @@
申请结果{{ 申请结果{{
item.ended ? item.approveStatus || '审核完成' : '审核中' item.ended ? item.approveStatus || '审核完成' : '审核中'
}} }}
<a-button <a-button v-if="
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 <a-button v-if="item.approveStatus === '通过'" @click.stop="switchFunction(item)">
v-if="item.approveStatus === '通过'"
@click.stop="switchFunction(item)"
>
查看详情 查看详情
</a-button> </a-button>
</div> </div>
@ -185,11 +159,8 @@
<span class="channelName">{{ val.channelName }}</span> <span class="channelName">{{ val.channelName }}</span>
<span class="type">基础设施</span> <span class="type">基础设施</span>
</div> </div>
<a-button <a-button type="primary" v-if="item.approveStatus == '通过' && whoShow1.itShowXiHaiAn"
type="primary" @click.stop="openVideo(val)">
v-if="item.approveStatus == '通过' && whoShow1.itShowXiHaiAn"
@click.stop="openVideo(val)"
>
视频预览 视频预览
</a-button> </a-button>
@ -217,17 +188,16 @@
</div> </div>
<!-- 单个预览弹窗 --> <!-- 单个预览弹窗 -->
<a-modal <a-modal wrapClassName="single-preview-modal" v-model:visible="visible" title="视频预览" :width="960" destroyOnClose>
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%"> <div style="width: 100%; height: 100%;position: relative">
<vue3VideoPlay v-bind="options"/> <!-- 预览视频--遮罩 -->
<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>
</div> </div>
</a-modal> </a-modal>
@ -235,22 +205,25 @@
</div> </div>
</template> </template>
<script setup> <script setup>
import { ref, defineProps, reactive } from 'vue' import { ref, defineProps, reactive, onMounted } from 'vue'
import mybus from '@/myplugins/mybus' 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, getStreamByChannelCode,
} from '@/api/videoSurveillance' } from '@/api/videoSurveillance'
const router = useRouter() import {
const backUrl = ref(window.SITE_CONFIG.apiURL + '/') getUser,
const props = defineProps({ } from '@/api/home'
const router = useRouter()
const backUrl = ref(window.SITE_CONFIG.apiURL + '/')
const props = defineProps({
refObj: { type: Object, default: null }, refObj: { type: Object, default: null },
}) })
const whoShow1 = ref(whoShow) const whoShow1 = ref(whoShow)
let visible = ref(false) let visible = ref(false)
const options = reactive({ const options = reactive({
width: '912px', // width: '912px', //
height: '513px', // height: '513px', //
color: '#409eff', // color: '#409eff', //
@ -276,26 +249,26 @@
'pageFullScreen', 'pageFullScreen',
'fullScreen', 'fullScreen',
], //, ], //,
}) })
const dept = reactive({}) const dept = reactive({})
// eslint-disable-next-line no-undef // eslint-disable-next-line no-undef
if (infrastructure) { if (infrastructure) {
// eslint-disable-next-line no-undef // eslint-disable-next-line no-undef
dept.deptId = infrastructure.deptId dept.deptId = infrastructure.deptId
// eslint-disable-next-line no-undef // eslint-disable-next-line no-undef
dept.deptName = infrastructure.deptName dept.deptName = infrastructure.deptName
} }
const showThis = () => { const showThis = () => {
window.open( window.open(
window.SITE_CONFIG.previewUrl + window.SITE_CONFIG.previewUrl +
'hisense_office/onlinePreview?url=' + 'hisense_office/onlinePreview?url=' +
btoa(encodeURI(props.refObj.enclosure)) btoa(encodeURI(props.refObj.enclosure))
) )
} }
const showArr = ref([]) const showArr = ref([])
console.log(props.refObj, '=====================================') console.log(props.refObj, '=====================================')
const endThis = (instanceId) => { const endThis = (instanceId) => {
endProcess({ instanceId: instanceId }).then((res) => { endProcess({ instanceId: instanceId }).then((res) => {
if (res.data.code == 0) { if (res.data.code == 0) {
message.success('流程终止成功!') message.success('流程终止成功!')
@ -304,8 +277,8 @@
message.warning('流程终止失败!') message.warning('流程终止失败!')
} }
}) })
} }
const modify = (id, item) => { const modify = (id, item) => {
getApplyForm(id).then((res) => { getApplyForm(id).then((res) => {
console.log('修改==============>', res.data.data, item) console.log('修改==============>', res.data.data, item)
if (item.list.length > 0) { if (item.list.length > 0) {
@ -368,8 +341,8 @@
}) })
} }
}) })
} }
if (props.refObj.resourceApplication) { if (props.refObj.resourceApplication) {
showArr.value = [] showArr.value = []
for (const key in props.refObj.resourceApplication) { for (const key in props.refObj.resourceApplication) {
if (props.refObj.resourceApplication[key].length > 0) { if (props.refObj.resourceApplication[key].length > 0) {
@ -393,8 +366,8 @@
showArr.value.push(obj) showArr.value.push(obj)
} }
} }
} }
const switchFunction = (data) => { const switchFunction = (data) => {
if (data.approveStatus === '通过') { if (data.approveStatus === '通过') {
let id = data.list[0].id let id = data.list[0].id
const applypage = router.resolve({ const applypage = router.resolve({
@ -405,8 +378,8 @@
}) })
window.open(applypage.href, '_blank') window.open(applypage.href, '_blank')
} }
} }
const downloadFile = (data, name) => { const downloadFile = (data, name) => {
let path = data.list[0].infoList.filter( let path = data.list[0].infoList.filter(
(item) => item.attrType === '上传附件' (item) => item.attrType === '上传附件'
)[0].attrValue )[0].attrValue
@ -435,12 +408,12 @@
URL.revokeObjectURL(url) URL.revokeObjectURL(url)
} }
} }
} }
// //
const openVideo = (item) => { const openVideo = (item) => {
console.log('打开视频', item) console.log('打开视频', item)
if(item && item.status != 1) { if (item && item.status != 1) {
return message.error('当前视频离线不可预览!') return message.error('当前视频离线不可预览!')
} }
const param = { const param = {
@ -457,28 +430,54 @@
// -- // --
// visible.value = true // visible.value = true
// options.src = 'http://playertest.longtailvideo.com/adaptive/bipbop/gear4/prog_index.m3u8' // options.src = 'http://playertest.longtailvideo.com/adaptive/bipbop/gear4/prog_index.m3u8'
}
onMounted(() => {
handleUser()
})
//
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 => {
message.warning(err)
})
}
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.title { .title {
font-size: 0.18rem; font-size: 0.18rem;
color: #000; color: #000;
font-weight: bold; font-weight: bold;
margin-bottom: 0.2rem; margin-bottom: 0.2rem;
padding-left: 0.1rem; padding-left: 0.1rem;
border-left: 0.06rem #0058e1 solid; border-left: 0.06rem #0058e1 solid;
} }
.top {
.top {
margin-bottom: 0.1rem; margin-bottom: 0.1rem;
.main { .main {
background: #eee; background: #eee;
padding: 0.2rem 0.2rem 0.1rem; padding: 0.2rem 0.2rem 0.1rem;
p { p {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
& > span {
&>span {
width: 100%; width: 100%;
} }
.enclosure { .enclosure {
width: 95%; width: 95%;
padding: 0.05rem 0.1rem; padding: 0.05rem 0.1rem;
@ -487,28 +486,33 @@
justify-content: space-between; justify-content: space-between;
margin-top: 0.05rem; margin-top: 0.05rem;
} }
.btn:hover { .btn:hover {
color: #0058e1; color: #0058e1;
cursor: pointer; cursor: pointer;
} }
} }
.item { .item {
span { span {
width: 2.5rem; width: 2.5rem;
} }
} }
} }
} }
.bottom {
.bottom {
.main { .main {
.item { .item {
border-top: 1px #eee solid; border-top: 1px #eee solid;
.deptName { .deptName {
color: #0058e1; color: #0058e1;
font-size: 0.16rem; font-size: 0.16rem;
margin-top: 0.1rem; margin-top: 0.1rem;
display: flex; display: flex;
align-items: center; align-items: center;
.img { .img {
width: 0.05rem; width: 0.05rem;
height: 0.05rem; height: 0.05rem;
@ -517,16 +521,20 @@
margin-right: 0.1rem; margin-right: 0.1rem;
} }
} }
.oddNumbers { .oddNumbers {
margin: 0.1rem 0 0 0.15rem; margin: 0.1rem 0 0 0.15rem;
} }
.box { .box {
margin-left: 0.1rem; margin-left: 0.1rem;
.ability { .ability {
height: 1.3rem; height: 1.3rem;
display: flex; display: flex;
border-bottom: 1px #eee solid; border-bottom: 1px #eee solid;
padding: 0.1rem 0; padding: 0.1rem 0;
.left { .left {
display: inline-block; display: inline-block;
width: 1.1rem; width: 1.1rem;
@ -540,6 +548,7 @@
background: url('~@/assets/home/sxt_square.png') no-repeat; background: url('~@/assets/home/sxt_square.png') no-repeat;
background-size: 100%; background-size: 100%;
} }
.yyzy { .yyzy {
background: url('~@/assets/home/yyzy_square.png') no-repeat; background: url('~@/assets/home/yyzy_square.png') no-repeat;
background-size: 100%; background-size: 100%;
@ -564,6 +573,7 @@
background: url('~@/assets/home/ywzj_square.png') no-repeat; background: url('~@/assets/home/ywzj_square.png') no-repeat;
background-size: 100%; background-size: 100%;
} }
.btn { .btn {
cursor: pointer; cursor: pointer;
color: #0087ff; color: #0087ff;
@ -572,18 +582,22 @@
border: 1px #0087ff solid; border: 1px #0087ff solid;
border-radius: 0.2rem; border-radius: 0.2rem;
} }
.right { .right {
flex: 1; flex: 1;
margin-left: 0.15rem; margin-left: 0.15rem;
.ability-top { .ability-top {
width: 100%; width: 100%;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
.name { .name {
width: 6rem; width: 6rem;
height: 0.2rem; height: 0.2rem;
display: flex; display: flex;
.channelName { .channelName {
max-width: 5rem; max-width: 5rem;
height: 0.2rem; height: 0.2rem;
@ -594,6 +608,7 @@
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
word-break: break-all; word-break: break-all;
} }
.type { .type {
background: #0087ff; background: #0087ff;
color: #fff; color: #fff;
@ -604,8 +619,10 @@
} }
} }
} }
.ability-bottom { .ability-bottom {
margin-top: 0.15rem; margin-top: 0.15rem;
// display: flex; // display: flex;
// justify-content: space-between; // justify-content: space-between;
.dec { .dec {
@ -618,6 +635,7 @@
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
word-break: break-all; word-break: break-all;
} }
.dec2 { .dec2 {
width: 7rem; width: 7rem;
height: 0.22rem; height: 0.22rem;
@ -628,6 +646,7 @@
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
word-break: break-all; word-break: break-all;
} }
// .result:hover { // .result:hover {
// color: #0058e1; // color: #0058e1;
// cursor: pointer; // cursor: pointer;
@ -637,37 +656,82 @@
} }
} }
} }
.DownloadAttachment { .DownloadAttachment {
position: absolute; position: absolute;
right: 10px; right: 10px;
top: -150px; top: -150px;
} }
.DownloadAttachment2 { .DownloadAttachment2 {
position: absolute; position: absolute;
right: 10px; right: 10px;
top: -110px; top: -110px;
} }
} }
.clickCursor { .clickCursor {
cursor: pointer; cursor: pointer;
} }
} }
} }
} }
} }
.single-preview-modal { .single-preview-modal {
.ant-modal-header { .ant-modal-header {
background: url(~@/assets/home/video-background.png) no-repeat; background: url(~@/assets/home/video-background.png) no-repeat;
background-size: cover; background-size: cover;
} }
.ant-modal-title { .ant-modal-title {
font-size: 0.16rem; font-size: 0.16rem;
font-weight: 500; font-weight: 500;
color: #ffffff; color: #ffffff;
} }
.anticon { .anticon {
color: #ffffff; color: #ffffff;
} }
} }
//
.waterMark-left-top {
left: 50px;
top: 100px;
text-align: left;
}
//
.waterMark-right-top {
right: 50px;
top: 100px;
text-align: right;
}
//
.waterMark-left-bottom {
left: 50px;
bottom: 100px;
text-align: left;
}
//
.waterMark-right-bottom {
right: 50px;
bottom: 100px;
text-align: right;
}
.waterMark {
position: absolute;
z-index: 99999999;
color: #0058e1;
font-size: 22px;
font-weight: bold;
opacity: 0.4;
transform: rotate(-25deg);
width: 470px
}
</style> </style>