Переглянути джерело

删除framework中无用文件

(cherry picked from commit 67485bcca5eca4da84bfc4f2970915a7c2362a03)
任一存 2 роки тому
батько
коміт
8994db4c52

+ 0 - 250
packages/qjkankan-editor/src/framework/Head.vue

@@ -1,250 +0,0 @@
-<template>
-  <header class="app-head" app-border dir-bottom>
-    <span class="app-head-title">{{ info.name }}</span>
-    <div class="app-head-save ui-button deepcancel app-head-view" @click="onView" :class="{ disable: !canLoad }">
-      <i class="iconfont iconeditor_preview"></i>
-      预览
-    </div>
-
-    <div
-      class="ui-button submit app-head-save"
-      @click="onSave"
-      :class="{ disable: !canLoad }"
-    >
-      <i class="iconfont iconeditor_save"></i>
-      保存
-    </div>
-    <preview
-      v-if="info"
-      :name="info.name"
-      :show="showPreview"
-      :ifr="`./show.html?id=${info.id}`"
-      @close="showPreview = false"
-    />
-  </header>
-</template>
-<script>
-import { saveWorks, getPanoInfo, checkLogin } from "@/api";
-import { mapGetters } from "vuex";
-// import config from '@/config'
-import preview from "@/components/preview";
-let hhhreg = /\\\\\\\\/g
-
-export default {
-  name: "app-head",
-  data() {
-    return {
-      showPreview: false,
-      canLoad: false,
-    };
-  },
-
-  components: { preview },
-
-  mounted() {
-    this.$bus.on('canLoad',(data)=>{
-      this.canLoad = data
-      if (data) {
-        this.getInfo()
-
-      }
-    }) 
-
-
-  },
-  computed: {
-    ...mapGetters({
-      info: "info",
-      isShow: "isShow",
-    }),
-  },
-  methods: {
-    checkParams() {
-      if (!this.info.name && !this.info.icon && !this.info.description && this.info.scenes.length<=0) {
-        this.$alert({
-          content: "您还未创建任何内容哦",
-          ok: () => {
-            this.$router.push({ path: "/base" });
-          },
-        });
-        return false;
-      }
-      return true;
-    },
-    onView() {
-      if (!this.checkParams()) {
-        return;
-      }
-      this.fixData()
-      this.info.scenes = this.info.scenes.map(item=>{
-        if (typeof item.someData == 'string') {
-          item.someData =  item.someData.replace(hhhreg,'')
-        }
-        return item
-      })
-
-      saveWorks(
-        {
-          password: this.info.password,
-          someData: { ...this.info, status: 1 },
-        },
-        () => {
-          this.$msg.success("保存成功");
-          document.title = this.info.name
-          this.getInfo();
-          this.$store.commit("UpdateIsShowState", true);
-          setTimeout(() => {
-            if (this.info.scenes.length <= 0 && this.isShow) {
-              return this.$alert({
-                content: "至少添加一个场景才可预览,请前往“场景导航”添加",
-              });
-            }
-            this.showPreview = true;
-          }, 500);
-        }
-      );
-    },
-
-    fixData() {
-    //   let tmp = [];
-    //   this.info.scenes.forEach((item) => {
-    //     this.info.catalogs.forEach((sub) => {
-    //       if (item.category == sub.id) {
-    //         tmp.push(sub);
-    //       }
-    //     });
-    //   });
-    //   tmp = this.$unique(tmp)
-    //   this.info.catalogs = tmp;
-    //   let rootmp = [];
-    //   tmp.forEach((item) => {
-    //     this.info.catalogRoot.forEach((sub) => {
-    //       sub.children = this.$unique(sub.children)
-    //       if (sub.children.indexOf(item.id) > -1) {
-    //         rootmp.push(sub);
-    //       }
-    //     });
-    //   });
-    //   rootmp = this.$unique(rootmp)
-
-    //   this.info.catalogRoot = rootmp.map((item) => {
-    //     let temp = [];
-    //     item.children = this.$unique(item.children)
-    //     item.children.forEach((sub) => {
-    //       tmp.forEach((jj) => {
-    //         if (jj.id == sub) {
-    //           temp.push(sub);
-    //         }
-    //       });
-    //     });
-    //     return {
-    //       ...item,
-    //       children: temp,
-    //     };
-    //   });
-    //   this.info.catalogs = tmp
-
-    //   let cid = 'c_'+this.$randomWord(true,8,8)
-
-    //   if (this.info.catalogRoot.length <= 0) {
-    //     this.info.catalogRoot.push({
-    //       id: 'r_'+this.$randomWord(true,8,8),
-    //       name: "全部场景",
-    //       children:[cid]
-    //     });
-    //   }
-
-    //   if (this.info.catalogs.length <= 0) {
-    //     this.info.catalogs.push({
-    //       id: cid,
-    //       name: "默认二级分组",
-    //     });
-    //   }
-
-      if (this.info.firstScene) {
-        this.info.firstScene = this.info.scenes.find(item=>item.sceneCode==this.info.firstScene.sceneCode)
-      }
-
-      this.$store.commit("SetInfo", this.info);
-    },
-
-    onSave() {
-      if (!this.checkParams()) {
-        return;
-      }
-      this.fixData();
-
-
-      this.info.scenes = this.info.scenes.map(item=>{
-        if (typeof item.someData == 'string') {
-          item.someData =  item.someData.replace(hhhreg,'')
-        }
-        return item
-      })
-
-      saveWorks(
-        {
-          password: this.info.password,
-          someData: { ...this.info, status: 1 },
-        },
-        () => {
-          this.$msg.success("保存成功")
-          document.title = this.info.name
-          this.getInfo();
-          this.$store.commit("UpdateIsShowState", true);
-        },
-        () => {}
-      );
-    },
-    getInfo() {
-      checkLogin().then((res) => {
-        if (res.code == 0) {
-          getPanoInfo("", (data) => {
-            this.$store.commit("SetInfo", data);
-            document.title = this.info.name || '无标题'
-          });
-
-        }
-      });
-    },
-  },
-};
-</script>
-<style lang="less">
-.app-head {
-  display: flex;
-  width: 100%;
-  min-width: 50px;
-  align-items: center;
-  justify-content: center;
-}
-.app-head-title {
-  display: inline-block;
-  font-size: 16px;
-  height: 50px;
-  line-height: 50px;
-  text-align: center;
-}
-.app-head-save {
-  cursor: pointer;
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  position: absolute;
-  top: 50%;
-  right: 10px;
-  margin-top: -16px;
-  i {
-    font-size: 14px;
-    margin-right: 4px;
-  }
-}
-
-.ui-preview{
-  background: #313131;
-}
-
-.app-head-view {
-  right: 120px;
-}
-</style>

+ 0 - 95
packages/qjkankan-editor/src/framework/Main.vue

@@ -1,95 +0,0 @@
-<template>
-  <main class="app-main">
-    <app-menu></app-menu>
-    <div class="app-content">
-      <div
-        class="app-player"
-        ref="layer"
-      >
-        <Core v-show="$route.meta.loadScene"/>
-      </div>
-      <toolbar v-show="$route.meta.loadScene"></toolbar>
-
-      <div class="app-view">
-        <keep-alive>
-          <router-view />
-        </keep-alive>
-      </div>
-    </div>
-  </main>
-</template>
-
-<script>
-import AppMenu from "./MenuPC";
-import Core from "./core";
-import Toolbar from "./Toolbar";
-
-export default {
-  name: "app-main",
-  components: {
-    AppMenu,
-    Core,
-    Toolbar
-  },
-  created() {},
-  async mounted() {},
-  computed: {}
-};
-</script>
-<style lang="less">
-.app-main {
-  display: flex;
-  flex: 1;
-  height: 100%;
-  width: 100%;
-  overflow: hidden;
-}
-.app-content {
-  position: relative;
-  display: flex;
-  flex: 1;
-  height: 100%;
-  width: 100%;
-  overflow: hidden;
-}
-
-.app-player {
-  padding: 10px;
-  position: relative;
-  display: flex;
-  flex: 1;
-  height: calc(100% - 260px);
-  flex-direction: column;
-  &.page-guide {
-    height: calc(100% - 210px);
-  }
-}
-
-.app-view {
-  display: flex;
-  width: 236px;
-  height: 100%;
-  z-index: 1000;
-  > div {
-    display: flex;
-    width: 100%;
-    height: 100%;
-    white-space: nowrap;
-  }
-}
-.app-view-toolbar {
-  display: flex;
-  position: absolute !important;
-  left: 0;
-  right: 236px;
-  bottom: 0;
-  height: 260px;
-  overflow: hidden;
-}
-
-.app-view-full-toolbar {
-  height: 100%;
-  padding: 10px;
-  display: block;
-}
-</style>

+ 0 - 228
packages/qjkankan-editor/src/framework/Toolbar.vue

@@ -1,228 +0,0 @@
-<template>
-  <div
-    class="app-view-toolbar"
-    :class="{ unable: !canEdit }"
-    app-border
-    dir-top
-  >
-    <div class="clip-center">
-      <tabList :list="info.catalogRoot" @clickItem="item=>{taboneActive = item}" :hiddenHover="true" :active="taboneActive" :id="'rand11'" :subId="'rand111'">
-      </tabList>
-       <tabList v-if="childTab.length > 1" :list="childTab" :hiddenHover="true" @clickItem="item=>{tabtowActive = item}"
-           :active="tabtowActive" :id="'subrand11'" :subId="'subrand111'">
-        </tabList>
-      <div class="pano-con clip-scroller">
-        <ul ref="clip" v-if="scenes.length>0">
-          <li
-            v-for="(item, i) in scenes"
-            @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 v-if="item.icon" :src="item.icon+`?${Math.random()}`" alt="" />
-            </div>
-            <div class="ui-title">
-              <span>{{ item.sceneTitle }}</span>
-            </div>
-          </li>
-        </ul>
-        <div class="no-record" v-else>
-          当前分组下暂无全景图
-        </div>
-      </div>
-    </div>
-  </div>
-</template>
-<script>
-import { mapGetters } from "vuex";
-import tabList from "@/components/tablist";
-
-let frame;
-let $scroll = null;
-export default {
-  name: 'whatisthis',
-  components: {tabList},
-  data() {
-    return {
-      taboneActive: { children: [] },
-      tabtowActive: "",
-      type: "building",
-      activeItem: "",
-      canEdit: true,
-      hasCheck: false,
-      loadList:true,
-      childTab:[],
-      scenes:[],
-    };
-  },
-  computed: {
-    ...mapGetters({
-      info: "info",
-    })
-  },
-  methods: {
-    undateScroll(){
-      this.$nextTick(() => {
-        if ($scroll == null) {
-          $scroll = $(".clip-scroller")[0];
-          frame = new PerfectScrollbar($scroll, {
-            useBothWheelAxes: true,
-            suppressScrollY: true,
-            wheelSpeed: 0.8,
-          });
-          $($scroll).data("scrollbar", frame);
-        }
-      });
-    },
-    updateInfo(){
-      let iidx = this.info.scenes.findIndex(item=>this.activeItem.sceneCode == item.sceneCode)
-      if (iidx>-1) {
-        this.info.scenes[iidx] = {
-          ...this.activeItem
-        }
-      }
-      this.$store.commit("SetInfo", this.info);
-    }
-  },
-  created() {},
-  watch: {
-    taboneActive: {
-      deep:true,
-      handler: function (newVal,oldVal) {
-        let temp = []
-        newVal.children && newVal.children.forEach(item=>{
-          this.info.catalogs.forEach(sub=>{
-            if (item==sub.id) {
-              temp.push(sub)
-            }
-          })
-        })
-        this.childTab = temp
-        if (this.childTab.length == 1 || newVal!=oldVal) {
-          this.tabtowActive = this.childTab[0]
-        }
-      },
-    },
-    tabtowActive: {
-      immediate:true,
-      handler: function (newVal) {
-        if (!newVal) {
-          this.tabtowActive = this.childTab[0]
-        } else{
-
-          let arr = this.info.scenes.filter(item=>{
-            return newVal.id == item.category && item.type!='4dkk'
-          })
-          this.scenes = arr.sort((a,b)=>a.weight-b.weight)
-          this.activeItem = this.scenes[0]
-        }
-      }
-    },
-    '$route.meta.loadScene':{
-      deep: true,
-      immediate: true,
-      handler: function (newVal) {
-        if (newVal) {
-          if (this.loadList) {
-              this.taboneActive = { children: [] };
-              setTimeout(() => {
-                this.taboneActive = this.info.catalogRoot[0] || { children: [] };
-                this.loadList = false 
-              });
-          }
-        }
-      }
-    },
-
-    activeItem: {
-      handler: function(newVal) {
-        this.$bus.emit("currentPcode", newVal);
-        this.$store.commit("SetActiveItem", newVal || "");
-        this.updateInfo()
-        if (newVal) {
-          this.$bus.emit("initView", newVal.icon||'');
-        }
-      },
-    },
-    type() {
-      this.hasCheck = true;
-    },
-  },
-  mounted() {
-    this.undateScroll()
-    this.$bus.on("setListThumb", (data) => {
-      this.activeItem.icon = data.icon;
-      this.activeItem.initVisual = JSON.stringify(data.initVisual);
-    });
-
-    this.$bus.on("canEdit", (data) => {
-      this.canEdit = data;
-    });
-
-    this.$bus.on("scenesChange", ()=> {
-      this.loadList = true;
-      this.undateScroll()
-    });
-  },
-};
-</script>
-<style lang="less" scoped>
-.app-view-toolbar {
-  background: green;
-  a {
-    color: #fff;
-    text-decoration: none;
-  }
-
-  .clip-center {
-    flex: 1;
-    display: flex;
-    overflow: hidden;
-    flex-direction: column;
-    padding-top: 10px;
-    margin: 0 10px;
-    .pano-con {
-      width: 100%;
-      padding: 0;
-      background: none;
-      > ul {
-        flex-wrap: unset;
-        display: inline-block;
-        white-space: nowrap;
-        > li {
-          display: inline-block;
-          height: 128px;
-          width: 128px;
-          margin-top: 0;
-          margin-right: 0;
-          cursor: pointer;
-          &:first-of-type {
-            margin-left: 0;
-          }
-        }
-      }
-    }
-    .clip-scroller {
-      width: 100%;
-      height: 100%;
-      position: relative;
-      padding-right: 20px;
-    }
-  }
-
-  .no-record{
-    width: 100%;
-    height: 100%;
-    display: flex;
-    align-items: center;
-    justify-content: center;
-  }
-}
-</style>

+ 0 - 40
packages/qjkankan-editor/src/framework/index.vue

@@ -1,40 +0,0 @@
-<template>
-  <div class="app-layout">
-    <app-head></app-head>
-    <app-main></app-main>
-  </div>
-</template>
-<script>
-import AppHead from "./Head";
-import AppMain from "./Main";
-export default {
-  name: "app-layout",
-  components: {
-    AppHead,
-    AppMain
-  }
-};
-</script>
-<style lang="less">
-.app-layout {
-  display: flex;
-  flex-direction: column;
-  width: 100%;
-  height: 100%;
-  overflow: hidden;
-}
-.el-message--success, .el-message--warning, .el-message--error, .el-message--info{
-  background: #1F1F1F!important;
-  box-shadow: 0px 9px 28px 8px rgba(0, 0, 0, 0.2), 0px 6px 16px 0px rgba(0, 0, 0, 0.32), 0px 3px 6px -4px rgba(0, 0, 0, 0.48)!important;
-  border-radius: 40px!important;
-  border: 1px solid #333333!important;
-  .el-message__content{
-    color: rgba(255, 255, 255, 0.6)!important;
-  }
-  .el-icon-info{
-    color: #D89614!important;
-  }
-}
-
-
-</style>