diff --git a/src/app/gis-management/left-working/left-working.component.ts b/src/app/gis-management/left-working/left-working.component.ts
index 24bf2d3..34ce926 100644
--- a/src/app/gis-management/left-working/left-working.component.ts
+++ b/src/app/gis-management/left-working/left-working.component.ts
@@ -1,6 +1,5 @@
import { Component, EventEmitter, OnInit, Output, ViewChild } from '@angular/core';
import { FormControl } from '@angular/forms';
-import { id } from 'date-fns/locale';
@Component({
selector: 'app-left-working',
diff --git a/src/app/navigation/navigation.component.ts b/src/app/navigation/navigation.component.ts
index 3ca0cf8..802ced9 100644
--- a/src/app/navigation/navigation.component.ts
+++ b/src/app/navigation/navigation.component.ts
@@ -8,9 +8,6 @@ import { TreeService } from '../http-interceptors/tree.service'
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
import { CacheTokenService } from '../http-interceptors/cache-token.service'//引入服务
import { Router, ActivatedRoute, ParamMap } from '@angular/router'
-import { is } from 'date-fns/locale';
-
-
@Component({
selector: 'app-navigation',
diff --git a/src/app/ui/material-bank/addmatlibrary.component.ts b/src/app/ui/material-bank/addmatlibrary.component.ts
index 366b348..b6f2eef 100644
--- a/src/app/ui/material-bank/addmatlibrary.component.ts
+++ b/src/app/ui/material-bank/addmatlibrary.component.ts
@@ -5,9 +5,6 @@ import { HttpClient } from '@angular/common/http';
import {MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog';
import {FormControl} from '@angular/forms';
import { MatSnackBar } from '@angular/material/snack-bar';
-import format from 'date-fns/format';
-
-
@Component({
selector: 'addmatlibrary',
@@ -33,8 +30,19 @@ import format from 'date-fns/format';
order:number; //order
onSubmit(value){
+
let newdate = new Date();
- let time = format(newdate, 'yyyy-MM-dd')
+ function getDate(date){
+ //date是传过来的时间戳,注意需为13位,10位需*1000
+ //也可以不传,获取的就是当前时间
+ var time = new Date(date);
+ var year= time.getFullYear() //年
+ var month = ("0" + (time.getMonth() + 1)).slice(-2); //月
+ var day = ("0" + time.getDate()).slice(-2); //日
+ var mydate = year + "-" + month + "-" + day;
+ return mydate
+ }
+ let time = getDate(newdate)
this.http.post("/api/AssetLibraries",{
id: "",
name: value.name,
diff --git a/src/app/ui/material-bank/addoriginalcopy.component.ts b/src/app/ui/material-bank/addoriginalcopy.component.ts
index abe2bea..628e65f 100644
--- a/src/app/ui/material-bank/addoriginalcopy.component.ts
+++ b/src/app/ui/material-bank/addoriginalcopy.component.ts
@@ -4,7 +4,6 @@ import {FlatTreeControl} from '@angular/cdk/tree';
import { HttpClient } from '@angular/common/http';
import {MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog';
import {FormControl} from '@angular/forms';
-import format from 'date-fns/format';
import { TreeService } from '../../http-interceptors/tree.service'
import { FileUploader } from 'ng2-file-upload'
import { MatSnackBar,MatSnackBarConfig } from '@angular/material/snack-bar';
diff --git a/src/app/ui/material-bank/editmatlibrary.component.ts b/src/app/ui/material-bank/editmatlibrary.component.ts
index fcbba63..101fbee 100644
--- a/src/app/ui/material-bank/editmatlibrary.component.ts
+++ b/src/app/ui/material-bank/editmatlibrary.component.ts
@@ -5,7 +5,7 @@ import { HttpClient } from '@angular/common/http';
import {MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog';
import {FormControl} from '@angular/forms';
import { MatSnackBar } from '@angular/material/snack-bar';
-import format from 'date-fns/format';
+// import format from 'date-fns/format';
@Component({
selector: 'editmatlibrary',
templateUrl: './editmatlibrary.component.html',
@@ -26,7 +26,17 @@ import format from 'date-fns/format';
}
onSubmit(value){
let newdate = new Date();
- let time = format(newdate, 'yyyy-MM-dd')
+ function getDate(date){
+ //date是传过来的时间戳,注意需为13位,10位需*1000
+ //也可以不传,获取的就是当前时间
+ var time = new Date(date);
+ var year= time.getFullYear() //年
+ var month = ("0" + (time.getMonth() + 1)).slice(-2); //月
+ var day = ("0" + time.getDate()).slice(-2); //日
+ var mydate = year + "-" + month + "-" + day;
+ return mydate
+ }
+ let time = getDate(newdate)
this.http.put(`/api/AssetLibraries/${this.data.material.id}`,{
id: this.data.material.id,
name: value.name,
diff --git a/src/app/ui/material-bank/editoriginalcopy.component.ts b/src/app/ui/material-bank/editoriginalcopy.component.ts
index 4a7f751..47b70c7 100644
--- a/src/app/ui/material-bank/editoriginalcopy.component.ts
+++ b/src/app/ui/material-bank/editoriginalcopy.component.ts
@@ -5,7 +5,6 @@ import { HttpClient } from '@angular/common/http';
import {MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog';
import {FormControl} from '@angular/forms';
import { MatSnackBar,MatSnackBarConfig } from '@angular/material/snack-bar';
-import format from 'date-fns/format';
import { TreeService } from '../../http-interceptors/tree.service'
import { FileUploader } from 'ng2-file-upload'
import { DomSanitizer } from '@angular/platform-browser'
diff --git a/src/app/ui/material-bank/material-bank.component.ts b/src/app/ui/material-bank/material-bank.component.ts
index ae0decb..62db7d5 100644
--- a/src/app/ui/material-bank/material-bank.component.ts
+++ b/src/app/ui/material-bank/material-bank.component.ts
@@ -8,7 +8,7 @@ import { MatTableDataSource } from '@angular/material/table';
import { EditOriginalCopy } from './editoriginalcopy.component'
import { SelectOriginalCopy } from './selectoriginalcopy.component'
import { MatSnackBar,MatSnackBarConfig } from '@angular/material/snack-bar';
-import format from 'date-fns/format';
+// import format from 'date-fns/format';
@@ -145,7 +145,17 @@ export class MaterialBankComponent implements OnInit {
//禁启用素材库
disabled(){
let newdate = new Date();
- let time = format(newdate, 'yyyy-MM-dd')
+ function getDate(date){
+ //date是传过来的时间戳,注意需为13位,10位需*1000
+ //也可以不传,获取的就是当前时间
+ var time = new Date(date);
+ var year= time.getFullYear() //年
+ var month = ("0" + (time.getMonth() + 1)).slice(-2); //月
+ var day = ("0" + time.getDate()).slice(-2); //日
+ var mydate = year + "-" + month + "-" + day;
+ return mydate
+ }
+ let time = getDate(newdate)
if(this.material.enabled){
this.http.put(`/api/AssetLibraries/${this.material.id}`,{
id: this.material.id,
diff --git a/src/app/ui/material-bank/selectoriginalcopy.component.ts b/src/app/ui/material-bank/selectoriginalcopy.component.ts
index 65d195f..8b7ad7b 100644
--- a/src/app/ui/material-bank/selectoriginalcopy.component.ts
+++ b/src/app/ui/material-bank/selectoriginalcopy.component.ts
@@ -5,7 +5,6 @@ import { HttpClient } from '@angular/common/http';
import {MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog';
import {FormControl} from '@angular/forms';
import { MatSnackBar } from '@angular/material/snack-bar';
-import format from 'date-fns/format';
@Component({
selector: 'selectoriginalcopy',
templateUrl: './selectoriginalcopy.component.html',
diff --git a/src/app/ui/role/role.component.ts b/src/app/ui/role/role.component.ts
index 8fd68ca..144f439 100644
--- a/src/app/ui/role/role.component.ts
+++ b/src/app/ui/role/role.component.ts
@@ -3,7 +3,7 @@ import {MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog
import {FormControl} from '@angular/forms';
import { HttpClient } from '@angular/common/http';
import { CacheTokenService } from '../../http-interceptors/cache-token.service'
-import format from 'date-fns/format';
+// import format from 'date-fns/format';
import {MatTreeFlatDataSource, MatTreeFlattener} from '@angular/material/tree';
import {FlatTreeControl} from '@angular/cdk/tree';
import { TreeService } from '../../http-interceptors/tree.service'
@@ -51,7 +51,17 @@ export class RoleComponent implements OnInit {
//向上按钮
up(node){
let newdate = new Date();
- let time = format(newdate, 'yyyy-MM-dd')
+ function getDate(date){
+ //date是传过来的时间戳,注意需为13位,10位需*1000
+ //也可以不传,获取的就是当前时间
+ var time = new Date(date);
+ var year= time.getFullYear() //年
+ var month = ("0" + (time.getMonth() + 1)).slice(-2); //月
+ var day = ("0" + time.getDate()).slice(-2); //日
+ var mydate = year + "-" + month + "-" + day;
+ return mydate
+ }
+ let time = getDate(newdate)
this.http.put(//把上一节点order换成点击的节点
`/api/Roles/${this.dataSource[node.order -1].id}`,
{
@@ -82,7 +92,17 @@ export class RoleComponent implements OnInit {
//向下按钮
down(node){
let newdate = new Date();
- let time = format(newdate, 'yyyy-MM-dd')
+ function getDate(date){
+ //date是传过来的时间戳,注意需为13位,10位需*1000
+ //也可以不传,获取的就是当前时间
+ var time = new Date(date);
+ var year= time.getFullYear() //年
+ var month = ("0" + (time.getMonth() + 1)).slice(-2); //月
+ var day = ("0" + time.getDate()).slice(-2); //日
+ var mydate = year + "-" + month + "-" + day;
+ return mydate
+ }
+ let time = getDate(newdate)
this.http.put(//把下一节点order换成点击的节点
`/api/Roles/${this.dataSource[node.order + 1].id}`,
{
@@ -151,7 +171,17 @@ export class RoleComponent implements OnInit {
//启用或禁用按钮
open(roledata){
let newdate = new Date();
- let time = format(newdate, 'yyyy-MM-dd')
+ function getDate(date){
+ //date是传过来的时间戳,注意需为13位,10位需*1000
+ //也可以不传,获取的就是当前时间
+ var time = new Date(date);
+ var year= time.getFullYear() //年
+ var month = ("0" + (time.getMonth() + 1)).slice(-2); //月
+ var day = ("0" + time.getDate()).slice(-2); //日
+ var mydate = year + "-" + month + "-" + day;
+ return mydate
+ }
+ let time = getDate(newdate)
this.http.put(
`/api/Roles/${roledata['id']}`,
{
@@ -296,7 +326,17 @@ export class CreateRole {
//提交
onSubmit(value){
let newdate = new Date();
- let time = format(newdate, 'yyyy-MM-dd')
+ function getDate(date){
+ //date是传过来的时间戳,注意需为13位,10位需*1000
+ //也可以不传,获取的就是当前时间
+ var time = new Date(date);
+ var year= time.getFullYear() //年
+ var month = ("0" + (time.getMonth() + 1)).slice(-2); //月
+ var day = ("0" + time.getDate()).slice(-2); //日
+ var mydate = year + "-" + month + "-" + day;
+ return mydate
+ }
+ let time = getDate(newdate)
this.http.post(
'/api/Roles',
{
@@ -537,7 +577,17 @@ export class EditRole {
}
}
let newdate = new Date();
- let time = format(newdate, 'yyyy-MM-dd')
+ function getDate(date){
+ //date是传过来的时间戳,注意需为13位,10位需*1000
+ //也可以不传,获取的就是当前时间
+ var time = new Date(date);
+ var year= time.getFullYear() //年
+ var month = ("0" + (time.getMonth() + 1)).slice(-2); //月
+ var day = ("0" + time.getDate()).slice(-2); //日
+ var mydate = year + "-" + month + "-" + day;
+ return mydate
+ }
+ let time = getDate(newdate)
if(this.data['id'] != "0" && this.data['id'] != "1"){
this.http.put(
`/api/Roles/${this.data['id']}`,
diff --git a/src/app/ui/unit-information/addgroups.component.ts b/src/app/ui/unit-information/addgroups.component.ts
index b71963a..7fcf6a4 100644
--- a/src/app/ui/unit-information/addgroups.component.ts
+++ b/src/app/ui/unit-information/addgroups.component.ts
@@ -5,9 +5,6 @@ import { HttpClient } from '@angular/common/http';
import {MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog';
import {FormControl} from '@angular/forms';
import { MatSnackBar } from '@angular/material/snack-bar';
-import format from 'date-fns/format';
-
-
@Component({
selector: 'addgroups',
diff --git a/src/app/ui/unit-information/addunitinfo.component.ts b/src/app/ui/unit-information/addunitinfo.component.ts
index 60a0e2f..881fede 100644
--- a/src/app/ui/unit-information/addunitinfo.component.ts
+++ b/src/app/ui/unit-information/addunitinfo.component.ts
@@ -5,7 +5,6 @@ import { HttpClient } from '@angular/common/http';
import {MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog';
import {FormControl} from '@angular/forms';
import { MatSnackBar } from '@angular/material/snack-bar';
-import format from 'date-fns/format';
@Component({
selector: 'addunitinfo',
templateUrl: './addunitinfo.component.html',
diff --git a/src/app/ui/unit-information/editgroup.component.ts b/src/app/ui/unit-information/editgroup.component.ts
index 4bc9385..3103381 100644
--- a/src/app/ui/unit-information/editgroup.component.ts
+++ b/src/app/ui/unit-information/editgroup.component.ts
@@ -5,8 +5,6 @@ import { HttpClient } from '@angular/common/http';
import {MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog';
import {FormControl} from '@angular/forms';
import { MatSnackBar } from '@angular/material/snack-bar';
-import format from 'date-fns/format';
-
@Component({
diff --git a/src/app/ui/unit-information/editunitinfo.component.ts b/src/app/ui/unit-information/editunitinfo.component.ts
index 749645d..fd4432c 100644
--- a/src/app/ui/unit-information/editunitinfo.component.ts
+++ b/src/app/ui/unit-information/editunitinfo.component.ts
@@ -5,7 +5,6 @@ import { HttpClient } from '@angular/common/http';
import {MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog';
import {FormControl} from '@angular/forms';
import { MatSnackBar } from '@angular/material/snack-bar';
-import format from 'date-fns/format';
@Component({
selector: 'editunitinfo',
templateUrl: './editunitinfo.component.html',
diff --git a/src/app/ui/userdata/userdata.component.ts b/src/app/ui/userdata/userdata.component.ts
index 6df0a23..539ad95 100644
--- a/src/app/ui/userdata/userdata.component.ts
+++ b/src/app/ui/userdata/userdata.component.ts
@@ -4,7 +4,6 @@ import {MatTableDataSource} from '@angular/material/table';
import {MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog';
import {FormControl} from '@angular/forms';
import { HttpClient,HttpHeaders } from '@angular/common/http';
-import format from 'date-fns/format';
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
diff --git a/src/app/working-area/working-area.component.ts b/src/app/working-area/working-area.component.ts
index e6bd50e..d971242 100644
--- a/src/app/working-area/working-area.component.ts
+++ b/src/app/working-area/working-area.component.ts
@@ -16,7 +16,6 @@ import { PropertyInfo } from './model/PropertyInfo';
import { AxPreviewImageShape } from './model/axPreviewImageShape';
import { AxArrowConnector } from './model/axArrowConnector';
import { AxLegend, Legend } from './model/axLegend';
-import { AxGrid } from './model/axGrid';
import { AxSelection } from './model/axSelection';
import { AxMessageSystem } from './model/axMessageSystem';
import { Grid2D } from './model/grid2D';
@@ -24,7 +23,7 @@ import { Viewport } from 'pixi-viewport';
import { EVENT_IMAGE_RESIZE, EVENT_SELECTION_CHANGED } from './model/events';
import { Dimensioning } from './model/dimensioning';
import { Configuration, viewBounds } from './model/configuration';
-import { id } from 'date-fns/locale';
+
@Component({
From 2ce1364309f5670a3bccca5c3c535b0a9eeaf17d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=BE=90=E6=8C=AF=E5=8D=87?= <359059686@qq.com>
Date: Fri, 26 Nov 2021 16:26:35 +0800
Subject: [PATCH 3/4] =?UTF-8?q?[=E4=BF=AE=E6=AD=A3]=20=E5=BD=93=E5=9B=BE?=
=?UTF-8?q?=E4=BE=8B=E7=BC=A9=E6=94=BE=E4=B8=BAundefind=E6=97=B6=E9=BB=98?=
=?UTF-8?q?=E8=AE=A4=E8=AE=BE=E7=BD=AE=E4=B8=BA1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/app/working-area/model/axLegend.ts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/app/working-area/model/axLegend.ts b/src/app/working-area/model/axLegend.ts
index fd47146..51efe69 100644
--- a/src/app/working-area/model/axLegend.ts
+++ b/src/app/working-area/model/axLegend.ts
@@ -24,10 +24,10 @@ export class AxLegend extends AxShape {
super(assetData, workingArea);
this.angle = -this.workingArea.backgroundImage.angle;
this.name = this.assetData.Id;
- this.pivot.set(this.assetData.PivotX, this.assetData.PivotY);
+ this.pivot.set(this.assetData.PivotX == undefined ? 0 : this.assetData.PivotX, this.assetData.PivotY == undefined ? 0 : this.assetData.PivotY);
this.x = this.assetData.Point.x;
this.y = this.assetData.Point.y;
- this.scale.set(this.assetData.Scale);
+ this.scale.set(this.assetData.Scale == undefined ? 1 : this.assetData.Scale);
this.shapeMap = shapeMap;
this.createPoint();
this.refresh();
From d8e0339c48b18ee735fb488fee82c0b32b6ce36d Mon Sep 17 00:00:00 2001
From: SHAOJIAHAO <55341701@qq.com>
Date: Sat, 27 Nov 2021 08:47:46 +0800
Subject: [PATCH 4/4] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=E8=BD=A6=E8=BE=86?=
=?UTF-8?q?=E5=92=8C=E7=9B=B8=E5=85=B3=E8=B5=84=E6=96=99=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../data-collection/data-collection.module.ts | 4 +-
.../fire-force/addFireForce.html | 2 +-
.../fire-force/addFireForceCar.html | 20 +
.../fire-force/fire-force.component.html | 292 +++++--
.../fire-force/fire-force.component.scss | 247 +++++-
.../fire-force/fire-force.component.ts | 753 +++++++++++++++---
src/app/services/objects.service.ts | 85 ++
.../working-area/working-area.component.ts | 1 +
src/assets/images/add2.png | Bin 0 -> 383 bytes
src/assets/images/uploadbtn.png | Bin 0 -> 423 bytes
src/styles.scss | 340 +++++---
11 files changed, 1415 insertions(+), 329 deletions(-)
create mode 100644 src/app/data-collection/fire-force/addFireForceCar.html
create mode 100644 src/app/services/objects.service.ts
create mode 100644 src/assets/images/add2.png
create mode 100644 src/assets/images/uploadbtn.png
diff --git a/src/app/data-collection/data-collection.module.ts b/src/app/data-collection/data-collection.module.ts
index 40d10b8..398ceec 100644
--- a/src/app/data-collection/data-collection.module.ts
+++ b/src/app/data-collection/data-collection.module.ts
@@ -44,12 +44,12 @@ import { MatTreeModule } from '@angular/material/tree';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { DataCollectionRoutingModule } from './data-collection.routing';
import { AddWater, WaterCollectionComponent } from './water-collection/water-collection.component';
-import { AddFireForce, FireForceComponent, ViewDetails } from './fire-force/fire-force.component';
+import { AddFireForce, AddFireForceCar, FireForceComponent, ViewDetails } from './fire-force/fire-force.component';
import { AddLinkageForce, LinkageForcesComponent, ViewDetails2 } from './linkage-forces/linkage-forces.component';
import { NzTreeModule } from 'ng-zorro-antd/tree';
import { NzTreeSelectModule } from 'ng-zorro-antd/tree-select';
@NgModule({
- declarations: [WaterCollectionComponent, FireForceComponent, LinkageForcesComponent, AddWater, AddFireForce, ViewDetails, AddLinkageForce, ViewDetails2],
+ declarations: [WaterCollectionComponent, FireForceComponent, LinkageForcesComponent, AddWater, AddFireForce, ViewDetails, AddLinkageForce, ViewDetails2,AddFireForceCar],
imports: [
CommonModule,
A11yModule,
diff --git a/src/app/data-collection/fire-force/addFireForce.html b/src/app/data-collection/fire-force/addFireForce.html
index f99788e..a5af775 100644
--- a/src/app/data-collection/fire-force/addFireForce.html
+++ b/src/app/data-collection/fire-force/addFireForce.html
@@ -2,7 +2,7 @@
新增消防力量
-
+
{{item.name}}
diff --git a/src/app/data-collection/fire-force/addFireForceCar.html b/src/app/data-collection/fire-force/addFireForceCar.html
new file mode 100644
index 0000000..ba7585a
--- /dev/null
+++ b/src/app/data-collection/fire-force/addFireForceCar.html
@@ -0,0 +1,20 @@
+
+
+ 新增消防车辆
+
+
+
+
+
+
+ 确定
+ 取消
+
+
\ No newline at end of file
diff --git a/src/app/data-collection/fire-force/fire-force.component.html b/src/app/data-collection/fire-force/fire-force.component.html
index 63af1f3..67cee60 100644
--- a/src/app/data-collection/fire-force/fire-force.component.html
+++ b/src/app/data-collection/fire-force/fire-force.component.html
@@ -36,16 +36,15 @@