Browse Source

[新增]linksPlan增加在线编制预案的查看

master
邵佳豪 1 year ago
parent
commit
4fa2f38f51
  1. 2
      proxy.config.json
  2. 4
      src/app/app.module.ts
  3. 8
      src/app/external-links-plan/external-links-plan.component.html
  4. 51
      src/app/external-links-plan/external-links-plan.component.ts
  5. 8
      src/app/plan-management/plan-management.module.ts
  6. 4
      src/index.html

2
proxy.config.json

@ -1,6 +1,6 @@
{
"/api": {
"target": "http://121.36.37.70:8201/",
"target": "http://10.81.73.39:8000/",
"生产": "http://10.81.73.39:8000/",
"测试": "http://121.36.37.70:8201/",
"生产2": "http://183.194.244.232:8088/",

4
src/app/app.module.ts

@ -30,6 +30,7 @@ import { registerLocaleData } from "@angular/common";
import zh from "@angular/common/locales/zh";
import { KeyUnitModule } from "./key-unit/key-unit.module";
import { MatTabsModule } from "@angular/material/tabs";
import { PlanManagementModule } from "./plan-management/plan-management.module";
registerLocaleData(zh);
@NgModule({
declarations: [
@ -59,7 +60,8 @@ registerLocaleData(zh);
MatProgressSpinnerModule,
UiModule,
KeyUnitModule,
MatTabsModule
MatTabsModule,
PlanManagementModule,
],
providers: [httpInterceptorProviders, CacheTokenService, TreeService],
bootstrap: [AppComponent],

8
src/app/external-links-plan/external-links-plan.component.html

@ -55,12 +55,14 @@
<iframe id="inneriframe" [src]='iframeSrc' frameborder="0" style="width: 100%;height: 100%;"></iframe>
</div>
<div *ngIf="showType == 1" id="viewer"></div>
<!-- <div *ngIf="showType == 2">
<iframe id="inneriframe2" [src]='threedUrl' frameborder="0" style="width: 100%;height: 100%;"></iframe>
</div> -->
<div *ngIf="showType == 3">
<app-collection-tools></app-collection-tools>
</div>
<!-- 在线编制预案 -->
<div *ngIf="showType == 2">
<app-create-plan-online-five></app-create-plan-online-five>
</div>
</ng-template>
</mat-tab>

51
src/app/external-links-plan/external-links-plan.component.ts

@ -41,21 +41,47 @@ export class ExternalLinksPlanComponent implements OnInit {
);
sessionStorage.setItem("editable", "0");
sessionStorage.setItem("planName", data.name);
this.router.navigate([`/linksPlan`], {
queryParams: {
let queryParams = {};
if (data.webTextData && data.planType === 16) {
queryParams = {
id: data.companyId,
planId: data.id,
orName: data.company.organizationName,
orId: data.company.organizationId,
},
companyId: data.companyId,
planName: data.name,
unitName: data.companyName,
planCategory: data.planCategory,
unitTypeId: data.company.buildingTypes[0].id,
pattern: "false",
};
} else {
queryParams = {
id: data.companyId,
planId: data.id,
orName: data.company.organizationName,
orId: data.company.organizationId,
};
}
this.router.navigate([`/linksPlan`], {
queryParams: queryParams,
});
this.planData = data;
//如果是查看文件类型
console.log("data.planType", data.planType);
if (data.planType != 1 && data.planType != 2) {
this.fetchUrl = data.attachmentUrls[0];
this.fetchUrl = data.attachmentUrls ? data.attachmentUrls[0] : "";
var index = this.fetchUrl.indexOf("/");
//图片
// 在线编制预案
if (data.webTextData && data.planType === 16) {
this.showType = 2;
return;
}
//全景图图片
if (this.fetchUrl.substr(0, index) == "psw") {
this.showType = 1;
var obj = document.getElementById("viewer");
@ -122,21 +148,6 @@ export class ExternalLinksPlanComponent implements OnInit {
if (this.planData.planMode == 1 || this.planData.planMode == 2) {
//预案planMode=2时, 跳查看页面组件
this.showType = 3;
// this.http.get(`/api/Plans/${data.companyId}`).subscribe((data: any) => {
// console.log(data);
// data && data.company ? (this.companyData = data.company) : null;
// sessionStorage.setItem(
// "buildingTypeId",
// this.companyData.buildingTypes.length
// ? this.companyData.buildingTypes[0].id
// : undefined
// );
// sessionStorage.setItem("companyId", data.companyId);
// sessionStorage.setItem("planId", this.planId);
// sessionStorage.setItem("editable", "0");
// sessionStorage.setItem("planName", this.planData.name);
// });
} else if (this.planData.planMode == 3) {
//网页地址
let localhostPath = window.document.location.href.substring(

8
src/app/plan-management/plan-management.module.ts

@ -209,6 +209,12 @@ import { NzTreeModule } from "ng-zorro-antd/tree";
NzSpinModule,
NzTreeModule,
],
exports: [PlanType, AuditSatus, PlanLevel, state],
exports: [
PlanType,
AuditSatus,
PlanLevel,
state,
CreatePlanOnlineFiveComponent,
],
})
export class PlanManagementModule {}

4
src/index.html

@ -19,14 +19,14 @@
<!-- <script type="text/javascript" src="./assets/kmap/kmap-service-main-kd.js"></script> -->
<script type="text/javascript">
<!-- <script type="text/javascript">
window._AMapSecurityConfig = {
securityJsCode: '0afa0b144398727fad2ca06f5f7156b3'
}
</script>
<script
src="http://10.81.73.39:8000/webapi/maps?v=2.0&key=17bb9b27e49451cde8f2e6655b11ff1a&plugin=AMap.Driving,AMap.MouseTool,AMap.RangingTool"></script>
<script src="http://10.81.73.39:8000/webapi/ui/1.1/main.js"></script>
<script src="http://10.81.73.39:8000/webapi/ui/1.1/main.js"></script> -->
<!-- <script
src="https://webapi.amap.com/maps?v=2.0&key=17bb9b27e49451cde8f2e6655b11ff1a&plugin=AMap.Driving,AMap.MouseTool,AMap.RangingTool"></script>
<script src="https://webapi.amap.com/ui/1.1/main.js"></script> -->

Loading…
Cancel
Save