tremble 4 years ago
parent
commit
bd7fbd5377
42 changed files with 3549 additions and 467 deletions
  1. 1 1
      public/edit.html
  2. BIN
      public/static/panoassets/images/hotspot/xulie/ditu_2021.png
  3. BIN
      public/static/panoassets/images/hotspot/xulie/kaimen_2021.png
  4. BIN
      public/static/panoassets/images/hotspot/xulie/line-l.png
  5. BIN
      public/static/panoassets/images/hotspot/xulie/line-r.png
  6. BIN
      public/static/panoassets/images/hotspot/xulie/old/ditu_000.png
  7. BIN
      public/static/panoassets/images/hotspot/xulie/old/ditu_2021.png
  8. BIN
      public/static/panoassets/images/hotspot/xulie/old/kaimen_000.png
  9. BIN
      public/static/panoassets/images/hotspot/xulie/old/kaimen_2021.png
  10. BIN
      public/static/panoassets/images/hotspot/xulie/old/line-l.png
  11. BIN
      public/static/panoassets/images/hotspot/xulie/old/line-r.png
  12. BIN
      public/static/panoassets/images/hotspot/xulie/old/shinei_000.png
  13. BIN
      public/static/panoassets/images/hotspot/xulie/old/shinei_2021.png
  14. BIN
      public/static/panoassets/images/hotspot/xulie/shinei_2021.png
  15. 1 1
      public/static/template/skin/vtourskin.xml
  16. 349 13
      public/static/template/skin/vtourskin.xml.backup-2021-02-25-09-33-51
  17. 1964 0
      public/static/template/skin/vtourskin.xml.backup-2021-05-31-18-29-15
  18. 1 1
      public/static/template/tour.html
  19. 99 4
      src/api/index.js
  20. BIN
      src/assets/images/144x144头像.png.zip
  21. BIN
      src/assets/images/144x144头像.png/__MACOSX/._144x144头像.png
  22. BIN
      src/assets/images/icons/default_user.png
  23. 9 9
      src/assets/style/component.less
  24. 429 0
      src/components/agentSelect.vue
  25. 11 3
      src/components/shared/Combox.vue
  26. 93 104
      src/core/utils.js
  27. 14 7
      src/framework/Head.vue
  28. 2 2
      src/framework/Toolbar.vue
  29. 4 8
      src/framework/core/index.vue
  30. 1 2
      src/framework/show/index.vue
  31. 23 9
      src/mixins/index.js
  32. 30 2
      src/utils/request.js
  33. 205 213
      src/views/hotspot/EditPanel.vue
  34. 3 8
      src/views/hotspot/Setting.vue
  35. 1 1
      src/views/hotspot/Toolbar.vue
  36. 1 1
      src/views/hotspot/index.vue
  37. 145 49
      src/views/information/Setting.vue
  38. 16 5
      src/views/information/Toolbar.vue
  39. 140 22
      src/views/information/index.vue
  40. 2 1
      src/views/screen/Setting.vue
  41. 1 1
      src/views/screen/Toolbar.vue
  42. 4 0
      vue.config.js

+ 1 - 1
public/edit.html

@@ -11,7 +11,7 @@
     <link rel="stylesheet" href="<%= VUE_APP_STATIC_DIR %>/lib/animate/animate.min.css"/>
     <link rel="stylesheet" href="<%= VUE_APP_STATIC_DIR %>/lib/mCustomScrollbar/jquery.mCustomScrollbar.min.css"/>
     <link rel="stylesheet" href="<%= VUE_APP_STATIC_DIR %>/lib/scrollbar/perfect-scrollbar.css"/>
-    <title>VR楼盘项目编辑器</title>
+    <title>楼盘VR项目编辑器</title>
   </head>
   <body>
     <div id="app"></div>

BIN
public/static/panoassets/images/hotspot/xulie/ditu_2021.png


BIN
public/static/panoassets/images/hotspot/xulie/kaimen_2021.png


BIN
public/static/panoassets/images/hotspot/xulie/line-l.png


BIN
public/static/panoassets/images/hotspot/xulie/line-r.png


BIN
public/static/panoassets/images/hotspot/xulie/old/ditu_000.png


BIN
public/static/panoassets/images/hotspot/xulie/old/ditu_2021.png


BIN
public/static/panoassets/images/hotspot/xulie/old/kaimen_000.png


BIN
public/static/panoassets/images/hotspot/xulie/old/kaimen_2021.png


BIN
public/static/panoassets/images/hotspot/xulie/old/line-l.png


BIN
public/static/panoassets/images/hotspot/xulie/old/line-r.png


BIN
public/static/panoassets/images/hotspot/xulie/old/shinei_000.png


BIN
public/static/panoassets/images/hotspot/xulie/old/shinei_2021.png


BIN
public/static/panoassets/images/hotspot/xulie/shinei_2021.png


File diff suppressed because it is too large
+ 1 - 1
public/static/template/skin/vtourskin.xml


+ 349 - 13
public/static/template/skin/vtourskin.xml.backup-2021-02-25-09-33-51

@@ -1169,6 +1169,23 @@
         mouse.stagex, hotspotcenterx); sub(drag_adjusty, mouse.stagey, hotspotcentery); asyncloop(pressed, sub(dx,
         mouse.stagex, drag_adjustx); sub(dy, mouse.stagey, drag_adjusty); screentosphere(dx, dy, ath, atv); );
     </action>
+
+    <!-- the action for dragging the layer elements - call it once in the ondown event -->
+    <action name="draglayer">
+      copy(drag_currentx, x);
+      copy(drag_currenty, y);
+      copy(drag_stagex, mouse.stagex);
+      copy(drag_stagey, mouse.stagey);
+      indexoftxt(align_contains_right, get(align), 'right');
+      indexoftxt(align_contains_bottom, get(align), 'bottom');
+      calc(drag_align_x, align_contains_right GE 0 ? -1 : +1);
+      calc(drag_align_y, align_contains_bottom GE 0 ? -1 : +1);
+      asyncloop(pressed,
+        calc(x, drag_currentx + (mouse.stagex - drag_stagex)*drag_align_x);
+        calc(y, drag_currenty + (mouse.stagey - drag_stagey)*drag_align_y);
+        );
+    </action>
+
     <layer name="tour_guide_alert" url="" keep="true" align="center" edge="center" x="0" y="0" maxwidth="100%"
            maxheight="100%" enabled="false" visible="false"/>
     <action name="show_tour_guide_alert">set(layer[tour_guide_alert].url,%1); set(layer[tour_guide_alert].visible,true);
@@ -1286,16 +1303,56 @@
         if(lhotspot.hsvrfalse, set(lhotspot.visible,true); ); if(lhotspot.hsvrtrue, set(lhotspot.visible,false); ); );
     </action>
 	
-	   
-
-
-    <action name="editImgTextHotSpot">
+    <!-- 无背景热点 -->
+    <action name="addImgTextHotSpotWithoutBg">
       set(schp_name,%2); 
+
       set(hotspot[get(schp_name)].url,%1);
+      set(hotspot[get(schp_name)].ath,%4);
+      set(hotspot[get(schp_name)].atv,%5);
       set(hotspot[get(schp_name)].hotspottitle,%3);
-      set(hotspot[get(schp_name)].hotspotlink,%4);
-    </action> 
+      set(hotspot[get(schp_name)].wordcontent,%9);
+      set(hotspot[get(schp_name)].hotspotlink,%8);
+      set(hotspot[get(schp_name)].alpha,1);
+      set(hotspot[get(schp_name)].scale,1);
+      set(hotspot[get(schp_name)].autoalpha,false);
+      set(hotspot[get(schp_name)].distorted,false);
+      set(hotspot[get(schp_name)].width,'prop');
+      set(hotspot[get(schp_name)].height,34);
+      if(device.mobile,set(hotspot[get(schp_name)].height,30));
+      set(hotspot[get(schp_name)].visible,true);
+	    set(hotspot[get(schp_name)].onhover,showtext(get(hotspottitle),skintext)); 
+      addhotspot(get(schp_name));
+      set(hotspot[get(schp_name)].onclick,'js(__krfn.utils.linkopen(%8,%2));');
+
+      if(%7 == false,
+        , 
+        set(hotspot[get(schp_name)].ondown,draghotspot(););
+        set(hotspot[get(schp_name)].onup,js(__krfn.angle.updateHotSpotData(get(xml.scene),get(name),get(ath),get(atv),"imgtext")));
+      );
+
+      if(%6 == '1',
+         txtadd(hotspot[get(schp_name)].onloaded,"do_crop_animation(60,60, 30);");
+		  );
+    
+      txtadd(hotspot[get(schp_name)].onloaded,"add_all_the_time_tooltip_withoutBg(hotspot[get(name)].hotspottitle);");
+      set(hotspot[get(schp_name)].onhover,null);
+      set(hotspot[get(schp_name)].onout,null);
+      set(hotspot[get(schp_name)].onover,null);
+
+
+      txtadd(tooltipname, 'tooltip_', get(schp_name));
+         
+      set(plugin[get(tooltipname)].onclick,'js(__krfn.utils.linkopen(%8,%2));');
 
+      if(%10 == true,
+        set(plugin[get(tooltipname)].visible,true);,
+        set(plugin[get(tooltipname)].visible,false);
+      );
+
+    </action>
+
+    <!-- 有背景热点 -->
     <action name="addImgTextHotSpot">
       set(schp_name,%2); 
 
@@ -1310,12 +1367,12 @@
       set(hotspot[get(schp_name)].autoalpha,false);
       set(hotspot[get(schp_name)].distorted,false);
       set(hotspot[get(schp_name)].width,'prop');
-      set(hotspot[get(schp_name)].height,'50');
+      set(hotspot[get(schp_name)].height,34);
+      if(device.mobile,set(hotspot[get(schp_name)].height,30));
       set(hotspot[get(schp_name)].visible,true);
 	    set(hotspot[get(schp_name)].onhover,showtext(get(hotspottitle),skintext)); 
       addhotspot(get(schp_name));
       set(hotspot[get(schp_name)].onclick,'js(__krfn.utils.linkopen(%8,%2));');
-      if(device.mobile,set(hotspot[get(schp_name)].scale,0.8));
 
       if(%7 == false,
         , 
@@ -1324,7 +1381,7 @@
       );
 
       if(%6 == '1',
-         txtadd(hotspot[get(schp_name)].onloaded,"do_crop_animation(60,60, 30);");
+         txtadd(hotspot[get(schp_name)].onloaded,"do_crop_animation(56,56, 30);");
 		  );
     
       txtadd(hotspot[get(schp_name)].onloaded,"add_all_the_time_tooltip(hotspot[get(name)].hotspottitle);");
@@ -1332,6 +1389,101 @@
       set(hotspot[get(schp_name)].onout,null);
       set(hotspot[get(schp_name)].onover,null);
 
+      txtadd(tooltipname, 'tooltip_', get(schp_name));
+         
+      set(plugin[get(tooltipname)].onclick,'js(__krfn.utils.linkopen(%8,%2));');
+
+      if(%10 == true,
+        set(plugin[get(tooltipname)].visible,true);,
+        set(plugin[get(tooltipname)].visible,false);
+      );
+
+    </action>
+
+    <!-- 线段热点 -->
+    <action name="addLineTxtHotSpot">
+      set(schp_name,%2); 
+
+      set(hotspot[get(schp_name)].url,%1);
+      set(hotspot[get(schp_name)].ath,%4);
+      set(hotspot[get(schp_name)].atv,%5);
+      set(hotspot[get(schp_name)].hotspottitle,%3);
+      set(hotspot[get(schp_name)].wordcontent,%9);
+      set(hotspot[get(schp_name)].hotspotlink,%8);
+      set(hotspot[get(schp_name)].alpha,1);
+      set(hotspot[get(schp_name)].scale,1);
+      set(hotspot[get(schp_name)].autoalpha,false);
+      set(hotspot[get(schp_name)].distorted,false);
+      set(hotspot[get(schp_name)].width,'prop');
+      set(hotspot[get(schp_name)].height,34);
+      if(device.mobile,set(hotspot[get(schp_name)].height,30));
+      set(hotspot[get(schp_name)].visible,true);
+	    set(hotspot[get(schp_name)].onhover,showtext(get(hotspottitle),skintext)); 
+      addhotspot(get(schp_name));
+      set(hotspot[get(schp_name)].onclick,'js(__krfn.utils.linkopen(%8,%2));');
+
+      if(%7 == false,
+        , 
+        set(hotspot[get(schp_name)].ondown,draghotspot(););
+        set(hotspot[get(schp_name)].onup,js(__krfn.angle.updateHotSpotData(get(xml.scene),get(name),get(ath),get(atv),"imgtext")));
+      );
+
+      if(%6 == true,
+        txtadd(hotspot[get(schp_name)].onloaded,"add_all_the_time_tooltip_lineTxt_l(hotspot[get(name)].hotspottitle);");,
+        txtadd(hotspot[get(schp_name)].onloaded,"add_all_the_time_tooltip_lineTxt_r(hotspot[get(name)].hotspottitle);");
+      );
+    
+      set(hotspot[get(schp_name)].onhover,null);
+      set(hotspot[get(schp_name)].onout,null);
+      set(hotspot[get(schp_name)].onover,null);
+
+      txtadd(tooltipname, 'tooltip_', get(schp_name));
+         
+      set(plugin[get(tooltipname)].onclick,'js(__krfn.utils.linkopen(%8,%2));');
+
+      if(%10 == true,
+        set(plugin[get(tooltipname)].visible,true);,
+        set(plugin[get(tooltipname)].visible,false);
+      );
+
+    </action>
+
+    <!-- 线段热点(背景) -->
+    <action name="addLineTxtHotSpotWithBg">
+      set(schp_name,%2); 
+
+      set(hotspot[get(schp_name)].url,%1);
+      set(hotspot[get(schp_name)].ath,%4);
+      set(hotspot[get(schp_name)].atv,%5);
+      set(hotspot[get(schp_name)].hotspottitle,%3);
+      set(hotspot[get(schp_name)].wordcontent,%9);
+      set(hotspot[get(schp_name)].hotspotlink,%8);
+      set(hotspot[get(schp_name)].alpha,1);
+      set(hotspot[get(schp_name)].scale,1);
+      set(hotspot[get(schp_name)].autoalpha,false);
+      set(hotspot[get(schp_name)].distorted,false);
+      set(hotspot[get(schp_name)].width,'prop');
+      set(hotspot[get(schp_name)].height,34);
+      if(device.mobile,set(hotspot[get(schp_name)].height,30));
+      set(hotspot[get(schp_name)].visible,true);
+	    set(hotspot[get(schp_name)].onhover,showtext(get(hotspottitle),skintext)); 
+      addhotspot(get(schp_name));
+      set(hotspot[get(schp_name)].onclick,'js(__krfn.utils.linkopen(%8,%2));');
+
+      if(%7 == false,
+        , 
+        set(hotspot[get(schp_name)].ondown,draghotspot(););
+        set(hotspot[get(schp_name)].onup,js(__krfn.angle.updateHotSpotData(get(xml.scene),get(name),get(ath),get(atv),"imgtext")));
+      );
+
+      if(%6 == true,
+        txtadd(hotspot[get(schp_name)].onloaded,"add_all_the_time_tooltip_lineTxt_l_withbg(hotspot[get(name)].hotspottitle);");,
+        txtadd(hotspot[get(schp_name)].onloaded,"add_all_the_time_tooltip_lineTxt_r_withbg(hotspot[get(name)].hotspottitle);");
+      );
+    
+      set(hotspot[get(schp_name)].onhover,null);
+      set(hotspot[get(schp_name)].onout,null);
+      set(hotspot[get(schp_name)].onover,null);
 
       txtadd(tooltipname, 'tooltip_', get(schp_name));
          
@@ -1353,15 +1505,125 @@
         set(plugin[get(tooltipname)].x,0);
         set(plugin[get(tooltipname)].y,0);
         set(plugin[get(tooltipname)].autowidth,true);
+        set(plugin[get(tooltipname)].height,34); 
+        if(device.mobile,set(plugin[get(tooltipname)].height,30));
+        if(device.mobile,set(plugin[get(tooltipname)].scale,1));
+
+        set(plugin[get(tooltipname)].background,false);
+        set(plugin[get(tooltipname)].style,rrdius);
+
+        set(plugin[get(tooltipname)].vcenter,true); 
+        set(plugin[get(tooltipname)].border,false);
+        set(plugin[get(tooltipname)].borderwidth,1);
+        set(plugin[get(tooltipname)].bordercolor,0xFFFFFF);
+        set(plugin[get(tooltipname)].borderalpha,0.2);
+        set(plugin[get(tooltipname)].glow,0); 
+        set(plugin[get(tooltipname)].glowcolor,0xFFFFFF);
+        set(plugin[get(tooltipname)].css,'display:flex;align-items:center;padding:5px 10px 5px 2px;margin:0;
+        text-align:center;background:rgb(0 0 0 / 60%);position: relative;left: 0px;width:100%;height:100%;
+        border-bottom-right-radius:4px;border-top-right-radius:4px; color:#FFFFFF;
+        font-family:STXihei; font-size:13px;');
+        if(device.mobile,
+        set(plugin[get(tooltipname)].css,'display:flex;align-items:center;padding:0 10px 0 2px;margin:0;
+        text-align:center;background:rgb(0 0 0 / 60%);width:100%;height:100%;
+        border-bottom-right-radius:4px;border-top-right-radius:4px; color:#FFFFFF;
+        font-family:STXihei; font-size:14px;'););
+        set(plugin[get(tooltipname)].textshadow,0);
+        set(plugin[get(tooltipname)].textshadowrange,6.0); 
+        set(plugin[get(tooltipname)].textshadowangle,90); 
+        if(text ==
+        '' OR text === null, copy(plugin[get(tooltipname)].html,%1), copy(plugin[get(tooltipname)].html,text) );
+        set(plugin[get(tooltipname)].enabled,true);
+    </action>
+
+    <action name="add_all_the_time_tooltip_withoutBg">
+      txtadd(tooltipname, 'tooltip_', get(name)); addplugin(get(tooltipname));
+        txtadd(plugin[get(tooltipname)].parent, 'hotspot[', get(name), ']');
+        set(plugin[get(tooltipname)].url,'%SWFPATH%/plugins/textfield.swf');
+        set(plugin[get(tooltipname)].align,right);
+        set(plugin[get(tooltipname)].edge,left);
+        set(plugin[get(tooltipname)].x,0);
+        set(plugin[get(tooltipname)].y,0);
+        set(plugin[get(tooltipname)].autowidth,true);
+        set(plugin[get(tooltipname)].height,36); 
+        if(device.mobile,set(plugin[get(tooltipname)].scale,0.7));
+        if(device.mobile,set(plugin[get(tooltipname)].height,48));
+
+        set(plugin[get(tooltipname)].background,false);
+        set(plugin[get(tooltipname)].roundedge,5);
+        set(plugin[get(tooltipname)].padding,0);
+        set(plugin[get(tooltipname)].vcenter,true); 
+        set(plugin[get(tooltipname)].border,false);
+        set(plugin[get(tooltipname)].borderwidth,1);
+        set(plugin[get(tooltipname)].bordercolor,0xFFFFFF);
+        set(plugin[get(tooltipname)].borderalpha,0.2);
+        set(plugin[get(tooltipname)].glow,0); 
+        set(plugin[get(tooltipname)].glowcolor,0xFFFFFF);
+        set(plugin[get(tooltipname)].css,'text-align:center; color:#FFFFFF; font-family:STXihei; font-size:14px;');
+        if(device.mobile,
+        set(plugin[get(tooltipname)].css,'text-align:center; color:#FFFFFF;
+        font-family:STXihei; font-size:14px;'); );
+        set(plugin[get(tooltipname)].textshadow,0);
+        set(plugin[get(tooltipname)].textshadowrange,6.0); 
+        set(plugin[get(tooltipname)].textshadowangle,90); 
+        if(text ==
+        '' OR text === null, copy(plugin[get(tooltipname)].html,%1), copy(plugin[get(tooltipname)].html,text) );
+        set(plugin[get(tooltipname)].enabled,true);
+    </action>
+
+    <action name="add_all_the_time_tooltip_lineTxt_l">
+        txtadd(tooltipname, 'tooltip_', get(name)); addplugin(get(tooltipname));
+        txtadd(plugin[get(tooltipname)].parent, 'hotspot[', get(name), ']');
+        set(plugin[get(tooltipname)].url,'%SWFPATH%/plugins/textfield.swf');
+        set(plugin[get(tooltipname)].align,center);
+        set(plugin[get(tooltipname)].edge,center);
+        set(plugin[get(tooltipname)].x,-20);
+        set(plugin[get(tooltipname)].y,-80%);
+        set(plugin[get(tooltipname)].autowidth,true);
+        set(plugin[get(tooltipname)].height,34); 
+        if(device.mobile,set(plugin[get(tooltipname)].height,30));
+        if(device.mobile,set(plugin[get(tooltipname)].scale,1));
+
+        set(plugin[get(tooltipname)].background,false);
+        set(plugin[get(tooltipname)].style,rrdius);
+
+        set(plugin[get(tooltipname)].vcenter,true); 
+        set(plugin[get(tooltipname)].border,false);
+        set(plugin[get(tooltipname)].borderwidth,1);
+        set(plugin[get(tooltipname)].bordercolor,0xFFFFFF);
+        set(plugin[get(tooltipname)].borderalpha,0.2);
+        set(plugin[get(tooltipname)].glow,0); 
+        set(plugin[get(tooltipname)].glowcolor,0xFFFFFF);
+        set(plugin[get(tooltipname)].css,'text-align:center; color:#FFFFFF; font-family:STXihei; font-size:14px;');
+        if(device.mobile,
+        set(plugin[get(tooltipname)].css,'text-align:center; color:#FFFFFF;
+        font-family:STXihei; font-size:14px;'); );
+        set(plugin[get(tooltipname)].textshadow,0);
+        set(plugin[get(tooltipname)].textshadowrange,6.0); 
+        set(plugin[get(tooltipname)].textshadowangle,90); 
+        if(text ==
+        '' OR text === null, copy(plugin[get(tooltipname)].html,%1), copy(plugin[get(tooltipname)].html,text) );
+        set(plugin[get(tooltipname)].enabled,true);
+    </action>
+
+    <action name="add_all_the_time_tooltip_lineTxt_l_withbg">
+      txtadd(tooltipname, 'tooltip_', get(name)); addplugin(get(tooltipname));
+        txtadd(plugin[get(tooltipname)].parent, 'hotspot[', get(name), ']');
+        set(plugin[get(tooltipname)].url,'%SWFPATH%/plugins/textfield.swf');
+        set(plugin[get(tooltipname)].align,center);
+        set(plugin[get(tooltipname)].edge,center);
+        set(plugin[get(tooltipname)].x,-20);
+        set(plugin[get(tooltipname)].y,-100%);
+        set(plugin[get(tooltipname)].autowidth,true);
         set(plugin[get(tooltipname)].height,36); 
         if(device.mobile,set(plugin[get(tooltipname)].scale,0.7));
         if(device.mobile,set(plugin[get(tooltipname)].height,48));
 
         set(plugin[get(tooltipname)].background,true);
         set(plugin[get(tooltipname)].backgroundcolor,0x000000); 
-        set(plugin[get(tooltipname)].roundedge,5);
-        set(plugin[get(tooltipname)].backgroundalpha,0.7);
-        set(plugin[get(tooltipname)].padding,5);
+        set(plugin[get(tooltipname)].roundedge,8);
+        set(plugin[get(tooltipname)].backgroundalpha,0.6);
+        set(plugin[get(tooltipname)].padding,0 10);
         set(plugin[get(tooltipname)].vcenter,true); 
         set(plugin[get(tooltipname)].border,true);
         set(plugin[get(tooltipname)].borderwidth,1);
@@ -1372,7 +1634,7 @@
         set(plugin[get(tooltipname)].css,'text-align:center; color:#FFFFFF; font-family:STXihei; font-size:14px;');
         if(device.mobile,
         set(plugin[get(tooltipname)].css,'text-align:center; color:#FFFFFF;
-        font-family:STXihei; font-weight:bold; font-size:14px;'); );
+        font-family:STXihei; font-size:14px;'); );
         set(plugin[get(tooltipname)].textshadow,0);
         set(plugin[get(tooltipname)].textshadowrange,6.0); 
         set(plugin[get(tooltipname)].textshadowangle,90); 
@@ -1380,6 +1642,80 @@
         '' OR text === null, copy(plugin[get(tooltipname)].html,%1), copy(plugin[get(tooltipname)].html,text) );
         set(plugin[get(tooltipname)].enabled,true);
     </action>
+
+    <action name="add_all_the_time_tooltip_lineTxt_r">
+        txtadd(tooltipname, 'tooltip_', get(name)); addplugin(get(tooltipname));
+        txtadd(plugin[get(tooltipname)].parent, 'hotspot[', get(name), ']');
+        set(plugin[get(tooltipname)].url,'%SWFPATH%/plugins/textfield.swf');
+        set(plugin[get(tooltipname)].align,center);
+        set(plugin[get(tooltipname)].edge,center);
+        set(plugin[get(tooltipname)].x,20);
+        set(plugin[get(tooltipname)].y,-80%);
+        set(plugin[get(tooltipname)].autowidth,true);
+        set(plugin[get(tooltipname)].height,34); 
+        if(device.mobile,set(plugin[get(tooltipname)].height,30));
+        if(device.mobile,set(plugin[get(tooltipname)].scale,1));
+
+        set(plugin[get(tooltipname)].background,false);
+        set(plugin[get(tooltipname)].style,rrdius);
+
+        set(plugin[get(tooltipname)].vcenter,true); 
+        set(plugin[get(tooltipname)].border,false);
+        set(plugin[get(tooltipname)].borderwidth,1);
+        set(plugin[get(tooltipname)].bordercolor,0xFFFFFF);
+        set(plugin[get(tooltipname)].borderalpha,0.2);
+        set(plugin[get(tooltipname)].glow,0); 
+        set(plugin[get(tooltipname)].glowcolor,0xFFFFFF);
+        set(plugin[get(tooltipname)].css,'text-align:center; color:#FFFFFF; font-family:STXihei; font-size:14px;');
+        if(device.mobile,
+        set(plugin[get(tooltipname)].css,'text-align:center; color:#FFFFFF;
+        font-family:STXihei; font-size:14px;'); );
+        set(plugin[get(tooltipname)].textshadow,0);
+        set(plugin[get(tooltipname)].textshadowrange,6.0); 
+        set(plugin[get(tooltipname)].textshadowangle,90); 
+        if(text ==
+        '' OR text === null, copy(plugin[get(tooltipname)].html,%1), copy(plugin[get(tooltipname)].html,text) );
+        set(plugin[get(tooltipname)].enabled,true);
+    </action>
+
+    <action name="add_all_the_time_tooltip_lineTxt_r_withbg">
+     txtadd(tooltipname, 'tooltip_', get(name)); addplugin(get(tooltipname));
+        txtadd(plugin[get(tooltipname)].parent, 'hotspot[', get(name), ']');
+        set(plugin[get(tooltipname)].url,'%SWFPATH%/plugins/textfield.swf');
+        set(plugin[get(tooltipname)].align,center);
+        set(plugin[get(tooltipname)].edge,center);
+        set(plugin[get(tooltipname)].x,20);
+        set(plugin[get(tooltipname)].y,-100%);
+        set(plugin[get(tooltipname)].autowidth,true);
+        set(plugin[get(tooltipname)].height,36); 
+        if(device.mobile,set(plugin[get(tooltipname)].scale,0.7));
+        if(device.mobile,set(plugin[get(tooltipname)].height,48));
+
+        set(plugin[get(tooltipname)].background,true);
+        set(plugin[get(tooltipname)].backgroundcolor,0x000000); 
+        set(plugin[get(tooltipname)].roundedge,8);
+        set(plugin[get(tooltipname)].backgroundalpha,0.6);
+        set(plugin[get(tooltipname)].padding,0 10);
+        set(plugin[get(tooltipname)].vcenter,true); 
+        set(plugin[get(tooltipname)].border,true);
+        set(plugin[get(tooltipname)].borderwidth,1);
+        set(plugin[get(tooltipname)].bordercolor,0xFFFFFF);
+        set(plugin[get(tooltipname)].borderalpha,0.2);
+        set(plugin[get(tooltipname)].glow,0); 
+        set(plugin[get(tooltipname)].glowcolor,0xFFFFFF);
+        set(plugin[get(tooltipname)].css,'text-align:center; color:#FFFFFF; font-family:STXihei; font-size:14px;');
+        if(device.mobile,
+        set(plugin[get(tooltipname)].css,'text-align:center; color:#FFFFFF;
+        font-family:STXihei; font-size:14px;'); );
+        set(plugin[get(tooltipname)].textshadow,0);
+        set(plugin[get(tooltipname)].textshadowrange,6.0); 
+        set(plugin[get(tooltipname)].textshadowangle,90); 
+        if(text ==
+        '' OR text === null, copy(plugin[get(tooltipname)].html,%1), copy(plugin[get(tooltipname)].html,text) );
+        set(plugin[get(tooltipname)].enabled,true);
+    </action>
+
+
     <layer name="mapcontainer"  keep="true" type="container" bgcolor="0x000000" bgalpha="0.2" align="righttop" x="95"
            y="0" width="400" height="300" visible="false">
         <!-- <layer name="map" url=""  align="center" x="0" y="0" width="392" height="292" handcursor="false"

File diff suppressed because it is too large
+ 1964 - 0
public/static/template/skin/vtourskin.xml.backup-2021-05-31-18-29-15


+ 1 - 1
public/static/template/tour.html

@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html>
 <head>
-	<title>krpano - 0199</title>
+	<title>楼盘VR项目</title>
 	<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0" />
 	<meta name="apple-mobile-web-app-capable" content="yes" />
 	<meta name="apple-mobile-web-app-status-bar-style" content="black" />

+ 99 - 4
src/api/index.js

@@ -1,5 +1,6 @@
 import { http,getToken } from '../utils/request'
 import config from '../config'
+import { $waiting } from '@/components/shared/loading'
 
 
 const number = function() {
@@ -35,6 +36,15 @@ export function uploadCover(data, ok, no) {
     return http.uploadBlobFile('/fcb/pano/scene/upload', data, ok, no)
 }
 
+/**
+ * 上传初始画面
+ * @param {*} data 
+ * @param {*} ok 
+ * @param {*} no 
+ */
+ export function uploadIndexImg(data, ok, no) {
+    return http.uploadBlobFile(`/fcb/pano/init/uploadIndexImg/${data.sceneCode}`, data, ok, no)
+}
 
 /**
  * 上传全景图
@@ -86,13 +96,35 @@ export function getSceneInfo(data, ok, no) {
  * @param {*} no 
  */
 export function getIndex(data, ok, no) {
-    return http.get(`/fcb/pano/scene/getIndex/${number()}`, data, ok, no)
+    return http.get(`/fcb/pano/init/list/${number()}`, data, ok, no)
+}
+
+
+/**
+ * 删除初始场景
+ * @param {*} data 
+ * @param {*} ok 
+ * @param {*} no 
+ */
+ export function delInit(data, ok, no) {
+    return http.get(`/fcb/pano/init/remove/${data}`, {}, ok, no)
 }
 
 
 
 
 /**
+ * 保存初始场景(list)
+ * @param {*} data 
+ * @param {*} ok 
+ * @param {*} no 
+ */
+ export function saveInitScene(data, ok, no) {
+    data.houseId = number()
+    return http.postJson(`/fcb/pano/init/save`, data, ok, no)
+}
+
+/**
  * 保存全景图基本信息
  * @param {*} data 
  * @param {*} ok 
@@ -100,7 +132,8 @@ export function getIndex(data, ok, no) {
  */
 export function savePanoInfo(data, ok, no) {
     data.houseId = number()
-    return http.postJson('/fcb/pano/scene/house/edit', data, ok, no)
+    data.fcbHouseId = HDNumber()
+    return http.postJson('/fcb/pano/house/edit', data, ok, no)
 }
 
 /**
@@ -110,7 +143,8 @@ export function savePanoInfo(data, ok, no) {
  * @param {*} no 
  */
 export function saveIndexInfo(data, ok, no) {
-    return http.post(`/fcb/pano/scene/setIndex/${data.id}`, '', ok, no)
+    data.houseId = number()
+    return http.postJson(`/fcb/pano/init/save`, data, ok, no)
 }
 
 
@@ -133,17 +167,78 @@ export function getAuthCode(data, ok, no) {
 export function getHouseNameList(data, ok, no) {
     data.prodId = HDNumber()
     getAuthCode(data,(res)=>{
+        setTimeout(() => {
+            $waiting.show()
+        });
+        let tmp = {
+            ...data,
+            authcode:res.data.authcode,
+            req_time:res.data.timeStamp,
+            client_code:CLIENT_CODE
+        }
+        return http.postJson(`/vr/prodvr/prod/v1/details/queryHouseByProdId`, tmp, ok, no)
+    })
+}
+
+
+
+/**
+ * vr户型是否绑定的操作
+ * @param {*} data 
+ * @param {*} ok 
+ * @param {*} no 
+ */
+ export function isBindVr(data, ok, no) {
+    data.prodId = HDNumber()
+    getAuthCode(data,(res)=>{
+        setTimeout(() => {
+            $waiting.show()
+        });
         let tmp = {
             ...data,
             authcode:res.data.authcode,
             req_time:res.data.timeStamp,
             client_code:CLIENT_CODE
         }
-        return http.postJson(`/vr/prodvr/prod/v1/details/queryHouseNamesByProdId`, tmp, ok, no)
+        return http.postJson(`/vr/prodvr/prod/v1/bind`, tmp, ok, no)
     })
 }
 
 /**
+ * 获取经纪人列表
+ * @param {*} data 
+ * @param {*} ok 
+ * @param {*} no 
+ */
+ export function getAgentSelectList(data, ok, no) {
+    data.prodId = HDNumber()
+    getAuthCode(data,(res)=>{
+        setTimeout(() => {
+            $waiting.show()
+        });
+        let tmp = {
+            ...data,
+            authcode:res.data.authcode,
+            req_time:res.data.timeStamp,
+            client_code:CLIENT_CODE
+        }
+        return http.postJson(`/vr/prodvr/prod/v1/getZygwList`, tmp, ok, no)
+    })
+}
+
+
+/**
+ * 保存经纪人
+ * @param {*} data 
+ * @param {*} ok 
+ * @param {*} no 
+ */
+ export function saveAgent(data, ok, no) {
+    return http.postJson(`/fcb/pano/scene/editAgent`, data, ok, no)
+}
+
+
+/**
  * 获取户型列表
  * @param {*} data 
  * @param {*} ok 

BIN
src/assets/images/144x144头像.png.zip


BIN
src/assets/images/144x144头像.png/__MACOSX/._144x144头像.png


BIN
src/assets/images/icons/default_user.png


+ 9 - 9
src/assets/style/component.less

@@ -91,21 +91,21 @@ textarea:-ms-input-placeholder {
       flex-wrap: wrap;
       >li{
         position: relative;
-        margin: @gap @gap @gap*3;
+        margin: @gap @gap @gap*4;
         width: 172px;
         height: 172px;
         border: 2px solid rgba(0, 0, 0,0);
         .ui-title{
             width: 100%;
             >span{
-              width: 100%;
-              display: inline-block;
-              text-overflow: ellipsis;
-              overflow: hidden;
-              white-space: nowrap;
-              font-size: 14px;
-              cursor: pointer;
-              color: rgba(255, 255, 255, 0.88);
+                width: 100%;
+                font-size: 14px;
+                cursor: pointer;
+                color: rgba(255, 255, 255, 0.88);
+                display: -webkit-box;
+                -webkit-box-orient: vertical;
+                -webkit-line-clamp: 2;
+                overflow: hidden;
             }
         }
         .typeli,.oper{

+ 429 - 0
src/components/agentSelect.vue

@@ -0,0 +1,429 @@
+<template>
+  <div class="select-commodity">
+    <a class="close" @click="$emit('cancle')">+</a>
+    <h3 class="title">{{title}}</h3>
+    <!-- <div class="filter">
+      <div class="ui-remark">
+        <span>分组名称</span>
+      </div>
+      <div class="finput">
+        <input
+            type="text"
+            class="ui-input"
+            placeholder="请输入人员或姓名"
+            :maxlength="15"
+            @keyup.enter="(paging.current = 1) && $emit('updateList',key)"
+            v-model="key"
+          />
+      </div>
+    </div> -->
+
+    <!-- <div class="position">
+      <div class="ui-remark">
+        <span>选择职务</span>
+      </div>
+      <ul class="plist">
+        <li @click="pactive=item.id" v-for="(item,i) in position" :key="i">
+          <span class="radio" :class="{radio_active:pactive==item.id}"></span>
+          <span>{{item.name}}</span>
+        </li>
+      </ul>
+    </div> -->
+
+    <div class="filter">
+      <div class="ui-remark">
+        <span>选择讲房人</span>
+        <span v-if="houseSelect.id" class="jf-name">{{houseSelect.zygwName}}<i @click="houseSelect={id:''}" class="iconfont iconclose"></i></span>
+      </div>
+      <div class="finput">
+        <input
+            type="text"
+            class="ui-input"
+            placeholder="搜索讲房人名字"
+            :maxlength="15"
+            @keyup.enter="(paging.current = 1) && $emit('updateList',key)"
+            v-model="key"
+          />
+          <i class="iconfont iconsearch" @click="(paging.current = 1) && $emit('updateList',key)"></i>
+      </div>
+    </div>
+
+   <template>
+      <div class="table-layer">
+      <table class="list">
+        <thead>
+            <tr>
+                <th>人员ID</th>
+                <th>头像</th>
+                <th>姓名</th>
+                <th>选择</th>
+              </tr>
+        </thead>
+        <tbody>
+        <tr v-for="(item,i) in houseList" :key="i">
+          <td style="overflow: hidden;text-overflow:ellipsis; white-space: nowrap;" :title="item.zygwId">{{item.zygwId}}</td>
+          <td>
+            <div class="list-img">
+              <img :key="item.photoUrl" :src="item.photoUrl||require('@/assets/images/icons/default_user.png')" alt="">
+            </div>
+          </td>
+          <td>{{item.zygwName}}</td>
+          <td>
+            <span class="radio" :class="{radio_active:houseSelect.id==item.zygwId}" @click="houseSelect={...item,id:item.zygwId}"></span>
+          </td>
+        </tr>
+        <tr v-if="houseList.length === 0">
+          <td style="text-align: center;" colspan="4">暂无数据</td>
+        </tr>
+        </tbody>
+      </table>
+    </div>
+
+    <div class="paging">
+      <p></p>
+      <Paging
+        v-if="paging.total>0"
+        style="float: right"
+        :paging="paging"
+        @changeCurrent="changeCurrent"
+      />
+    </div>
+   </template>
+
+    <div class="btns" >
+      <a @click="$emit('submit', houseSelect)" >确定</a>
+      <a v-if="showCancle" @click="$emit('cancle')">取消</a>
+    </div>
+  </div>
+</template>
+
+<script>
+import Paging from './paging'
+
+export default {
+props:{
+  panos:{
+    default(){
+      return []
+    },
+    type:Array
+  },
+  houseList:{
+    default(){
+      return []
+    },
+    type:Array
+  },
+  paging: {
+    default:function () {
+      return {}
+    },
+    type: Object
+  },
+  showCancle:{
+    default: false,
+    type:Boolean
+  },
+  title:{
+    default:'',
+    type:String
+  },
+  name:{
+    default:'',
+    type:String
+  },
+  current: {
+    default:''
+  }
+},
+  components:{
+    Paging
+  },
+  watch:{
+    houseSelect:{
+      deep:true,
+      handler:function (newVal) {
+        console.log(newVal);
+      }
+    },
+    houseList:{
+      immediate:true,
+      handler:function (newVal){
+        if (newVal) {
+          let tmp =newVal.find(item=>{
+           return item.zygwId == this.current
+          })
+          this.houseSelect = tmp?{...tmp,id:tmp.zygwId} : {}
+        }
+      }
+    },
+  },
+  computed:{
+  },
+  data () {
+    return {
+      categs: [],
+      houseSelect: {
+        id:this.current
+      },
+      pactive:'',
+      allSelect: false,
+      key:'',
+      tmppaging:{...this.paging},
+      position:[{
+        id:'zhiye',
+        name:'置业顾问'
+      },{
+        id:'anchang',
+        name:'案场顾问'
+      },{
+        id:'mendian',
+        name:'门店经理人'
+      }]
+    }
+  },
+
+  methods: {
+    changeCurrent(data){
+      this.$emit('changeCurrent',data)
+    },
+    selectGood(item, isSelect){
+      this.houseSelect = isSelect?item:''
+    }
+  },
+  mounted() {
+    this.key = ''
+  }
+}
+</script>
+
+<style lang="less" scoped>
+&.radio{
+  width: 14px;
+  height: 14px;
+  border: 1px solid #555555;
+  border-radius: 50%;
+  cursor: pointer;
+  position: relative;
+  cursor: pointer;
+  display: inline-block;
+  &::before{
+    width: 8px;
+    height: 8px;
+    background: none;
+    content: '';
+    display: inline-block;
+    position: absolute;
+    top: 50%;
+    border-radius: 50%;
+    left: 50%;
+    transform: translate(-50%,-50%);
+  }
+}
+
+&.radio_active{
+  border: 1px solid #1FE4DC;
+  &::before{
+    width: 8px;
+    height: 8px;
+    background: #1FE4DC;
+    content: '';
+    display: inline-block;
+    position: absolute;
+    top: 50%;
+    border-radius: 50%;
+    left: 50%;
+    transform: translate(-50%,-50%);
+  }
+}
+
+.jf-name{
+  color: #1FE4DC;
+  display: inline-block;
+  margin-left: 10px;
+  >i{
+    font-size: 10px;
+    margin-left: 6px;
+    cursor: pointer;
+  }
+  
+}
+.select-commodity {
+  position: absolute;
+  z-index: 3;
+  left: 50%;
+  top: 50%;
+  transform: translateX(-50%) translateY(-50%);
+  background: #252828;
+  color: #fff;
+  width: 500px;
+}
+
+.select-commodity > * {
+  padding: 15px;
+}
+
+.title {
+  font-size: 16px;
+  line-height: 20px;
+  font-weight: 400;
+  margin: 0;
+  font-weight: bold;
+  border-bottom: 1px solid rgba(255,255,255,0.3);
+}
+
+.close {
+  position: absolute;
+  right: -8px;
+  top: -15px;
+  font-size: 25px;
+  color: rgba(255,255,255,0.5);
+  transform: rotate(45deg);
+  cursor: pointer;
+}
+
+.filter {
+  padding: 15px;
+  padding-bottom: 0;
+  .finput{
+    margin-top: 10px;
+    position: relative;
+    >i{
+      position: absolute;
+      top: 50%;
+      transform: translateY(-50%);
+      right: 10px;
+      cursor: pointer;
+      color:@color;
+    }
+  }
+}
+
+.position{
+  padding: 15px;
+  padding-bottom: 0;
+  .plist{
+    display: flex;
+    align-items: center;
+    margin-top: 10px;
+    >li{
+      margin-right: 20px;
+      display: flex;
+      align-items: center;
+      cursor: pointer;
+      >span{
+        display: inline-block;
+        &:last-of-type{
+          margin-left: 10px;
+        }
+      }
+    }
+  }
+}
+
+.table-layer {
+  min-height: 400px;
+  max-height: 60vh;
+}
+
+
+.list {
+  width: 100%;
+  table-layout: fixed;
+  border-collapse: collapse;
+}
+
+.list thead{
+  border-bottom: 1px solid rgba(255,255,255,0.1);
+  >tr{
+    width: 100%;
+    padding-bottom: 10px;
+    display: flex;
+    justify-content: space-around;
+    >th{
+      flex: 1;
+      text-align: left;
+      color:rgba(255,255,255,0.60);
+      font-weight: normal;
+      padding-left: 10px;
+      &:last-of-type{
+        padding-left: 0;
+        text-align: center;
+      }
+    }
+  }
+}
+
+.list tbody{
+  width: 100%;
+  display: block;
+  max-height: 40vh;
+  overflow: auto;
+  >tr{
+    display:flex;
+    justify-content: space-around;
+    border-bottom: 1px solid rgba(255,255,255,0.1);
+    align-items: center;
+    >td{
+      flex: 1;
+      text-align: left;
+      color:#fff;
+      font-weight: normal;
+      padding: 10px 0 10px 10px;
+      &:last-of-type{
+        padding-left: 0;
+        text-align: center;
+      }
+    }
+  }
+
+}
+
+
+.list-img {
+  height: 40px;
+  line-height: 40px;
+  position: relative;
+
+}
+
+.list-img > img {
+  width: 40px;
+  height: 40px;
+  border-radius: 50%;
+}
+
+
+.paging {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  p {
+    font-size: 12px;
+  }
+}
+
+.btns {
+  text-align: center;
+
+  > a {
+    width:120px;
+    height:40px;
+    text-align: center;
+    line-height: 40px;
+    opacity:1;
+    border-radius:20px;
+    font-size:12px;
+    cursor: pointer;
+    color: #fff;
+    display: inline-block;
+    &:nth-child(1) {
+      background-color: #00C8AF;
+    }
+    &:nth-child(2) {
+      margin-left: 20px;
+      border:1px solid rgba(112,112,112,1);
+    }
+  }
+}
+</style>

+ 11 - 3
src/components/shared/Combox.vue

@@ -1,7 +1,7 @@
 <template>
     <div class="com-combox ui-input" :class="{show:showPopup}" @click="show" v-clickoutside="hide">
         <div class="input">
-            <p v-if="current">{{current.name}}</p>
+            <p v-if="current" :title="current[nameKey]">{{current[nameKey]}}</p>
         </div>
         <ul class="ui-input">
             <li
@@ -12,7 +12,7 @@
             >
                 <slot :item="item">
                     <template>
-                        <span>{{item.name}}</span>
+                        <span>{{item[nameKey]}}</span>
                     </template>
                 </slot>
             </li>
@@ -31,6 +31,10 @@ export default {
         selectedIndex: {
             type: Number,
             default:0
+        },
+        nameKey:{
+            type: String,
+            default: "name"
         }
     },
     data() {
@@ -111,13 +115,17 @@ export default {
         li {
             padding: 5px;
             display: flex;
-            height: 30px;
+            min-height: 30px;
             align-items: center;
             &.active,
             &:hover {
                 background: #272729;
                 color: @color;
             }
+            span{
+                white-space: normal;
+                display: inline-block;
+            }
         }
     }
     i {

+ 93 - 104
src/core/utils.js

@@ -1,157 +1,160 @@
+import Vue from "vue";
 
-import Vue from 'vue'
-
-let vue = new Vue()
+let vue = new Vue();
 
 export default class Utils {
-  constructor(){
-    
-  }
+  constructor() {}
   /**
    * 设置初始视角
    */
-  setInitView(krpano,canvas) {
-      let url = this.setInitAngleImg(canvas);
-      var sceneName = krpano.get('xml.scene');
-      var hlookat = krpano.get("view.hlookat");
-      var vlookat = krpano.get("view.vlookat");
-      return {
-        sceneName,
-        hlookat,
-        vlookat,
-        url
-      }
+  setInitView(krpano, canvas) {
+    let url = this.setInitAngleImg(canvas);
+    var sceneName = krpano.get("xml.scene");
+    var hlookat = krpano.get("view.hlookat");
+    var vlookat = krpano.get("view.vlookat");
+    return {
+      sceneName,
+      hlookat,
+      vlookat,
+      url,
+    };
   }
 
-  scaleCanvas (canvas, width, height) {
-    let w = canvas.width
+  scaleCanvas(canvas, width, height) {
+    let w = canvas.width;
     let h = canvas.height;
     if (width == undefined) {
-        width = w;
+      width = w;
     }
     if (height == undefined) {
-        height = h;
+      height = h;
     }
-    var retCanvas = document.createElement('canvas');
-    var retCtx = retCanvas.getContext('2d');
+    var retCanvas = document.createElement("canvas");
+    var retCtx = retCanvas.getContext("2d");
     retCanvas.width = width;
     retCanvas.height = height;
     retCtx.drawImage(canvas, 0, 0, w, h, 0, 0, width, height);
     return retCanvas;
   }
-  getDataURL (canvas, type, width, height) {
+  getDataURL(canvas, type, width, height) {
     let cas = this.scaleCanvas(canvas, width, height);
-    return cas.toDataURL(type,0.5);
+    return cas.toDataURL(type, 0.5);
   }
 
-  setInitAngleImg(mycanvas){
-      var url = this.getDataURL(mycanvas,"image/jpeg",600,400);
-      return url
+  setInitAngleImg(mycanvas) {
+    var url = this.getDataURL(mycanvas, "image/jpeg", 600, 400);
+    return url;
   }
-  radarRotate(){
+  radarRotate() {
     // console.log(sceneName,hlookat);
   }
 
+
   /**
-   * 编辑热点
+   * 添加热点(展示端)
    */
 
-  edithotspot(krpano,param){
-    krpano.call(`editImgTextHotSpot(
+  addhotspot(krpano, param, type) {
+    krpano.set("curscreen_x", $("#pano").width() / 2);
+    krpano.set("curscreen_y", $("#pano").height() / 2);
+    krpano.call(
+      "screentosphere(curscreen_x, curscreen_y, curscreen_ath, curscreen_atv);"
+    );
+    let ath = krpano.get("curscreen_ath");
+    let atv = krpano.get("curscreen_atv");
+
+    if (param.lineTxt) {
+      krpano.call(`${!param.link ? "addLineTxtHotSpot" : "addLineTxtHotSpotWithBg"}(
         ${param.img},
         ${param.name},
         ${param.hotspotTitle},
-        ${param.link})`);
-   }
-
-
-  /**
-   * 添加热点
-   */
+        ${param.ath || ath},
+        ${param.atv || atv},
+        ${param.img.indexOf('line-l.png')>-1},
+        ${type},
+        ${param.link},
+        ${true},
+        ${param.visible})`);
+    } else {
+      param.img = param.img.replace(/old\//g, "");
+      let split = param.img.split("xulie/");
+      if (!param.link) {
+        param.img = split[0] + "xulie/old/" + split[1];
+      }
 
-  addhotspot(krpano,param, type){
-    krpano.set("curscreen_x", $('#pano').width() / 2);
-    krpano.set("curscreen_y", $('#pano').height() / 2);
-    krpano.call("screentosphere(curscreen_x, curscreen_y, curscreen_ath, curscreen_atv);");
-    let ath = krpano.get("curscreen_ath");
-    let atv = krpano.get("curscreen_atv");
-    // param.img = '/static/panoassets/images/hotspot/xulie/location_icon@2x.png'
-    krpano.call(`addImgTextHotSpot(
+      krpano.call(`${!param.link ? "addImgTextHotSpotWithoutBg" : "addImgTextHotSpot"}(
       ${param.img},
       ${param.name},
       ${param.hotspotTitle},
-      ${param.ath||ath},
-      ${param.atv||atv},
+      ${param.ath || ath},
+      ${param.atv || atv},
       ${true},
       ${type},
       ${param.link},
       ${true},
-      ${param.visible})`); 
+      ${param.visible})`);
+    }
   }
 
   htmlEncode(str) {
-      var s = "";
-      if (str.length == 0) return "";
-      s = str.replace(/\'/g, "&#39;");
-      s = s.replace(/\"/g, "&quot;");
-      s = s.replace(/\(/g, "(");
-      s = s.replace(/\)/g, ")");
-      s = s.replace(/,/g, ",");
-      return s;
+    var s = "";
+    if (str.length == 0) return "";
+    s = str.replace(/\'/g, "&#39;");
+    s = s.replace(/\"/g, "&quot;");
+    s = s.replace(/\(/g, "(");
+    s = s.replace(/\)/g, ")");
+    s = s.replace(/,/g, ",");
+    return s;
   }
 
   /**
-   * 
-   * @param {*} 定位热点 
+   *
+   * @param {*} 定位热点
    */
 
-  looktohotspot(krpano, hotspotName){
-      var curFov = krpano.get('view.fov');
-      krpano.call('looktohotspot('+hotspotName+','+curFov+')');
+  looktohotspot(krpano, hotspotName) {
+    var curFov = krpano.get("view.fov");
+    krpano.call("looktohotspot(" + hotspotName + "," + curFov + ")");
   }
 
-
   /**
-   * 
-   * @param {*} 定位热点 
+   *
+   * @param {*} 定位热点
    */
 
-  getHotspotHV(krpano, hotspotName){
-      var ath = krpano.get(`hotspot[${hotspotName}].ath`);
-      var atv = krpano.get(`hotspot[${hotspotName}].atv`);
-      return {ath,atv}
+  getHotspotHV(krpano, hotspotName) {
+    var ath = krpano.get(`hotspot[${hotspotName}].ath`);
+    var atv = krpano.get(`hotspot[${hotspotName}].atv`);
+    return { ath, atv };
   }
 
-    
   /**
    * 打开热点链接
    */
 
-  linkopen(sceneCode,id){
-    if (window.location.pathname.indexOf('edit')>-1) {
-      vue.$bus.emit('openHotspot',id)
+  linkopen(sceneCode, id) {
+    if (window.location.pathname.indexOf("edit") > -1) {
+      vue.$bus.emit("openHotspot", id);
+    } else {
+      sceneCode &&
+        window.parent.postMessage(
+          { event: "hotspot", targetCode: sceneCode },
+          "*"
+        );
     }
-    else{
-      window.parent.postMessage({ event: 'hotspot', targetCode: sceneCode },'*')
-    }
-   
   }
 
-  
-
-  
-  
   /**
    * 初始化
    */
 
-  initHotspot(krpano,someData,type){
+  initHotspot(krpano, someData, type) {
     if (!someData) {
-      return 
+      return;
     }
-    let mysd = JSON.parse(someData)
-    mysd.hotspots.forEach(item => {
-      this.addhotspot(krpano,item,type)
+    let mysd = JSON.parse(someData);
+    mysd.hotspots.forEach((item) => {
+       this.addhotspot(krpano, item, type)
     });
   }
 
@@ -159,27 +162,13 @@ export default class Utils {
    * 显示隐藏热点
    */
 
-  toggleHotspot(krpano,toggle){
+  toggleHotspot(krpano, toggle) {
     try {
       krpano.call(`set_hotspot_visible(${toggle})`);
     } catch (e) {
-      e
+      e;
     }
   }
 
-  /**
-   * 显示隐藏热点
-   */
-
+  
 }
-
-
-// toggleHotspot(krpano,someData,toggle){
-//   if (!someData) {
-//     return 
-//   }
-//   let mysd = JSON.parse(someData)
-//   mysd.hotspots.forEach(item => {
-//     krpano.set(`hotspot[${item.name}].visible`,toggle);
-//   });
-// }

+ 14 - 7
src/framework/Head.vue

@@ -1,14 +1,14 @@
 <template>
   <header class="app-head" app-border dir-bottom>
     <span class="app-head-title">{{info.houseTitle}}</span>
-    <div class="app-head-save app-head-view" @click="onSave" :class="{disable:!canLoad}">
+    <div class="app-head-save" @click="onSave" :class="{disable:!canLoad}">
       <i class="iconfont icon_save"></i>
       保存
     </div>
-    <div class="app-head-save" @click="onView" :class="{disable:!canLoad}">
+    <!-- <div class="app-head-save" @click="onView" :class="{disable:!canLoad}">
       <i class="iconfont icon_eye"></i>
       预览
-    </div>
+    </div> -->
   </header>
 </template>
 <script>
@@ -46,7 +46,7 @@ export default {
     })
 
     this.$bus.on('initScene',(data)=>{
-      this.firstScene = data
+      this.firstScene = data && data[0]
     })
   },
   computed: {
@@ -86,6 +86,12 @@ export default {
             }})
           return false
         }
+
+        if (!this.firstScene.webSite&&this.isShow) {
+            return this.$alert({
+              content: "请至少设置一个初始场景",
+            })
+          }
       return true
     },
     onView(){
@@ -136,9 +142,10 @@ export default {
     },
     getIndex(islongpolling=null){
       getIndex({islongpolling},data=>{
-        // this.img =data.data&& data.data.icon
-        this.$bus.emit('initScene',data.data)
-        this.$store.commit("SetInitScene", data.data);
+        let res = data.data
+        let temp = [{...res[0]},{...res[1],disableSet:!res[0]},{...res[2],disableSet:!res[1]}]
+        this.$bus.emit('initScene',temp)
+        this.$store.commit("SetInitScene", temp);
       })
     }
   }

+ 2 - 2
src/framework/Toolbar.vue

@@ -20,7 +20,7 @@
               <i class="iconfont iconscene_map_3d" :class="{'iconjump':item.type!=='house'}"></i>
             </div>
             <div class="img">
-              <img :src="item.icon" alt="">
+              <img :src="item.icon+`?${Math.random()}`" alt="">
             </div>
             <div class="ui-title">
               <span>{{item.sceneTitle}}</span>
@@ -161,7 +161,7 @@ export default {
       this.getPanoList()
     })
     this.$bus.on('setListThumb',(data)=>{
-      this.activeItem.icon = data.icon
+      this.activeItem.icon = data.icon+`?${Math.random()}`
       this.activeItem.initVisual = JSON.stringify(data.initVisual)
     })
     

+ 4 - 8
src/framework/core/index.vue

@@ -12,7 +12,7 @@
 
 <script>
 import * as krfn from "@/core/index.js";
-import { uploadCover,savePosition,saveInitScreen } from "@/api";
+import { uploadIndexImg,savePosition,saveInitScreen } from "@/api";
 import { $waiting } from '@/components/shared/loading'
 
 import Snapshot from "@/components/Snapshot";
@@ -43,8 +43,8 @@ export default {
       let krpano = document.getElementById('krpanoSWFObject');
       let data = __krfn.utils.setInitView(krpano, canvas);
 
-      uploadCover(
-        { file: data.url, filename: "initCover.jpg" },
+      uploadIndexImg(
+        { file: data.url, filename: "initCover.jpg",sceneCode:this.activeItem.sceneCode },
         res => {
           if (res.code==0) {
             saveInitScreen({
@@ -74,11 +74,7 @@ export default {
     addhotspot(param) {
       let krpano = document.getElementById('krpanoSWFObject');
       __krfn.utils.addhotspot(krpano, param, true);
-    },
-    edithotspot(param) {
-      let krpano = document.getElementById('krpanoSWFObject');
-      __krfn.utils.edithotspot(krpano, param);
-    },
+    }
     
   },
   watch:{

+ 1 - 2
src/framework/show/index.vue

@@ -32,11 +32,11 @@ export default {
 
         $('#pano').empty();
         window.vrInitFn = ()=>{
-            window.parent.postMessage({ event: 'loadcomplete', targetCode: newVal.sceneCode },'*')
             var krpano = document.getElementById('krpanoSWFObject');
             __krfn.utils.initHotspot(krpano,newVal&&newVal.someData,false);
         }
         window.vrViewFn = ()=>{
+          window.parent.postMessage({ event: 'loadcomplete', targetCode: newVal.sceneCode },'*')
           try {
               let tmp = JSON.parse(newVal.initVisual)
               var krpano = document.getElementById('krpanoSWFObject');
@@ -62,7 +62,6 @@ export default {
               vars:settings,
               passQueryParameters: true,
             });
-
         }
        
       },

+ 23 - 9
src/mixins/index.js

@@ -117,14 +117,28 @@ Vue.mixin({
             return str;
         },
         $htmlEncode(str) {
-                var s = "";
-                if (str.length == 0) return "";
-                s = str.replace(/\'/g, "&#39;");
-                s = s.replace(/\"/g, "&quot;");
-                s = s.replace(/\(/g, "(");
-                s = s.replace(/\)/g, ")");
-                s = s.replace(/,/g, ",");
-                return s;
-            }
+            var s = "";
+            if (str.length == 0) return "";
+            s = str.replace(/\'/g, "&#39;");
+            s = s.replace(/\"/g, "&quot;");
+            s = s.replace(/\(/g, "(");
+            s = s.replace(/\)/g, ")");
+            s = s.replace(/,/g, ",");
+            return s;
+        },
+        $deleteKRHotspot(data){
+            let krpano = document.getElementById('krpanoSWFObject');
+            let HV = window.__krfn.utils.getHotspotHV(krpano,data.name);
+            
+            krpano.call('removehotspot('+data.name+',true);');
+            krpano.call('removeplugin(' + ('tooltip_' + data.name) + ',true);');
+            return HV
+        },
+        $refreshHotspot(data){
+            let HV = this.$deleteKRHotspot(data)
+            data.ath = HV.ath
+            data.atv = HV.atv
+            this.$bus.emit("addhotspot", data);
+        }
     }
 })

+ 30 - 2
src/utils/request.js

@@ -24,11 +24,20 @@ export const statusCode = {
     NEXT: -999, //继续执行 
     SUCCESS: 0, //成功
     EXCEPTION: -1, //异常错误
+    EXCEPTION_FUWU: 1, //服务异常
+
+    FAILURE_CODE_3001: 3001, //模型重复
+    FAILURE_CODE_3002: 3002, //户型重复
+
     FAILURE_CODE_7007: 7007, //房源不存在
     FAILURE_CODE_7008: 7008, //有关联场景使用此场景,不能删除
     FAILURE_CODE_7005: 7005, //审核中不能编辑
     FAILURE_CODE_7006: 7006, //已审核不能编辑
-    FAILURE_CODE_5001: 5001 //token失效
+    FAILURE_CODE_5001: 5001, //token失效
+    FAILURE_CODE_60001: 60001 //场景名称不能为空
+
+    
+    
 }
 
 /**
@@ -89,6 +98,25 @@ export function statusCodesHandler(result, callback) {
         }})
     }
 
+    if (result.code == statusCode.FAILURE_CODE_60001) {
+        return $alert({ 
+            content: '场景名称不能为空'})
+    }
+
+
+    if (result.code == statusCode.FAILURE_CODE_3001) {
+        return $alert({ 
+            content: 'VR模型已存在,不能重复添加'})
+    }
+
+
+    if (result.code == statusCode.FAILURE_CODE_3002) {
+        return $alert({ 
+            content: '户型已存在,不能重复添加'})
+    }
+
+    
+
     if (result.code == statusCode.FAILURE_CODE_7006) {
         return $alert({ 
             content: '该VR项目已审核,不可编辑。',
@@ -126,7 +154,7 @@ export function statusCodesHandler(result, callback) {
             }})
     }
 
-    if (result.code == statusCode.EXCEPTION) {
+    if (result.code == statusCode.EXCEPTION||result.code == statusCode.EXCEPTION_FUWU) {
         if (__showNoHouseError) {
             return
         }

+ 205 - 213
src/views/hotspot/EditPanel.vue

@@ -7,7 +7,7 @@
   >
     <div class="hots-panel" v-show="show">
       <div class="ui-between header" app-border dir-bottom>
-        <span>{{editTitle}}热点</span>
+        <span>{{ editTitle }}热点</span>
         <i class="iconfont icon_close" @click="cancel"></i>
       </div>
       <div class="content">
@@ -19,24 +19,40 @@
                 <ul class="styles">
                   <li
                     :class="{ active: item.id == styIcon }"
-                    v-for="(item,i) in hotStyle"
+                    v-for="(item, i) in hotStyle"
                     @click="addhotspot(item)"
                     :key="i"
                   >
-                    <img :src="item.thumb" alt="">
+                    <img :style="{padding:item.type=='static'?'8px':'0'}" :src="item.thumb" alt="" />
                   </li>
                 </ul>
               </div>
             </li>
             <li app-border dir-bottom>
-              <div class="ui-between title">标题
-                  <div
-                    class="checkbox"
-                    @click="infoItem.visible=!infoItem.visible"
-                    :class="{checked:infoItem.visible}"
+              <div class="ui-between title">链接到</div>
+              <div class="medias">
+                <template v-if="infoItem.thumb">
+                  <img :src="infoItem.thumb+`?${Math.random()}`" alt="" />
+                  <div class="mask">
+                    <button @click="handleDel" class="ui-button submit">删除</button>
+                  </div>
+                </template>
+
+                <div class="btn-push" @click="$emit('select', selectItem || null)" v-else>
+                  <i class="iconfont iconfont icon_plus"></i>
+                  <span>选择场景</span>
+                </div>
+              </div>
+       
+              <div class="ui-between title">
+                标题
+                <div
+                  class="checkbox"
+                  @click="infoItem.visible = !infoItem.visible"
+                  :class="{ checked: infoItem.visible }"
                 >
-                    <i class="iconfont icon_checkbox"></i>
-                    &nbsp;显示标题
+                  <i class="iconfont icon_checkbox"></i>
+                  &nbsp;显示标题
                 </div>
               </div>
               <div>
@@ -48,14 +64,6 @@
                   v-model="infoItem.hotspotTitle"
                 />
               </div>
-              <div class="ui-between title">链接到</div>
-              <div class="medias" @click="$emit('select',selectItem||null)">
-                <img :src="infoItem.thumb" v-if="infoItem.thumb" alt="">
-                <div class="btn-push" v-else>
-                  <i class="iconfont icon_plus"></i>
-                  <span>选择场景</span>
-                </div>
-              </div>
             </li>
           </ul>
         </div>
@@ -67,156 +75,176 @@
   </transition>
 </template>
 <script>
-
 export default {
-  props: ['show','data','editTitle'],
-  data(){
-    let cdn = this.$config.getStaticResource('/panoassets/images/hotspot/xulie/')
-    localStorage.setItem('initItem',this.data?JSON.stringify(this.data):'') 
+  props: ["show", "data", "editTitle"],
+  data() {
+    let cdn = this.$config.getStaticResource(
+      "/panoassets/images/hotspot/xulie/"
+    );
+    localStorage.setItem(
+      "initItem",
+      this.data ? JSON.stringify(this.data) : ""
+    );
     return {
-      hotStyle:[{
-        id:'ditu',
-        img:cdn+'ditu_2021.png',
-        thumb:cdn+'ditu_000.png'
-      },{
-        id:'kaimen',
-        img:cdn+'kaimen_2021.png',
-        thumb:cdn+'kaimen_000.png'
-      },{
-        id:'shinei',
-        img:cdn+'shinei_2021.png',
-        thumb:cdn+'shinei_000.png'
-      }],
-      selectItem:'',
-      styIcon:'ditu',
-      linkicon:'',
-      infoItem: '',
-      isAdd:true,
-    }
+      hotStyle: [
+        {
+          id: "ditu",
+          img: cdn + "ditu_2021.png",
+          thumb: cdn + "ditu_000.png",
+        },
+        {
+          id: "kaimen",
+          img: cdn + "kaimen_2021.png",
+          thumb: cdn + "kaimen_000.png",
+        },
+        {
+          id: "shinei",
+          img: cdn + "shinei_2021.png",
+          thumb: cdn + "shinei_000.png",
+        },
+        {
+          id: "line-l",
+          img: cdn + "line-l.png",
+          thumb: cdn + "line-l.png",
+          type:'static'
+        },
+        {
+          id: "line-r",
+          img: cdn + "line-r.png",
+          thumb: cdn + "line-r.png",
+          type:'static'
+        }
+      ],
+      selectItem: "",
+      styIcon: "ditu",
+      linkicon: "",
+      infoItem: ""
+    };
   },
 
-  watch:{
-    data:{
-      immediate:true,
-      deep:true,
-      handler:function (newVal) {
+  watch: {
+    data: {
+      immediate: true,
+      deep: true,
+      handler: function (newVal) {
         // 热点名字不允许数字开头 所以param.name前加个_
-          this.infoItem = newVal || {
-            name: "_"+this.$randomWord(true,8,8),
-            hotspotTitle:'',
-            img:'',
-            thumb:'',
-            link:'',
-            visible: true,
-            ath: '',
-            atv: '',
-            icontype: ''
-          }
-          this.styIcon = this.infoItem.icontype
-          
-      }
+        this.infoItem = newVal || {
+          name: "_" + this.$randomWord(true, 8, 8),
+          hotspotTitle: "",
+          img: "",
+          thumb: "",
+          link: "",
+          visible: true,
+          ath: "",
+          atv: "",
+          icontype: "",
+          lineTxt:''
+        };
+        this.styIcon = this.infoItem.icontype;
+      },
     },
-    'infoItem.hotspotTitle':function () {
-      this.$bus.emit('edithotspotTitle',this.infoItem)
+    "infoItem.hotspotTitle": function () {
+      this.$bus.emit("edithotspotTitle", this.infoItem);
     },
-    'infoItem.visible':function () {
-      this.$bus.emit('edithotspotTitleisShow',this.infoItem)
+    "infoItem.visible": function () {
+      this.$bus.emit("edithotspotTitleisShow", this.infoItem);
     },
-    show(newVal){
+     "infoItem.link": function () {
+        this.$refreshHotspot(this.infoItem)
+      // this.$bus.emit("edithotspotTitle", this.infoItem);
+    },
+    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);
   },
-  mounted(){
-      this.selectItem = {
-        sceneCode: this.infoItem.link
-      }
+  mounted() {
+    this.selectItem = {
+      sceneCode: this.infoItem.link,
+    };
 
-      this.$bus.on('selectUrl',this.listerFn)
+    this.$bus.on("selectUrl", this.listerFn);
   },
 
   methods: {
-    listerFn(data){
+    handleDel(){
+      this.infoItem.thumb=''
+      this.infoItem.link=''
+      this.selectItem = null
+    },
+    listerFn(data) {
       this.selectItem = {
-        sceneCode: data.sceneCode
-      }
-      this.infoItem.link = data.sceneCode
-      this.infoItem.thumb = data.icon  
+        sceneCode: data.sceneCode,
+      };
+      this.infoItem.link = data.sceneCode;
+      this.infoItem.thumb = data.icon;
+      this.infoItem.hotspotTitle= data.type=='house'? data.roomName: data.sceneTitle
     },
     cancel() {
-      let tmp = localStorage.getItem('initItem')
+      let tmp = localStorage.getItem("initItem");
       if (tmp) {
-        this.reset(JSON.parse(tmp))
-        this.$emit("close",{
-          type:'edit',
-          data:JSON.parse(tmp)
+        this.reset(JSON.parse(tmp));
+        this.$emit("close", {
+          type: "edit",
+          data: JSON.parse(tmp),
         });
-      }
-      else{
-        this.$emit("close",{
-          type:'add',
-          data:this.infoItem
+      } else {
+        this.$emit("close", {
+          type: "add",
+          data: this.infoItem,
         });
       }
     },
-    reset(data){
-      this.$bus.emit('edithotspotTitle',data)
-      this.$bus.emit('edithotspotTitleisShow',data)
-      let krpano = document.getElementById('krpanoSWFObject');
-      krpano.set(`hotspot[${data.name}].url`,data.img)
+    reset(data) {
+      this.$bus.emit("edithotspotTitle", data);
+      this.$bus.emit("edithotspotTitleisShow", data);
+      let krpano = document.getElementById("krpanoSWFObject");
+      krpano.set(`hotspot[${data.name}].url`, data.img);
     },
     save() {
-      if (!this.infoItem.hotspotTitle || !this.infoItem.thumb|| !this.infoItem.img) {
+      if (
+        !this.infoItem.hotspotTitle ||
+        // !this.infoItem.thumb ||
+        !this.infoItem.img
+      ) {
         return this.$alert({
-          content: "请补全必填信息(图标,标题和链接)",
-        })
+          content: "请补全必填信息(图标和标题)",
+        });
       }
       this.$emit("close");
-      this.$emit("save",this.infoItem);
+      this.$emit("save", this.infoItem);
+    },
+    
+    addhotspot(data) {
+      this.infoItem.img = data.img;
+      this.infoItem.icontype = data.id;
+      this.infoItem.lineTxt = data.type == 'static'
+      this.styIcon = data.id;
+      this.$refreshHotspot(this.infoItem)
     },
-    addhotspot(data){
-      if (this.isAdd) {
-        this.isAdd = false
-        this.infoItem.img = data.img
-        this.infoItem.icontype = data.id
-        this.styIcon = data.id
-        this.$bus.emit('addhotspot',this.infoItem)
-      }
-      else{
-        this.infoItem.img = data.img
-        this.infoItem.icontype = data.id
-        this.styIcon = data.id
-        let krpano = document.getElementById('krpanoSWFObject');
-        krpano.set(`hotspot[${this.infoItem.name}].url`,data.img)
-        krpano.set(`hotspot[${this.infoItem.name}].hotspottitle`,this.infoItem.hotspotTitle)
-
-      }
-      
-    }
   },
 };
 </script>
 <style lang="less" scoped>
 .icon_checkbox {
-    font-size: 14px;
-    &::before {
-        content: "\e667";
-    }
+  font-size: 14px;
+  &::before {
+    content: "\e667";
+  }
 }
 
-
 .checkbox {
-    cursor: pointer;
-    &.checked {
-        color: @color;
-        .icon_checkbox::before {
-            content: "\e671";
-        }
+  cursor: pointer;
+  &.checked {
+    color: @color;
+    .icon_checkbox::before {
+      content: "\e671";
     }
+  }
 }
 
 .hots-panel {
@@ -294,98 +322,59 @@ export default {
         }
       }
     }
-    .medias-list {
+    .medias {
+      height: 105px;
+      width: 210px;
       position: relative;
-      ul {
-        margin-bottom: 10px;
-        display: flex;
-        justify-content: space-around;
+      background: #161a1a;
+      border: 1px solid #555a5a;
+      margin-bottom: 10px;
+      > img {
+        width: 100%;
+        height: 100%;
       }
-      li {
-        position: relative;
+      .btn-push {
+        position: absolute;
+        top: 50%;
+        left: 50%;
+        transform: translate(-50%, -50%);
+        text-align: center;
+        text-align: center;
+        color: @color;
         cursor: pointer;
-        padding: 0;
-        display: flex;
-        align-items: center;
-        justify-content: center;
-        span {
-          width: 14px;
-          height: 14px;
-          background-color: #fff;
-          border: solid 3px #fff;
-          border-radius: 50%;
+        > i {
+          font-size: 20px;
         }
-        i {
-          font-size: 23px;
-          margin-left: 4px;
-          color: rgba(255, 255, 255, 0.5);
+        > span {
+          display: block;
         }
-        em {
-          display: none;
+      }
+      .mask {
+        width: 100%;
+        height: 100%;
+        background: rgba(0, 0, 0, 0.5);
+        display: none;
+        position: absolute;
+        top: 0;
+        left: 0;
+        > button {
           position: absolute;
-          top: -8px;
+          top: 50%;
           left: 50%;
-          width: 0;
-          height: 0;
-          border-style: solid;
-          border-width: 8px;
-          border-color: #000 transparent transparent;
-        }
-
-        div {
-          display: none;
-          right: 10px;
-          padding: 8px;
-          margin-top: -36px;
-          position: fixed;
-          background-color: #000;
-          border-radius: 4px;
+          transform: translate(-50%, -50%);
+          min-width: 60px;
+          height: 24px;
           font-size: 12px;
-          min-width: 200px;
-        }
-
-        &.active {
-          span {
-            background-color: @color;
-          }
-          i {
-            color: @color;
-          }
-        }
-        &:hover {
-          em,
-          div {
-            display: block;
-          }
         }
       }
-    }
-    .medias {
-        height: 105px; 
-        width: 210px;
-        position: relative;
-        background: #161A1A;
-        cursor: pointer;
-        border: 1px solid #555A5A;
-        >img{
-          width: 100%;
-          height: 100%;
-        }
-        .btn-push{
-            position: absolute;
-            top: 50%;
-            left: 50%;
-            transform: translate(-50%,-50%);
-            text-align: center;
-            color: @color;
-            >i{
-                font-size: 20px;
-            }
-            >span{
-                display: block;
-            }
+      &:hover {
+        .mask {
+          display: block;
         }
+      }
     }
+
+  
     .styles {
       display: flex;
       align-items: center;
@@ -408,7 +397,7 @@ export default {
         &:nth-of-type(5) {
           margin-left: 0;
         }
-        &:nth-of-type(n+5) {
+        &:nth-of-type(n + 5) {
           margin-bottom: 0;
         }
         > span {
@@ -419,10 +408,10 @@ export default {
           text-align: center;
           font-size: 12px;
         }
-        >i{
-            font-size: 32px;
+        > i {
+          font-size: 32px;
         }
-        >img{
+        > img {
           width: 40px;
           height: 40px;
         }
@@ -551,6 +540,9 @@ export default {
       white-space: pre-wrap;
       font-size: 12px;
     }
+    .sceneTil{
+      margin-bottom: 20px;
+    }
   }
 }
 </style>

+ 3 - 8
src/views/hotspot/Setting.vue

@@ -82,21 +82,16 @@ export default {
         })
     },
     methods:{
-        deleteKRHotspot(data){
-            let krpano = document.getElementById('krpanoSWFObject');
-            krpano.call('removehotspot('+data.name+',true);');
-            krpano.call('removeplugin(' + ('tooltip_' + data.name) + ',true);');
-        },
         close(data){
             if (data) {
                 if (data.type == 'edit') {
-                    this.deleteKRHotspot(data.data)
+                    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.$deleteKRHotspot(data.data)
                 }
             }
             this.showPanel = false;
@@ -145,7 +140,7 @@ export default {
                 sceneTitle: this.activeItem.sceneTitle,
                 someData:this.someData
             },()=>{
-                this.deleteKRHotspot(data)
+                this.$deleteKRHotspot(data)
                 this.activeItem.someData = JSON.stringify(this.someData)
                 this.$tips({content:'删除成功',icon:'ok'})
 

+ 1 - 1
src/views/hotspot/Toolbar.vue

@@ -20,7 +20,7 @@
               <i class="iconfont iconscene_map_3d" :class="{'iconjump':item.type!=='house'}"></i>
             </div>
             <div class="img">
-              <img :src="item.icon" alt="">
+              <img :src="item.icon+`?${Math.random()}`" alt="">
             </div>
             <div class="ui-title">
               <span>{{item.fileName}}</span>

+ 1 - 1
src/views/hotspot/index.vue

@@ -26,7 +26,7 @@
                   <i class="iconfont iconscene_map_3d" :class="{'iconjump':item.type!=='house'&&item.byType!='garden'}"></i>
                 </div>
                 <div class="img">
-                  <img :src="item.icon" alt="">
+                  <img :src="item.icon+`?${Math.random()}`" alt="">
                 </div>
                 <div class="ui-title">
                   <span>{{item.type=='house'?item.roomName:item.sceneTitle}}</span>

+ 145 - 49
src/views/information/Setting.vue

@@ -1,79 +1,175 @@
 <template>
   <div class="view-setting" app-border dir-left>
-    <div class="ui-title">VR项目初始场景</div>
-    <div class="preview">
-      <img v-if="img" :src="img" alt="">
-      <div class="tips" v-else>
-        <i class="iconfont iconphotoview" style="font-size: 40px"></i>
+    <div class="p-top">
+      <div class="ui-title">VR项目初始场景</div>
+      <div class="ui-remark">
+        初始场景指项目打开时第一场景。您可设置3个初始场景,生成3个VR项目链接。
       </div>
     </div>
-    <div class="setinit">
-      <button @click="$emit('select',initScene?initScene.id:null)" class="ui-button submit" :class="{disable:allVrlist.length<=0}">
-        设置初始场景
-      </button>
+
+    <div class="p-con" app-border dir-bottom v-for="(item,i) in initScene" :key="i">
+      <div class="preview">
+        <template v-if="item.icon">
+          <img :src="item.icon+`?${Math.random()}`" alt="" />
+          <div class="mask">
+            <button
+              @click="del(item)"
+              class="ui-button submit"
+            >
+              删除
+            </button>
+          </div>
+          <div class="typeicon">
+            <i class="iconfont iconscene_map_3d"
+              :class="{ iconjump: item.type != 'house'&&item.byType!='garden' }"
+            ></i>
+          </div>
+        </template>
+        <div class="tips" v-else>
+          <i class="iconfont iconphotoview" style="font-size: 40px"></i>
+        </div>
+      </div>
+      <div class="ui-title">{{ item.type=='house' && item.byType!='garden' ? item.roomName: item.sceneTitle }}</div>
+      <div class="setinit">
+        <button
+          @click="$emit('select', item ? item : null)"
+          class="ui-button submit"
+          :class="{ disable: allVrlist.length <= 0 || item.disableSet }"
+        >
+          {{item.icon?'修改':'设置'}}初始场景
+        </button>
+      </div>
     </div>
-    <div class="ui-remark">请设置项目打开时第一场景。</div>
   </div>
 </template>
 
 <script>
-import { saveIndexInfo } from "@/api";
+import { saveIndexInfo,delInit } from "@/api";
 import { mapGetters } from "vuex";
 
-
 export default {
-  data(){
+  data() {
     return {
-      img:''
-    }
+      img: "",
+    };
   },
-  methods:{
-   
+  methods: {
+    del(item){
+      this.$confirm({
+          content: "是否删除?",
+          ok: () => {
+              delInit(item.id,()=>{
+                this.$tips({ content: "删除成功",icon:'ok' });
+                this.$bus.emit('setInitScene')
+              });
+          }
+      });
+    }
+
   },
   computed: {
     ...mapGetters({
-      initScene:'initScene',
-      allVrlist:'allVrlist'
-    })
+      initScene: "initScene",
+      allVrlist: "allVrlist",
+    }),
   },
-  mounted(){
-    // this.getIndex()
-    this.img = this.initScene ? this.initScene.icon :''
-    this.$bus.on('initScene',(data)=>{
-      this.img = data ? data.icon :''
-    })
-    this.$bus.on('getInitScene',data=>{
-      saveIndexInfo({id:data.id},res=>{
-        this.img = data.icon
+  mounted() {
+    this.img = this.initScene ? this.initScene.icon : "";
+    // this.$bus.on("initScene", (data) => {
+    //   this.img = data ? data.icon : "";
+    // });
+    this.$bus.on("getInitScene", (data) => {
+      console.log(data);
+      let params = {
+        id:data.selectId,
+        icon:data.icon,
+        sceneId:data.id
+      }
+      saveIndexInfo(params, (res) => {
+        this.img = data.icon;
         if (res.code == 0) {
-          this.$tips({content:'设置成功',icon:'ok'})
+          this.$bus.emit('setInitScene')
+          this.$tips({ content: "设置成功", icon: "ok" });
         }
-      })
-      this.img = data.icon
-    })
-  }
-}
+      });
+      this.img = data.icon;
+    });
+  },
+};
 </script>
 
 <style lang="less" scoped>
 .view-setting {
-  padding: 10px;
   width: 100%;
 }
-.preview {
-  width: 100%;
-  height: 102px;
-  overflow: hidden;
-  >img{
-    width: 100%;
-    height: 100%;
-  }
+
+.p-top {
+  padding: 10px;
 }
-.setinit {
-  width: 100%;
-  margin: 15px 0;
-  .ui-button {
-    width: 100%;
+
+.p-con {
+  padding: 0;
+  .preview {
+    width: calc(100% - 20px);
+    height: 102px;
+    overflow: hidden;
+    margin: 10px;
+    position: relative;
+    .typeicon{
+        position: absolute;
+        width: 32px;
+        height: 32px;
+        z-index: 11;
+        top: 4px;
+        left: 4px;
+        background: rgba(0, 0, 0, 0.5);
+        z-index: 99;
+        .iconfont{
+          position: absolute;
+          left: 50%;
+          top: 50%;
+          color: #fff;
+          transform: translate(-50%,-50%);
+        }
+    }
+    > img {
+      width: 100%;
+      height: 100%;
+    }
+    .mask{
+      width: 100%;
+      height: 100%;
+      background: rgba(0, 0, 0, 0.5);
+      display: none;
+      position: absolute;
+      top: 0;
+      left: 0;
+      z-index: 999;
+      >button{
+        position: absolute;
+        top: 50%;
+        left: 50%;
+        transform: translate(-50%,-50%);
+        min-width: 60px;
+        height: 24px;
+        font-size: 12px;
+      }
+    }
+    &:hover{
+      .mask{
+        display: block;
+      }
+    }
+  }
+  .ui-title {
+    margin: 10px;
+  }
+  .setinit {
+    width: calc(100% - 20px);
+    margin: 15px auto;
+    .ui-button {
+      width: 100%;
+    }
   }
 }
 </style>

+ 16 - 5
src/views/information/Toolbar.vue

@@ -16,14 +16,17 @@
                 <i class="iconfont iconscene_map_3d" :class="{'iconjump':item.type!=='house'}"></i>
               </div>
               <div class="img">
-                <img :src="item.icon" alt="">
+                <img :src="item.icon+`?${Math.random()}`" alt="">
               </div>
               <div class="oper" v-if="item.status!=1">
                 <i class="iconfont iconmore"></i>
                 <ul>
-                  <template v-if="item.status==3">
-                    <li v-if="type!='house'" @click="$emit('rename',item)">重命名</li>
-                    <li v-else @click="$emit('addVR',{type,data:item})">编辑</li>
+                  <template v-if="item.status!=1&&item.status!=2">
+                    <template v-if="item.type=='house'">
+                      <li @click="$emit('addAgent',item)">讲房人</li>
+                      <li @click="$emit('addVR',{type,data:item})">编辑</li>
+                    </template>
+                      <li v-else @click="$emit('rename',item)">重命名</li>
                   </template>
                   <li v-if="item.status!=1" @click="del(item)">删除</li>
                 </ul>
@@ -54,7 +57,7 @@
 
 <script>
 import Upload from "@/components/shared/uploads/UploadMultiple";
-import { uploadPano,getPanoList,delPano,setListSort } from "@/api";
+import { uploadPano,getPanoList,delPano,setListSort,isBindVr } from "@/api";
 import { getImgWH } from '@/utils/file'
 import { $waiting } from '@/components/shared/loading'
 import draggable from 'vuedraggable'
@@ -124,6 +127,14 @@ export default {
           content: "是否删除?",
           ok: () => {
               delPano(item.id,()=>{
+                if (item.type=='house'&&item.byType!='garden') {
+                  isBindVr({
+                    bind:1,
+                    houseId:item.roomId
+                  },res=>{
+                    console.log(res);
+                  })
+                }
                 this.$tips({ content: "删除成功",icon:'ok' });
                 this.getPanoList()
                 this.$bus.emit('undateAllVrList')

+ 140 - 22
src/views/information/index.vue

@@ -1,13 +1,29 @@
 <template>
   <div>
     <setting @select="handleShow"></setting>
-    <toolbar @addVR="handleAddvr" @rename="onRename"></toolbar>
+    <toolbar @addVR="handleAddvr" @addAgent="handleAddAgent" @rename="onRename"></toolbar>
+
+    <div class="dialog" v-if="agentshow">
+      <agentSelect
+        :houseList="agentList"
+        @updateList="updateAgent"
+        @cancle="agentshow = false"
+        :title="'选择讲房顾问'"
+        :name="'table'"
+        :current="currentAgent?currentAgent.agentId:''"
+        @changeCurrent="(data)=>{apaging.pageNum = data}"
+        :paging="aPaging"
+        :showCancle="false"
+        @submit="selectAgent">
+      </agentSelect>
+    </div>
+
     <div class="dialog" v-if="show">
       <Select
         @updateList="updateScene"
         :panos="list"
         :current="activeItem"
-        @cancle="show = false"
+        @cancle="show = false,activeItem=''"
         :title="'选择场景'"
         :name="'scene'"
         @submit="handelSelect"
@@ -19,7 +35,7 @@
               <li
                 v-for="(item, i) in data.arr"
                 @click="activeItem = item"
-                :class="{ 'li-active': item.id == activeItem.id }"
+                :class="{ 'li-active': (item.id == activeItem.id),disable:item.isUseIndex}"
                 :key="i"
               >
                 <div class="typeli">
@@ -98,8 +114,9 @@
         </div>
         <div class="ui-message-main re-name add-vr">
           <div>
-            <p class="ui-remark">样板间名称</p>
+            <p class="ui-remark">户型</p>
             <combox
+              :nameKey="'structure'"
               :data="houseNameList"
               :selected-index="houseActive"
               @change="onHouseChange"
@@ -110,6 +127,7 @@
             <div @click="huxingshow = true">
               <input
                 class="ui-input"
+                style="pointer-events: none;"
                 type="text"
                 placeholder="请选择VR模型"
                 v-model="huxing.sceneName"
@@ -135,6 +153,7 @@
 import Setting from "./Setting";
 import Toolbar from "./Toolbar";
 import Select from "@/components/select";
+import agentSelect from "@/components/agentSelect";
 import Popup from "@/components/shared/popup";
 import Combox from "@/components/shared/Combox";
 
@@ -144,14 +163,20 @@ import {
   getHouseNameList,
   getHouseList,
   saveHouse,
+  isBindVr,
   savePanoHouse,
+  saveAgent,
+  getAgentSelectList
 } from "@/api";
 
+let CACHEDATA=[]
+
 export default {
   name: "home",
   components: {
     Setting,
     Select,
+    agentSelect,
     Toolbar,
     Popup,
     Combox,
@@ -163,14 +188,18 @@ export default {
       activeItem: "",
       show: false,
       activeId: "",
+      selectId:'',
       huxingshow: false,
+      agentshow:false,
       searchKey: "",
       hxsearchKey: "",
+      agentSearchKey: "",
       house: "",
       houseNameList: [],
       houseActive: 0,
       houseDataActive: "",
       houseList: [],
+      agentList: [],
       hasChange: false,
       huxing: {
         sceneName: "",
@@ -185,6 +214,7 @@ export default {
         reName: "",
       },
       currentId: "",
+      currentAgent:'',
       list: [],
       paging: {
         pageSize: 8,
@@ -193,6 +223,13 @@ export default {
         showSize: 8,
         current: 1,
       },
+      aPaging: {
+        pageSize: 8,
+        pageNum: 1,
+        total: 0,
+        showSize: 8,
+        current: 1,
+      },
       type: "",
     };
   },
@@ -208,7 +245,7 @@ export default {
       this.list.forEach((item) => {
         if (!tmp) {
           tmp = item.arr.find((i) => {
-            return newVal == i.id;
+            return newVal == i.sceneCode;
           });
         }
       });
@@ -225,7 +262,10 @@ export default {
             size: 1000,
           },
           (res) => {
-            this.houseNameList = res.data ? res.data.records : [];
+            this.houseNameList = res.data ? res.data.records.map(item=>{
+              item.structure = item.name+ ' ' + item.structure +' '+ item.area  + ' ' + item.housePrice
+              return item
+            }) : [];
             if (this.huxing.roomId) {
               this.houseActive = this.houseNameList.findIndex(
                 (item) => this.huxing.roomId == item.id
@@ -242,6 +282,7 @@ export default {
         this.getPanoList();
       } else {
         this.activeId = "";
+        this.selectId = ''
       }
     },
     huxingshow(newVal) {
@@ -251,10 +292,35 @@ export default {
         this.getHouseList();
       }
     },
+    agentshow(newVal) {
+      if (newVal) {
+        this.agentSearchKey = "";
+        // this.getAgentSelectList();
+      }
+    }
   },
   methods: {
+    getAgentSelectList(){
+      getAgentSelectList({
+        current: 1,
+        size: 1000
+      },res=>{
+        this.agentList = res.data.records;
+        CACHEDATA = res.data.records
+        this.agentshow = true
+      })
+    },
+    updateAgent(data) {
+      this.agentSearchKey = data;
+      let tmp = CACHEDATA.filter(item=>{
+        return item.zygwName.indexOf(data) > -1
+      })
+      this.agentList = tmp
+      // this.getAgentSelectList();
+    },
     updateHX(data) {
       this.hxsearchKey = data;
+      this.paging.pageNum = 1;
       this.getHouseList();
     },
     updateScene(data) {
@@ -263,11 +329,16 @@ export default {
     },
     handleShow(data) {
       this.show = true;
-      this.activeId = data;
+      this.activeId = data.sceneCode;
+      this.selectId = data.id;
     },
     changeCurrent(data) {
       this.paging.pageNum = data;
     },
+    handleAddAgent(data){
+      this.currentAgent = data
+      this.getAgentSelectList()
+    },
     handleAddvr(data) {
       this.type = data.type;
       this.currentId = "";
@@ -278,6 +349,7 @@ export default {
           roomId: "",
         };
         if (data.data) {
+          console.log(data.data);
           this.huxing.roomId = data.data.roomId;
           this.huxing.sceneName = data.data.sceneTitle;
           this.huxing.id = data.data.vrModelId;
@@ -339,7 +411,7 @@ export default {
         !this.huxing.id ||
         !(this.houseDataActive && this.houseDataActive.id)
       ) {
-        return this.$alert({ content: "请选择样板间名称和VR模型" });
+        return this.$alert({ content: "请选择户型和VR模型" });
       }
 
       if (!this.hasChange) {
@@ -350,7 +422,7 @@ export default {
         {
           icon: this.huxing.thumb,
           roomId: this.houseDataActive && this.houseDataActive.id,
-          roomName: this.houseDataActive && this.houseDataActive.name,
+          roomName: this.houseDataActive && this.houseDataActive.structure,
           id: this.currentId || null,
           sceneTitle: this.huxing.sceneName,
           vrModelId: this.huxing.id,
@@ -359,14 +431,46 @@ export default {
         },
         (res) => {
           if (res.code == 0) {
-            this.$tips({
+              this.$tips({
               content: this.currentId ? "修改成功" : "添加成功",
-              icon: "ok",
-            });
-            this.hasChange = false;
-            this.huxingshow = false;
-            this.showAddHouse = false;
-            this.$bus.emit("refresh");
+                icon: "ok",
+              });
+              this.hasChange = false;
+              this.huxingshow = false;
+              this.showAddHouse = false;
+              this.$bus.emit("refresh");
+             
+
+            //解除原来的绑定
+            if (this.currentId) {
+              isBindVr({
+                bind:1,
+                houseId:this.huxing.roomId
+              },bind=>{
+                console.log('解绑===='+this.huxing.roomId,bind);
+                 //绑定新的户型
+                if (this.houseDataActive.id) {
+                  isBindVr({
+                    bind:2,
+                    houseId:this.houseDataActive.id
+                  },bind1=>{
+                    console.log(res);
+                    console.log('绑定===='+this.houseDataActive.id,bind1);
+                  })
+                }
+              })
+            }
+            else{
+              if (this.houseDataActive.id) {
+                isBindVr({
+                  bind:2,
+                  houseId:this.houseDataActive.id
+                },res=>{
+                  console.log('绑定===='+this.houseDataActive.id,res);
+                })
+              }
+            }
+            
           } else {
             return this.$alert({ content: res.msg });
           }
@@ -410,13 +514,27 @@ export default {
       }
     },
 
+    selectAgent(data){
+      saveAgent({
+        agentId: data.id,
+        id: this.currentAgent.id
+      },()=>{
+        this.$tips({
+          content: "添加成功",
+          icon: "ok",
+        });
+        this.agentshow = false;
+        this.$bus.emit("refresh");
+      })
+    },
+
     handelSelect() {
-      this.$bus.emit("updateParams", {
-        id: this.activeItem.id,
-        isIndex: 1,
-      });
+      // this.$bus.emit("updateParams", {
+      //   id: this.activeItem.id,
+      //   isIndex: 1,
+      // });
       this.$bus.emit("initScene", this.activeItem);
-      this.$bus.emit("getInitScene", this.activeItem);
+      this.$bus.emit("getInitScene", {...this.activeItem,selectId:this.selectId});
       this.show = false;
     },
     getPanoList() {
@@ -425,7 +543,7 @@ export default {
           pageNum: 1,
           pageSize: 1000,
           searchKey: this.searchKey,
-          status: 3,
+          status: 3
         },
         (data) => {
           let tmp = {};

+ 2 - 1
src/views/screen/Setting.vue

@@ -3,7 +3,7 @@
     <div class="view-setting" app-border dir-left>
       <div class="ui-title">当前初始画面</div>
       <div class="preview">
-        <img :src="initImg" v-if="initImg" alt="">
+        <img :src="initImg+'?'+Math.random()" v-if="initImg" alt="">
         <div class="tips" v-else>
           <i class="iconfont iconphotoview" style="font-size: 40px"></i>
         </div>
@@ -24,6 +24,7 @@ export default {
   },
   mounted(){
       this.$bus.on('initView',data=>{
+        this.initImg = ''
         this.initImg = data
       })
   }

+ 1 - 1
src/views/screen/Toolbar.vue

@@ -20,7 +20,7 @@
               <i class="iconfont iconscene_map_3d" :class="{'iconjump':item.type!=='house'}"></i>
             </div>
             <div class="img">
-              <img :src="item.icon" alt="">
+              <img :src="item.icon+`?${Math.random()}`" alt="">
             </div>
             <div class="ui-title">
               <span>{{item.fileName}}</span>

+ 4 - 0
vue.config.js

@@ -33,6 +33,10 @@ module.exports = {
         '/vr': {
           target: proxy_url,
           changeOrigin: true,
+        },
+        '/appapi': {
+          target: proxy_url,
+          changeOrigin: true,
         }
     },
   }