From 799db9e567fe6c4c5ade804b1dd3cf25e654ac37 Mon Sep 17 00:00:00 2001 From: cpf <1105965053@qq.com> Date: Mon, 22 Nov 2021 16:38:23 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E5=BA=94=E6=80=A5=E9=A2=84=E6=A1=88?= =?UTF-8?q?=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../left-domain/left-domain.component.ts | 4 +-- src/app/pages/plan/plan.component.html | 24 ++++++------- src/app/pages/plan/plan.component.ts | 35 +++++++++++++++++-- 3 files changed, 47 insertions(+), 16 deletions(-) diff --git a/src/app/pages/left-domain/left-domain.component.ts b/src/app/pages/left-domain/left-domain.component.ts index 58efc2c..03a881a 100644 --- a/src/app/pages/left-domain/left-domain.component.ts +++ b/src/app/pages/left-domain/left-domain.component.ts @@ -235,8 +235,8 @@ export class LeftDomainComponent implements OnInit { isTrue = confirm('切换节点后,没保存的信息将会丢失!') } if (isTrue) { - PlanComponent.instance.beforeEmergencyPlan = null - PlanComponent.instance.beforePlanNode = null + PlanComponent.instance.beforeEmergencyPlan = new MarkPlanData(-99, "请选择节点") + PlanComponent.instance.beforePlanNode = new MarkNodeData(-99, "请选择节点") this.selectPlanId = null this.selectNodeId = null MarkWindow.instance.selectMarkNode(null, null) diff --git a/src/app/pages/plan/plan.component.html b/src/app/pages/plan/plan.component.html index e19ccfb..0845604 100644 --- a/src/app/pages/plan/plan.component.html +++ b/src/app/pages/plan/plan.component.html @@ -143,33 +143,33 @@
-

灾情描述

- +

+
- +
diff --git a/src/app/pages/plan/plan.component.ts b/src/app/pages/plan/plan.component.ts index 09f7775..f3ffb32 100644 --- a/src/app/pages/plan/plan.component.ts +++ b/src/app/pages/plan/plan.component.ts @@ -317,8 +317,39 @@ export class PlanComponent implements OnInit { } allMarkPlanData: AllMarkPlanData; //处置预案节点 数据 - beforeEmergencyPlan: MarkPlanData = null; //当前选择 应急预案 - beforePlanNode: MarkNodeData = null; //当前选择 预案节点 + beforeEmergencyPlan: MarkPlanData = new MarkPlanData(-99, "请选择节点"); //当前选择 应急预案 + beforePlanNode: MarkNodeData = new MarkNodeData(-99, "请选择节点"); //当前选择 预案节点 + + //选中 子组件预案节点 + selectChildNode(item: MarkPlanData) { + if (this.isShowChildComponent && this.leftDomain) { + if (item.nodes.length) { + this.leftDomain.selectNode(item, item.nodes[0]) + } else { + this.message.info('暂无数据节点'); + } + } + } + + //切换预案节点 上一个 + toLast() { + + } + + //切换预案节点 暂停 + suspend() { + + } + + //切换预案节点 初始化 + initialize() { + + } + + //切换预案节点 下一个 + toNext() { + + } //选中应急预案 设备 selectSandTableMark(markData: MarkData, select: boolean) { From ee836e78a64c3d8b62c4cffcb9b2a690309d1556 Mon Sep 17 00:00:00 2001 From: cpf <1105965053@qq.com> Date: Tue, 23 Nov 2021 15:19:12 +0800 Subject: [PATCH 2/8] =?UTF-8?q?=E5=BA=94=E6=80=A5=E9=A2=84=E6=A1=88?= =?UTF-8?q?=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../left-domain/left-domain.component.html | 4 +- src/app/pages/plan/plan.component.html | 14 +++--- src/app/pages/plan/plan.component.scss | 8 +++- src/app/pages/plan/plan.component.ts | 48 +++++++++++++++++-- src/styles.scss | 2 + 5 files changed, 64 insertions(+), 12 deletions(-) diff --git a/src/app/pages/left-domain/left-domain.component.html b/src/app/pages/left-domain/left-domain.component.html index 37a8d9f..9c4dca5 100644 --- a/src/app/pages/left-domain/left-domain.component.html +++ b/src/app/pages/left-domain/left-domain.component.html @@ -157,12 +157,12 @@ - +
预案/节点名称 - +
diff --git a/src/app/pages/plan/plan.component.html b/src/app/pages/plan/plan.component.html index 0845604..1a47969 100644 --- a/src/app/pages/plan/plan.component.html +++ b/src/app/pages/plan/plan.component.html @@ -144,7 +144,7 @@

- +
@@ -158,12 +158,14 @@ diff --git a/src/app/pages/plan/plan.component.scss b/src/app/pages/plan/plan.component.scss index 7898fd7..de97d92 100644 --- a/src/app/pages/plan/plan.component.scss +++ b/src/app/pages/plan/plan.component.scss @@ -363,7 +363,7 @@ label:nth-child(2){ flex: 1; overflow: hidden; - .anticon{ font-size: 16px; color: #23D9FF; } + //.anticon{ font-size: 16px; color: #23D9FF; } img{ height: 35px; width: auto; vertical-align: top; } } label:last-child{ diff --git a/src/app/pages/plan/plan.component.ts b/src/app/pages/plan/plan.component.ts index f4b91e4..e579706 100644 --- a/src/app/pages/plan/plan.component.ts +++ b/src/app/pages/plan/plan.component.ts @@ -346,17 +346,25 @@ export class PlanComponent implements OnInit { window.clearTimeout(this.timer) //清除定时器 } + //公用 切换选中节点 + publicToggleNode() { + this.beforePlanNode = this.beforeEmergencyPlan.nodes[this.nzCurrent] + this.leftDomain.selectPlanId = this.beforeEmergencyPlan.id + this.leftDomain.selectNodeId = this.beforePlanNode.id + MarkWindow.instance.selectMarkNode(this.beforeEmergencyPlan.id, this.beforePlanNode.id) + } + //选中 底部一级节点 开启自动播放 selectChildNode(item: MarkPlanData) { - if (this.isShowChildComponent && this.leftDomain && this.beforeEmergencyPlan != item) { + if (this.isShowChildComponent && this.leftDomain) { if (item.nodes.length) { - this.nzCurrent = 0 - this.beforeEmergencyPlan = item - this.beforePlanNode = item.nodes[0] - this.leftDomain.selectPlanId = item.id - this.leftDomain.selectNodeId = item.nodes[0].id - MarkWindow.instance.selectMarkNode(item.id, item.nodes[0].id) - this.autoPlay() + let isTrue = confirm("即将开始播放节点") + if (isTrue) { + this.nzCurrent = 0 + this.beforeEmergencyPlan = item + this.publicToggleNode() + !this.isSuspend? this.autoPlay() : null + } } else { this.message.info('暂无数据节点'); } @@ -365,8 +373,19 @@ export class PlanComponent implements OnInit { //自动播放-切换接点 autoPlay() { - let time: number - console.log(time,777) + if (this.nzCurrent === this.beforeEmergencyPlan.nodes.length - 1) { + this.nzCurrent = this.nzCurrent + 1 + this.isSuspend = false //初始化暂停状态 + window.clearTimeout(this.timer) //清除定时器 + this.message.info('已播放至最后一节点'); + return + } + let time: number = this.beforePlanNode.getShowTime() + this.timer = window.setTimeout(()=>{ + this.nzCurrent = this.nzCurrent + 1 + this.publicToggleNode() + !this.isSuspend? this.autoPlay() : null + },time) } //切换预案节点 @@ -375,31 +394,49 @@ export class PlanComponent implements OnInit { return } this.nzCurrent = event - this.beforePlanNode = this.beforeEmergencyPlan.nodes[event] - this.leftDomain.selectPlanId = this.beforeEmergencyPlan.id - this.leftDomain.selectNodeId = this.beforePlanNode.id - MarkWindow.instance.selectMarkNode(this.beforeEmergencyPlan.id, this.beforePlanNode.id) - console.log(event) + this.publicToggleNode() } //切换预案节点 上一个 toLast() { - + if (this.nzCurrent === 0) { + this.message.info('目前已经是第一节点'); + return + } + this.nzCurrent = this.nzCurrent - 1 + this.publicToggleNode() + !this.isSuspend? this.autoPlay() : null } //切换预案节点 暂停 - suspend() { - + suspend(isSuspend: boolean) { + this.isSuspend = isSuspend + let msg: string = this.isSuspend? "目前已暂停" : "目前已开始播放" + this.message.info(msg); + if (this.isSuspend) { //暂停 + window.clearTimeout(this.timer) //清除定时器 + } else { //开启 + MarkWindow.instance.selectMarkNode(this.beforeEmergencyPlan.id, this.beforePlanNode.id) + this.autoPlay() + } } //切换预案节点 初始化 initialize() { - + this.nzCurrent = 0 + this.publicToggleNode() + !this.isSuspend? this.autoPlay() : null } //切换预案节点 下一个 toNext() { - + if (this.nzCurrent === this.beforeEmergencyPlan.nodes.length - 1) { + this.message.info('目前已经是最后一个节点'); + return + } + this.nzCurrent = this.nzCurrent + 1 + this.publicToggleNode() + !this.isSuspend? this.autoPlay() : null } //选中应急预案 设备 From d80b76565c47fe14732bfc72a1254cfef44b8330 Mon Sep 17 00:00:00 2001 From: liuxianghui <519646741@qq.com> Date: Wed, 24 Nov 2021 11:02:00 +0800 Subject: [PATCH 6/8] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20=E5=B9=B2=E7=B2=89?= =?UTF-8?q?=E7=81=AD=E7=81=AB=E5=99=A825?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/babylon/controller/config-manager.ts | 1 + src/app/babylon/controller/data-manager.ts | 5 +++-- .../model/data/model-data/model-data-facility.ts | 4 ++++ .../view/facility-window/facility-window.ts | 3 +++ src/assets/images/facility/in/XF_MHQ_GF_25.png | Bin 0 -> 2715 bytes 5 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 src/assets/images/facility/in/XF_MHQ_GF_25.png diff --git a/src/app/babylon/controller/config-manager.ts b/src/app/babylon/controller/config-manager.ts index 1db46f5..a8801b0 100644 --- a/src/app/babylon/controller/config-manager.ts +++ b/src/app/babylon/controller/config-manager.ts @@ -87,6 +87,7 @@ export class ConfigManager { case FacilityType.XF_MHQ_PT_35: result = "35kg普通灭火器"; break; case FacilityType.XF_MHQ_GF_4: result = "4kg干粉灭火器"; break; case FacilityType.XF_MHQ_GF_8: result = "8kg干粉灭火器"; break; + case FacilityType.XF_MHQ_GF_25: result = "25kg干粉灭火器"; break; case FacilityType.XF_MHQ_GF_35: result = "35kg干粉灭火器"; break; case FacilityType.XF_MHT: result = "灭火毯"; break; case FacilityType.XF_XFQ: result = "消防锹"; break; diff --git a/src/app/babylon/controller/data-manager.ts b/src/app/babylon/controller/data-manager.ts index de28f8a..4602630 100644 --- a/src/app/babylon/controller/data-manager.ts +++ b/src/app/babylon/controller/data-manager.ts @@ -442,9 +442,10 @@ export class DataManager { case FacilityType.XF_MHQ_PT_35: case FacilityType.XF_MHQ_GF_4: case FacilityType.XF_MHQ_GF_8: + case FacilityType.XF_MHQ_GF_25: case FacilityType.XF_MHQ_GF_35: result = new PropertyData_MHQ(key, facilityType); break; - case FacilityType.JY_JYJ: result = new PropertyData_JYJ(key,"", "","", "","",); break; - case FacilityType.JY_YG: result = new PropertyData_YG(key,"", "","", "","",""); break; + case FacilityType.JY_JYJ: result = new PropertyData_JYJ(key, "", "", "", "", "",); break; + case FacilityType.JY_YG: result = new PropertyData_YG(key, "", "", "", "", "", ""); break; case FacilityType.JY_SYGX: result = new PropertyData_SYGX(key); break; case FacilityType.JY_YQHSGX: result = new PropertyData_YQHSGX(key); break; diff --git a/src/app/babylon/model/data/model-data/model-data-facility.ts b/src/app/babylon/model/data/model-data/model-data-facility.ts index aa080af..9cd43be 100644 --- a/src/app/babylon/model/data/model-data/model-data-facility.ts +++ b/src/app/babylon/model/data/model-data/model-data-facility.ts @@ -181,6 +181,10 @@ export enum FacilityType { * 干粉灭火器 - 36kg(手推) */ XF_MHQ_GF_35 = "XF_MHQ_GF_35", + /** + * 干粉灭火器 - 36kg(手推) + */ + XF_MHQ_GF_25 = "XF_MHQ_GF_25", /** * 灭火毯 */ diff --git a/src/app/babylon/view/facility-window/facility-window.ts b/src/app/babylon/view/facility-window/facility-window.ts index 619f341..bce8d59 100644 --- a/src/app/babylon/view/facility-window/facility-window.ts +++ b/src/app/babylon/view/facility-window/facility-window.ts @@ -577,6 +577,9 @@ export class FacilityWindow extends UIBase { else if (TsTool.stringContain(mesh.name, FacilityType.XF_MHQ_GF_8)) { this.createNewFacilityByMesh(mesh, FacilityType.XF_MHQ_GF_8); } + else if (TsTool.stringContain(mesh.name, FacilityType.XF_MHQ_GF_25)) { + this.createNewFacilityByMesh(mesh, FacilityType.XF_MHQ_GF_25); + } else if (TsTool.stringContain(mesh.name, FacilityType.XF_MHQ_GF_35)) { this.createNewFacilityByMesh(mesh, FacilityType.XF_MHQ_GF_35); } diff --git a/src/assets/images/facility/in/XF_MHQ_GF_25.png b/src/assets/images/facility/in/XF_MHQ_GF_25.png new file mode 100644 index 0000000000000000000000000000000000000000..1814a1185a7115c8886245bda620dc8fd55818e6 GIT binary patch literal 2715 zcmV;M3S{+(P)Px)fNApXD5ywyZNr2u8EtnQCikEP7$z8sBCC#VnY1i!Ye_v6dINiFdu*mgmS5# zF$^HdKor0+5FcZW4g;yzLrqNs#WazMA$&z=Gcg)Di#bX%&=N#**ak^|b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z;y~s{OBr&#L=KuQO)o{s(-y V^kX%wWCH*I002ovPDHLkV1g%#7F_@U literal 0 HcmV?d00001 From a5942d87b3420447852ad5b9089f19e1d1a02142 Mon Sep 17 00:00:00 2001 From: cpf <1105965053@qq.com> Date: Wed, 24 Nov 2021 11:38:08 +0800 Subject: [PATCH 7/8] =?UTF-8?q?=E5=BA=94=E6=80=A5=E9=A2=84=E6=A1=88?= =?UTF-8?q?=E9=80=BB=E8=BE=91=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../left-domain/left-domain.component.ts | 3 ++ src/app/pages/plan/plan.component.ts | 36 ++++++++++++++----- 2 files changed, 31 insertions(+), 8 deletions(-) diff --git a/src/app/pages/left-domain/left-domain.component.ts b/src/app/pages/left-domain/left-domain.component.ts index 8da1893..0de4d11 100644 --- a/src/app/pages/left-domain/left-domain.component.ts +++ b/src/app/pages/left-domain/left-domain.component.ts @@ -214,6 +214,7 @@ export class LeftDomainComponent implements OnInit { PlanComponent.instance.beforeEmergencyPlan = item PlanComponent.instance.beforePlanNode = e PlanComponent.instance.nzCurrent = -1 + PlanComponent.instance.timer? window.clearTimeout(PlanComponent.instance.timer) : null //清除定时器 this.selectPlanId = item.id this.selectNodeId = e.id MarkWindow.instance.selectMarkNode(item.id, e.id) @@ -226,6 +227,7 @@ export class LeftDomainComponent implements OnInit { PlanComponent.instance.beforeEmergencyPlan = item PlanComponent.instance.beforePlanNode = e PlanComponent.instance.nzCurrent = -1 + PlanComponent.instance.timer? window.clearTimeout(PlanComponent.instance.timer) : null //清除定时器 this.selectPlanId = item.id this.selectNodeId = e.id MarkWindow.instance.selectMarkNode(item.id, e.id) @@ -240,6 +242,7 @@ export class LeftDomainComponent implements OnInit { PlanComponent.instance.beforeEmergencyPlan = new MarkPlanData(-99, "请选择节点") PlanComponent.instance.beforePlanNode = new MarkNodeData(-99, "请选择节点") PlanComponent.instance.nzCurrent = -1 + PlanComponent.instance.timer? window.clearTimeout(PlanComponent.instance.timer) : null //清除定时器 this.selectPlanId = null this.selectNodeId = null MarkWindow.instance.selectMarkNode(null, null) diff --git a/src/app/pages/plan/plan.component.ts b/src/app/pages/plan/plan.component.ts index 1b591ad..73877d9 100644 --- a/src/app/pages/plan/plan.component.ts +++ b/src/app/pages/plan/plan.component.ts @@ -69,14 +69,12 @@ export class PlanComponent implements OnInit { } ngAfterViewInit(): void { - let simpleData: InsitutionDataSimple = new InsitutionDataSimple(); simpleData.id = 1; //来自选中的单位的信息 ,测试:1 simpleData.key = "ceshi"; //正式: id.tostring(),测试:"ceshi" simpleData.name = "测试"; //来自选中的单位的信息 ,测试:"测试" let has3dData = true;//是否有三维数据,来自选中单位的信息 - let loginStatus = StatusManager.getStatus(LoginSatus); if (ModeManager.institutionDemoKey == ModeManager.c_demoKey_null) { //无指定测试单位,则为正式启动,根据当前单位key寻找 if (has3dData) { //如果已经有三维数据,直接进入 @@ -355,7 +353,7 @@ export class PlanComponent implements OnInit { this.beforePlanNode = this.beforeEmergencyPlan.nodes[this.nzCurrent] this.leftDomain.selectPlanId = this.beforeEmergencyPlan.id this.leftDomain.selectNodeId = this.beforePlanNode.id - MarkWindow.instance.selectMarkNode(this.beforeEmergencyPlan.id, this.beforePlanNode.id) + MarkWindow.instance.selectMarkNode(this.beforeEmergencyPlan.id, this.beforePlanNode.id, false, true) } //选中 底部一级节点 开启自动播放 @@ -364,6 +362,7 @@ export class PlanComponent implements OnInit { if (item.nodes.length) { let isTrue = confirm("即将开始播放节点") if (isTrue) { + this.timer? window.clearTimeout(this.timer) : null //清除定时器 this.nzCurrent = 0 this.beforeEmergencyPlan = item this.publicToggleNode() @@ -377,7 +376,7 @@ export class PlanComponent implements OnInit { //自动播放-切换接点 autoPlay() { - if (this.nzCurrent === this.beforeEmergencyPlan.nodes.length - 1) { + if (this.nzCurrent >= this.beforeEmergencyPlan.nodes.length - 1) { this.nzCurrent = this.nzCurrent + 1 this.isSuspend = false //初始化暂停状态 window.clearTimeout(this.timer) //清除定时器 @@ -385,11 +384,12 @@ export class PlanComponent implements OnInit { return } let time: number = this.beforePlanNode.getShowTime() + console.log(`所需${time}s`) this.timer = window.setTimeout(()=>{ this.nzCurrent = this.nzCurrent + 1 this.publicToggleNode() !this.isSuspend? this.autoPlay() : null - },time) + },time * 1000) } //切换预案节点 @@ -397,16 +397,22 @@ export class PlanComponent implements OnInit { if (event === this.beforeEmergencyPlan.nodes.length) { return } + this.timer? window.clearTimeout(this.timer) : null //清除定时器 this.nzCurrent = event this.publicToggleNode() } //切换预案节点 上一个 toLast() { - if (this.nzCurrent === 0) { + if (this.beforeEmergencyPlan.id === -99 || this.beforePlanNode.id === -99) { + this.message.info('请选择节点'); + return + } + if (this.nzCurrent <= 0) { this.message.info('目前已经是第一节点'); return } + this.timer? window.clearTimeout(this.timer) : null //清除定时器 this.nzCurrent = this.nzCurrent - 1 this.publicToggleNode() !this.isSuspend? this.autoPlay() : null @@ -414,19 +420,28 @@ export class PlanComponent implements OnInit { //切换预案节点 暂停 suspend(isSuspend: boolean) { + if (this.beforeEmergencyPlan.id === -99 || this.beforePlanNode.id === -99) { + this.message.info('请选择节点'); + return + } this.isSuspend = isSuspend let msg: string = this.isSuspend? "目前已暂停" : "目前已开始播放" this.message.info(msg); if (this.isSuspend) { //暂停 window.clearTimeout(this.timer) //清除定时器 } else { //开启 - MarkWindow.instance.selectMarkNode(this.beforeEmergencyPlan.id, this.beforePlanNode.id) + MarkWindow.instance.selectMarkNode(this.beforeEmergencyPlan.id, this.beforePlanNode.id, false, true) this.autoPlay() } } //切换预案节点 初始化 initialize() { + if (this.beforeEmergencyPlan.id === -99 || this.beforePlanNode.id === -99) { + this.message.info('请选择节点'); + return + } + this.timer? window.clearTimeout(this.timer) : null //清除定时器 this.nzCurrent = 0 this.publicToggleNode() !this.isSuspend? this.autoPlay() : null @@ -434,10 +449,15 @@ export class PlanComponent implements OnInit { //切换预案节点 下一个 toNext() { - if (this.nzCurrent === this.beforeEmergencyPlan.nodes.length - 1) { + if (this.beforeEmergencyPlan.id === -99 || this.beforePlanNode.id === -99) { + this.message.info('请选择节点'); + return + } + if (this.nzCurrent >= this.beforeEmergencyPlan.nodes.length - 1) { this.message.info('目前已经是最后一个节点'); return } + this.timer? window.clearTimeout(this.timer) : null //清除定时器 this.nzCurrent = this.nzCurrent + 1 this.publicToggleNode() !this.isSuspend? this.autoPlay() : null From 05761f12021178b5d7db0e1136de5b9c0c981762 Mon Sep 17 00:00:00 2001 From: liuxianghui <519646741@qq.com> Date: Wed, 24 Nov 2021 14:49:41 +0800 Subject: [PATCH 8/8] =?UTF-8?q?=E5=BA=94=E6=80=A5=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/babylon/controller/data-manager.ts | 26 +++++++++++++++++++++ src/app/babylon/controller/serve-manager.ts | 9 ++++++- src/app/babylon/tool/speaking-tool.ts | 1 + 3 files changed, 35 insertions(+), 1 deletion(-) diff --git a/src/app/babylon/controller/data-manager.ts b/src/app/babylon/controller/data-manager.ts index 4602630..c83168a 100644 --- a/src/app/babylon/controller/data-manager.ts +++ b/src/app/babylon/controller/data-manager.ts @@ -305,6 +305,25 @@ export class DataManager { return result; } + /** + * 获取 上传标绘物所需文件时,保存的路径 (无法区分节点) + * @param institutionKey 单位id + * @param resType 资源类型 + * @param key 唯一key + */ + static getResPath_mark(institutionKey: string, resType: ResType, key: string) { + let result = + institutionKey.toLocaleLowerCase() + + '/' + + ServeManager.ngAssetsPath + + "mark/" + //表示是应急标绘下的 + resType + + '/' + + key + + '/'; + return result; + } + // //获取设备资源完整路径 // static getResPath_facility(facilityPosType: FacilityPosType, type: FacilityType): string { // let result = "mesh/facilities/"; @@ -587,5 +606,12 @@ export enum ModelChangeType { Update, } +/** + * 资源类型 + */ +export enum ResType { + Texture = "texture", + Video = "video", +} diff --git a/src/app/babylon/controller/serve-manager.ts b/src/app/babylon/controller/serve-manager.ts index 5e8c3f0..87a3a9e 100644 --- a/src/app/babylon/controller/serve-manager.ts +++ b/src/app/babylon/controller/serve-manager.ts @@ -158,7 +158,14 @@ export class ServeManager { //#region 文件上传 - //队列性,批量上传 + /** + * 队列性,批量上传 + * @param index + * @param files + * @param resPath_out + * @param onOneSuccess + * @param onEnd + */ uploadFile(index: number, files: File[], resPath_out, onOneSuccess: (name: string, path: string, file: File) => void, onEnd: () => void) { if (index < files.length) { console.log("上传文件", files[index].name); diff --git a/src/app/babylon/tool/speaking-tool.ts b/src/app/babylon/tool/speaking-tool.ts index eb33fd5..2516888 100644 --- a/src/app/babylon/tool/speaking-tool.ts +++ b/src/app/babylon/tool/speaking-tool.ts @@ -20,6 +20,7 @@ export class SpeakingTool { * @param msg */ speak(msg: string) { + console.log("阅读" + msg); if (this.isIE()) { }