From a4647a05d4ce06855ff3a845998e4096e097cd41 Mon Sep 17 00:00:00 2001 From: cpf <1105965053@qq.com> Date: Thu, 16 Jul 2020 09:18:05 +0800 Subject: [PATCH 1/2] =?UTF-8?q?[=E4=BF=AE=E6=AD=A3]=20=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E5=86=85=E7=BD=AE=E6=96=87=E4=BB=B6=E5=A4=B9=20BUG=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/ui/all-file/all-file.component.ts | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/app/ui/all-file/all-file.component.ts b/src/app/ui/all-file/all-file.component.ts index 70e9687..3e2e9c2 100644 --- a/src/app/ui/all-file/all-file.component.ts +++ b/src/app/ui/all-file/all-file.component.ts @@ -706,6 +706,8 @@ export class AllFileComponent { }) } + + isTrueDelete:any = ['基础知识','装备','技战术','消防设施','资料库']; //匹配内置一级目录 是否被选择删除 // 删除文件 deleteFiles(){ @@ -713,17 +715,15 @@ export class AllFileComponent { let isDelete = confirm('您确定要删除选中文件吗') let arr = [] if (isDelete) { - let notDelete = [] //所有要删除文件 的 一级目录 let arrList = [] //匹配到 禁止删除的 目录 this.selection.selected.forEach((element)=>{ let data = element.key.split("/"); - notDelete.push(data[2]) + this.isTrueDelete.forEach(elements => { + if (elements==data[data.length-2] && data.length-2==2) { + arrList.push('true') + } + }); }) - this.isTrueDelete.forEach(element => { - notDelete.forEach(elements=>{ - if (element==elements) { arrList.push('true') } - }) - }); if (arrList.length) { const config = new MatSnackBarConfig(); config.verticalPosition = 'top'; @@ -774,9 +774,8 @@ export class AllFileComponent { }) - - }); + } // if arrList } From 2cea294a90f6faae574596199f622a0a69df825a Mon Sep 17 00:00:00 2001 From: cpf <1105965053@qq.com> Date: Thu, 16 Jul 2020 14:56:25 +0800 Subject: [PATCH 2/2] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=20=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=AE=8C=E5=96=84,=20echarts=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=A4=84=E7=90=86=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/pages/lockscreen/lockscreen.component.html | 2 +- src/app/pages/lockscreen/lockscreen.component.ts | 2 +- src/app/ui/eharts-statistics/eharts-statistics.component.ts | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/app/pages/lockscreen/lockscreen.component.html b/src/app/pages/lockscreen/lockscreen.component.html index 186a5ac..58a1ba8 100644 --- a/src/app/pages/lockscreen/lockscreen.component.html +++ b/src/app/pages/lockscreen/lockscreen.component.html @@ -6,8 +6,8 @@
- +
diff --git a/src/app/pages/lockscreen/lockscreen.component.ts b/src/app/pages/lockscreen/lockscreen.component.ts index 2d0edf9..fff6625 100644 --- a/src/app/pages/lockscreen/lockscreen.component.ts +++ b/src/app/pages/lockscreen/lockscreen.component.ts @@ -20,7 +20,7 @@ export class LockscreenComponent implements OnInit { } - roleType:string = '1'; //登录角色 + roleType:string = '2'; //登录角色 errmsg :string = ''; //错误信息 diff --git a/src/app/ui/eharts-statistics/eharts-statistics.component.ts b/src/app/ui/eharts-statistics/eharts-statistics.component.ts index 4493ff2..1c67a6c 100644 --- a/src/app/ui/eharts-statistics/eharts-statistics.component.ts +++ b/src/app/ui/eharts-statistics/eharts-statistics.component.ts @@ -138,9 +138,9 @@ export class EhartsStatisticsComponent implements OnInit { return b.count - a.count } ) newData.forEach(element => { - postNames.push(element.postName) - catalogs.push(element.catalog) - counts.push(element.count) + postNames.push(element.postName ? element.postName : '暂无数据') + catalogs.push(element.catalog ? element.catalog : '暂无数据') + counts.push(element.count ? element.count : 0) }); this.echartsInit(postNames,catalogs,counts) }