Compare commits
3 Commits
964bfff91d
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 09c99d5550 | |||
| 4d862d0118 | |||
| c605dd377d |
@@ -258,7 +258,7 @@ export function useWidget() {
|
|||||||
// 获取widget的当前激活状态
|
// 获取widget的当前激活状态
|
||||||
isActivate: (name: string) => {
|
isActivate: (name: string) => {
|
||||||
const widget = store.state.widgets.find((item: any) => item.name === name)
|
const widget = store.state.widgets.find((item: any) => item.name === name)
|
||||||
return widget ? widget.visible : false
|
return widget ? store.state.openAtStart.includes(name) && !!widget.visible : false
|
||||||
},
|
},
|
||||||
// 激活指定 widget模块
|
// 激活指定 widget模块
|
||||||
activate: (option: string | Widget | (string | Widget)[], reload = true) => {
|
activate: (option: string | Widget | (string | Widget)[], reload = true) => {
|
||||||
|
|||||||
@@ -1157,84 +1157,6 @@ defineExpose({
|
|||||||
z-index: 10;
|
z-index: 10;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// .fullscreen-container {
|
|
||||||
// position: fixed;
|
|
||||||
// top: 0;
|
|
||||||
// left: 0;
|
|
||||||
// right: 0;
|
|
||||||
// bottom: 0;
|
|
||||||
// display: flex;
|
|
||||||
// justify-content: center;
|
|
||||||
// align-items: center;
|
|
||||||
// z-index: 999999;
|
|
||||||
// width: 100%;
|
|
||||||
// height: 100%;
|
|
||||||
// .content {
|
|
||||||
// width: 100%;
|
|
||||||
// // height: 871px;
|
|
||||||
// height: 100%;
|
|
||||||
// /* src\pages\page-web\daping\img\弹窗.png */
|
|
||||||
// // background: url(img/icon/bgData.png) no-repeat;
|
|
||||||
// background-size: cover;
|
|
||||||
// position: relative;
|
|
||||||
// // padding: 30px 24px 0;
|
|
||||||
// .content-top {
|
|
||||||
// display: flex;
|
|
||||||
// justify-content: end;
|
|
||||||
// margin-bottom: 10px;
|
|
||||||
// > .top-right {
|
|
||||||
// width: 755px;
|
|
||||||
// padding-left: 240px;
|
|
||||||
// display: flex;
|
|
||||||
// justify-content: space-between;
|
|
||||||
// align-items: flex-start;
|
|
||||||
// > .btn-list {
|
|
||||||
// display: inline-flex;
|
|
||||||
// color: #fff;
|
|
||||||
// > .btn {
|
|
||||||
// width: 90px;
|
|
||||||
// font-size: 16px;
|
|
||||||
// margin: 0 10px;
|
|
||||||
// border: 1px solid #d3d3d3;
|
|
||||||
// padding: 4px 12px;
|
|
||||||
// border-radius: 12px;
|
|
||||||
// text-align: center;
|
|
||||||
// text-wrap: nowrap;
|
|
||||||
// &:hover {
|
|
||||||
// cursor: pointer;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// > .btnActive {
|
|
||||||
// background-color: #1890ff;
|
|
||||||
// border: 1px solid #1890ff;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// > .close {
|
|
||||||
// font-size: 26px;
|
|
||||||
// color: #fff;
|
|
||||||
// &:hover {
|
|
||||||
// cursor: pointer;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// > .player-content {
|
|
||||||
// width: 100%;
|
|
||||||
// height: 100%;
|
|
||||||
// display: flex;
|
|
||||||
// align-items: center;
|
|
||||||
// justify-content: center;
|
|
||||||
// overflow: hidden;
|
|
||||||
// > .player {
|
|
||||||
// width: 100%;
|
|
||||||
// height: 100%;
|
|
||||||
// display: flex;
|
|
||||||
// align-items: center;
|
|
||||||
// justify-content: center;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
.fullscreen-container {
|
.fullscreen-container {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
@@ -1245,7 +1167,7 @@ defineExpose({
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
z-index: 999;
|
z-index: 9999;
|
||||||
background-color: rgba(0, 0, 0, 0.5);
|
background-color: rgba(0, 0, 0, 0.5);
|
||||||
pointer-events: auto;
|
pointer-events: auto;
|
||||||
&:fullscreen {
|
&:fullscreen {
|
||||||
|
|||||||
@@ -16,12 +16,12 @@
|
|||||||
<a-spin size="large" v-if="loading" />
|
<a-spin size="large" v-if="loading" />
|
||||||
<!-- <div id="player" v-else></div> -->
|
<!-- <div id="player" v-else></div> -->
|
||||||
<div class="player" :id="'player_' + sn" v-else>
|
<div class="player" :id="'player_' + sn" v-else>
|
||||||
<jessibuca
|
<stream-player
|
||||||
ref="jessibucaVideo"
|
ref="jessibucaVideo"
|
||||||
style="width: 100%; height: 100%"
|
style="width: 100%; height: 100%"
|
||||||
:videoUrl="flvUrl"
|
:videoUrl="flvUrl"
|
||||||
:showQu="false"
|
:showQu="false"
|
||||||
></jessibuca>
|
></stream-player>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -35,7 +35,7 @@ import { message } from 'ant-design-vue';
|
|||||||
import jswebrtc from '/@/vendors/jswebrtc.js';
|
import jswebrtc from '/@/vendors/jswebrtc.js';
|
||||||
import FlvExtend from 'flv-extend';
|
import FlvExtend from 'flv-extend';
|
||||||
import { useUserAuthor } from '/@/hooks/use-g-author';
|
import { useUserAuthor } from '/@/hooks/use-g-author';
|
||||||
import jessibuca from './live/jessibuca.vue';
|
import streamPlayer from './live/stream-player.vue';
|
||||||
import { getAiLive } from '/@/api/daping';
|
import { getAiLive } from '/@/api/daping';
|
||||||
const { getAiAuthor } = useUserAuthor();
|
const { getAiAuthor } = useUserAuthor();
|
||||||
interface Props {
|
interface Props {
|
||||||
@@ -289,7 +289,8 @@ const createRtmpVideo = async (url: string) => {
|
|||||||
// 将video加入到 dom中
|
// 将video加入到 dom中
|
||||||
// remotePlay?.appendChild(link);
|
// remotePlay?.appendChild(link);
|
||||||
await nextTick(async () => {
|
await nextTick(async () => {
|
||||||
await rtmpVideoData(url, 'player_'+props.sn);
|
flvUrl.value = url;
|
||||||
|
await jessibucaVideo.value?.play?.(url);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
let videoPalyer = null;
|
let videoPalyer = null;
|
||||||
@@ -429,16 +430,15 @@ watch(
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
|
||||||
// console.log('ckckckckk----',props)
|
// console.log('ckckckckk----',props)
|
||||||
// onloadCamera();
|
// onloadCamera();
|
||||||
createRtmpVideo(props.flvUrl)
|
createRtmpVideo(props.flvUrl)
|
||||||
});
|
});
|
||||||
const emit = defineEmits(['close']);
|
const emit = defineEmits(['close']);
|
||||||
const closeVideo = () => {
|
const closeVideo = () => {
|
||||||
if (!videoPalyer) return;
|
|
||||||
videoPalyer.close();
|
|
||||||
videoPalyer = null;
|
videoPalyer = null;
|
||||||
|
flvUrl.value = '';
|
||||||
|
jessibucaVideo.value?.destroy?.();
|
||||||
};
|
};
|
||||||
const closeMoadl = () => {
|
const closeMoadl = () => {
|
||||||
closeVideo();
|
closeVideo();
|
||||||
|
|||||||
@@ -349,6 +349,11 @@ const pause = () => {
|
|||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
#jessibuca {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
.buttons-box {
|
.buttons-box {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 28px;
|
height: 28px;
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
<jessibuca
|
<jessibuca
|
||||||
v-show="!isWebrtcMode"
|
v-show="!isWebrtcMode"
|
||||||
ref="flvPlayerRef"
|
ref="flvPlayerRef"
|
||||||
|
style="width: 100%; height: 100%;"
|
||||||
:currentVedioDatas="currentVedioDatas"
|
:currentVedioDatas="currentVedioDatas"
|
||||||
:videoUrl="videoUrl"
|
:videoUrl="videoUrl"
|
||||||
:error="error"
|
:error="error"
|
||||||
@@ -393,7 +394,7 @@ defineExpose({
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
display: block;
|
display: block;
|
||||||
background-color: #000;
|
background-color: #000;
|
||||||
object-fit: fill;
|
object-fit:cover;
|
||||||
}
|
}
|
||||||
|
|
||||||
.buttons-box-right {
|
.buttons-box-right {
|
||||||
|
|||||||
@@ -80,13 +80,11 @@ const store: StoreOptions<WidgetState> = {
|
|||||||
component: markRaw(defineAsyncComponent(() => import("@mars/widgets/basic/manage-layers/index.vue"))),
|
component: markRaw(defineAsyncComponent(() => import("@mars/widgets/basic/manage-layers/index.vue"))),
|
||||||
name: "manage-layers",
|
name: "manage-layers",
|
||||||
group: "manage",
|
group: "manage",
|
||||||
visible:true,
|
|
||||||
disableOther: ["roamLine"]
|
disableOther: ["roamLine"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
component: markRaw(defineAsyncComponent(() => import("@mars/widgets/basic/manage-layers1/index.vue"))),
|
component: markRaw(defineAsyncComponent(() => import("@mars/widgets/basic/manage-layers1/index.vue"))),
|
||||||
name: "manage-layers1",
|
name: "manage-layers1"
|
||||||
visible:true,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
component: markRaw(defineAsyncComponent(() => import("@mars/widgets/basic/manage-layers/layer-tree.vue"))),
|
component: markRaw(defineAsyncComponent(() => import("@mars/widgets/basic/manage-layers/layer-tree.vue"))),
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ watch(()=>props.warppers,(data)=>{
|
|||||||
})
|
})
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
resetTreeState()
|
||||||
initTree()
|
initTree()
|
||||||
})
|
})
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
@@ -74,9 +74,7 @@ onUnmounted(() => {
|
|||||||
useLifecycle(mapWork)
|
useLifecycle(mapWork)
|
||||||
|
|
||||||
currentWidget.onUpdate(() => {
|
currentWidget.onUpdate(() => {
|
||||||
treeData.value = []
|
resetTreeState()
|
||||||
expandedKeys.value = []
|
|
||||||
checkedKeys.value = []
|
|
||||||
initTree()
|
initTree()
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -90,6 +88,17 @@ const layersObj: any = {}
|
|||||||
|
|
||||||
const opacityObj: any = reactive({})
|
const opacityObj: any = reactive({})
|
||||||
|
|
||||||
|
const fatherLayer = []
|
||||||
|
|
||||||
|
function resetTreeState() {
|
||||||
|
treeData.value = []
|
||||||
|
expandedKeys.value = []
|
||||||
|
checkedKeys.value = []
|
||||||
|
fatherLayer.length = 0
|
||||||
|
Object.keys(layersObj).forEach((key) => delete layersObj[key])
|
||||||
|
Object.keys(opacityObj).forEach((key) => delete opacityObj[key])
|
||||||
|
}
|
||||||
|
|
||||||
let lastWidget: any
|
let lastWidget: any
|
||||||
const checkedChange = (keys: string[], e: any) => {
|
const checkedChange = (keys: string[], e: any) => {
|
||||||
const layer = layersObj[e.node.id]
|
const layer = layersObj[e.node.id]
|
||||||
@@ -237,7 +246,6 @@ function flyTo(item: any) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const fatherLayer = []
|
|
||||||
function initTree() {
|
function initTree() {
|
||||||
const layers = mapWork.getLayers()
|
const layers = mapWork.getLayers()
|
||||||
console.log("layers1", JSON.stringify(layers))
|
console.log("layers1", JSON.stringify(layers))
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ watch(()=>props.warppers,(data)=>{
|
|||||||
})
|
})
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
resetTreeState()
|
||||||
initTree()
|
initTree()
|
||||||
})
|
})
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
@@ -75,9 +75,7 @@ onUnmounted(() => {
|
|||||||
useLifecycle(mapWork)
|
useLifecycle(mapWork)
|
||||||
|
|
||||||
currentWidget.onUpdate(() => {
|
currentWidget.onUpdate(() => {
|
||||||
treeData.value = []
|
resetTreeState()
|
||||||
expandedKeys.value = []
|
|
||||||
checkedKeys.value = []
|
|
||||||
initTree()
|
initTree()
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -91,6 +89,17 @@ const layersObj: any = {}
|
|||||||
|
|
||||||
const opacityObj: any = reactive({})
|
const opacityObj: any = reactive({})
|
||||||
|
|
||||||
|
const fatherLayer = []
|
||||||
|
|
||||||
|
function resetTreeState() {
|
||||||
|
treeData.value = []
|
||||||
|
expandedKeys.value = []
|
||||||
|
checkedKeys.value = []
|
||||||
|
fatherLayer.length = 0
|
||||||
|
Object.keys(layersObj).forEach((key) => delete layersObj[key])
|
||||||
|
Object.keys(opacityObj).forEach((key) => delete opacityObj[key])
|
||||||
|
}
|
||||||
|
|
||||||
let lastWidget: any
|
let lastWidget: any
|
||||||
const checkedChange = (keys: string[], e: any) => {
|
const checkedChange = (keys: string[], e: any) => {
|
||||||
const layer = layersObj[e.node.id]
|
const layer = layersObj[e.node.id]
|
||||||
@@ -238,7 +247,6 @@ function flyTo(item: any) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const fatherLayer = []
|
|
||||||
function initTree() {
|
function initTree() {
|
||||||
const layers = mapWork.getLayers()
|
const layers = mapWork.getLayers()
|
||||||
console.log("layers1", JSON.stringify(layers))
|
console.log("layers1", JSON.stringify(layers))
|
||||||
|
|||||||
Reference in New Issue
Block a user