From 9df449f462b904075b1f025c08217b421ae09f7e Mon Sep 17 00:00:00 2001 From: SHAOJIAHAO <55341701@qq.com> Date: Thu, 16 Dec 2021 14:17:49 +0800 Subject: [PATCH 01/12] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=E5=AE=8C=E5=96=84?= =?UTF-8?q?=E5=8D=B8=E6=B2=B9=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../oil-unloading-process-list.component.html | 12 ++++++------ .../oil-unloading-process-list.component.ts | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/app/pages/oil-unloading-process-list/oil-unloading-process-list.component.html b/src/app/pages/oil-unloading-process-list/oil-unloading-process-list.component.html index 40c7c30..76e4882 100644 --- a/src/app/pages/oil-unloading-process-list/oil-unloading-process-list.component.html +++ b/src/app/pages/oil-unloading-process-list/oil-unloading-process-list.component.html @@ -113,7 +113,7 @@ 油站名称
- 组织机构 + 公司名称
卸油开始时间 @@ -125,7 +125,7 @@ 操作前准备预警节点数量
- 操作后准备预警节点数量 + 操作中准备预警节点数量
全流程准备预警节点数量 @@ -142,10 +142,10 @@
- 油站名称 + {{item.gasStation.stationName}}
- 组织机构 + {{item.gasStation.companyName}}
{{item.startTime ? (item.startTime | date:"yyyy-MM-dd HH:mm:ss") : '/'}} @@ -157,14 +157,14 @@ {{item.proccessBeforeCount}}
- {{item.proccessAfterCount}} + {{item.proccessingCount}}
{{item.allProccessCount}}
+ *ngIf="item.proccessBeforeCount == 0 && item.proccessingCount == 0 && item.allProccessCount == 0; else elseTemplate"> 合规 diff --git a/src/app/pages/oil-unloading-process-list/oil-unloading-process-list.component.ts b/src/app/pages/oil-unloading-process-list/oil-unloading-process-list.component.ts index 980529a..01572e2 100644 --- a/src/app/pages/oil-unloading-process-list/oil-unloading-process-list.component.ts +++ b/src/app/pages/oil-unloading-process-list/oil-unloading-process-list.component.ts @@ -585,9 +585,9 @@ export class OilUnloadingProcessListComponent implements OnInit { }).subscribe((data: any) => { this.list = this.list.concat(data.result.items); this.list = [...this.list] - console.log('xxx',this.list) + // console.log('xxx',this.list) this.totalCount = data.result.totalCount - console.log('获取卸油流程列表', data.result.items) + // console.log('获取卸油流程列表', data.result.items) // this.getAggregations() }) } From 9d33d0f89eea1d12e863404552c4a47ac6e94aa7 Mon Sep 17 00:00:00 2001 From: SHAOJIAHAO <55341701@qq.com> Date: Thu, 16 Dec 2021 17:22:22 +0800 Subject: [PATCH 02/12] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=E5=AE=8C=E5=96=84?= =?UTF-8?q?=E4=BB=8A=E6=97=A5=E9=A2=84=E8=AD=A6=E9=A1=B5=E9=9D=A2=EF=BC=8C?= =?UTF-8?q?=E5=A4=84=E7=BD=AE=E9=A1=B5=E9=9D=A2=EF=BC=8C=E9=A6=96=E9=A1=B5?= =?UTF-8?q?ui?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../criminal-records-admin.component.html | 1 + .../criminal-records-admin.component.ts | 7 ++- .../criminal-records.component.html | 3 +- .../criminal-records.component.ts | 7 ++- .../pages/home-page/home-page.component.html | 36 +++++++++------ .../pages/home-page/home-page.component.scss | 32 +++++++------ .../pages/home-page/home-page.component.ts | 45 ++----------------- .../oil-unloading-process-list.component.ts | 10 ++++- .../pages/plan-admin/plan-admin.component.ts | 3 +- .../today-warning-admin.component.html | 24 +++++----- .../today-warning-admin.component.scss | 18 +++++--- .../today-warning-admin.component.ts | 12 ++--- .../get-out-of-line-details.component.html | 16 +++++-- .../get-out-of-line-details.component.scss | 7 ++- .../get-out-of-line-details.component.ts | 1 + .../today-warning.component.html | 15 ++++--- .../today-warning.component.scss | 8 ++++ .../today-warning/today-warning.component.ts | 8 ++-- 18 files changed, 139 insertions(+), 114 deletions(-) diff --git a/src/app/pages/criminal-records-admin/criminal-records-admin.component.html b/src/app/pages/criminal-records-admin/criminal-records-admin.component.html index fe67121..0fe3787 100644 --- a/src/app/pages/criminal-records-admin/criminal-records-admin.component.html +++ b/src/app/pages/criminal-records-admin/criminal-records-admin.component.html @@ -228,6 +228,7 @@ 处置 -->
+ + +
+
+ \ No newline at end of file diff --git a/src/app/pages/today-warning-admin/today-warning-admin.component.scss b/src/app/pages/today-warning-admin/today-warning-admin.component.scss index 50e2df7..473dd55 100644 --- a/src/app/pages/today-warning-admin/today-warning-admin.component.scss +++ b/src/app/pages/today-warning-admin/today-warning-admin.component.scss @@ -102,17 +102,14 @@ margin-bottom: 12px; background: linear-gradient(180deg, rgba(3, 0, 0, 0) 0%, rgba(0, 46, 91, 0.68) 100%); box-sizing: border-box; - padding-left: 20px; - padding-right: 60px; - + white-space: nowrap; div { font-size: 15px; text-align: left; + white-space: nowrap; overflow: hidden; text-overflow: ellipsis; - display: flex; - align-items: center; button { font-size: 15px; @@ -121,7 +118,15 @@ color: #91CCFF; } } - + .imgbox{ + span{ + img{ + width: 30%; + height: 30%; + margin-left: 15px; + } + } + } .propsm { display: inline-block; width: 38px; @@ -208,7 +213,6 @@ overflow-y: auto; box-sizing: border-box; padding: 16px 35px 16px 36px; - .listitem { height: 40px; line-height: 40px; diff --git a/src/app/pages/today-warning-admin/today-warning-admin.component.ts b/src/app/pages/today-warning-admin/today-warning-admin.component.ts index e4d9c77..01e11e0 100644 --- a/src/app/pages/today-warning-admin/today-warning-admin.component.ts +++ b/src/app/pages/today-warning-admin/today-warning-admin.component.ts @@ -25,7 +25,7 @@ export class TodayWarningAdminComponent implements OnInit { validateForm!: FormGroup; constructor(private http: HttpClient, private fb: FormBuilder, private router: Router, private toTree: TreeService, private modal: NzModalService, private viewContainerRef: ViewContainerRef, private navChangeService: NavChangeService, private message: NzMessageService) { } - + isSpin:boolean = false ngOnInit(): void { this.validateForm = this.fb.group({ level: [null], @@ -112,13 +112,14 @@ export class TodayWarningAdminComponent implements OnInit { disposalState = null } console.log(this.validateForm.value) + this.isSpin = true let params = { Level: this.validateForm.value.level, ViolationIds: ViolationIds, ViolateArea: this.validateForm.value.area, organizationUnitId: this.validateForm.value.organization, - ViolateTime: (this.validateForm.value.datePickerEnd && this.validateForm.value.datePickerStart) ? [moment(this.validateForm.value.datePickerStart).format('yyyy-MM-DD HH:mm:ss'), moment(this.validateForm.value.datePickerEnd).format('yyyy-MM-DD HH:mm:ss')] : null, - // ViolateTime: ['2021-10-27', '2021-11-26'], + // ViolateTime: (this.validateForm.value.datePickerEnd && this.validateForm.value.datePickerStart) ? [moment(this.validateForm.value.datePickerStart).format('yyyy-MM-DD HH:mm:ss'), moment(this.validateForm.value.datePickerEnd).format('yyyy-MM-DD HH:mm:ss')] : null, + ViolateTime: ['2021-10-27', '2021-11-26'], IsHandled: disposalState, IsContainsChildren: 'true', SkipCount: '0', @@ -130,7 +131,7 @@ export class TodayWarningAdminComponent implements OnInit { this.list = data.result.items this.totalCount = data.result.totalCount console.log('预警列表', this.list) - + this.isSpin = false let obj = { name: '改变数量', num: this.totalCount @@ -171,6 +172,7 @@ export class TodayWarningAdminComponent implements OnInit { isVisible = false look(item) { + console.log(item) const modal = this.modal.create({ nzContent: GetOutOfLineDetailsComponent, nzWrapClassName: "vertical-center-modal", @@ -188,7 +190,7 @@ export class TodayWarningAdminComponent implements OnInit { }, nzFooter: null, nzOnOk: async () => { - + console.log(99999,instance.content) } }); const instance = modal.getContentComponent(); diff --git a/src/app/pages/today-warning/get-out-of-line-details/get-out-of-line-details.component.html b/src/app/pages/today-warning/get-out-of-line-details/get-out-of-line-details.component.html index 878aa06..7c68539 100644 --- a/src/app/pages/today-warning/get-out-of-line-details/get-out-of-line-details.component.html +++ b/src/app/pages/today-warning/get-out-of-line-details/get-out-of-line-details.component.html @@ -5,7 +5,7 @@ 预警截图
-
+
预警视频
@@ -23,16 +23,24 @@
-
+
处置内容 - 提交 - 已处置 + 提交
+
+
+ 处置内容 + 已处置 +
+
+ {{content}} +
+
\ No newline at end of file diff --git a/src/app/pages/today-warning/get-out-of-line-details/get-out-of-line-details.component.scss b/src/app/pages/today-warning/get-out-of-line-details/get-out-of-line-details.component.scss index 8d6c8ee..c89cc5d 100644 --- a/src/app/pages/today-warning/get-out-of-line-details/get-out-of-line-details.component.scss +++ b/src/app/pages/today-warning/get-out-of-line-details/get-out-of-line-details.component.scss @@ -93,10 +93,13 @@ } } - + .disposebox2{ + height: 40px; + } .imgbox { flex: 1; display: flex; + align-items: center; width: 100%; .imglist { @@ -147,6 +150,8 @@ .vediobox { flex: 1; width: 100%; + display: flex; + align-items: center; video{ max-height: 500px; } diff --git a/src/app/pages/today-warning/get-out-of-line-details/get-out-of-line-details.component.ts b/src/app/pages/today-warning/get-out-of-line-details/get-out-of-line-details.component.ts index fb97bce..2401989 100644 --- a/src/app/pages/today-warning/get-out-of-line-details/get-out-of-line-details.component.ts +++ b/src/app/pages/today-warning/get-out-of-line-details/get-out-of-line-details.component.ts @@ -38,6 +38,7 @@ export class GetOutOfLineDetailsComponent implements OnInit { this.http.post('/api/services/app/ViolateRecord/HandleViolateRecord', body).subscribe(data => { this.message.create('success', '处置成功!'); this.data.handleTime = new Date() + this.data.handleRecord = this.content }) } } diff --git a/src/app/pages/today-warning/today-warning.component.html b/src/app/pages/today-warning/today-warning.component.html index befdc06..0a26e89 100644 --- a/src/app/pages/today-warning/today-warning.component.html +++ b/src/app/pages/today-warning/today-warning.component.html @@ -76,9 +76,9 @@ -
+
-
+
@@ -109,7 +109,7 @@ 预警类型: {{item.violation.violationType}}
- 预警信息: {{item.violation.violationName}} + 预警信息: {{item.violation.eventSystemName}}
区域: {{item.violateArea}} @@ -117,7 +117,7 @@
摄像头: {{item.cameraNo}}
-
+
{{item.violateTime | date:"yyyy-MM-dd HH:mm:ss"}}
@@ -128,11 +128,12 @@ 已处置
-
+
- - 已处置 +
+
\ No newline at end of file diff --git a/src/app/pages/today-warning/today-warning.component.scss b/src/app/pages/today-warning/today-warning.component.scss index ad0c680..fb6333f 100644 --- a/src/app/pages/today-warning/today-warning.component.scss +++ b/src/app/pages/today-warning/today-warning.component.scss @@ -113,6 +113,14 @@ color: #91CCFF; } } + .imgbox{ + span{ + img{ + width: 30%; + height: 80%; + } + } + } } .dispositioned { diff --git a/src/app/pages/today-warning/today-warning.component.ts b/src/app/pages/today-warning/today-warning.component.ts index 7e68090..6c0df6a 100644 --- a/src/app/pages/today-warning/today-warning.component.ts +++ b/src/app/pages/today-warning/today-warning.component.ts @@ -54,6 +54,7 @@ export class TodayWarningComponent implements OnInit { list: any = [ ] totalCount: string //预警总数 + isSpin:boolean = false getEarlyWarningList() { let ViolationIds = [] if (this.validateForm.value.type) { @@ -74,20 +75,21 @@ export class TodayWarningComponent implements OnInit { ViolationIds: ViolationIds, ViolateArea: this.validateForm.value.area, organizationUnitId: JSON.parse(sessionStorage.getItem('userdataOfgasstation')).organization.id, - ViolateTime: (this.validateForm.value.datePickerEnd && this.validateForm.value.datePickerStart) ? [moment(this.validateForm.value.datePickerStart).format('yyyy-MM-DD HH:mm:ss'), moment(this.validateForm.value.datePickerEnd).format('yyyy-MM-DD HH:mm:ss')] : null, + // ViolateTime: (this.validateForm.value.datePickerEnd && this.validateForm.value.datePickerStart) ? [moment(this.validateForm.value.datePickerStart).format('yyyy-MM-DD HH:mm:ss'), moment(this.validateForm.value.datePickerEnd).format('yyyy-MM-DD HH:mm:ss')] : null, IsHandled: disposalState, - // ViolateTime: ['2021-10-27', '2021-11-26'], + ViolateTime: ['2021-10-27', '2021-11-26'], IsContainsChildren: 'true', SkipCount: '0', MaxResultCount: '9999' } + this.isSpin = true this.http.get('/api/services/app/ViolateRecord/GetAll', { params: params }).subscribe((data: any) => { this.list = data.result.items this.totalCount = data.result.totalCount console.log('预警列表', this.list) - + this.isSpin = false let obj = { name: '改变数量', num: this.totalCount From fe5bfebfe268eed9449b773d397f439da29d5099 Mon Sep 17 00:00:00 2001 From: cpf <1105965053@qq.com> Date: Fri, 17 Dec 2021 09:01:16 +0800 Subject: [PATCH 03/12] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=9F=BA=E6=9C=AC?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/pages/left-domain/left-domain.component.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/app/pages/left-domain/left-domain.component.ts b/src/app/pages/left-domain/left-domain.component.ts index ca5f930..b503fc1 100644 --- a/src/app/pages/left-domain/left-domain.component.ts +++ b/src/app/pages/left-domain/left-domain.component.ts @@ -396,8 +396,15 @@ export class LeftDomainComponent implements OnInit { //关闭 编辑信息/导出Excel 弹窗 closeBaseInfoDialog() { - sessionStorage.setItem('userdata', this.originalData) - this.isShowBaseDialog = false + PlanComponent.instance.isShowLoading = true + let params = { organizationUnitId: PlanComponent.instance.companyData.id } + this.http.get('/api/services/app/GasStation/Get', { params: params }).subscribe((data: any) => { + data.result.govUnitDetail ? data.result.govUnitDetail = JSON.parse(data.result.govUnitDetail) : null + this.baseInfo = data.result + sessionStorage.setItem('userdata', this.originalData) + this.isShowBaseDialog = false + PlanComponent.instance.isShowLoading = false + }) } } From ba71583f2c624771b7ca7a457f8a76d41c0f5bb6 Mon Sep 17 00:00:00 2001 From: SHAOJIAHAO <55341701@qq.com> Date: Fri, 17 Dec 2021 09:07:19 +0800 Subject: [PATCH 04/12] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=E5=AE=8C=E5=96=84?= =?UTF-8?q?=E9=A6=96=E9=A1=B5=E5=8E=BB=E6=8E=89=E5=85=AC=E5=8F=B8=E6=8E=92?= =?UTF-8?q?=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/home-page/home-page.component.html | 10 ++++---- .../pages/home-page/home-page.component.scss | 10 ++++---- .../pages/home-page/home-page.component.ts | 24 +++++++++++++++---- 3 files changed, 30 insertions(+), 14 deletions(-) diff --git a/src/app/pages/home-page/home-page.component.html b/src/app/pages/home-page/home-page.component.html index 3542ff6..2bc5ff4 100644 --- a/src/app/pages/home-page/home-page.component.html +++ b/src/app/pages/home-page/home-page.component.html @@ -45,7 +45,7 @@
-
+
事件排名
@@ -124,7 +124,7 @@ {{key + 1}}
- {{item.name}} {{item.companyName}} + {{item.companyName}} {{item.name}}
@@ -250,14 +250,14 @@ {{HomeAggregatioData.ouViolationType.ouTotalCount}}
-
+
diff --git a/src/app/pages/home-page/home-page.component.scss b/src/app/pages/home-page/home-page.component.scss index 5b85e5f..0a93e86 100644 --- a/src/app/pages/home-page/home-page.component.scss +++ b/src/app/pages/home-page/home-page.component.scss @@ -572,8 +572,8 @@ .oilNum { position: absolute; - left: 6%; - bottom: 15px; + left: 4%; + bottom: 22px; display: flex; flex-direction: column; @@ -582,15 +582,17 @@ align-items: center; justify-content: space-between; color: white; - font-size: 12px; + font-size: 13px; span { margin: 0 4px; } - .pointbox{ + + .pointbox { display: flex; align-items: center; } + .point { width: 6px; height: 6px; diff --git a/src/app/pages/home-page/home-page.component.ts b/src/app/pages/home-page/home-page.component.ts index 2494f58..4f5a998 100644 --- a/src/app/pages/home-page/home-page.component.ts +++ b/src/app/pages/home-page/home-page.component.ts @@ -132,7 +132,7 @@ export class HomePageComponent implements OnInit { }, series: [ { - data: [], + data: [4000, 3000, 4000, 4000, 4000, 4000, 3000, 4000, 4000, 4000, 4000, 3000, 4000, 4000, 4000, 4000, 3000, 4000, 4000, 4000, 4000, 3000, 4000, 4000, 4000, 4000, 3000, 4000, 4000, 4000,], type: 'bar', itemStyle: { color: { @@ -152,12 +152,26 @@ export class HomePageComponent implements OnInit { barWidth: '35%' }, { - data: [], + data: [4000, 3000, 4000, 4000, 4000, 4000, 3000, 4000, 4000, 4000, 4000, 3000, 4000, 4000, 4000, 4000, 3000, 4000, 4000, 4000, 4000, 3000, 4000, 4000, 4000, 4000, 3000, 4000, 4000, 4000,], type: 'line', symbol: 'circle', symbolSize: 5, label: { - show: true + normal: { + show: true, + // formatter: function (dataObj) { + // const { dataIndex, value } = dataObj; + // let labelText = value; + + // labelText = ''; + // if (dataIndex % 2 === 0) { // 每隔三个x坐标显示一个 + // labelText = value; + // } + + // return `${labelText}` + // } + } + }, itemStyle: { color: '#fff', @@ -171,7 +185,7 @@ export class HomePageComponent implements OnInit { } ], grid: { - left: '18px', + left: '40px', right: '30px', bottom: '38px', top: '30px' @@ -341,7 +355,7 @@ export class HomePageComponent implements OnInit { // itemHeight: 8, // }, grid: { - left: '36px', + left: '40px', right: '30px', bottom: '38px', top: '66px' From a0c62d77cf71cc388f034ab6c3d9ca6660508f63 Mon Sep 17 00:00:00 2001 From: cpf <1105965053@qq.com> Date: Fri, 17 Dec 2021 09:10:40 +0800 Subject: [PATCH 05/12] =?UTF-8?q?=E5=AD=97=E6=AE=B5=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/pages/init3D.guard.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/pages/init3D.guard.ts b/src/app/pages/init3D.guard.ts index 7aaf270..e325730 100644 --- a/src/app/pages/init3D.guard.ts +++ b/src/app/pages/init3D.guard.ts @@ -25,7 +25,7 @@ export class init3DGuard implements CanActivate { if (userdata.userName == 'superadmin' || res.hasBuildingInfo) { return true } else { - this.message.info("当前站点没有数字油站!"); + this.message.info("当前油站未开通!"); return false } }); From 39365f964983538d0cde579c16f3824460a3ab2d Mon Sep 17 00:00:00 2001 From: SHAOJIAHAO <55341701@qq.com> Date: Fri, 17 Dec 2021 09:22:14 +0800 Subject: [PATCH 06/12] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=E6=A0=B9=E6=8D=AE?= =?UTF-8?q?=E8=A6=81=E6=B1=82=E4=BF=AE=E6=94=B9ui=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/pages/home-page/home-page.component.ts | 4 ++-- src/app/system-management/user/user.component.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/pages/home-page/home-page.component.ts b/src/app/pages/home-page/home-page.component.ts index 4f5a998..eae4f74 100644 --- a/src/app/pages/home-page/home-page.component.ts +++ b/src/app/pages/home-page/home-page.component.ts @@ -23,7 +23,7 @@ export class HomePageComponent implements OnInit { }, legend: { top: '5%', - left: '20%', + left: '25.5%', itemGap: 8, itemWidth: 6, itemHeight: 6, @@ -199,7 +199,7 @@ export class HomePageComponent implements OnInit { }, legend: { top: '5%', - left: '20%', + left: '25%', itemGap: 8, itemWidth: 6, itemHeight: 6, diff --git a/src/app/system-management/user/user.component.html b/src/app/system-management/user/user.component.html index ff7193e..15d33b8 100644 --- a/src/app/system-management/user/user.component.html +++ b/src/app/system-management/user/user.component.html @@ -37,7 +37,7 @@ {{ data.userName }} {{ data.name }} - {{item}} + {{item}}
- 事件排名 + 近30天事件排名
@@ -112,7 +112,7 @@
- 油站排名 + 近30天油站排名
@@ -168,7 +168,7 @@
- +
@@ -204,11 +204,11 @@
- +
- 预警事件统计 + 近30天预警事件统计
diff --git a/src/app/pages/home-page/home-page.component.scss b/src/app/pages/home-page/home-page.component.scss index 0a93e86..3908710 100644 --- a/src/app/pages/home-page/home-page.component.scss +++ b/src/app/pages/home-page/home-page.component.scss @@ -582,7 +582,7 @@ align-items: center; justify-content: space-between; color: white; - font-size: 13px; + font-size: 14px; span { margin: 0 4px; diff --git a/src/app/pages/home-page/home-page.component.ts b/src/app/pages/home-page/home-page.component.ts index 902e79a..09251e4 100644 --- a/src/app/pages/home-page/home-page.component.ts +++ b/src/app/pages/home-page/home-page.component.ts @@ -6,6 +6,8 @@ import * as moment from 'moment'; import { NzModalService } from 'ng-zorro-antd/modal'; import { GetOutOfLineDetailsComponent } from '../today-warning/get-out-of-line-details/get-out-of-line-details.component'; import { NzMessageService } from 'ng-zorro-antd/message'; + +declare var tools @Component({ selector: 'app-home-page', templateUrl: './home-page.component.html', @@ -238,7 +240,7 @@ export class HomePageComponent implements OnInit { active: { fontSize: document.documentElement.clientHeight < 750 ? 12 : 14, color: '#fff', - fontFamily: 'Microsoft YaHei', + // fontFamily: 'Microsoft YaHei', }, } }, @@ -414,6 +416,10 @@ export class HomePageComponent implements OnInit { // this.getAggregations() + setTimeout(() => { + this.getHomeAggregation() + }, 10 * 6000); + } //获得所有未读消息 @@ -489,6 +495,8 @@ export class HomePageComponent implements OnInit { } //预警图表 equipmentechartdata + tools1 + tools2 eventEcharts(data) { data.violationType.violationTypeAgg.forEach(element => { // num += element.count @@ -496,9 +504,16 @@ export class HomePageComponent implements OnInit { element.value = element.count }); this.warningechartpieOption.series[0].data = data.violationType.violationTypeAgg; - this.warningechartpieOption.series[0].label.normal.formatter = '{total|' + data.recordCount + '}' + '\n\r' + '{active|总数}' + this.warningechartpieOption.series[0].label.normal.formatter = '{total|' + data.recordCount + '}' + '\n\r' + '{active|预警事件}' this.warningechartpie.setOption(this.warningechartpieOption); + // 可调用clearLoop方法,清除定时器 + this.tools1 && this.tools1.clearLoop(); + this.tools1 = null; + this.tools1 = tools.loopShowTooltip(this.warningechartpie, this.warningechartpieOption, { + interval: 5000, + loopSeries: true + }); let monthArr = [] let valuedata = [] @@ -542,10 +557,17 @@ export class HomePageComponent implements OnInit { element.value = element.count }); this.oilchartpieOptionPieData1 = data.ouViolationType.ouViolationTypeAgg - this.oilchartpieOption.series[0].label.normal.formatter = '{total|' + data.ouRecordCount + '}' + '\n\r' + '{active|总数}' + this.oilchartpieOption.series[0].label.normal.formatter = '{total|' + data.ouRecordCount + '}' + '\n\r' + '{active|卸油预警}' this.oilchartpieOption.series[0].data = this.oilchartpieOptionPieData1 this.oilchartpie.setOption(this.oilchartpieOption); + // 可调用clearLoop方法,清除定时器 + this.tools2 && this.tools2.clearLoop(); + this.tools2 = null; + this.tools2 = tools.loopShowTooltip(this.oilchartpie, this.oilchartpieOption, { + interval: 5000, + loopSeries: true + }); //柱状图 let monthArr = [] let valuedata = [] diff --git a/src/app/pages/oil-unloading-process-list/oil-unloading-process-list.component.html b/src/app/pages/oil-unloading-process-list/oil-unloading-process-list.component.html index 76e4882..b44e4dd 100644 --- a/src/app/pages/oil-unloading-process-list/oil-unloading-process-list.component.html +++ b/src/app/pages/oil-unloading-process-list/oil-unloading-process-list.component.html @@ -83,7 +83,7 @@ --> - +
@@ -115,10 +115,13 @@
公司名称
-
+
+ 区域 +
+
卸油开始时间
-
+
卸油结束时间
@@ -147,10 +150,13 @@
{{item.gasStation.companyName}}
-
+
+ {{item.gasStation.locationName}} +
+
{{item.startTime ? (item.startTime | date:"yyyy-MM-dd HH:mm:ss") : '/'}}
-
+
{{item.endTime ? (item.endTime | date:"yyyy-MM-dd HH:mm:ss") : '/'}}
diff --git a/src/app/pages/oil-unloading-process-list/oil-unloading-process-list.component.scss b/src/app/pages/oil-unloading-process-list/oil-unloading-process-list.component.scss index 6ee4fb0..83fc3a7 100644 --- a/src/app/pages/oil-unloading-process-list/oil-unloading-process-list.component.scss +++ b/src/app/pages/oil-unloading-process-list/oil-unloading-process-list.component.scss @@ -16,7 +16,7 @@ width: 100%; height: 32px; display: flex; - justify-content: space-around; + justify-content: flex-start; .searchParams, .btn { @@ -24,11 +24,15 @@ } .searchParams { - flex: 10; + // flex: 10; + width: 150px; + + } + .searchParams2{ + width: 220px; } - .btn { - flex: 1; + // flex: 1; } nz-select { diff --git a/src/app/pages/oil-unloading-process-list/oil-unloading-process-list.component.ts b/src/app/pages/oil-unloading-process-list/oil-unloading-process-list.component.ts index cab2ed9..cb20acd 100644 --- a/src/app/pages/oil-unloading-process-list/oil-unloading-process-list.component.ts +++ b/src/app/pages/oil-unloading-process-list/oil-unloading-process-list.component.ts @@ -593,7 +593,7 @@ export class OilUnloadingProcessListComponent implements OnInit { this.list = [...this.list] // console.log('xxx',this.list) this.totalCount = data.result.totalCount - // console.log('获取卸油流程列表', data.result.items) + console.log('获取卸油流程列表', data.result.items) // this.getAggregations() }) } diff --git a/src/app/pages/plan-admin/plan-admin.component.ts b/src/app/pages/plan-admin/plan-admin.component.ts index d421079..6c4445c 100644 --- a/src/app/pages/plan-admin/plan-admin.component.ts +++ b/src/app/pages/plan-admin/plan-admin.component.ts @@ -38,7 +38,8 @@ export class PlanAdminComponent implements OnInit { OrganizationUnitId: String(this.OrganizationUnitId), IsContainsChildren: 'true', SkipCount: this.SkipCount, - MaxResultCount: this.MaxResultCount + MaxResultCount: this.MaxResultCount, + Sorting:' BuildingBasicInfo.Id asc' } await new Promise((resolve, reject) => { this.http.get('/api/services/app/GasStation/GetAll', { @@ -65,7 +66,9 @@ export class PlanAdminComponent implements OnInit { OrganizationUnitId: String(this.OrganizationUnitId), IsContainsChildren: 'true', SkipCount: '0', - MaxResultCount: this.MaxResultCount + MaxResultCount: this.MaxResultCount, + Sorting:' BuildingBasicInfo.Id asc' + } this.http.get('/api/services/app/GasStation/GetAll', { params: params @@ -85,7 +88,8 @@ export class PlanAdminComponent implements OnInit { OrganizationUnitId: String(this.OrganizationUnitId), IsContainsChildren: 'true', SkipCount: '0', - MaxResultCount: this.MaxResultCount + MaxResultCount: this.MaxResultCount, + Sorting:' BuildingBasicInfo.Id asc' } this.http.get('/api/services/app/GasStation/GetAll', { params: params @@ -118,12 +122,16 @@ export class PlanAdminComponent implements OnInit { const element = data.result.items[index]; element.key = element.id element.title = element.displayName + // if(element.parentId == OrganizationUnitId){ + // element.isLeaf = true + // } } - + console.log('组织机构', data.result.items) this.nodes = [...this.toTree.toTree(data.result.items)] + this.nzExpandedKeys = [OrganizationUnitId] this.nzSelectedKeys = [OrganizationUnitId] this.OrganizationUnitId = OrganizationUnitId - this.nzExpandAll = true + // this.nzExpandAll = true this.getGasStation() }) } @@ -172,7 +180,7 @@ export class PlanAdminComponent implements OnInit { IsContainsChildren: 'true', SkipCount: this.SkipCount, MaxResultCount: this.MaxResultCount, - // Sorting:'hasBuildingInfo' + Sorting:' BuildingBasicInfo.Id asc' } await new Promise((resolve, reject) => { this.http.get('/api/services/app/GasStation/GetAll', { diff --git a/src/app/pages/today-warning-admin/today-warning-admin.component.scss b/src/app/pages/today-warning-admin/today-warning-admin.component.scss index 473dd55..c508376 100644 --- a/src/app/pages/today-warning-admin/today-warning-admin.component.scss +++ b/src/app/pages/today-warning-admin/today-warning-admin.component.scss @@ -54,7 +54,7 @@ width: 100%; height: 32px; display: flex; - justify-content: space-around; + justify-content: flex-start; .searchParams, .btn { @@ -62,12 +62,12 @@ } .searchParams { - flex: 3; - // max-width: 100px; + // flex: 3; + width: 150px; } .btn { - flex: 1; + // flex: 1; } nz-select { diff --git a/src/app/pages/today-warning/get-out-of-line-details/get-out-of-line-details.component.html b/src/app/pages/today-warning/get-out-of-line-details/get-out-of-line-details.component.html index 7c68539..fe01efd 100644 --- a/src/app/pages/today-warning/get-out-of-line-details/get-out-of-line-details.component.html +++ b/src/app/pages/today-warning/get-out-of-line-details/get-out-of-line-details.component.html @@ -5,42 +5,41 @@ 预警截图
-
+
预警视频
+
+ 预警详情:{{details}} +
-
- {{details}} -
-
- -
+
-
-
- 处置内容 - 提交 -
-
- -
+
+
+
+ 处置内容 + 提交 + 已处置
-
-
- 处置内容 - 已处置 -
-
- {{content}} -
+
+ + {{content}} +
+
+ + 处置人:{{data.handleUsername}} + + + 处置时间:{{data.handleTime|date:"yyyy-MM-dd HH:mm:ss"}} +
-
\ No newline at end of file diff --git a/src/app/pages/today-warning/get-out-of-line-details/get-out-of-line-details.component.scss b/src/app/pages/today-warning/get-out-of-line-details/get-out-of-line-details.component.scss index c89cc5d..9aa63d7 100644 --- a/src/app/pages/today-warning/get-out-of-line-details/get-out-of-line-details.component.scss +++ b/src/app/pages/today-warning/get-out-of-line-details/get-out-of-line-details.component.scss @@ -1,7 +1,7 @@ .box { width: 100%; height: 715px; - overflow-y: auto; + // overflow-y: auto; color: #fff; display: flex; flex-direction: column; @@ -54,111 +54,87 @@ } } -.ant-modal-close { - color: #fff; +.details { + width: 100%; + height: 45px; + line-height: 45px; + box-sizing: border-box; + padding: 0 12px; } .content { flex: 1; - box-sizing: border-box; - padding: 12px; overflow: hidden; - display: flex; - flex-direction: column; - overflow-y: auto; - .details { - margin-bottom: 12px; - } - .disposebox { + .imgbox { + width: 100%; + height: 100%; display: flex; - flex-direction: column; - height: 72px; - margin-bottom: 25px; - .title { - display: flex; - justify-content: space-between; - margin-bottom: 12px; - - } - - .textarea { - height: 60px; - - textarea { - color: #C4E2FC; - border: 1px solid #91CCFF; - background-color: #172c45; - } + align-items: center; + justify-content: center; + img { + max-width: 100%; + max-height: 100%; } } - .disposebox2{ - height: 40px; - } - .imgbox { - flex: 1; + + .vediobox { + width: 100%; + height: 100%; display: flex; align-items: center; - width: 100%; - - .imglist { - display: flex; - flex-direction: column; - width: 196px; - height: 100%; - overflow-y: auto; - box-sizing: border-box; - padding-right: 12px; - border-right: 1px solid rgba(145, 204, 255, 0.3); - - .imglisttitle { - font-size: 16px; - font-family: sybold; - margin-bottom: 16px; - } - - .img { - width: 178px; - height: 108px; - margin-bottom: 8px; + justify-content: center; - img { - width: 100%; - height: 100%; - cursor: pointer; - } - } + video { + max-width: 100%; + max-height: 100%; } + } +} - .bigimg { - // min-width: 1149px; - flex: 1; - box-sizing: border-box; - padding-left: 13px; - display: flex; - justify-content: center; - max-height: 500px; - - img { - max-width: 100%; - max-height: 100%; - } - } +.disposebox { + width: 100%; + height: 95px; + box-sizing: border-box; + padding: 5px 12px; + display: flex; + flex-direction: column; + + .title { + display: flex; + justify-content: space-between; } - .vediobox { - flex: 1; - width: 100%; + .disposeContent { display: flex; align-items: center; - video{ - max-height: 500px; + textarea { + width: 100%; + height: 40px; + color: #C4E2FC; + border: 1px solid #91CCFF; + background-color: #172c45; + } + span{ + display: inline-block; + width: 100%; + height: 40px; + line-height: 40px; } } + + .disposeTime {} + +} + +.ant-modal-close { + color: #fff; } + + // 适配125% @media screen and (max-height: 750px) { .box { @@ -239,4 +215,4 @@ ::-webkit-scrollbar-track { background-color: #061d3c; -} \ No newline at end of file +} diff --git a/src/app/pages/today-warning/today-warning.component.html b/src/app/pages/today-warning/today-warning.component.html index 0a26e89..244f83e 100644 --- a/src/app/pages/today-warning/today-warning.component.html +++ b/src/app/pages/today-warning/today-warning.component.html @@ -75,7 +75,6 @@
-
diff --git a/src/app/pages/today-warning/today-warning.component.scss b/src/app/pages/today-warning/today-warning.component.scss index fb6333f..0977630 100644 --- a/src/app/pages/today-warning/today-warning.component.scss +++ b/src/app/pages/today-warning/today-warning.component.scss @@ -54,7 +54,7 @@ width: 100%; height: 32px; display: flex; - justify-content: space-around; + justify-content: flex-start; .searchParams, .btn { @@ -62,11 +62,12 @@ } .searchParams { - flex: 2.9; + // flex: 2.9; + width: 150px; } .btn { - flex: 1; + // flex: 1; } nz-select { diff --git a/src/assets/js/echarts-tooltip-carousel.js b/src/assets/js/echarts-tooltip-carousel.js new file mode 100644 index 0000000..17dd997 --- /dev/null +++ b/src/assets/js/echarts-tooltip-carousel.js @@ -0,0 +1,229 @@ +/** + * Created by chengwb on 2016/9/3. + */ +(function (global) { + global.tools = global.tools || {}; + + /** + * echarts tooltip轮播 + * @param chart ECharts实例 + * @param chartOption echarts的配置信息 + * @param options object 选项 + * { + * interval 轮播时间间隔,单位毫秒,默认为2000 + * loopSeries boolean类型,默认为false。 + * true表示循环所有series的tooltip,false则显示指定seriesIndex的tooltip + * seriesIndex 默认为0,指定某个系列(option中的series索引)循环显示tooltip, + * 当loopSeries为true时,从seriesIndex系列开始执行。 + * updateData 自定义更新数据的函数,默认为null; + * 用于类似于分页的效果,比如总数据有20条,chart一次只显示5条,全部数据可以分4次显示。 + * } + * @returns {{clearLoop: clearLoop}} + */ + tools.loopShowTooltip = function (chart, chartOption, options) { + let defaultOptions = { + interval: 2000, + loopSeries: false, + seriesIndex: 0, + updateData: null + }; + + if (!chart || !chartOption) { + return; + } + + let dataIndex = 0; // 数据索引,初始化为-1,是为了判断是否是第一次执行 + let seriesIndex = 0; // 系列索引 + let timeTicket = 0; + let seriesLen = chartOption.series.length; // 系列个数 + let dataLen = 0; // 某个系列数据个数 + let chartType; // 系列类型 + let first = true; + let lastShowSeriesIndex = 0; + let lastShowDataIndex = 0; + if (seriesLen === 0) { + return; + } + + //待处理列表 + //不循环series时seriesIndex指定显示tooltip的系列,不指定默认为0,指定多个则默认为第一个 + //循环series时seriesIndex指定循环的series,不指定则从0开始循环所有series,指定单个则相当于不循环,指定多个 + //要不要添加开始series索引和开始的data索引? + + if (options) { + options.interval = options.interval || defaultOptions.interval; + options.loopSeries = options.loopSeries || defaultOptions.loopSeries; + options.seriesIndex = options.seriesIndex || defaultOptions.seriesIndex; + options.updateData = options.updateData || defaultOptions.updateData; + } else { + options = defaultOptions; + } + + //如果设置的seriesIndex无效,则默认为0 + if (options.seriesIndex < 0 || options.seriesIndex >= seriesLen) { + seriesIndex = 0; + } else { + seriesIndex = options.seriesIndex; + } + + /** + * 清除定时器 + */ + function clearLoop() { + if (timeTicket) { + clearInterval(timeTicket); + timeTicket = 0; + } + chart.off('mousemove', stopAutoShow); + zRender.off('mousemove', zRenderMouseMove); + zRender.off('globalout', zRenderGlobalOut); + } + + /** + * 取消高亮 + */ + function cancelHighlight() { + /** + * 如果dataIndex为0表示上次系列完成显示,如果是循环系列,且系列索引为0则上次是seriesLen-1,否则为seriesIndex-1; + * 如果不是循环系列,则就是当前系列; + * 如果dataIndex>0则就是当前系列。 + */ + let tempSeriesIndex = dataIndex === 0 ? + (options.loopSeries ? + (seriesIndex === 0 ? seriesLen - 1 : seriesIndex - 1) : + seriesIndex) : + seriesIndex; + let tempType = chartOption.series[tempSeriesIndex].type; + + if (tempType === 'pie' || tempType === 'radar') { + chart.dispatchAction({ + type: 'downplay', + seriesIndex: lastShowSeriesIndex, + dataIndex: lastShowDataIndex + }); //wait 系列序号为0且循环系列,则要判断上次的系列类型是否是pie、radar + } + } + + /** + * 自动轮播tooltip + */ + function autoShowTip() { + let invalidSeries = 0; + let invalidData = 0; + + function showTip() { + //判断是否更新数据 + if (dataIndex === 0 && !first && typeof options.updateData === "function") { + options.updateData(); + chart.setOption(chartOption); + } + + let series = chartOption.series; + let currSeries = series[seriesIndex]; + if (!series || series.length === 0 || + !currSeries || !currSeries.type || !currSeries.data || + !currSeries.data.length) { + return; + } + chartType = currSeries.type; // 系列类型 + dataLen = currSeries.data.length; // 某个系列的数据个数 + + let tipParams = { + seriesIndex: seriesIndex + }; + switch (chartType) { + case 'pie': + case 'map': + case 'chord': + tipParams.name = currSeries.data[dataIndex].name; + break; + case 'radar': // 雷达图 + tipParams.seriesIndex = seriesIndex; + tipParams.dataIndex = dataIndex; + break; + default: + tipParams.dataIndex = dataIndex; + break; + } + + if (chartType === 'pie' || chartType === 'radar') { + if (!first) { + cancelHighlight(); + } + + // 高亮当前图形 + chart.dispatchAction({ + type: 'highlight', + seriesIndex: seriesIndex, + dataIndex: dataIndex + }); + } + + // 显示 tooltip + tipParams.type = 'showTip'; + + // 防止updateData时先处理tooltip后刷新数据导出tooltip显示不正确 + setTimeout(() => { + chart.dispatchAction(tipParams); + }, 0); + + lastShowSeriesIndex = seriesIndex; + lastShowDataIndex = dataIndex; + dataIndex = (dataIndex + 1) % dataLen; + if (options.loopSeries && dataIndex === 0) { // 数据索引归0表示当前系列数据已经循环完 + invalidData = 0; + seriesIndex = (seriesIndex + 1) % seriesLen; + if (seriesIndex === options.seriesIndex) { + invalidSeries = 0; + } + } + + first = false; + } + + showTip(); + timeTicket = setInterval(showTip, options.interval); + } + + // 关闭轮播 + function stopAutoShow() { + if (timeTicket) { + clearInterval(timeTicket); + timeTicket = 0; + + if (chartType === 'pie' || chartType === 'radar') { + cancelHighlight(); + } + } + } + + let zRender = chart.getZr(); + + function zRenderMouseMove(param) { + if (param.event) { + //阻止canvas上的鼠标移动事件冒泡 + param.event.cancelBubble = true; + } + + stopAutoShow(); + } + + // 离开echarts图时恢复自动轮播 + function zRenderGlobalOut() { + if (!timeTicket) { + autoShowTip(); + } + } + + // 鼠标在echarts图上时停止轮播 + chart.on('mousemove', stopAutoShow); + zRender.on('mousemove', zRenderMouseMove); + zRender.on('globalout', zRenderGlobalOut); + + autoShowTip(); + + return { + clearLoop: clearLoop + }; + }; +})(window); diff --git a/src/index.html b/src/index.html index 15e4416..cda1af7 100644 --- a/src/index.html +++ b/src/index.html @@ -11,4 +11,5 @@ + From 45869519c4cae73cdbf0be320d42402f70072088 Mon Sep 17 00:00:00 2001 From: SHAOJIAHAO <55341701@qq.com> Date: Fri, 24 Dec 2021 08:42:00 +0800 Subject: [PATCH 12/12] =?UTF-8?q?[=E5=AE=8C=E5=96=84]decs=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E5=93=A6content1=EF=BC=9B=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E9=A6=96=E9=A1=B5=E5=B1=95=E7=A4=BA=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/home-page/home-page.component.html | 6 +-- .../pages/home-page/home-page.component.ts | 2 +- src/app/pages/home/home.component.ts | 2 +- .../get-out-of-line-details.component.ts | 2 +- .../organization/organization.component.ts | 45 ++++++++++--------- 5 files changed, 31 insertions(+), 26 deletions(-) diff --git a/src/app/pages/home-page/home-page.component.html b/src/app/pages/home-page/home-page.component.html index 7f1836f..a10225d 100644 --- a/src/app/pages/home-page/home-page.component.html +++ b/src/app/pages/home-page/home-page.component.html @@ -82,7 +82,7 @@
-
+
{{'0' + (key + 1)}} @@ -91,7 +91,7 @@ {{key + 1}}
- {{item.key}} + {{item.eventSystemName}}
@@ -124,7 +124,7 @@ {{key + 1}}
- {{item.companyName}} {{item.name}} + {{item.companyName}} {{item.stationName}}
diff --git a/src/app/pages/home-page/home-page.component.ts b/src/app/pages/home-page/home-page.component.ts index 09251e4..87bce44 100644 --- a/src/app/pages/home-page/home-page.component.ts +++ b/src/app/pages/home-page/home-page.component.ts @@ -696,7 +696,7 @@ export class HomePageComponent implements OnInit { look(item) { // console.log(item) if (item.notification.data.eventSystemName == '灭火器维护' || item.notification.data.eventSystemName == '证照预警') { - this.message.create('warning', item.notification.data.desc); + this.message.create('warning', item.notification.data.content1); } else { this.isOpenModel = true let data = { diff --git a/src/app/pages/home/home.component.ts b/src/app/pages/home/home.component.ts index 28d79ca..fc3d4fb 100644 --- a/src/app/pages/home/home.component.ts +++ b/src/app/pages/home/home.component.ts @@ -114,7 +114,7 @@ export class HomeComponent implements OnInit { }).subscribe((data: any) => { // console.log(data) if (item.notification.data.properties.EventSystemName == '灭火器维护' || item.notification.data.properties.EventSystemName == '证照预警') { - this.message.create('warning', data.result.desc); + this.message.create('warning', data.result.content1); } else { const modal = this.modal.create({ nzContent: GetOutOfLineDetailsComponent, diff --git a/src/app/pages/today-warning/get-out-of-line-details/get-out-of-line-details.component.ts b/src/app/pages/today-warning/get-out-of-line-details/get-out-of-line-details.component.ts index 2401989..ef7348c 100644 --- a/src/app/pages/today-warning/get-out-of-line-details/get-out-of-line-details.component.ts +++ b/src/app/pages/today-warning/get-out-of-line-details/get-out-of-line-details.component.ts @@ -19,7 +19,7 @@ export class GetOutOfLineDetailsComponent implements OnInit { details ngOnInit(): void { console.log(this.data) - this.details = this.data.desc + this.details = this.data.content1 this.imgUrl = this.data.violateImage this.vedioUrl = this.data.violateVideo this.content = this.data.handleRecord diff --git a/src/app/system-management/organization/organization.component.ts b/src/app/system-management/organization/organization.component.ts index 6f1c6bb..318ff82 100644 --- a/src/app/system-management/organization/organization.component.ts +++ b/src/app/system-management/organization/organization.component.ts @@ -155,28 +155,33 @@ export class OrganizationComponent implements OnInit { } deleteOr(item) { console.log(item) - this.modal.confirm({ - nzTitle: `确定要删除${item.title}这个机构吗?`, - nzOkText: '确定', - nzOkType: 'danger', - nzOnOk: () => { - this.http.delete('/api/services/app/Organization/Delete', { - params: { - Id: item.origin.id - } - }).subscribe(data => { - this.nzTreeComponent.getExpandedNodeList().forEach((item) => { - this.defaultExpandedKeys.push(item.key) + if (item.origin.children && item.origin.children.length != 0) { + this.message.create('warning', '请先删除所有子节点'); + } else { + this.modal.confirm({ + nzTitle: `确定要删除${item.title}这个机构吗?`, + nzOkText: '确定', + nzOkType: 'danger', + nzOnOk: () => { + this.http.delete('/api/services/app/Organization/Delete', { + params: { + Id: item.origin.id + } + }).subscribe(data => { + this.nzTreeComponent.getExpandedNodeList().forEach((item) => { + this.defaultExpandedKeys.push(item.key) + }) + this.getAllOrganization() + this.message.create('success', '删除成功!'); }) - this.getAllOrganization() - this.message.create('success', '删除成功!'); - }) - }, - nzCancelText: '取消', - nzOnCancel: () => { + }, + nzCancelText: '取消', + nzOnCancel: () => { + + } + }); + } - } - }); }