|
@@ -18,10 +18,24 @@
|
|
|
// display: showScene ? 'none' : 'block'
|
|
|
}"
|
|
|
>
|
|
|
+ <div class="poprs sceneList">
|
|
|
+
|
|
|
+ <el-dropdown placement="bottom-start" trigger="click" @command="handleCommand">
|
|
|
+ <el-icon size="24"><Expand /></el-icon>
|
|
|
+ <template #dropdown>
|
|
|
+ <el-dropdown-menu>
|
|
|
+ <el-dropdown-item v-for="item,index in sceneList" :key="index" :command="item.id">{{ item.name || '多元融合' }}</el-dropdown-item>
|
|
|
+ </el-dropdown-menu>
|
|
|
+ </template>
|
|
|
+ </el-dropdown>
|
|
|
+ <!-- <div v-for="item,index in sceneList" :key="index">
|
|
|
+ {{ item.name }}
|
|
|
+ </div> -->
|
|
|
+ </div>
|
|
|
<!-- @load="setupSDK($event.target)" -->
|
|
|
<iframe
|
|
|
v-if="caseId"
|
|
|
- :src="`/code/index.html?caseId=${caseId}&single#/show`"
|
|
|
+ :src="sceneURL || `/code/index.html?caseId=${caseId}&single#/show`"
|
|
|
frameborder="0"
|
|
|
:style="{ width: '100%', height: '100%' }"
|
|
|
></iframe>
|
|
@@ -44,9 +58,8 @@ import lySlide from "./slide/index.vue";
|
|
|
import { routeIsSystem, router } from "@/router";
|
|
|
import { computed, ref } from "vue";
|
|
|
import { menuRouteNames } from "@/app";
|
|
|
-import { updateByTreeFileLists } from "@/store/case";
|
|
|
+import { updateByTreeFileLists, getCaseSceneListData, getUrlSrc } from "@/store/case";
|
|
|
console.log(menuRouteNames, 'menuRouteNames', router.currentRoute.value.name);
|
|
|
-const sceneURL = ref('/code/index.html?caseId=360#/show')
|
|
|
const isSystem = computed(() => routeIsSystem());
|
|
|
const caseId = computed(() => {
|
|
|
const caseId = router.currentRoute.value.params.caseId;
|
|
@@ -54,10 +67,23 @@ const caseId = computed(() => {
|
|
|
return Number(caseId);
|
|
|
}
|
|
|
});
|
|
|
+const sceneURL = ref(null)
|
|
|
+const sceneList = computed(() => getCaseSceneListData());
|
|
|
+console.log(sceneList, 'sceneList');
|
|
|
updateByTreeFileLists()
|
|
|
const hiddenSlide = computed(
|
|
|
() => !menuRouteNames.includes(router.currentRoute.value.name as string)
|
|
|
);
|
|
|
+const handleCommand = (command) => {
|
|
|
+ let item = sceneList.value.find(item => item.id == command);
|
|
|
+ let url = getUrlSrc(item, caseId.value)
|
|
|
+ sceneURL.value = url;
|
|
|
+ console.log('handleCommand', command, item, url);
|
|
|
+}
|
|
|
+const handleClick = (command: string) => {
|
|
|
+ console.log('handleClick', command);
|
|
|
+}
|
|
|
+
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
@@ -114,6 +140,15 @@ const hiddenSlide = computed(
|
|
|
background-color: var(--bgColor);
|
|
|
overflow-y: scroll;
|
|
|
}
|
|
|
+ .sceneList{
|
|
|
+ width: 48px;
|
|
|
+ height: 38px;
|
|
|
+ padding: 6px 0;
|
|
|
+ line-height: 42px;
|
|
|
+ background: rgba(27, 27, 28, 0.80);
|
|
|
+ text-align: center;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|