diff --git a/src/views/goverment/frontLargeScreen/index.vue b/src/views/goverment/frontLargeScreen/index.vue index 5b3ebf1..b44df29 100644 --- a/src/views/goverment/frontLargeScreen/index.vue +++ b/src/views/goverment/frontLargeScreen/index.vue @@ -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(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; diff --git a/src/views/goverment/largeScreen/index.vue b/src/views/goverment/largeScreen/index.vue index fb2bded..3b39116 100644 --- a/src/views/goverment/largeScreen/index.vue +++ b/src/views/goverment/largeScreen/index.vue @@ -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;