|
@@ -2,10 +2,7 @@
|
|
<div class="hot-spot-list" app-border dir-left>
|
|
<div class="hot-spot-list" app-border dir-left>
|
|
<div class="title">
|
|
<div class="title">
|
|
{{ $i18n.t("hotspot.add_hotspot") }}
|
|
{{ $i18n.t("hotspot.add_hotspot") }}
|
|
- <i
|
|
|
|
- class="iconfont icon-help_i tool-tip-for-editor"
|
|
|
|
- v-tooltip="$i18n.t('hotspot.hotspot_tips')"
|
|
|
|
- />
|
|
|
|
|
|
+ <i class="iconfont icon-help_i tool-tip-for-editor" v-tooltip="$i18n.t('hotspot.hotspot_tips')" />
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<template v-if="currentScene.type !== '4dkk'">
|
|
<template v-if="currentScene.type !== '4dkk'">
|
|
@@ -24,13 +21,7 @@
|
|
>
|
|
>
|
|
<img class="icon" :src="item.icon" alt="" draggable="false" />
|
|
<img class="icon" :src="item.icon" alt="" draggable="false" />
|
|
<div class="type-name">{{ item.name }}</div>
|
|
<div class="type-name">{{ item.name }}</div>
|
|
- <img
|
|
|
|
- v-if="item.isExperience"
|
|
|
|
- class="exp-tag"
|
|
|
|
- :src="experience_icon"
|
|
|
|
- alt=""
|
|
|
|
- draggable="false"
|
|
|
|
- />
|
|
|
|
|
|
+ <img v-if="item.isExperience" class="exp-tag" :src="experience_icon" alt="" draggable="false" />
|
|
</li>
|
|
</li>
|
|
</ul>
|
|
</ul>
|
|
|
|
|
|
@@ -40,27 +31,12 @@
|
|
</div>
|
|
</div>
|
|
<div class="hots">
|
|
<div class="hots">
|
|
<ul v-if="someData.hotspots.length > 0">
|
|
<ul v-if="someData.hotspots.length > 0">
|
|
- <li
|
|
|
|
- v-for="(item, key) in someData.hotspots"
|
|
|
|
- :key="key"
|
|
|
|
- @click="open(item)"
|
|
|
|
- >
|
|
|
|
|
|
+ <li v-for="(item, key) in someData.hotspots" :key="key" @click="open(item)">
|
|
<img class="hot-spot-thumb" :src="item.img" alt="" />
|
|
<img class="hot-spot-thumb" :src="item.img" alt="" />
|
|
- <span class="hot-spot-title" v-title="item.hotspotTitle">{{
|
|
|
|
- item.hotspotTitle
|
|
|
|
- }}</span>
|
|
|
|
- <i
|
|
|
|
- class="iconfont icon-editor_list_delete icon-delete"
|
|
|
|
- v-tooltip="$i18n.t('hotspot.delete')"
|
|
|
|
- @click.stop="deleIndex = key"
|
|
|
|
- />
|
|
|
|
|
|
+ <span class="hot-spot-title" v-title="item.hotspotTitle">{{ item.hotspotTitle }}</span>
|
|
|
|
+ <i class="iconfont icon-editor_list_delete icon-delete" v-tooltip="$i18n.t('hotspot.delete')" @click.stop="deleIndex = key" />
|
|
<div class="deletion-confirm-wrap">
|
|
<div class="deletion-confirm-wrap">
|
|
- <div
|
|
|
|
- class="deletion-confirm"
|
|
|
|
- :class="deleIndex == key ? 'show' : 'hide'"
|
|
|
|
- v-clickoutside="clickoutside"
|
|
|
|
- @click.stop="deleteHot(item)"
|
|
|
|
- >
|
|
|
|
|
|
+ <div class="deletion-confirm" :class="deleIndex == key ? 'show' : 'hide'" v-clickoutside="clickoutside" @click.stop="deleteHot(item)">
|
|
{{ $i18n.t("hotspot.delete") }}
|
|
{{ $i18n.t("hotspot.delete") }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -75,12 +51,7 @@
|
|
|
|
|
|
<div class="goto-4dkk-tip" v-if="currentScene.type === '4dkk'">
|
|
<div class="goto-4dkk-tip" v-if="currentScene.type === '4dkk'">
|
|
<div class="img-wrap">
|
|
<div class="img-wrap">
|
|
- <img
|
|
|
|
- class=""
|
|
|
|
- src="@/assets/images/default/goto-4dage.png"
|
|
|
|
- alt=""
|
|
|
|
- draggable="false"
|
|
|
|
- />
|
|
|
|
|
|
+ <img class="" src="@/assets/images/default/goto-4dage.png" alt="" draggable="false" />
|
|
<div class="tip-text">
|
|
<div class="tip-text">
|
|
{{ $i18n.t("screen.goto_4dkk_edit_tips") }}
|
|
{{ $i18n.t("screen.goto_4dkk_edit_tips") }}
|
|
</div>
|
|
</div>
|
|
@@ -90,14 +61,7 @@
|
|
</button>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <EditPanel
|
|
|
|
- class="adding-hotspot-panel"
|
|
|
|
- v-if="showPanel"
|
|
|
|
- :editTitle="editTitle"
|
|
|
|
- :show="showPanel"
|
|
|
|
- @save="save"
|
|
|
|
- @close="close"
|
|
|
|
- />
|
|
|
|
|
|
+ <EditPanel class="adding-hotspot-panel" v-if="showPanel" :editTitle="editTitle" :show="showPanel" @save="save" @close="close" />
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -175,9 +139,7 @@ export default {
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
this.$bus.on("updateHotSpotHV", (data) => {
|
|
this.$bus.on("updateHotSpotHV", (data) => {
|
|
- let hptarget = this.someData.hotspots.find(
|
|
|
|
- (item) => item.name.toLowerCase() == data.hpname.toLowerCase()
|
|
|
|
- );
|
|
|
|
|
|
+ let hptarget = this.someData.hotspots.find((item) => item.name.toLowerCase() == data.hpname.toLowerCase());
|
|
if (hptarget) {
|
|
if (hptarget) {
|
|
console.log("hptarget", hptarget);
|
|
console.log("hptarget", hptarget);
|
|
hptarget.ath = data.ath;
|
|
hptarget.ath = data.ath;
|
|
@@ -186,9 +148,7 @@ export default {
|
|
});
|
|
});
|
|
|
|
|
|
this.$bus.on("openHotspot", (data) => {
|
|
this.$bus.on("openHotspot", (data) => {
|
|
- let idx = this.someData.hotspots.findIndex(
|
|
|
|
- (item) => item.name.toLowerCase() == data.toLowerCase()
|
|
|
|
- );
|
|
|
|
|
|
+ let idx = this.someData.hotspots.findIndex((item) => item.name.toLowerCase() == data.toLowerCase());
|
|
// console.log(data);
|
|
// console.log(data);
|
|
if (data == this.hotspot.name) {
|
|
if (data == this.hotspot.name) {
|
|
// window.__krfn.utils.looktohotspot(this.$getKrpano(), this.hotspot.name);
|
|
// window.__krfn.utils.looktohotspot(this.$getKrpano(), this.hotspot.name);
|
|
@@ -197,10 +157,7 @@ export default {
|
|
}
|
|
}
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- if (
|
|
|
|
- this.editTitle == "新增" ||
|
|
|
|
- this.editTitle == this.$i18n.t("hotspot.add")
|
|
|
|
- ) {
|
|
|
|
|
|
+ if (this.editTitle == "新增" || this.editTitle == this.$i18n.t("hotspot.add")) {
|
|
if (this.showPanel) {
|
|
if (this.showPanel) {
|
|
return this.$confirm({
|
|
return this.$confirm({
|
|
content: this.$i18n.t("hotspot.close_dialog"),
|
|
content: this.$i18n.t("hotspot.close_dialog"),
|
|
@@ -227,9 +184,7 @@ export default {
|
|
if (data.type == "edit") {
|
|
if (data.type == "edit") {
|
|
this.deleteKRHotspot(data.data);
|
|
this.deleteKRHotspot(data.data);
|
|
this.$bus.emit("addhotspot", data.data);
|
|
this.$bus.emit("addhotspot", data.data);
|
|
- let idx = this.someData.hotspots.findIndex(
|
|
|
|
- (item) => item.name == data.data.name
|
|
|
|
- );
|
|
|
|
|
|
+ let idx = this.someData.hotspots.findIndex((item) => item.name == data.data.name);
|
|
this.someData.hotspots[idx] = data.data;
|
|
this.someData.hotspots[idx] = data.data;
|
|
} else {
|
|
} else {
|
|
this.deleteKRHotspot(data.data);
|
|
this.deleteKRHotspot(data.data);
|
|
@@ -239,9 +194,7 @@ export default {
|
|
},
|
|
},
|
|
|
|
|
|
updateInfo() {
|
|
updateInfo() {
|
|
- let iidx = this.info.scenes.findIndex(
|
|
|
|
- (item) => this.currentScene.sceneCode == item.sceneCode
|
|
|
|
- );
|
|
|
|
|
|
+ let iidx = this.info.scenes.findIndex((item) => this.currentScene.sceneCode == item.sceneCode);
|
|
if (iidx > -1) {
|
|
if (iidx > -1) {
|
|
this.info.scenes[iidx] = {
|
|
this.info.scenes[iidx] = {
|
|
...this.currentScene,
|
|
...this.currentScene,
|
|
@@ -253,9 +206,7 @@ export default {
|
|
let HV = window.__krfn.utils.getHotspotHV(this.$getKrpano(), data.name);
|
|
let HV = window.__krfn.utils.getHotspotHV(this.$getKrpano(), data.name);
|
|
data.ath = HV.ath;
|
|
data.ath = HV.ath;
|
|
data.atv = HV.atv;
|
|
data.atv = HV.atv;
|
|
- let idx = this.someData.hotspots.findIndex(
|
|
|
|
- (item) => item.name === data.name
|
|
|
|
- );
|
|
|
|
|
|
+ let idx = this.someData.hotspots.findIndex((item) => item.name === data.name);
|
|
if (idx <= -1) {
|
|
if (idx <= -1) {
|
|
this.someData.hotspots.push(data);
|
|
this.someData.hotspots.push(data);
|
|
} else {
|
|
} else {
|
|
@@ -267,12 +218,9 @@ export default {
|
|
|
|
|
|
// window.g_hotspotCurrentScale = mapFontSize[data.fontSize] || 1;
|
|
// window.g_hotspotCurrentScale = mapFontSize[data.fontSize] || 1;
|
|
|
|
|
|
- window.g_hotspotCurrentScale =
|
|
|
|
- Math.ceil((data.fontSize * 10) / 12) / 10 || 1;
|
|
|
|
|
|
+ window.g_hotspotCurrentScale = Math.ceil((data.fontSize * 10) / 12) / 10 || 1;
|
|
console.log("g_hotspotCurrentScale", g_hotspotCurrentScale);
|
|
console.log("g_hotspotCurrentScale", g_hotspotCurrentScale);
|
|
- let iidx = this.info.scenes.findIndex(
|
|
|
|
- (item) => this.currentScene.sceneCode == item.sceneCode
|
|
|
|
- );
|
|
|
|
|
|
+ let iidx = this.info.scenes.findIndex((item) => this.currentScene.sceneCode == item.sceneCode);
|
|
if (iidx > -1) {
|
|
if (iidx > -1) {
|
|
this.info.scenes[iidx] = {
|
|
this.info.scenes[iidx] = {
|
|
...this.currentScene,
|
|
...this.currentScene,
|
|
@@ -289,24 +237,19 @@ export default {
|
|
this.deleteKRHotspot(data);
|
|
this.deleteKRHotspot(data);
|
|
this.currentScene.someData = this.someData;
|
|
this.currentScene.someData = this.someData;
|
|
this.updateInfo();
|
|
this.updateInfo();
|
|
- this.$msg.success(
|
|
|
|
- this.$i18n.t("hotspot.delete") + this.$i18n.t("hotspot.success")
|
|
|
|
- );
|
|
|
|
|
|
+ this.$msg.success(this.$i18n.t("hotspot.delete") + this.$i18n.t("hotspot.success"));
|
|
},
|
|
},
|
|
open(data) {
|
|
open(data) {
|
|
let hotspotData = null;
|
|
let hotspotData = null;
|
|
|
|
+
|
|
if (data.isAdd) {
|
|
if (data.isAdd) {
|
|
|
|
+ console.error(this.currentScene);
|
|
this.editTitle = this.$i18n.t("hotspot.add");
|
|
this.editTitle = this.$i18n.t("hotspot.add");
|
|
hotspotData = {
|
|
hotspotData = {
|
|
hotspotType: data.hotspotType, // 热点类型,切换场景、图片、视频、音频、链接、文本等等
|
|
hotspotType: data.hotspotType, // 热点类型,切换场景、图片、视频、音频、链接、文本等等
|
|
-
|
|
|
|
|
|
+ navigationId: this.currentScene.id,
|
|
hotspotIconType: "system_icon", // 热点图标的类型,系统图标(system_icon)、自定义图片(custom_image)、序列帧(serial_frame)、个性标签(personalized_tag)
|
|
hotspotIconType: "system_icon", // 热点图标的类型,系统图标(system_icon)、自定义图片(custom_image)、序列帧(serial_frame)、个性标签(personalized_tag)
|
|
- img:
|
|
|
|
- this.$config.getStaticResource("/panoassets/images/hotspot/icon/") +
|
|
|
|
- `img_doticon_${String(data.idxInSystemIconList).padStart(
|
|
|
|
- 2,
|
|
|
|
- "0"
|
|
|
|
- )}.svg`, // 热点图标类型为系统图标时,图标在展时段使用的url
|
|
|
|
|
|
+ img: this.$config.getStaticResource("/panoassets/images/hotspot/icon/") + `img_doticon_${String(data.idxInSystemIconList).padStart(2, "0")}.svg`, // 热点图标类型为系统图标时,图标在展时段使用的url
|
|
icontype: "icon" + data.idxInSystemIconList, // 热点图标类型为系统图标时,图标的id
|
|
icontype: "icon" + data.idxInSystemIconList, // 热点图标类型为系统图标时,图标的id
|
|
customIconInfo: {
|
|
customIconInfo: {
|
|
// 热点图标类型为自定义图标时,图标的数据
|
|
// 热点图标类型为自定义图标时,图标的数据
|
|
@@ -367,10 +310,7 @@ export default {
|
|
};
|
|
};
|
|
|
|
|
|
this.$bus.emit("addhotspot", hotspotData);
|
|
this.$bus.emit("addhotspot", hotspotData);
|
|
- this.$getKrpano().set(
|
|
|
|
- "layer[tooltip_" + hotspotData.name + "].visible",
|
|
|
|
- true
|
|
|
|
- );
|
|
|
|
|
|
+ this.$getKrpano().set("layer[tooltip_" + hotspotData.name + "].visible", true);
|
|
// debugger;
|
|
// debugger;
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
this.$store.commit("tags/setIsConfirmingPosi", hotspotData.name);
|
|
this.$store.commit("tags/setIsConfirmingPosi", hotspotData.name);
|