tangning 7 月之前
父節點
當前提交
99aa51d577
共有 3 個文件被更改,包括 25 次插入16 次删除
  1. 14 10
      src/view/layout/index.vue
  2. 4 4
      src/view/originalPhoto/addCaseFile.vue
  3. 7 2
      src/view/vrmodel/index.vue

+ 14 - 10
src/view/layout/index.vue

@@ -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)

+ 4 - 4
src/view/originalPhoto/addCaseFile.vue

@@ -131,12 +131,12 @@ const caseFile = ref({
 console.log('caseFile', props.fileInfo);
 const { size, fileList, upload, removeFile, previewFile, file, accept } = useUpload({
   maxSize: props.fileInfo?.fileSize || 50 * 1024 * 1024,
-  formats: props.fileInfo?.formats || [".jpg", ".jpeg", ".png", '.mp4'],
+  formats: props.fileInfo?.formats || [".jpg", ".jpeg", ".png"],
 });
 
-const formatDesc = computed(() =>
-  'jpg、png、jpeg、mp4上传'
-);
+const formatDesc = computed(() => {
+  return props.fileInfo?.DrawFormatDesc||'jpg、png、jpeg上传'
+});
 
 // 上传请求
 const handleSuccess = (option) => {

+ 7 - 2
src/view/vrmodel/index.vue

@@ -64,9 +64,12 @@ function handleAdddyrh(record) {
   let url = `/code/index.html?caseId=${caseId.value}#/fuseEdit/merge`
   window.open(url);
 }
-function handlegotoelT(record) {
+async function handlegotoelT(record) {
   isEdit.value = true;
-  list.value = list.value.filter((item) => item.num !== record.num);
+  if(await confirm("确定移除场景!")){
+    list.value = list.value.filter((item) => item.num !== record.num);
+    submitForm();
+  }
   // console.log("handleActive", params);
 }
 async function submitForm() {
@@ -74,9 +77,11 @@ async function submitForm() {
   let sublist = getSceneListTree(list.value)
   const apiData = {
     caseTitle: caseId.value,
+    caseId: caseId.value,
     sceneNumParam: sublist,
   };
   await setCaseaddOrUpdate(apiData)
+  geiList();
   // console.log("handleActive", params);
 }