浏览代码

编辑器-热点-新增热点时,根据热点类型,提供相应的系统图标作为初始设置。

任一存 2 年之前
父节点
当前提交
8b99648aac

+ 0 - 1
packages/qjkankan-editor/src/views/hotspot/EditPanel.vue

@@ -203,7 +203,6 @@ export default {
         min: 0.5,
         min: 0.5,
         max: 2,
         max: 2,
       },
       },
-      isAdd: true,
     }
     }
   },
   },
   watch: {
   watch: {

+ 5 - 5
packages/qjkankan-editor/src/views/hotspot/HotSpotList.vue

@@ -12,6 +12,7 @@
         @click="open({
         @click="open({
           isAdd: true,
           isAdd: true,
           hotspotType: item.id,
           hotspotType: item.id,
+          idxInSystemIconList: item.idxInSystemIconList
         })"
         })"
       >
       >
         <img class="icon" :src="item.icon" alt="" draggable="false">
         <img class="icon" :src="item.icon" alt="" draggable="false">
@@ -238,8 +239,8 @@ export default {
           hotspotType: data.hotspotType, // 热点类型,切换场景、图片、视频、音频、链接、文本等等
           hotspotType: data.hotspotType, // 热点类型,切换场景、图片、视频、音频、链接、文本等等
           
           
           hotspotIconType: 'system_icon', // 热点图标的类型,系统图标(system_icon)、自定义图片(custom_image)、序列帧(serial_frame)、个性标签(personalized_tag)
           hotspotIconType: 'system_icon', // 热点图标的类型,系统图标(system_icon)、自定义图片(custom_image)、序列帧(serial_frame)、个性标签(personalized_tag)
-          img: 'static/panoassets/images/hotspot/icon/img_doticon_01.svg', // 热点图标类型为系统图标时,,图标的url
-          icontype: 'icon1', // 热点图标类型为系统图标时,图标的id
+          img: this.$config.getStaticResource('/panoassets/images/hotspot/icon/') + `img_doticon_${String(data.idxInSystemIconList).padStart(2, '0')}.svg`, // 热点图标类型为系统图标时,图标在展时段使用的url
+          icontype: 'icon' + data.idxInSystemIconList, // 热点图标类型为系统图标时,图标的id
           customIconInfo: { // 热点图标类型为自定义图标时,图标的数据
           customIconInfo: { // 热点图标类型为自定义图标时,图标的数据
             img: '',
             img: '',
           },
           },
@@ -268,10 +269,10 @@ export default {
           ath: '',
           ath: '',
           atv: '',
           atv: '',
           size: 1,
           size: 1,
-          secne: '',
+          secne: null,
           hyperlink: '',
           hyperlink: '',
           textarea: '',
           textarea: '',
-          image: [],
+          image: [], // 热点类型为图片时,图片列表
           audio: '',
           audio: '',
           video: '',
           video: '',
           imageTextInfo: { // 热点类型为图文时,图文内容
           imageTextInfo: { // 热点类型为图文时,图文内容
@@ -378,7 +379,6 @@ export default {
          * end of v1.3新增
          * end of v1.3新增
          */
          */
       }
       }
-
       this.$store.commit("SetHotspot", hotspotData)
       this.$store.commit("SetHotspot", hotspotData)
       this.showPanel = true
       this.showPanel = true
 
 

+ 11 - 0
packages/qjkankan-editor/src/views/hotspot/hotspotTypeList.js

@@ -3,60 +3,70 @@ import { i18n } from "@/lang"
 export default [
 export default [
   {
   {
     icon: require('@/assets/images/icons/hotspot-type/scene.png'),
     icon: require('@/assets/images/icons/hotspot-type/scene.png'),
+    idxInSystemIconList: 1,
     name: i18n.t('hotspot.scene'),
     name: i18n.t('hotspot.scene'),
     id: 'scene',
     id: 'scene',
     isExperience: false,
     isExperience: false,
   },
   },
   {
   {
     icon: require('@/assets/images/icons/hotspot-type/image.png'),
     icon: require('@/assets/images/icons/hotspot-type/image.png'),
+    idxInSystemIconList: 8,
     name: i18n.t('hotspot.image'),
     name: i18n.t('hotspot.image'),
     id: 'image',
     id: 'image',
     isExperience: false,
     isExperience: false,
   },
   },
   {
   {
     icon: require('@/assets/images/icons/hotspot-type/video.png'),
     icon: require('@/assets/images/icons/hotspot-type/video.png'),
+    idxInSystemIconList: 11,
     name: i18n.t('hotspot.video'),
     name: i18n.t('hotspot.video'),
     id: 'video',
     id: 'video',
     isExperience: false,
     isExperience: false,
   },
   },
   {
   {
     icon: require('@/assets/images/icons/hotspot-type/audio.png'),
     icon: require('@/assets/images/icons/hotspot-type/audio.png'),
+    idxInSystemIconList: 10,
     name: i18n.t('hotspot.audio'),
     name: i18n.t('hotspot.audio'),
     id: 'audio',
     id: 'audio',
     isExperience: false,
     isExperience: false,
   },
   },
   {
   {
     icon: require('@/assets/images/icons/hotspot-type/link.png'),
     icon: require('@/assets/images/icons/hotspot-type/link.png'),
+    idxInSystemIconList: 9,
     name: i18n.t('hotspot.link'),
     name: i18n.t('hotspot.link'),
     id: 'link',
     id: 'link',
     isExperience: false,
     isExperience: false,
   },
   },
   {
   {
     icon: require('@/assets/images/icons/hotspot-type/textarea.png'),
     icon: require('@/assets/images/icons/hotspot-type/textarea.png'),
+    idxInSystemIconList: 12,
     name: i18n.t('hotspot.textarea'),
     name: i18n.t('hotspot.textarea'),
     id: 'textarea',
     id: 'textarea',
     isExperience: false,
     isExperience: false,
   },
   },
   {
   {
     icon: require('@/assets/images/icons/hotspot-type/tag.png'),
     icon: require('@/assets/images/icons/hotspot-type/tag.png'),
+    idxInSystemIconList: 13,
     name: i18n.t('hotspot.tag'),
     name: i18n.t('hotspot.tag'),
     id: 'tag',
     id: 'tag',
     isExperience: true,
     isExperience: true,
   },
   },
   {
   {
     icon: require('@/assets/images/icons/hotspot-type/image-text.png'),
     icon: require('@/assets/images/icons/hotspot-type/image-text.png'),
+    idxInSystemIconList: 14,
     name: i18n.t('hotspot.image_text'),
     name: i18n.t('hotspot.image_text'),
     id: 'imageText',
     id: 'imageText',
     isExperience: true,
     isExperience: true,
   },
   },
   {
   {
     icon: require('@/assets/images/icons/hotspot-type/article.png'),
     icon: require('@/assets/images/icons/hotspot-type/article.png'),
+    idxInSystemIconList: 14,
     name: i18n.t('hotspot.article'),
     name: i18n.t('hotspot.article'),
     id: 'article',
     id: 'article',
     isExperience: true,
     isExperience: true,
   },
   },
   {
   {
     icon: require('@/assets/images/icons/hotspot-type/pdf.png'),
     icon: require('@/assets/images/icons/hotspot-type/pdf.png'),
+    idxInSystemIconList: 15,
     name: i18n.t('hotspot.pdf'),
     name: i18n.t('hotspot.pdf'),
     id: 'pdf',
     id: 'pdf',
     isExperience: true,
     isExperience: true,
@@ -64,6 +74,7 @@ export default [
   },
   },
   {
   {
     icon: require('@/assets/images/icons/hotspot-type/phone.png'),
     icon: require('@/assets/images/icons/hotspot-type/phone.png'),
+    idxInSystemIconList: 16,
     name: i18n.t('hotspot.phone'),
     name: i18n.t('hotspot.phone'),
     id: 'phone',
     id: 'phone',
     isExperience: true,
     isExperience: true,