Browse Source

[完善]审核记录头部样式调整

tianjin
邵佳豪 2 years ago
parent
commit
9d8159f38b
  1. 4
      proxy.config.json
  2. 433
      src/app/plan-audit/plan-record/plan-record.component.html
  3. 711
      src/app/plan-audit/plan-record/plan-record.component.scss
  4. 472
      src/app/plan-audit/plan-record/plan-record.component.ts

4
proxy.config.json

@ -1,6 +1,8 @@
{
"/api": {
"target": "http://10.81.73.39:8000/",
"target": "http://121.36.37.70:8201/",
"生产": "http://10.81.73.39:8000/",
"测试": "http://121.36.37.70:8201/",
"secure": false,
"changeOrigin": true
}

433
src/app/plan-audit/plan-record/plan-record.component.html

@ -1,92 +1,86 @@
<!--
* @Descripttion:
* @version:
* @Author: sueRimn
* @Date: 2020-12-25 10:19:31
* @LastEditors: sueRimn
* @LastEditTime: 2021-08-16 15:49:49
-->
<div class="box">
<div class="boxleft">
<div class="lefthead">
<form (ngSubmit)="onSubmit(form.value)" #form="ngForm">
<div class="headdiv">
<span>操作类型:</span>
<input type="radio" name="level" value="" [(ngModel)]="level"><span>全部</span>
<input type="radio" name="level" value="1" [(ngModel)]="level"><span>更新</span>
<input type="radio" name="level" value="0" [(ngModel)]="level"><span>新增</span>
<input type="radio" name="level" value="2" [(ngModel)]="level"><span>删除</span>
<div class="count">
<span >共计:{{count}}条</span>
</div>
</div>
<div class="headdivtwo">
<span>审核状态:</span>
<input type="radio" name="passstate" [(ngModel)]="verifyState" value=""><span>全部</span>
<input type="radio" name="passstate" [(ngModel)]="verifyState" value="1"><span>初审通过</span>
<input type="radio" name="passstate" [(ngModel)]="verifyState" value="2"><span>初审驳回</span>
<input type="radio" name="passstate" [(ngModel)]="verifyState" value="4"><span>终审通过</span>
<input type="radio" name="passstate" [(ngModel)]="verifyState" value="5"><span>终审驳回</span>
</div>
<div class="headthree">
<span>类型:</span>
<mat-form-field>
<mat-select placeholder='请选择单位类型' name="unittype" [(ngModel)]="projectlevel">
<mat-option value="1">Ⅰ级预案</mat-option>
<mat-option value="2">Ⅱ级预案</mat-option>
<mat-option value="3">Ⅲ级预案</mat-option>
<mat-option value="4">Ⅳ级预案</mat-option>
<mat-option value="5">Ⅴ级预案</mat-option>
<mat-option value="6">应急预案(国家级)</mat-option>
<mat-option value="7">应急预案(市级)</mat-option>
<mat-option value="8">类型预案</mat-option>
<mat-option value="11">重点单位</mat-option>
<mat-option value="12">消防水源</mat-option>
<mat-option value="13">消防力量</mat-option>
<mat-option value="14">联动力量</mat-option>
</mat-select>
</mat-form-field>
<span>状态:</span>
<mat-form-field>
<mat-select name="IsNewData" placeholder='请选择状态' [(ngModel)]="IsNewData" [multiple]="true">
<mat-option value=true>新增</mat-option>
<mat-option value=false>维护更新</mat-option>
</mat-select>
</mat-form-field>
<span>编制级别:</span>
<mat-form-field>
<mat-select name="preparelevel" placeholder='请选择编制级别' [(ngModel)]="PlanLevel">
<mat-option *ngFor="let item of preparelevels" [value]="item.value">{{item.name}}</mat-option>
</mat-select>
</mat-form-field>
</div>
<div class="headfour">
<span>时间:</span>
<mat-form-field class="example-full-width" style="margin-bottom: 0;">
<input type="date" matInput name="companyName" autocomplete="off" [(ngModel)]="addtime">
</mat-form-field>
<mat-icon *ngIf="!pcshow" aria-hidden="false" style="position: relative;right: 120px;top: 5px;" id="padshow">arrow forward</mat-icon>
<span style="margin-left: 15px;" id="pcshow" *ngIf="pcshow">🠊</span>
<mat-form-field class="example-full-width" style="margin-left: 10px;margin-bottom: 0;">
<input type="date" matInput name="companyName" autocomplete="off" [(ngModel)]="endtime">
</mat-form-field>
<span style="margin-left: 10px;" >预案类型:</span>
<mat-form-field>
<mat-select placeholder='请选择预案类型' name="unittype" [(ngModel)]="plantypes" [multiple]="true">
<mat-option value="1">二维预案</mat-option>
<mat-option value="2">三维预案</mat-option>
<mat-option value="4">其他预案</mat-option>
<mat-option value="16">文本预案</mat-option>
</mat-select>
</mat-form-field>
<button mat-raised-button color="primary" type="submit" >查询</button>
<button mat-raised-button color="primary" (click)='record()'><img src="../../../assets/images/refresh.png" > 重置</button>
</div>
</form>
<!-- <div class="tablediv">
<div class="boxleft">
<div class="lefthead">
<form (ngSubmit)="onSubmit(form.value)" #form="ngForm">
<div class="headdiv">
<span>操作类型:</span>
<input type="radio" name="level" value="" [(ngModel)]="level"><span>全部</span>
<input type="radio" name="level" value="1" [(ngModel)]="level"><span>更新</span>
<input type="radio" name="level" value="0" [(ngModel)]="level"><span>新增</span>
<input type="radio" name="level" value="2" [(ngModel)]="level"><span>删除</span>
<div class="count">
<span>共计:{{count}}条</span>
</div>
</div>
<div class="headdivtwo">
<span>审核状态:</span>
<input type="radio" name="passstate" [(ngModel)]="verifyState" value=""><span>全部</span>
<input type="radio" name="passstate" [(ngModel)]="verifyState" value="1"><span>初审通过</span>
<input type="radio" name="passstate" [(ngModel)]="verifyState" value="2"><span>初审驳回</span>
<input type="radio" name="passstate" [(ngModel)]="verifyState" value="4"><span>终审通过</span>
<input type="radio" name="passstate" [(ngModel)]="verifyState" value="5"><span>终审驳回</span>
</div>
<div class="headthree">
<span>类型:</span>
<mat-form-field>
<mat-select placeholder='请选择单位类型' name="unittype" [(ngModel)]="projectlevel">
<mat-option value="1">Ⅰ级预案</mat-option>
<mat-option value="2">Ⅱ级预案</mat-option>
<mat-option value="3">Ⅲ级预案</mat-option>
<mat-option value="4">Ⅳ级预案</mat-option>
<mat-option value="5">Ⅴ级预案</mat-option>
<mat-option value="6">应急预案(国家级)</mat-option>
<mat-option value="7">应急预案(市级)</mat-option>
<mat-option value="8">类型预案</mat-option>
<mat-option value="11">重点单位</mat-option>
<mat-option value="12">消防水源</mat-option>
<mat-option value="13">消防力量</mat-option>
<mat-option value="14">联动力量</mat-option>
</mat-select>
</mat-form-field>
<span>状态:</span>
<mat-form-field>
<mat-select name="IsNewData" placeholder='请选择状态' [(ngModel)]="IsNewData" [multiple]="true">
<mat-option value=true>新增</mat-option>
<mat-option value=false>维护更新</mat-option>
</mat-select>
</mat-form-field>
<span>编制级别:</span>
<mat-form-field>
<mat-select name="preparelevel" placeholder='请选择编制级别' [(ngModel)]="PlanLevel">
<mat-option *ngFor="let item of preparelevels" [value]="item.value">{{item.name}}</mat-option>
</mat-select>
</mat-form-field>
</div>
<div class="headfour">
<span>时间:</span>
<mat-form-field class="example-full-width" style="margin-bottom: 0;">
<input type="date" matInput name="companyName" autocomplete="off" [(ngModel)]="addtime">
</mat-form-field>
<mat-icon *ngIf="!pcshow" aria-hidden="false" style="position: relative;right: 120px;top: 5px;"
id="padshow">arrow forward</mat-icon>
<span style="margin-left: 15px;" id="pcshow" *ngIf="pcshow">🠊</span>
<mat-form-field class="example-full-width" style="margin-left: 10px;margin-bottom: 0;">
<input type="date" matInput name="companyName" autocomplete="off" [(ngModel)]="endtime">
</mat-form-field>
<span style="margin-left: 10px;">预案类型:</span>
<mat-form-field>
<mat-select placeholder='请选择预案类型' name="unittype" [(ngModel)]="plantypes" [multiple]="true">
<mat-option value="1">二维预案</mat-option>
<mat-option value="2">三维预案</mat-option>
<mat-option value="4">其他预案</mat-option>
<mat-option value="16">文本预案</mat-option>
</mat-select>
</mat-form-field>
<button mat-raised-button color="primary" type="submit">查询</button>
<button mat-raised-button color="primary" (click)='record()'><img src="../../../assets/images/refresh.png">
重置</button>
</div>
</form>
<!-- <div class="tablediv">
<table cellspacing="0" cellpadding="0">
<thead>
<th style="width: 15%;">类型</th>
@ -108,133 +102,144 @@
</tbody>
</table>
</div> -->
<div class="tablediv">
<table cellspacing="0" cellpadding="0" style="margin-top: 10px;">
<thead>
<th style="width: 10%;">状态</th>
<th style="width: 10%;">类型</th>
<th style="width: 10%;">预案类型</th>
<th style="width: 10%;">名称</th>
<th style="width: 5%;">操作</th>
<th style="width: 20%;">所属组织</th>
<th style="width: 10%;">审核状态</th>
<th style="width: 10%;">提交人</th>
<th style="width: 15%;">提交时间</th>
</thead>
</table>
<div class="tbodycss" id="tbodydiv" >
<table cellspacing="0" cellpadding="0" id="table" >
<tr [ngClass]="{'selectedTr': item.id == id}" *ngFor="let item of tableDate;let key = index" (click)='tableClick($event,item)'>
<td style="width: 10%;" [ngClass]="{'green': item.itemMaintenanceState == '0','yellow':item.itemMaintenanceState != '0'}">{{item.itemMaintenanceState=='0'?'新增':'维护'}}</td>
<td style="width: 10%;">
<!-- <input type="radio" name="yuan" value={{item.id}} [(ngModel)]="checked" (click)='radioClick(item)'> -->
{{item.contentType=='1'?'Ⅰ级预案':item.contentType=='2'?'Ⅱ级预案':item.contentType=='3'?'Ⅲ级预案':item.contentType=='4'?'Ⅳ级预案':item.contentType=='5'?
'Ⅴ级预案':item.contentType=='6'?'应急预案(国家级)':item.contentType=='7'?'应急预案(市级)':item.contentType=='8'?'类型预案':item.contentType=='11'?'重点单位':item.contentType=='12'?'水源':item.contentType=='13'?'消防力量':item.contentType=='14'?'联动力量':'未知'}}</td>
<td style="width: 10%;">
{{item.planType=='1'?'二维预案':item.planType=='2'?'三维预案':item.planType=='4'?'其它预案':item.planType=='16'?'文本预案':''}}
</td>
<td style="width: 10%;">{{item.title}}</td>
<td style="width: 5%;" [ngClass]="{'green': item.operation == '0','red':item.operation == '2','yellow':item.operation == '1'}">{{item.operation=='0'?'新增':item.operation=='1'?'更新':'删除'}}</td>
<td style="width: 20%;">{{item.organizationName}}</td>
<td style="width: 10%;" [ngClass]="{'green': item.verifyState == '1'||item.verifyState == '4','red':item.verifyState == '2'||item.verifyState == '5'}">{{item.verifyState=='0'?'待初审':item.verifyState=='1'?
'初审通过':item.verifyState=='2'?'初审驳回':item.verifyState=='3'?'待终审':item.verifyState=='4'?'终审通过':'终审驳回'}}</td>
<td style="width: 10%;">{{item.creatorName}}</td>
<td style="width: 15%;">{{item.createTime|date:'yyyy-MM-dd'}}</td>
</tr>
</table>
</div>
</div>
<div class="tablediv">
<table cellspacing="0" cellpadding="0" style="margin-top: 10px;">
<thead>
<th style="width: 10%;">状态</th>
<th style="width: 10%;">类型</th>
<th style="width: 10%;">预案类型</th>
<th style="width: 10%;">名称</th>
<th style="width: 5%;">操作</th>
<th style="width: 20%;">所属组织</th>
<th style="width: 10%;">审核状态</th>
<th style="width: 10%;">提交人</th>
<th style="width: 15%;">提交时间</th>
</thead>
</table>
<div class="tbodycss" id="tbodydiv">
<table cellspacing="0" cellpadding="0" id="table">
<tr [ngClass]="{'selectedTr': item.id == id}" *ngFor="let item of tableDate;let key = index"
(click)='tableClick($event,item)'>
<td style="width: 10%;"
[ngClass]="{'green': item.itemMaintenanceState == '0','yellow':item.itemMaintenanceState != '0'}">
{{item.itemMaintenanceState=='0'?'新增':'维护'}}</td>
<td style="width: 10%;">
<!-- <input type="radio" name="yuan" value={{item.id}} [(ngModel)]="checked" (click)='radioClick(item)'> -->
{{item.contentType=='1'?'Ⅰ级预案':item.contentType=='2'?'Ⅱ级预案':item.contentType=='3'?'Ⅲ级预案':item.contentType=='4'?'Ⅳ级预案':item.contentType=='5'?
'Ⅴ级预案':item.contentType=='6'?'应急预案(国家级)':item.contentType=='7'?'应急预案(市级)':item.contentType=='8'?'类型预案':item.contentType=='11'?'重点单位':item.contentType=='12'?'水源':item.contentType=='13'?'消防力量':item.contentType=='14'?'联动力量':'未知'}}
</td>
<td style="width: 10%;">
{{item.planType=='1'?'二维预案':item.planType=='2'?'三维预案':item.planType=='4'?'其它预案':item.planType=='16'?'文本预案':''}}
</td>
<td style="width: 10%;">{{item.title}}</td>
<td style="width: 5%;"
[ngClass]="{'green': item.operation == '0','red':item.operation == '2','yellow':item.operation == '1'}">
{{item.operation=='0'?'新增':item.operation=='1'?'更新':'删除'}}</td>
<td style="width: 20%;">{{item.organizationName}}</td>
<td style="width: 10%;"
[ngClass]="{'green': item.verifyState == '1'||item.verifyState == '4','red':item.verifyState == '2'||item.verifyState == '5'}">
{{item.verifyState=='0'?'待初审':item.verifyState=='1'?
'初审通过':item.verifyState=='2'?'初审驳回':item.verifyState=='3'?'待终审':item.verifyState=='4'?'终审通过':'终审驳回'}}
</td>
<td style="width: 10%;">{{item.creatorName}}</td>
<td style="width: 15%;">{{item.createTime|date:'yyyy-MM-dd'}}</td>
</tr>
</table>
</div>
</div>
</div>
<div class="boxright">
<div class="company" *ngIf="showtype == 3">
<mat-tab-group *ngIf="showtype == 3" style="flex: 1;overflow-y: auto;margin-top: 10px;" [selectedIndex]="selected.value" (selectedIndexChange)="selected.setValue($event)">
<mat-tab label="基本信息">
<ng-template matTabContent>
<app-basic-info></app-basic-info>
</ng-template>
</mat-tab>
<mat-tab label="平面图">
<ng-template matTabContent>
<app-plan-list [planType]="'all'"></app-plan-list>
</ng-template>
</mat-tab>
<mat-tab label="四周毗邻">
<ng-template matTabContent>
<app-allaround></app-allaround>
</ng-template>
</mat-tab>
<mat-tab label="消防设施">
<ng-template matTabContent>
<app-fire-facilities></app-fire-facilities>
</ng-template>
</mat-tab>
<mat-tab label="重点部位">
<ng-template matTabContent>
<app-key-site-look></app-key-site-look>
</ng-template>
</mat-tab>
<mat-tab label="功能分区">
<ng-template matTabContent>
<app-function-partition></app-function-partition>
</ng-template>
</mat-tab>
<mat-tab label="实景图">
<ng-template matTabContent>
<app-realistic-picture-look></app-realistic-picture-look>
</ng-template>
</mat-tab>
<mat-tab label="CAD">
<ng-template matTabContent>
<app-cad-draw></app-cad-draw>
</ng-template>
</mat-tab>
</mat-tab-group>
</div>
<div class="boxright">
<div class="company" *ngIf="showtype == 3">
<mat-tab-group *ngIf="showtype == 3" style="flex: 1;overflow-y: auto;margin-top: 10px;"
[selectedIndex]="selected.value" (selectedIndexChange)="selected.setValue($event)">
<mat-tab label="基本信息">
<ng-template matTabContent>
<app-basic-info></app-basic-info>
</ng-template>
</mat-tab>
<mat-tab label="平面图">
<ng-template matTabContent>
<app-plan-list [planType]="'all'"></app-plan-list>
</ng-template>
</mat-tab>
<mat-tab label="四周毗邻">
<ng-template matTabContent>
<app-allaround></app-allaround>
</ng-template>
</mat-tab>
<mat-tab label="消防设施">
<ng-template matTabContent>
<app-fire-facilities></app-fire-facilities>
</ng-template>
</mat-tab>
<mat-tab label="重点部位">
<ng-template matTabContent>
<app-key-site-look></app-key-site-look>
</ng-template>
</mat-tab>
<mat-tab label="功能分区">
<ng-template matTabContent>
<app-function-partition></app-function-partition>
</ng-template>
</mat-tab>
<mat-tab label="实景图">
<ng-template matTabContent>
<app-realistic-picture-look></app-realistic-picture-look>
</ng-template>
</mat-tab>
<mat-tab label="CAD">
<ng-template matTabContent>
<app-cad-draw></app-cad-draw>
</ng-template>
</mat-tab>
</mat-tab-group>
</div>
<div class="word" *ngIf="showtype==0">
<div class="shadow" *ngIf="!iftrue">
<mat-spinner></mat-spinner>
</div>
<div class="word" *ngIf="showtype==0">
<div class="shadow" *ngIf="!iftrue">
<mat-spinner></mat-spinner>
</div>
<button mat-raised-button color="primary" style="float: right;margin-top: 10px;margin-right: 15px;" *ngIf="showtype == 0||bianzhi" (click)='lookNew()'>查看详情</button>
<iframe [src]='iframeSrc' (load)='ifranmeLoad()' id="myiframe"></iframe>
</div>
<div id="viewer" *ngIf="showtype==1"></div>
<div class="twoD" *ngIf="showtype==2">
<div class="planBox">
<span>单位名称: </span>
<span>{{compantData.name?compantData.name : '暂无数据'}}</span>
</div>
<div class="planBox">
<span>消防救援站: </span>
<span>{{organizationName}}</span>
</div>
<div class="planBox">
<span>单位类型: </span>
<span>{{compantData.buildingTypes.length?compantData.buildingTypes[0].name : '暂无数据'}}</span>
</div>
<div class="planBox">
<span>单位地址: </span>
<span>{{compantData.address?compantData.address : '暂无数据'}}</span>
</div>
<div class="planBox">
<span style="color: #2196F3;cursor:pointer;" (click)='oopen3Dshow()'>查看详情</span>
</div>
</div>
<!-- 水源审核 -->
<div class="waterAudit" *ngIf="showtype == 12">
<app-water-audit [waterData]="waterData"></app-water-audit>
</div>
<!-- 消防力量审核 -->
<div class="fireForceAudit" *ngIf="showtype == 13">
<app-fireforce-audit [FireForceDetailInfo]="fireForceDetailInfo" [level]="postlevel"></app-fireforce-audit>
</div>
<!-- 联动力量审核 -->
<div class="LinkageForcesAudit" *ngIf="showtype == 14">
<app-linkageforces-audit [LinkageForceDetailInfo]="LinkageForceDetailInfo"></app-linkageforces-audit>
</div>
<button mat-raised-button color="primary" style="float: right;margin-top: 10px;margin-right: 15px;"
*ngIf="showtype == 0||bianzhi" (click)='lookNew()'>查看详情</button>
<iframe [src]='iframeSrc' (load)='ifranmeLoad()' id="myiframe"></iframe>
</div>
<div id="viewer" *ngIf="showtype==1"></div>
<div class="twoD" *ngIf="showtype==2">
<div class="planBox">
<span>单位名称: </span>
<span>{{compantData.name?compantData.name : '暂无数据'}}</span>
</div>
<div class="planBox">
<span>消防救援站: </span>
<span>{{organizationName}}</span>
</div>
<div class="planBox">
<span>单位类型: </span>
<span>{{compantData.buildingTypes.length?compantData.buildingTypes[0].name : '暂无数据'}}</span>
</div>
<div class="planBox">
<span>单位地址: </span>
<span>{{compantData.address?compantData.address : '暂无数据'}}</span>
</div>
<div class="planBox">
<span style="color: #2196F3;cursor:pointer;" (click)='oopen3Dshow()'>查看详情</span>
</div>
</div>
<!-- 水源审核 -->
<div class="waterAudit" *ngIf="showtype == 12">
<app-water-audit [waterData]="waterData"></app-water-audit>
</div>
<!-- 消防力量审核 -->
<div class="fireForceAudit" *ngIf="showtype == 13">
<app-fireforce-audit [FireForceDetailInfo]="fireForceDetailInfo" [level]="postlevel"></app-fireforce-audit>
</div>
<!-- 联动力量审核 -->
<div class="LinkageForcesAudit" *ngIf="showtype == 14">
<app-linkageforces-audit [LinkageForceDetailInfo]="LinkageForceDetailInfo"></app-linkageforces-audit>
</div>
</div>
</div>
</div>

711
src/app/plan-audit/plan-record/plan-record.component.scss

@ -1,334 +1,421 @@
.box{
.box {
height: 100%;
width: 100%;
display: flex;
.boxleft {
height: 100%;
width: 100%;
width: 45%;
overflow-y: auto;
background-color: #FFFFFF;
display: flex;
.boxleft{
height: 100%;
width: 45%;
overflow-y: auto;
background-color: #FFFFFF;
flex-direction: column;
.lefthead {
display: flex;
flex-direction: column;
.headdiv {
@media screen and (min-device-width:1400px) {
margin: 30px 0 0 28px;
}
@media screen and (max-device-width:1200px) {
margin-top: 10px;
}
@media screen and (max-device-width:1400px) and (min-device-width:1200px) {
margin: 20px 0 0 15px;
}
height: 40px;
display: flex;
flex-direction: column;
.lefthead{
display: flex;
flex-direction: column;
.headdiv{
@media screen and (min-device-width:1400px){
margin: 30px 0 0 28px;
}
@media screen and (max-device-width:1200px){
margin-top: 10px;
}
@media screen and (max-device-width:1400px) and (min-device-width:1200px){
margin: 20px 0 0 15px;
}
height: 40px;
display: flex;
flex-direction: row;
span{
@media screen and (min-device-width:1400px){
font-size: 16px;
}
@media screen and (max-device-width:1200px){
font-size: 13px;
}
@media screen and (max-device-width:1400px) and (min-device-width:1200px){
font-size: 16px;
}
margin-left: 3px;
}
input{
@media screen and (min-device-width:1400px){
margin-left: 50px;
top: 6px;
}
@media screen and (max-device-width:1200px){
margin-left: 12px;
top: 3px;
}
@media screen and (max-device-width:1400px) and (min-device-width:1200px){
margin-left: 12px;
top: 6px;
}
position: relative;
}
.count{
@media screen and (min-device-width:1400px){
margin-left: 110px;
}
@media screen and (max-device-width:1200px){
margin-left: 20px;
position: relative;
bottom: 4px;
}
@media screen and (max-device-width:1400px) and (min-device-width:1200px){
margin-left: 20px;
}
}
}
.headdivtwo{
@media screen and (min-device-width:1400px){
margin: 0 0 0 28px;
}
@media screen and (max-device-width:1200px){
margin-left: 0;
}
@media screen and (max-device-width:1400px) and (min-device-width:1200px){
margin: 0 0 0 15px;
}
//height: 40px;
display: flex;
flex-direction: row;
span{
@media screen and (min-device-width:1200px){
font-size: 16px;
}
@media screen and (max-device-width:1200px){
font-size: 13px;
}
margin-left: 3px;
}
input{
@media screen and (min-device-width:1400px){
margin-left: 50px;
top: 5px;
}
@media screen and (max-device-width:1200px){
margin-left: 0;
top: 3px;
}
@media screen and (max-device-width:1400px) and (min-device-width:1200px){
margin-left: 0;
top: 5px;
}
position: relative;
left: 2px;
}
.count{
@media screen and (min-device-width:1400px){
margin-left: 110px;
}
@media screen and (max-device-width:1400px){
margin-left: 20px;
}
}
}
.headthree{
height: 45px;
@media screen and (min-device-width:1400px){
margin-left: 30px;
}
@media screen and (max-device-width:1200px){
font-size: 13px;
mat-form-field{
width: 50px;
}
}
@media screen and (max-device-width:1400px) and (min-device-width:1200px){
margin-left: 15px;
mat-form-field{
width: 50px;
}
}
}
.headfour{
@media screen and (max-device-width:1200px){
font-size: 13px;
mat-form-field{
width: 80px;
}
}
@media screen and (max-device-width:1400px) and (min-device-width:1200px){
margin-left: 15px;
mat-form-field{
width: 80px;
}
}
@media screen and (min-device-width:1400px){
margin-left: 30px;
}
span{
@media screen and (min-device-width:1400px){
//margin-left: 30px;
}
}
button{
@media screen and (min-device-width:1400px){
margin-left: 40px;
font-size: 16px;
width: 80px;
height: 36px;
}
@media screen and (max-device-width:1200px){
margin-left: 80px;
}
@media screen and (max-device-width:1400px) and (min-device-width:1200px){
margin-left: 80px;
}
}
img{
@media screen and (max-device-width:1400px) and (min-device-width:1200px){
height: 14px;
width: 14px;
}
@media screen and (min-device-width:1400px){
height: 14px;
width: 14px;
}
@media screen and (max-device-width:1200px){
height: 12px;
width: 12px;
}
}
}
align-items: center;
flex-direction: row;
span {
@media screen and (min-device-width:1400px) {
font-size: 16px;
}
@media screen and (max-device-width:1200px) {
font-size: 13px;
}
@media screen and (max-device-width:1400px) and (min-device-width:1200px) {
font-size: 16px;
}
margin-left: 3px;
}
.tablediv{
width: 100%;
height: 100%;
padding-bottom: 20px;
.tbodycss{
//overflow-y: auto;
@media screen and (min-device-width:1400px){
overflow-y: auto;
}
height:550px;
width: 100%;
.selectedTr{
background-color: #b3d3ee;
}
}
table{
//margin: 20px 20px;
margin-left: 10px;
margin-right: 10px;
width: 97.5%;
//border: 1px solid #2196F3;
thead{
height:48px;
color: #FFFFFF;
background-color: #2196F3;
//font-size: 16px;
th{
font-weight:10;
@media screen and (min-device-width:1200px){
font-size: 16px;
}
@media screen and (max-device-width:1200px){
font-size: 13px;
}
}
}
tr:nth-child(odd){
background: #FAFAFA;
}
}
input {
@media screen and (min-device-width:1400px) {
margin-left:40px;
}
@media screen and (max-device-width:1200px) {
margin-left: 12px;
}
@media screen and (max-device-width:1400px) and (min-device-width:1200px) {
margin-left: 12px;
}
position: relative;
}
}
.boxright{
height: 100%;
width: 53%;
flex: 1;
background-color: #FFFFFF;
margin-left: 10px;
.count {
@media screen and (min-device-width:1400px) {
margin-left: 110px;
}
@media screen and (max-device-width:1200px) {
margin-left: 20px;
position: relative;
bottom: 4px;
}
@media screen and (max-device-width:1400px) and (min-device-width:1200px) {
margin-left: 20px;
}
}
}
.headdivtwo {
@media screen and (min-device-width:1400px) {
margin: 0 0 0 28px;
}
@media screen and (max-device-width:1200px) {
margin-left: 0;
}
@media screen and (max-device-width:1400px) and (min-device-width:1200px) {
margin: 0 0 0 15px;
}
//height: 40px;
display: flex;
flex-direction: column;
@media screen and (max-device-width:1300px){
overflow-y: auto;
flex-direction: row;
align-items: center;
span {
@media screen and (min-device-width:1200px) {
font-size: 16px;
}
@media screen and (max-device-width:1200px) {
font-size: 13px;
}
margin-left: 3px;
}
.company{
@media screen and (min-device-width:1300px){
overflow-y: auto;
}
flex: 1;
//overflow-y: auto;
margin-top: 10px;
input {
@media screen and (min-device-width:1400px) {
margin-left: 40px;
}
@media screen and (max-device-width:1200px) {
margin-left: 0;
}
@media screen and (max-device-width:1400px) and (min-device-width:1200px) {
margin-left: 0;
}
position: relative;
left: 2px;
}
.word{
width: 100%;
height: 100%;
.shadow{
height: 95%;
width: 97%;
margin: 10px 10px 10px 10px;
/* position:absolute;
left:0;
top:0; */
z-index:998;
background-color:#FFFFFF;
opacity:0.6;
mat-spinner{
position: relative;
top: 40%;
left: 40%;
}
.count {
@media screen and (min-device-width:1400px) {
margin-left: 110px;
}
@media screen and (max-device-width:1400px) {
margin-left: 20px;
}
}
}
.headthree {
height: 45px;
@media screen and (min-device-width:1400px) {
margin-left: 30px;
}
@media screen and (max-device-width:1200px) {
font-size: 13px;
mat-form-field {
width: 50px;
}
}
@media screen and (max-device-width:1400px) and (min-device-width:1200px) {
margin-left: 15px;
mat-form-field {
width: 50px;
}
}
}
.headfour {
@media screen and (max-device-width:1200px) {
font-size: 13px;
mat-form-field {
width: 80px;
}
}
@media screen and (max-device-width:1400px) and (min-device-width:1200px) {
margin-left: 15px;
mat-form-field {
width: 80px;
}
}
@media screen and (min-device-width:1400px) {
margin-left: 30px;
}
span {
@media screen and (min-device-width:1400px) {
//margin-left: 30px;
}
}
button {
@media screen and (min-device-width:1400px) {
margin-left: 40px;
font-size: 16px;
width: 80px;
height: 36px;
}
@media screen and (max-device-width:1200px) {
margin-left: 80px;
}
@media screen and (max-device-width:1400px) and (min-device-width:1200px) {
margin-left: 80px;
}
}
img {
@media screen and (max-device-width:1400px) and (min-device-width:1200px) {
height: 14px;
width: 14px;
}
@media screen and (min-device-width:1400px) {
height: 14px;
width: 14px;
}
@media screen and (max-device-width:1200px) {
height: 12px;
width: 12px;
}
}
}
}
.tablediv {
width: 100%;
height: 100%;
padding-bottom: 20px;
.tbodycss {
//overflow-y: auto;
@media screen and (min-device-width:1400px) {
overflow-y: auto;
}
height:550px;
width: 100%;
.selectedTr {
background-color: #b3d3ee;
}
}
table {
//margin: 20px 20px;
margin-left: 10px;
margin-right: 10px;
width: 97.5%;
//border: 1px solid #2196F3;
thead {
height: 48px;
color: #FFFFFF;
background-color: #2196F3;
//font-size: 16px;
th {
font-weight: 10;
@media screen and (min-device-width:1200px) {
font-size: 16px;
}
iframe{
height: 94%;
width: 97%;
margin: 10px 10px 10px 10px;
overflow-y: auto;
border: medium none;
@media screen and (max-device-width:1200px) {
font-size: 13px;
}
}
}
#viewer{
margin: 30px 10px 10px 10px;
width: 97%;
height: 94%;
tr:nth-child(odd) {
background: #FAFAFA;
}
.waterAudit,.fireForceAudit,.LinkageForcesAudit{
flex: 1;
width: 100%;
height: 100%;
box-sizing: border-box;
}
}
}
.boxright {
height: 100%;
width: 53%;
flex: 1;
background-color: #FFFFFF;
margin-left: 10px;
display: flex;
flex-direction: column;
@media screen and (max-device-width:1300px) {
overflow-y: auto;
}
.company {
@media screen and (min-device-width:1300px) {
overflow-y: auto;
}
flex: 1;
//overflow-y: auto;
margin-top: 10px;
}
.word {
width: 100%;
height: 100%;
.shadow {
height: 95%;
width: 97%;
margin: 10px 10px 10px 10px;
/* position:absolute;
left:0;
top:0; */
z-index: 998;
background-color: #FFFFFF;
opacity: 0.6;
mat-spinner {
position: relative;
top: 40%;
left: 40%;
}
}
iframe {
height: 94%;
width: 97%;
margin: 10px 10px 10px 10px;
overflow-y: auto;
border: medium none;
}
}
}
th,td{
height:48px;
@media screen and (min-device-width:1200px){
font-size: 16px;
#viewer {
margin: 30px 10px 10px 10px;
width: 97%;
height: 94%;
}
@media screen and (max-device-width:1200px){
font-size: 13px;
.waterAudit,
.fireForceAudit,
.LinkageForcesAudit {
flex: 1;
width: 100%;
height: 100%;
box-sizing: border-box;
}
text-align: center;
}
}
th,
td {
height: 48px;
@media screen and (min-device-width:1200px) {
font-size: 16px;
}
@media screen and (max-device-width:1200px) {
font-size: 13px;
}
text-align: center;
}
.green{color: #00C756;}
.red{color: #FF4D4D;}
.yellow{color: #FFC94B;}
.green {
color: #00C756;
}
.red {
color: #FF4D4D;
}
.yellow {
color: #FFC94B;
}
.twoD {
width: 100%;
box-sizing: border-box;
display: flex;
flex-direction: column;
align-items: left;
.planBox {
margin: 30px 30px;
color: black;
:first-child {margin-right: 10px;}
width: 100%;
box-sizing: border-box;
display: flex;
flex-direction: column;
align-items: left;
.planBox {
margin: 30px 30px;
color: black;
:first-child {
margin-right: 10px;
}
}
}
//滚动条样式
::-webkit-scrollbar{
margin-right: 3px;
width: 6px;
background-color: white;
}
::-webkit-scrollbar-thumb{
background-color: #2196F3;
}
.mat-form-field-infix{
width: 100px;
}
::-webkit-scrollbar {
margin-right: 3px;
width: 6px;
background-color: white;
}
::-webkit-scrollbar-thumb {
background-color: #2196F3;
}
.mat-form-field-infix {
width: 100px;
}

472
src/app/plan-audit/plan-record/plan-record.component.ts

@ -1,99 +1,97 @@
/*
* @Descripttion:
* @version:
* @Author: sueRimn
* @Date: 2020-12-25 10:19:31
* @LastEditors: sueRimn
* @LastEditTime: 2021-08-16 15:29:41
*/
import { Component, OnInit, Inject } from '@angular/core';
import { FormControl } from '@angular/forms';
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
import { HttpClient } from '@angular/common/http'
import { DomSanitizer } from '@angular/platform-browser';
import { Viewer } from 'photo-sphere-viewer';
declare var CryptoJS
import { Component, OnInit, Inject } from "@angular/core";
import { FormControl } from "@angular/forms";
import { MatSnackBar, MatSnackBarConfig } from "@angular/material/snack-bar";
import {
MatDialog,
MatDialogRef,
MAT_DIALOG_DATA,
} from "@angular/material/dialog";
import { HttpClient } from "@angular/common/http";
import { DomSanitizer } from "@angular/platform-browser";
import { Viewer } from "photo-sphere-viewer";
declare var CryptoJS;
@Component({
selector: 'app-plan-record',
templateUrl: './plan-record.component.html',
styleUrls: ['./plan-record.component.scss']
selector: "app-plan-record",
templateUrl: "./plan-record.component.html",
styleUrls: ["./plan-record.component.scss"],
})
export class PlanRecordComponent implements OnInit {
constructor(
private http: HttpClient,
public snackBar: MatSnackBar,
private sanitizer: DomSanitizer,
public dialog: MatDialog
) {}
constructor(private http: HttpClient, public snackBar: MatSnackBar, private sanitizer: DomSanitizer, public dialog: MatDialog) { }
pcshow
pcshow;
ngOnInit(): void {
if (window.matchMedia("(max-width: 1300px)").matches) {
this.pcshow = false
this.pcshow = false;
} else {
this.pcshow = true
this.pcshow = true;
}
let level = sessionStorage.getItem("level");
if (level == "0") {//如果是总队
if (level == "0") {
//如果是总队
this.preparelevels = [
{ name: "总队", value: "0" },
{ name: "支队", value: "1" },
{ name: "大队", value: "2" },
{ name: "中队", value: "3" }
]
{ name: "中队", value: "3" },
];
}
if (level == "1") {//如果是支队
if (level == "1") {
//如果是支队
this.preparelevels = [
{ name: "支队", value: "1" },
{ name: "大队", value: "2" },
{ name: "中队", value: "3" }
]
{ name: "中队", value: "3" },
];
}
if (level == "2") {//如果是大队
if (level == "2") {
//如果是大队
this.preparelevels = [
{ name: "大队", value: "2" },
{ name: "中队", value: "3" }
]
{ name: "中队", value: "3" },
];
}
if (level == "3") {//如果是中队
this.preparelevels = [
{ name: "中队", value: "3" }
]
if (level == "3") {
//如果是中队
this.preparelevels = [{ name: "中队", value: "3" }];
}
this.iframeSrc = this.sanitizer.bypassSecurityTrustResourceUrl(this.src);
this.getAlltabledate()
this.getAlltabledate();
}
wordShow = true
iframeSrc
src = ''
wordShow = true;
iframeSrc;
src = "";
selected = new FormControl(0); //选项卡 实例
preparelevels: any
level = ''//类型
verifyState = ''//审核状态
projectlevel//组织机构
PlanLevel//编制级别
addtime//时间
endtime//结束时间
count//一共多少条
tableDate
showPvt = false//全景图是否显示
shenheTable = []//选中要审核的对象
chuorzhong//判断初审还是终审
radioid//选中的id
showtype = -1//0:word,1:全景图,2:二维三维,3:重点单位
compantData = { name: '', buildingTypes: [], address: '' }
organizationName
planData
id
itemid
companyId
fetchUrl
companyName
plantypes
IsNewData = [true, false]
preparelevels: any;
level = ""; //类型
verifyState = ""; //审核状态
projectlevel; //组织机构
PlanLevel; //编制级别
addtime; //时间
endtime; //结束时间
count; //一共多少条
tableDate;
showPvt = false; //全景图是否显示
shenheTable = []; //选中要审核的对象
chuorzhong; //判断初审还是终审
radioid; //选中的id
showtype = -1; //0:word,1:全景图,2:二维三维,3:重点单位
compantData = { name: "", buildingTypes: [], address: "" };
organizationName;
planData;
id;
itemid;
companyId;
fetchUrl;
companyName;
plantypes;
IsNewData = [true, false];
//获取表格数据
getAlltabledate() {
@ -102,238 +100,262 @@ export class PlanRecordComponent implements OnInit {
ContentType: Number(this.projectlevel) || [],
Level: this.PlanLevel || [],
verifyState: this.verifyState || [1, 2, 4, 5],
QueryStartTime: this.addtime || '',
QueryEndTime: this.endtime || '',
QueryStartTime: this.addtime || "",
QueryEndTime: this.endtime || "",
PlanType: this.plantypes || [],
IsNewData: this.IsNewData
}
this.http.get("/api/ContentVerifies", { params: paramsdata }).subscribe((data: any) => {
//console.log(data)
this.tableDate = data.items
this.count = data.totalCount
})
IsNewData: this.IsNewData,
};
this.http
.get("/api/ContentVerifies", { params: paramsdata })
.subscribe((data: any) => {
//console.log(data)
this.tableDate = data.items;
this.count = data.totalCount;
});
}
//提交查询
onSubmit(value) {
//console.log(value)
this.getAlltabledate()
this.getAlltabledate();
}
//刷新
record() {
this.verifyState = ''
this.level = ''
this.projectlevel = ''
this.addtime = ''
this.endtime = ''
this.verifyState = "";
this.level = "";
this.projectlevel = "";
this.addtime = "";
this.endtime = "";
let level = sessionStorage.getItem("level");
this.PlanLevel = ''
this.plantypes = []
this.getAlltabledate()
this.PlanLevel = "";
this.plantypes = [];
this.getAlltabledate();
}
//表格点击事件
viewer//全景图对象
waterData: any//需要传递给子组件的水源信息
LinkageForceDetailInfo: any//需要传递给子组件的联动力量信息
fireForceDetailInfo: any//需要传递给子组件的消防力量信息
postlevel: any
bianzhi = false
viewer; //全景图对象
waterData: any; //需要传递给子组件的水源信息
LinkageForceDetailInfo: any; //需要传递给子组件的联动力量信息
fireForceDetailInfo: any; //需要传递给子组件的消防力量信息
postlevel: any;
bianzhi = false;
tableClick(e, item) {
this.showtype = -1
this.showtype = -1;
//e.target.parentElement.bgColor='#2196F3'
// console.log(item)
this.organizationName = ''
this.itemid = item.itemId
this.id = item.id
this.fetchUrl = ''
this.viewer = {}
this.organizationName = "";
this.itemid = item.itemId;
this.id = item.id;
this.fetchUrl = "";
this.viewer = {};
if (item.contentType == 11) {
this.bianzhi = false
this.bianzhi = false;
window.setTimeout(() => {
this.showtype = 3
sessionStorage.setItem('companyId', item.itemId)
}, 0)
this.showtype = 3;
sessionStorage.setItem("companyId", item.itemId);
}, 0);
} else if (item.contentType == 12) {
this.bianzhi = false
this.bianzhi = false;
//水源
this.http.get(`/api/WaterSources/${item.itemId}`).subscribe((data) => {
this.waterData = data
this.showtype = 12
})
this.waterData = data;
this.showtype = 12;
});
} else if (item.contentType == 13) {
this.bianzhi = false
this.bianzhi = false;
//消防力量
this.http.get(`/api/CustomFireForce/${item.itemId}`).subscribe((data: any) => {
if (data.forceType != 0) {//如果是其他消防力量
this.postlevel = 4
} else {
this.postlevel = data.level
}
// console.log('xxx',data)
data.fireForceDetailInfo.location ? null : data.fireForceDetailInfo.location = { x: null, y: null }
this.fireForceDetailInfo = data.fireForceDetailInfo
this.showtype = 13
})
this.http
.get(`/api/CustomFireForce/${item.itemId}`)
.subscribe((data: any) => {
if (data.forceType != 0) {
//如果是其他消防力量
this.postlevel = 4;
} else {
this.postlevel = data.level;
}
// console.log('xxx',data)
data.fireForceDetailInfo.location
? null
: (data.fireForceDetailInfo.location = { x: null, y: null });
this.fireForceDetailInfo = data.fireForceDetailInfo;
this.showtype = 13;
});
} else if (item.contentType == 14) {
this.bianzhi = false
this.bianzhi = false;
//联动力量
this.http.get(`/api/LinkageForces/${item.itemId}`).subscribe((data: any) => {
data.location ? null : data.location = { x: null, y: null }
this.LinkageForceDetailInfo = data
this.showtype = 14
})
this.http
.get(`/api/LinkageForces/${item.itemId}`)
.subscribe((data: any) => {
data.location ? null : (data.location = { x: null, y: null });
this.LinkageForceDetailInfo = data;
this.showtype = 14;
});
} else {
this.http.get(`/api/PlanComponents/${item.itemId}`).subscribe((data: any) => {
this.companyId = data.companyId
this.companyName = data.companyName
//this.bianzhi = false
if (data.planType != 2 && data.planType != 1) {
if (data.planMode == 2) {
this.showtype = 0
this.bianzhi = true
this.src = `/CreatePlanOnlineFive?navIsOpen=false&companyId=${data.companyId}&planName=${data.name}&unitName=${data.companyName}&planCategory=${data.planCategory}&planId=${data.id}&unitTypeId=${data.company.buildingTypes[0].id}&orName=${data.company.organizationName}&orId=${data.company.organizationId}&pattern=false`
this.iframeSrc = this.sanitizer.bypassSecurityTrustResourceUrl(this.src);
//this.src=`/keyUnit/viewunitinfoplan?id=${data.companyId}&orName=${data.company.organizationId}&orId=${data.company.organizationName}`
} else {
this.bianzhi = false
this.fetchUrl = data.attachmentUrls[0]
var index = this.fetchUrl.indexOf("\/")
if (this.fetchUrl.substr(0, index) == 'psw') {
this.showtype = 1
var obj = document.getElementById('viewer')
if (obj != null) {
obj.innerHTML = ''
}
window.setTimeout(() => {
this.viewer = new Viewer({
container: document.querySelector('#viewer'),
panorama: '/api/Objects/PlanPlatform/' + this.fetchUrl,
});
})
this.http
.get(`/api/PlanComponents/${item.itemId}`)
.subscribe((data: any) => {
this.companyId = data.companyId;
this.companyName = data.companyName;
//this.bianzhi = false
if (data.planType != 2 && data.planType != 1) {
if (data.planMode == 2) {
this.showtype = 0;
this.bianzhi = true;
this.src = `/CreatePlanOnlineFive?navIsOpen=false&companyId=${data.companyId}&planName=${data.name}&unitName=${data.companyName}&planCategory=${data.planCategory}&planId=${data.id}&unitTypeId=${data.company.buildingTypes[0].id}&orName=${data.company.organizationName}&orId=${data.company.organizationId}&pattern=false`;
this.iframeSrc = this.sanitizer.bypassSecurityTrustResourceUrl(
this.src
);
//this.src=`/keyUnit/viewunitinfoplan?id=${data.companyId}&orName=${data.company.organizationId}&orId=${data.company.organizationName}`
} else {
this.lookWord()
this.bianzhi = false;
this.fetchUrl = data.attachmentUrls[0];
var index = this.fetchUrl.indexOf("/");
if (this.fetchUrl.substr(0, index) == "psw") {
this.showtype = 1;
var obj = document.getElementById("viewer");
if (obj != null) {
obj.innerHTML = "";
}
window.setTimeout(() => {
this.viewer = new Viewer({
container: document.querySelector("#viewer"),
panorama: "/api/Objects/PlanPlatform/" + this.fetchUrl,
});
});
} else {
this.lookWord();
}
}
}
} else {
this.organizationName = item.organizationName
this.planData = data
this.handleData()
return
//this.src=`/planAudit/planpass?id=${data.companyId}&companyName=${data.companyName}&auditPlanId=${data.id}&auditStatus=${data.auditStatus}&planType=1`
//this.iframeSrc=this.sanitizer.bypassSecurityTrustResourceUrl(this.src);
//window.open(`/planAudit/planpass?id=${data.companyId}&companyName=${data.companyName}&auditPlanId=${data.id}&auditStatus=${data.auditStatus}&planType=1`)
}
} else {
this.organizationName = item.organizationName;
this.planData = data;
this.handleData();
return;
})
//this.src=`/planAudit/planpass?id=${data.companyId}&companyName=${data.companyName}&auditPlanId=${data.id}&auditStatus=${data.auditStatus}&planType=1`
//this.iframeSrc=this.sanitizer.bypassSecurityTrustResourceUrl(this.src);
//window.open(`/planAudit/planpass?id=${data.companyId}&companyName=${data.companyName}&auditPlanId=${data.id}&auditStatus=${data.auditStatus}&planType=1`)
}
});
}
if (e.checked) {
this.shenheTable.push(item)
}
else {
this.shenheTable.push(item);
} else {
for (var i = 0; i < this.shenheTable.length; i++) {
if (this.shenheTable[i].id == item.id) {
this.shenheTable.splice(i, 1)
this.shenheTable.splice(i, 1);
}
}
}
this.radioid = item.itemId
this.radioid = item.itemId;
/* this.chuorzhong=item.verifyState
this.radioid=item.itemId */
}
//毕升
lookWord() {
this.showtype = 0
let suffix = this.fetchUrl.split('.')[this.fetchUrl.split('.').length - 1].toLowerCase()
if (suffix == 'docx' || suffix == 'doc') {
let arr = this.fetchUrl.split('.')
arr[arr.length - 1] = 'pdf'
this.src = `/api/Objects/PlanPlatform/` + arr.join('.')
} else if (suffix == 'pdf') {
this.src = `/api/Objects/PlanPlatform/` + this.fetchUrl
this.showtype = 0;
let suffix = this.fetchUrl
.split(".")
[this.fetchUrl.split(".").length - 1].toLowerCase();
if (suffix == "docx" || suffix == "doc") {
let arr = this.fetchUrl.split(".");
arr[arr.length - 1] = "pdf";
this.src = `/api/Objects/PlanPlatform/` + arr.join(".");
} else if (suffix == "pdf") {
this.src = `/api/Objects/PlanPlatform/` + this.fetchUrl;
}
this.iframeSrc = this.sanitizer.bypassSecurityTrustResourceUrl(this.src);
}
//查看按钮跳转
lookNew() {
window.open(this.src)
window.open(this.src);
}
//查看二维三维预案
thirdPartyURL
planType
twoOrthree
thirdPartyURL;
planType;
twoOrthree;
handleData() {
console.log(this.planData)
this.compantData = { name: '', buildingTypes: [], address: '' }
this.planType = this.planData.planMode
let data = this.planData
console.log(this.planData);
this.compantData = { name: "", buildingTypes: [], address: "" };
this.planType = this.planData.planMode;
let data = this.planData;
if (data.planType == 1) {
this.twoOrthree = 2
this.twoOrthree = 2;
} else if (data.planType == 2) {
this.twoOrthree = 3
this.twoOrthree = 3;
}
if (this.planData.planMode == 0) { //预案planMode=0时, 查看word
if (this.planData.planMode == 0) {
//预案planMode=0时, 查看word
//this.lookWord()
} else if (this.planData.planMode == 1 || this.planData.planMode == 2) { //预案planMode=2时, 跳查看页面组件
this.showtype = 2
} else if (this.planData.planMode == 1 || this.planData.planMode == 2) {
//预案planMode=2时, 跳查看页面组件
this.showtype = 2;
this.http.get(`/api/Plans/${data.companyId}`).subscribe((data: any) => {
data && data.company ? this.compantData = data.company : null
})
sessionStorage.setItem("buildingTypeId", this.compantData.buildingTypes.length ? this.compantData.buildingTypes[0].id : undefined);
data && data.company ? (this.compantData = data.company) : null;
});
sessionStorage.setItem(
"buildingTypeId",
this.compantData.buildingTypes.length
? this.compantData.buildingTypes[0].id
: undefined
);
sessionStorage.setItem("companyId", this.companyId);
sessionStorage.setItem("planId", this.itemid);
sessionStorage.setItem("editable", '0');
sessionStorage.setItem("planName", data.name)
let companyId = sessionStorage.getItem("companyId")
this.thirdPartyURL = this.sanitizer.bypassSecurityTrustResourceUrl(`/keyUnit/viewunitinfoplans?id=${companyId}`);
sessionStorage.setItem("editable", "0");
sessionStorage.setItem("planName", data.name);
let companyId = sessionStorage.getItem("companyId");
this.thirdPartyURL = this.sanitizer.bypassSecurityTrustResourceUrl(
`/keyUnit/viewunitinfoplans?id=${companyId}`
);
//window.open(`/keyUnit/viewunitinfoplan?id=${companyId}`)
} else if (this.planData.planMode == 3) { //预案planMode=3时, 第三方网址'
this.showtype = 2
} else if (this.planData.planMode == 3) {
//预案planMode=3时, 第三方网址'
this.showtype = 2;
this.http.get(`/api/Plans/${data.companyId}`).subscribe((data: any) => {
data && data.company ? this.compantData = data.company : null
})
data && data.company ? (this.compantData = data.company) : null;
});
//this.dialog.open(show3D,{width:'1350px',height:'700px',data:{url:data.url}}); //打开图片弹窗
this.thirdPartyURL = this.sanitizer.bypassSecurityTrustResourceUrl(data.url)
this.thirdPartyURL = this.sanitizer.bypassSecurityTrustResourceUrl(
data.url
);
}
}
//打开三维预案弹窗
oopen3Dshow() {
this.dialog.open(recordshow3D, { width: '1650px', height: '850px', data: { url: this.thirdPartyURL, twoOrthree: this.twoOrthree } });
this.dialog.open(recordshow3D, {
width: "1650px",
height: "850px",
data: { url: this.thirdPartyURL, twoOrthree: this.twoOrthree },
});
}
//判断iframe是否加载完成
iftrue = true
iftrue = true;
ifranmeLoad() {
var iframe = document.getElementById("myiframe");
iframe.onload = function () {
}
this.iftrue = !this.iftrue
iframe.onload = function () {};
this.iftrue = !this.iftrue;
}
}
@Component({
selector: 'app-wait-examineer-show3D',
templateUrl: './show3D.html',
styleUrls: ['./plan-record.component.scss']
selector: "app-wait-examineer-show3D",
templateUrl: "./show3D.html",
styleUrls: ["./plan-record.component.scss"],
})
export class recordshow3D {
constructor(private sanitizer: DomSanitizer, public dialogRef: MatDialogRef<recordshow3D>, @Inject(MAT_DIALOG_DATA) public data, public dialog: MatDialog) { }
constructor(
private sanitizer: DomSanitizer,
public dialogRef: MatDialogRef<recordshow3D>,
@Inject(MAT_DIALOG_DATA) public data,
public dialog: MatDialog
) {}
ngOnInit(): void {
// console.log(this.data)
this.threedUrl = this.sanitizer.bypassSecurityTrustResourceUrl(this.data.url.changingThisBreaksApplicationSecurity)
this.threedUrl = this.sanitizer.bypassSecurityTrustResourceUrl(
this.data.url.changingThisBreaksApplicationSecurity
);
}
threedUrl
threedUrl;
}

Loading…
Cancel
Save