|
@@ -1,8 +1,11 @@
|
|
|
<template>
|
|
|
<div class="hot-spot-list" app-border dir-left>
|
|
|
<div class="title">
|
|
|
- {{$i18n.t('hotspot.add_hotspot')}}
|
|
|
- <i class="iconfont icon-material_prompt tool-tip-for-editor" v-tooltip="$i18n.t('hotspot.hotspot_tips')" />
|
|
|
+ {{ $i18n.t("hotspot.add_hotspot") }}
|
|
|
+ <i
|
|
|
+ class="iconfont icon-material_prompt tool-tip-for-editor"
|
|
|
+ v-tooltip="$i18n.t('hotspot.hotspot_tips')"
|
|
|
+ />
|
|
|
</div>
|
|
|
|
|
|
<template v-if="currentScene.type !== '4dkk'">
|
|
@@ -11,60 +14,80 @@
|
|
|
class="hotspot-type-item"
|
|
|
v-for="(item, index) in hotspotTypeList"
|
|
|
:key="index"
|
|
|
- @click="open({
|
|
|
- isAdd: true,
|
|
|
- hotspotType: item.id,
|
|
|
- idxInSystemIconList: item.idxInSystemIconList
|
|
|
- })"
|
|
|
+ @click="
|
|
|
+ open({
|
|
|
+ isAdd: true,
|
|
|
+ hotspotType: item.id,
|
|
|
+ idxInSystemIconList: item.idxInSystemIconList,
|
|
|
+ })
|
|
|
+ "
|
|
|
>
|
|
|
- <img class="icon" :src="item.icon" alt="" draggable="false">
|
|
|
- <div class="type-name">{{item.name}}</div>
|
|
|
+ <img class="icon" :src="item.icon" alt="" draggable="false" />
|
|
|
+ <div class="type-name">{{ item.name }}</div>
|
|
|
<img
|
|
|
v-if="item.isExperience"
|
|
|
class="exp-tag"
|
|
|
src="@/assets/img/experience.png"
|
|
|
alt=""
|
|
|
draggable="false"
|
|
|
- >
|
|
|
+ />
|
|
|
</li>
|
|
|
</ul>
|
|
|
|
|
|
- <div class="total-count">{{$i18n.t('hotspot.current_hotspots')}}
|
|
|
+ <div class="total-count">
|
|
|
+ {{ $i18n.t("hotspot.current_hotspots") }}
|
|
|
<span class="number">({{ someData.hotspots.length }})</span>
|
|
|
</div>
|
|
|
<div class="hots">
|
|
|
<ul v-if="someData.hotspots.length > 0">
|
|
|
- <li v-for="(item, key) in someData.hotspots" :key="key" @click="open(item)">
|
|
|
- <img class="hot-spot-thumb" :src="item.img" alt="">
|
|
|
- <span class="hot-spot-title" v-title="item.hotspotTitle">{{ item.hotspotTitle }}</span>
|
|
|
+ <li
|
|
|
+ v-for="(item, key) in someData.hotspots"
|
|
|
+ :key="key"
|
|
|
+ @click="open(item)"
|
|
|
+ >
|
|
|
+ <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"
|
|
|
/>
|
|
|
<div class="deletion-confirm-wrap">
|
|
|
- <div class="deletion-confirm" :class="deleIndex == key ? 'show' : 'hide'" v-clickoutside="clickoutside"
|
|
|
- @click.stop="deleteHot(item)">
|
|
|
- {{$i18n.t('hotspot.delete')}}
|
|
|
+ <div
|
|
|
+ class="deletion-confirm"
|
|
|
+ :class="deleIndex == key ? 'show' : 'hide'"
|
|
|
+ v-clickoutside="clickoutside"
|
|
|
+ @click.stop="deleteHot(item)"
|
|
|
+ >
|
|
|
+ {{ $i18n.t("hotspot.delete") }}
|
|
|
</div>
|
|
|
</div>
|
|
|
</li>
|
|
|
</ul>
|
|
|
<div v-else class="empty-tip">
|
|
|
- <img src="@/assets/images/default/empty_hotspot_list.png" alt="">
|
|
|
- <div>{{$i18n.t('hotspot.no_hotspot')}}</div>
|
|
|
+ <img src="@/assets/images/default/empty_hotspot_list.png" alt="" />
|
|
|
+ <div>{{ $i18n.t("hotspot.no_hotspot") }}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<div class="goto-4dkk-tip" v-if="currentScene.type === '4dkk'">
|
|
|
<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">
|
|
|
- {{$i18n.t('screen.goto_4dkk_edit_tips')}}
|
|
|
+ {{ $i18n.t("screen.goto_4dkk_edit_tips") }}
|
|
|
</div>
|
|
|
</div>
|
|
|
- <button class="ui-button submit" @click="onClickGo4dkk">{{$i18n.t('navigation.go_scene_editor')}}</button>
|
|
|
+ <button class="ui-button submit" @click="onClickGo4dkk">
|
|
|
+ {{ $i18n.t("navigation.go_scene_editor") }}
|
|
|
+ </button>
|
|
|
</div>
|
|
|
|
|
|
<EditPanel
|
|
@@ -79,219 +102,238 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import EditPanel from "./EditPanel"
|
|
|
-import { mapGetters } from "vuex"
|
|
|
-import browser from "@/utils/browser"
|
|
|
+import EditPanel from "./EditPanel";
|
|
|
+import { mapGetters } from "vuex";
|
|
|
+import browser from "@/utils/browser";
|
|
|
import hotspotTypeList from "./hotspotTypeList.js";
|
|
|
|
|
|
let mapFontSize = {
|
|
|
12: 0.5,
|
|
|
17: 1.5,
|
|
|
20: 2,
|
|
|
-}
|
|
|
+};
|
|
|
|
|
|
export default {
|
|
|
- name: 'HotSpotList',
|
|
|
+ name: "HotSpotList",
|
|
|
components: {
|
|
|
EditPanel,
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
hotspotTypeList,
|
|
|
-
|
|
|
+
|
|
|
showPanel: false,
|
|
|
someData: { hotspots: [] },
|
|
|
deleIndex: -1,
|
|
|
- editTitle: '',
|
|
|
- }
|
|
|
+ editTitle: "",
|
|
|
+ };
|
|
|
},
|
|
|
computed: {
|
|
|
...mapGetters({
|
|
|
currentScene: "scene/currentScene",
|
|
|
- hotspot: 'hotspot',
|
|
|
+ hotspot: "hotspot",
|
|
|
info: "info",
|
|
|
}),
|
|
|
},
|
|
|
watch: {
|
|
|
"$route.name": function () {
|
|
|
- this.showPanel = false
|
|
|
+ this.showPanel = false;
|
|
|
},
|
|
|
currentScene: {
|
|
|
immediate: true,
|
|
|
handler: function (newVal) {
|
|
|
- this.someData = newVal.someData || ""
|
|
|
+ this.someData = newVal.someData || "";
|
|
|
if (this.someData) {
|
|
|
- if (typeof this.someData == 'string') {
|
|
|
+ if (typeof this.someData == "string") {
|
|
|
try {
|
|
|
- this.someData = JSON.parse(this.someData)
|
|
|
+ this.someData = JSON.parse(this.someData);
|
|
|
} catch (e) {
|
|
|
- console.error(e)
|
|
|
- return false
|
|
|
+ console.error(e);
|
|
|
+ return false;
|
|
|
}
|
|
|
}
|
|
|
if (!this.someData.hotspots) {
|
|
|
- this.someData.hotspots = []
|
|
|
+ this.someData.hotspots = [];
|
|
|
}
|
|
|
- }
|
|
|
- else {
|
|
|
- this.someData = { hotspots: [] }
|
|
|
+ } else {
|
|
|
+ this.someData = { hotspots: [] };
|
|
|
}
|
|
|
},
|
|
|
},
|
|
|
showPanel(newVal) {
|
|
|
- this.$store.commit("UpdateIsEditingState", newVal)
|
|
|
+ this.$store.commit("UpdateIsEditingState", newVal);
|
|
|
this.$store.commit("tags/setIsConfirmingPosi", false);
|
|
|
},
|
|
|
},
|
|
|
mounted() {
|
|
|
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()
|
|
|
+ );
|
|
|
console.log(hptarget);
|
|
|
- hptarget.ath = data.ath
|
|
|
- hptarget.atv = data.atv
|
|
|
- })
|
|
|
+ hptarget.ath = data.ath;
|
|
|
+ hptarget.atv = data.atv;
|
|
|
+ });
|
|
|
|
|
|
this.$bus.on("openHotspot", (data) => {
|
|
|
- let idx = this.someData.hotspots.findIndex((item) => item.name == data)
|
|
|
+ let idx = this.someData.hotspots.findIndex((item) => item.name == data);
|
|
|
console.log(data);
|
|
|
if (data == this.hotspot.name) {
|
|
|
- window.__krfn.utils.looktohotspot(this.$getKrpano(), this.hotspot.name)
|
|
|
+ window.__krfn.utils.looktohotspot(this.$getKrpano(), this.hotspot.name);
|
|
|
if (!this.showPanel) {
|
|
|
- this.open(this.someData.hotspots[idx])
|
|
|
+ this.open(this.someData.hotspots[idx]);
|
|
|
}
|
|
|
- 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) {
|
|
|
return this.$confirm({
|
|
|
- content: this.$i18n.t('hotspot.close_dialog'),
|
|
|
+ content: this.$i18n.t("hotspot.close_dialog"),
|
|
|
ok: () => {
|
|
|
- this.deleteKRHotspot(this.hotspot)
|
|
|
- this.open(this.someData.hotspots[idx])
|
|
|
- }
|
|
|
- })
|
|
|
+ this.deleteKRHotspot(this.hotspot);
|
|
|
+ this.open(this.someData.hotspots[idx]);
|
|
|
+ },
|
|
|
+ });
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
|
|
|
- this.open(this.someData.hotspots[idx])
|
|
|
-
|
|
|
- })
|
|
|
+ this.open(this.someData.hotspots[idx]);
|
|
|
+ });
|
|
|
},
|
|
|
methods: {
|
|
|
deleteKRHotspot(data) {
|
|
|
- this.$getKrpano().call("removehotspot(" + data.name + ",true);")
|
|
|
- this.$getKrpano().call("removeplugin(" + ("tooltip_" + data.name) + ",true);")
|
|
|
+ this.$getKrpano().call("removehotspot(" + data.name + ",true);");
|
|
|
+ this.$getKrpano().call(
|
|
|
+ "removeplugin(" + ("tooltip_" + data.name) + ",true);"
|
|
|
+ );
|
|
|
},
|
|
|
close(data) {
|
|
|
if (data) {
|
|
|
- if (data.type == 'edit') {
|
|
|
- this.deleteKRHotspot(data.data)
|
|
|
- this.$bus.emit('addhotspot', data.data)
|
|
|
- let idx = this.someData.hotspots.findIndex(item => item.name == data.data.name)
|
|
|
- this.someData.hotspots[idx] = data.data
|
|
|
- }
|
|
|
- else {
|
|
|
- this.deleteKRHotspot(data.data)
|
|
|
+ if (data.type == "edit") {
|
|
|
+ this.deleteKRHotspot(data.data);
|
|
|
+ this.$bus.emit("addhotspot", data.data);
|
|
|
+ let idx = this.someData.hotspots.findIndex(
|
|
|
+ (item) => item.name == data.data.name
|
|
|
+ );
|
|
|
+ this.someData.hotspots[idx] = data.data;
|
|
|
+ } else {
|
|
|
+ this.deleteKRHotspot(data.data);
|
|
|
}
|
|
|
}
|
|
|
- this.showPanel = false
|
|
|
+ this.showPanel = false;
|
|
|
},
|
|
|
|
|
|
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) {
|
|
|
this.info.scenes[iidx] = {
|
|
|
- ...this.currentScene
|
|
|
- }
|
|
|
+ ...this.currentScene,
|
|
|
+ };
|
|
|
}
|
|
|
- this.$store.commit("SetInfo", this.info)
|
|
|
+ this.$store.commit("SetInfo", this.info);
|
|
|
},
|
|
|
save(data) {
|
|
|
- let HV = window.__krfn.utils.getHotspotHV(this.$getKrpano(), data.name)
|
|
|
- data.ath = HV.ath
|
|
|
- data.atv = HV.atv
|
|
|
- let idx = this.someData.hotspots.findIndex((item) => item.name === data.name)
|
|
|
+ let HV = window.__krfn.utils.getHotspotHV(this.$getKrpano(), data.name);
|
|
|
+ data.ath = HV.ath;
|
|
|
+ data.atv = HV.atv;
|
|
|
+ let idx = this.someData.hotspots.findIndex(
|
|
|
+ (item) => item.name === data.name
|
|
|
+ );
|
|
|
if (idx <= -1) {
|
|
|
- this.someData.hotspots.push(data)
|
|
|
- }
|
|
|
- else {
|
|
|
- this.someData.hotspots[idx] = data
|
|
|
+ this.someData.hotspots.push(data);
|
|
|
+ } else {
|
|
|
+ this.someData.hotspots[idx] = data;
|
|
|
}
|
|
|
|
|
|
- this.currentScene.someData = this.someData
|
|
|
- this.$msg.success(this.editTitle + this.$i18n.t('hotspot.success'))
|
|
|
-
|
|
|
- window.g_hotspotCurrentScale = mapFontSize[data.fontSize] || 1
|
|
|
+ this.currentScene.someData = this.someData;
|
|
|
+ this.$msg.success(this.editTitle + this.$i18n.t("hotspot.success"));
|
|
|
|
|
|
+ window.g_hotspotCurrentScale = mapFontSize[data.fontSize] || 1;
|
|
|
|
|
|
- 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) {
|
|
|
this.info.scenes[iidx] = {
|
|
|
- ...this.currentScene
|
|
|
- }
|
|
|
+ ...this.currentScene,
|
|
|
+ };
|
|
|
}
|
|
|
|
|
|
- this.updateInfo()
|
|
|
-
|
|
|
+ this.updateInfo();
|
|
|
},
|
|
|
deleteHot(data) {
|
|
|
this.someData.hotspots.splice(
|
|
|
this.someData.hotspots.findIndex((item) => item.name === data.name),
|
|
|
1
|
|
|
- )
|
|
|
- this.deleteKRHotspot(data)
|
|
|
- this.currentScene.someData = this.someData
|
|
|
- this.updateInfo()
|
|
|
- this.$msg.success(this.$i18n.t('hotspot.delete')+this.$i18n.t('hotspot.success'))
|
|
|
+ );
|
|
|
+ this.deleteKRHotspot(data);
|
|
|
+ this.currentScene.someData = this.someData;
|
|
|
+ this.updateInfo();
|
|
|
+ this.$msg.success(
|
|
|
+ this.$i18n.t("hotspot.delete") + this.$i18n.t("hotspot.success")
|
|
|
+ );
|
|
|
},
|
|
|
open(data) {
|
|
|
- let hotspotData = null
|
|
|
+ let hotspotData = null;
|
|
|
if (data.isAdd) {
|
|
|
- this.editTitle = this.$i18n.t('hotspot.add')
|
|
|
+ this.editTitle = this.$i18n.t("hotspot.add");
|
|
|
hotspotData = {
|
|
|
hotspotType: data.hotspotType, // 热点类型,切换场景、图片、视频、音频、链接、文本等等
|
|
|
-
|
|
|
- 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
|
|
|
- icontype: 'icon' + data.idxInSystemIconList, // 热点图标类型为系统图标时,图标的id
|
|
|
- customIconInfo: { // 热点图标类型为自定义图标时,图标的数据
|
|
|
- img: '',
|
|
|
+
|
|
|
+ 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
|
|
|
+ icontype: "icon" + data.idxInSystemIconList, // 热点图标类型为系统图标时,图标的id
|
|
|
+ customIconInfo: {
|
|
|
+ // 热点图标类型为自定义图标时,图标的数据
|
|
|
+ img: "",
|
|
|
},
|
|
|
- serialFrameInfo: { // 热点图标类型为序列帧时,序列帧的数据
|
|
|
- url: '',
|
|
|
+ serialFrameInfo: {
|
|
|
+ // 热点图标类型为序列帧时,序列帧的数据
|
|
|
+ url: "",
|
|
|
frameNumber: 0, // 总帧数
|
|
|
duration: 0, // 总播放时长(秒)
|
|
|
},
|
|
|
- personalizedTagInfo: { // 热点图标类型为个性标签时,个性标签的数据
|
|
|
+ personalizedTagInfo: {
|
|
|
+ // 热点图标类型为个性标签时,个性标签的数据
|
|
|
isShowLine: true,
|
|
|
- lineDirection: 'left-top',
|
|
|
- fillColor: 'rgba(0, 0, 0, 1)',
|
|
|
- borderColor: 'rgba(0, 0, 0, 1)',
|
|
|
- textColor: 'rgba(0, 0, 0, 1)',
|
|
|
- textDirection: 'left-right',
|
|
|
+ lineDirection: "left-top",
|
|
|
+ fillColor: "rgba(0, 0, 0, 1)",
|
|
|
+ borderColor: "rgba(0, 0, 0, 1)",
|
|
|
+ textColor: "rgba(0, 0, 0, 1)",
|
|
|
+ textDirection: "left-right",
|
|
|
isTextWrap: false,
|
|
|
textNumPerLine: 10,
|
|
|
},
|
|
|
name: "_" + this.$randomWord(true, 8, 8),
|
|
|
- hotspotTitle: this.$i18n.t('hotspot.click_to_comfirm'),
|
|
|
+ hotspotTitle: this.$i18n.t("hotspot.click_to_comfirm"),
|
|
|
fontSize: 12,
|
|
|
- type: '',
|
|
|
- link: '',
|
|
|
- titleDisplayMode: 'always', // 'always' | 'never' | 'hover' 标题显示方式
|
|
|
- titlePosition: 'top', // 'top' | 'bottom' | 'left' | 'right' | 'custom' 标题相对图标位置
|
|
|
- ath: '',
|
|
|
- atv: '',
|
|
|
+ type: "",
|
|
|
+ link: "",
|
|
|
+ titleDisplayMode: "always", // 'always' | 'never' | 'hover' 标题显示方式
|
|
|
+ titlePosition: "top", // 'top' | 'bottom' | 'left' | 'right' | 'custom' 标题相对图标位置
|
|
|
+ ath: "",
|
|
|
+ atv: "",
|
|
|
size: 1,
|
|
|
secne: null,
|
|
|
- hyperlink: '',
|
|
|
- textarea: '',
|
|
|
+ hyperlink: "",
|
|
|
+ textarea: "",
|
|
|
image: [], // 热点类型为图片时,图片列表
|
|
|
- audio: '',
|
|
|
- video: '',
|
|
|
- imageTextInfo: { // 热点类型为图文时,图文内容
|
|
|
+ audio: "",
|
|
|
+ video: "",
|
|
|
+ imageTextInfo: {
|
|
|
+ // 热点类型为图文时,图文内容
|
|
|
imageList: [],
|
|
|
- text: '',
|
|
|
+ text: "",
|
|
|
isApplyToAll: true,
|
|
|
audio: {
|
|
|
// ancestors: "",
|
|
@@ -313,104 +355,117 @@ export default {
|
|
|
// type: "audio",
|
|
|
// updateTime: "2022-11-01 19:49",
|
|
|
// userId: "13825625448",
|
|
|
- }
|
|
|
+ },
|
|
|
},
|
|
|
- phoneInfo: { // 热点类型为电话时,对应数据
|
|
|
- phone: '',
|
|
|
+ phoneInfo: {
|
|
|
+ // 热点类型为电话时,对应数据
|
|
|
+ phone: "",
|
|
|
},
|
|
|
- pdfInfo: { // 热点类型为pdf时,对应数据
|
|
|
- name: '',
|
|
|
- url: '',
|
|
|
+ pdfInfo: {
|
|
|
+ // 热点类型为pdf时,对应数据
|
|
|
+ name: "",
|
|
|
+ url: "",
|
|
|
},
|
|
|
articleInfo: {
|
|
|
- html: '',
|
|
|
- }
|
|
|
- }
|
|
|
+ html: "",
|
|
|
+ },
|
|
|
+ };
|
|
|
+
|
|
|
+ this.$bus.emit("addhotspot", hotspotData);
|
|
|
+ this.$getKrpano().set(
|
|
|
+ "layer[tooltip_" + hotspotData.name + "].visible",
|
|
|
+ true
|
|
|
+ );
|
|
|
+ setTimeout(() => {
|
|
|
+ this.$store.commit("tags/setIsConfirmingPosi", hotspotData.name);
|
|
|
+ }, 0);
|
|
|
+
|
|
|
+ console.log("hotspotData", hotspotData);
|
|
|
} else {
|
|
|
- hotspotData = browser.CloneObject(data)
|
|
|
+ hotspotData = browser.CloneObject(data);
|
|
|
/**
|
|
|
* v1.3新增
|
|
|
*/
|
|
|
if (!hotspotData.hotspotIconType) {
|
|
|
- hotspotData.hotspotIconType = 'system_icon'
|
|
|
+ hotspotData.hotspotIconType = "system_icon";
|
|
|
}
|
|
|
if (!hotspotData.customIconInfo) {
|
|
|
- hotspotData.customIconInfo = {
|
|
|
- img: '',
|
|
|
- }
|
|
|
+ hotspotData.customIconInfo = {
|
|
|
+ img: "",
|
|
|
+ };
|
|
|
}
|
|
|
if (!hotspotData.serialFrameInfo) {
|
|
|
hotspotData.serialFrameInfo = {
|
|
|
- url: '',
|
|
|
+ url: "",
|
|
|
frameNumber: 0,
|
|
|
duration: 0,
|
|
|
- }
|
|
|
+ };
|
|
|
}
|
|
|
hotspotData.personalizedTagInfo = {
|
|
|
isShowLine: true,
|
|
|
- lineDirection: 'left-top',
|
|
|
- fillColor: 'rgba(0, 0, 0, 1)',
|
|
|
- borderColor: 'rgba(0, 0, 0, 1)',
|
|
|
- textColor: 'rgba(0, 0, 0, 1)',
|
|
|
- textDirection: 'left-right',
|
|
|
+ lineDirection: "left-top",
|
|
|
+ fillColor: "rgba(0, 0, 0, 1)",
|
|
|
+ borderColor: "rgba(0, 0, 0, 1)",
|
|
|
+ textColor: "rgba(0, 0, 0, 1)",
|
|
|
+ textDirection: "left-right",
|
|
|
isTextWrap: false,
|
|
|
textNumPerLine: 10,
|
|
|
- }
|
|
|
+ };
|
|
|
// v1.3把visible: Boolean换成了titleDisplayMode
|
|
|
if (hotspotData.visible) {
|
|
|
- hotspotData.titleDisplayMode = 'always'
|
|
|
+ hotspotData.titleDisplayMode = "always";
|
|
|
} else if (hotspotData.visible === false) {
|
|
|
- hotspotData.titleDisplayMode = 'never'
|
|
|
+ hotspotData.titleDisplayMode = "never";
|
|
|
}
|
|
|
if (!hotspotData.titlePosition) {
|
|
|
- hotspotData.titlePosition = 'top'
|
|
|
+ hotspotData.titlePosition = "top";
|
|
|
}
|
|
|
if (!hotspotData.imageTextInfo) {
|
|
|
hotspotData.imageTextInfo = {
|
|
|
imageList: [],
|
|
|
- text: '',
|
|
|
+ text: "",
|
|
|
isApplyToAll: true,
|
|
|
- audio: {}
|
|
|
- }
|
|
|
+ audio: {},
|
|
|
+ };
|
|
|
}
|
|
|
if (!hotspotData.phoneInfo) {
|
|
|
hotspotData.phoneInfo = {
|
|
|
- phone: '',
|
|
|
- }
|
|
|
+ phone: "",
|
|
|
+ };
|
|
|
}
|
|
|
if (!hotspotData.pdfInfo) {
|
|
|
hotspotData.pdfInfo = {
|
|
|
- name: '',
|
|
|
- url: '',
|
|
|
- }
|
|
|
+ name: "",
|
|
|
+ url: "",
|
|
|
+ };
|
|
|
}
|
|
|
if (!hotspotData.articleInfo) {
|
|
|
hotspotData.articleInfo = {
|
|
|
- html: '',
|
|
|
- }
|
|
|
+ html: "",
|
|
|
+ };
|
|
|
}
|
|
|
/**
|
|
|
* end of v1.3新增
|
|
|
*/
|
|
|
}
|
|
|
- this.$store.commit("SetHotspot", hotspotData)
|
|
|
- this.showPanel = true
|
|
|
+ this.$store.commit("SetHotspot", hotspotData);
|
|
|
+ this.showPanel = true;
|
|
|
|
|
|
if (!data.isAdd) {
|
|
|
- this.editTitle = this.$i18n.t('hotspot.edit')
|
|
|
- window.__krfn.utils.looktohotspot(this.$getKrpano(), data.name)
|
|
|
+ this.editTitle = this.$i18n.t("hotspot.edit");
|
|
|
+ window.__krfn.utils.looktohotspot(this.$getKrpano(), data.name);
|
|
|
}
|
|
|
},
|
|
|
clickoutside() {
|
|
|
if (this.deleIndex > -1) {
|
|
|
- this.deleIndex = -1
|
|
|
+ this.deleIndex = -1;
|
|
|
}
|
|
|
},
|
|
|
onClickGo4dkk() {
|
|
|
- window.open('/#/scene')
|
|
|
+ window.open("/#/scene");
|
|
|
},
|
|
|
},
|
|
|
-}
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style lang="less" scoped>
|
|
@@ -428,7 +483,7 @@ export default {
|
|
|
flex: 0 0 auto;
|
|
|
margin-bottom: 24px;
|
|
|
|
|
|
- >i {
|
|
|
+ > i {
|
|
|
font-size: 12px;
|
|
|
position: relative;
|
|
|
top: -2px;
|
|
@@ -459,7 +514,7 @@ export default {
|
|
|
}
|
|
|
> .type-name {
|
|
|
font-size: 12px;
|
|
|
- color: #FFFFFF;
|
|
|
+ color: #ffffff;
|
|
|
}
|
|
|
> .exp-tag {
|
|
|
position: absolute;
|
|
@@ -475,7 +530,7 @@ export default {
|
|
|
flex: 0 0 auto;
|
|
|
margin-top: 24px;
|
|
|
font-size: 18px;
|
|
|
- color: #FFFFFF;
|
|
|
+ color: #ffffff;
|
|
|
|
|
|
.number {
|
|
|
font-size: 14px;
|
|
@@ -489,7 +544,7 @@ export default {
|
|
|
flex: 1 0 1px;
|
|
|
margin-top: 16px;
|
|
|
background: available;
|
|
|
- background: #1A1B1D;
|
|
|
+ background: #1a1b1d;
|
|
|
border-radius: 4px;
|
|
|
border: 1px solid #404040;
|
|
|
position: relative;
|
|
@@ -514,11 +569,11 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- >.hot-spot-thumb {
|
|
|
+ > .hot-spot-thumb {
|
|
|
width: 18px;
|
|
|
}
|
|
|
|
|
|
- >.hot-spot-title {
|
|
|
+ > .hot-spot-title {
|
|
|
flex: 1 1 auto;
|
|
|
margin-left: 10px;
|
|
|
text-overflow: ellipsis;
|
|
@@ -526,7 +581,7 @@ export default {
|
|
|
white-space: nowrap;
|
|
|
}
|
|
|
|
|
|
- >.icon-delete {
|
|
|
+ > .icon-delete {
|
|
|
margin-left: 12px;
|
|
|
display: none;
|
|
|
cursor: pointer;
|
|
@@ -537,7 +592,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- >.deletion-confirm-wrap {
|
|
|
+ > .deletion-confirm-wrap {
|
|
|
position: absolute;
|
|
|
top: 0;
|
|
|
bottom: 0;
|
|
@@ -548,12 +603,12 @@ export default {
|
|
|
border-top-right-radius: 2px;
|
|
|
border-bottom-right-radius: 2px;
|
|
|
|
|
|
- >.deletion-confirm {
|
|
|
+ > .deletion-confirm {
|
|
|
position: absolute;
|
|
|
top: 0;
|
|
|
bottom: 0;
|
|
|
width: 100%;
|
|
|
- background: #FA5555;
|
|
|
+ background: #fa5555;
|
|
|
transition: right 0.3s;
|
|
|
cursor: pointer;
|
|
|
text-align: center;
|
|
@@ -562,7 +617,7 @@ export default {
|
|
|
pointer-events: auto;
|
|
|
|
|
|
&::after {
|
|
|
- content: '';
|
|
|
+ content: "";
|
|
|
height: 100%;
|
|
|
vertical-align: middle;
|
|
|
display: inline-block;
|
|
@@ -612,7 +667,6 @@ export default {
|
|
|
width: 100%;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
.goto-4dkk-tip {
|
|
|
> .img-wrap {
|
|
|
position: relative;
|