This commit is contained in:
duanxiaohai 2024-08-23 18:03:59 +08:00
parent aa6f9dc456
commit f9aba751a8
4 changed files with 41 additions and 13 deletions

View File

@ -80,6 +80,12 @@ const props = defineProps({
return ""; return "";
}, },
}, },
sxtname: {
type: String,
default: () => {
return "";
},
},
}); });
const emit = defineEmits(["close"]); const emit = defineEmits(["close"]);
@ -106,6 +112,9 @@ watch(
// if (hlsUriSslNow.value != "" && props.hlsUriSsl != hlsUriSslNow.value) // if (hlsUriSslNow.value != "" && props.hlsUriSsl != hlsUriSslNow.value)
cameraShow.value = newVal; cameraShow.value = newVal;
hlsUriSslNow.value = props.hlsUriSsl; hlsUriSslNow.value = props.hlsUriSsl;
data.title = props.sxtname;
console.log(hlsUriSslNow.value,props.sxtname,5555);
attachmentLink.value = hlsUriSslNow.value; attachmentLink.value = hlsUriSslNow.value;
dp.value = null; dp.value = null;
//dom //dom
@ -244,7 +253,7 @@ const closeDialog = () => {
.name { .name {
font-family: PangMenZhengDao, PangMenZhengDao; font-family: PangMenZhengDao, PangMenZhengDao;
font-weight: 600; font-weight: 600;
font-size: 33px; font-size: 23px;
color: #ffffff; color: #ffffff;
line-height: 38px; line-height: 38px;
text-align: center; text-align: center;

View File

@ -854,8 +854,8 @@ const openCamera = () => {
}; };
// //
const getCameraUrl = () => { const getCameraUrl = () => {
camera.deviceCode = dataMyTag.camera.sbbm; // camera.deviceCode = dataMyTag.camera.sbbm;
// camera.deviceCode = "3KSCP274757F2JU"; camera.deviceCode = "3KSCP274757F2JU";
http http
.get(`/api/ggfwyth/ysyzt/getPlayAddress?deviceCode=${camera.deviceCode}`) .get(`/api/ggfwyth/ysyzt/getPlayAddress?deviceCode=${camera.deviceCode}`)
.then((res) => { .then((res) => {
@ -895,9 +895,9 @@ onMounted(() => {
} }
onClickTag2("出生", "出生"); onClickTag2("出生", "出生");
getshs(); getshs();
if (dataMyTag.camera) { // if (dataMyTag.camera) {
getCameraUrl(); getCameraUrl();
} // }
} else { } else {
jump.value = "map"; jump.value = "map";
} }

View File

@ -213,6 +213,7 @@
<DialogCamera <DialogCamera
:cameraShow="sxtShow.show" :cameraShow="sxtShow.show"
:hlsUriSsl="sxtShow.hlsUriSsl" :hlsUriSsl="sxtShow.hlsUriSsl"
:sxtname="sxtShow.name"
@close="close1" @close="close1"
> >
</DialogCamera> </DialogCamera>
@ -794,6 +795,7 @@ const sxtShow = reactive({
show: false, show: false,
deviceCode: "", deviceCode: "",
hlsUriSsl: "", hlsUriSsl: "",
name: "",
}); });
const tableType = reactive({ const tableType = reactive({
url: "", url: "",
@ -2079,9 +2081,9 @@ const getZyys = (url, name, img, img_map) => {
// item.center.push(Number(item.jd)); // item.center.push(Number(item.jd));
// item.center.push(Number(item.wd)); // item.center.push(Number(item.wd));
item.center = [Number(item.jd), Number(item.wd)]; item.center = [Number(item.jd), Number(item.wd)];
item.onClick = () => { // item.onClick = () => {
handleItemClick(item, index, name); // handleItemClick(item, index, name);
}; // };
}); });
yaosuIcon.value[name].sj.forEach((itemm, indexx) => { yaosuIcon.value[name].sj.forEach((itemm, indexx) => {
createZyys(itemm, indexx, name); createZyys(itemm, indexx, name);
@ -2089,9 +2091,9 @@ const getZyys = (url, name, img, img_map) => {
} }
}); });
}; };
const handleItemClick = (item, index, name) => { // const handleItemClick = (item, index, name) => {
console.log("Item clicked:", item, index, name); // console.log("Item clicked:", item, index, name);
}; // };
// (overlay) // (overlay)
const createZyys = (polygon, indexx, name) => { const createZyys = (polygon, indexx, name) => {
@ -2124,9 +2126,26 @@ const createZyys = (polygon, indexx, name) => {
); );
map.addOverlay(yaosuIcon.value[name].sj[indexx].overlay); map.addOverlay(yaosuIcon.value[name].sj[indexx].overlay);
yaosuIcon.value[name].sj[indexx].overlay.addEventListener("click", () => { yaosuIcon.value[name].sj[indexx].overlay.addEventListener("click", () => {
sxtShow.deviceCode = polygon.sbbm;
sxtShow.name = polygon.sbmc;
getCameraUrl();
console.log(polygon); console.log(polygon);
}); });
}; };
//
const getCameraUrl = () => {
// camera.deviceCode = dataMyTag.camera.sbbm;
// sxtShow.deviceCode = "3KSCP274757F2JU";
http
.get(`/api/ggfwyth/ysyzt/getPlayAddress?deviceCode=${sxtShow.deviceCode}`)
.then((res) => {
if (res.code == 200) {
sxtShow.hlsUriSsl = res.data.hlsUriSsl;
sxtShow.show = true;
}
});
};
//---------------------- //----------------------
// //
const to_jd = async (item_name) => { const to_jd = async (item_name) => {

View File

@ -15,8 +15,8 @@ export default defineConfig({
// 第一个代理 // 第一个代理
"/api": { "/api": {
// 匹配到啥来进行方向代理 // 匹配到啥来进行方向代理
target: "http://10.0.0.65:8095/", //刘进 // target: "http://10.0.0.65:8095/", //刘进
// target: "http://220.191.238.50:996/", //线上 target: "http://220.191.238.50:996/", //线上
changeOrigin: true, //是否支持跨域 changeOrigin: true, //是否支持跨域
//rewrite: (path) => path.replace(/^\/api/, '') // 如果不需要api 直接把路径上的api 替换成空,这个 //rewrite: (path) => path.replace(/^\/api/, '') // 如果不需要api 直接把路径上的api 替换成空,这个
}, },