Commit 6b07da37 by 杨子

update

parent 5f877ff6
...@@ -25,14 +25,19 @@ ...@@ -25,14 +25,19 @@
"tsConfig": "src/tsconfig.app.json", "tsConfig": "src/tsconfig.app.json",
"assets": [ "assets": [
"src/favicon.ico", "src/favicon.ico",
"src/assets" "src/assets",
{
"glob": "**/*",
"input": "./node_modules/@ant-design/icons-angular/src/inline-svg/",
"output": "/assets/"
}
], ],
"styles": [ "styles": [
"src/styles.less", "src/styles.less",
"node_modules/ng-zorro-antd/ng-zorro-antd.min.css" "node_modules/ng-zorro-antd/ng-zorro-antd.min.css"
], ],
"scripts":[ "scripts": [
], ],
...@@ -40,12 +45,10 @@ ...@@ -40,12 +45,10 @@
}, },
"configurations": { "configurations": {
"production": { "production": {
"fileReplacements": [ "fileReplacements": [{
{
"replace": "src/environments/environment.ts", "replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts" "with": "src/environments/environment.prod.ts"
} }],
],
"optimization": true, "optimization": true,
"outputHashing": "all", "outputHashing": "all",
"sourceMap": false, "sourceMap": false,
...@@ -55,13 +58,11 @@ ...@@ -55,13 +58,11 @@
"extractLicenses": true, "extractLicenses": true,
"vendorChunk": false, "vendorChunk": false,
"buildOptimizer": true, "buildOptimizer": true,
"budgets": [ "budgets": [{
{
"type": "initial", "type": "initial",
"maximumWarning": "2mb", "maximumWarning": "2mb",
"maximumError": "5mb" "maximumError": "5mb"
} }]
]
} }
} }
}, },
......
<h1 class="gradient"> <h1 class="gradient">
山西省公路建设智慧监管指挥平台 山西省交通运输厅智慧监管指挥平台
</h1> </h1>
<div *ngIf="debug"> <div *ngIf="debug">
......
...@@ -4,26 +4,29 @@ ...@@ -4,26 +4,29 @@
<div class="main"> <div class="main">
<div class="aside"> <div class="aside">
<button class="ie-fix-button" >返回</button> <button class="ie-fix-button" (click)="back()">返回</button>
<nz-tree [nzShowIcon]="true" [nzTreeTemplate]="nzTreeTemplate" [nzData]="nodes" nzAsyncData <nz-tree [nzExpandedIcon]="expandedIconTpl" [nzTreeTemplate]="nzTreeTemplate" [nzData]="nodes" nzAsyncData
(nzExpandChange)="nzEvent($event)"> (nzExpandChange)="nzEvent($event)">
<ng-template #nzTreeTemplate let-node> <ng-template #expandedIconTpl let-node>
<span *ngIf="node.isLeaf"> <i *ngIf="node.origin.level == 0" nz-icon [nzType]="node.isExpanded ? 'caret-down':'caret-right'"
<i nz-icon nzType="video-camera" nzTheme="outline"></i> [nzTheme]="outline" class="ant-tree-switcher-icon"></i>
{{node.title}}
</span>
<span *ngIf="!node.isLeaf">
<i nz-icon nzType="cluster" nzTheme="outline"></i>
{{node.title}}
</span>
</ng-template> </ng-template>
</nz-tree> </nz-tree>
</div> </div>
<div class="content"> <div class="content">
<div style=" overflow: hidden;
position: absolute;
width: 100%;
left: 0;
display: flex;
justify-content: center;
align-items: center;
height: 100%;
top: 0;">
<div echarts [options]="options1" (chartClick)="onChartEvent($event, 'chartClick')" theme="macarons" <div echarts [options]="options1" (chartClick)="onChartEvent($event, 'chartClick')" theme="macarons"
class="demo-chart"></div> class="demo-chart"></div>
<div echarts [options]="options2" (chartClick)="onChartEvent($event, 'chartClick')" theme="macarons" <div echarts [options]="options2" (chartClick)="onChartEvent($event, 'chartClick')" theme="macarons"
class="demo-chart"></div> class="demo-chart"></div>
</div> </div>
</div>
</div> </div>
...@@ -2,15 +2,23 @@ import { Component, OnInit } from "@angular/core"; ...@@ -2,15 +2,23 @@ import { Component, OnInit } from "@angular/core";
import { HttpClient } from "@angular/common/http"; import { HttpClient } from "@angular/common/http";
import { NzFormatEmitEvent } from "ng-zorro-antd"; import { NzFormatEmitEvent } from "ng-zorro-antd";
import { DefaultService } from "../api"; import { DefaultService } from "../api";
import { Location } from "@angular/common";
@Component({ @Component({
selector: "app-qs-mark", selector: "app-qs-mark",
templateUrl: "./qs-mark.component.html", templateUrl: "./qs-mark.component.html",
styleUrls: ["./qs-mark.component.less"] styleUrls: ["./qs-mark.component.less"]
}) })
export class QsMarkComponent implements OnInit { export class QsMarkComponent implements OnInit {
nodes = [{ title: "高速公路", key: "1" }, { title: "普通干线", key: "0" }]; nodes = [
{ title: "高速公路", key: "1", icon: "caret-right", level: 0 },
{ title: "普通干线", key: "2", icon: "caret-right", level: 0 }
];
constructor(private http: HttpClient, private d: DefaultService) {} constructor(
private http: HttpClient,
private d: DefaultService,
private location: Location
) {}
options1 = { options1 = {
legend: { legend: {
orient: "vertical", orient: "vertical",
...@@ -246,7 +254,8 @@ export class QsMarkComponent implements OnInit { ...@@ -246,7 +254,8 @@ export class QsMarkComponent implements OnInit {
title: d.name || d.cameraName, title: d.name || d.cameraName,
key: d.id || d.cameraIndexCode, key: d.id || d.cameraIndexCode,
index, index,
isLeaf: node.level == 2 isLeaf: node.level == 1,
level: 1
}; };
}) })
); );
...@@ -258,4 +267,8 @@ export class QsMarkComponent implements OnInit { ...@@ -258,4 +267,8 @@ export class QsMarkComponent implements OnInit {
console.log("chart event:", type, event); console.log("chart event:", type, event);
window.open(event.data.link); window.open(event.data.link);
} }
back() {
this.location.back();
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment