|
@@ -1,5 +1,7 @@
|
|
|
<template>
|
|
|
<div class="layer">
|
|
|
+ qpisceneList{{qpisceneList.length}}
|
|
|
+
|
|
|
<ly-top class="top" />
|
|
|
<div class="content">
|
|
|
<router-view v-slot="{ Component }" v-if="isSystem">
|
|
@@ -60,9 +62,10 @@
|
|
|
import lyTop from "./top/index.vue";
|
|
|
import lySlide from "./slide/index.vue";
|
|
|
import { routeIsSystem, router } from "@/router";
|
|
|
-import { computed, ref, onMounted } from "vue";
|
|
|
+import { computed, ref, onMounted, watch } from "vue";
|
|
|
import { menuRouteNames } from "@/app";
|
|
|
import { updateByTreeFileLists, getCaseSceneListData, getUrlSrc, getcaseLists, getCaseSceneList } from "@/store/case";
|
|
|
+import { json } from "stream/consumers";
|
|
|
console.log(menuRouteNames, 'menuRouteNames', router.currentRoute.value.name);
|
|
|
const isSystem = computed(() => routeIsSystem());
|
|
|
const caseId = computed(() => {
|
|
@@ -71,12 +74,13 @@ const caseId = computed(() => {
|
|
|
return Number(caseId);
|
|
|
}
|
|
|
});
|
|
|
+// const qpisceneList = ref(getCaseSceneListData() as any[]);
|
|
|
const sceneList = ref([]);
|
|
|
const sceneURL = ref(``)
|
|
|
const sceneListName = ref('')
|
|
|
const modeList = ref([])
|
|
|
const init = async () => {
|
|
|
- modeList.value = await getcaseLists(caseId.value as number);
|
|
|
+ modeList.value = modeList.value.length == 0 ? await getcaseLists(caseId.value as number) : modeList.value;
|
|
|
sceneList.value = await getCaseSceneList(caseId.value as number);
|
|
|
if(modeList.value.length){
|
|
|
sceneList.value.unshift({ id: -1, type: 99, name: '多元融合' });
|
|
@@ -86,14 +90,14 @@ const init = async () => {
|
|
|
// sceneURL.value = url;
|
|
|
}
|
|
|
init()
|
|
|
-// const sceneList = computed(() => {
|
|
|
-// let newlist = getCaseSceneListData(caseId.value as number)
|
|
|
-// if(modeList.value?.length){
|
|
|
-// return [{ id: -1, type: 99, name: '多元融合' }, ...newlist];
|
|
|
-// }else{
|
|
|
-// return newlist;
|
|
|
-// }
|
|
|
-// });
|
|
|
+const qpisceneList = computed(() => getCaseSceneListData(caseId.value as number));
|
|
|
+watch(() => qpisceneList.value, () => {
|
|
|
+ let newqpisceneList = JSON.parse(JSON.stringify(qpisceneList.value))
|
|
|
+ if(modeList.value.length){
|
|
|
+ newqpisceneList.unshift({ id: -1, type: 99, name: '多元融合' });
|
|
|
+ }
|
|
|
+ sceneList.value = [...newqpisceneList]
|
|
|
+})
|
|
|
console.log(sceneList, 'sceneList');
|
|
|
onMounted(() => {
|
|
|
// setupSDK(document.querySelector('iframe') as HTMLIFrameElement)
|