沈斌
2018-07-13 039eeabbee09454b7747b2386ecc7993b5b926dc
updates
1 files modified
143 ■■■■ changed files
src/app/routes/reports/query/query.component.html 143 ●●●● patch | view | raw | blame | history
src/app/routes/reports/query/query.component.html
@@ -116,76 +116,73 @@
        </a>
    </div>
</nz-card>
<nz-card>
    <div nz-row [nzGutter]="16">
        <div nz-col [nzMd]="24">
            <div style="width:100%; text-align:center;">
                <span style="font-size:18px; font-weight: bold;">{{ _tableTitleTemp }}</span>
            </div>
        </div>
    </div>
    <div nz-row [nzGutter]="16">
        <div nz-col [nzMd]="24">
            <nz-table #nzTable [nzScroll]="{ x:tableWidth,y:350 }" [nzDataSource]="grid.data" [nzIsPagination]="false" [nzLoading]="grid.loading">
                <ng-template #nzFixedHeader>
                    <thead nz-thead>
                        <tr>
                            <th nz-th [nzWidth]="'160px'" [ngStyle]="{'position': 'relative', 'text-align':'center', 'left':sensorNameScrollLeft+'px'}">
                                <span>监测项目</span>
                            </th>
                            <th nz-th [nzWidth]="'80px'" *ngFor="let col of grid.columns" [ngStyle]="{'width':col.width,'text-align':col['align'] === undefined?'left':col.align}">
                                <span>{{ col.text }}</span>
                            </th>
                        </tr>
                    </thead>
                </ng-template>
                <tbody nz-tbody>
                    <tr nz-tbody-tr style="cursor:pointer;" *ngFor="let row of nzTable.data,index as i" (click)="switchSensor(i)" (mouseover)="sensorTableFocus(i)"
                        (mouseout)="sensorTableBlur(i)" [ngClass]="{'table-tr-bgcolor-focus': i === sensorTableFocusIndex,'table-tr-bgcolor-blur': i !== sensorTableFocusIndex}">
                        <td nz-td class='sensor-name' [ngStyle]="{'background-color': '#FFF'}">
                            <span>
                                <span>{{ row.sensor.name+'('+row.sensor.unit+')' }}</span>&nbsp;
                                <i *ngIf="chartSelectedIndex==i" class="anticon anticon-line-chart"></i>
                            </span>
                        </td>
                        <td nz-td *ngFor="let col of grid.columns,index as n" [ngStyle]="{'width':col.width,'text-align':col['align'] === undefined?'left':col.align}">
                            <span [ngSwitch]="col.type">
                                <!-- 要使用管道,无法自动生成 -->
                                <span title="{{ row.data[n]|tyepHandle:col:row }}" style="width:100%; display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;"
                                    *ngSwitchDefault> {{ row.data[n]|tyepHandle:col:row }} </span>
                                <!-- 要使用管道,无法自动生成 -->
                            </span>
                        </td>
                    </tr>
                </tbody>
            </nz-table>
            <!--
            <div *ngIf="grid.data.length>0" [ngClass]="{'table-scroll':true,'table-scroll-box-shadow': sensorNameScrollLeft>2 }" style="position: absolute; top:0;">
                <nz-table #nzTable [nzDataSource]="grid.data" [nzIsPagination]="false">
                    <thead nz-thead>
                        <tr>
                            <th nz-th [nzWidth]="'160px'" style="text-align:center; position:relative; display:block; z-index:9;">
                                <span>监测项目</span>
                            </th>
                        </tr>
                    </thead>
                    <tbody nz-tbody [ngStyle]="{'top':sensorNameScrollTop+'px'}" style="position: relative; z-index:7; display:block;">
                        <tr nz-tbody-tr style="cursor:pointer;" *ngFor="let row of nzTable.data,index as i" (mouseover)="sensorTableFocus(i)" (mouseout)="sensorTableBlur(i)"
                            [ngClass]="{'table-tr-bgcolor-focus': i === sensorTableFocusIndex,'table-tr-bgcolor-blur': i !== sensorTableFocusIndex}"
                            (click)="switchSensor(i)">
                            <td nz-td class='sensor-name' [ngStyle]="{'width':'160px','text-align': 'center'}">
                                <span>
                                    <span>{{ row.sensor.name+'('+row.sensor.unit+')' }}</span>&nbsp;
                                    <i *ngIf="chartSelectedIndex==i" class="anticon anticon-line-chart"></i>
                                </span>
                            </td>
                        </tr>
                    </tbody>
                </nz-table>
            </div>
            -->
        </div>
    </div>
</nz-card>
<!--<nz-card>-->
    <!--<div nz-row [nzGutter]="16">-->
        <!--<div nz-col [nzMd]="24">-->
            <!--<div style="width:100%; text-align:center;">-->
                <!--<span style="font-size:18px; font-weight: bold;">{{ _tableTitleTemp }}</span>-->
            <!--</div>-->
        <!--</div>-->
    <!--</div>-->
    <!--<div nz-row [nzGutter]="16">-->
        <!--<div nz-col [nzMd]="24">-->
            <!--<nz-table #nzTable [nzScroll]="{ x:tableWidth,y:350 }" [nzDataSource]="grid.data" [nzIsPagination]="false" [nzLoading]="grid.loading">-->
                <!--<ng-template #nzFixedHeader>-->
                    <!--<thead nz-thead>-->
                        <!--<tr>-->
                            <!--<th nz-th [nzWidth]="'160px'" [ngStyle]="{'position': 'relative', 'text-align':'center', 'left':sensorNameScrollLeft+'px'}">-->
                                <!--<span>监测项目</span>-->
                            <!--</th>-->
                            <!--<th nz-th [nzWidth]="'80px'" *ngFor="let col of grid.columns" [ngStyle]="{'width':col.width,'text-align':col['align'] === undefined?'left':col.align}">-->
                                <!--<span>{{ col.text }}</span>-->
                            <!--</th>-->
                        <!--</tr>-->
                    <!--</thead>-->
                <!--</ng-template>-->
                <!--<tbody nz-tbody>-->
                    <!--<tr nz-tbody-tr style="cursor:pointer;" *ngFor="let row of nzTable.data,index as i" (click)="switchSensor(i)" (mouseover)="sensorTableFocus(i)"-->
                        <!--(mouseout)="sensorTableBlur(i)" [ngClass]="{'table-tr-bgcolor-focus': i === sensorTableFocusIndex,'table-tr-bgcolor-blur': i !== sensorTableFocusIndex}">-->
                        <!--<td nz-td class='sensor-name' [ngStyle]="{'background-color': '#FFF'}">-->
                            <!--<span>-->
                                <!--<span>{{ row.sensor.name+'('+row.sensor.unit+')' }}</span>&nbsp;-->
                                <!--<i *ngIf="chartSelectedIndex==i" class="anticon anticon-line-chart"></i>-->
                            <!--</span>-->
                        <!--</td>-->
                        <!--<td nz-td *ngFor="let col of grid.columns,index as n" [ngStyle]="{'width':col.width,'text-align':col['align'] === undefined?'left':col.align}">-->
                            <!--<span [ngSwitch]="col.type">-->
                                <!--&lt;!&ndash; 要使用管道,无法自动生成 &ndash;&gt;-->
                                <!--<span title="{{ row.data[n]|tyepHandle:col:row }}" style="width:100%; display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;"-->
                                    <!--*ngSwitchDefault> {{ row.data[n]|tyepHandle:col:row }} </span>-->
                                <!--&lt;!&ndash; 要使用管道,无法自动生成 &ndash;&gt;-->
                            <!--</span>-->
                        <!--</td>-->
                    <!--</tr>-->
                <!--</tbody>-->
            <!--</nz-table>-->
            <!---->
            <!--<div *ngIf="grid.data.length>0" [ngClass]="{'table-scroll':true,'table-scroll-box-shadow': sensorNameScrollLeft>2 }" style="position: absolute; top:0;">-->
                <!--<nz-table #nzTable [nzDataSource]="grid.data" [nzIsPagination]="false">-->
                    <!--<thead nz-thead>-->
                        <!--<tr>-->
                            <!--<th nz-th [nzWidth]="'160px'" style="text-align:center; position:relative; display:block; z-index:9;">-->
                                <!--<span>监测项目</span>-->
                            <!--</th>-->
                        <!--</tr>-->
                    <!--</thead>-->
                    <!--<tbody nz-tbody [ngStyle]="{'top':sensorNameScrollTop+'px'}" style="position: relative; z-index:7; display:block;">-->
                        <!--<tr nz-tbody-tr style="cursor:pointer;" *ngFor="let row of nzTable.data,index as i" (mouseover)="sensorTableFocus(i)" (mouseout)="sensorTableBlur(i)"-->
                            <!--[ngClass]="{'table-tr-bgcolor-focus': i === sensorTableFocusIndex,'table-tr-bgcolor-blur': i !== sensorTableFocusIndex}"-->
                            <!--(click)="switchSensor(i)">-->
                            <!--<td nz-td class='sensor-name' [ngStyle]="{'width':'160px','text-align': 'center'}">-->
                                <!--<span>-->
                                    <!--<span>{{ row.sensor.name+'('+row.sensor.unit+')' }}</span>&nbsp;-->
                                    <!--<i *ngIf="chartSelectedIndex==i" class="anticon anticon-line-chart"></i>-->
                                <!--</span>-->
                            <!--</td>-->
                        <!--</tr>-->
                    <!--</tbody>-->
                <!--</nz-table>-->
            <!--</div>-->
        <!--</div>-->
    <!--</div>-->
<!--</nz-card>-->