From 605842e94b26812ec0db59c0ba411547669d9373 Mon Sep 17 00:00:00 2001 From: chenjingyu Date: Fri, 9 Apr 2021 14:40:17 +0800 Subject: [PATCH 1/4] =?UTF-8?q?[=E4=BF=AE=E6=94=B9]=E5=8D=A1=E7=89=87?= =?UTF-8?q?=E9=A2=84=E6=A1=88=E6=94=B9=E4=B8=BA=E6=96=87=E6=9C=AC=E9=A2=84?= =?UTF-8?q?=E6=A1=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../entry-plan-look/AddPlanone.html | 12 +-- .../entry-plan-look.component.ts | 2 +- .../entry-plan/entry-plan.component.html | 13 ++- .../entry-plan/entry-plan.component.ts | 5 +- .../open-plan/open-plan.component.html | 2 +- .../pass-plan/pass-plan.component.html | 37 +++++-- .../pass-plan/pass-plan.component.ts | 10 +- .../echarts-data.service.ts | 10 +- .../scheduled-updates/publicEcharts.html | 61 ++++++++++- .../scheduled-updates.component.ts | 102 ++++++++++++++++-- .../state/page-one/page-one.component.ts | 14 +-- .../page-two-time.component.scss | 2 +- 12 files changed, 218 insertions(+), 52 deletions(-) diff --git a/src/app/plan-management/entry-plan-look/AddPlanone.html b/src/app/plan-management/entry-plan-look/AddPlanone.html index 7592fb2..8cb410d 100644 --- a/src/app/plan-management/entry-plan-look/AddPlanone.html +++ b/src/app/plan-management/entry-plan-look/AddPlanone.html @@ -4,7 +4,7 @@ * @Author: sueRimn * @Date: 2020-12-24 10:59:48 * @LastEditors: sueRimn - * @LastEditTime: 2021-03-20 16:13:09 + * @LastEditTime: 2021-04-08 10:33:33 -->
@@ -25,7 +25,7 @@ - 卡片预案 + 文本预案 二维预案 三维预案 其他预案 @@ -35,9 +35,9 @@
- Ⅲ级预案 - Ⅳ级预案 - Ⅴ级预案 + Ⅲ级预案 + Ⅳ级预案 + Ⅴ级预案
@@ -51,7 +51,7 @@ 上传预案完成创建
-
+
预案形式:
diff --git a/src/app/plan-management/entry-plan-look/entry-plan-look.component.ts b/src/app/plan-management/entry-plan-look/entry-plan-look.component.ts index 6fab655..c58b203 100644 --- a/src/app/plan-management/entry-plan-look/entry-plan-look.component.ts +++ b/src/app/plan-management/entry-plan-look/entry-plan-look.component.ts @@ -762,7 +762,7 @@ export class AddPlanone { this.selectedPLanName = formdata.value.firstCtrlone this.selectedPLanType = formdata.value.firstCtrltwo this.selectedPLanLevel= formdata.value.firstCtrlthree - if(formdata.value.firstCtrltwo=='8'){ //如果是卡片预案 + if(formdata.value.firstCtrltwo=='16'){ //如果是卡片预案 this.localup = true this.inputword = true this.onlineedit = false diff --git a/src/app/plan-management/entry-plan/entry-plan.component.html b/src/app/plan-management/entry-plan/entry-plan.component.html index 82735dc..2ebe4a3 100644 --- a/src/app/plan-management/entry-plan/entry-plan.component.html +++ b/src/app/plan-management/entry-plan/entry-plan.component.html @@ -58,7 +58,7 @@ - 卡片预案 + 文本预案 二维预案 三维预案 其他预案 @@ -71,6 +71,16 @@
+
+ + + + Ⅲ级预案 + Ⅳ级预案 + Ⅴ级预案 + + +
@@ -115,6 +125,7 @@
+
diff --git a/src/app/plan-management/entry-plan/entry-plan.component.ts b/src/app/plan-management/entry-plan/entry-plan.component.ts index 337e3bf..7f8fcf8 100644 --- a/src/app/plan-management/entry-plan/entry-plan.component.ts +++ b/src/app/plan-management/entry-plan/entry-plan.component.ts @@ -332,7 +332,8 @@ export class EntryPlanComponent implements OnInit { PageSize: this.pageSizeOptions[0], Sort: this.integritySort ? 'integrityscore' : '', SortType: this.integritySort || '', - HasPlanComponents:this.haveyuan||'' + HasPlanComponents:this.haveyuan||'', + PlanCategories:this.planCategory } this.http.get("/api/Plans",{params:paramsdata}).subscribe((data:any)=>{ @@ -366,6 +367,7 @@ export class EntryPlanComponent implements OnInit { toExamine:any //审核状态 preparelevel:any //编制级别 plcheck:boolean //编制级别勾选框 + planCategory=[] //预案级别 //重置 reset(){ this.companyName = '' @@ -379,6 +381,7 @@ export class EntryPlanComponent implements OnInit { this.integritySort = '' this.plcheck = false this.haveyuan='' + this.planCategory=[] //重新获取初始化列表 // console.log(this.pageEvent) this.pageEvent.pageIndex = 0 diff --git a/src/app/plan-management/open-plan/open-plan.component.html b/src/app/plan-management/open-plan/open-plan.component.html index 6dec103..168444b 100644 --- a/src/app/plan-management/open-plan/open-plan.component.html +++ b/src/app/plan-management/open-plan/open-plan.component.html @@ -39,7 +39,7 @@ - 卡片预案 + 文本预案 二维预案 三维预案 其他预案 diff --git a/src/app/plan-management/pass-plan/pass-plan.component.html b/src/app/plan-management/pass-plan/pass-plan.component.html index 2314d86..6bed239 100644 --- a/src/app/plan-management/pass-plan/pass-plan.component.html +++ b/src/app/plan-management/pass-plan/pass-plan.component.html @@ -45,13 +45,16 @@
- + - - {{item.name}} + + 文本预案 + 二维预案 + 三维预案 + 其他预案 - 包含下级 +
@@ -70,18 +73,30 @@
- + - - 卡片预案 - 二维预案 - 三维预案 - 其他预案 + + {{item.name}} - + 包含下级
+
+ + + + 应急预案(国家级) + 应急预案(市级) + 类型预案 + Ⅰ级预案 + Ⅱ级预案 + Ⅲ级预案 + Ⅳ级预案 + Ⅴ级预案 + + +
diff --git a/src/app/plan-management/pass-plan/pass-plan.component.ts b/src/app/plan-management/pass-plan/pass-plan.component.ts index 88654b1..c973350 100644 --- a/src/app/plan-management/pass-plan/pass-plan.component.ts +++ b/src/app/plan-management/pass-plan/pass-plan.component.ts @@ -117,6 +117,11 @@ export class PassPlanComponent implements OnInit { allPlanInfo:any //存储所有预案信息 //获得所有预案信息 getAllPlanInfo(){ + let reservePlanType + this.reservePlanType ? reservePlanType = JSON.parse(JSON.stringify(this.reservePlanType)) : reservePlanType = '' + if(this.reservePlanType && this.reservePlanType.length != 0){ + reservePlanType = eval(this.reservePlanType.join("|")) + } let paramsdata:any = { CompanyName: this.companyName || '', OrganizationId: this.jsId || '', @@ -130,7 +135,8 @@ export class PassPlanComponent implements OnInit { CreationTimeRangeEnd:this.endtime||'', PageNumber: this.PageNumber || '1', PageSize: this.pageSizeOptions[0], - Sort: '' + Sort: '', + PlanCategories:this.planCategory } this.http.get("/api/ApprovedPlans",{params:paramsdata}).subscribe((data:any)=>{ this.length = data.totalCount @@ -458,6 +464,7 @@ export class PassPlanComponent implements OnInit { reservePlanType:any //预案类型 preparelevel:any //编制级别 plcheck:boolean //编制级别勾选框 + planCategory=[]//预案级别 //重置 reset(){ this.companyName = '' @@ -473,6 +480,7 @@ export class PassPlanComponent implements OnInit { //重新获取初始化列表 this.pageEvent.pageIndex = 0 this.PageNumber = 1 + this.planCategory=[] this.getAllPlanInfo(); } } diff --git a/src/app/statistic-analysis/echarts-data.service.ts b/src/app/statistic-analysis/echarts-data.service.ts index 42f1e30..7b059c7 100644 --- a/src/app/statistic-analysis/echarts-data.service.ts +++ b/src/app/statistic-analysis/echarts-data.service.ts @@ -117,15 +117,7 @@ export class EchartsDataService { {name:"十二月",number:"122",zhanbi:"1.6%"}/* , {name:"总计",number:"984",zhanbi:"20%"} */ ] - //预案提示框 - planData = [ - {name:"预案新增",number:"156",zhanbi:"19%"}, - {name:"预案审核通过",number:"144",zhanbi:"21%"}, - {name:"预案编制",number:"133",zhanbi:"20%"}, - {name:"预案审核退回",number:"122",zhanbi:"17%"}, - {name:"预案审核中",number:"120",zhanbi:"23%"}/* , - {name:"总计",number:"561",zhanbi:"100%"}, */ - ] + //提示框表格 tableTooltip(dataArr,title:string){ diff --git a/src/app/statistic-analysis/scheduled-updates/publicEcharts.html b/src/app/statistic-analysis/scheduled-updates/publicEcharts.html index e81dfc0..71d89d8 100644 --- a/src/app/statistic-analysis/scheduled-updates/publicEcharts.html +++ b/src/app/statistic-analysis/scheduled-updates/publicEcharts.html @@ -4,12 +4,12 @@ * @Author: sueRimn * @Date: 2020-09-05 08:59:24 * @LastEditors: sueRimn - * @LastEditTime: 2020-12-28 16:21:07 + * @LastEditTime: 2021-04-08 16:12:48 -->
-
+
@@ -19,7 +19,60 @@

浦东支队1月份已核查案件高于平均值;黄浦支队1月份已核查案件高于平均值...

--> - +
+ + + + +
+ +
+
+ + 开始月份: + + + {{item}} + + + + 结束月份: + + + {{item}} + + + +
+
+ +
+
+ 开始年份: + + + {{item}} + + + 结束年份: + + + {{item}} + + + +
+
@@ -31,7 +84,7 @@
- +
diff --git a/src/app/statistic-analysis/scheduled-updates/scheduled-updates.component.ts b/src/app/statistic-analysis/scheduled-updates/scheduled-updates.component.ts index 372d190..197c311 100644 --- a/src/app/statistic-analysis/scheduled-updates/scheduled-updates.component.ts +++ b/src/app/statistic-analysis/scheduled-updates/scheduled-updates.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit,ViewChild } from '@angular/core'; import { Router } from '@angular/router'; import { ActivatedRoute } from '@angular/router'; import {EchartsDataService} from '../echarts-data.service' @@ -176,13 +176,83 @@ export class indexConditionComponent implements OnInit { }) export class publicEchartsComponent implements OnInit { - constructor(private router: Router,public echartsData:EchartsDataService,public dialog: MatDialog,) { } + constructor(private router: Router,public echartsData:EchartsDataService,public dialog: MatDialog,public snackBar: MatSnackBar) { } + @ViewChild('verified')verifieds :verifiedComponent; //父组件中获得子组件的引用 ngOnInit(): void { this.echartsData.scheduledUpdatesToggle = 1 + this.dateInit() } isToggle:boolean = true; // 已核查/未核查 + selectType:string = 'month'; //选择当前的 查询类型 按月/年 + //查询数据 + years:any = [] + selectMonth:any = [1,2,3,4,5,6,7,8,9,10,11,12] + + //日期初始化 + dateInit () { + let date = (new Date()).getFullYear() + for (let i=date; i>=date-10;i--) { + this.years.unshift(i) + } + } + + selectOneYear:any = (new Date()).getFullYear() //开始年份 + selectTwoYear:any = (new Date()).getFullYear() //结束年份 + selectStartMonth:any = 1 //开始月份 + selectEndMonth:any = (new Date()).getMonth()+1 //结束月份 + //点击月或年 + changeTime(e){ + console.log(e) + //this.echartsData.selectType=0 + this.verifieds.changeTime(e.value) + } + //按月查询 + monthSubmit (e) { + + if (e.selectTwoYear > e.selectOneYear) { + let startTime = e.selectOneYear + '-' + e.selectStartMonth + '-' + 1 + ' ' + 0 + ':' + 0 +':'+ 0 + let endTime = e.selectTwoYear + '-' + e.selectEndMonth + '-' + 31 + ' ' + 23 + ':' + 59 +':'+ 59 + // console.log(startTime) + // console.log(endTime) + } else if (e.selectTwoYear === e.selectOneYear) { + if(e.selectEndMonth >= e.selectStartMonth) { + let startTime = e.selectOneYear + '-' + e.selectStartMonth + '-' + 1 + ' ' + 0 + ':' + 0 +':'+ 0 + let endTime = e.selectTwoYear + '-' + e.selectEndMonth + '-' + 31 + ' ' + 23 + ':' + 59 +':'+ 59 + // console.log(startTime) + // console.log(endTime) + } else { + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('请选择正确时间区段','确定',config); + } + }else { + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('请选择正确时间区段','确定',config); + } + } + + + + selectStartYear:any = (new Date()).getFullYear() //开始年份 + selectEndYear:any = (new Date()).getFullYear() //结束年份 + + //按年查询 + yearSubmit (e) { + if (e.selectEndYear >= e.selectStartYear) { + let startTime = e.selectStartYear + '-' + 1 + '-' + 1 + ' ' + 0 + ':' + 0 +':'+ 0 + let endTime = e.selectEndYear + '-' + 12 + '-' + 31 + ' ' + 23 + ':' + 59 +':'+ 59 + } else { + const config = new MatSnackBarConfig(); + config.verticalPosition = 'top'; + config.duration = 3000 + this.snackBar.open('请选择正确时间区段','确定',config); + } + } //已核查 verified () { @@ -245,8 +315,8 @@ export class verifiedComponent implements OnInit { ngOnInit(): void { window.setTimeout(()=>{ - this.qipaotishi=this.echartsData.qipao(this.qipaotishi,this.ydata,this.xdata) - this.oneInit() + this.qipaotishi=this.echartsData.qipao(this.qipaotishi,this.ydatayue,this.xdatayue) + this.oneInit(this.xdatayue,this.ydatayue) //this.twoInit() },0) } @@ -259,11 +329,25 @@ export class verifiedComponent implements OnInit { element.echart.clear() }); } */ + async changeTime (e){ + this.oneEcharts.clear() + this.oneEcharts.dispose() + this.qipaotishi='' + if(e=='year'){ + this.qipaotishi=this.echartsData.qipao(this.qipaotishi,this.ydataYear,this.xdataYear) + this.oneInit(this.xdataYear,this.ydataYear) + }else{ + this.qipaotishi=this.echartsData.qipao(this.qipaotishi,this.ydatayue,this.xdatayue) + this.oneInit(this.xdatayue,this.ydatayue) + } + } oneEcharts:any; qipaotishi - xdata=['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月','9月','10月','11月','12月'] - ydata=[1170, 953, 1144, 799, 789, 773, 660, 998, 790, 1004, 1345, 1245] + xdatayue=['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月','9月','10月','11月','12月'] + ydatayue=[1170, 953, 1144, 799, 789, 773, 660, 998, 790, 1004, 1345, 1345] + xdataYear=['2020','2021'] + ydataYear=['2','5'] //提示框表格 tableTooltip(dataArr,title:string){ let data = dataArr @@ -290,7 +374,7 @@ export class verifiedComponent implements OnInit { res+='
' return res } - oneInit () { + oneInit (xdata,ydata) { this.oneEcharts = echarts.init(document.getElementById('center'),'walden'); var option = { @@ -326,7 +410,7 @@ export class verifiedComponent implements OnInit { xAxis: { type: 'category', boundaryGap:true, - data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月','9月','10月','11月','12月'], + data:xdata, axisLabel:{ textStyle:{ fontSize :18, @@ -370,7 +454,7 @@ export class verifiedComponent implements OnInit { symbolSize:[65, 65], data: this.qipaotishi }, - data: [1170, 953, 1144, 799, 789, 773, 660, 998, 790, 1004, 1345, 1245], + data:ydata, clickable:false, } ], diff --git a/src/app/statistic-analysis/state/page-one/page-one.component.ts b/src/app/statistic-analysis/state/page-one/page-one.component.ts index 1852b4c..cd41681 100644 --- a/src/app/statistic-analysis/state/page-one/page-one.component.ts +++ b/src/app/statistic-analysis/state/page-one/page-one.component.ts @@ -4,7 +4,7 @@ * @Author: sueRimn * @Date: 2020-09-01 15:24:39 * @LastEditors: sueRimn - * @LastEditTime: 2021-04-01 14:22:36 + * @LastEditTime: 2021-04-08 13:43:50 */ import { Component, OnInit } from '@angular/core'; import { Router } from '@angular/router'; @@ -55,7 +55,7 @@ export class PageOneComponent implements OnInit { indexData initCharts(){ this.tabledata=JSON.parse(JSON.stringify(this.echartsData.allDate)) - // console.log(this.tabledata) + console.log(this.tabledata) var ec = echarts as any; this.indexBzt = ec.init(document.getElementById('indexBzt'),'walden'); @@ -109,11 +109,11 @@ export class PageOneComponent implements OnInit { }, data: [ - {value: this.tabledata[0].plansStatuses[0].count, name: '预案新增',type:1,planStatusName:this.tabledata[0].plansStatuses[0].planStatusName}, - {value: this.tabledata[0].plansStatuses[2].count, name: '预案审核通过',itemStyle:{color:'#02A7F0'},type:3,planStatusName:this.tabledata[0].plansStatuses[2].planStatusName}, - {value: this.tabledata[0].plansStatuses[4].count, name: '预案编制',type:5,planStatusName:this.tabledata[0].plansStatuses[4].planStatusName}, - {value: this.tabledata[0].plansStatuses[3].count, name: '预案审核退回',type:4,planStatusName:this.tabledata[0].plansStatuses[3].planStatusName}, - {value: this.tabledata[0].plansStatuses[1].count, name: '预案审核中',type:2,planStatusName:this.tabledata[0].plansStatuses[1].planStatusName} + {value:this.tabledata[0].plansStatuses[0]!=undefined? this.tabledata[0].plansStatuses[0].count:0, name: '预案新增',type:1,planStatusName:this.tabledata[0].plansStatuses[0]!=undefined?this.tabledata[0].plansStatuses[0].planStatusName:''}, + {value:this.tabledata[0].plansStatuses[2]!=undefined? this.tabledata[0].plansStatuses[2].count:0, name: '预案审核通过',itemStyle:{color:'#02A7F0'},type:3,planStatusName:this.tabledata[0].plansStatuses[2]!=undefined? this.tabledata[0].plansStatuses[2].planStatusName:''}, + {value:this.tabledata[0].plansStatuses[4]!=undefined?this.tabledata[0].plansStatuses[4].count:0, name: '预案编制',type:5,planStatusName:this.tabledata[0].plansStatuses[4]!=undefined?this.tabledata[0].plansStatuses[4].planStatusName:''}, + {value:this.tabledata[0].plansStatuses[3]!=undefined? this.tabledata[0].plansStatuses[3].count:0, name: '预案审核退回',type:4,planStatusName:this.tabledata[0].plansStatuses[3]!=undefined? this.tabledata[0].plansStatuses[3].planStatusName:''}, + {value:this.tabledata[0].plansStatuses[1]!=undefined? this.tabledata[0].plansStatuses[1].count:0, name: '预案审核中',type:2,planStatusName:this.tabledata[0].plansStatuses[1]!=undefined? this.tabledata[0].plansStatuses[1].planStatusName:''} ], emphasis: { itemStyle: { diff --git a/src/app/statistic-analysis/state/page-two-time/page-two-time.component.scss b/src/app/statistic-analysis/state/page-two-time/page-two-time.component.scss index d0c1957..2137a6d 100644 --- a/src/app/statistic-analysis/state/page-two-time/page-two-time.component.scss +++ b/src/app/statistic-analysis/state/page-two-time/page-two-time.component.scss @@ -63,7 +63,7 @@ width: 88px; height: 36px; } - margin-right:4%; + margin-left:4%; } @media screen and (max-device-width:1200px){ justify-content: center; From 490b1875c72034cca21a04c38b118cd757ca9040 Mon Sep 17 00:00:00 2001 From: chenjingyu Date: Mon, 12 Apr 2021 17:25:05 +0800 Subject: [PATCH 2/4] =?UTF-8?q?[=E4=BF=AE=E6=94=B9]=E4=B8=89=E5=9B=9B?= =?UTF-8?q?=E4=BA=94=E7=BA=A7=E5=92=8C=E5=AE=A1=E6=A0=B8=E9=80=9A=E8=BF=87?= =?UTF-8?q?=E9=A2=84=E6=A1=88=E6=96=87=E6=9C=AC=E9=A2=84=E6=A1=88=E6=98=BE?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/interface.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/app/interface.ts b/src/app/interface.ts index dceab4e..5b7d6e3 100644 --- a/src/app/interface.ts +++ b/src/app/interface.ts @@ -4,7 +4,7 @@ * @Author: sueRimn * @Date: 2020-12-24 10:59:48 * @LastEditors: sueRimn - * @LastEditTime: 2021-01-20 16:44:22 + * @LastEditTime: 2021-04-09 17:12:59 */ export interface Data { token:string, @@ -31,7 +31,15 @@ export enum PlanTypeEnum { "five", "six", "seven", - "卡片预案" + "卡片预案", + "none", + "teen", + "shiyi", + "shier", + "shisan", + "shisi", + "shiwu", + "文本预案" } export enum AuditStatusEnum { From 71659c053a3b2dec3fd0771c2c296253fe80e08e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=8C=AF=E5=8D=87?= <359059686@qq.com> Date: Thu, 15 Apr 2021 14:41:44 +0800 Subject: [PATCH 3/4] 1.4.3 --- src/app/working-area/model/axLegend.ts | 3 ++ .../working-area/working-area.component.ts | 36 +++++++++++-------- 2 files changed, 24 insertions(+), 15 deletions(-) diff --git a/src/app/working-area/model/axLegend.ts b/src/app/working-area/model/axLegend.ts index a1c8281..dffc4a8 100644 --- a/src/app/working-area/model/axLegend.ts +++ b/src/app/working-area/model/axLegend.ts @@ -41,6 +41,7 @@ export class AxLegend extends AxShape { public addItem(item: Legend) { if (this.shapeMap.has(item.Name)) { this.shapeMap.get(item.Name).Count++; + this.shapeMap.get(item.Name).Index++; } else { this.shapeMap.set(item.Name, item); } @@ -449,6 +450,7 @@ export class Legend { public Name: string; public ImageUrl: string; public Count: number; + public Index: number; /** * */ @@ -456,5 +458,6 @@ export class Legend { this.Name = name; this.ImageUrl = imageUrl; this.Count = count; + this.Index = 1; } } diff --git a/src/app/working-area/working-area.component.ts b/src/app/working-area/working-area.component.ts index 157d794..52628f2 100644 --- a/src/app/working-area/working-area.component.ts +++ b/src/app/working-area/working-area.component.ts @@ -24,6 +24,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({ @@ -144,6 +145,10 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV * 允许编辑 */ public allowEdit = true; + /** + * 图形索引 + */ + public shapesIndex: Map = new Map(); /** * 动画控制器 */ @@ -166,7 +171,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV * 重大调整-主版本号增加 * 日期变更-日期版本号增加 */ - public VERSION = '1.4.2.20210325_rc'; + public VERSION = '1.4.3.20210415_rc'; /** * 数据初始化 */ @@ -524,7 +529,6 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV */ private createGrid2D(): void { this.grid2D = new Grid2D(this.camera2D, null); - this.camera2D.addChild(this.grid2D); } /** @@ -593,6 +597,18 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV && axShape.assetData.Name !== '图例') { const itemLegend = new Legend(axShape.assetData.Name, axShape.assetData.ImageUrl, 1); temp.addItem(itemLegend); + // 设置新增图形的名称/编号 + let Id = temp.shapeMap.get(axShape.assetData.Name).Index; + let index = "000"; + // 检查Id的长度 + if (Id < 10) { + index = axShape.assetData.Name + "00" + Id; + } else if (Id < 100) { + index = axShape.assetData.Name + "0" + Id; + } else { + index = axShape.assetData.Name + Id; + } + (axShape.assetData.PropertyInfos.find(i => i.PropertyName == "名称/编号")).PropertyValue = index; } this.emit('canvasDataChanged'); this.canvasData.isChange = true; @@ -721,6 +737,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV }); } } + /** * 创建确认绘制结束按钮 */ @@ -757,13 +774,13 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV case PaintMode.endPaint: break; case PaintMode.singlePointIcon: + // 整理数据 const json = JSON.parse(JSON.stringify(this.canvasData.selectTemplateData.propertyInfos)); const list = []; json.forEach(element => { const property = new PropertyInfo(element); list.push(property); }); - const assetData = { TemplateId: this.canvasData.selectTemplateData.id, CanConnect: this.canvasData.selectTemplateData.canConnect, @@ -793,7 +810,6 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV }; const singleIcon = new AxImageShape(assetData, this); this.emit('createIcon', singleIcon); - // this.emit('backgroundScale', this.backgroundImage.scale.x); break; case PaintMode.lineIcon: this.previewLineSegment.visible = true; @@ -859,18 +875,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV GameMode: this.canvasData.gameMode, Tag: this.canvasData.selectTemplateData.tag }; - // const assetData1 = { - // ImageUrl: this.canvasData.selectTemplateData.imageUrl, - // Point: new PIXI.Point(0, 0), - // Width: 32, - // Height: 32, - // MultiPoint: this.paintPoints, - // Name: this.canvasData.selectTemplateData.name - // }; this.paintingIcon = new MultipointIcon(assetData1, this); - // this.paintingIcon = new MultipointIcon(this.previewSinglePointIcon.texture, new PIXI.Point(0, 0), this.paintPoints, this, - // this.canvasData.selectTemplateData.name); - // this.emit('backgroundScale', this.backgroundImage.scale.x); break; case PaintMode.polygonIcon: this.previewLineSegment.visible = true; @@ -1427,6 +1432,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV this.enterPaintEndButton.visible = false; switch (this.paintMode) { case PaintMode.singlePointIcon: + break; case PaintMode.lineIcon: if (this.paintPoints.length >= 2) { From 3f0db36e47fc108144908351b8b37150fa82c2d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=8C=AF=E5=8D=87?= <359059686@qq.com> Date: Thu, 15 Apr 2021 15:55:44 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=A5=BC=E5=B1=82?= =?UTF-8?q?=E7=BC=96=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/canvas-share-data.service.ts | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/app/canvas-share-data.service.ts b/src/app/canvas-share-data.service.ts index 4fef136..401ff23 100644 --- a/src/app/canvas-share-data.service.ts +++ b/src/app/canvas-share-data.service.ts @@ -23,24 +23,23 @@ export class CanvasShareDataService { selectTemplateData: any; // 选择当前 模板数据 // 总平面图/建筑 楼层 - selectStorey:any = {area: '', details: ''}; // 选择当前 楼层 数据 - originalcompanyBuildingData:any; // 单位/建筑 数据 - originaleveryStoreyData:any; // 总平面图/楼层/区域 楼层数据 + selectStorey: any = { area: '', details: '' }; // 选择当前 楼层 数据 + originalcompanyBuildingData: any; // 单位/建筑 数据 + originaleveryStoreyData: any; // 总平面图/楼层/区域 楼层数据 // 总平面图/建筑 楼层 // 处置 节点 - allDisposalNode:any = []; // 所有 处置节点 - allNodeMarkers:any = { highlightMarkers:{}, markers:{} }; // 灾情 标签信息 - selectPanelPoint:DisposalNodeData = new DisposalNodeData(); // 当前数据节点 - selectPanelPointBaseData:any = {description: '', notes: '', weather: '', airTemperature: '', windDirection: '', windScale: ''}; // 当前 数据节点 对应 父级节点 - isInheritSky:any; //缓存 节点 天气 - customizeDisposalNode:any; // 新建 自定义数据节点 底图+名称 + allDisposalNode: any = []; // 所有 处置节点 + allNodeMarkers: any = { highlightMarkers: {}, markers: {} }; // 灾情 标签信息 + selectPanelPoint: DisposalNodeData = new DisposalNodeData(); // 当前数据节点 + selectPanelPointBaseData: any = { description: '', notes: '', weather: '', airTemperature: '', windDirection: '', windScale: '' }; // 当前 数据节点 对应 父级节点 + customizeDisposalNode: any; // 新建 自定义数据节点 底图+名称 // 处置 节点 /** * 游戏模式 */ - gameMode:GameMode = GameMode.BasicInformation; + gameMode: GameMode = GameMode.BasicInformation; facilityAssetsName = new Map([ ['消防水池', '消防水池'], @@ -263,6 +262,7 @@ export class CanvasShareDataService { important.Id = ''; important.ImageUrls = []; important.BuildingId = this.selectStorey.buildingId; + important.BuildingAreaId = item.FloorId; item.PropertyInfos.forEach(element => { if (element.PropertyName === '名称/编号') { important.Name = element.PropertyValue; @@ -409,6 +409,7 @@ export class BuildingAdjoinInfo { */ export class BuildingImportantLocationInfo { public BuildingId: string; + public BuildingAreaId: string; public Id: string; public Name: string; public Position: string;