视频修改为点击后再获取播放地址

This commit is contained in:
jiayu 2024-11-09 09:20:24 +08:00
parent 8aa28da81f
commit d947d70287
2 changed files with 32 additions and 7 deletions

View File

@ -337,6 +337,10 @@ const rollerVal = ref({
leftRollerVal: "",
rightRollerVal: ""
});
import { Global3DStore } from "@/stores";
const store = Global3DStore();
const BASEURL = import.meta.env.VITE_API_URL;
// const showPerson = ref(false);
const personId = ref<any>(null); // id
@ -519,6 +523,7 @@ onMounted(async () => {
url: item.url,
scale: item.scale,
clampToGround: item.clampToGround,
heading: item.heading,
label: {
text: item.name,
visibleDepth: false,
@ -628,16 +633,24 @@ const getEquipmentList = async (id: any) => {
});
graphicLayer.addGraphic(graphicImg);
videoGraphics.value.push(graphicImg);
let urlData: any = "";
// let urlData: any = "";
if (item.code) {
urlData = await equipmentUrlGet({ monitorId: item.monitorId });
// urlData = await equipmentUrlGet({ monitorId: item.monitorId });
const data = {
url: BASEURL + '/base/monitorDev/queryInfo',
params: { monitorId: item.monitorId },
headers: {
Authorization: "Bearer " + store.token,
"Content-Type": "application/json"
}
};
graphicImg.bindPopup(
(event: any) => {
const attr = event.graphic.attr || {};
if (!attr) {
return;
}
const dom = initVue3Popup(resStyle?.codeValue, { data: urlData || {} });
const dom = initVue3Popup(resStyle?.codeValue, { data });
// return mars3d.Util.getTemplateHtml({ title: "", template: dom, attr: attr });
console.log(dom);
return dom;

View File

@ -350,6 +350,10 @@ import { getDicList } from "@/api/modules/jxjview";
import * as Vue from "vue";
import { loadModule } from "vue3-sfc-loader";
import { url } from "inspector";
import { Global3DStore } from "@/stores";
const store = Global3DStore();
const BASEURL = import.meta.env.VITE_API_URL;
const modelLineList = ref([]);
const equipTypeDictLabel = ref();
const equipTypeList = ref([]);
@ -537,6 +541,7 @@ onMounted(async () => {
// heading: 270,
scale: item.scale,
clampToGround: item.clampToGround,
heading: item.heading,
label: {
text: item.name,
visibleDepth: false,
@ -681,17 +686,24 @@ const getEquipmentList = async (id: any) => {
});
graphicLayer.addGraphic(graphicImg);
videoGraphics.value.push(graphicImg);
let urlData: any = "";
console.log(22222, item.url);
// let urlData: any = "";
if (item.code) {
urlData = await equipmentUrlGet({ monitorId: item.monitorId });
// urlData = await equipmentUrlGet({ monitorId: item.monitorId });
const data = {
url: BASEURL + '/base/monitorDev/queryInfo',
params: { monitorId: item.monitorId },
headers: {
Authorization: "Bearer " + store.token,
"Content-Type": "application/json"
}
};
graphicImg.bindPopup(
(event: any) => {
const attr = event.graphic.attr || {};
if (!attr) {
return;
}
const dom = initVue3Popup(resStyle?.codeValue, { data: urlData || {} });
const dom = initVue3Popup(resStyle?.codeValue, { data });
// return mars3d.Util.getTemplateHtml({ title: "", template: dom, attr: attr });
console.log(dom);
return dom;