Pārlūkot izejas kodu

删除冗余文件;编辑器:优化组件结构。

任一存 3 gadi atpakaļ
vecāks
revīzija
dac04a85a3

+ 0 - 42
packages/code/src/App.vue

@@ -1,42 +0,0 @@
-<template>
-  <div id="app">
-    <app-layout></app-layout>
-  </div>
-</template>
-<script>
-import AppLayout from "@/framework";
-
-export default {
-  components: {
-    AppLayout
-  }
-};
-</script>
-<style lang="less">
-html,
-body,
-#app {
-  width: 100%;
-  height: 100%;
-  overflow: hidden;
-}
-body {
-  margin: 0;
-  color: #fff;
-  font-size: 14px;
-  line-height: normal;
-  background-color: rgb(38, 39, 41);
-  user-select: none;
-  font-family: OpenSans, sans-serif;
-}
-ul {
-  list-style: none;
-  margin: 0;
-  padding: 0;
-}
-img {
-  border: 0;
-  outline: 0;
-}
-</style>
-<style lang="less" src="@/assets/style/style.pc.less"></style>

+ 2 - 3
packages/code/src/config/menu.js

@@ -1,4 +1,4 @@
-// 前端路由配置
+// 编辑器主菜单
 const PCMenu = [
   {
     text: "基础",
@@ -6,7 +6,6 @@ const PCMenu = [
     link: "/base",
     name: "base",
     hidden: false,
-    hidescene:true
   },
   {
     text: "导航",
@@ -14,7 +13,6 @@ const PCMenu = [
     link: "/navigation",
     name: "navigation",
     hidden: false,
-    hidescene:true
   },
   {
     text: "初始",
@@ -32,6 +30,7 @@ const PCMenu = [
   }
 ];
 
+// 管理平台主菜单
 const MATERIALMenu = [
   {
     text: "我的作品",

+ 6 - 39
packages/code/src/framework/EditorMain.vue

@@ -4,43 +4,27 @@
     <!-- 左侧菜单栏 -->
     <app-menu class="app-menu"></app-menu>
     <!-- 其余 -->
-    <div class="app-content">
-      <!-- 内嵌的全景场景预览区域 -->
-      <div
-        class="app-player"
-        ref="layer"
-        v-show="$route.meta.loadScene"
-      >
-        <Core/>
-      </div>
-      <!-- 初始和热点 底部的 全景场景列表 -->
-      <toolbar v-show="$route.meta.loadScene"></toolbar>
-      <div class="app-view">
-        <keep-alive>
-          <router-view />
-        </keep-alive>
-      </div>
+    <div class="app-view">
+      <keep-alive>
+        <router-view />
+      </keep-alive>
     </div>
   </main>
 </template>
 <script>
 import AppMenu from "./MenuPC";
-import Core from "./core";
-import Toolbar from "./Toolbar";
-
 
 export default {
   name: "editor-main",
   components: {
     AppMenu,
-    Core,
-    Toolbar
   },
   created() {},
   async mounted() {},
   computed: {}
 };
 </script>
+
 <style lang="less">
 .app-main {
   display: flex;
@@ -50,30 +34,13 @@ export default {
   > .app-menu {
     flex: 0 0 auto;
   }
-  > .app-content {
+  > .app-view {
     position: relative;
     flex: 1 0 auto;
     height: 100%;
-    display: flex;
-    .app-player {
-      padding: 10px;
-      position: relative;
-      display: flex;
-      flex: 0 0 auto;
-      height: calc(100% - 260px); // 260: 底部toolbar的高度
-      flex-direction: column;
-      &.page-guide {
-        height: calc(100% - 210px);
-      }
-    }
-    .app-view {
-      width: 100%;
-      height: 100%;
-    }
   }
 }
 
-
 .app-view-toolbar {
   display: flex;
   position: fixed !important;

+ 0 - 10
packages/code/src/main.js

@@ -1,10 +0,0 @@
-import Vue from 'vue'
-import './mixins'
-import App from './App.vue'
-import router from './router'
-
-Vue.config.productionTip = false
-new Vue({
-  router,
-  render: h => h(App)
-}).$mount('#app')

+ 1 - 1
packages/code/src/pages/edit.js

@@ -1,7 +1,7 @@
 import Vue from 'vue'
 import '../mixins'
 import App from './Edit.vue'
-import router from '../router'
+import router from '../router/editorRouter'
 import store from '../Store'
 import 'viewerjs/dist/viewer.css'
 import Viewer from 'v-viewer'

+ 1 - 3
packages/code/src/router/index.js

@@ -1,8 +1,7 @@
 import Vue from 'vue'
 import Router from 'vue-router'
 import { PCMenu } from "../config/menu.js";
-import { checkWork, checkLogin,getPanoInfo } from '@/api'
-import { $alert } from '@/components/shared/message'
+import { checkWork, checkLogin, getPanoInfo } from '@/api'
 import store from '../Store'
 
 let vue = new Vue()
@@ -22,7 +21,6 @@ PCMenu.forEach(item => {
     path: `${item.link}`,
     meta: {
       loading: null,
-      loadScene: !item.hidescene
     },
     component: () => import(`../views/${item.name}/index.vue`)
   });

+ 25 - 2
packages/code/src/views/hotspot/index.vue

@@ -1,5 +1,15 @@
 <template>
+  <!-- 编辑器-热点 -->
   <div>
+    <!-- 内嵌的全景场景预览区域 -->
+    <div
+      class="app-player"
+      ref="layer"
+    >
+      <Core/>
+    </div>
+    <!-- 初始和热点 底部的 全景场景列表 -->
+    <toolbar></toolbar>
     <setting @select="handleSelectScene"></setting>
     <!-- <toolbar></toolbar> -->
     <div class="dialog" v-if="show">
@@ -42,12 +52,16 @@
 <script>
 import Setting from "./Setting";
 import Select from "@/components/select";
+import Core from "@/framework/core/index.vue";
+import Toolbar from "@/framework/Toolbar.vue";
 
 export default {
   name: "home",
   components: {
     Setting,
-    Select
+    Select,
+    Core,
+    Toolbar,
   },
   mounted(){
     
@@ -104,7 +118,16 @@ export default {
 
 
 <style lang="less" scoped>
-
+.app-player {
+  padding: 10px;
+  position: relative;
+  display: flex;
+  height: calc(100% - 260px); // 260: 底部toolbar的高度
+  flex-direction: column;
+  &.page-guide {
+    height: calc(100% - 210px);
+  }
+}
 .dialog {
     position: fixed;
     z-index: 30;

+ 0 - 156
packages/code/src/views/screen/Toolbar.vue

@@ -1,156 +0,0 @@
-<template>
-  <div class="app-view-toolbar" app-border dir-top>
-    <div class="room-label">
-      <ul>
-        <li
-          :class="{ active: item.id === type }"
-          @click="type = item.id"
-          v-for="(item, i) in [$panoType[0],$panoType[1]]"
-          :key="i"
-        >
-          {{ item.name }}
-        </li>
-      </ul>
-    </div>
-    <div class="clip-center">
-      <div class="pano-con clip-scroller">
-        <ul ref="clip">
-          <li v-for="(item, i) in list" @click="activeItem = item" :class="{'li-active':item.sceneCode==activeItem.sceneCode}" :key="i">
-            <div class="typeli">
-              <i class="iconfont iconedit_type_3d" :class="{'iconedit_type_panorama':item.type!=='house'}"></i>
-            </div>
-            <div class="img">
-              <img :src="item.icon+`?${Math.random()}`" alt="">
-            </div>
-            <div class="ui-title">
-              <span>{{item.fileName}}</span>
-            </div>
-          </li>
-        </ul>
-      </div>
-    </div>
-  </div>
-</template>
-<script>
-import { getPanoList } from "@/api";
-let $scroll = null;
-export default {
-  data() {
-    return {
-      type: "building",
-      list:[],
-      activeItem:''
-    };
-  },
-  activated() {
-    this.$nextTick(() => {
-          if ($scroll == null) {
-              $scroll = $(".clip-scroller")[0];
-              new PerfectScrollbar($scroll, {
-                  useBothWheelAxes: true,
-                  suppressScrollY: true,
-              });
-          }
-      });
-  },
-  methods:{
-    getPanoList(isFirst){
-      getPanoList({
-        pageNum: 0,
-        pageSize: 0,
-        searchKey: "",
-        type: this.type,
-        status:3
-      },data=>{
-        this.list = data.data.list
-        isFirst && (this.activeItem = this.list[0])
-      })
-    },
-  },
-  created() {
-    this.getPanoList(true)
-    this.$bus.on('initView',()=>{
-      this.getPanoList()
-    })
-  },
-  watch:{
-    activeItem(newVal){
-      newVal && this.$bus.emit('currentPcode',newVal)
-      newVal && this.$bus.emit('initView',newVal&&newVal.icon)
-    },
-    type(){
-      this.getPanoList()
-    }
-  },
-  mounted(){
-   
-  }
-};
-</script>
-<style lang="less" scoped>
-.app-view-toolbar {
-  overflow: visible;
-  a {
-    color: #fff;
-    text-decoration: none;
-  }
-  .room-label {
-    top: -32px;
-    left: 10px;
-    right: 0px;
-    position: absolute;
-    overflow: hidden;
-    ul {
-      display: flex;
-    }
-    li {
-      cursor: pointer;
-      width: 100px;
-      height: 32px;
-      line-height: 32px;
-      padding: 0 5px;
-      text-align: center;
-      border-top: solid 1px #5d5d5d;
-      border-right: solid 1px #5d5d5d;
-      overflow: hidden;
-      text-overflow: ellipsis;
-      &:first-child {
-        border-left: solid 1px #5d5d5d;
-      }
-      &.active {
-        background-color: @color;
-      }
-    }
-  }
-
-  .clip-center {
-    flex: 1;
-    display: flex;
-    overflow: hidden;
-    .pano-con {
-      width: 100%;
-      padding: 0;
-      background: none;
-      margin: 0 10px;
-      >ul{
-        flex-wrap: unset;
-        >li{
-          height: 128px;
-          width: 128px;
-          cursor: pointer;
-          &:first-of-type{
-            margin-left: 0;
-          }
-        }
-      }
-    }
-    .clip-scroller {
-        width: 100%;
-        height: 100%;
-        position: relative;
-      padding-right: 20px;
-
-    }
-  }
-}
-</style>

+ 29 - 4
packages/code/src/views/screen/index.vue

@@ -1,17 +1,42 @@
 <template>
+  <!-- 编辑器-初始 -->
   <div>
+    <!-- 内嵌的全景场景预览区域 -->
+    <div
+      class="app-player"
+      ref="layer"
+    >
+      <Core/>
+    </div>
+    <!-- 初始和热点 底部的 全景场景列表 -->
+    <toolbar></toolbar>
     <setting></setting>
-    <!-- <toolbar></toolbar> -->
   </div>
 </template>
 <script>
 import Setting from "./Setting";
-// import Toolbar from "../hotspot/Toolbar";
+import Core from "@/framework/core/index.vue";
+import Toolbar from "@/framework/Toolbar.vue";
+
 export default {
-  name: "home",
+  name: "editor-initial-setting",
   components: {
     Setting,
-    // Toolbar
+    Core,
+    Toolbar,
   }
 };
 </script>
+
+<style lang="less" scoped>
+  .app-player {
+    padding: 10px;
+    position: relative;
+    display: flex;
+    height: calc(100% - 260px); // 260: 底部toolbar的高度
+    flex-direction: column;
+    &.page-guide {
+      height: calc(100% - 210px);
+    }
+  }
+</style>