tremble 2 سال پیش
والد
کامیت
c053352e87

+ 1 - 1
packages/qjkankan-editor/src/components/materialSelectorForEditor.vue

@@ -268,7 +268,7 @@
                   alt=""
                 > -->
                 <AudioIconCanPlay
-                  class="icon"
+                  class="audio-player"
                   :vKey="item.successInfo.id"
                   :idleft="`_${$randomWord(true, 8, 8)}`"
                   :idright="`_${$randomWord(true, 8, 8)}`"

+ 5 - 0
packages/qjkankan-editor/src/components/sceneGroupInEditor.vue

@@ -249,6 +249,7 @@ export default {
     },
     onClickForRename() {
       this.isRenaming = true
+      console.log(this.groupNode.name);
       this.newName = this.groupNode.name
       this.$nextTick(() => {
         // this.$refs['input-for-rename'].focus()
@@ -260,6 +261,10 @@ export default {
     },
     onInputNewNameComplete() {
       this.isRenaming = false
+      console.log(this.groupNode.name);
+      if (!this.newName.trim()) {
+        return 
+      }
       if (this.newName !== this.groupNode.name) {
         this.$emit('renameGroup', this.groupNode.id, this.level, this.newName)
       }

+ 13 - 5
packages/qjkankan-editor/src/core/angle.js

@@ -1,6 +1,11 @@
+
+import Vue from 'vue'
+let vue = new Vue()
+
+
 export default class Angle {
-  constructor(){
-    
+  constructor() {
+
   }
 
   /**
@@ -11,12 +16,15 @@ export default class Angle {
    * @param {*} atv 
    * @param {*} hotspotType 
    */
-  updateHotSpotData(hsName,ath,atv){
+  updateHotSpotData(hsName, hpname, ath, atv) {
     this.ath = ath;
     this.atv = atv;
+    if (ath && atv ) {
+      vue.$bus.emit('updateHotSpotHV', { hsName, hpname, ath, atv })
+    }
   }
-  
-  radarRotate(sceneName,hlookat){
+
+  radarRotate(sceneName, hlookat) {
     // console.log(sceneName,hlookat);
   }
 }

+ 0 - 1
packages/qjkankan-editor/src/core/utils.js

@@ -179,7 +179,6 @@ export default class Utils {
       vue.$bus.emit('clickHotspot', id)
     }
     else if (window.location.pathname.indexOf('edit') > -1) {
-      console.log(id);
       vue.$bus.emit('openHotspot', id)
     }
     else {

+ 3 - 3
packages/qjkankan-editor/src/framework/play/pano/components/list.vue

@@ -65,6 +65,7 @@ export default {
       deep: true,
       handler: function (newVal) {
         if (newVal.scenes) {
+          this.$store.commit("scene/setScenes", newVal.scenes);
           if (!this.show) {
             this.show = true;
             this.loadList();
@@ -97,8 +98,8 @@ export default {
           ["#swcatalogRoot", "#swSecondary", "#swScenes"].forEach((item) => {
             new Swiper(item, {
               slidesPerView: "auto",
-              centeredSlides: true,
               spaceBetween: 10,
+              centeredSlides: true,
               centerInsufficientSlides: true,
               centeredSlidesBounds: true,
               freeMode: true,
@@ -142,6 +143,7 @@ export default {
   text-align: center;
   max-width: @width;
   overflow: hidden;
+  min-width: 480px;
   transition: 0.3s all ease;
 
   .swiper-container {
@@ -243,8 +245,6 @@ export default {
   }
 
   #swScenes {
-    margin: 0 auto;
-
     >ul {
       >li {
         cursor: pointer;

+ 3 - 1
packages/qjkankan-editor/src/mixins/index.js

@@ -123,7 +123,9 @@ Vue.mixin({
     clickwindow: clickwindow,
   },
   data() {
-    return {};
+    return {
+      g_hotspotCurrentScale:1
+    };
   },
   methods: {
     $alert(data = {}) {

+ 3 - 0
packages/qjkankan-editor/src/pages/edit.js

@@ -10,6 +10,9 @@ import '@/directives/vTooltipInEditor.js'
 
 console.log('v0801.0834');
 
+// 热点图标默认大小
+window.g_hotspotCurrentScale = 1
+
 Vue.use(Viewer,{
   defaultOptions: {
     toolbar: 0,

+ 10 - 0
packages/qjkankan-editor/src/views/base/Toolbar.vue

@@ -18,6 +18,7 @@
           <div class="title-input-wrapper">
             <input
               v-model.trim="info.name"
+              @input="emojistr" 
               @keydown.enter="onTitleInputEnter"
               type="text"
               autocomplete="new-password"
@@ -130,6 +131,15 @@ export default {
   watch: {
   },
   methods: {
+    emojistr() {
+      this.info.name = this.info.name.replace(/[\ud800-\udbff][\udc00-\udfff]/g, function (char) {
+        if (char.length === 2) {
+          return ""
+        } else {
+          return char;
+        }
+      });
+    },
     onEditorChange(content){
       this.info.description = content.html
       this.jianjieLength = content.size

+ 4 - 4
packages/qjkankan-editor/src/views/base/customLogoSettings.vue

@@ -13,17 +13,17 @@
           @cancel="onClickCancelCustomLogo"
         ></SelectedImage>
       <div class="bottom-right">
-        <!-- <img 
+        <img 
           class="select-pic-btn"
           :src="require('@/assets/images/select_pic_btn.png')" alt=""
           @click="onClickSelectingPicBtn"
-        > -->
-        <button
+        >
+        <!-- <button
           class="ui-button submit"
           @click="onClickSelectingPicBtn"
         >
           选择图片
-        </button>
+        </button> -->
         <div class="remark">
           300*300px,600kb以内,支持<br>
           jpg/png格式

+ 227 - 167
packages/qjkankan-editor/src/views/hotspot/EditPanel.vue

@@ -1,13 +1,9 @@
 <template>
-  <transition
-    appear
-    name="custom-classes-transition"
-    enter-active-class="animated slideInRight speed"
-    leave-active-class="animated slideOutRight speed"
-  >
+  <transition appear name="custom-classes-transition" enter-active-class="animated slideInRight speed"
+    leave-active-class="animated slideOutRight speed">
     <div class="hots-panel" v-show="show">
       <div class="ui-between header">
-        <span>{{editTitle}}热点</span>
+        <span>{{ editTitle }}热点</span>
         <i class="iconfont icon_close" @click="confirmCancel"></i>
       </div>
       <div class="content" ref="content">
@@ -17,12 +13,8 @@
           <div class="icon-list">
             <div class="margin-handler-layer">
               <ul>
-                <li
-                  :class="{ active: item.id == hotspot.icontype }"
-                  v-for="(item,i) in hotStyle"
-                  @click="addhotspot(item)"
-                  :key="i"
-                >
+                <li :class="{ active: item.id == hotspot.icontype }" v-for="(item, i) in hotStyle"
+                  @click="addhotspot(item)" :key="i">
                   <img :src="item.thumb" alt="">
                 </li>
               </ul>
@@ -39,52 +31,25 @@
             <Switcher :value="hotspot.visible" @change="hotspot.visible = !hotspot.visible"></Switcher>
           </div>
           <div class="title-input-wrapper">
-            <input
-              v-model.trim="hotspot.hotspotTitle"
-              type="text"
-              maxlength="50"
-              placeholder="请输入标题,限50字"
-            />
-            <span class="count">{{hotspot.hotspotTitle.length}}/50</span>
+            <input v-model.trim="hotspot.hotspotTitle" type="text" maxlength="50" placeholder="请输入标题,限50字" />
+            <span class="count">{{ hotspot.hotspotTitle.length }}/50</span>
           </div>
         </div>
         <div class="effect-setting">
           <div class="effect-setting-title">效果设置</div>
-          <combox
-            class="combox"
-            :data="hotSpotTypeList"
-            :selected-id="hotspot.hotspotType"
-            :bottomSpace="comboxBottomSpace"
-            @change="onhotSpotTypeChange"
-          ></combox>
-          <component
-            class="effect-setting-component"
-          
-            @sceneSelect="handleSceneSelect" 
-            :scene="hotspot.secne"
-
-            @imageChange="data=>{hotspot.image=data}" 
-            :image="hotspot.image"
-
-            @linkChange="data=>{hotspot.hyperlink=data}" 
-            :link="hotspot.hyperlink"
-
-            @textChange="data=>{hotspot.textarea=data}" 
-            :textarea="hotspot.textarea"
-
-            @audioChange="data=>{hotspot.audio=data}" 
-            :audio="hotspot.audio"
-
-            @videoChange="data=>{hotspot.video=data}" 
-            :video="hotspot.video"
-            
-            :is="effectSettingComponent"
-          />
+          <combox class="combox" :data="hotSpotTypeList" :selected-id="hotspot.hotspotType"
+            :bottomSpace="comboxBottomSpace" @change="onhotSpotTypeChange"></combox>
+          <component class="effect-setting-component" @sceneSelect="handleSceneSelect" :scene="hotspot.secne"
+            @imageChange="data => { hotspot.image = data }" :image="hotspot.image"
+            @linkChange="data => { hotspot.hyperlink = data }" :link="hotspot.hyperlink"
+            @textChange="data => { hotspot.textarea = data }" :textarea="hotspot.textarea"
+            @audioChange="data => { hotspot.audio = data }" :audio="hotspot.audio"
+            @videoChange="data => { hotspot.video = data }" :video="hotspot.video" :is="effectSettingComponent" />
         </div>
       </div>
       <div class="ui-between footer" app-border dir-top>
-        <button class="ui-button deepcancel"  :class="{disable: false}" @click="confirmCancel">取消</button>
-        <button class="ui-button submit"  :class="{disable: false}" @click="save">完成</button>
+        <button class="ui-button deepcancel" :class="{ disable: false }" @click="confirmCancel">取消</button>
+        <button class="ui-button submit" :class="{ disable: false }" @click="save">完成</button>
       </div>
     </div>
   </transition>
@@ -96,83 +61,100 @@ import Combox from "@/components/shared/Combox";
 import { mapGetters } from "vuex";
 import Switcher from "@/components/shared/Switcher.vue";
 
+let comparisonKey = [
+  'fontSize',
+  'hotspotTitle',
+  'hotspotType',
+  'hyperlink',
+  'icontype',
+  'image',
+  'img',
+  'link',
+  'secne',
+  'size',
+  'textarea',
+  'type',
+  'video'
+]
+
 let HTMap = {
-  scene:{
-    key:'secne',
-    type:'Object',
-    errortxt:'请选择场景'
+  scene: {
+    key: 'secne',
+    type: 'Object',
+    errortxt: '请选择场景'
   },
-  audio:{
-    key:'audio',
-    type:'String',
-    errortxt:'请选择音频'
+  audio: {
+    key: 'audio',
+    type: 'String',
+    errortxt: '请选择音频'
   },
-   video:{
-    key:'video',
-    type:'String',
-    errortxt:'请选择视频'
+  video: {
+    key: 'video',
+    type: 'String',
+    errortxt: '请选择视频'
   },
-   image:{
-    key:'image',
-    type:'Array',
-    errortxt:'请选择图片'
+  image: {
+    key: 'image',
+    type: 'Array',
+    errortxt: '请选择图片'
   },
-  link:{
-    key:'hyperlink',
-    type:'String',
-    errortxt:'请输入超链接'
+  link: {
+    key: 'hyperlink',
+    type: 'String',
+    errortxt: '请输入超链接'
   },
-  textarea:{
-    key:'textarea',
-    type:'String',
-    errortxt:'请输入文本'
+  textarea: {
+    key: 'textarea',
+    type: 'String',
+    errortxt: '请输入文本'
   }
 }
 
+
 export default {
-  props: ['show','data','editTitle'],
-  components:{
+  props: ['show', 'data', 'editTitle'],
+  components: {
     RangeItem,
     Combox,
     Switcher,
   },
-  data(){
+  data() {
     let cdn = this.$config.getStaticResource('/panoassets/images/hotspot/icon/')
     let hotStyle = []
 
     for (let i = 0; i < 12; i++) {
       hotStyle[i] = {
-        id:'icon'+(i+1),
-        img:cdn+`img_doticon_${String(i+1).padStart(2, '0')}.svg`,
-        thumb:cdn+`img_doticon_${String(i+1).padStart(2, '0')}.svg`
+        id: 'icon' + (i + 1),
+        img: cdn + `img_doticon_${String(i + 1).padStart(2, '0')}.svg`,
+        thumb: cdn + `img_doticon_${String(i + 1).padStart(2, '0')}.svg`
       }
     }
     return {
-      canSave:false,
-      hotSpotTypeList:[
+      canSave: false,
+      hotSpotTypeList: [
         {
-          id:'scene',
-          name:'场景切换'
+          id: 'scene',
+          name: '场景切换'
         },
         {
-          id:'link',
-          name:'超链接'
+          id: 'link',
+          name: '超链接'
         },
         {
-          id:'textarea',
-          name:'文本'
+          id: 'textarea',
+          name: '文本'
         },
         {
-          id:'image',
-          name:'图片'
+          id: 'image',
+          name: '图片'
         },
         {
-          id:'audio',
-          name:'音频'
+          id: 'audio',
+          name: '音频'
         },
         {
-          id:'video',
-          name:'视频'
+          id: 'video',
+          name: '视频'
         }
       ],
       hotStyle,
@@ -184,33 +166,33 @@ export default {
         min: 0.5,
         max: 2,
       },
-      selectItem:'',
-      styIcon:'',
-      linkicon:'',
+      selectItem: '',
+      styIcon: '',
+      linkicon: '',
       infoItem: '',
-      isAdd:true,
+      isAdd: true,
       comboxBottomSpace: 0,
     }
   },
 
-  watch:{
-    'hotspot.hotspotTitle':function () {
-      this.$getKrpano().set('layer[tooltip_'+this.hotspot.name+'].html',this.hotspot.hotspotTitle)
+  watch: {
+    'hotspot.hotspotTitle': function () {
+      this.$getKrpano().set('layer[tooltip_' + this.hotspot.name + '].html', this.hotspot.hotspotTitle)
     },
-    'hotspot.visible':function () {
-      this.$getKrpano().set('layer[tooltip_'+this.hotspot.name+'].visible',this.hotspot.visible)
+    'hotspot.visible': function () {
+      this.$getKrpano().set('layer[tooltip_' + this.hotspot.name + '].visible', this.hotspot.visible)
     },
     'hotspot.size': {
-      immediate:true,
-      handler:function (newVal) {
+      immediate: true,
+      handler: function (newVal) {
         let h = 52
-        let scaleH = h*newVal
+        let scaleH = h * newVal
 
         let offset = '-130%'
 
         this.rang = { ...this.rang, value: newVal }
-        this.$getKrpano().set(`hotspot[${this.hotspot.name}].height`,scaleH)
-        
+        this.$getKrpano().set(`hotspot[${this.hotspot.name}].height`, scaleH)
+
         if (newVal < 1) {
           offset = '-200%'
         }
@@ -218,65 +200,69 @@ export default {
         if (newVal > 1) {
           offset = '-100%'
         }
-        this.$getKrpano().set('layer[tooltip_'+this.hotspot.name+'].y',`${offset}`)
+        this.$getKrpano().set('layer[tooltip_' + this.hotspot.name + '].y', `${offset}`)
 
 
       }
     },
-    'hotspot.fontSize':{
-      handler:function (newVal) {
-        this.$getKrpano().set('layer[tooltip_'+this.hotspot.name+'].css',`text-align:center; color:#FFFFFF;
+    'hotspot.fontSize': {
+      handler: function (newVal) {
+        this.$getKrpano().set('layer[tooltip_' + this.hotspot.name + '].css', `text-align:center; color:#FFFFFF;
           font-family:STXihei;font-size:${newVal}px;`)
       }
     },
-    show(newVal){
+    show(newVal) {
       if (!newVal) {
-        this.$bus.removeListener('selectUrl',this.listerFn)
+        this.$bus.removeListener('selectUrl', this.listerFn)
       }
     }
   },
-  beforeDestroy(){
-    this.$bus.removeListener('selectUrl',this.listerFn)
+  beforeDestroy() {
+    this.$bus.removeListener('selectUrl', this.listerFn)
   },
-  computed:{
+  computed: {
     ...mapGetters({
-      hotspot:'hotspot',
-      backupHotSpot:'backupHotSpot'
+      hotspot: 'hotspot',
+      backupHotSpot: 'backupHotSpot'
     }),
-    effectSettingComponent(){
+    effectSettingComponent() {
       let tmp = this.hotspot.hotspotType
       return () => import(`./hotspotType/${tmp}.vue`);
     },
   },
-  mounted(){
-      this.selectItem = {
-        sceneCode: this.infoItem.link
-      }
-      this.$bus.on('selectUrl',this.listerFn)
-      this.$bus.on('resethotspotTitle',()=>{
-        this.hotspot.hotspotTitle = ''
-      })
+  mounted() {
+    this.selectItem = {
+      sceneCode: this.infoItem.link
+    }
+    this.$bus.on('selectUrl', this.listerFn)
+    this.$bus.on('resethotspotTitle', () => {
+      this.hotspot.hotspotTitle = ''
+    })
+
+    this.$bus.on('delhotspot', () => {
+      this.cancel()
+    })
 
-      this.$bus.on('delhotspot',()=>{
-        this.cancel()
-      }) 
 
-    this.$nextTick(()=>{
+    this.$nextTick(() => {
       if (this.editTitle != '编辑') {
         this.addhotspot(this.hotStyle[0])
+        this.rang.value = window.g_hotspotCurrentScale
+        this.onRangeChange({ value: window.g_hotspotCurrentScale })
       }
       this.comboxBottomSpace = this.$refs.content.getBoundingClientRect().bottom
     })
   },
 
   methods: {
-    handleSceneSelect(data){
-      this.hotspot.secne= data
+    handleSceneSelect(data) {
+      this.hotspot.secne = data
     },
-    onhotSpotTypeChange(data){
+    onhotSpotTypeChange(data) {
       this.hotspot.hotspotType = data.id
     },
     onRangeChange(data) {
+      console.log(data);
       this.rang = { ...this.rang, value: data.value }
       this.hotspot.size = data.value
       switch (data.value) {
@@ -297,35 +283,83 @@ export default {
           break;
       }
     },
-    listerFn(data){
+    listerFn(data) {
       this.selectItem = {
         sceneCode: data.sceneCode
       }
       this.infoItem.link = data.sceneCode
-      this.infoItem.thumb = data.icon  
+      this.infoItem.thumb = data.icon
+    },
+    isDiffHotSpot() {
+      let flag = false
+      comparisonKey.forEach(item => {
+        if (JSON.stringify(this.hotspot[item]) != JSON.stringify(this.backupHotSpot[item])) {
+          flag = true
+        }
+      })
+      return flag
+    },
+
+    isAddChange() {
+      let flag = false
+      let { hotspotTitle, hotspotType } = this.hotspot
+      let item = HTMap[hotspotType]
+      console.log(
+        (hotspotTitle.trim() && hotspotTitle.trim() != '单击确定热点位置'),
+        this.hotspot[item.key],
+        (item.type == 'Array' && this.hotspot[item.key].length > 0)
+      );
+
+      if (
+        (hotspotTitle.trim() && hotspotTitle.trim() != '单击确定热点位置')
+        || this.hotspot[item.key]
+        || (item.type == 'Array' && this.hotspot[item.key].length > 0)
+      ) {
+        flag = true
+      }
+      return flag
     },
-    confirmCancel(){
-      this.$confirm({
+
+    confirmCancel() {
+      console.log(this.isAddChange());
+      if (this.editTitle != '编辑') {
+        if (this.isAddChange()) {
+          this.$confirm({
             content: "热点内容未编辑完,确定要关闭吗",
             ok: () => {
               this.cancel()
             }
-        });
+          });
+        } else{
+          this.cancel()
+        }
+      } else {
+        if (this.isDiffHotSpot() || this.isAddChange()) {
+          this.$confirm({
+            content: "热点内容未编辑完,确定要关闭吗",
+            ok: () => {
+              this.cancel()
+            }
+          });
+        } else {
+          this.cancel()
+        }
+      }
     },
     cancel() {
       this.$store.commit("SetHotspot", this.backupHotSpot);
-      this.$emit("close",{
-        type:this.editTitle=='编辑'?'edit':'add',
-        data:this.backupHotSpot
+      this.$emit("close", {
+        type: this.editTitle == '编辑' ? 'edit' : 'add',
+        data: this.backupHotSpot
       });
     },
-    reset(data){
-      this.$bus.emit('edithotspotTitle',data)
-      this.$bus.emit('edithotspotTitleisShow',data)
-      this.$getKrpano().set(`hotspot[${data.name}].url`,data.img)
+    reset(data) {
+      this.$bus.emit('edithotspotTitle', data)
+      this.$bus.emit('edithotspotTitleisShow', data)
+      this.$getKrpano().set(`hotspot[${data.name}].url`, data.img)
     },
     save() {
-      let {img,hotspotTitle,hotspotType} = this.hotspot
+      let { img, hotspotTitle, hotspotType } = this.hotspot
       let item = HTMap[hotspotType]
 
       if (!img) {
@@ -334,38 +368,38 @@ export default {
         });
       }
 
-       if (!hotspotTitle.trim()) {
+      if (!(hotspotTitle.trim() && hotspotTitle.trim() != '单击确定热点位置')) {
         return this.$alert({
           content: "请输入热点标题",
         });
       }
 
-       if (!this.hotspot[item.key]||(item.type == 'Array'&&this.hotspot[item.key].length<=0)) {
+      if (!this.hotspot[item.key] || (item.type == 'Array' && this.hotspot[item.key].length <= 0)) {
         return this.$alert({
           content: `${item.errortxt}`,
         });
       }
       this.$store.commit("SetHotspot", this.hotspot);
       this.$emit("close");
-      this.$emit("save",this.hotspot);
+      this.$emit("save", this.hotspot);
     },
-    addhotspot(data){
+    addhotspot(data) {
 
       if (this.isAdd) {
         this.isAdd = false
         this.hotspot.img = data.img
         this.hotspot.icontype = data.id
         this.styIcon = data.id
-        this.$bus.emit('addhotspot',this.hotspot)
-        this.$getKrpano().set('layer[tooltip_'+this.hotspot.name+'].css',`text-align:center; color:#FFFFFF;
+        this.$bus.emit('addhotspot', this.hotspot)
+        this.$getKrpano().set('layer[tooltip_' + this.hotspot.name + '].css', `text-align:center; color:#FFFFFF;
           font-family:STXihei;font-size:${this.hotspot.fontSize}px;`)
       }
-      else{
+      else {
         this.hotspot.img = data.img
         this.hotspot.icontype = data.id
         this.styIcon = data.id
-        this.$getKrpano().set(`hotspot[${this.hotspot.name}].url`,data.img)
-        this.$getKrpano().set(`hotspot[${this.hotspot.name}].hotspottitle`,this.hotspot.hotspotTitle)
+        this.$getKrpano().set(`hotspot[${this.hotspot.name}].url`, data.img)
+        this.$getKrpano().set(`hotspot[${this.hotspot.name}].hotspottitle`, this.hotspot.hotspotTitle)
       }
     }
   }
@@ -375,36 +409,41 @@ export default {
 .hots-panel {
   background: #1A1B1D;
   z-index: 10;
-  
+
   display: flex;
   flex-direction: column;
-  
+
   .header {
     padding: 20px;
     display: flex;
     font-size: 18px;
     color: #fff;
     flex: 0 0 auto;
+
     .icon_close {
       color: rgba(255, 255, 255, 0.6);
       cursor: pointer;
     }
   }
+
   .content {
     padding: 20px 20px 14px 20px;
     background: #252526;
     flex: 1 0 1px;
     overflow: auto;
+
     .icon-setting {
       .icon-setting-title {
         font-size: 18px;
         color: #FFFFFF;
       }
+
       .remark {
         margin-top: 16px;
         font-size: 14px;
         color: #ababab;
       }
+
       .icon-list {
         margin-top: 16px;
         height: 158px;
@@ -413,14 +452,17 @@ export default {
         border: 1px solid #404040;
         overflow: auto;
         padding: 4px;
-        > .margin-handler-layer {
+
+        >.margin-handler-layer {
           overflow: hidden;
+
           ul {
             display: flex;
             align-items: center;
             flex-wrap: wrap;
             margin-right: -17px;
             margin-bottom: -17px;
+
             li {
               cursor: pointer;
               margin-right: 17px;
@@ -433,7 +475,8 @@ export default {
               align-items: center;
               justify-content: center;
               position: relative;
-              &::after{
+
+              &::after {
                 position: absolute;
                 content: '';
                 height: 100%;
@@ -447,6 +490,7 @@ export default {
                 z-index: 999;
                 pointer-events: none;
               }
+
               &.active {
                 border-color: #0076f6;
               }
@@ -454,27 +498,33 @@ export default {
           }
         }
       }
-      .bars{
+
+      .bars {
         margin-top: 16px;
       }
     }
+
     .title-setting {
       margin-top: 24px;
+
       .title-setting-title {
         font-size: 18px;
         color: #FFFFFF;
       }
+
       .switch-wrapper {
         display: flex;
         align-items: center;
         justify-content: space-between;
         margin-top: 18px;
+
         .label {
           color: rgba(255, 255, 255, 0.6);
           font-size: 14px;
         }
       }
-      > .title-input-wrapper {
+
+      >.title-input-wrapper {
         position: relative;
         border: 1px solid rgba(151, 151, 151, 0.2);
         padding: 0 16px;
@@ -483,10 +533,12 @@ export default {
         height: 36px;
         width: 100%;
         margin-top: 18px;
+
         &:focus-within {
           border-color: #0076F6;
         }
-        > input {
+
+        >input {
           border: none;
           background: transparent;
           outline: none;
@@ -497,7 +549,8 @@ export default {
           letter-spacing: 1px;
           font-size: 14px;
         }
-        > .count {
+
+        >.count {
           position: absolute;
           top: 50%;
           transform: translateY(-50%);
@@ -507,27 +560,34 @@ export default {
         }
       }
     }
+
     .effect-setting {
       margin-top: 16px;
+
       .effect-setting-title {
         font-size: 18px;
         color: #FFFFFF;
       }
+
       .combox {
         margin-top: 16px;
       }
+
       .effect-setting-component {
         margin-top: 16px;
       }
     }
   }
+
   .footer {
     flex: 0 0 auto;
     padding: 15px;
     background: #252526;
+
     .deepcancel {
       margin-right: 10px;
     }
+
     .ui-button {
       width: 112px;
     }

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

@@ -59,6 +59,15 @@
 import EditPanel from "./EditPanel"
 import { mapGetters } from "vuex"
 import browser from "@/utils/browser"
+
+
+let mapFontSize = {
+  12:0.5,
+  14:1,
+  17:1.5,
+  20:2,
+}
+
 export default {
   name: 'HotSpotList',
   components: {
@@ -112,11 +121,17 @@ export default {
     },
   },
   mounted() {
+    this.$bus.on("updateHotSpotHV", (data) => {
+      let hptarget = this.someData.hotspots.find((item) => item.name.toLowerCase() == data.hpname.toLowerCase())
+      console.log(hptarget);
+      hptarget.ath = data.ath
+      hptarget.atv = data.atv
+    })
+
     this.$bus.on("openHotspot", (data) => {
       let idx = this.someData.hotspots.findIndex((item) => item.name == data)
-      let beforeIdx = this.someData.hotspots.findIndex((item) => item.name == this.hotspot.name)
-
-      if (beforeIdx == idx) {
+      if (data == this.hotspot.name) {
+        window.__krfn.utils.looktohotspot(this.$getKrpano(), this.hotspot.name)
         return
       }
       if (this.editTitle == '新增') {
@@ -180,6 +195,9 @@ export default {
       this.currentScene.someData = this.someData
       this.$msg.success(this.editTitle + "成功")
 
+      window.g_hotspotCurrentScale = mapFontSize[data.fontSize] || 1
+
+
       let iidx = this.info.scenes.findIndex(item => this.currentScene.sceneCode == item.sceneCode)
       if (iidx > -1) {
         this.info.scenes[iidx] = {

+ 1 - 1
packages/qjkankan-editor/src/views/material/pano/index.vue

@@ -20,7 +20,7 @@
             ref="uploadFile"
             :failString="'格式错误,请上传2:1、120MB以内、jpg格式的全景图片'"
             :limitFailStr="'过大,请上传2:1、120MB以内、jpg格式的全景图片'"
-            accept-type="image/jpeg"
+            accept-type=".jpg"
             media-type="image"
             :limit="120"
             @file-change="onFileChange"

+ 1 - 2
packages/qjkankan-view/src/components/UIGather/list.vue

@@ -138,6 +138,7 @@ $width: 1150px;
   transform: translateX(-50%);
   text-align: center;
   max-width: $width;
+  min-width: 480px;
   overflow: hidden;
   max-height: 0;
   transition: .3s all ease;
@@ -172,7 +173,6 @@ $width: 1150px;
   .top-con {
     margin-bottom: 10px;
     padding: 10px 30px;
-    min-width: 400px;
     background: linear-gradient(268deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.5) 8%, rgba(0, 0, 0, 0.5) 92%, rgba(0, 0, 0, 0) 100%);
   }
 
@@ -228,7 +228,6 @@ $width: 1150px;
   }
 
   #swScenes {
-    margin: 0;
     > ul {
       > li {
         cursor: pointer;