diff --git a/angular.json b/angular.json index 7a65fa9..9cafab9 100644 --- a/angular.json +++ b/angular.json @@ -34,7 +34,9 @@ ], "scripts": [ "node_modules/echarts/dist/echarts.js", - "./node_modules/swiper/js/swiper.min.js" + "./node_modules/swiper/js/swiper.min.js", + "src/assets/unityAppliction/Build/UnityLoader.js", + "src/assets/unityAppliction/TemplateData/UnityProgress.js" ] }, "configurations": { @@ -72,7 +74,7 @@ "builder": "@angular-devkit/build-angular:dev-server", "options": { "browserTarget": "anxin119:build", - "proxyConfig": "proxy.config.json" + "proxyConfig": "proxy.config.json" }, "configurations": { "production": { @@ -129,6 +131,10 @@ } } } - }}, - "defaultProject": "anxin119" + } + }, + "defaultProject": "anxin119", + "cli": { + "analytics": false + } } \ No newline at end of file diff --git a/src/app/app.module.ts b/src/app/app.module.ts index a84b7c8..bb780ce 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -14,9 +14,9 @@ import { PagesModule } from './pages/pages.module'; import { FormsModule } from '@angular/forms'; import { UiModule } from './ui/ui.module'; import { HttpClientModule } from '@angular/common/http'; -import { httpInterceptorProviders } from './http-interceptors/index' -import {CacheTokenService} from './http-interceptors/cache-token.service' -import { TreeService } from'./http-interceptors/tree.service' +import { httpInterceptorProviders } from './http-interceptors/index'; +import {CacheTokenService} from './http-interceptors/cache-token.service'; +import { TreeService } from './http-interceptors/tree.service'; @NgModule({ declarations: [ diff --git a/src/app/ui/plan/plan.component.html b/src/app/ui/plan/plan.component.html index e69de29..f080b5c 100644 --- a/src/app/ui/plan/plan.component.html +++ b/src/app/ui/plan/plan.component.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/app/ui/ui.module.ts b/src/app/ui/ui.module.ts index 7ea64d3..6306f4d 100644 --- a/src/app/ui/ui.module.ts +++ b/src/app/ui/ui.module.ts @@ -94,9 +94,10 @@ import { ImagesData } from './fire-fighting-device/imagesdata.component'; import { ImgsDataDetail } from './fire-fighting-device/imgsdatadetail.component'; import { KeySiteImgs } from './key-site/keysiteimgs.component'; import { KeyImgDetail } from './key-site/keyimgdetail.component'; +import { UnityComponent} from './unity/unity.component'; @NgModule({ - declarations: [UiComponent, CardComponent, StepperComponent, TabgroupComponent, ProgressComponent, SnackbarComponent,PersonaldataComponent, UserdataComponent, ChangepasswordComponent, OrganizationComponent, UnittypeComponent, AuthorityComponent, RoleComponent, UsermanagementComponent,IsnoPipe,ConfirmpswDirective,DialogOverviewExampleDialog,CreateAuthority,CreateRole,EditRole,TimePipe,CreateNewUser,EditNewUser,allRoles,SharePower,CreateOrganization,EditOrganization,seeInformation,EditUser,editorialUnit,FireProtectionElementsComponent,Establish,EditingFireControl,FireFightingTemplateComponent, NavmenusComponent,CreateMenus,EditMenus,NewFireFighting,EditFireClassification, MaterialBankComponent, UnitInformationComponent,AddMatLibrary,EditMatLibrary,attributeComponent,AddOriginalCopy,addAttributeComponent,editAttribute,EditOriginalCopy,SelectOriginalCopy,EditUnitInfo,AddUnitInfo,AddGroups,EditGroup, BasicinfoComponent, PlanComponent, AllaroundComponent, FireFightingDeviceComponent, KeySiteComponent, FunctionDivisionComponent, RealisticPictureComponent, UploadingCADComponent,AddHouseInfo,ImgDetails,ImagesData,ImgsDataDetail,KeySiteImgs,KeyImgDetail,addPartition,addPartitionAttribute,previewImg,addRealPicture,editRealPicture + declarations: [UiComponent, CardComponent, StepperComponent, TabgroupComponent, ProgressComponent, SnackbarComponent,PersonaldataComponent, UserdataComponent, ChangepasswordComponent, OrganizationComponent, UnittypeComponent, AuthorityComponent, RoleComponent, UsermanagementComponent,IsnoPipe,ConfirmpswDirective,DialogOverviewExampleDialog,CreateAuthority,CreateRole,EditRole,TimePipe,CreateNewUser,EditNewUser,allRoles,SharePower,CreateOrganization,EditOrganization,seeInformation,EditUser,editorialUnit,FireProtectionElementsComponent,Establish,EditingFireControl,FireFightingTemplateComponent, NavmenusComponent,CreateMenus,EditMenus,NewFireFighting,EditFireClassification, MaterialBankComponent, UnitInformationComponent,AddMatLibrary,EditMatLibrary,attributeComponent,AddOriginalCopy,addAttributeComponent,editAttribute,EditOriginalCopy,SelectOriginalCopy,EditUnitInfo,AddUnitInfo,AddGroups,EditGroup, BasicinfoComponent, PlanComponent, AllaroundComponent, FireFightingDeviceComponent, KeySiteComponent, FunctionDivisionComponent, RealisticPictureComponent, UploadingCADComponent,AddHouseInfo,ImgDetails,ImagesData,ImgsDataDetail,KeySiteImgs,KeyImgDetail,addPartition,addPartitionAttribute,previewImg,addRealPicture,editRealPicture,UnityComponent ], imports: [ diff --git a/src/app/ui/unity/unity.component.html b/src/app/ui/unity/unity.component.html new file mode 100644 index 0000000..f06c4b3 --- /dev/null +++ b/src/app/ui/unity/unity.component.html @@ -0,0 +1,3 @@ +
+
+
\ No newline at end of file diff --git a/src/app/ui/unity/unity.component.scss b/src/app/ui/unity/unity.component.scss new file mode 100644 index 0000000..35c359d --- /dev/null +++ b/src/app/ui/unity/unity.component.scss @@ -0,0 +1,4 @@ +#unityContainer{ + width: 100%; + height: 100%; +} \ No newline at end of file diff --git a/src/app/ui/unity/unity.component.spec.ts b/src/app/ui/unity/unity.component.spec.ts new file mode 100644 index 0000000..05ac492 --- /dev/null +++ b/src/app/ui/unity/unity.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { UnityComponent } from './unity.component'; + +describe('UnityComponent', () => { + let component: UnityComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ UnityComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(UnityComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/ui/unity/unity.component.ts b/src/app/ui/unity/unity.component.ts new file mode 100644 index 0000000..fac4c30 --- /dev/null +++ b/src/app/ui/unity/unity.component.ts @@ -0,0 +1,19 @@ +import { Component, OnInit } from '@angular/core'; + +declare var UnityLoader: any; +declare var UnityProgress: any; + +@Component({ + selector: 'app-unity', + templateUrl: './unity.component.html', + styleUrls: ['./unity.component.scss'] +}) +export class UnityComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + UnityLoader.instantiate('unityContainer', 'assets/unityAppliction/Build/build.json', {onProgress: UnityProgress}); + } + +} diff --git a/tsconfig.json b/tsconfig.json index 30956ae..6d92dc1 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,7 @@ { "compileOnSave": false, "compilerOptions": { + "allowJs": true, "baseUrl": "./", "outDir": "./dist/out-tsc", "sourceMap": true, diff --git a/typing.d.ts b/typing.d.ts new file mode 100644 index 0000000..050e96d --- /dev/null +++ b/typing.d.ts @@ -0,0 +1 @@ +declare var UnityLoader : any;