From 847bfbc01af2a79c7454a0489a03af7bac033310 Mon Sep 17 00:00:00 2001 From: liuxianghui <519646741@qq.com> Date: Mon, 1 Nov 2021 16:09:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E6=8E=A5=E5=BB=BA=E7=AD=91=E5=88=97?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/babylon/controller/serve-manager.ts | 9 ++++----- src/app/babylon/view/building-window/building-window.ts | 5 +++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/app/babylon/controller/serve-manager.ts b/src/app/babylon/controller/serve-manager.ts index eaf15e5..7bb055c 100644 --- a/src/app/babylon/controller/serve-manager.ts +++ b/src/app/babylon/controller/serve-manager.ts @@ -33,7 +33,6 @@ export class ServeManager { ) => void, onError?: (key: string, error: any) => void) { this.buildingBISrv.getBuildingBasicInfos(key) .subscribe(data => { - console.log("获取结果" + key, (data as any).result); if (onSuccess) { onSuccess(key, JSON.parse((data as any).result)); } @@ -152,9 +151,8 @@ export class ServeManager { //#region 文件上传 //队列性,批量上传 uploadFile(index: number, files: File[], resPath_out, onOneSuccess: (name: string, path: string, file: File) => void, onEnd: () => void) { - - console.log("上传路径", resPath_out); if (index < files.length) { + //console.log("上传文件", files[index].name); ServeManager.instance.openFileSelect(files[index], resPath_out, (name: string, path: string, file: File) => { onOneSuccess(name, path, file); this.uploadFile(index + 1, files, resPath_out, onOneSuccess, onEnd); @@ -198,8 +196,8 @@ export class ServeManager { let dataObj = data as any; let fileName = dataObj.fileName; let filePath: string = dataObj.objectName;//此路径不全,前面缺少ObjectsService.baseUrl,这部分不可序列化,要在运行时拼接 + //console.log("上传完成,地址为", filePath); filePath = filePath.replace(fileName, "");//去掉结尾的文件名 - console.log("上传完成,地址为", filePath); //filePath = ObjectsService.baseUrl + filePath; ServeManager.instance.onGetPostFileResult(fileName, filePath, file); resolve('success') @@ -225,8 +223,9 @@ export class ServeManager { * @param file */ postFileByMul(file: File) { - ServeManager.instance.objectsSrv.postFile_MultipartUpload(ServeManager.ngAssetsPath + this.postFilePath, file).then((value) => { + ServeManager.instance.objectsSrv.postFile_MultipartUpload(this.postFilePath, file).then((value) => { let dataObj = value as any; + console.log("分块上传完成", dataObj.filePath); dataObj.filePath = dataObj.filePath.replace(dataObj.name, ""); //去掉结尾的文件名 ServeManager.instance.onGetPostFileResult(dataObj.fileName, dataObj.filePath, file); }); diff --git a/src/app/babylon/view/building-window/building-window.ts b/src/app/babylon/view/building-window/building-window.ts index e747aec..9d85784 100644 --- a/src/app/babylon/view/building-window/building-window.ts +++ b/src/app/babylon/view/building-window/building-window.ts @@ -1,4 +1,5 @@ +import { PlanComponent } from "src/app/pages/plan/plan.component"; import { DataManager } from "../../controller/data-manager"; import { InfoManager } from "../../controller/info-manager"; import { SceneManager } from "../../controller/scene-manager"; @@ -26,7 +27,7 @@ export class BuildingWindow extends UIBase { currentBuidngItem: BuildingUIItem; //当前正在操作的建筑 - // three: ThreeDimensionalHomeComponent;//前端组件 + three: PlanComponent;//前端组件 @@ -211,7 +212,7 @@ export class BuildingWindow extends UIBase { - // this.three = ThreeDimensionalHomeComponent.instance; + this.three = PlanComponent.instance; // this.three.getAllBuilding(this); }