فهرست منبع

修改上传文件30G

tangning 5 روز پیش
والد
کامیت
f126fc34e9

+ 11 - 10
src/view/newFireCase/dyManager/sceneContent.vue

@@ -122,16 +122,17 @@ const getMeshScene = async (scene: QuoteScene) => {
 };
 
 const openSceneEdit = async (scene: QuoteScene, type: any) => {
-  const token = await transformSWToken(scene, type);
-  if (!token) return;
-  const isTest = window.location.host.includes("localhost") || window.location.host.includes("test");
-  let base = isTest ? "https://test.4dkankan.com" : "https://4dkankan.com";
-  if(scene.isObj === 0){
-    base = isTest ? testLaserUrl : LaserUrl;
-    window.open(`${base}/index.html?m=${scene.num}&token=${token}`, "_blank");
-    return
-  }
-  window.open(`${base}/epg.html?m=${scene.num}&token=${token}`, "_blank");
+  openSceneUrl(scene, OpenType.edit, type)
+  // const token = await transformSWToken(scene, type);
+  // if (!token) return;
+  // const isTest = window.location.host.includes("localhost") || window.location.host.includes("test");
+  // let base = isTest ? "https://test.4dkankan.com" : "https://4dkankan.com";
+  // if(scene.isObj === 0){
+  //   base = isTest ? testLaserUrl : LaserUrl;
+  //   window.open(`${base}/index.html?m=${scene.num}&token=${token}`, "_blank");
+  //   return
+  // }
+  // window.open(`${base}/epg.html?m=${scene.num}&token=${token}`, "_blank");
 };
 
 const openLaserSceneEdit = async (scene: QuoteScene, type: any) => {

+ 3 - 3
src/view/newFireCase/dyManager/uploadScene.vue

@@ -82,7 +82,7 @@ const handleChange = async (file, files) => {
   console.log(file, files);
   if(file.data){
     // 检查文件类型和大小
-      if (file.data.code != 0 && await confirm(file.data.data ||'确定要上传该文件吗?')) {
+      if (file.data.code == 0 || file.data.code != 0 && await confirm(file.data.data ||'确定要上传该文件吗?')) {
           filePath.value = file.data?.url;
       }else{
         files.status = 'fail'
@@ -133,9 +133,9 @@ const validateFile = (file) => {
     }
     
     // 检查文件大小,不能超过 5MB
-    const maxSize = 5 * 1024 * 1024 * 1024; // 5MB
+    const maxSize = 30 * 1024 * 1024 * 1024; // 5MB
     if (fileSize > maxSize) {
-      ElMessage.error(`上传文件不能超过 5 GB`);
+      ElMessage.error(`上传文件不能超过 30 GB`);
       return false;
     }
     return true;

+ 3 - 3
src/view/newFireCase/newFireDetails/components/scene.vue

@@ -65,7 +65,7 @@
       class="scene-edit-dialog"
     >
       <div class="dialog-filter-row">
-        <div class="filter-item">
+        <!-- <div class="filter-item">
           <span class="label">类型:</span>
           <el-select
             v-model="query.type"
@@ -81,7 +81,7 @@
               :value="opt.value"
             />
           </el-select>
-        </div>
+        </div> -->
         <div class="filter-item">
           <span class="label">标题:</span>
           <el-input
@@ -199,7 +199,7 @@ const props = defineProps<{ fire?: any, caseId?: number, editOrShow?: string }>(
 const editVisible = ref(false);
 const editingScene = ref<Scene | null>(null);
 // isObj使用1/2;searchType默认传2;关键字使用modelTitle
-const query = ref<{ type: number; modelTitle: string; searchType: string }>({ type: 1, modelTitle: '', searchType: '2' });
+const query = ref<{ type: number; modelTitle: string; searchType: string }>({ type: 0, modelTitle: '', searchType: '2' });
 const typeOptions = ref([
   { label: 'Mesh场景', value: 1 },
   { label: '点云场景', value: 0 },