Commit 6b07da37 by 杨子

update

parent 5f877ff6
......@@ -13,7 +13,7 @@
"style": "less"
}
},
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
......@@ -25,27 +25,30 @@
"tsConfig": "src/tsconfig.app.json",
"assets": [
"src/favicon.ico",
"src/assets"
"src/assets",
{
"glob": "**/*",
"input": "./node_modules/@ant-design/icons-angular/src/inline-svg/",
"output": "/assets/"
}
],
"styles": [
"src/styles.less",
"node_modules/ng-zorro-antd/ng-zorro-antd.min.css"
],
"scripts":[
"scripts": [
],
"es5BrowserSupport": true
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"fileReplacements": [{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
......@@ -55,13 +58,11 @@
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
}
]
"budgets": [{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
}]
}
}
},
......@@ -70,7 +71,7 @@
"options": {
"browserTarget": "map:build"
},
"configurations": {
"production": {
"browserTarget": "map:build:production"
......@@ -145,4 +146,4 @@
}
},
"defaultProject": "map"
}
\ No newline at end of file
}
<h1 class="gradient">
山西省公路建设智慧监管指挥平台
山西省交通运输厅智慧监管指挥平台
</h1>
<div *ngIf="debug">
......
......@@ -4,26 +4,29 @@
<div class="main">
<div class="aside">
<button class="ie-fix-button" >返回</button>
<nz-tree [nzShowIcon]="true" [nzTreeTemplate]="nzTreeTemplate" [nzData]="nodes" nzAsyncData
(nzExpandChange)="nzEvent($event)">
<ng-template #nzTreeTemplate let-node>
<span *ngIf="node.isLeaf">
<i nz-icon nzType="video-camera" nzTheme="outline"></i>
{{node.title}}
</span>
<span *ngIf="!node.isLeaf">
<i nz-icon nzType="cluster" nzTheme="outline"></i>
{{node.title}}
</span>
<button class="ie-fix-button" (click)="back()">返回</button>
<nz-tree [nzExpandedIcon]="expandedIconTpl" [nzTreeTemplate]="nzTreeTemplate" [nzData]="nodes" nzAsyncData
(nzExpandChange)="nzEvent($event)">
<ng-template #expandedIconTpl let-node>
<i *ngIf="node.origin.level == 0" nz-icon [nzType]="node.isExpanded ? 'caret-down':'caret-right'"
[nzTheme]="outline" class="ant-tree-switcher-icon"></i>
</ng-template>
</nz-tree>
</div>
<div class="content">
<div echarts [options]="options1" (chartClick)="onChartEvent($event, 'chartClick')" theme="macarons"
class="demo-chart"></div>
<div echarts [options]="options2" (chartClick)="onChartEvent($event, 'chartClick')" theme="macarons"
class="demo-chart"></div>
<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"
class="demo-chart"></div>
<div echarts [options]="options2" (chartClick)="onChartEvent($event, 'chartClick')" theme="macarons"
class="demo-chart"></div>
</div>
</div>
</div>
......@@ -2,15 +2,23 @@ import { Component, OnInit } from "@angular/core";
import { HttpClient } from "@angular/common/http";
import { NzFormatEmitEvent } from "ng-zorro-antd";
import { DefaultService } from "../api";
import { Location } from "@angular/common";
@Component({
selector: "app-qs-mark",
templateUrl: "./qs-mark.component.html",
styleUrls: ["./qs-mark.component.less"]
})
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 = {
legend: {
orient: "vertical",
......@@ -246,7 +254,8 @@ export class QsMarkComponent implements OnInit {
title: d.name || d.cameraName,
key: d.id || d.cameraIndexCode,
index,
isLeaf: node.level == 2
isLeaf: node.level == 1,
level: 1
};
})
);
......@@ -258,4 +267,8 @@ export class QsMarkComponent implements OnInit {
console.log("chart event:", type, event);
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