Compare commits

..

78 Commits

Author SHA1 Message Date
邵佳豪 311da85ea1 [完善]预案状态字段 2 months ago
邵佳豪 3799207fad [完善]预案显示审核状态不显示维护状态 2 months ago
邵佳豪 cca7eb69cb [完善]首页bug 2 months ago
邵佳豪 f549bdddee [完善]自定义预案毗邻数据替换掉建筑信息的bug 3 months ago
邵佳豪 5477317eb3 [完善]完善代码 5 months ago
邵佳豪 39832ce94f [完善]完善预案 10 months ago
邵佳豪 ed1f680b76 [完善]地图 10 months ago
邵佳豪 1d34e328e3 [完善]多个顶级组织机构 10 months ago
邵佳豪 0980d84ca3 [完善]预案审核单位被删除优化 12 months ago
邵佳豪 8e24430c91 [完善]linksPlan 1 year ago
邵佳豪 de4f21a50e [新增]app-key申请 1 year ago
邵佳豪 3b3d841de0 [新增]linksPlan页面增加unitId查询 1 year ago
邵佳豪 0e576e149f [完善]单位修改时间 1 year ago
邵佳豪 0b0405af2c [完善]审核页面重点单位和一般单位区分;审核记录增加参数 1 year ago
邵佳豪 c5bdcd5fa7 [完善]完善在线编制预案绑定值错误 1 year ago
邵佳豪 56bb98000e [完善]预案管理默认查询 1 year ago
邵佳豪 c897c18244 [完善]待审核显示bug 1 year ago
邵佳豪 a9706d32e3 [完善]重点非重点单位的审核状态 1 year ago
邵佳豪 8fe4e0a875 [完善]统计分析bug 1 year ago
邵佳豪 892a11cbe9 [完善]退回重点非重点的审核区别 1 year ago
邵佳豪 c4ebd842cd [完善]跳转预案 1 year ago
邵佳豪 b1c382b51d [完善]预案页面审核结果 1 year ago
邵佳豪 e4b418048d [完善]非重点单位预案审核中队直接终审 1 year ago
邵佳豪 326b7dc782 完善 1 year ago
邵佳豪 4fa2f38f51 [新增]linksPlan增加在线编制预案的查看 1 year ago
邵佳豪 5b6f55359e [完善]组织机构排序 1 year ago
邵佳豪 d48ab61752 [完善]组织机构排序 2 years ago
邵佳豪 b4d4c892a6 [新增]linksplan完善 2 years ago
邵佳豪 34a45a0c3a [完善]表格增加单位 2 years ago
邵佳豪 af5da5c315 [完善]预案公开功能 2 years ago
邵佳豪 de0f601460 [完善]公开预案功能修改 2 years ago
邵佳豪 53387b0c59 [完善]改名bug 2 years ago
邵佳豪 39e6672992 [完善]隐藏假页面 2 years ago
邵佳豪 748e932959 [完善]修改消防设施putBody报错 2 years ago
邵佳豪 627a19c13f [完善]隐藏假页面按钮 2 years ago
邵佳豪 24b584b99f [完善]兼容火狐游览器数字输入框 2 years ago
邵佳豪 80512680ad [完善]平面图素材属性value统一处理为字符串 2 years ago
邵佳豪 76bbe10e0c [完善]刷新token 2 years ago
邵佳豪 a7fdba960f [完善]预案推演模块 2 years ago
邵佳豪 414ef96b0f [完善]弹出框名称 2 years ago
邵佳豪 3be6452604 [完善]六熟悉页面 2 years ago
邵佳豪 ddf28910dd [完善]创建推演预案 2 years ago
邵佳豪 cd688567e7 Merge branch 'master' of http://121.36.37.70:3000/shaojiahao/ShangHaiYuan-AnXin 2 years ago
邵佳豪 e3396929f1 [新增]预案推演页面 2 years ago
徐振升 2848b06371 [修改] 移除webgl高级特性修改 2 years ago
邵佳豪 c7ff17cecc Merge branch 'master' of http://121.36.37.70:3000/shaojiahao/ShangHaiYuan-AnXin 2 years ago
邵佳豪 9845869c3c [完善]六熟悉页面 2 years ago
徐振升 889642262b [完善] 尝试关闭模板缓冲区 2 years ago
邵佳豪 50515a8756 [新增]六熟悉相关功能 2 years ago
邵佳豪 d72f15ab8f [完善]完善演练功能 2 years ago
邵佳豪 dd13bb0b6b [新增]单位增加演练按钮功能 2 years ago
邵佳豪 058a702cf3 [新增]增加两个假页面 2 years ago
邵佳豪 f42a1276cb [完善]在线五级完善防火管辖 2 years ago
邵佳豪 b697284c8c [完善]地图端口 2 years ago
邵佳豪 75d7e634af [完善]bug修改 2 years ago
邵佳豪 721be9145e [完善]重置功能bug 2 years ago
邵佳豪 8b369d14a6 [完善]审核页面重置功能完善 2 years ago
邵佳豪 8669435fcc [完善]进度圈半径 2 years ago
邵佳豪 648a04b4a0 [完善]审核页面优化 2 years ago
邵佳豪 ad9fc5d4c4 [完善]审核记录分页 2 years ago
邵佳豪 9d8159f38b [完善]审核记录头部样式调整 2 years ago
邵佳豪 6429ac3166 [完善]在线编制预案名称 2 years ago
邵佳豪 d0b48c582f [完善]在线模板增加类型 2 years ago
邵佳豪 fbe5cdc154 [新增]报表查询和预案级别修改 2 years ago
邵佳豪 4daf0419c7 [完善]下载文档 2 years ago
邵佳豪 fe40d42983 [完善]完善在线编制预案名字 2 years ago
邵佳豪 ace52511a8 [完善]一般单位重点单位提示 2 years ago
邵佳豪 dd4dbd7051 [完善]预案列表重点单位的查看 2 years ago
邵佳豪 0e06d9fd89 [完善]完善预案和单位列表 2 years ago
邵佳豪 1a25e07d96 [完善]实景图图片查看 2 years ago
邵佳豪 078c69cf58 [完善]完善输入提示 2 years ago
邵佳豪 5ffca01f19 [完善]实景图查看问题 2 years ago
邵佳豪 ff10a9cce6 [完善]修改bug 2 years ago
邵佳豪 8c9a026fb4 [完善]更改地图key 2 years ago
邵佳豪 83770e08c7 [完善]修改预案审核提示bug 2 years ago
邵佳豪 1d97dc8ef8 [修改]修改消防设施查看模式bug 2 years ago
邵佳豪 05d8ed8f20 [完善]审核预案查看 2 years ago
邵佳豪 a29982e204 [完善]消防设施网络获取失败 2 years ago
  1. 19
      angular.json
  2. 22
      package-lock.json
  3. 2
      package.json
  4. 5
      proxy.config.json
  5. 2
      reset.css
  6. 2
      src/app/app-routing.module.ts
  7. 66
      src/app/app.component.ts
  8. 72
      src/app/app.module.ts
  9. 63
      src/app/auth.guard.ts
  10. 20
      src/app/data-collection/fire-force/fire-force.component.html
  11. 8
      src/app/data-collection/fire-force/fire-force.component.ts
  12. 4
      src/app/data-collection/linkage-forces/linkage-forces.component.ts
  13. 4
      src/app/data-collection/water-collection/water-collection.component.ts
  14. 70
      src/app/external-links-plan/external-links-plan.component.html
  15. 260
      src/app/external-links-plan/external-links-plan.component.ts
  16. 75
      src/app/gis-management/gis-labeling/gis-labeling.component.html
  17. 2257
      src/app/gis-management/gis-labeling/gis-labeling.component.ts
  18. 167
      src/app/gis-management/gis-management.module.ts
  19. 4
      src/app/http-interceptors/base-interceptor.ts
  20. 34
      src/app/http-interceptors/cache-token.service.ts
  21. 29
      src/app/interface.ts
  22. 7
      src/app/key-unit/basicinfo/basicinfo.component.html
  23. 3
      src/app/key-unit/basicinfo/basicinfo.component.ts
  24. 12
      src/app/key-unit/edit-plan-info/edit-plan-info.component.html
  25. 16
      src/app/key-unit/edit-unit-info/edit-unit-info.component.html
  26. 251
      src/app/key-unit/fire-fighting-device-look/fire-fighting-device.component.html
  27. 474
      src/app/key-unit/fire-fighting-device-look/fire-fighting-device.component.ts
  28. 131
      src/app/key-unit/fire-fighting-device/fire-fighting-device.component.ts
  29. 31
      src/app/key-unit/key-unit-management/key-unit-management.component.html
  30. 1109
      src/app/key-unit/key-unit-management/key-unit-management.component.ts
  31. 119
      src/app/key-unit/key-unit-management/upload-drill/upload-drill.component.html
  32. 120
      src/app/key-unit/key-unit-management/upload-drill/upload-drill.component.scss
  33. 25
      src/app/key-unit/key-unit-management/upload-drill/upload-drill.component.spec.ts
  34. 203
      src/app/key-unit/key-unit-management/upload-drill/upload-drill.component.ts
  35. 292
      src/app/key-unit/key-unit.module.ts
  36. 532
      src/app/key-unit/realistic-picture-look/realistic-picture.component.ts
  37. 767
      src/app/key-unit/realistic-picture/realistic-picture.component.ts
  38. 4
      src/app/key-unit/router-gis/router-gis.component.ts
  39. 16
      src/app/key-unit/view-unit-details-plan/view-unit-details-plan.component.html
  40. 12
      src/app/key-unit/view-unit-details/view-unit-details.component.html
  41. 2
      src/app/key-unit/water-road/water-road.component.ts
  42. 4
      src/app/pages/home/home.component.ts
  43. 3
      src/app/pages/login/login.component.ts
  44. 16
      src/app/pages/login/lookUpdateData.html
  45. 90
      src/app/pipes/boolean.pipe.ts
  46. 2
      src/app/plan-audit/fireforce-audit/fireforce-audit.component.ts
  47. 2
      src/app/plan-audit/linkageforces-audit/linkageforces-audit.component.ts
  48. 25
      src/app/plan-audit/plan-audit/plan-audit.component.html
  49. 10
      src/app/plan-audit/plan-pass/plan-pass.component.ts
  50. 92
      src/app/plan-audit/plan-record/plan-record.component.html
  51. 172
      src/app/plan-audit/plan-record/plan-record.component.scss
  52. 452
      src/app/plan-audit/plan-record/plan-record.component.ts
  53. 92
      src/app/plan-audit/wait-examineer/wait-examineer.component.html
  54. 181
      src/app/plan-audit/wait-examineer/wait-examineer.component.scss
  55. 1067
      src/app/plan-audit/wait-examineer/wait-examineer.component.ts
  56. 2
      src/app/plan-audit/water-audit/water-audit.component.ts
  57. 469
      src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html
  58. 3455
      src/app/plan-management/create-plan-online-five/create-plan-online-five.component.ts
  59. 58
      src/app/plan-management/drill-record/drill-record.component.html
  60. 59
      src/app/plan-management/drill-record/drill-record.component.scss
  61. 25
      src/app/plan-management/drill-record/drill-record.component.spec.ts
  62. 141
      src/app/plan-management/drill-record/drill-record.component.ts
  63. 28
      src/app/plan-management/entry-plan-look/AddPlanone.html
  64. 48
      src/app/plan-management/entry-plan-look/auditresult.html
  65. 18
      src/app/plan-management/entry-plan-look/edit-plan-category/edit-plan-category.component.html
  66. 0
      src/app/plan-management/entry-plan-look/edit-plan-category/edit-plan-category.component.scss
  67. 25
      src/app/plan-management/entry-plan-look/edit-plan-category/edit-plan-category.component.spec.ts
  68. 37
      src/app/plan-management/entry-plan-look/edit-plan-category/edit-plan-category.component.ts
  69. 23
      src/app/plan-management/entry-plan-look/entry-plan-look.component.html
  70. 57
      src/app/plan-management/entry-plan-look/entry-plan-look.component.scss
  71. 2493
      src/app/plan-management/entry-plan-look/entry-plan-look.component.ts
  72. 29
      src/app/plan-management/entry-plan-look/six-familiarize/six-familiarize.component.html
  73. 118
      src/app/plan-management/entry-plan-look/six-familiarize/six-familiarize.component.scss
  74. 25
      src/app/plan-management/entry-plan-look/six-familiarize/six-familiarize.component.spec.ts
  75. 110
      src/app/plan-management/entry-plan-look/six-familiarize/six-familiarize.component.ts
  76. 40
      src/app/plan-management/entry-plan/entry-plan.component.html
  77. 472
      src/app/plan-management/entry-plan/entry-plan.component.ts
  78. 47
      src/app/plan-management/meet-plan/meet-plan.component.html
  79. 6
      src/app/plan-management/meet-plan/meet-plan.component.ts
  80. 47
      src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.html
  81. 854
      src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.ts
  82. 19
      src/app/plan-management/open-plan/open-plan.component.html
  83. 433
      src/app/plan-management/open-plan/open-plan.component.ts
  84. 10
      src/app/plan-management/pass-plan/open-or/open-or.component.html
  85. 4
      src/app/plan-management/pass-plan/open-or/open-or.component.scss
  86. 25
      src/app/plan-management/pass-plan/open-or/open-or.component.spec.ts
  87. 126
      src/app/plan-management/pass-plan/open-or/open-or.component.ts
  88. 26
      src/app/plan-management/pass-plan/pass-plan.component.html
  89. 594
      src/app/plan-management/pass-plan/pass-plan.component.ts
  90. 35
      src/app/plan-management/plan-deduction/add-plan/add-plan.component.html
  91. 122
      src/app/plan-management/plan-deduction/add-plan/add-plan.component.scss
  92. 25
      src/app/plan-management/plan-deduction/add-plan/add-plan.component.spec.ts
  93. 103
      src/app/plan-management/plan-deduction/add-plan/add-plan.component.ts
  94. 62
      src/app/plan-management/plan-deduction/plan-deduction.component.html
  95. 63
      src/app/plan-management/plan-deduction/plan-deduction.component.scss
  96. 25
      src/app/plan-management/plan-deduction/plan-deduction.component.spec.ts
  97. 180
      src/app/plan-management/plan-deduction/plan-deduction.component.ts
  98. 6
      src/app/plan-management/plan-management-routing.module.ts
  99. 259
      src/app/plan-management/plan-management.module.ts
  100. 38
      src/app/plan-management/reinforce-plan/reinforce-plan.component.html
  101. Some files were not shown because too many files have changed in this diff Show More

19
angular.json

@ -18,15 +18,13 @@
"builder": "@angular-devkit/build-angular:browser", "builder": "@angular-devkit/build-angular:browser",
"options": { "options": {
"outputPath": "dist/anxin119", "outputPath": "dist/anxin119",
"sourceMap": false,
"index": "src/index.html", "index": "src/index.html",
"main": "src/main.ts", "main": "src/main.ts",
"polyfills": "src/polyfills.ts", "polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json", "tsConfig": "tsconfig.app.json",
"aot": true, "aot": true,
"assets": [ "assets": ["src/favicon.ico", "src/assets"],
"src/favicon.ico",
"src/assets"
],
"styles": [ "styles": [
"src/styles.scss", "src/styles.scss",
"./node_modules/swiper/css/swiper.min.css", "./node_modules/swiper/css/swiper.min.css",
@ -100,13 +98,8 @@
"polyfills": "src/polyfills.ts", "polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.spec.json", "tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js", "karmaConfig": "karma.conf.js",
"assets": [ "assets": ["src/favicon.ico", "src/assets"],
"src/favicon.ico", "styles": ["src/styles.scss"],
"src/assets"
],
"styles": [
"src/styles.scss"
],
"scripts": [] "scripts": []
} }
}, },
@ -118,9 +111,7 @@
"tsconfig.spec.json", "tsconfig.spec.json",
"e2e/tsconfig.json" "e2e/tsconfig.json"
], ],
"exclude": [ "exclude": ["**/node_modules/**"]
"**/node_modules/**"
]
} }
}, },
"e2e": { "e2e": {

22
package-lock.json generated

@ -2055,6 +2055,7 @@
"version": "7.8.3", "version": "7.8.3",
"resolved": "https://registry.npm.taobao.org/@babel/plugin-proposal-json-strings/download/@babel/plugin-proposal-json-strings-7.8.3.tgz", "resolved": "https://registry.npm.taobao.org/@babel/plugin-proposal-json-strings/download/@babel/plugin-proposal-json-strings-7.8.3.tgz",
"integrity": "sha1-2lIWsjipi1ih4F1oUhBLEPmnDWs=", "integrity": "sha1-2lIWsjipi1ih4F1oUhBLEPmnDWs=",
"deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-json-strings instead.",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@babel/helper-plugin-utils": "^7.8.3", "@babel/helper-plugin-utils": "^7.8.3",
@ -2068,6 +2069,7 @@
"version": "7.8.3", "version": "7.8.3",
"resolved": "https://registry.npm.taobao.org/@babel/plugin-proposal-object-rest-spread/download/@babel/plugin-proposal-object-rest-spread-7.8.3.tgz?cache=0&sync_timestamp=1578956763418&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-proposal-object-rest-spread%2Fdownload%2F%40babel%2Fplugin-proposal-object-rest-spread-7.8.3.tgz", "resolved": "https://registry.npm.taobao.org/@babel/plugin-proposal-object-rest-spread/download/@babel/plugin-proposal-object-rest-spread-7.8.3.tgz?cache=0&sync_timestamp=1578956763418&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-proposal-object-rest-spread%2Fdownload%2F%40babel%2Fplugin-proposal-object-rest-spread-7.8.3.tgz",
"integrity": "sha1-61rjZhGN3KZ77Vg7U9dVTK2ZUbs=", "integrity": "sha1-61rjZhGN3KZ77Vg7U9dVTK2ZUbs=",
"deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-object-rest-spread instead.",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@babel/helper-plugin-utils": "^7.8.3", "@babel/helper-plugin-utils": "^7.8.3",
@ -2094,6 +2096,7 @@
"version": "7.8.3", "version": "7.8.3",
"resolved": "https://registry.npm.taobao.org/@babel/plugin-proposal-unicode-property-regex/download/@babel/plugin-proposal-unicode-property-regex-7.8.3.tgz", "resolved": "https://registry.npm.taobao.org/@babel/plugin-proposal-unicode-property-regex/download/@babel/plugin-proposal-unicode-property-regex-7.8.3.tgz",
"integrity": "sha1-tkbDrepfmIAMmrRRBaw00GzUpH8=", "integrity": "sha1-tkbDrepfmIAMmrRRBaw00GzUpH8=",
"deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-unicode-property-regex instead.",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@babel/helper-create-regexp-features-plugin": "^7.8.3", "@babel/helper-create-regexp-features-plugin": "^7.8.3",
@ -7965,7 +7968,7 @@
"version": "2.1.0", "version": "2.1.0",
"resolved": "https://registry.npm.taobao.org/date-format/download/date-format-2.1.0.tgz?cache=0&sync_timestamp=1572559173297&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdate-format%2Fdownload%2Fdate-format-2.1.0.tgz", "resolved": "https://registry.npm.taobao.org/date-format/download/date-format-2.1.0.tgz?cache=0&sync_timestamp=1572559173297&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdate-format%2Fdownload%2Fdate-format-2.1.0.tgz",
"integrity": "sha1-MdW16iEc9f12TNOLr50DPffhJc8=", "integrity": "sha1-MdW16iEc9f12TNOLr50DPffhJc8=",
"deprecated": "2.x is no longer supported. Please upgrade to 4.x.", "deprecated": "2.x is no longer supported. Please upgrade to 4.x or higher.",
"dev": true, "dev": true,
"engines": { "engines": {
"node": ">=4.0" "node": ">=4.0"
@ -7985,6 +7988,7 @@
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npm.taobao.org/debuglog/download/debuglog-1.0.1.tgz", "resolved": "https://registry.npm.taobao.org/debuglog/download/debuglog-1.0.1.tgz",
"integrity": "sha1-qiT/uaw9+aI1GDfPstJ5NgzXhJI=", "integrity": "sha1-qiT/uaw9+aI1GDfPstJ5NgzXhJI=",
"deprecated": "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.",
"dev": true, "dev": true,
"engines": { "engines": {
"node": "*" "node": "*"
@ -11814,7 +11818,7 @@
"version": "1.2.13", "version": "1.2.13",
"resolved": "https://registry.npmmirror.com/fsevents/-/fsevents-1.2.13.tgz", "resolved": "https://registry.npmmirror.com/fsevents/-/fsevents-1.2.13.tgz",
"integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==",
"deprecated": "fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.", "deprecated": "The v1 package contains DANGEROUS / INSECURE binaries. Upgrade to safe fsevents v2",
"dev": true, "dev": true,
"hasInstallScript": true, "hasInstallScript": true,
"optional": true, "optional": true,
@ -12097,7 +12101,7 @@
"version": "4.5.1", "version": "4.5.1",
"resolved": "https://registry.npm.taobao.org/log4js/download/log4js-4.5.1.tgz", "resolved": "https://registry.npm.taobao.org/log4js/download/log4js-4.5.1.tgz",
"integrity": "sha1-5UNiXpfZ5vPm58n8GW3WqyyuMLU=", "integrity": "sha1-5UNiXpfZ5vPm58n8GW3WqyyuMLU=",
"deprecated": "4.x is no longer supported. Please upgrade to 6.x.", "deprecated": "4.x is no longer supported. Please upgrade to 6.x or higher.",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"date-format": "^2.0.0", "date-format": "^2.0.0",
@ -12909,6 +12913,7 @@
"version": "8.0.0", "version": "8.0.0",
"resolved": "https://registry.npm.taobao.org/ngx-perfect-scrollbar/download/ngx-perfect-scrollbar-8.0.0.tgz", "resolved": "https://registry.npm.taobao.org/ngx-perfect-scrollbar/download/ngx-perfect-scrollbar-8.0.0.tgz",
"integrity": "sha1-GcG7+bGjbYmwCmj3g045Qn0pGC8=", "integrity": "sha1-GcG7+bGjbYmwCmj3g045Qn0pGC8=",
"deprecated": "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.",
"dependencies": { "dependencies": {
"perfect-scrollbar": "^1.4.0", "perfect-scrollbar": "^1.4.0",
"resize-observer-polyfill": "^1.5.0" "resize-observer-polyfill": "^1.5.0"
@ -12929,6 +12934,7 @@
"version": "2.0.2", "version": "2.0.2",
"resolved": "https://registry.npm.taobao.org/node-fetch-npm/download/node-fetch-npm-2.0.2.tgz", "resolved": "https://registry.npm.taobao.org/node-fetch-npm/download/node-fetch-npm-2.0.2.tgz",
"integrity": "sha1-cljJBGGC3KNFtCCO2pGNrzNpf/c=", "integrity": "sha1-cljJBGGC3KNFtCCO2pGNrzNpf/c=",
"deprecated": "This module is not used anymore, npm uses minipass-fetch for its fetch implementation now",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"encoding": "^0.1.11", "encoding": "^0.1.11",
@ -13914,6 +13920,7 @@
"version": "4.0.7", "version": "4.0.7",
"resolved": "https://registry.npm.taobao.org/photo-sphere-viewer/download/photo-sphere-viewer-4.0.7.tgz", "resolved": "https://registry.npm.taobao.org/photo-sphere-viewer/download/photo-sphere-viewer-4.0.7.tgz",
"integrity": "sha1-UPNlOACbVPqi+3S2QCvsFSvnFnc=", "integrity": "sha1-UPNlOACbVPqi+3S2QCvsFSvnFnc=",
"deprecated": "Use @photo-sphere-viewer/core instead, see https://photo-sphere-viewer.js.org/guide/migration.html",
"dependencies": { "dependencies": {
"three": "^0.120.1", "three": "^0.120.1",
"uevent": "~2.0.0" "uevent": "~2.0.0"
@ -14855,6 +14862,7 @@
"version": "5.4.2", "version": "5.4.2",
"resolved": "https://registry.npm.taobao.org/protractor/download/protractor-5.4.2.tgz", "resolved": "https://registry.npm.taobao.org/protractor/download/protractor-5.4.2.tgz",
"integrity": "sha1-Mp7+N/SLIUGrlGd5m+LU0S60jBM=", "integrity": "sha1-Mp7+N/SLIUGrlGd5m+LU0S60jBM=",
"deprecated": "We have news to share - Protractor is deprecated and will reach end-of-life by Summer 2023. To learn more and find out about other options please refer to this post on the Angular blog. Thank you for using and contributing to Protractor. https://goo.gle/state-of-e2e-in-angular",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@types/q": "^0.0.32", "@types/q": "^0.0.32",
@ -15352,6 +15360,7 @@
"version": "1.1.0", "version": "1.1.0",
"resolved": "https://registry.npm.taobao.org/readdir-scoped-modules/download/readdir-scoped-modules-1.1.0.tgz", "resolved": "https://registry.npm.taobao.org/readdir-scoped-modules/download/readdir-scoped-modules-1.1.0.tgz",
"integrity": "sha1-jUVAe0+HCg3K68DihnDRjnRRQwk=", "integrity": "sha1-jUVAe0+HCg3K68DihnDRjnRRQwk=",
"deprecated": "This functionality has been moved to @npmcli/fs",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"debuglog": "^1.0.1", "debuglog": "^1.0.1",
@ -16665,6 +16674,7 @@
"version": "1.4.8", "version": "1.4.8",
"resolved": "https://registry.npm.taobao.org/sourcemap-codec/download/sourcemap-codec-1.4.8.tgz", "resolved": "https://registry.npm.taobao.org/sourcemap-codec/download/sourcemap-codec-1.4.8.tgz",
"integrity": "sha1-6oBL2UhXQC5pktBaOO8a41qatMQ=", "integrity": "sha1-6oBL2UhXQC5pktBaOO8a41qatMQ=",
"deprecated": "Please use @jridgewell/sourcemap-codec instead",
"dev": true "dev": true
}, },
"node_modules/spdx-correct": { "node_modules/spdx-correct": {
@ -16903,7 +16913,7 @@
"version": "1.0.6", "version": "1.0.6",
"resolved": "https://registry.npm.taobao.org/streamroller/download/streamroller-1.0.6.tgz", "resolved": "https://registry.npm.taobao.org/streamroller/download/streamroller-1.0.6.tgz",
"integrity": "sha1-gWfYSW7Z8Z8F7ksVjZYRMhuMrNk=", "integrity": "sha1-gWfYSW7Z8Z8F7ksVjZYRMhuMrNk=",
"deprecated": "1.x is no longer supported. Please upgrade to 3.x.", "deprecated": "1.x is no longer supported. Please upgrade to 3.x or higher.",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"async": "^2.6.2", "async": "^2.6.2",
@ -18378,7 +18388,7 @@
"version": "1.2.13", "version": "1.2.13",
"resolved": "https://registry.npmmirror.com/fsevents/-/fsevents-1.2.13.tgz", "resolved": "https://registry.npmmirror.com/fsevents/-/fsevents-1.2.13.tgz",
"integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==",
"deprecated": "fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.", "deprecated": "The v1 package contains DANGEROUS / INSECURE binaries. Upgrade to safe fsevents v2",
"dev": true, "dev": true,
"hasInstallScript": true, "hasInstallScript": true,
"optional": true, "optional": true,
@ -18721,7 +18731,7 @@
"version": "1.2.13", "version": "1.2.13",
"resolved": "https://registry.npmmirror.com/fsevents/-/fsevents-1.2.13.tgz", "resolved": "https://registry.npmmirror.com/fsevents/-/fsevents-1.2.13.tgz",
"integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==",
"deprecated": "fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.", "deprecated": "The v1 package contains DANGEROUS / INSECURE binaries. Upgrade to safe fsevents v2",
"dev": true, "dev": true,
"hasInstallScript": true, "hasInstallScript": true,
"optional": true, "optional": true,

2
package.json

@ -3,7 +3,7 @@
"version": "0.0.0", "version": "0.0.0",
"scripts": { "scripts": {
"ng": "ng", "ng": "ng",
"start": "ng serve --proxy-config proxy.config.json --open --port 7542 ", "start": "ng serve --proxy-config proxy.config.json --open",
"build": "ng build", "build": "ng build",
"build-prod": "node --max_old_space_size=5048 ./node_modules/@angular/cli/bin/ng build --prod", "build-prod": "node --max_old_space_size=5048 ./node_modules/@angular/cli/bin/ng build --prod",
"publish": "ng build --prod --verbose", "publish": "ng build --prod --verbose",

5
proxy.config.json

@ -1,6 +1,9 @@
{ {
"/api": { "/api": {
"target": "http://121.36.37.70:8205", "target": "http://121.36.37.70:8201/",
"生产": "http://10.81.73.39:8000/",
"测试": "http://121.36.37.70:8201/",
"生产2": "http://183.194.244.232:8088/",
"secure": false, "secure": false,
"changeOrigin": true "changeOrigin": true
} }

2
reset.css

@ -50,12 +50,12 @@ img {
a { a {
text-decoration: none; text-decoration: none;
color: #000; color: #000;
}
ul, ul,
ol, ol,
li { li {
list-style: none; list-style: none;
} }
}
.clearfn:after { .clearfn:after {
content: ""; content: "";
clear: both; clear: both;

2
src/app/app-routing.module.ts

@ -41,7 +41,7 @@ const routes: Routes = [
{path:'keyUnit/viewunitinfoplans', component:ViewUnitDetailsPlanComponent,canActivate: [AuthGuard],}, {path:'keyUnit/viewunitinfoplans', component:ViewUnitDetailsPlanComponent,canActivate: [AuthGuard],},
{path:'getNoMToken',component:MTokenK1Component, canActivate: [AuthGuard],}, //K1秘钥验证失败是跳转页面 {path:'getNoMToken',component:MTokenK1Component, canActivate: [AuthGuard],}, //K1秘钥验证失败是跳转页面
{path:'planAudit/planpass', component: PlanPassComponent , canActivate: [AuthGuard]}, {path:'planAudit/planpass', component: PlanPassComponent , canActivate: [AuthGuard]},
{path:'test', component: TestComponent }, // {path:'test', component: TestComponent },
{path:'linksPlan', component: ExternalLinksPlanComponent }, {path:'linksPlan', component: ExternalLinksPlanComponent },
{path:'CreatePlanOnlineFive',component:CreatePlanOnlineFiveComponent}, {path:'CreatePlanOnlineFive',component:CreatePlanOnlineFiveComponent},
{path:'exportExcel',component:ExportExcelComponent, canActivate: [AuthGuard]}, {path:'exportExcel',component:ExportExcelComponent, canActivate: [AuthGuard]},

66
src/app/app.component.ts

@ -1,58 +1,58 @@
import { Component, Inject, Injector } from '@angular/core'; import { Component, Inject, Injector } from "@angular/core";
import { HttpClient } from '@angular/common/http' import { HttpClient } from "@angular/common/http";
import { Data } from './interface' import { Data } from "./interface";
import { Router, ActivatedRoute } from '@angular/router' import { Router, ActivatedRoute } from "@angular/router";
import { CacheTokenService } from './http-interceptors/cache-token.service'//引入服务 import { CacheTokenService } from "./http-interceptors/cache-token.service"; //引入服务
import { MaskLayerService } from './mask-layer.service'; import { MaskLayerService } from "./mask-layer.service";
import * as global from 'globals'; import * as global from "globals";
@Component({ @Component({
selector: 'app-root', selector: "app-root",
templateUrl: './app.component.html', templateUrl: "./app.component.html",
styleUrls: ['./app.component.scss'] styleUrls: ["./app.component.scss"],
}) })
export class AppComponent { export class AppComponent {
constructor(
constructor(private maskLayerService: MaskLayerService, private http: HttpClient, private router: Router, public token: CacheTokenService, private injector: Injector) { private maskLayerService: MaskLayerService,
private http: HttpClient,
private router: Router,
public token: CacheTokenService,
private injector: Injector
) {
global.injector = injector; global.injector = injector;
} }
isMaskLayerShow: boolean = false isMaskLayerShow: boolean = false;
ngOnInit(): void { ngOnInit(): void {
console.log("更新日期2025.01.07");
//监听遮罩层 //监听遮罩层
this.maskLayerService.getMessage().subscribe((message: any) => { this.maskLayerService.getMessage().subscribe((message: any) => {
this.isMaskLayerShow = message this.isMaskLayerShow = message;
}); });
var token = sessionStorage.getItem("token");
var refreshToken = sessionStorage.getItem("refreshToken");
if (token && refreshToken) {
this.http.post('/api/Account/RefreshToken', {
token: token,
refreshToken: refreshToken
}).subscribe((data: Data) => {
sessionStorage.setItem("level", data.level);
sessionStorage.setItem("token", data.token);
sessionStorage.setItem("refreshToken", data.refreshToken);
this.token.startUp()
})
}
// console.log(1234,document.documentElement.clientWidth) // console.log(1234,document.documentElement.clientWidth)
function addMeta(name, content) {//手动添加mate标签 function addMeta(name, content) {
//手动添加mate标签
let meta = document.createElement('meta'); let meta = document.createElement("meta");
meta.content = content; meta.content = content;
meta.name = name; meta.name = name;
document.getElementsByTagName('head')[0].appendChild(meta); document.getElementsByTagName("head")[0].appendChild(meta);
} }
if (document.documentElement.clientWidth < 800) { if (document.documentElement.clientWidth < 800) {
addMeta('viewport', 'initial-scale=0.5, maximum-scale=0.5, minimum-scale=0.5, user-scalable=no,uc-fitscreen=yes,viewport-fit=cover') addMeta(
"viewport",
"initial-scale=0.5, maximum-scale=0.5, minimum-scale=0.5, user-scalable=no,uc-fitscreen=yes,viewport-fit=cover"
);
}
if (sessionStorage.getItem("token") && !this.token.timer) {
//调用服务中的function刷新token
this.token.startUp();
} }
} }

72
src/app/app.module.ts

@ -1,32 +1,37 @@
import { BrowserModule } from '@angular/platform-browser'; import { BrowserModule } from "@angular/platform-browser";
import { NgModule } from '@angular/core'; import { NgModule } from "@angular/core";
import { AppRoutingModule } from './app-routing.module'; import { AppRoutingModule } from "./app-routing.module";
import { AppComponent } from './app.component'; import { AppComponent } from "./app.component";
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { BrowserAnimationsModule } from "@angular/platform-browser/animations";
import { MatButtonModule } from '@angular/material/button'; import { MatButtonModule } from "@angular/material/button";
import { MatCheckboxModule } from '@angular/material/checkbox'; import { MatCheckboxModule } from "@angular/material/checkbox";
import { MatIconModule } from '@angular/material/icon'; import { MatIconModule } from "@angular/material/icon";
import { MatSidenavModule } from '@angular/material/sidenav'; import { MatSidenavModule } from "@angular/material/sidenav";
import { NavigationModule } from './navigation/navigation.module'; import { NavigationModule } from "./navigation/navigation.module";
import { HomeComponent } from './home/home.component'; import { HomeComponent } from "./home/home.component";
import { TabbarComponent } from './tabbar/tabbar.component'; import { TabbarComponent } from "./tabbar/tabbar.component";
import { PagesModule } from './pages/pages.module'; import { PagesModule } from "./pages/pages.module";
import { FormsModule } from '@angular/forms'; import { FormsModule } from "@angular/forms";
import { UiModule } from './ui/ui.module'; import { UiModule } from "./ui/ui.module";
import { HttpClientModule } from '@angular/common/http'; import { HttpClientModule } from "@angular/common/http";
import { httpInterceptorProviders } from './http-interceptors/index' import { httpInterceptorProviders } from "./http-interceptors/index";
import { CacheTokenService } from './http-interceptors/cache-token.service' import { CacheTokenService } from "./http-interceptors/cache-token.service";
import { TreeService } from './http-interceptors/tree.service'; import { TreeService } from "./http-interceptors/tree.service";
import { MTokenK1Component } from './m-token-k1/m-token-k1.component' //K1秘钥 import { MTokenK1Component } from "./m-token-k1/m-token-k1.component"; //K1秘钥
import { CountdownModule } from 'ngx-countdown'; //倒计时插件 import { CountdownModule } from "ngx-countdown"; //倒计时插件
import { GISManagementModule } from './gis-management/gis-management.module'; import { GISManagementModule } from "./gis-management/gis-management.module";
import { DataCollectionModule } from './data-collection/data-collection.module'; import { DataCollectionModule } from "./data-collection/data-collection.module";
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; import { MatProgressSpinnerModule } from "@angular/material/progress-spinner";
import { TestComponent } from './test/test.component'; import { TestComponent } from "./test/test.component";
import { ExternalLinksPlanComponent } from './external-links-plan/external-links-plan.component'; import { ExternalLinksPlanComponent } from "./external-links-plan/external-links-plan.component";
import { SearchDownList } from '../modules/map/declare/component/SearchDownListPlugins/SearchDownList'; import { SearchDownList } from "../modules/map/declare/component/SearchDownListPlugins/SearchDownList";
import { ExportExcelComponent } from './export-excel/export-excel.component'; import { ExportExcelComponent } from "./export-excel/export-excel.component";
import { registerLocaleData } from "@angular/common";
import zh from "@angular/common/locales/zh";
import { KeyUnitModule } from "./key-unit/key-unit.module";
import { MatTabsModule } from "@angular/material/tabs";
import { PlanManagementModule } from "./plan-management/plan-management.module";
registerLocaleData(zh);
@NgModule({ @NgModule({
declarations: [ declarations: [
AppComponent, AppComponent,
@ -35,7 +40,7 @@ import { ExportExcelComponent } from './export-excel/export-excel.component';
TestComponent, TestComponent,
ExternalLinksPlanComponent, ExternalLinksPlanComponent,
SearchDownList, SearchDownList,
ExportExcelComponent ExportExcelComponent,
], ],
imports: [ imports: [
BrowserModule, BrowserModule,
@ -53,9 +58,12 @@ import { ExportExcelComponent } from './export-excel/export-excel.component';
GISManagementModule, GISManagementModule,
DataCollectionModule, DataCollectionModule,
MatProgressSpinnerModule, MatProgressSpinnerModule,
UiModule UiModule,
KeyUnitModule,
MatTabsModule,
PlanManagementModule,
], ],
providers: [httpInterceptorProviders, CacheTokenService, TreeService], providers: [httpInterceptorProviders, CacheTokenService, TreeService],
bootstrap: [AppComponent] bootstrap: [AppComponent],
}) })
export class AppModule {} export class AppModule {}

63
src/app/auth.guard.ts

@ -1,31 +1,70 @@
import { Injectable } from '@angular/core'; import { HttpClient } from "@angular/common/http";
import { CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot, Router } from '@angular/router'; import { Injectable } from "@angular/core";
import {
CanActivate,
ActivatedRouteSnapshot,
RouterStateSnapshot,
Router,
} from "@angular/router";
@Injectable({ @Injectable({
providedIn: 'root' providedIn: "root",
}) })
export class AuthGuard implements CanActivate { export class AuthGuard implements CanActivate {
constructor(private http: HttpClient, private router: Router) {}
constructor(private router: Router) {
}
// 路由守卫 // 路由守卫
canActivate(next: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean { async canActivate(
next: ActivatedRouteSnapshot,
state: RouterStateSnapshot
): Promise<boolean> {
console.log("next", next);
console.log("state", state);
if (
next.queryParams.singleSignOn &&
next.queryParams.singleSignOn === "true"
) {
//执行自动登录逻辑
await this.onSubmit();
}
return this.checkLogin(); return this.checkLogin();
} }
checkLogin(): boolean { checkLogin(): boolean {
// 判断本地有没有token // 判断本地有没有token
const token = sessionStorage.getItem('token'); const token = sessionStorage.getItem("token");
// 如果有token,允许访问 // 如果有token,允许访问
if (token) { return true; } if (token) {
return true;
}
//如果没有token,跳转登录页 //如果没有token,跳转登录页
this.router.navigate(['/login']); this.router.navigate(["/login"]);
return false; return false;
} }
onSubmit() {
return new Promise<void>((resolve, reject) => {
this.http
.post("/api/Account/SignIn", {
name: "superadmin",
password: "SHya119!@",
})
.subscribe(
(data: any) => {
sessionStorage.setItem("level", data.level);
sessionStorage.setItem("token", data.token);
sessionStorage.setItem("refreshToken", data.refreshToken);
sessionStorage.setItem("isDefaultPassword", data.isDefaultPassword); //是否需要修改默认密码
sessionStorage.setItem("singleSignOn", "true"); //是否需要修改默认密码
resolve();
},
(err) => {
reject();
}
);
});
}
} }

20
src/app/data-collection/fire-force/fire-force.component.html

@ -43,8 +43,9 @@
</div> </div>
<div class="fireForceTree" id="fireForceTree" *ngIf="isTreeView"> <div class="fireForceTree" id="fireForceTree" *ngIf="isTreeView">
<mat-tree [dataSource]="dataSource" [treeControl]="treeControl"> <mat-tree [dataSource]="dataSource" [treeControl]="treeControl">
<mat-tree-node (click)="selectTreeNode(node)" [ngClass]="{'selectedTreeNode': node.id == selectedFireForceId}" <mat-tree-node (click)="selectTreeNode(node)"
*matTreeNodeDef="let node;" matTreeNodePadding matTreeNodePaddingIndent='10px'> [ngClass]="{'selectedTreeNode': node.id == selectedFireForceId}" *matTreeNodeDef="let node;"
matTreeNodePadding matTreeNodePaddingIndent='10px'>
<button mat-icon-button disabled></button> <button mat-icon-button disabled></button>
<span class="nodename">{{node.name}}</span> <span class="nodename">{{node.name}}</span>
@ -113,7 +114,8 @@
<div class="mapbox"> <div class="mapbox">
<div class="mapcheckbox"> <div class="mapcheckbox">
<mat-checkbox (change)="checkBoxChange()" [(ngModel)]="item.isChecked" color="primary" <mat-checkbox (change)="checkBoxChange()" [(ngModel)]="item.isChecked" color="primary"
*ngFor="let item of checkBoxList">{{item.name}}</mat-checkbox> *ngFor="let item of checkBoxList">{{item.name}}
</mat-checkbox>
</div> </div>
<div id="map" class="map" style="overflow: hidden;"> <div id="map" class="map" style="overflow: hidden;">
<div id="container"></div> <div id="container"></div>
@ -219,8 +221,8 @@
<span> <span>
备注: 备注:
</span> </span>
<textarea [(ngModel)]="FireForceDetailInfo.remark" style="height: 80%;width: 84%;" <textarea [(ngModel)]="FireForceDetailInfo.remark" style="height: 80%;width: 84%;" cols="30"
cols="30" rows="10"></textarea> rows="10"></textarea>
</mat-grid-tile> </mat-grid-tile>
</mat-grid-list> </mat-grid-list>
<p>位置信息</p> <p>位置信息</p>
@ -350,8 +352,8 @@
<span> <span>
备注: 备注:
</span> </span>
<textarea [(ngModel)]="FireForceDetailInfo.remark" style="height: 80%;width: 84%;" <textarea [(ngModel)]="FireForceDetailInfo.remark" style="height: 80%;width: 84%;" cols="30"
cols="30" rows="10"></textarea> rows="10"></textarea>
</mat-grid-tile> </mat-grid-tile>
</mat-grid-list> </mat-grid-list>
<p>位置信息</p> <p>位置信息</p>
@ -540,8 +542,8 @@
<span> <span>
备注: 备注:
</span> </span>
<textarea [(ngModel)]="FireForceDetailInfo.remark" style="height: 80%;width: 82%;" <textarea [(ngModel)]="FireForceDetailInfo.remark" style="height: 80%;width: 82%;" cols="30"
cols="30" rows="10"></textarea> rows="10"></textarea>
</mat-grid-tile> </mat-grid-tile>
</mat-grid-list> </mat-grid-list>
<p>位置信息</p> <p>位置信息</p>

8
src/app/data-collection/fire-force/fire-force.component.ts

@ -1028,7 +1028,7 @@ export class FireForceComponent implements OnInit {
// 将 markers 添加到地图 // 将 markers 添加到地图
this.map.add(this.newPositionMarker); this.map.add(this.newPositionMarker);
} else { } else {
this.map.setCity('唐山市'); this.map.setCity('上海市');
} }
//相关资料 //相关资料
data.relevantInfomationData ? this.AttachmentArr = JSON.parse(data.relevantInfomationData) : null data.relevantInfomationData ? this.AttachmentArr = JSON.parse(data.relevantInfomationData) : null
@ -1055,7 +1055,7 @@ export class FireForceComponent implements OnInit {
alert('获取信息错误!') alert('获取信息错误!')
}) })
} else { } else {
this.map.setCity('唐山市'); this.map.setCity('上海市');
} }
//寻找管辖单位 //寻找管辖单位
@ -1333,7 +1333,7 @@ export class FireForceComponent implements OnInit {
// this.newPositionMarker ? this.map.remove(this.newPositionMarker) : null // this.newPositionMarker ? this.map.remove(this.newPositionMarker) : null
// this.positionLngLat.x = 0 // this.positionLngLat.x = 0
// this.positionLngLat.y = 0 // this.positionLngLat.y = 0
// this.map.setCity('唐山市'); // this.map.setCity('上海市');
this.selectedFireForce.contentVerify = null this.selectedFireForce.contentVerify = null
this.clearData() this.clearData()
} }
@ -1524,7 +1524,7 @@ export class FireForceComponent implements OnInit {
this.map = MapFactory.MapInstance('container', { this.map = MapFactory.MapInstance('container', {
zoom: 12 zoom: 12
}) })
this.map.setCity('唐山市'); this.map.setCity('上海市');
//输入提示 //输入提示
var autoOptions = { var autoOptions = {
input: "tipinput" input: "tipinput"

4
src/app/data-collection/linkage-forces/linkage-forces.component.ts

@ -423,7 +423,7 @@ export class LinkageForcesComponent implements OnInit {
this.clearData() this.clearData()
this.LinkageForceDetailInfo.linkageForceType = data this.LinkageForceDetailInfo.linkageForceType = data
this.newPositionMarker ? this.map.remove(this.newPositionMarker) : null this.newPositionMarker ? this.map.remove(this.newPositionMarker) : null
this.map.setCity('唐山市'); this.map.setCity('上海市');
this.LinkageForceDetailInfo.contentVerify = null this.LinkageForceDetailInfo.contentVerify = null
} }
} }
@ -539,7 +539,7 @@ export class LinkageForcesComponent implements OnInit {
this.map = MapFactory.MapInstance('container', { this.map = MapFactory.MapInstance('container', {
zoom:12 zoom:12
}) })
this.map.setCity('唐山市'); this.map.setCity('上海市');
//输入提示 //输入提示
var autoOptions = { var autoOptions = {
input: "tipinput" input: "tipinput"

4
src/app/data-collection/water-collection/water-collection.component.ts

@ -430,7 +430,7 @@ export class WaterCollectionComponent implements OnInit {
this.newPositionMarker ? this.map.remove(this.newPositionMarker) : null this.newPositionMarker ? this.map.remove(this.newPositionMarker) : null
this.positionLngLat.x = 0 this.positionLngLat.x = 0
this.positionLngLat.y = 0 this.positionLngLat.y = 0
this.map.setCity('唐山市'); this.map.setCity('上海市');
this.clearData() this.clearData()
this.waterData.contentVerify = null this.waterData.contentVerify = null
} }
@ -543,7 +543,7 @@ export class WaterCollectionComponent implements OnInit {
this.map = MapFactory.MapInstance('container', { this.map = MapFactory.MapInstance('container', {
zoom:12 zoom:12
}) })
this.map.setCity('唐山市'); this.map.setCity('上海市');
//输入提示 //输入提示
var autoOptions = { var autoOptions = {
input: "tipinput" input: "tipinput"

70
src/app/external-links-plan/external-links-plan.component.html

@ -1,11 +1,73 @@
<!-- 株洲项目:传入预案id显示相应预案 --> <mat-tab-group *ngIf="planId" selectedIndex="10" style="height: 99%;">
<mat-tab label="1.基本信息">
<ng-template matTabContent>
<app-basicinfo-look></app-basicinfo-look>
</ng-template>
</mat-tab>
<mat-tab label="2.四周毗邻">
<ng-template matTabContent>
<app-allaround></app-allaround>
</ng-template>
</mat-tab>
<mat-tab label="3.消防设施">
<ng-template matTabContent>
<app-fire-fighting-device-look></app-fire-fighting-device-look>
</ng-template>
</mat-tab>
<mat-tab label="4.重点部位">
<ng-template matTabContent>
<app-key-site-look></app-key-site-look>
</ng-template>
</mat-tab>
<mat-tab label="5.功能分区">
<ng-template matTabContent>
<app-function-division-look></app-function-division-look>
</ng-template>
</mat-tab>
<mat-tab label="6.行车路线">
<ng-template matTabContent>
<app-router-gis></app-router-gis>
</ng-template>
</mat-tab>
<mat-tab label="7.周边水源及力量">
<ng-template matTabContent>
<app-water-road></app-water-road>
</ng-template>
</mat-tab>
<mat-tab label="8.实景图">
<ng-template matTabContent>
<app-realistic-picture-look></app-realistic-picture-look>
</ng-template>
</mat-tab>
<mat-tab label="9.上传CAD">
<ng-template matTabContent>
<app-uploading-cad-look></app-uploading-cad-look>
</ng-template>
</mat-tab>
<mat-tab label="10.特别警示">
<ng-template matTabContent>
<app-special-warning></app-special-warning>
</ng-template>
</mat-tab>
<mat-tab label="11.作战部署">
<ng-template matTabContent>
<div *ngIf="showType == 0"> <div *ngIf="showType == 0">
<iframe id="inneriframe" [src]='iframeSrc' frameborder="0" style="width: 100%;height: 100%;"></iframe> <iframe id="inneriframe" [src]='iframeSrc' frameborder="0" style="width: 100%;height: 100%;"></iframe>
</div> </div>
<div *ngIf="showType == 1" id="viewer"></div> <div *ngIf="showType == 1" id="viewer"></div>
<div *ngIf="showType == 2">
<iframe id="inneriframe2" [src]='threedUrl' frameborder="0" style="width: 100%;height: 100%;"></iframe>
</div>
<div *ngIf="showType == 3"> <div *ngIf="showType == 3">
<app-collection-tools></app-collection-tools> <app-collection-tools></app-collection-tools>
</div> </div>
<!-- 在线编制预案 -->
<div *ngIf="showType == 2">
<app-create-plan-online-five></app-create-plan-online-five>
</div>
</ng-template>
</mat-tab>
</mat-tab-group>
<div *ngIf="unitId">
<app-basicinfo-look></app-basicinfo-look>
</div>

260
src/app/external-links-plan/external-links-plan.component.ts

@ -1,133 +1,197 @@
import { HttpClient } from '@angular/common/http'; import { HttpClient } from "@angular/common/http";
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from "@angular/core";
import { ActivatedRoute } from '@angular/router'; import { ActivatedRoute, Router } from "@angular/router";
import { CacheTokenService } from '../http-interceptors/cache-token.service'; import { CacheTokenService } from "../http-interceptors/cache-token.service";
import { Viewer } from 'photo-sphere-viewer'; import { Viewer } from "photo-sphere-viewer";
import { DomSanitizer } from '@angular/platform-browser'; import { DomSanitizer } from "@angular/platform-browser";
declare var CryptoJS
@Component({ @Component({
selector: 'app-external-links-plan', selector: "app-external-links-plan",
templateUrl: './external-links-plan.component.html', templateUrl: "./external-links-plan.component.html",
styleUrls: ['./external-links-plan.component.scss'] styleUrls: ["./external-links-plan.component.scss"],
}) })
export class ExternalLinksPlanComponent implements OnInit { export class ExternalLinksPlanComponent implements OnInit {
constructor(
private http: HttpClient,
private token: CacheTokenService,
public route: ActivatedRoute,
private sanitizer: DomSanitizer,
private router: Router
) {}
constructor(private http: HttpClient, private token: CacheTokenService, public route: ActivatedRoute, private sanitizer: DomSanitizer) { } planId: any; //预案id
planId: any//预案id viewer; //全景图对象
viewer//全景图对象 fetchUrl; //预案文件地址
fetchUrl//预案文件地址 showType; //预案类型 1:全景图
showType//预案类型 1:全景图 planData; //预案信息
planData//预案信息
unitId;
async ngOnInit(): Promise<void> { async ngOnInit(): Promise<void> {
await this.login()//登录存储token await this.login(); //登录存储token
this.route.queryParams.subscribe(paramsData => { this.route.queryParams.subscribe((paramsData) => {
this.planId = paramsData.planId console.log(paramsData.planId)
let planId = paramsData.planId if (paramsData.planId) {
this.http.get(`/api/PlanComponents/${planId}`).subscribe((data: any) => { this.planId = paramsData.planId;
console.log('单个预案详细信息', data) this.http
this.planData = data .get(`/api/PlanComponents/${this.planId}`)
.subscribe((data: any) => {
console.log("单个预案详细信息", data);
sessionStorage.setItem("planId", data.id);
sessionStorage.setItem("companyId", data.companyId);
sessionStorage.setItem(
"buildingTypeId",
data.company.buildingTypes[0].id
);
sessionStorage.setItem("editable", "0");
sessionStorage.setItem("planName", data.name);
let queryParams = {};
if (data.webTextData && data.planType === 16) {
queryParams = {
id: data.companyId,
planId: data.id,
orName: data.company.organizationName,
orId: data.company.organizationId,
companyId: data.companyId,
planName: data.name,
unitName: data.companyName,
planCategory: data.planCategory,
unitTypeId: data.company.buildingTypes[0].id,
pattern: "false",
};
} else {
queryParams = {
id: data.companyId,
planId: data.id,
orName: data.company.organizationName,
orId: data.company.organizationId,
};
}
this.router.navigate([`/linksPlan`], {
queryParams: queryParams,
});
this.planData = data;
//如果是查看文件类型
console.log("data.planType", data.planType);
if (data.planType != 1 && data.planType != 2) { if (data.planType != 1 && data.planType != 2) {
this.fetchUrl = data.attachmentUrls[0] this.fetchUrl = data.attachmentUrls ? data.attachmentUrls[0] : "";
var index = this.fetchUrl.indexOf("\/") var index = this.fetchUrl.indexOf("/");
if (this.fetchUrl.substr(0, index) == 'psw') {
this.showType = 1 // 在线编制预案
var obj = document.getElementById('viewer') if (data.webTextData && data.planType === 16) {
this.showType = 2;
return;
}
//全景图图片
if (this.fetchUrl.substr(0, index) == "psw") {
this.showType = 1;
var obj = document.getElementById("viewer");
if (obj != null) { if (obj != null) {
obj.innerHTML = '' obj.innerHTML = "";
} }
window.setTimeout(() => { window.setTimeout(() => {
this.viewer = new Viewer({ this.viewer = new Viewer({
container: document.querySelector('#viewer'), container: document.querySelector("#viewer"),
panorama: '/api/Objects/PlanPlatform/' + this.fetchUrl, panorama: "/api/Objects/PlanPlatform/" + this.fetchUrl,
});
}); });
})
} else { } else {
//毕生 //word文档
this.lookWord() this.lookWord();
} }
} else { } else {
// 二维三维预案 // 如果是二三维预案
this.handleData() this.handleData();
} }
}) });
}) } else if (paramsData.unitId) {
this.http
.get(`/api/Companies/${paramsData.unitId}`)
.subscribe((data: any) => {
console.log("单位信息", data);
sessionStorage.setItem("editable", "0");
sessionStorage.setItem("companyName", data.name);
sessionStorage.setItem("companyId", data.id);
sessionStorage.setItem(
data.id,
JSON.stringify(data.companyIntegrityScore)
);
let queryParams = {
id: data.id,
usci: data.usci,
};
this.unitId = paramsData.unitId;
this.router.navigate([`/linksPlan`], {
queryParams: queryParams,
});
});
}
});
} }
async login() { async login() {
await new Promise((resolve, reject) => { await new Promise((resolve, reject) => {
this.http.post('/api/Account/SignIn', { let { appKey, signature, timestamp } = this.route.snapshot.queryParams;
name: 'zhuzhouyuanchakan', if (!appKey || !signature || !timestamp) {
password: '12345678' alert("url参数不完整");
}).subscribe((data: any) => { return;
}
this.http
.get("/api/Account/VerifyAppInfo", {
params: {
appKey: appKey,
signature: signature,
timestamp: timestamp,
},
})
.subscribe((data: any) => {
sessionStorage.setItem("level", data.level); sessionStorage.setItem("level", data.level);
sessionStorage.setItem("token", data.token); sessionStorage.setItem("token", data.token);
sessionStorage.setItem("refreshToken", data.refreshToken); sessionStorage.setItem("refreshToken", data.refreshToken);
console.log('登录成功', data) console.log("登录成功", data);
resolve(data) resolve(data);
this.token.startUp() this.token.startUp();
}) });
}) });
} }
iframeSrc//毕生服务器链接 iframeSrc; //word服务器链接
src//文件存储地址
lookWord() { lookWord() {
this.showType = 0 this.showType = 0;
let src let src;
let suffix = this.fetchUrl.split('.')[this.fetchUrl.split('.').length - 1].toLowerCase() let suffix = this.fetchUrl
if (suffix == 'docx' || suffix == 'doc') { .split(".")
let arr = this.fetchUrl.split('.') [this.fetchUrl.split(".").length - 1].toLowerCase();
arr[arr.length - 1] = 'pdf' if (suffix == "docx" || suffix == "doc") {
src = `/api/Objects/PlanPlatform/` + arr.join('.') let arr = this.fetchUrl.split(".");
}else if (suffix == 'pdf') { arr[arr.length - 1] = "pdf";
src = `/api/Objects/PlanPlatform/` + this.fetchUrl src = `/api/Objects/PlanPlatform/` + arr.join(".");
} else if (suffix == "pdf") {
src = `/api/Objects/PlanPlatform/` + this.fetchUrl;
} }
this.iframeSrc = this.sanitizer.bypassSecurityTrustResourceUrl(src); this.iframeSrc = this.sanitizer.bypassSecurityTrustResourceUrl(src);
} }
companyData//当前公司信息 companyData; //当前公司信息
thirdPartyURL thirdPartyURL;
threedUrl: any threedUrl: any;
handleData() { handleData() {
let data = this.planData let data = this.planData;
if (this.planData.planMode == 2) { //预案planMode=2时, 跳查看页面组件 if (this.planData.planMode == 1 || this.planData.planMode == 2) {
//预案planMode=2时, 跳查看页面组件
this.http.get(`/api/Plans/${data.companyId}`).subscribe((data: any) => { this.showType = 3;
console.log(data) } else if (this.planData.planMode == 3) {
data && data.company ? this.companyData = data.company : null //网页地址
sessionStorage.setItem("buildingTypeId", this.companyData.buildingTypes.length ? this.companyData.buildingTypes[0].id : undefined); let localhostPath = window.document.location.href.substring(
sessionStorage.setItem("companyId", data.companyId); 0,
sessionStorage.setItem("planId", this.planId); window.document.location.href.indexOf(window.document.location.pathname)
sessionStorage.setItem("editable", '0'); );
sessionStorage.setItem("planName", this.planData.name) let url = data.url;
this.showType = 3
// this.threedUrl = this.sanitizer.bypassSecurityTrustResourceUrl(`/keyUnit/viewunitinfoplans?id=${data.companyId}`)
})
} else if (this.planData.planMode == 3) { //预案planMode=3时, 第三方网址'
// this.http.get(`/api/Plans/${data.companyId}`).subscribe((data: any) => {
// data && data.company ? this.companyData = data.company : null
// this.threedUrl = this.sanitizer.bypassSecurityTrustResourceUrl(data.url)
// this.showType = 2
// })
let localhostPath = window.document.location.href.substring( 0, window.document.location.href.indexOf(window.document.location.pathname))
//localhostPath : http://39.106.78.171:8000/
let url = data.url
if (url.indexOf(localhostPath) != -1) { if (url.indexOf(localhostPath) != -1) {
window.location.href = `${url}?unitId=${data.company.id}&unitName=${data.company.name}&editMode=false` window.location.href = `${url}?unitId=${data.company.id}&unitName=${data.company.name}&editMode=false`;
} else { } else {
// let substr = url.split('/').splice(3,url.split('/').length) window.location.href = `${url}?unitId=${data.company.id}&unitName=${data.company.name}&editMode=false`;
// let port = url.split(':')[2]
// if(port.indexOf('/') != -1){
// port = port.split('/')[0]
// }
// let ip = localhostPath.split(':')
// ip.pop()
// let newurl = ip.join(':') + ":" + port + "/" + substr.join('/');
// // console.log('xxx',newurl)
// window.location.href = `${newurl}?unitId=${data.company.id}&unitName=${data.company.name}&editMode=false`
window.location.href = `${url}?unitId=${data.company.id}&unitName=${data.company.name}&editMode=false`
} }
} }
} }

75
src/app/gis-management/gis-labeling/gis-labeling.component.html

@ -1,4 +1,3 @@
<div class="content"> <div class="content">
<!-- <button mat-button style="position: absolute;left: 50%;top: 0;z-index: 999;" (click)="createimg()">生成图片</button> --> <!-- <button mat-button style="position: absolute;left: 50%;top: 0;z-index: 999;" (click)="createimg()">生成图片</button> -->
<div id="map"></div> <div id="map"></div>
@ -27,31 +26,39 @@
<div class="routeHeader"> <div class="routeHeader">
<label style="bottom: 13px; left: 38px;" class="routeGISPublicIcon" (click)='clearGISRoute()'>清除路线</label> <label style="bottom: 13px; left: 38px;" class="routeGISPublicIcon" (click)='clearGISRoute()'>清除路线</label>
<label style="bottom: 13px; left: 275px;" class="routeGISPublicIcon" (click)='queryGISRoute()'>查询</label> <label style="bottom: 13px; left: 275px;" class="routeGISPublicIcon" (click)='queryGISRoute()'>查询</label>
<label style="top: 0px; right: 5px; font-size: 19px;" class="routeGISPublicIcon" (click)='closeRouteGIS()' title="关闭">×</label> <label style="top: 0px; right: 5px; font-size: 19px;" class="routeGISPublicIcon" (click)='closeRouteGIS()'
title="关闭">×</label>
<div class="routeLeft" (click)='exchangeGISRoute()'><mat-icon>import_export</mat-icon></div> <div class="routeLeft" (click)='exchangeGISRoute()'><mat-icon>import_export</mat-icon></div>
<div class="routeContent" style="margin-top: -14px;"> <div class="routeContent" style="margin-top: -14px;">
<div class="routeEveryRow"> <div class="routeEveryRow">
<label class="routeText"></label> <label class="routeText"></label>
<input type="text" list="start" [(ngModel)]="routeStart" (ngModelChange)="routeChange(0)"> <input nz-input [(ngModel)]="routeStart" (ngModelChange)="routeChange(0)" [nzAutocomplete]="auto" />
<datalist id="start"> <nz-autocomplete nzBackfill #auto>
<option *ngFor="let item of routeStartList" value="{{item.district}} {{item.name}}"> <nz-auto-option *ngFor="let item of routeStartList" [nzValue]="item.district +' ' +item.name">
</datalist> {{item.district}} {{item.name}}
<label class="routeClear" *ngIf="routeStart" (click)='deleteSearchGIS(0)'><mat-icon>highlight_off</mat-icon></label> </nz-auto-option>
</nz-autocomplete>
<label class="routeClear" *ngIf="routeStart"
(click)='deleteSearchGIS(0)'><mat-icon>highlight_off</mat-icon></label>
</div> </div>
<div class="routeEveryRow"> <div class="routeEveryRow">
<label class="routeText"></label> <label class="routeText"></label>
<input type="text" list="end" [(ngModel)]="routeEnd" (ngModelChange)="routeChange(1)"> <input nz-input [(ngModel)]="routeEnd" (ngModelChange)="routeChange(1)" [nzAutocomplete]="auto2" />
<datalist id="end"> <nz-autocomplete nzBackfill #auto2>
<option *ngFor="let item of routeEndList" value="{{item.district}} {{item.name}}"> <nz-auto-option *ngFor="let item of routeEndList" [nzValue]="item.district +' ' +item.name">
</datalist> {{item.district}} {{item.name}}
<label class="routeClear" *ngIf="routeEnd" (click)='deleteSearchGIS(1)'><mat-icon>highlight_off</mat-icon></label> </nz-auto-option>
</nz-autocomplete>
<label class="routeClear" *ngIf="routeEnd"
(click)='deleteSearchGIS(1)'><mat-icon>highlight_off</mat-icon></label>
</div> </div>
</div> </div>
</div> </div>
<div class="routeCenter" *ngIf="routes.steps.length"> <div class="routeCenter" *ngIf="routes.steps.length">
<div style="text-align: center;"> <div style="text-align: center;">
<button class="routeType" [ngClass]="{'selectRouteType': selectType}" (click)='toggleRoute(true)'>推荐方案</button> <button class="routeType" [ngClass]="{'selectRouteType': selectType}" (click)='toggleRoute(true)'>推荐方案</button>
<button class="routeType" [ngClass]="{'selectRouteType': !selectType}" (click)='toggleRoute(false)'>躲避拥堵</button> <button class="routeType" [ngClass]="{'selectRouteType': !selectType}"
(click)='toggleRoute(false)'>躲避拥堵</button>
</div> </div>
<div class="routeTypeExplain" style="text-align: center; font-weight: 550;"> <div class="routeTypeExplain" style="text-align: center; font-weight: 550;">
<label>约{{ routes.time / 60 | number:'0.0-0' }}分钟</label> <label>约{{ routes.time / 60 | number:'0.0-0' }}分钟</label>
@ -64,7 +71,8 @@
<div class="routeCenterTB" title="{{routeStart}}"> <div class="routeCenterTB" title="{{routeStart}}">
<p style="background-color: #0080FF;"></p><label style="font-weight: 550;">{{routeStart}}</label> <p style="background-color: #0080FF;"></p><label style="font-weight: 550;">{{routeStart}}</label>
</div> </div>
<div class="routeCenterTB" *ngFor="let item of routes.steps" style="border-bottom: 1px solid rgb(223, 212, 212);" title="{{item.instruction}}"> <div class="routeCenterTB" *ngFor="let item of routes.steps" style="border-bottom: 1px solid rgb(223, 212, 212);"
title="{{item.instruction}}">
<p class="orientation" *ngIf="item.orientation == '西'"></p> <p class="orientation" *ngIf="item.orientation == '西'"></p>
<p class="orientation" *ngIf="item.orientation == '北'"></p> <p class="orientation" *ngIf="item.orientation == '北'"></p>
<p class="orientation" *ngIf="item.orientation == '东'"></p> <p class="orientation" *ngIf="item.orientation == '东'"></p>
@ -86,15 +94,19 @@
<div class="leftDiv" [ngClass]="{'leftDivShow': leftDivState,'leftDivHide': !leftDivState}"> <div class="leftDiv" [ngClass]="{'leftDivShow': leftDivState,'leftDivHide': !leftDivState}">
<app-left-working style="width: 100%;height: 100%;" (onCustomEvent)="closeDiv()" #appLeft></app-left-working> <app-left-working style="width: 100%;height: 100%;" (onCustomEvent)="closeDiv()" #appLeft></app-left-working>
</div> </div>
<img *ngIf="showLeftDiv" id="leftHide" class="leftHide publicButton" title="隐藏" [ngClass]="{'leftDivShow': leftDivState,'leftDivHide': !leftDivState}" (click)='toggleLeft(false)' src="../../../assets//images/showhide.png" alt=""> <img *ngIf="showLeftDiv" id="leftHide" class="leftHide publicButton" title="隐藏"
<img class="leftShow publicButton" title="显示" *ngIf="!leftDivState && showLeftDiv" (click)='toggleLeft(true)' src="../../../assets//images/showhide.png" alt=""> [ngClass]="{'leftDivShow': leftDivState,'leftDivHide': !leftDivState}" (click)='toggleLeft(false)'
src="../../../assets//images/showhide.png" alt="">
<img class="leftShow publicButton" title="显示" *ngIf="!leftDivState && showLeftDiv" (click)='toggleLeft(true)'
src="../../../assets//images/showhide.png" alt="">
<!-- 左侧 --> <!-- 左侧 -->
<!-- 右上角 --> <!-- 右上角 -->
<div class="rightTopBox"> <div class="rightTopBox">
<!-- <button (click)="setMaxZoom()">设置聚合范围</button> --> <!-- <button (click)="setMaxZoom()">设置聚合范围</button> -->
<div class="topbox"> <div class="topbox">
<div (click)="clickTitle(key)" *ngFor="let item of titleList;let key = index" class="titleItem" [ngClass]="{'selectedItem': key == selectedTitle}"> <div (click)="clickTitle(key)" *ngFor="let item of titleList;let key = index" class="titleItem"
[ngClass]="{'selectedItem': key == selectedTitle}">
<img [src]="item.iconImg" alt=""> <img [src]="item.iconImg" alt="">
<span>{{item.name}}</span> <span>{{item.name}}</span>
</div> </div>
@ -104,7 +116,8 @@
<div *ngIf="selectedTitle == 0" class="keyUnitBox"> <div *ngIf="selectedTitle == 0" class="keyUnitBox">
<form [formGroup]="keyUnitForm" class="inputList" (submit)='ketUnitSubmit(keyUnitForm.value)'> <form [formGroup]="keyUnitForm" class="inputList" (submit)='ketUnitSubmit(keyUnitForm.value)'>
<div style="display: flex;justify-content: space-between;align-items: center;"> <div style="display: flex;justify-content: space-between;align-items: center;">
<mat-checkbox color="primary" formControlName="allSelectedUnit" (change)="selectedAllUnit($event)">全选</mat-checkbox> <mat-checkbox color="primary" formControlName="allSelectedUnit"
(change)="selectedAllUnit($event)">全选</mat-checkbox>
<mat-icon (click)="closertdiv()">clear</mat-icon> <mat-icon (click)="closertdiv()">clear</mat-icon>
</div> </div>
<div class="inputItem"> <div class="inputItem">
@ -141,7 +154,8 @@
<div *ngIf="selectedTitle == 1" class="waterBox"> <div *ngIf="selectedTitle == 1" class="waterBox">
<form [formGroup]="watertForm" class="inputList" (submit)='waterSubmit(watertForm.value)'> <form [formGroup]="watertForm" class="inputList" (submit)='waterSubmit(watertForm.value)'>
<div style="display: flex;justify-content: space-between;align-items: center;"> <div style="display: flex;justify-content: space-between;align-items: center;">
<mat-checkbox color="primary" formControlName="allSelectedWater" (change)="selectedAllWater($event)">全选</mat-checkbox> <mat-checkbox color="primary" formControlName="allSelectedWater"
(change)="selectedAllWater($event)">全选</mat-checkbox>
<mat-icon (click)="closertdiv()">clear</mat-icon> <mat-icon (click)="closertdiv()">clear</mat-icon>
</div> </div>
<div class="inputItem"> <div class="inputItem">
@ -178,7 +192,8 @@
<div *ngIf="selectedTitle == 2" class="fireForceBox"> <div *ngIf="selectedTitle == 2" class="fireForceBox">
<form [formGroup]="fireForceForm" class="inputList" (submit)='fireForceSubmit(fireForceForm.value)'> <form [formGroup]="fireForceForm" class="inputList" (submit)='fireForceSubmit(fireForceForm.value)'>
<div style="display: flex;justify-content: space-between;align-items: center;"> <div style="display: flex;justify-content: space-between;align-items: center;">
<mat-checkbox color="primary" formControlName="allSelectedFireForce" (change)="selectedAllFireForce($event)">全选</mat-checkbox> <mat-checkbox color="primary" formControlName="allSelectedFireForce"
(change)="selectedAllFireForce($event)">全选</mat-checkbox>
<mat-icon (click)="closertdiv()">clear</mat-icon> <mat-icon (click)="closertdiv()">clear</mat-icon>
</div> </div>
<div class="inputItem"> <div class="inputItem">
@ -215,11 +230,13 @@
<div *ngIf="selectedTitle == 3" class="linkageForcesBox"> <div *ngIf="selectedTitle == 3" class="linkageForcesBox">
<form [formGroup]="linkageForcesForm" class="inputList" (submit)='linkageForcesSubmit(linkageForcesForm.value)'> <form [formGroup]="linkageForcesForm" class="inputList" (submit)='linkageForcesSubmit(linkageForcesForm.value)'>
<div style="display: flex;justify-content: space-between;align-items: center;"> <div style="display: flex;justify-content: space-between;align-items: center;">
<mat-checkbox color="primary" formControlName="allSelectedLinkageForces" (change)="selectedAllLinkageForces($event)">全选</mat-checkbox> <mat-checkbox color="primary" formControlName="allSelectedLinkageForces"
(change)="selectedAllLinkageForces($event)">全选</mat-checkbox>
<mat-icon (click)="closertdiv()">clear</mat-icon> <mat-icon (click)="closertdiv()">clear</mat-icon>
</div> </div>
<div class="inputItem"> <div class="inputItem">
<mat-checkbox *ngFor="let linkage of linkageForces.controls;let i = index" color="primary" [formControl]="linkage"> <mat-checkbox *ngFor="let linkage of linkageForces.controls;let i = index" color="primary"
[formControl]="linkage">
{{linkageForcesList[i].name}} {{linkageForcesList[i].name}}
</mat-checkbox> </mat-checkbox>
</div> </div>
@ -251,8 +268,10 @@
</div> </div>
<div *ngIf="selectedTitle == 4" class="distanceBox"> <div *ngIf="selectedTitle == 4" class="distanceBox">
<div> <div>
<input type="radio" name='func' [(ngModel)]="checkRadio" value='rule' (click)="measure('rule')" checked><span class="input-text" style="margin-right: 15px;">&nbsp;距离测量</span> <input type="radio" name='func' [(ngModel)]="checkRadio" value='rule' (click)="measure('rule')" checked><span
<input type="radio" name='func' [(ngModel)]="checkRadio" value='measureArea' (click)="measure('measureArea')"><span class="input-text"> &nbsp;面积测量</span> class="input-text" style="margin-right: 15px;">&nbsp;距离测量</span>
<input type="radio" name='func' [(ngModel)]="checkRadio" value='measureArea'
(click)="measure('measureArea')"><span class="input-text"> &nbsp;面积测量</span>
</div> </div>
<button class="clearbutton" (click)="clearnAll()">清除</button> <button class="clearbutton" (click)="clearnAll()">清除</button>
</div> </div>
@ -260,8 +279,10 @@
<div class="topbox"> <div class="topbox">
<span>图层</span> <span>图层</span>
<div style="display: flex;align-items: center;"> <div style="display: flex;align-items: center;">
<mat-slide-toggle [(ngModel)]="satelliteModel" (change)='satelliteChange($event)' color="primary" labelPosition='before' style="margin-right: 25px;">卫星图层</mat-slide-toggle> <mat-slide-toggle [(ngModel)]="satelliteModel" (change)='satelliteChange($event)' color="primary"
<mat-slide-toggle [(ngModel)]="loadModel" (change)='loadChange($event)' color="primary" labelPosition='before'>路网图层</mat-slide-toggle> labelPosition='before' style="margin-right: 25px;">卫星图层</mat-slide-toggle>
<mat-slide-toggle [(ngModel)]="loadModel" (change)='loadChange($event)' color="primary"
labelPosition='before'>路网图层</mat-slide-toggle>
<mat-icon (click)="closertdiv()" style="margin-left: 10px;">clear</mat-icon> <mat-icon (click)="closertdiv()" style="margin-left: 10px;">clear</mat-icon>
</div> </div>
</div> </div>
@ -283,5 +304,3 @@
</div> </div>
<!-- 右上角 --> <!-- 右上角 -->
</div> </div>

2257
src/app/gis-management/gis-labeling/gis-labeling.component.ts

File diff suppressed because it is too large Load Diff

167
src/app/gis-management/gis-management.module.ts

@ -1,69 +1,102 @@
import { NgModule } from '@angular/core'; import { NgModule } from "@angular/core";
import { CommonModule } from '@angular/common'; import { CommonModule } from "@angular/common";
import { DownloadFile, GisLabelingComponent, LookPlanDialog, ShareUrlDialog } from './gis-labeling/gis-labeling.component'; import {
import {A11yModule} from '@angular/cdk/a11y'; DownloadFile,
import {DragDropModule} from '@angular/cdk/drag-drop'; GisLabelingComponent,
import {PortalModule} from '@angular/cdk/portal'; LookPlanDialog,
import {ScrollingModule} from '@angular/cdk/scrolling'; ShareUrlDialog,
import {CdkStepperModule} from '@angular/cdk/stepper'; } from "./gis-labeling/gis-labeling.component";
import {CdkTableModule} from '@angular/cdk/table'; import { A11yModule } from "@angular/cdk/a11y";
import {CdkTreeModule} from '@angular/cdk/tree'; import { DragDropModule } from "@angular/cdk/drag-drop";
import {MatAutocompleteModule} from '@angular/material/autocomplete'; import { PortalModule } from "@angular/cdk/portal";
import {MatBadgeModule} from '@angular/material/badge'; import { ScrollingModule } from "@angular/cdk/scrolling";
import {MatBottomSheetModule} from '@angular/material/bottom-sheet'; import { CdkStepperModule } from "@angular/cdk/stepper";
import {MatButtonModule} from '@angular/material/button'; import { CdkTableModule } from "@angular/cdk/table";
import {MatButtonToggleModule} from '@angular/material/button-toggle'; import { CdkTreeModule } from "@angular/cdk/tree";
import {MatCardModule} from '@angular/material/card'; import { MatAutocompleteModule } from "@angular/material/autocomplete";
import {MatCheckboxModule} from '@angular/material/checkbox'; import { MatBadgeModule } from "@angular/material/badge";
import {MatChipsModule} from '@angular/material/chips'; import { MatBottomSheetModule } from "@angular/material/bottom-sheet";
import {MatStepperModule} from '@angular/material/stepper'; import { MatButtonModule } from "@angular/material/button";
import {MatDatepickerModule} from '@angular/material/datepicker'; import { MatButtonToggleModule } from "@angular/material/button-toggle";
import {MatDialogModule} from '@angular/material/dialog'; import { MatCardModule } from "@angular/material/card";
import {MatDividerModule} from '@angular/material/divider'; import { MatCheckboxModule } from "@angular/material/checkbox";
import {MatExpansionModule} from '@angular/material/expansion'; import { MatChipsModule } from "@angular/material/chips";
import {MatGridListModule} from '@angular/material/grid-list'; import { MatStepperModule } from "@angular/material/stepper";
import {MatIconModule} from '@angular/material/icon'; import { MatDatepickerModule } from "@angular/material/datepicker";
import {MatInputModule} from '@angular/material/input'; import { MatDialogModule } from "@angular/material/dialog";
import {MatListModule} from '@angular/material/list'; import { MatDividerModule } from "@angular/material/divider";
import {MatMenuModule} from '@angular/material/menu'; import { MatExpansionModule } from "@angular/material/expansion";
import {MatNativeDateModule, MatRippleModule, MatOption} from '@angular/material/core'; import { MatGridListModule } from "@angular/material/grid-list";
import {MatPaginatorModule} from '@angular/material/paginator'; import { MatIconModule } from "@angular/material/icon";
import {MatProgressBarModule} from '@angular/material/progress-bar'; import { MatInputModule } from "@angular/material/input";
import {MatProgressSpinnerModule} from '@angular/material/progress-spinner'; import { MatListModule } from "@angular/material/list";
import {MatRadioModule} from '@angular/material/radio'; import { MatMenuModule } from "@angular/material/menu";
import {MatSelectModule} from '@angular/material/select'; import {
import {MatSidenavModule} from '@angular/material/sidenav'; MatNativeDateModule,
import {MatSliderModule} from '@angular/material/slider'; MatRippleModule,
import {MatSlideToggleModule} from '@angular/material/slide-toggle'; MatOption,
import {MatSnackBarModule} from '@angular/material/snack-bar'; } from "@angular/material/core";
import {MatSortModule} from '@angular/material/sort'; import { MatPaginatorModule } from "@angular/material/paginator";
import {MatTableModule} from '@angular/material/table'; import { MatProgressBarModule } from "@angular/material/progress-bar";
import {MatTabsModule} from '@angular/material/tabs'; import { MatProgressSpinnerModule } from "@angular/material/progress-spinner";
import {MatToolbarModule} from '@angular/material/toolbar'; import { MatRadioModule } from "@angular/material/radio";
import {MatTooltipModule} from '@angular/material/tooltip'; import { MatSelectModule } from "@angular/material/select";
import {MatTreeModule} from '@angular/material/tree'; import { MatSidenavModule } from "@angular/material/sidenav";
import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { MatSliderModule } from "@angular/material/slider";
import { GisRoutingModule } from './gis-management-routing.module'; import { MatSlideToggleModule } from "@angular/material/slide-toggle";
import { LeftWorkingComponent } from './left-working/left-working.component'; import { MatSnackBarModule } from "@angular/material/snack-bar";
import { BasicInfoComponent } from './basic-info/basic-info.component'; import { MatSortModule } from "@angular/material/sort";
import { FunctionPartitionComponent } from './function-partition/function-partition.component'; import { MatTableModule } from "@angular/material/table";
import { FireFacilitiesComponent } from './fire-facilities/fire-facilities.component'; import { MatTabsModule } from "@angular/material/tabs";
import {ImagesData2}from './fire-facilities/imagesdata.component' import { MatToolbarModule } from "@angular/material/toolbar";
import {AllaroundComponent} from './allaround/allaround.component' import { MatTooltipModule } from "@angular/material/tooltip";
import {ImgDetails}from './allaround/imgdetails.component'; import { MatTreeModule } from "@angular/material/tree";
import {KeySiteLookComponent} from './key-site-look/key-site.component' import { FormsModule, ReactiveFormsModule } from "@angular/forms";
import {KeySiteImgs2}from './key-site-look/keysiteimgs.component' import { GisRoutingModule } from "./gis-management-routing.module";
import {RealisticPictureLookComponent} from './realistic-picture-look/realistic-picture.component' import { LeftWorkingComponent } from "./left-working/left-working.component";
import {previewImg3} from './realistic-picture-look/realistic-picture.component' import { BasicInfoComponent } from "./basic-info/basic-info.component";
import { OpenPlanToolDialog, PlanListComponent } from './plan-list/plan-list.component'; import { FunctionPartitionComponent } from "./function-partition/function-partition.component";
import { PlanManagementModule } from '../plan-management/plan-management.module'; import { FireFacilitiesComponent } from "./fire-facilities/fire-facilities.component";
import { UiModule } from '../ui/ui.module'; import { ImagesData2 } from "./fire-facilities/imagesdata.component";
import { CadDrawComponent } from './cad-draw/cad-draw.component'; import { AllaroundComponent } from "./allaround/allaround.component";
import {previewBigImg2} from './fire-facilities/imagesdata.component' import { ImgDetails } from "./allaround/imgdetails.component";
import { KeySiteLookComponent } from "./key-site-look/key-site.component";
import { KeySiteImgs2 } from "./key-site-look/keysiteimgs.component";
import { RealisticPictureLookComponent } from "./realistic-picture-look/realistic-picture.component";
import { previewImg3 } from "./realistic-picture-look/realistic-picture.component";
import {
OpenPlanToolDialog,
PlanListComponent,
} from "./plan-list/plan-list.component";
import { PlanManagementModule } from "../plan-management/plan-management.module";
import { UiModule } from "../ui/ui.module";
import { CadDrawComponent } from "./cad-draw/cad-draw.component";
import { previewBigImg2 } from "./fire-facilities/imagesdata.component";
import { NzAutocompleteModule } from "ng-zorro-antd/auto-complete";
@NgModule({ @NgModule({
declarations: [GisLabelingComponent, LeftWorkingComponent, FunctionPartitionComponent, RealisticPictureLookComponent,previewImg3,previewBigImg2, declarations: [
FireFacilitiesComponent,ImagesData2,AllaroundComponent,ImgDetails,KeySiteLookComponent,KeySiteImgs2,BasicInfoComponent,FunctionPartitionComponent,ShareUrlDialog, PlanListComponent,LookPlanDialog,DownloadFile,OpenPlanToolDialog, CadDrawComponent], GisLabelingComponent,
LeftWorkingComponent,
FunctionPartitionComponent,
RealisticPictureLookComponent,
previewImg3,
previewBigImg2,
FireFacilitiesComponent,
ImagesData2,
AllaroundComponent,
ImgDetails,
KeySiteLookComponent,
KeySiteImgs2,
BasicInfoComponent,
FunctionPartitionComponent,
ShareUrlDialog,
PlanListComponent,
LookPlanDialog,
DownloadFile,
OpenPlanToolDialog,
CadDrawComponent,
],
imports: [ imports: [
CommonModule, CommonModule,
@ -114,8 +147,8 @@ import {previewBigImg2} from './fire-facilities/imagesdata.component'
FormsModule, FormsModule,
ReactiveFormsModule, ReactiveFormsModule,
PlanManagementModule, PlanManagementModule,
UiModule UiModule,
] NzAutocompleteModule,
],
}) })
export class GISManagementModule {} export class GISManagementModule {}

4
src/app/http-interceptors/base-interceptor.ts

@ -72,9 +72,7 @@ export class BaseInterceptor implements HttpInterceptor {
} else { } else {
// 服务端返回http状态码 // 服务端返回http状态码
// 服务端返回错误信息 // 服务端返回错误信息
console.error( console.error(error);
`Backend returned code ${error.status}, ` +
`body was: ${error.error}`);
} }
// 返回带有面向用户的错误信息 // 返回带有面向用户的错误信息
return throwError( return throwError(

34
src/app/http-interceptors/cache-token.service.ts

@ -1,40 +1,34 @@
import { Injectable } from '@angular/core'; import { Injectable } from "@angular/core";
import { HttpClient } from '@angular/common/http' import { HttpClient } from "@angular/common/http";
@Injectable({ @Injectable({
providedIn: 'root' providedIn: "root",
}) })
export class CacheTokenService { export class CacheTokenService {
constructor(private http: HttpClient) {} constructor(private http: HttpClient) {}
public timer; public timer;
//刷新token令牌定时器 //刷新token令牌定时器
startUp = (): void => { startUp = (): void => {
window.clearInterval(this.timer) //清一遍定时器 window.clearInterval(this.timer); //清一遍定时器
this.timer = window.setInterval(() => { this.timer = window.setInterval(() => {
var token = sessionStorage.getItem("token"); var token = sessionStorage.getItem("token");
var refreshToken = sessionStorage.getItem("refreshToken"); var refreshToken = sessionStorage.getItem("refreshToken");
this.http.post('/api/Account/RefreshToken', { this.http
.post("/api/Account/RefreshToken", {
token: token, token: token,
refreshToken: refreshToken refreshToken: refreshToken,
}).subscribe((data:any) => { })
.subscribe((data: any) => {
sessionStorage.setItem("level", data.level); sessionStorage.setItem("level", data.level);
sessionStorage.setItem("token", data.token); sessionStorage.setItem("token", data.token);
sessionStorage.setItem("refreshToken", data.refreshToken); sessionStorage.setItem("refreshToken", data.refreshToken);
}) });
},18*60*1000) }, 5 * 60 * 1000);
};
}
//删除定时器 //删除定时器
delete = (): void => { delete = (): void => {
window.clearInterval(this.timer) window.clearInterval(this.timer);
} };
} }

29
src/app/interface.ts

@ -7,20 +7,20 @@
* @LastEditTime: 2021-04-09 17:12:59 * @LastEditTime: 2021-04-09 17:12:59
*/ */
export interface Data { export interface Data {
token:string, token: string;
refreshToken:string, refreshToken: string;
expires: number, expires: number;
realName:string, realName: string;
level:any, level: any;
isDefaultPassword:string isDefaultPassword: string;
} }
export interface windows { export interface windows {
token:string token: string;
} }
export enum isno { export enum isno {
"是", "是",
"否" "否",
} }
export enum PlanTypeEnum { export enum PlanTypeEnum {
@ -40,7 +40,7 @@ export enum PlanTypeEnum {
"shisan", "shisan",
"shisi", "shisi",
"shiwu", "shiwu",
"文本预案" "文本预案",
} }
export enum AuditStatusEnum { export enum AuditStatusEnum {
@ -88,6 +88,15 @@ export enum PlanLevelEnum {
"编制级别5", "编制级别5",
"编制级别6", "编制级别6",
"编制级别7", "编制级别7",
"中队" "中队",
} }
export enum PlanAuditStatusEnum {
"非审核状态" = 0,
"未提交审核" = 8,
"待审核" = 1,
"初审通过" = 16,
"初审退回" = 32,
"终审通过" = 2,
"终审退回" = 4,
}

7
src/app/key-unit/basicinfo/basicinfo.component.html

@ -51,8 +51,7 @@
<span>联系电话:</span> <span>联系电话:</span>
<mat-form-field> <mat-form-field>
<input type="number" matInput id="linkphone" name="linkphone" #linkphone="ngModel" <input type="number" matInput id="linkphone" name="linkphone" #linkphone="ngModel"
required required [(ngModel)]="unitinfo.phone" (focus)="closeorganizationbox()">
[(ngModel)]="unitinfo.phone" (focus)="closeorganizationbox()">
</mat-form-field> </mat-form-field>
<!-- <div *ngIf="linkphone.invalid && (linkphone.dirty || linkphone.touched)" <!-- <div *ngIf="linkphone.invalid && (linkphone.dirty || linkphone.touched)"
class="alert-danger"> class="alert-danger">
@ -263,7 +262,7 @@
(click)="removeline(element.propertyInfos)"> (click)="removeline(element.propertyInfos)">
<mat-icon>remove_circle_outline</mat-icon> <mat-icon>remove_circle_outline</mat-icon>
</button> </button>
{{item.propertyName}} {{item.propertyName}}{{item.physicalUnit? '('+item.physicalUnit+')' : ''}}
<span style="color: red;" *ngIf="item.required">*</span> <span style="color: red;" *ngIf="item.required">*</span>
</th> </th>
</tr> </tr>
@ -369,7 +368,7 @@
(click)="removeline(element.propertyInfos)"> (click)="removeline(element.propertyInfos)">
<mat-icon>remove_circle_outline</mat-icon> <mat-icon>remove_circle_outline</mat-icon>
</button> </button>
{{item.propertyName}} {{item.propertyName}}{{item.physicalUnit? '('+item.physicalUnit+')' : ''}}
<span style="color: red;" *ngIf="item.required">*</span> <span style="color: red;" *ngIf="item.required">*</span>
</th> </th>
</tr> </tr>

3
src/app/key-unit/basicinfo/basicinfo.component.ts

@ -200,7 +200,7 @@ export class BasicinfoComponent implements OnInit {
this.map.add(this.oldPositionMarker); this.map.add(this.oldPositionMarker);
} else { } else {
// console.log('未标注单位位置') // console.log('未标注单位位置')
this.map.setCity('唐山市'); this.map.setCity('上海');
} }
} }
markerPosition2 markerPosition2
@ -591,6 +591,7 @@ export class BasicinfoComponent implements OnInit {
} }
} }
}) })
console.log('this.houses',this.houses)
}) })
} }
//点击选项卡 //点击选项卡

12
src/app/key-unit/edit-plan-info/edit-plan-info.component.html

@ -45,7 +45,7 @@
<app-function-division></app-function-division> <app-function-division></app-function-division>
</ng-template> </ng-template>
</mat-tab> </mat-tab>
<!-- <mat-tab label="8.行车路线"> <mat-tab label="8.行车路线">
<ng-template matTabContent> <ng-template matTabContent>
<app-router-gis></app-router-gis> <app-router-gis></app-router-gis>
</ng-template> </ng-template>
@ -54,22 +54,22 @@
<ng-template matTabContent> <ng-template matTabContent>
<app-water-road></app-water-road> <app-water-road></app-water-road>
</ng-template> </ng-template>
</mat-tab> --> </mat-tab>
<mat-tab label="8.实景图"> <mat-tab label="10.实景图">
<ng-template matTabContent> <ng-template matTabContent>
<app-realistic-picture></app-realistic-picture> <app-realistic-picture></app-realistic-picture>
</ng-template> </ng-template>
</mat-tab> </mat-tab>
<mat-tab label="9.上传CAD"> <mat-tab label="11.上传CAD">
<ng-template matTabContent> <ng-template matTabContent>
<app-uploading-cad></app-uploading-cad> <app-uploading-cad></app-uploading-cad>
</ng-template> </ng-template>
</mat-tab> </mat-tab>
<!-- <mat-tab label="12.特别警示"> <mat-tab label="12.特别警示">
<ng-template matTabContent> <ng-template matTabContent>
<app-special-warning></app-special-warning> <app-special-warning></app-special-warning>
</ng-template> </ng-template>
</mat-tab> --> </mat-tab>
<!-- <mat-tab label="12.unity平面图"> <!-- <mat-tab label="12.unity平面图">
<ng-template matTabContent> <ng-template matTabContent>
<iframe id="main" src="/unityApp2Basic/index.html" name="unityApp" frameborder="0" width="96%" height="100%" style="margin-left: 2%;"></iframe> <iframe id="main" src="/unityApp2Basic/index.html" name="unityApp" frameborder="0" width="96%" height="100%" style="margin-left: 2%;"></iframe>

16
src/app/key-unit/edit-unit-info/edit-unit-info.component.html

@ -5,7 +5,7 @@
</div> </div>
</div> </div>
<mat-tab-group selectedIndex="7" style="height: 100%;"> <mat-tab-group selectedIndex="10" style="height: 100%;">
<mat-tab label="1.基本信息"> <mat-tab label="1.基本信息">
<ng-template matTabContent> <ng-template matTabContent>
<app-basicinfo></app-basicinfo> <app-basicinfo></app-basicinfo>
@ -31,7 +31,7 @@
<app-function-division></app-function-division> <app-function-division></app-function-division>
</ng-template> </ng-template>
</mat-tab> </mat-tab>
<!-- <mat-tab label="6.行车路线"> <mat-tab label="6.行车路线">
<ng-template matTabContent> <ng-template matTabContent>
<app-router-gis></app-router-gis> <app-router-gis></app-router-gis>
</ng-template> </ng-template>
@ -40,23 +40,23 @@
<ng-template matTabContent> <ng-template matTabContent>
<app-water-road></app-water-road> <app-water-road></app-water-road>
</ng-template> </ng-template>
</mat-tab> --> </mat-tab>
<mat-tab label="6.实景图"> <mat-tab label="8.实景图">
<ng-template matTabContent> <ng-template matTabContent>
<app-realistic-picture></app-realistic-picture> <app-realistic-picture></app-realistic-picture>
</ng-template> </ng-template>
</mat-tab> </mat-tab>
<mat-tab label="7.上传CAD"> <mat-tab label="9.上传CAD">
<ng-template matTabContent> <ng-template matTabContent>
<app-uploading-cad></app-uploading-cad> <app-uploading-cad></app-uploading-cad>
</ng-template> </ng-template>
</mat-tab> </mat-tab>
<!-- <mat-tab label="10.特别警示"> <mat-tab label="10.特别警示">
<ng-template matTabContent> <ng-template matTabContent>
<app-special-warning></app-special-warning> <app-special-warning></app-special-warning>
</ng-template> </ng-template>
</mat-tab> --> </mat-tab>
<mat-tab label="8.作战部署"> <mat-tab label="11.作战部署">
<ng-template matTabContent> <ng-template matTabContent>
<app-collection-tools></app-collection-tools> <app-collection-tools></app-collection-tools>
</ng-template> </ng-template>

251
src/app/key-unit/fire-fighting-device-look/fire-fighting-device.component.html

@ -1,97 +1,5 @@
<div class="content" id="firefightingdevicelook"> <div class="content" id="firefightingdevicelook">
<mat-tab-group> <mat-tab-group (selectedIndexChange)="selectedChange($event)">
<!--
<mat-tab label="单位消防设施">
<div class="contentBox">
<p style="width: 100%; margin: 30px auto; text-align: center;" *ngIf="!companyBuiltInGrouping.length">暂无数据,请完善单位基本信息</p>
<div style="width: 100%;margin-top: 25px;" *ngFor="let item of companyBuiltInGrouping;let key = index">
<h3 style="text-align: center;font-weight: 550;">{{item.name}}</h3>
<div style="margin-bottom: 10px;">
</div>
<div>
<mat-accordion multi>
<mat-expansion-panel disabled>
<mat-expansion-panel-header>
<label class="firstContent"></label>
<label class="textContent">项目</label>
<label class="textContent">照片</label>
<label class="totalContent">总数</label>
<label class="lastTextContent">主要情况</label>
</mat-expansion-panel-header>
</mat-expansion-panel>
<mat-expansion-panel *ngFor="let items of item.facilityItems" disabled [expanded]=items.expanded>
<mat-expansion-panel-header>
<label class="firstContent">
<mat-checkbox (change)='checkedCompany($event,item,items)' [disabled]='items.isBuiltin'></mat-checkbox>
</label>
<label class="textContent">{{items.name}}</label>
<label class="textContent"><a href="javascript:void(0)" (click)='previewImg(items)'>查看图片</a></label>
<label class="totalContent">{{items.total ? items.total : '总数: 0'}}</label>
<label class="lastTextContent">
<textarea readonly maxlength="250" [(ngModel)]="items.details" style="width: 80%;"></textarea>
</label>
<label><mat-icon (click)='SwitchBoard(items)' *ngIf="items.isBuiltin">keyboard_arrow_down</mat-icon></label>
</mat-expansion-panel-header>
<div class="overflowTable">
<div class="detailsTable">
<table>
<tr>
<th *ngFor="let header of items.header">{{header}}</th>
</tr>
<tr *ngFor="let body of items.body">
<td *ngFor="let header of items.header">{{body[header]? body[header] : '暂无数据'}}</td>
</tr>
</table>
</div>
<div *ngFor="let tableMsg of items.loopTable" class="detailsTable">
<p style="text-align: center; font-size: 16px; margin: 5px 0;">楼层/区域名称: {{tableMsg.name? tableMsg.name: '暂无名称'}}</p>
<table>
<tr>
<th *ngFor="let header of tableMsg.header">{{header}}</th>
</tr>
<tr *ngFor="let body of tableMsg.body">
<td *ngFor="let header of tableMsg.header">{{body[header]? body[header] : '暂无数据'}}</td>
</tr>
</table>
</div>
</div>
</mat-expansion-panel>
</mat-accordion>
</div>
</div>
<div style="width: 100%;margin-top: 25px;" *ngFor="let item of companyOptionalGrouping;let key = index">
<mat-accordion multi>
<mat-expansion-panel>
<mat-expansion-panel-header>
<h3 style="text-align: center;font-weight: 550;">{{item.name}}</h3>
</mat-expansion-panel-header>
<div *ngFor="let items of item.propertyInfos" class="InputField">
<label>{{items.propertyName}}:</label>
<input readonly type="text" *ngIf="items.propertyType!=1&&items.propertyType!=2&&items.propertyType!=4&&items.propertyType!=6"
[(ngModel)]="items.propertyValue" name="propertyValue">
<textarea readonly maxlength="250" *ngIf="items.propertyType==1" [(ngModel)]="items.propertyValue" name="propertyValue"></textarea>
<input readonly type="number" *ngIf="items.propertyType==2 ||items.propertyType==4" [(ngModel)]="items.propertyValue" name="propertyValue">
<mat-radio-group *ngIf="items.propertyType==6" [(ngModel)]="items.propertyValue" name="propertyValue">
<mat-radio-button style="margin-left: 5px;" [value]='radio.value' *ngFor="let radio of singleElection">{{radio.name}}</mat-radio-button>
</mat-radio-group>
</div>
</mat-expansion-panel>
</mat-accordion>
</div>
</div>
</mat-tab> -->
<mat-tab label="{{newItem.name}}" *ngFor="let newItem of allBuildingGrouping"> <mat-tab label="{{newItem.name}}" *ngFor="let newItem of allBuildingGrouping">
<div class="contentBox"> <div class="contentBox">
@ -117,14 +25,148 @@
<mat-expansion-panel *ngFor="let items of item.facilityItems" disabled [expanded]=items.expanded> <mat-expansion-panel *ngFor="let items of item.facilityItems" disabled [expanded]=items.expanded>
<mat-expansion-panel-header class="expansionheader"> <mat-expansion-panel-header class="expansionheader">
<label class="firstContent"> <label class="firstContent">
<mat-checkbox (change)='checkedCompany($event,item,items)' [disabled]='items.isBuiltin'></mat-checkbox> <mat-checkbox (change)='checkedCompany($event,item,items)' [disabled]='items.isBuiltin'>
</mat-checkbox>
</label> </label>
<label class="textContent">{{items.name}}</label> <label class="textContent">{{items.name}}</label>
<label class="textContent"><a href="javascript:void(0)" (click)='previewBuildingImg(newItem,items)'>查看图片</a></label> <label class="textContent"><a href="javascript:void(0)"
<label class="totalContent">{{items.total ? items.total : '总数: 0'}}</label> (click)='previewBuildingImg(newItem,items)'>查看图片</a></label>
<label class="totalContent">
<span *ngIf="item.name == '消防水系统' && items.name == '供水管网'">
{{fireProtectionWaterSystem.waterSupplyNetwork.total || '总数:0'}}
</span>
<span *ngIf="item.name == '消防水系统' && items.name == '自动喷水灭火系统'">
{{fireProtectionWaterSystem.sprinklerSystem.total || '总数:0'}}
</span>
<span *ngIf="item.name == '消防灭火给水系统' && items.name == '自动喷水灭火系统'">
{{FireExtinguishingWaterSupplySystem.sprinklerSystem.total || '总数:0'}}
</span>
<span *ngIf="item.name == '消防灭火给水系统' && items.name == '气体自动灭火系统'">
{{FireExtinguishingWaterSupplySystem.AutomaticGasFireExtinguishingSystem.total || '总数:0'}}
</span>
<span *ngIf="item.name == '消防灭火给水系统' && items.name == '消防泵房'">
{{FireExtinguishingWaterSupplySystem.firePumpRoom.total || '总数:0'}}
</span>
<span *ngIf="item.name == '其它' && items.name == '排烟系统'">
{{other.purgingSystem.total || '总数:0'}}
</span>
<span *ngIf="item.name == '其它' && items.name == '灭火器'">
{{other.fireExtinguisher.total || '总数:0'}}
</span>
<span *ngIf="item.name == '其它' && items.name == '气体灭火'">
{{other.extinctionUsingGas.total || '总数:0'}}
</span>
<span *ngIf="item.name == '其它' && items.name == '消防通信'">
{{other.fireControlCommunication.total || '总数:0'}}
</span>
<span *ngIf="item.name == '消防设施' && items.name == '自动报警系统'">
{{fireFightingEquipment.automaticAlarmSystem.total || '总数:0'}}
</span>
<span *ngIf="item.name == '消防设施' && items.name == '消防泵'">
{{fireFightingEquipment.firePump.total || '总数:0'}}
</span>
<span *ngIf="item.name == '消火栓系统' && items.name == '灭火剂'">
{{hydrantSystem.fireExtinguishingAgent.total || '总数:0'}}
</span>
<span *ngIf="item.name == '消火栓系统' && items.name == '报警设施'">
{{hydrantSystem.AlarmFacilities.total || '总数:0'}}
</span>
<span *ngIf="item.name == '消火栓系统' && items.name == '消防管网'">
{{hydrantSystem.FireControlPipeNetwork.total || '总数:0'}}
</span>
<span *ngIf="item.name == '其它设施' && items.name == '优先广播'">
{{otherFacilities.givePriorityToBroadcast.total || '总数:0'}}
</span>
<span *ngIf="item.name == '其它设施' && items.name == 'VI检测仪'">
{{otherFacilities.VIdetector.total || '总数:0'}}
</span>
<span *ngIf="item.name == '其它设施' && items.name == '泡沫水喷雾系统'">
{{otherFacilities.foamWaterSpraySystem.total || '总数:0'}}
</span>
<span *ngIf="item.name == '自动消防设施' && items.name == '喷水灭火系统'">
{{automaticFireProtectionFacility.fireSprinklingSystem.total || '总数:0'}}
</span>
<span *ngIf="item.name == '自动消防设施' && items.name == '自动报警系统'">
{{automaticFireProtectionFacility.automaticAlarmSystem.total || '总数:0'}}
</span>
<span *ngIf="item.name == '自动消防设施' && items.name == '防排烟系统'">
{{automaticFireProtectionFacility.smokeControlAndExhaustSystem.total || '总数:0'}}
</span>
<span *ngIf="item.name == '自动消防设施' && items.name == '水幕系统'">
{{automaticFireProtectionFacility.waterCurtainSystem.total || '总数:0'}}
</span>
<span *ngIf="item.name == '自动消防设施' && items.name == '消防泵'">
{{automaticFireProtectionFacility.firePump.total || '总数:0'}}
</span>
<span *ngIf="item.name == '消防水源' && items.name == '消防水池'">
{{fireWaterSupply.firePool.total || '总数:0'}}
</span>
<span
*ngIf="!((item.name == '消防水系统' && items.name == '供水管网') || (item.name == '消防水系统' && items.name == '自动喷水灭火系统') || (item.name == '消防灭火给水系统' && items.name == '自动喷水灭火系统') || (item.name == '消防灭火给水系统' && items.name == '气体自动灭火系统') || (item.name == '消防灭火给水系统' && items.name == '消防泵房') || (item.name == '其它' && items.name == '排烟系统') || (item.name == '其它' && items.name == '灭火器') || (item.name == '其它' && items.name == '气体灭火') || (item.name == '其它' && items.name == '消防通信') || (item.name == '消防设施' && items.name == '自动报警系统') || (item.name == '消防设施' && items.name == '消防泵') || (item.name == '消火栓系统' && items.name == '灭火剂') || (item.name == '消火栓系统' && items.name == '报警设施') || (item.name == '消火栓系统' && items.name == '消防管网') || (item.name == '其它设施' && items.name == '优先广播') || (item.name == '其它设施' && items.name == 'VI检测仪') || (item.name == '其它设施' && items.name == '泡沫水喷雾系统') || (item.name == '自动消防设施' && items.name == '喷水灭火系统') || (item.name == '自动消防设施' && items.name == '自动报警系统') || (item.name == '自动消防设施' && items.name == '防排烟系统') || (item.name == '自动消防设施' && items.name == '水幕系统') || (item.name == '自动消防设施' && items.name == '消防泵') || (item.name == '消防水源' && items.name == '消防水池'))">
{{items.total ? items.total : '总数: 0'}}
</span>
</label>
<label class="lastTextContent"> <label class="lastTextContent">
<textarea readonly maxlength="250" [(ngModel)]="items.details" style="width:98%;"></textarea> <textarea *ngIf="item.name == '消防水系统' && items.name == '供水管网'" maxlength="250"
[(ngModel)]="fireProtectionWaterSystem.waterSupplyNetwork.details" style="width: 80%;"></textarea>
<textarea *ngIf="item.name == '消防水系统' && items.name == '自动喷水灭火系统'" maxlength="250"
[(ngModel)]="fireProtectionWaterSystem.sprinklerSystem.details" style="width: 80%;"></textarea>
<textarea *ngIf="item.name == '消防灭火给水系统' && items.name == '自动喷水灭火系统'" maxlength="250"
[(ngModel)]="FireExtinguishingWaterSupplySystem.sprinklerSystem.details"
style="width: 80%;"></textarea>
<textarea *ngIf="item.name == '消防灭火给水系统' && items.name == '气体自动灭火系统'" maxlength="250"
[(ngModel)]="FireExtinguishingWaterSupplySystem.AutomaticGasFireExtinguishingSystem.details"
style="width: 80%;"></textarea>
<textarea *ngIf="item.name == '消防灭火给水系统' && items.name == '消防泵房'" maxlength="250"
[(ngModel)]="FireExtinguishingWaterSupplySystem.firePumpRoom.details"
style="width: 80%;"></textarea>
<textarea *ngIf="item.name == '其它' && items.name == '排烟系统'" maxlength="250"
[(ngModel)]="other.purgingSystem.details" style="width: 80%;"></textarea>
<textarea *ngIf="item.name == '其它' && items.name == '灭火器'" maxlength="250"
[(ngModel)]="other.fireExtinguisher.details" style="width: 80%;"></textarea>
<textarea *ngIf="item.name == '其它' && items.name == '气体灭火'" maxlength="250"
[(ngModel)]="other.extinctionUsingGas.details" style="width: 80%;"></textarea>
<textarea *ngIf="item.name == '其它' && items.name == '消防通信'" maxlength="250"
[(ngModel)]="other.fireControlCommunication.details" style="width: 80%;"></textarea>
<textarea *ngIf="item.name == '消防设施' && items.name == '自动报警系统'" maxlength="250"
[(ngModel)]="fireFightingEquipment.automaticAlarmSystem.details" style="width: 80%;"></textarea>
<textarea *ngIf="item.name == '消防设施' && items.name == '消防泵'" maxlength="250"
[(ngModel)]="fireFightingEquipment.firePump.details" style="width: 80%;"></textarea>
<textarea *ngIf="item.name == '消火栓系统' && items.name == '灭火剂'" maxlength="250"
[(ngModel)]="hydrantSystem.fireExtinguishingAgent.details" style="width: 80%;"></textarea>
<textarea *ngIf="item.name == '消火栓系统' && items.name == '报警设施'" maxlength="250"
[(ngModel)]="hydrantSystem.AlarmFacilities.details" style="width: 80%;"></textarea>
<textarea *ngIf="item.name == '消火栓系统' && items.name == '消防管网'" maxlength="250"
[(ngModel)]="hydrantSystem.FireControlPipeNetwork.details" style="width: 80%;"></textarea>
<textarea *ngIf="item.name == '其它设施' && items.name == '优先广播'" maxlength="250"
[(ngModel)]="otherFacilities.givePriorityToBroadcast.details" style="width: 80%;"></textarea>
<textarea *ngIf="item.name == '其它设施' && items.name == 'VI检测仪'" maxlength="250"
[(ngModel)]="otherFacilities.VIdetector.details" style="width: 80%;"></textarea>
<textarea *ngIf="item.name == '其它设施' && items.name == '泡沫水喷雾系统'" maxlength="250"
[(ngModel)]="otherFacilities.foamWaterSpraySystem.details" style="width: 80%;"></textarea>
<textarea *ngIf="item.name == '自动消防设施' && items.name == '喷水灭火系统'" maxlength="250"
[(ngModel)]="automaticFireProtectionFacility.fireSprinklingSystem.details"
style="width: 80%;"></textarea>
<textarea *ngIf="item.name == '自动消防设施' && items.name == '自动报警系统'" maxlength="250"
[(ngModel)]="automaticFireProtectionFacility.automaticAlarmSystem.details"
style="width: 80%;"></textarea>
<textarea *ngIf="item.name == '自动消防设施' && items.name == '防排烟系统'" maxlength="250"
[(ngModel)]="automaticFireProtectionFacility.smokeControlAndExhaustSystem.details"
style="width: 80%;"></textarea>
<textarea *ngIf="item.name == '自动消防设施' && items.name == '水幕系统'" maxlength="250"
[(ngModel)]="automaticFireProtectionFacility.waterCurtainSystem.details"
style="width: 80%;"></textarea>
<textarea *ngIf="item.name == '自动消防设施' && items.name == '消防泵'" maxlength="250"
[(ngModel)]="automaticFireProtectionFacility.firePump.details" style="width: 80%;"></textarea>
<textarea *ngIf="item.name == '消防水源' && items.name == '消防水池'" maxlength="250"
[(ngModel)]="fireWaterSupply.firePool.details" style="width: 80%;"></textarea>
<textarea maxlength="250" [(ngModel)]="items.details" style="width: 80%;"
*ngIf="!((item.name == '消防水系统' && items.name == '供水管网') || (item.name == '消防水系统' && items.name == '自动喷水灭火系统') || (item.name == '消防灭火给水系统' && items.name == '自动喷水灭火系统') || (item.name == '消防灭火给水系统' && items.name == '气体自动灭火系统') || (item.name == '消防灭火给水系统' && items.name == '消防泵房') || (item.name == '其它' && items.name == '排烟系统') || (item.name == '其它' && items.name == '灭火器') || (item.name == '其它' && items.name == '气体灭火') || (item.name == '其它' && items.name == '消防通信') || (item.name == '消防设施' && items.name == '自动报警系统') || (item.name == '消防设施' && items.name == '消防泵') || (item.name == '消火栓系统' && items.name == '灭火剂') || (item.name == '消火栓系统' && items.name == '报警设施') || (item.name == '消火栓系统' && items.name == '消防管网') || (item.name == '其它设施' && items.name == '优先广播') || (item.name == '其它设施' && items.name == 'VI检测仪') || (item.name == '其它设施' && items.name == '泡沫水喷雾系统') || (item.name == '自动消防设施' && items.name == '喷水灭火系统') || (item.name == '自动消防设施' && items.name == '自动报警系统') || (item.name == '自动消防设施' && items.name == '防排烟系统') || (item.name == '自动消防设施' && items.name == '水幕系统') || (item.name == '自动消防设施' && items.name == '消防泵') || (item.name == '消防水源' && items.name == '消防水池'))"></textarea>
</label> </label>
<!-- <label><mat-icon (click)='SwitchBuildingBoard(newItem,items)' *ngIf="items.isBuiltin">keyboard_arrow_down</mat-icon></label> --> <!-- <label><mat-icon (click)='SwitchBuildingBoard(newItem,items)' *ngIf="items.isBuiltin">keyboard_arrow_down</mat-icon></label> -->
@ -142,7 +184,8 @@
</table> </table>
</div> </div>
<div *ngFor="let tableMsg of items.loopTable" class="detailsTable"> <div *ngFor="let tableMsg of items.loopTable" class="detailsTable">
<p style="text-align: center; font-size: 16px; margin: 5px 0;">楼层/区域名称: {{tableMsg.name? tableMsg.name : '暂无名称'}}</p> <p style="text-align: center; font-size: 16px; margin: 5px 0;">楼层/区域名称:
{{tableMsg.name? tableMsg.name : '暂无名称'}}</p>
<table> <table>
<tr> <tr>
<th *ngFor="let header of tableMsg.header">{{header}}</th> <th *ngFor="let header of tableMsg.header">{{header}}</th>
@ -170,12 +213,16 @@
<div *ngFor="let items of item.propertyInfos" class="InputField"> <div *ngFor="let items of item.propertyInfos" class="InputField">
<label>{{items.propertyName}}:</label> <label>{{items.propertyName}}:</label>
<input readonly type="text" *ngIf="items.propertyType!=1&&items.propertyType!=2&&items.propertyType!=4&&items.propertyType!=6" <input readonly type="text"
*ngIf="items.propertyType!=1&&items.propertyType!=2&&items.propertyType!=4&&items.propertyType!=6"
[(ngModel)]="items.propertyValue" name="propertyValue">
<textarea readonly maxlength="250" *ngIf="items.propertyType==1" [(ngModel)]="items.propertyValue"
name="propertyValue"></textarea>
<input readonly type="number" *ngIf="items.propertyType==2 ||items.propertyType==4"
[(ngModel)]="items.propertyValue" name="propertyValue"> [(ngModel)]="items.propertyValue" name="propertyValue">
<textarea readonly maxlength="250" *ngIf="items.propertyType==1" [(ngModel)]="items.propertyValue" name="propertyValue"></textarea>
<input readonly type="number" *ngIf="items.propertyType==2 ||items.propertyType==4" [(ngModel)]="items.propertyValue" name="propertyValue">
<mat-radio-group *ngIf="items.propertyType==6" [(ngModel)]="items.propertyValue" name="propertyValue"> <mat-radio-group *ngIf="items.propertyType==6" [(ngModel)]="items.propertyValue" name="propertyValue">
<mat-radio-button style="margin-left: 5px;" [value]='radio.value' *ngFor="let radio of singleElection">{{radio.name}}</mat-radio-button> <mat-radio-button style="margin-left: 5px;" [value]='radio.value'
*ngFor="let radio of singleElection">{{radio.name}}</mat-radio-button>
</mat-radio-group> </mat-radio-group>
</div> </div>
</mat-expansion-panel> </mat-expansion-panel>

474
src/app/key-unit/fire-fighting-device-look/fire-fighting-device.component.ts

@ -50,51 +50,15 @@ export class FireFightingDeviceLookComponent implements OnInit {
element.selectBuiltInGrouping = [] element.selectBuiltInGrouping = []
element.facilityItems.forEach((elements, index) => { element.facilityItems.forEach((elements, index) => {
elements.total = element.facilityCount[index] elements.total = element.facilityCount[index]
elements.expanded = false}); elements.expanded = false
});
}); });
if(sessionStorage.getItem("tabsindex") == "4"){
this.companyBuiltInGrouping = [this.companyBuiltInGrouping[1]]
this.companyOptionalGrouping = []
}
if(sessionStorage.getItem("tabsindex") == "5"){
this.companyBuiltInGrouping.splice(1,1)
}
}) //http }) //http
} //if } //if
}) })
} }
//创建单位消防设施内置分组项
addCompanyGrouping (e) {
let data = e
let dialogRef = this.dialog.open(ImagesData2,{data});
dialogRef.afterClosed().subscribe(data=>{
if (data) { e.facilityItems.push(data) } });
}
//保存单位消防设施内置分组项
editCompanyGrouping(e) {
let header = {groupId:e.id}
let data = []
e.facilityItems.forEach((element,index) => {
let msg = {
isBuiltin: element.isBuiltin,
details: element.details,
name: element.name,
isEachFloor: element.isEachFloor,
order: element.order}
data.push(msg)
if (index==e.facilityItems.length-1) {
this.http.post('/api/CompanyFacilityItems/Batch',data,{params:header}).subscribe(data=>{
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('数据更新成功','确定',config);
}) }
}); //forEach
}
//checked单位消防设施内置分组项时 //checked单位消防设施内置分组项时
checkedCompany(e, item, items) { checkedCompany(e, item, items) {
@ -105,50 +69,6 @@ export class FireFightingDeviceLookComponent implements OnInit {
} }
} }
//删除消防设施内置分组项
deleteCompanyGrouping (e) {
if (e.selectBuiltInGrouping.length) {
let isDelete = confirm('您确定要删除吗')
if (isDelete) {
let msg:any = `?groupId=${e.id}`
e.selectBuiltInGrouping.forEach((element,index) => {
let data = `&name=${element.name}`
msg = msg + data
if (index === e.selectBuiltInGrouping.length-1) {
this.http.delete('/api/CompanyFacilityItems/Batch' + msg).subscribe(data=>{
let deleteMsg = e.selectBuiltInGrouping
deleteMsg.forEach(deleteElement => {
e.facilityItems.splice(e.facilityItems.findIndex(item=>item.name==deleteElement.name),1)
});
e.selectBuiltInGrouping = []
}) //http
} //if
}); //forEach
}
} else {
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('请选择内置分组项','确定',config);
}
}
//保存单位消防设施可选分组
editCompanyOptional (e,item) {
e.stopPropagation() //阻止冒泡
item.propertyInfos.forEach((element,index) => {
element.propertyValue = String(element.propertyValue)
if (index == item.propertyInfos.length-1 ) {
this.http.post('/api/CompanyOptionalGroups',item).subscribe(data=>{
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('数据更新成功','确定',config);
})
} //if
});
}
//单位消防设施切换展开面板 //单位消防设施切换展开面板
SwitchBoard(e) { SwitchBoard(e) {
@ -163,22 +83,26 @@ export class FireFightingDeviceLookComponent implements OnInit {
item.assets[0].propertyInfos.forEach(element => { //表头 item.assets[0].propertyInfos.forEach(element => { //表头
if (element.propertyType != 3) { if (element.propertyType != 3) {
let unit = element.physicalUnit ? '(' + element.physicalUnit + ')' : '' //单位 let unit = element.physicalUnit ? '(' + element.physicalUnit + ')' : '' //单位
tableMsg.header.push(element.propertyName+unit)} tableMsg.header.push(element.propertyName + unit)
}
}); });
item.assets.forEach(element => { //表格内容 item.assets.forEach(element => { //表格内容
let everyBody = {} let everyBody = {}
element.propertyInfos.forEach((elements, index) => { element.propertyInfos.forEach((elements, index) => {
if (elements.propertyType != 3 && elements.propertyName != '图片' && elements.propertyType != 6) { if (elements.propertyType != 3 && elements.propertyName != '图片' && elements.propertyType != 6) {
let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位 let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位
everyBody[elements.propertyName+unit] = elements.propertyValue } everyBody[elements.propertyName + unit] = elements.propertyValue
}
if (elements.propertyType == 6) { if (elements.propertyType == 6) {
let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位 let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位
everyBody[elements.propertyName+unit] = elements.propertyValue=='1'?'是':'否' } everyBody[elements.propertyName + unit] = elements.propertyValue == '1' ? '是' : '否'
}
if (elements.propertyType != 3 && elements.propertyName == '图片') { if (elements.propertyType != 3 && elements.propertyName == '图片') {
let imgLength = [] let imgLength = []
element.propertyInfos.find(item => { if (item.propertyType == 3) { imgLength.push(item) } }) element.propertyInfos.find(item => { if (item.propertyType == 3) { imgLength.push(item) } })
let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位 let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位
everyBody[elements.propertyName+unit] = String(imgLength.length) } everyBody[elements.propertyName + unit] = String(imgLength.length)
}
}); //propertyInfos }); //propertyInfos
tableMsg.body.push(everyBody) tableMsg.body.push(everyBody)
@ -195,22 +119,26 @@ export class FireFightingDeviceLookComponent implements OnInit {
data[0].propertyInfos.forEach(element => { //表头 data[0].propertyInfos.forEach(element => { //表头
if (element.propertyType != 3) { if (element.propertyType != 3) {
let unit = element.physicalUnit ? '(' + element.physicalUnit + ')' : '' //单位 let unit = element.physicalUnit ? '(' + element.physicalUnit + ')' : '' //单位
e.header.push(element.propertyName+unit)} e.header.push(element.propertyName + unit)
}
}); });
data.forEach(element => { //表格内容 data.forEach(element => { //表格内容
let everyBody = {} let everyBody = {}
element.propertyInfos.forEach((elements, index) => { element.propertyInfos.forEach((elements, index) => {
if (elements.propertyType != 3 && elements.propertyName != '图片' && elements.propertyType != 6) { if (elements.propertyType != 3 && elements.propertyName != '图片' && elements.propertyType != 6) {
let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位 let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位
everyBody[elements.propertyName+unit] = elements.propertyValue } everyBody[elements.propertyName + unit] = elements.propertyValue
}
if (elements.propertyType == 6) { if (elements.propertyType == 6) {
let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位 let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位
everyBody[elements.propertyName+unit] = elements.propertyValue=='1'?'是':'否' } everyBody[elements.propertyName + unit] = elements.propertyValue == '1' ? '是' : '否'
}
if (elements.propertyType != 3 && elements.propertyName == '图片') { if (elements.propertyType != 3 && elements.propertyName == '图片') {
let imgLength = [] let imgLength = []
element.propertyInfos.find(item => { if (item.propertyType == 3) { imgLength.push(item) } }) element.propertyInfos.find(item => { if (item.propertyType == 3) { imgLength.push(item) } })
let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位 let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位
everyBody[elements.propertyName+unit] = String(imgLength.length) } everyBody[elements.propertyName + unit] = String(imgLength.length)
}
}); });
e.body.push(everyBody) e.body.push(everyBody)
@ -230,9 +158,11 @@ export class FireFightingDeviceLookComponent implements OnInit {
//获取所有建筑 //获取所有建筑
getAllBuilding() { getAllBuilding() {
let companyId = this.route.snapshot.queryParams.id let companyId = this.route.snapshot.queryParams.id
this.http.get('/api/Buildings',{params:{ this.http.get('/api/Buildings', {
params: {
companyId: companyId companyId: companyId
}}).subscribe((data:any)=>{ }
}).subscribe((data: any) => {
this.allBuildingGrouping = data this.allBuildingGrouping = data
if (this.allBuildingGrouping.length) { if (this.allBuildingGrouping.length) {
this.getAllBuildingFacilities() this.getAllBuildingFacilities()
@ -245,11 +175,81 @@ export class FireFightingDeviceLookComponent implements OnInit {
}) })
} }
//消防水系统
fireProtectionWaterSystem = {
waterSupplyNetwork: { name: '供水管网', total: '', details: '' },//供水管网
sprinklerSystem: { name: '自动喷水灭火系统', total: '', details: '' }//自动喷水灭火系统
}
//消防灭火给水系统
FireExtinguishingWaterSupplySystem = {
sprinklerSystem: { name: '自动喷水灭火系统', total: '', details: '' },//自动喷水灭火系统
AutomaticGasFireExtinguishingSystem: { name: '气体自动灭火系统', total: '', details: '' },//气体自动灭火系统
firePumpRoom: { name: '消防泵房', total: '', details: '' }//消防泵房
}
//其它
other = {
purgingSystem: { name: '排烟系统', total: '', details: '' },//排烟系统
fireExtinguisher: { name: '灭火器', total: '', details: '' },//灭火器
extinctionUsingGas: { name: '气体灭火', total: '', details: '' },//气体灭火
fireControlCommunication: { name: '消防通信', total: '', details: '' }//消防通信
}
//消防设施
fireFightingEquipment = {
automaticAlarmSystem: { name: '自动报警系统', total: '', details: '' },//自动报警系统
firePump: { name: '消防泵', total: '', details: '' }//消防泵
}
//消火栓系统
hydrantSystem = {
fireExtinguishingAgent: { name: '灭火剂', total: '', details: '' },//灭火剂
AlarmFacilities: { name: '报警设施', total: '', details: '' },//报警设施
FireControlPipeNetwork: { name: '消防管网', total: '', details: '' }//消防管网
}
//其它设施
otherFacilities = {
givePriorityToBroadcast: { name: '优先广播', total: '', details: '' },//优先广播
VIdetector: { name: 'VI检测仪', total: '', details: '' },//VI检测仪
foamWaterSpraySystem: { name: '泡沫水喷雾系统', total: '', details: '' },//泡沫水喷雾系统
}
//自动消防设施
automaticFireProtectionFacility = {
fireSprinklingSystem: { name: '喷水灭火系统', total: '', details: '' },//喷水灭火系统
automaticAlarmSystem: { name: '自动报警系统', total: '', details: '' },//自动报警系统
smokeControlAndExhaustSystem: { name: '防排烟系统', total: '', details: '' },//防排烟系统
waterCurtainSystem: { name: '水幕系统', total: '', details: '' },//水幕系统
firePump: { name: '消防泵', total: '', details: '' }//消防泵
}
//消防水源
fireWaterSupply = {
firePool: { name: '消防水池', total: '', details: '' }//消防水池
}
//获得当前建筑的手动输入值
FacilityStat: any//存放当前建筑手动输入的值
selectedChange($event) {
//获得手动输入的值
this.http.get('/api/BuildingFacilities/FacilityStat', {
params: {
buildingId: this.allBuildingGrouping[$event].id
}
}).subscribe(data => {
this.FacilityStat = data
this.changeData()
})
}
//获取所有建筑的消防设施 //获取所有建筑的消防设施
getAllBuildingFacilities () { async getAllBuildingFacilities() {
let companyId = this.route.snapshot.queryParams.id let companyId = this.route.snapshot.queryParams.id
this.allBuildingGrouping.forEach(element => { let index = 0
for (let index = 0; index < this.allBuildingGrouping.length; index++) {
const element = this.allBuildingGrouping[index];
let header = { buildingId: element.id, buildingType: element.buildingTypes[0].id, companyId: companyId } let header = { buildingId: element.id, buildingType: element.buildingTypes[0].id, companyId: companyId }
await new Promise<void>((resolve, reject) => {
this.http.get('/api/BuildingFacilities', { params: header }).subscribe(data => { this.http.get('/api/BuildingFacilities', { params: header }).subscribe(data => {
element.buildingFacilityGroups = data[0].summary.buildingFacilityGroups element.buildingFacilityGroups = data[0].summary.buildingFacilityGroups
element.buildingOptionalGroups = data[0].summary.buildingOptionalGroups element.buildingOptionalGroups = data[0].summary.buildingOptionalGroups
@ -259,102 +259,160 @@ export class FireFightingDeviceLookComponent implements OnInit {
elements.selectBuiltInGrouping = [] elements.selectBuiltInGrouping = []
elements.facilityItems.forEach((newElement, index) => { elements.facilityItems.forEach((newElement, index) => {
newElement.total = elements.facilityCount[index] newElement.total = elements.facilityCount[index]
newElement.expanded = false }); newElement.expanded = false
}); });
if(sessionStorage.getItem("tabsindex") == "4"){
element.buildingFacilityGroups = [element.buildingFacilityGroups[1]]
element.buildingOptionalGroups = []
}
if(sessionStorage.getItem("tabsindex") == "5"){
element.buildingFacilityGroups.splice(1,1)
}
})
}); });
// console.log(element.name, data)
resolve()
}, err => {
console.log(element.name + '消防设施网络获取失败', err)
})
})
}
//创建建筑消防设施内置分组项
addBuildingGrouping (e,item) {
let data = {buildingId: e.id, item}
let dialogRef = this.dialog.open(ImgsDataDetail2,{data});
dialogRef.afterClosed().subscribe(data=>{
if (data) { item.facilityItems.push(data) }
});
} }
//保存建筑消防设施内置分组项
editBuildingGrouping (e,item) {
let companyId = this.route.snapshot.queryParams.id
let header = {companyId:companyId,buildingId:e.id, groupId:item.id}
let data = []
item.facilityItems.forEach((element,index) => {
let msg = {
isBuiltin: element.isBuiltin,
details: element.details,
name: element.name,
isEachFloor: element.isEachFloor,
order: element.order}
data.push(msg)
if (index==item.facilityItems.length-1) {
this.http.post('/api/BuildingFacilityItems/Batch',data,{params:header}).subscribe(data=>{
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('数据更新成功','确定',config);
}) }
}); //forEach
}
//删除建筑消防设施内置分组项
deleteBuildingGrouping (e,item) {
if (item.selectBuiltInGrouping.length) {
let isDelete = confirm('您确定要删除吗')
if (isDelete) {
let msg:any = `?buildingId=${e.id}&groupId=${item.id}`
item.selectBuiltInGrouping.forEach((element,index) => {
let data = `&name=${element.name}`
msg = msg + data
if (index === item.selectBuiltInGrouping.length-1) {
this.http.delete('/api/BuildingFacilityItems/Batch'+msg).subscribe(data=>{
let deleteMsg = item.selectBuiltInGrouping
deleteMsg.forEach(deleteElement => {
item.facilityItems.splice(item.facilityItems.findIndex(items=>items.name==deleteElement.name),1)
});
item.selectBuiltInGrouping = []
}) //http
} //if
}) //forEach
}
} else {
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('请选择内置分组项','确定',config);
} }
//清空手动输入的值
emptyData() {
this.fireProtectionWaterSystem = {
waterSupplyNetwork: { name: '供水管网', total: '', details: '' },//供水管网
sprinklerSystem: { name: '自动喷水灭火系统', total: '', details: '' }//自动喷水灭火系统
}
this.FireExtinguishingWaterSupplySystem = {
sprinklerSystem: { name: '自动喷水灭火系统', total: '', details: '' },//自动喷水灭火系统
AutomaticGasFireExtinguishingSystem: { name: '气体自动灭火系统', total: '', details: '' },//气体自动灭火系统
firePumpRoom: { name: '消防泵房', total: '', details: '' }//消防泵房
}
this.other = {
purgingSystem: { name: '排烟系统', total: '', details: '' },//排烟系统
fireExtinguisher: { name: '灭火器', total: '', details: '' },//灭火器
extinctionUsingGas: { name: '气体灭火', total: '', details: '' },//气体灭火
fireControlCommunication: { name: '消防通信', total: '', details: '' }//消防通信
}
this.fireFightingEquipment = {
automaticAlarmSystem: { name: '自动报警系统', total: '', details: '' },//自动报警系统
firePump: { name: '消防泵', total: '', details: '' }//消防泵
}
this.hydrantSystem = {
fireExtinguishingAgent: { name: '灭火剂', total: '', details: '' },//灭火剂
AlarmFacilities: { name: '报警设施', total: '', details: '' },//报警设施
FireControlPipeNetwork: { name: '消防管网', total: '', details: '' }//消防管网
}
this.otherFacilities = {
givePriorityToBroadcast: { name: '优先广播', total: '', details: '' },//优先广播
VIdetector: { name: 'VI检测仪', total: '', details: '' },//VI检测仪
foamWaterSpraySystem: { name: '泡沫水喷雾系统', total: '', details: '' },//泡沫水喷雾系统
}
this.automaticFireProtectionFacility = {
fireSprinklingSystem: { name: '喷水灭火系统', total: '', details: '' },//喷水灭火系统
automaticAlarmSystem: { name: '自动报警系统', total: '', details: '' },//自动报警系统
smokeControlAndExhaustSystem: { name: '防排烟系统', total: '', details: '' },//防排烟系统
waterCurtainSystem: { name: '水幕系统', total: '', details: '' },//水幕系统
firePump: { name: '消防泵', total: '', details: '' }//消防泵
}
this.fireWaterSupply = {
firePool: { name: '消防水池', total: '', details: '' }//消防水池
}
}
//将数据库获取的手动输入的值变成指定形式
changeData() {
this.emptyData();
this.FacilityStat.length != 0 ?
this.FacilityStat.forEach(element => {
if (element.groupName == '消防水系统') {
if (element.facilityName == '供水管网') {
this.fireProtectionWaterSystem.waterSupplyNetwork.total = element.count
this.fireProtectionWaterSystem.waterSupplyNetwork.details = element.description
} else if (element.facilityName == '自动喷水灭火系统') {
this.fireProtectionWaterSystem.sprinklerSystem.total = element.count
this.fireProtectionWaterSystem.sprinklerSystem.details = element.description
}
} else if (element.groupName == '消防灭火给水系统') {
if (element.facilityName == '自动喷水灭火系统') {
this.FireExtinguishingWaterSupplySystem.sprinklerSystem.total = element.count
this.FireExtinguishingWaterSupplySystem.sprinklerSystem.details = element.description
} else if (element.facilityName == '气体自动灭火系统') {
this.FireExtinguishingWaterSupplySystem.AutomaticGasFireExtinguishingSystem.total = element.count
this.FireExtinguishingWaterSupplySystem.AutomaticGasFireExtinguishingSystem.details = element.description
} else if (element.facilityName == '消防泵房') {
this.FireExtinguishingWaterSupplySystem.firePumpRoom.total = element.count
this.FireExtinguishingWaterSupplySystem.firePumpRoom.details = element.description
}
} else if (element.groupName == '其它') {
if (element.facilityName == '排烟系统') {
this.other.purgingSystem.total = element.count
this.other.purgingSystem.details = element.description
} else if (element.facilityName == '灭火器') {
this.other.fireExtinguisher.total = element.count
this.other.fireExtinguisher.details = element.description
} else if (element.facilityName == '气体灭火') {
this.other.extinctionUsingGas.total = element.count
this.other.extinctionUsingGas.details = element.description
} else if (element.facilityName == '消防通信') {
this.other.fireControlCommunication.total = element.count
this.other.fireControlCommunication.details = element.description
}
} else if (element.groupName == '消防设施') {
if (element.facilityName == '自动报警系统') {
this.fireFightingEquipment.automaticAlarmSystem.total = element.count
this.fireFightingEquipment.automaticAlarmSystem.details = element.description
} else if (element.facilityName == '消防泵') {
this.fireFightingEquipment.firePump.total = element.count
this.fireFightingEquipment.firePump.details = element.description
}
} else if (element.groupName == '消火栓系统') {
if (element.facilityName == '灭火剂') {
this.hydrantSystem.fireExtinguishingAgent.total = element.count
this.hydrantSystem.fireExtinguishingAgent.details = element.description
} else if (element.facilityName == '报警设施') {
this.hydrantSystem.AlarmFacilities.total = element.count
this.hydrantSystem.AlarmFacilities.details = element.description
} else if (element.facilityName == '消防管网') {
this.hydrantSystem.FireControlPipeNetwork.total = element.count
this.hydrantSystem.FireControlPipeNetwork.details = element.description
}
} else if (element.groupName == '其它设施') {
if (element.facilityName == '优先广播') {
this.otherFacilities.givePriorityToBroadcast.total = element.count
this.otherFacilities.givePriorityToBroadcast.details = element.description
} else if (element.facilityName == 'VI检测仪') {
this.otherFacilities.VIdetector.total = element.count
this.otherFacilities.VIdetector.details = element.description
} else if (element.facilityName == '泡沫水喷雾系统') {
this.otherFacilities.foamWaterSpraySystem.total = element.count
this.otherFacilities.foamWaterSpraySystem.details = element.description
}
} else if (element.groupName == '自动消防设施') {
if (element.facilityName == '喷水灭火系统') {
this.automaticFireProtectionFacility.fireSprinklingSystem.total = element.count
this.automaticFireProtectionFacility.fireSprinklingSystem.details = element.description
} else if (element.facilityName == '自动报警系统') {
this.automaticFireProtectionFacility.automaticAlarmSystem.total = element.count
this.automaticFireProtectionFacility.automaticAlarmSystem.details = element.description
} else if (element.facilityName == '防排烟系统') {
this.automaticFireProtectionFacility.smokeControlAndExhaustSystem.total = element.count
this.automaticFireProtectionFacility.smokeControlAndExhaustSystem.details = element.description
} else if (element.facilityName == '水幕系统') {
this.automaticFireProtectionFacility.waterCurtainSystem.total = element.count
this.automaticFireProtectionFacility.waterCurtainSystem.details = element.description
} else if (element.facilityName == '消防泵') {
this.automaticFireProtectionFacility.firePump.total = element.count
this.automaticFireProtectionFacility.firePump.details = element.description
}
} else if (element.groupName == '消防水源') {
if (element.facilityName == '消防水池') {
this.fireWaterSupply.firePool.total = element.count
this.fireWaterSupply.firePool.details = element.description
}
}
}) : null
console.log(5888, this.FacilityStat)
} }
//保存建筑消防设施可选分组
editBuildingOptional (e,item) {
let companyId = this.route.snapshot.queryParams.id
e.stopPropagation() //阻止冒泡
item.propertyInfos.forEach((element,index) => {
element.propertyValue = String(element.propertyValue)
if (index == item.propertyInfos.length-1 ) {
this.http.post('/api/BuildingOptionalGroups',item,{params:{
companyId :companyId
}}).subscribe(data=>{
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('数据更新成功','确定',config);
})
} //if
});
}
//建筑消防设施切换展开面板 //建筑消防设施切换展开面板
SwitchBuildingBoard(item, e) { SwitchBuildingBoard(item, e) {
@ -369,22 +427,26 @@ export class FireFightingDeviceLookComponent implements OnInit {
item.assets[0].propertyInfos.forEach(element => { //表头 item.assets[0].propertyInfos.forEach(element => { //表头
if (element.propertyType != 3) { if (element.propertyType != 3) {
let unit = element.physicalUnit ? '(' + element.physicalUnit + ')' : '' //单位 let unit = element.physicalUnit ? '(' + element.physicalUnit + ')' : '' //单位
tableMsg.header.push(element.propertyName+unit)} tableMsg.header.push(element.propertyName + unit)
}
}); });
item.assets.forEach(element => { //表格内容 item.assets.forEach(element => { //表格内容
let everyBody = {} let everyBody = {}
element.propertyInfos.forEach((elements, index) => { element.propertyInfos.forEach((elements, index) => {
if (elements.propertyType != 3 && elements.propertyName != '图片' && elements.propertyType != 6) { if (elements.propertyType != 3 && elements.propertyName != '图片' && elements.propertyType != 6) {
let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位 let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位
everyBody[elements.propertyName+unit] = elements.propertyValue } everyBody[elements.propertyName + unit] = elements.propertyValue
}
if (elements.propertyType == 6) { if (elements.propertyType == 6) {
let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位 let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位
everyBody[elements.propertyName+unit] = elements.propertyValue=='1'?'是':'否' } everyBody[elements.propertyName + unit] = elements.propertyValue == '1' ? '是' : '否'
}
if (elements.propertyType != 3 && elements.propertyName == '图片') { if (elements.propertyType != 3 && elements.propertyName == '图片') {
let imgLength = [] let imgLength = []
element.propertyInfos.find(item => { if (item.propertyType == 3) { imgLength.push(item) } }) element.propertyInfos.find(item => { if (item.propertyType == 3) { imgLength.push(item) } })
let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位 let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位
everyBody[elements.propertyName+unit] = String(imgLength.length) } everyBody[elements.propertyName + unit] = String(imgLength.length)
}
}); //propertyInfos }); //propertyInfos
tableMsg.body.push(everyBody) tableMsg.body.push(everyBody)
@ -401,22 +463,26 @@ export class FireFightingDeviceLookComponent implements OnInit {
data[0].propertyInfos.forEach(element => { //表头 data[0].propertyInfos.forEach(element => { //表头
if (element.propertyType != 3) { if (element.propertyType != 3) {
let unit = element.physicalUnit ? '(' + element.physicalUnit + ')' : '' //单位 let unit = element.physicalUnit ? '(' + element.physicalUnit + ')' : '' //单位
e.header.push(element.propertyName+unit)} e.header.push(element.propertyName + unit)
}
}); });
data.forEach(element => { //表格内容 data.forEach(element => { //表格内容
let everyBody = {} let everyBody = {}
element.propertyInfos.forEach((elements, index) => { element.propertyInfos.forEach((elements, index) => {
if (elements.propertyType != 3 && elements.propertyName != '图片' && elements.propertyType != 6) { if (elements.propertyType != 3 && elements.propertyName != '图片' && elements.propertyType != 6) {
let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位 let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位
everyBody[elements.propertyName+unit] = elements.propertyValue } everyBody[elements.propertyName + unit] = elements.propertyValue
}
if (elements.propertyType == 6) { if (elements.propertyType == 6) {
let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位 let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位
everyBody[elements.propertyName+unit] = elements.propertyValue=='1'?'是':'否' } everyBody[elements.propertyName + unit] = elements.propertyValue == '1' ? '是' : '否'
}
if (elements.propertyType != 3 && elements.propertyName == '图片') { if (elements.propertyType != 3 && elements.propertyName == '图片') {
let imgLength = [] let imgLength = []
element.propertyInfos.find(item => { if (item.propertyType == 3) { imgLength.push(item) } }) element.propertyInfos.find(item => { if (item.propertyType == 3) { imgLength.push(item) } })
let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位 let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位
everyBody[elements.propertyName+unit] = String(imgLength.length) } everyBody[elements.propertyName + unit] = String(imgLength.length)
}
}); });
e.body.push(everyBody) e.body.push(everyBody)
@ -430,6 +496,7 @@ export class FireFightingDeviceLookComponent implements OnInit {
} }
} }
//单位消防设施预览图片 //单位消防设施预览图片
previewImg(e) { previewImg(e) {
if (e.isEachFloor) { //逐层统计时 if (e.isEachFloor) { //逐层统计时
@ -443,7 +510,9 @@ export class FireFightingDeviceLookComponent implements OnInit {
if (elements.propertyName.includes('名称')) { imgName = elements.propertyValue } if (elements.propertyName.includes('名称')) { imgName = elements.propertyValue }
if (elements.propertyType === 3) { if (elements.propertyType === 3) {
elements.propertyName = imgName elements.propertyName = imgName
data.images.push(elements)} }); data.images.push(elements)
}
});
}); });
}); //newDate }); //newDate
@ -460,7 +529,8 @@ export class FireFightingDeviceLookComponent implements OnInit {
const config = new MatSnackBarConfig(); const config = new MatSnackBarConfig();
config.verticalPosition = 'top'; config.verticalPosition = 'top';
config.duration = 3000 config.duration = 3000
this.snackBar.open('暂无图片数据','确定',config); } this.snackBar.open('暂无图片数据', '确定', config);
}
} else { //非逐层统计时 } else { //非逐层统计时
let newData = this.companyDetails[e.name] let newData = this.companyDetails[e.name]
let imgName let imgName
@ -471,7 +541,9 @@ export class FireFightingDeviceLookComponent implements OnInit {
if (elements.propertyName.includes('名称')) { imgName = elements.propertyValue } if (elements.propertyName.includes('名称')) { imgName = elements.propertyValue }
if (elements.propertyType === 3) { if (elements.propertyType === 3) {
elements.propertyName = imgName elements.propertyName = imgName
data.images.push(elements)} }); data.images.push(elements)
}
});
}); });
if (data.images.length) { if (data.images.length) {
let dialogRef = this.dialog.open(ImagesData2, { data }); //打开图片弹窗 let dialogRef = this.dialog.open(ImagesData2, { data }); //打开图片弹窗
@ -486,7 +558,8 @@ export class FireFightingDeviceLookComponent implements OnInit {
const config = new MatSnackBarConfig(); const config = new MatSnackBarConfig();
config.verticalPosition = 'top'; config.verticalPosition = 'top';
config.duration = 3000 config.duration = 3000
this.snackBar.open('暂无图片数据','确定',config); } this.snackBar.open('暂无图片数据', '确定', config);
}
} }
} }
@ -504,7 +577,9 @@ export class FireFightingDeviceLookComponent implements OnInit {
if (elements.propertyName.includes('名称')) { imgName = elements.propertyValue } if (elements.propertyName.includes('名称')) { imgName = elements.propertyValue }
if (elements.propertyType === 3) { if (elements.propertyType === 3) {
elements.propertyName = imgName elements.propertyName = imgName
data.images.push(elements)} }); data.images.push(elements)
}
});
}); });
}); //newDate }); //newDate
@ -521,7 +596,8 @@ export class FireFightingDeviceLookComponent implements OnInit {
const config = new MatSnackBarConfig(); const config = new MatSnackBarConfig();
config.verticalPosition = 'top'; config.verticalPosition = 'top';
config.duration = 3000 config.duration = 3000
this.snackBar.open('暂无图片数据','确定',config); } this.snackBar.open('暂无图片数据', '确定', config);
}
} else { //非逐层统计时 } else { //非逐层统计时
let newData = item.buildingDetails[e.name] let newData = item.buildingDetails[e.name]
let imgName let imgName
@ -532,7 +608,8 @@ export class FireFightingDeviceLookComponent implements OnInit {
if (elements.propertyName.includes('名称')) { imgName = elements.propertyValue } if (elements.propertyName.includes('名称')) { imgName = elements.propertyValue }
if (elements.propertyType === 3) { if (elements.propertyType === 3) {
elements.propertyName = imgName elements.propertyName = imgName
data.images.push(elements)} data.images.push(elements)
}
}); });
}); });
if (data.images.length) { if (data.images.length) {
@ -548,12 +625,11 @@ export class FireFightingDeviceLookComponent implements OnInit {
const config = new MatSnackBarConfig(); const config = new MatSnackBarConfig();
config.verticalPosition = 'top'; config.verticalPosition = 'top';
config.duration = 3000 config.duration = 3000
this.snackBar.open('暂无图片数据','确定',config); } this.snackBar.open('暂无图片数据', '确定', config);
} }
} }
}
} }

131
src/app/key-unit/fire-fighting-device/fire-fighting-device.component.ts

@ -51,7 +51,8 @@ export class FireFightingDeviceComponent implements OnInit {
element.selectBuiltInGrouping = [] element.selectBuiltInGrouping = []
element.facilityItems.forEach((elements, index) => { element.facilityItems.forEach((elements, index) => {
elements.total = element.facilityCount[index] elements.total = element.facilityCount[index]
elements.expanded = false}); elements.expanded = false
});
}); });
}) //http }) //http
} //if } //if
@ -67,7 +68,8 @@ export class FireFightingDeviceComponent implements OnInit {
if (data) { if (data) {
e.facilityItems.push(data) e.facilityItems.push(data)
this.tabbarService.sendMessage('changeScore');//通知服务改变分数 this.tabbarService.sendMessage('changeScore');//通知服务改变分数
} }); }
});
} }
//保存单位消防设施内置分组项 //保存单位消防设施内置分组项
@ -80,7 +82,8 @@ export class FireFightingDeviceComponent implements OnInit {
details: element.details, details: element.details,
name: element.name, name: element.name,
isEachFloor: element.isEachFloor, isEachFloor: element.isEachFloor,
order: element.order} order: element.order
}
data.push(msg) data.push(msg)
if (index == e.facilityItems.length - 1) { if (index == e.facilityItems.length - 1) {
this.http.post('/api/CompanyFacilityItems/Batch', data, { params: header }).subscribe(data => { this.http.post('/api/CompanyFacilityItems/Batch', data, { params: header }).subscribe(data => {
@ -89,7 +92,8 @@ export class FireFightingDeviceComponent implements OnInit {
config.duration = 3000 config.duration = 3000
this.snackBar.open('数据更新成功', '确定', config); this.snackBar.open('数据更新成功', '确定', config);
this.tabbarService.sendMessage('changeScore');//通知服务改变分数 this.tabbarService.sendMessage('changeScore');//通知服务改变分数
}) } })
}
}); //forEach }); //forEach
} }
@ -162,22 +166,26 @@ export class FireFightingDeviceComponent implements OnInit {
item.assets[0].propertyInfos.forEach(element => { //表头 item.assets[0].propertyInfos.forEach(element => { //表头
if (element.propertyType != 3) { if (element.propertyType != 3) {
let unit = element.physicalUnit ? '(' + element.physicalUnit + ')' : '' //单位 let unit = element.physicalUnit ? '(' + element.physicalUnit + ')' : '' //单位
tableMsg.header.push(element.propertyName+unit)} tableMsg.header.push(element.propertyName + unit)
}
}); });
item.assets.forEach(element => { //表格内容 item.assets.forEach(element => { //表格内容
let everyBody = {} let everyBody = {}
element.propertyInfos.forEach((elements, index) => { element.propertyInfos.forEach((elements, index) => {
if (elements.propertyType != 3 && elements.propertyName != '图片' && elements.propertyType != 6) { if (elements.propertyType != 3 && elements.propertyName != '图片' && elements.propertyType != 6) {
let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位 let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位
everyBody[elements.propertyName+unit] = elements.propertyValue } everyBody[elements.propertyName + unit] = elements.propertyValue
}
if (elements.propertyType == 6) { if (elements.propertyType == 6) {
let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位 let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位
everyBody[elements.propertyName+unit] = elements.propertyValue=='1'?'是':'否' } everyBody[elements.propertyName + unit] = elements.propertyValue == '1' ? '是' : '否'
}
if (elements.propertyType != 3 && elements.propertyName == '图片') { if (elements.propertyType != 3 && elements.propertyName == '图片') {
let imgLength = [] let imgLength = []
element.propertyInfos.find(item => { if (item.propertyType == 3) { imgLength.push(item) } }) element.propertyInfos.find(item => { if (item.propertyType == 3) { imgLength.push(item) } })
let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位 let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位
everyBody[elements.propertyName+unit] = String(imgLength.length) } everyBody[elements.propertyName + unit] = String(imgLength.length)
}
}); //propertyInfos }); //propertyInfos
tableMsg.body.push(everyBody) tableMsg.body.push(everyBody)
@ -194,22 +202,26 @@ export class FireFightingDeviceComponent implements OnInit {
data[0].propertyInfos.forEach(element => { //表头 data[0].propertyInfos.forEach(element => { //表头
if (element.propertyType != 3) { if (element.propertyType != 3) {
let unit = element.physicalUnit ? '(' + element.physicalUnit + ')' : '' //单位 let unit = element.physicalUnit ? '(' + element.physicalUnit + ')' : '' //单位
e.header.push(element.propertyName+unit)} e.header.push(element.propertyName + unit)
}
}); });
data.forEach(element => { //表格内容 data.forEach(element => { //表格内容
let everyBody = {} let everyBody = {}
element.propertyInfos.forEach((elements, index) => { element.propertyInfos.forEach((elements, index) => {
if (elements.propertyType != 3 && elements.propertyName != '图片' && elements.propertyType != 6) { if (elements.propertyType != 3 && elements.propertyName != '图片' && elements.propertyType != 6) {
let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位 let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位
everyBody[elements.propertyName+unit] = elements.propertyValue } everyBody[elements.propertyName + unit] = elements.propertyValue
}
if (elements.propertyType == 6) { if (elements.propertyType == 6) {
let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位 let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位
everyBody[elements.propertyName+unit] = elements.propertyValue=='1'?'是':'否' } everyBody[elements.propertyName + unit] = elements.propertyValue == '1' ? '是' : '否'
}
if (elements.propertyType != 3 && elements.propertyName == '图片') { if (elements.propertyType != 3 && elements.propertyName == '图片') {
let imgLength = [] let imgLength = []
element.propertyInfos.find(item => { if (item.propertyType == 3) { imgLength.push(item) } }) element.propertyInfos.find(item => { if (item.propertyType == 3) { imgLength.push(item) } })
let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位 let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位
everyBody[elements.propertyName+unit] = String(imgLength.length) } everyBody[elements.propertyName + unit] = String(imgLength.length)
}
}); });
e.body.push(everyBody) e.body.push(everyBody)
@ -229,9 +241,11 @@ export class FireFightingDeviceComponent implements OnInit {
//获取所有建筑 //获取所有建筑
getAllBuilding() { getAllBuilding() {
let companyId = this.route.snapshot.queryParams.id let companyId = this.route.snapshot.queryParams.id
this.http.get('/api/Buildings',{params:{ this.http.get('/api/Buildings', {
params: {
companyId: companyId companyId: companyId
}}).subscribe((data:any)=>{ }
}).subscribe((data: any) => {
this.allBuildingGrouping = data this.allBuildingGrouping = data
// console.log(888,data) // console.log(888,data)
if (this.allBuildingGrouping.length) { if (this.allBuildingGrouping.length) {
@ -297,19 +311,25 @@ export class FireFightingDeviceComponent implements OnInit {
FacilityStat: any//存放当前建筑手动输入的值 FacilityStat: any//存放当前建筑手动输入的值
selectedChange($event) { selectedChange($event) {
//获得手动输入的值 //获得手动输入的值
this.http.get('/api/BuildingFacilities/FacilityStat',{params:{ this.http.get('/api/BuildingFacilities/FacilityStat', {
params: {
buildingId: this.allBuildingGrouping[$event].id buildingId: this.allBuildingGrouping[$event].id
}}).subscribe(data=>{ }
}).subscribe(data => {
this.FacilityStat = data this.FacilityStat = data
this.changeData() this.changeData()
}) })
} }
//获取所有建筑的消防设施 //获取所有建筑的消防设施
getAllBuildingFacilities () { async getAllBuildingFacilities() {
let companyId = this.route.snapshot.queryParams.id let companyId = this.route.snapshot.queryParams.id
let index = 0 let index = 0
this.allBuildingGrouping.forEach(element => {
for (let index = 0; index < this.allBuildingGrouping.length; index++) {
const element = this.allBuildingGrouping[index];
let header = { buildingId: element.id, buildingType: element.buildingTypes[0].id, companyId: companyId } let header = { buildingId: element.id, buildingType: element.buildingTypes[0].id, companyId: companyId }
await new Promise<void>((resolve, reject) => {
this.http.get('/api/BuildingFacilities', { params: header }).subscribe(data => { this.http.get('/api/BuildingFacilities', { params: header }).subscribe(data => {
element.buildingFacilityGroups = data[0].summary.buildingFacilityGroups element.buildingFacilityGroups = data[0].summary.buildingFacilityGroups
element.buildingOptionalGroups = data[0].summary.buildingOptionalGroups element.buildingOptionalGroups = data[0].summary.buildingOptionalGroups
@ -319,10 +339,19 @@ export class FireFightingDeviceComponent implements OnInit {
elements.selectBuiltInGrouping = [] elements.selectBuiltInGrouping = []
elements.facilityItems.forEach((newElement, index) => { elements.facilityItems.forEach((newElement, index) => {
newElement.total = elements.facilityCount[index] newElement.total = elements.facilityCount[index]
newElement.expanded = false }); newElement.expanded = false
}); });
})
}); });
// console.log(element.name, data)
resolve()
}, err => {
console.log(element.name + '消防设施网络获取失败', err)
})
})
}
} }
//清空手动输入的值 //清空手动输入的值
@ -498,11 +527,12 @@ export class FireFightingDeviceComponent implements OnInit {
details: element.details, details: element.details,
name: element.name, name: element.name,
isEachFloor: element.isEachFloor, isEachFloor: element.isEachFloor,
order: element.order} order: element.order
}
data.push(msg) data.push(msg)
if (index == item.facilityItems.length - 1) { if (index == item.facilityItems.length - 1) {
this.http.post('/api/BuildingFacilityItems/Batch', data, { params: header }).subscribe(data => { this.http.post('/api/BuildingFacilityItems/Batch', data, { params: header }).subscribe(data => {
let putBody let putBody = []
if (item.name == '消防水源') { if (item.name == '消防水源') {
putBody = returnBody(this.fireWaterSupply, '消防水源') putBody = returnBody(this.fireWaterSupply, '消防水源')
} else if (item.name == '消防水系统') { } else if (item.name == '消防水系统') {
@ -590,9 +620,11 @@ export class FireFightingDeviceComponent implements OnInit {
item.propertyInfos.forEach((element, index) => { item.propertyInfos.forEach((element, index) => {
element.propertyValue = String(element.propertyValue) element.propertyValue = String(element.propertyValue)
if (index == item.propertyInfos.length - 1) { if (index == item.propertyInfos.length - 1) {
this.http.post('/api/BuildingOptionalGroups',item,{params:{ this.http.post('/api/BuildingOptionalGroups', item, {
params: {
companyId: companyId companyId: companyId
}}).subscribe(data=>{ }
}).subscribe(data => {
const config = new MatSnackBarConfig(); const config = new MatSnackBarConfig();
config.verticalPosition = 'top'; config.verticalPosition = 'top';
config.duration = 3000 config.duration = 3000
@ -616,22 +648,26 @@ export class FireFightingDeviceComponent implements OnInit {
item.assets[0].propertyInfos.forEach(element => { //表头 item.assets[0].propertyInfos.forEach(element => { //表头
if (element.propertyType != 3) { if (element.propertyType != 3) {
let unit = element.physicalUnit ? '(' + element.physicalUnit + ')' : '' //单位 let unit = element.physicalUnit ? '(' + element.physicalUnit + ')' : '' //单位
tableMsg.header.push(element.propertyName+unit)} tableMsg.header.push(element.propertyName + unit)
}
}); });
item.assets.forEach(element => { //表格内容 item.assets.forEach(element => { //表格内容
let everyBody = {} let everyBody = {}
element.propertyInfos.forEach((elements, index) => { element.propertyInfos.forEach((elements, index) => {
if (elements.propertyType != 3 && elements.propertyName != '图片' && elements.propertyType != 6) { if (elements.propertyType != 3 && elements.propertyName != '图片' && elements.propertyType != 6) {
let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位 let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位
everyBody[elements.propertyName+unit] = elements.propertyValue } everyBody[elements.propertyName + unit] = elements.propertyValue
}
if (elements.propertyType == 6) { if (elements.propertyType == 6) {
let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位 let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位
everyBody[elements.propertyName+unit] = elements.propertyValue=='1'?'是':'否' } everyBody[elements.propertyName + unit] = elements.propertyValue == '1' ? '是' : '否'
}
if (elements.propertyType != 3 && elements.propertyName == '图片') { if (elements.propertyType != 3 && elements.propertyName == '图片') {
let imgLength = [] let imgLength = []
element.propertyInfos.find(item => { if (item.propertyType == 3) { imgLength.push(item) } }) element.propertyInfos.find(item => { if (item.propertyType == 3) { imgLength.push(item) } })
let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位 let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位
everyBody[elements.propertyName+unit] = String(imgLength.length) } everyBody[elements.propertyName + unit] = String(imgLength.length)
}
}); //propertyInfos }); //propertyInfos
tableMsg.body.push(everyBody) tableMsg.body.push(everyBody)
@ -648,22 +684,26 @@ export class FireFightingDeviceComponent implements OnInit {
data[0].propertyInfos.forEach(element => { //表头 data[0].propertyInfos.forEach(element => { //表头
if (element.propertyType != 3) { if (element.propertyType != 3) {
let unit = element.physicalUnit ? '(' + element.physicalUnit + ')' : '' //单位 let unit = element.physicalUnit ? '(' + element.physicalUnit + ')' : '' //单位
e.header.push(element.propertyName+unit)} e.header.push(element.propertyName + unit)
}
}); });
data.forEach(element => { //表格内容 data.forEach(element => { //表格内容
let everyBody = {} let everyBody = {}
element.propertyInfos.forEach((elements, index) => { element.propertyInfos.forEach((elements, index) => {
if (elements.propertyType != 3 && elements.propertyName != '图片' && elements.propertyType != 6) { if (elements.propertyType != 3 && elements.propertyName != '图片' && elements.propertyType != 6) {
let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位 let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位
everyBody[elements.propertyName+unit] = elements.propertyValue } everyBody[elements.propertyName + unit] = elements.propertyValue
}
if (elements.propertyType == 6) { if (elements.propertyType == 6) {
let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位 let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位
everyBody[elements.propertyName+unit] = elements.propertyValue=='1'?'是':'否' } everyBody[elements.propertyName + unit] = elements.propertyValue == '1' ? '是' : '否'
}
if (elements.propertyType != 3 && elements.propertyName == '图片') { if (elements.propertyType != 3 && elements.propertyName == '图片') {
let imgLength = [] let imgLength = []
element.propertyInfos.find(item => { if (item.propertyType == 3) { imgLength.push(item) } }) element.propertyInfos.find(item => { if (item.propertyType == 3) { imgLength.push(item) } })
let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位 let unit = elements.physicalUnit ? '(' + elements.physicalUnit + ')' : '' //单位
everyBody[elements.propertyName+unit] = String(imgLength.length) } everyBody[elements.propertyName + unit] = String(imgLength.length)
}
}); });
e.body.push(everyBody) e.body.push(everyBody)
@ -690,7 +730,9 @@ export class FireFightingDeviceComponent implements OnInit {
if (elements.propertyName.includes('名称')) { imgName = elements.propertyValue } if (elements.propertyName.includes('名称')) { imgName = elements.propertyValue }
if (elements.propertyType === 3) { if (elements.propertyType === 3) {
elements.propertyName = imgName elements.propertyName = imgName
data.images.push(elements)} }); data.images.push(elements)
}
});
}); });
}); //newDate }); //newDate
@ -707,7 +749,8 @@ export class FireFightingDeviceComponent implements OnInit {
const config = new MatSnackBarConfig(); const config = new MatSnackBarConfig();
config.verticalPosition = 'top'; config.verticalPosition = 'top';
config.duration = 3000 config.duration = 3000
this.snackBar.open('暂无图片数据','确定',config); } this.snackBar.open('暂无图片数据', '确定', config);
}
} else { //非逐层统计时 } else { //非逐层统计时
let newData = this.companyDetails[e.name] let newData = this.companyDetails[e.name]
let imgName let imgName
@ -718,7 +761,9 @@ export class FireFightingDeviceComponent implements OnInit {
if (elements.propertyName.includes('名称')) { imgName = elements.propertyValue } if (elements.propertyName.includes('名称')) { imgName = elements.propertyValue }
if (elements.propertyType === 3) { if (elements.propertyType === 3) {
elements.propertyName = imgName elements.propertyName = imgName
data.images.push(elements)} }); data.images.push(elements)
}
});
}); });
if (data.images.length) { if (data.images.length) {
let dialogRef = this.dialog.open(ImagesData, { data }); //打开图片弹窗 let dialogRef = this.dialog.open(ImagesData, { data }); //打开图片弹窗
@ -733,7 +778,8 @@ export class FireFightingDeviceComponent implements OnInit {
const config = new MatSnackBarConfig(); const config = new MatSnackBarConfig();
config.verticalPosition = 'top'; config.verticalPosition = 'top';
config.duration = 3000 config.duration = 3000
this.snackBar.open('暂无图片数据','确定',config); } this.snackBar.open('暂无图片数据', '确定', config);
}
} }
} }
@ -751,7 +797,9 @@ export class FireFightingDeviceComponent implements OnInit {
if (elements.propertyName.includes('名称')) { imgName = elements.propertyValue } if (elements.propertyName.includes('名称')) { imgName = elements.propertyValue }
if (elements.propertyType === 3) { if (elements.propertyType === 3) {
elements.propertyName = imgName elements.propertyName = imgName
data.images.push(elements)} }); data.images.push(elements)
}
});
}); });
}); //newDate }); //newDate
@ -768,7 +816,8 @@ export class FireFightingDeviceComponent implements OnInit {
const config = new MatSnackBarConfig(); const config = new MatSnackBarConfig();
config.verticalPosition = 'top'; config.verticalPosition = 'top';
config.duration = 3000 config.duration = 3000
this.snackBar.open('暂无图片数据','确定',config); } this.snackBar.open('暂无图片数据', '确定', config);
}
} else { //非逐层统计时 } else { //非逐层统计时
let newData = item.buildingDetails[e.name] let newData = item.buildingDetails[e.name]
let imgName let imgName
@ -779,7 +828,8 @@ export class FireFightingDeviceComponent implements OnInit {
if (elements.propertyName.includes('名称')) { imgName = elements.propertyValue } if (elements.propertyName.includes('名称')) { imgName = elements.propertyValue }
if (elements.propertyType === 3) { if (elements.propertyType === 3) {
elements.propertyName = imgName elements.propertyName = imgName
data.images.push(elements)} data.images.push(elements)
}
}); });
}); });
if (data.images.length) { if (data.images.length) {
@ -795,7 +845,8 @@ export class FireFightingDeviceComponent implements OnInit {
const config = new MatSnackBarConfig(); const config = new MatSnackBarConfig();
config.verticalPosition = 'top'; config.verticalPosition = 'top';
config.duration = 3000 config.duration = 3000
this.snackBar.open('暂无图片数据','确定',config); } this.snackBar.open('暂无图片数据', '确定', config);
}
} }
} }

31
src/app/key-unit/key-unit-management/key-unit-management.component.html

@ -16,8 +16,8 @@
</mat-form-field> </mat-form-field>
<span *ngIf="padMore" style="margin-left: 10px; color: #0080FF;" (click)='padInfo()'>更多筛选条件<img <span *ngIf="padMore" style="margin-left: 10px; color: #0080FF;" (click)='padInfo()'>更多筛选条件<img
[src]='imgsrcopen'> </span> [src]='imgsrcopen'> </span>
<span *ngIf="padput" style="margin-left: 10px; color: #0080FF;width: 10px;height: 6px;" (click)='padInfo()'>收起<img <span *ngIf="padput" style="margin-left: 10px; color: #0080FF;width: 10px;height: 6px;"
[src]='imgsrcdown'> </span> (click)='padInfo()'>收起<img [src]='imgsrcdown'> </span>
</div> </div>
<div class="queryField" *ngIf="!pcfind"> <div class="queryField" *ngIf="!pcfind">
@ -25,11 +25,11 @@
<button mat-raised-button style="margin-left: 25px;" type="button" (click)="reset()">重置</button> <button mat-raised-button style="margin-left: 25px;" type="button" (click)="reset()">重置</button>
</div> </div>
<div class="queryField" *ngIf="!padMore"> <div class="queryField" *ngIf="!padMore">
<label style="margin-right: 10px;">关注单位:</label> <label style="margin-right: 10px;">重点单位:</label>
<mat-form-field> <mat-form-field>
<mat-select placeholder='请选择单位是否关注' [(ngModel)]="follow" name="follow"> <mat-select placeholder='请选择单位是否为重点' [(ngModel)]="follow" name="follow">
<mat-option value="0">未关注</mat-option> <mat-option value="0">一般单位</mat-option>
<mat-option value="1">已关注</mat-option> <mat-option value="1">重点单位</mat-option>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
@ -44,9 +44,11 @@
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
<span *ngIf="pcMore" style="margin-left: 10px; color: #0080FF; cursor: pointer;" <span *ngIf="pcMore" style="margin-left: 10px; color: #0080FF; cursor: pointer;"
(click)='pcInfo()'>更多筛选条件<img [src]='imgsrcopen'style="width: 10px;height: 6px;margin:0 0 3px 2px;"> </span> (click)='pcInfo()'>更多筛选条件<img [src]='imgsrcopen'
style="width: 10px;height: 6px;margin:0 0 3px 2px;"> </span>
<span *ngIf="pcput" style="margin-left: 10px; color: #0080FF; cursor: pointer;" <span *ngIf="pcput" style="margin-left: 10px; color: #0080FF; cursor: pointer;"
(click)='pcInfo()'>收起<img [src]='imgsrcdown' style="width: 10px;height: 6px;margin:0 0 3px 2px;"> </span> (click)='pcInfo()'>收起<img [src]='imgsrcdown'
style="width: 10px;height: 6px;margin:0 0 3px 2px;"> </span>
</div> </div>
<div class="queryField" *ngIf="pcfind"> <div class="queryField" *ngIf="pcfind">
<button mat-raised-button color="primary">查询</button> <button mat-raised-button color="primary">查询</button>
@ -112,9 +114,11 @@
</mat-form-field> </mat-form-field>
</div> </div>
<div class="queryField" *ngIf="!padMore&&!pcMore"> <div class="queryField" *ngIf="!padMore&&!pcMore">
<input type="radio" [(ngModel)]="IsNewData" style="height: 16px;width: 16px;position: relative;top: 2px;" name="whgx" [value]='true'> <input type="radio" [(ngModel)]="IsNewData"
style="height: 16px;width: 16px;position: relative;top: 2px;" name="whgx" [value]='true'>
<label style="margin-right: 10px;margin-left: 2px;">新增</label> <label style="margin-right: 10px;margin-left: 2px;">新增</label>
<input type="radio" [(ngModel)]="IsNewData" style="height: 16px;width: 16px;position: relative;top: 2px;" name="whgx" [value]='false'> <input type="radio" [(ngModel)]="IsNewData"
style="height: 16px;width: 16px;position: relative;top: 2px;" name="whgx" [value]='false'>
<label style="margin-right: 10px;margin-left: 2px;">维护更新</label> <label style="margin-right: 10px;margin-left: 2px;">维护更新</label>
</div> </div>
@ -146,7 +150,7 @@
</th> </th>
<td mat-cell *matCellDef="let element"> <td mat-cell *matCellDef="let element">
<span title="已关注" *ngIf="element.isFollowed"> <span title="重点单位" *ngIf="element.isFollowed">
<mat-icon style="margin-top: 6px;color: red;">star</mat-icon> <mat-icon style="margin-top: 6px;color: red;">star</mat-icon>
</span> </span>
@ -348,6 +352,7 @@
<ng-container matColumnDef="operation"> <ng-container matColumnDef="operation">
<th mat-header-cell *matHeaderCellDef>操作</th> <th mat-header-cell *matHeaderCellDef>操作</th>
<td mat-cell *matCellDef="let element" class="operation"> <td mat-cell *matCellDef="let element" class="operation">
<!-- <span (click)="drill(element)">演练</span> -->
<span (click)="unitdetails(element)">查看详情</span> <span (click)="unitdetails(element)">查看详情</span>
<span style="color: blue;margin-left: 4px;" <span style="color: blue;margin-left: 4px;"
*ngIf="(element.isNewData && (element.newVerifyState=='未提交审核'||element.newVerifyState=='审核通过' *ngIf="(element.isNewData && (element.newVerifyState=='未提交审核'||element.newVerifyState=='审核通过'
@ -357,8 +362,8 @@
*ngIf="element.contentVerify!=null&&(element.contentVerify.verifyState==0||element.contentVerify.verifyState==3) " *ngIf="element.contentVerify!=null&&(element.contentVerify.verifyState==0||element.contentVerify.verifyState==3) "
(click)="cancelAudit(element)">撤销审核</span> (click)="cancelAudit(element)">撤销审核</span>
<span style="color: blue;margin-left: 4px;" (click)="auditResult(element)">审批结果</span> <span style="color: blue;margin-left: 4px;" (click)="auditResult(element)">审批结果</span>
<span (click)="Follow(element)" *ngIf="!element.isFollowed">关注单位</span> <span (click)="Follow(element)" *ngIf="!element.isFollowed">重点单位</span>
<span (click)="unFollow(element)" *ngIf="element.isFollowed">取消关注</span> <span (click)="unFollow(element)" *ngIf="element.isFollowed">一般单位</span>
</td> </td>
</ng-container> </ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr> <tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>

1109
src/app/key-unit/key-unit-management/key-unit-management.component.ts

File diff suppressed because it is too large Load Diff

119
src/app/key-unit/key-unit-management/upload-drill/upload-drill.component.html

@ -0,0 +1,119 @@
<h2 mat-dialog-title>演练记录</h2>
<div class="box">
<div class="contentItem">
<div class="title">
单位信息
</div>
<div class="content">
<div class="textbox">
<span class="name">单位名称:</span>
<span>{{data.unitInfo.name}}</span>
</div>
<div class="textbox">
<span class="name">单位地址:</span>
<span>{{data.unitInfo.address}}</span>
</div>
<div class="textbox">
<span class="name">联系人:</span>
<span>{{data.unitInfo.contacts}}</span>
</div>
<div class="textbox">
<span class="name">联系电话:</span>
<span>{{data.unitInfo.phone}}</span>
</div>
</div>
</div>
<div class="contentItem">
<div class="title">
调研人员
</div>
<div class="content peoplecontent">
<div>
<span class="name">带队人员:</span>
<input [disabled]="!isEditMode" name="teamLeader" [(ngModel)]="teamLeader" nz-input
placeholder="带队人员" />
</div>
<div>
<span class="name">熟悉时间:</span>
<nz-range-picker [disabled]="!isEditMode" [nzShowTime]="{ nzFormat: 'HH:mm' }"
nzFormat="yyyy-MM-dd HH:mm" [nzPlaceHolder]="['开始时间', '结束时间']" name="time"
[(ngModel)]="time"></nz-range-picker>
</div>
<div>
<span class="name">调研照片:</span>
<div class="uploadbox">
<input *ngIf="isEditMode" type="file" (change)="upload($event,'调研')">
<button *ngIf="isEditMode" nz-button nzType="default">上传照片</button>
<ul class="imgbox">
<li *ngFor="let item of surveyPhoto;let key = index"><img [src]="item" alt=""
(click)="viewImg(item)">
<span *ngIf="isEditMode" class="close material-icons" (click)="deleteImg(surveyPhoto,key)">
cancel
</span>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="contentItem">
<div class="title">
熟悉内容
</div>
<div class="content photocontent">
<div>
<span class="name">水源照片:</span>
<div class="uploadbox">
<input *ngIf="isEditMode" type="file" (change)="upload($event,'水源')">
<button *ngIf="isEditMode" nz-button nzType="default">上传照片</button>
<ul class="imgbox">
<li *ngFor="let item of waterPhoto;let key = index"><img [src]="item" alt=""
(click)="viewImg(item)">
<span *ngIf="isEditMode" class="close material-icons" (click)="deleteImg(waterPhoto,key)">
cancel
</span>
</li>
</ul>
</div>
</div>
<div>
<span class="name">疏散通道:</span>
<div class="uploadbox">
<input *ngIf="isEditMode" type="file" (change)="upload($event,'疏散通道')">
<button *ngIf="isEditMode" nz-button nzType="default">上传照片</button>
<ul class="imgbox">
<li *ngFor="let item of routePhoto;let key = index"><img [src]="item" alt=""
(click)="viewImg(item)">
<span *ngIf="isEditMode" class="close material-icons" (click)="deleteImg(routePhoto,key)">
cancel
</span>
</li>
</ul>
</div>
</div>
<div>
<span class="name">消控室:</span>
<div class="uploadbox">
<input *ngIf="isEditMode" type="file" (change)="upload($event,'消控室')">
<button *ngIf="isEditMode" nz-button nzType="default">上传照片</button>
<ul class="imgbox">
<li *ngFor="let item of fireControlPhoto;let key = index"><img [src]="item" alt=""
(click)="viewImg(item)">
<span *ngIf="isEditMode" class="close material-icons"
(click)="deleteImg(fireControlPhoto,key)">
cancel
</span>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="mask" *ngIf="isLoading">
<mat-spinner [diameter]="30"></mat-spinner>
</div>
</div>
<mat-dialog-actions align="end">
<button mat-button mat-dialog-close [disabled]="isLoading || isLoadingSave">取消</button>
<button mat-button cdkFocusInitial (click)="save()" [disabled]="isLoading || isLoadingSave">确定</button>
</mat-dialog-actions>

120
src/app/key-unit/key-unit-management/upload-drill/upload-drill.component.scss

@ -0,0 +1,120 @@
.box {
width: 100%;
position: relative;
.contentItem {
display: flex;
margin: 6px 0;
border-bottom: 1px dashed rgb(180, 178, 178);
.title {
width: 75px;
color: #1890ff;
display: flex;
align-items: center;
}
.content {
flex: 1;
display: flex;
flex-wrap: wrap;
div {
margin-bottom: 3px;
.name {
display: inline-block;
width: 70px;
margin-right: 3px;
text-align: right;
}
}
}
.peoplecontent,
.photocontent {
flex-direction: column;
div {
display: flex;
align-items: center;
input,
nz-range-picker {
flex: 1;
}
}
}
.textbox {
height: 32px;
line-height: 32px;
width: 50%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.uploadbox {
position: relative;
display: flex;
align-items: center;
input {
width: 88px;
height: 32px;
position: absolute;
left: 0;
top: 0;
opacity: 0;
z-index: 2;
cursor: pointer;
}
button {
z-index: 1;
cursor: pointer;
}
.imgbox {
height: 100%;
display: flex;
align-items: center;
li {
display: flex;
align-items: center;
position: relative;
}
img {
width: 50px;
height: 50px;
margin: 0 5px;
cursor: pointer;
}
.close{
position: absolute;
right: 0;
top: 0;
font-size: 15px;
cursor: pointer;
}
}
}
}
.mask {
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
background: rgba(0, 0, 0, 0.2);
display: flex;
justify-content: center;
align-items: center;
z-index: 3;
}
}

25
src/app/key-unit/key-unit-management/upload-drill/upload-drill.component.spec.ts

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { UploadDrillComponent } from './upload-drill.component';
describe('UploadDrillComponent', () => {
let component: UploadDrillComponent;
let fixture: ComponentFixture<UploadDrillComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ UploadDrillComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(UploadDrillComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

203
src/app/key-unit/key-unit-management/upload-drill/upload-drill.component.ts

@ -0,0 +1,203 @@
import { HttpClient } from "@angular/common/http";
import { Component, OnInit, Inject } from "@angular/core";
import { MatDialogRef, MAT_DIALOG_DATA } from "@angular/material/dialog";
import { ObjectsService } from "@src/app/services/objects.service";
import { DatePipe } from "@angular/common";
import { MatSnackBar } from "@angular/material/snack-bar";
import Viewer from "viewerjs";
@Component({
selector: "app-upload-drill",
templateUrl: "./upload-drill.component.html",
styleUrls: ["./upload-drill.component.scss"],
providers: [DatePipe],
})
export class UploadDrillComponent implements OnInit {
constructor(
public dialogRef: MatDialogRef<UploadDrillComponent>,
@Inject(MAT_DIALOG_DATA) public data: any,
private objectsSer: ObjectsService,
private http: HttpClient,
private datePipe: DatePipe,
public snackBar: MatSnackBar
) {}
isEditMode = true;
ngOnInit(): void {
console.log(this.data);
this.isEditMode = this.data.isEditMode;
this.getData();
}
isHttpPost;
getData() {
this.http
.get("/api/DrillRecords", {
params: {
CompanyId: this.data.unitInfo.id,
},
})
.subscribe((data: any) => {
console.log("演练记录数据", data);
if (data.totalCount === 0) {
this.isHttpPost = true;
} else {
this.isHttpPost = false;
let item = data.items[0];
this.drillId = item.id;
this.teamLeader = item.teamLeader;
this.time = [item.startTime, item.endTime];
this.surveyPhoto = JSON.parse(item.images);
this.waterPhoto = JSON.parse(item.waterSource);
this.routePhoto = JSON.parse(item.escapeRoute);
this.fireControlPhoto = JSON.parse(item.fireControlRoom);
}
});
}
surveyPhoto = [
// "../../../../assets/images/yiyuan.png",
// "../../../../assets/images/homeHeader.png",
// "../../../../assets/images/add.png",
]; //调研人员照片
waterPhoto = []; //水源照片
routePhoto = []; //疏散照片
fireControlPhoto = []; //消控室照片
//设置文件路径并上传
postFilePath;
isLoading = false;
async upload(e, type) {
this.isLoading = true;
let file = e.target.files[0] || null; //获取上传的文件
let fileSize = file.size || null; //上传文件的总大小
let shardSize = 5 * 1024 * 1024; //5MB 超过5MB要分块上传
this.postFilePath = "演练记录/" + this.data.unitInfo.id;
if (fileSize >= shardSize) {
await this.postFileByMul(file, type);
} else {
await this.postFile(file, type);
}
this.isLoading = false;
}
//直接上传
async postFile(file: File, type) {
await new Promise((resolve, reject) => {
this.objectsSer.postFile(this.postFilePath, file).subscribe((data) => {
let dataObj = data as any;
let filePath: string = ObjectsService.baseUrl + dataObj.objectName;
this.setFileUrl(type, filePath);
resolve("success");
});
});
}
//分块上传
async postFileByMul(file: File, type) {
await new Promise((resolve, reject) => {
this.objectsSer
.postFile_MultipartUpload(this.postFilePath, file)
.then((value) => {
console.log("分块上传成功", value);
let dataObj = value as any;
this.setFileUrl(type, dataObj.filePath + dataObj.fileName);
resolve("success");
});
});
}
setFileUrl(type, filePath) {
switch (type) {
case "调研":
this.surveyPhoto.push(filePath);
break;
case "水源":
this.waterPhoto.push(filePath);
break;
case "疏散通道":
this.routePhoto.push(filePath);
break;
case "消控室":
this.fireControlPhoto.push(filePath);
break;
}
}
deleteImg(arr, key) {
if (confirm("确认删除此照片吗")) {
arr.splice(key, 1);
}
}
teamLeader;
time;
drillId;
isLoadingSave = false;
save() {
if (!this.isEditMode) {
this.dialogRef.close();
return;
}
if (!this.teamLeader || !this.time) {
this.snackBar.open("请输入带队人员和熟悉时间", "确定", {
verticalPosition: "top",
duration: 3000,
});
return;
}
this.isLoadingSave = true;
let body: any = {
companyId: this.data.unitInfo.id,
teamLeader: this.teamLeader,
startTime: this.datePipe.transform(this.time[0], "yyyy-MM-ddTHH:mm:ss"),
endTime: this.datePipe.transform(this.time[1], "yyyy-MM-ddTHH:mm:ss"),
images: JSON.stringify(this.surveyPhoto),
waterSource: JSON.stringify(this.waterPhoto),
escapeRoute: JSON.stringify(this.routePhoto),
fireControlRoom: JSON.stringify(this.fireControlPhoto),
};
if (this.isHttpPost) {
this.http.post("/api/DrillRecords", body).subscribe((data: any) => {
this.drillId = data.id;
this.isHttpPost = false;
this.isLoadingSave = false;
this.snackBar.open("保存成功", "确定", {
verticalPosition: "top",
duration: 3000,
});
this.dialogRef.close();
});
} else {
body.id = this.drillId;
this.http
.put(`/api/DrillRecords/${this.drillId}`, body)
.subscribe((data: any) => {
this.isLoadingSave = false;
this.snackBar.open("保存成功", "确定", {
verticalPosition: "top",
duration: 3000,
});
this.dialogRef.close();
});
}
}
//查看图片
viewImg(url) {
let dom = document.getElementById(`viewerjs`);
let pObjs = dom.childNodes;
let node = document.createElement("img");
node.style.display = "none";
node.src = url;
node.id = "img";
dom.appendChild(node);
setTimeout(() => {
let viewer = new Viewer(document.getElementById(`viewerjs`), {
hidden: () => {
dom.removeChild(pObjs[0]);
viewer.destroy();
},
});
node.click();
}, 0);
}
}

292
src/app/key-unit/key-unit.module.ts

@ -1,94 +1,203 @@
import { NgModule } from '@angular/core'; import { NgModule } from "@angular/core";
import { CommonModule } from '@angular/common'; import { CommonModule } from "@angular/common";
import { KeyUnitRoutingModule } from './key-unit-routing.module'; import { KeyUnitRoutingModule } from "./key-unit-routing.module";
import { KeyUnitManagementComponent, CreateUnit } from './key-unit-management/key-unit-management.component'; import {
import {A11yModule} from '@angular/cdk/a11y'; KeyUnitManagementComponent,
import {DragDropModule} from '@angular/cdk/drag-drop'; CreateUnit,
import {PortalModule} from '@angular/cdk/portal'; } from "./key-unit-management/key-unit-management.component";
import {ScrollingModule} from '@angular/cdk/scrolling'; import { A11yModule } from "@angular/cdk/a11y";
import {CdkStepperModule} from '@angular/cdk/stepper'; import { DragDropModule } from "@angular/cdk/drag-drop";
import {CdkTableModule} from '@angular/cdk/table'; import { PortalModule } from "@angular/cdk/portal";
import {CdkTreeModule} from '@angular/cdk/tree'; import { ScrollingModule } from "@angular/cdk/scrolling";
import {MatAutocompleteModule} from '@angular/material/autocomplete'; import { CdkStepperModule } from "@angular/cdk/stepper";
import {MatBadgeModule} from '@angular/material/badge'; import { CdkTableModule } from "@angular/cdk/table";
import {MatBottomSheetModule} from '@angular/material/bottom-sheet'; import { CdkTreeModule } from "@angular/cdk/tree";
import {MatButtonModule} from '@angular/material/button'; import { MatAutocompleteModule } from "@angular/material/autocomplete";
import {MatButtonToggleModule} from '@angular/material/button-toggle'; import { MatBadgeModule } from "@angular/material/badge";
import {MatCardModule} from '@angular/material/card'; import { MatBottomSheetModule } from "@angular/material/bottom-sheet";
import {MatCheckboxModule} from '@angular/material/checkbox'; import { MatButtonModule } from "@angular/material/button";
import {MatChipsModule} from '@angular/material/chips'; import { MatButtonToggleModule } from "@angular/material/button-toggle";
import {MatStepperModule} from '@angular/material/stepper'; import { MatCardModule } from "@angular/material/card";
import {MatDatepickerModule} from '@angular/material/datepicker'; import { MatCheckboxModule } from "@angular/material/checkbox";
import {MatDialogModule} from '@angular/material/dialog'; import { MatChipsModule } from "@angular/material/chips";
import {MatDividerModule} from '@angular/material/divider'; import { MatStepperModule } from "@angular/material/stepper";
import {MatExpansionModule} from '@angular/material/expansion'; import { MatDatepickerModule } from "@angular/material/datepicker";
import {MatGridListModule} from '@angular/material/grid-list'; import { MatDialogModule } from "@angular/material/dialog";
import {MatIconModule} from '@angular/material/icon'; import { MatDividerModule } from "@angular/material/divider";
import {MatInputModule} from '@angular/material/input'; import { MatExpansionModule } from "@angular/material/expansion";
import {MatListModule} from '@angular/material/list'; import { MatGridListModule } from "@angular/material/grid-list";
import {MatMenuModule} from '@angular/material/menu'; import { MatIconModule } from "@angular/material/icon";
import {MatNativeDateModule, MatRippleModule, MatOption} from '@angular/material/core'; import { MatInputModule } from "@angular/material/input";
import {MatPaginatorModule} from '@angular/material/paginator'; import { MatListModule } from "@angular/material/list";
import {MatProgressBarModule} from '@angular/material/progress-bar'; import { MatMenuModule } from "@angular/material/menu";
import {MatProgressSpinnerModule} from '@angular/material/progress-spinner'; import {
import {MatRadioModule} from '@angular/material/radio'; MatNativeDateModule,
import {MatSelectModule} from '@angular/material/select'; MatRippleModule,
import {MatSidenavModule} from '@angular/material/sidenav'; MatOption,
import {MatSliderModule} from '@angular/material/slider'; } from "@angular/material/core";
import {MatSlideToggleModule} from '@angular/material/slide-toggle'; import { MatPaginatorModule } from "@angular/material/paginator";
import {MatSnackBarModule} from '@angular/material/snack-bar'; import { MatProgressBarModule } from "@angular/material/progress-bar";
import {MatSortModule} from '@angular/material/sort'; import { MatProgressSpinnerModule } from "@angular/material/progress-spinner";
import {MatTableModule} from '@angular/material/table'; import { MatRadioModule } from "@angular/material/radio";
import {MatTabsModule} from '@angular/material/tabs'; import { MatSelectModule } from "@angular/material/select";
import {MatToolbarModule} from '@angular/material/toolbar'; import { MatSidenavModule } from "@angular/material/sidenav";
import {MatTooltipModule} from '@angular/material/tooltip'; import { MatSliderModule } from "@angular/material/slider";
import {MatTreeModule} from '@angular/material/tree'; import { MatSlideToggleModule } from "@angular/material/slide-toggle";
import { EditUnitInfoComponent } from './edit-unit-info/edit-unit-info.component'; import { MatSnackBarModule } from "@angular/material/snack-bar";
import { ViewUnitDetailsComponent } from './view-unit-details/view-unit-details.component'; import { MatSortModule } from "@angular/material/sort";
import { ReactiveFormsModule, FormsModule } from '@angular/forms'; import { MatTableModule } from "@angular/material/table";
import { AddHouseInfo } from './basicinfo/addhouseinfo.component'; import { MatTabsModule } from "@angular/material/tabs";
import { LookMaster } from './basicinfo/lookmaster.component'; import { MatToolbarModule } from "@angular/material/toolbar";
import { BasicinfoComponent, StatisticsOfFireFightingFacilities } from './basicinfo/basicinfo.component'; import { MatTooltipModule } from "@angular/material/tooltip";
import { EditPlanInfoComponent } from './edit-plan-info/edit-plan-info.component'; import { MatTreeModule } from "@angular/material/tree";
import { CountdownModule } from 'ngx-countdown'; import { EditUnitInfoComponent } from "./edit-unit-info/edit-unit-info.component";
import { BasicinfoLookComponent } from './basicinfo-look/basicinfo.component'; import { ViewUnitDetailsComponent } from "./view-unit-details/view-unit-details.component";
import { ViewUnitDetailsPlanComponent } from './view-unit-details-plan/view-unit-details-plan.component'; import { ReactiveFormsModule, FormsModule } from "@angular/forms";
import { FunctionDivisionComponent, addPartition, addPartitionAttribute } from './function-division/function-division.component'; import { AddHouseInfo } from "./basicinfo/addhouseinfo.component";
import {AllaroundComponent} from './allaround/allaround.component' import { LookMaster } from "./basicinfo/lookmaster.component";
import {ImgDetails} from './allaround/imgdetails.component' import {
import { RealisticPictureComponent, previewImg, addRealPicture, editRealPicture } from './realistic-picture/realistic-picture.component'; BasicinfoComponent,
import { FileUploadModule } from 'ng2-file-upload'; StatisticsOfFireFightingFacilities,
import {KeySiteComponent} from './key-site/key-site.component' } from "./basicinfo/basicinfo.component";
import {KeySiteImgs} from './key-site/keysiteimgs.component' import { EditPlanInfoComponent } from "./edit-plan-info/edit-plan-info.component";
import {UploadingCADComponent,readFile,editFile} from './uploading-cad/uploading-cad.component' import { CountdownModule } from "ngx-countdown";
import { KeySiteLookComponent } from './key-site-look/key-site.component'; import { BasicinfoLookComponent } from "./basicinfo-look/basicinfo.component";
import { KeySiteImgs2 } from './key-site-look/keysiteimgs.component'; import { ViewUnitDetailsPlanComponent } from "./view-unit-details-plan/view-unit-details-plan.component";
import { FunctionDivisionLookComponent, addPartitionAttribute2 } from './function-division-look/function-division.component'; import {
import { RealisticPictureLookComponent, previewImg3 } from './realistic-picture-look/realistic-picture.component'; FunctionDivisionComponent,
import { UploadingCADLookComponent } from './uploading-cad-look/uploading-cad.component'; addPartition,
import { FireFightingDeviceComponent } from './fire-fighting-device/fire-fighting-device.component'; addPartitionAttribute,
import { ImagesData, previewBigImg } from './fire-fighting-device/imagesdata.component'; } from "./function-division/function-division.component";
import { ImgsDataDetail } from './fire-fighting-device/addGrouping.component'; import { AllaroundComponent } from "./allaround/allaround.component";
import { FireFightingDeviceLookComponent } from './fire-fighting-device-look/fire-fighting-device.component'; import { ImgDetails } from "./allaround/imgdetails.component";
import { ImagesData2, previewBigImg2 } from './fire-fighting-device-look/imagesdata.component'; import {
import { ImgsDataDetail2 } from './fire-fighting-device-look/addGrouping.component'; RealisticPictureComponent,
import { UiModule } from '../../app/ui/ui.module'; previewImg,
import { SixFamiliarityComponent,routerMapComponent } from './six-familiarity/six-familiarity.component'; addRealPicture,
import { ActualCombatDrillComponent } from './actual-combat-drill/actual-combat-drill.component'; editRealPicture,
import { SixFamiliarListComponent } from './six-familiar-list/six-familiar-list.component' } from "./realistic-picture/realistic-picture.component";
import { TrainingRecordinfoComponent } from './training-recordinfo/training-recordinfo.component'; import { FileUploadModule } from "ng2-file-upload";
import { RouterGISComponent } from './router-gis/router-gis.component'; import { KeySiteComponent } from "./key-site/key-site.component";
import { WaterRoadComponent } from './water-road/water-road.component'; import { KeySiteImgs } from "./key-site/keysiteimgs.component";
import { PhotoofthesceneComponent } from './photoofthescene/photoofthescene.component'; import {
import { KnowRouteComponent } from './know-route/know-route.component'; UploadingCADComponent,
import { FindProblemComponent } from './find-problem/find-problem.component'; readFile,
import { upname } from './key-unit-management/key-unit-management.component'; editFile,
import { companyAuditResult } from './key-unit-management/key-unit-management.component'; } from "./uploading-cad/uploading-cad.component";
import { SpecialWarningComponent } from './special-warning/special-warning.component' import { KeySiteLookComponent } from "./key-site-look/key-site.component";
import { KeySiteImgs2 } from "./key-site-look/keysiteimgs.component";
import {
FunctionDivisionLookComponent,
addPartitionAttribute2,
} from "./function-division-look/function-division.component";
import {
RealisticPictureLookComponent,
previewImg3,
} from "./realistic-picture-look/realistic-picture.component";
import { UploadingCADLookComponent } from "./uploading-cad-look/uploading-cad.component";
import { FireFightingDeviceComponent } from "./fire-fighting-device/fire-fighting-device.component";
import {
ImagesData,
previewBigImg,
} from "./fire-fighting-device/imagesdata.component";
import { ImgsDataDetail } from "./fire-fighting-device/addGrouping.component";
import { FireFightingDeviceLookComponent } from "./fire-fighting-device-look/fire-fighting-device.component";
import {
ImagesData2,
previewBigImg2,
} from "./fire-fighting-device-look/imagesdata.component";
import { ImgsDataDetail2 } from "./fire-fighting-device-look/addGrouping.component";
import { UiModule } from "../../app/ui/ui.module";
import {
SixFamiliarityComponent,
routerMapComponent,
} from "./six-familiarity/six-familiarity.component";
import { ActualCombatDrillComponent } from "./actual-combat-drill/actual-combat-drill.component";
import { SixFamiliarListComponent } from "./six-familiar-list/six-familiar-list.component";
import { TrainingRecordinfoComponent } from "./training-recordinfo/training-recordinfo.component";
import { RouterGISComponent } from "./router-gis/router-gis.component";
import { WaterRoadComponent } from "./water-road/water-road.component";
import { PhotoofthesceneComponent } from "./photoofthescene/photoofthescene.component";
import { KnowRouteComponent } from "./know-route/know-route.component";
import { FindProblemComponent } from "./find-problem/find-problem.component";
import { upname } from "./key-unit-management/key-unit-management.component";
import { companyAuditResult } from "./key-unit-management/key-unit-management.component";
import { SpecialWarningComponent } from "./special-warning/special-warning.component";
import { UploadDrillComponent } from "./key-unit-management/upload-drill/upload-drill.component";
import { NzDatePickerModule } from "ng-zorro-antd/date-picker";
import { NzInputModule } from "ng-zorro-antd/input";
import { NzButtonModule } from "ng-zorro-antd/button";
@NgModule({ @NgModule({
declarations: [KeyUnitManagementComponent, EditUnitInfoComponent, ViewUnitDetailsComponent,CreateUnit,BasicinfoComponent,LookMaster,AddHouseInfo, EditPlanInfoComponent,BasicinfoLookComponent, ViewUnitDetailsPlanComponent,FunctionDivisionComponent,addPartition,addPartitionAttribute,AllaroundComponent,ImgDetails,RealisticPictureComponent,previewImg,addRealPicture,editRealPicture,KeySiteComponent,KeySiteImgs,UploadingCADComponent,readFile,editFile,KeySiteLookComponent,KeySiteImgs2,FunctionDivisionLookComponent,RealisticPictureLookComponent,previewImg3,UploadingCADLookComponent,FireFightingDeviceComponent,ImagesData,previewBigImg,ImgsDataDetail,FireFightingDeviceLookComponent,ImagesData2,ImgsDataDetail2,previewBigImg2,addPartitionAttribute2, SixFamiliarityComponent, ActualCombatDrillComponent,routerMapComponent, SixFamiliarListComponent,TrainingRecordinfoComponent,RouterGISComponent,WaterRoadComponent,PhotoofthesceneComponent,KnowRouteComponent,FindProblemComponent,upname,companyAuditResult,StatisticsOfFireFightingFacilities, SpecialWarningComponent], declarations: [
exports:[ViewUnitDetailsPlanComponent,WaterRoadComponent], KeyUnitManagementComponent,
EditUnitInfoComponent,
ViewUnitDetailsComponent,
CreateUnit,
BasicinfoComponent,
LookMaster,
AddHouseInfo,
EditPlanInfoComponent,
BasicinfoLookComponent,
ViewUnitDetailsPlanComponent,
FunctionDivisionComponent,
addPartition,
addPartitionAttribute,
AllaroundComponent,
ImgDetails,
RealisticPictureComponent,
previewImg,
addRealPicture,
editRealPicture,
KeySiteComponent,
KeySiteImgs,
UploadingCADComponent,
readFile,
editFile,
KeySiteLookComponent,
KeySiteImgs2,
FunctionDivisionLookComponent,
RealisticPictureLookComponent,
previewImg3,
UploadingCADLookComponent,
FireFightingDeviceComponent,
ImagesData,
previewBigImg,
ImgsDataDetail,
FireFightingDeviceLookComponent,
ImagesData2,
ImgsDataDetail2,
previewBigImg2,
addPartitionAttribute2,
SixFamiliarityComponent,
ActualCombatDrillComponent,
routerMapComponent,
SixFamiliarListComponent,
TrainingRecordinfoComponent,
RouterGISComponent,
WaterRoadComponent,
PhotoofthesceneComponent,
KnowRouteComponent,
FindProblemComponent,
upname,
companyAuditResult,
StatisticsOfFireFightingFacilities,
SpecialWarningComponent,
UploadDrillComponent,
],
exports: [
ViewUnitDetailsPlanComponent,
WaterRoadComponent,
BasicinfoLookComponent,
AllaroundComponent,
FireFightingDeviceLookComponent,
KeySiteLookComponent,
FunctionDivisionLookComponent,
RouterGISComponent,
RealisticPictureLookComponent,
UploadingCADLookComponent,
SpecialWarningComponent,
],
imports: [ imports: [
CommonModule, CommonModule,
KeyUnitRoutingModule, KeyUnitRoutingModule,
@ -139,6 +248,9 @@ import { SpecialWarningComponent } from './special-warning/special-warning.compo
FileUploadModule, FileUploadModule,
UiModule, UiModule,
ReactiveFormsModule, ReactiveFormsModule,
] NzDatePickerModule,
NzInputModule,
NzButtonModule,
],
}) })
export class KeyUnitModule {} export class KeyUnitModule {}

532
src/app/key-unit/realistic-picture-look/realistic-picture.component.ts

@ -1,43 +1,56 @@
import { Component, OnInit, Inject, ViewChild } from '@angular/core'; import { Component, OnInit, Inject, ViewChild } from "@angular/core";
import { HttpClient } from '@angular/common/http'; import { HttpClient } from "@angular/common/http";
import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; import {
import { FileUploader } from 'ng2-file-upload'; MatDialog,
import { MatPaginator } from '@angular/material/paginator'; MatDialogRef,
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar'; MAT_DIALOG_DATA,
import Swiper from 'swiper'; } from "@angular/material/dialog";
import { Router,ActivatedRoute } from '@angular/router' import { MatPaginator } from "@angular/material/paginator";
import { MatSnackBar, MatSnackBarConfig } from "@angular/material/snack-bar";
import Swiper from "swiper";
import { Router, ActivatedRoute } from "@angular/router";
@Component({ @Component({
selector: 'app-realistic-picture-look', selector: "app-realistic-picture-look",
templateUrl: './realistic-picture.component.html', templateUrl: "./realistic-picture.component.html",
styleUrls: ['./realistic-picture.component.scss'] styleUrls: ["./realistic-picture.component.scss"],
}) })
export class RealisticPictureLookComponent implements OnInit { export class RealisticPictureLookComponent implements OnInit {
uploader:FileUploader = new FileUploader({ //初始化上传文件 constructor(
url: `/api/Objects/PlanPlatform/${this.route.snapshot.queryParams.id}/RealImgs`, private router: Router,
method: "POST", private route: ActivatedRoute,
itemAlias: "uploadedfile", private http: HttpClient,
autoUpload: false, public dialog: MatDialog,
removeAfterUpload:true, public snackBar: MatSnackBar
}); ) {}
constructor(private router:Router,private route:ActivatedRoute,private http:HttpClient,public dialog: MatDialog,public snackBar: MatSnackBar) { }
ngOnInit(): void { ngOnInit(): void {
let companyId = this.route.snapshot.queryParams.id let companyId = this.route.snapshot.queryParams.id;
this.http.get('/api/RealityImageGroups',{params:{ this.http
companyId : companyId .get("/api/RealityImageGroups", {
}}).subscribe((data:any)=>{ params: {
this.allRealPicture = data companyId: companyId,
this.allRealPicture.unshift({ },
companyId:sessionStorage.getItem('companyId'),
id:'重点部位',
name: "重点部位",
realityImages:null
})
this.selectReal = data[0]
this.getAllRealPicture()
}) })
.subscribe((data: any) => {
this.allRealPicture = data;
this.allRealPicture.unshift(
{
companyId: sessionStorage.getItem("companyId"),
id: "重点部位",
name: "重点部位",
realityImages: null,
},
{
companyId: sessionStorage.getItem("companyId"),
id: "安全出口",
name: "安全出口",
realityImages: null,
}
);
this.selectReal = data[0];
this.getAllRealPicture();
});
} }
companyId: any; //单位编号 companyId: any; //单位编号
@ -52,304 +65,246 @@ export class RealisticPictureLookComponent implements OnInit {
@ViewChild(MatPaginator, { static: true }) @ViewChild(MatPaginator, { static: true })
paginator: MatPaginator; paginator: MatPaginator;
length: any; //共多少条数据 length: any; //共多少条数据
pageSize:any = '12'; //每页条数 pageSize: any = "12"; //每页条数
pageSizeOptions: number[] = [12] //设置每页条数 pageSizeOptions: number[] = [12]; //设置每页条数
PageNumber: any; //第几页 PageNumber: any; //第几页
//分页切换 //分页切换
chagePage(e) { chagePage(e) {
this.PageNumber = e.pageIndex+1 this.PageNumber = e.pageIndex + 1;
this.getAllRealPicture() this.getAllRealPicture();
} }
//获取所有实景图分组 //获取所有实景图分组
getAllGrouping() { getAllGrouping() {
let companyId = this.route.snapshot.queryParams.id let companyId = this.route.snapshot.queryParams.id;
this.http.get('/api/RealityImageGroups',{params:{ this.http
companyId : companyId .get("/api/RealityImageGroups", {
}}).subscribe((data:any)=>{ params: {
this.allRealPicture = data companyId: companyId,
this.selectReal = data[this.selectRealIndex] },
}) })
.subscribe((data: any) => {
this.allRealPicture = data;
this.allRealPicture.unshift(
{
companyId: sessionStorage.getItem("companyId"),
id: "重点部位",
name: "重点部位",
realityImages: null,
},
{
companyId: sessionStorage.getItem("companyId"),
id: "安全出口",
name: "安全出口",
realityImages: null,
}
);
console.log("文件夹列表", this.allRealPicture);
this.selectReal = data[this.selectRealIndex];
});
} }
//获取实景图分组对应实景图 //获取实景图分组对应实景图
getAllRealPicture() { getAllRealPicture() {
if (this.selectReal) { if (this.selectReal) {
let data if (this.selectReal.id == "安全出口") {
if(this.selectReal.id == '重点部位'){ let params = {
companyId: this.selectReal.companyId,
PageNumber: this.PageNumber || 1,
pageSize: this.pageSize,
};
this.http
.get("/api/CompanySafetyExits/GetCompanySafetyExitImages", {
params: params,
})
.subscribe((data: any) => {
// console.log('当前单位安全出口', data)
this.allImages = data.items;
this.length = data.totalCount;
this.pageSize = this.pageSize;
this.downloadList = [];
this.allImages.forEach((element) => {
//每张图片设置选中状态为false
element.newImageUrl = `${element.imageUrl}?x-oss-process=image/resize,m_fill,h_170,w_299`; //处理图片URL地址
element.nameStart = element.name;
element.checked = false; //图片是否选中布尔值
});
});
} else {
let data;
if (this.selectReal.id == "重点部位") {
data = { data = {
groupId: this.selectReal.id, groupId: this.selectReal.id,
companyId: this.selectReal.companyId, companyId: this.selectReal.companyId,
PageNumber: this.PageNumber || 1, PageNumber: this.PageNumber || 1,
pageSize: this.pageSize, pageSize: this.pageSize,
} };
} else { } else {
data = { data = {
groupId: this.selectReal.id, groupId: this.selectReal.id,
PageNumber: this.PageNumber || 1, PageNumber: this.PageNumber || 1,
pageSize: this.pageSize, pageSize: this.pageSize,
} };
} }
this.http.get('/api/RealityImages',{params:data}).subscribe((data:any)=>{ this.http
this.allImages = data.items .get("/api/RealityImages", { params: data })
this.length = data.totalCount .subscribe((data: any) => {
this.pageSize = data.pageSize this.allImages = data.items;
this.downloadList = [] this.length = data.totalCount;
this.allImages.forEach(element => { //每张图片设置选中状态为false this.pageSize = data.pageSize;
if(this.selectReal.id == '重点部位'){ this.downloadList = [];
element.newImageUrl = `${element.imageUrl}?x-oss-process=image/resize,m_fill,h_170,w_299` this.allImages.forEach((element) => {
element.nameStart = element.name //每张图片设置选中状态为false
if (this.selectReal.id == "重点部位") {
element.newImageUrl = `${element.imageUrl}?x-oss-process=image/resize,m_fill,h_170,w_299`;
element.nameStart = element.name;
} else { } else {
element.newImageUrl = `/api/Objects/PlanPlatform/${element.imageUrl}?x-oss-process=image/resize,m_fill,h_170,w_299` //处理图片URL地址 element.newImageUrl = `/api/Objects/PlanPlatform/${element.imageUrl}?x-oss-process=image/resize,m_fill,h_170,w_299`; //处理图片URL地址
element.nameStart = element.name.substring(0,element.name.lastIndexOf(".")); //图片名称前缀 element.nameStart = element.name.substring(
} 0,
element.checked = false //图片是否选中布尔值 element.name.lastIndexOf(".")
element.nameEnd = element.name.substring(element.name.lastIndexOf("."),element.name.length); //图片名称后缀 ); //图片名称前缀
}
element.checked = false; //图片是否选中布尔值
element.nameEnd = element.name.substring(
element.name.lastIndexOf("."),
element.name.length
); //图片名称后缀
}); });
});
}) }
} }
} }
//切换左侧实景图文件 //切换左侧实景图文件
changeReal(e, index) { changeReal(e, index) {
if (this.selectRealIndex != index) { if (this.selectRealIndex != index) {
this.selectReal = e this.selectReal = e;
this.selectRealIndex = index this.selectRealIndex = index;
this.isDownload = false this.isDownload = false;
this.downloadList = [] this.downloadList = [];
this.getAllRealPicture() this.getAllRealPicture();
} }
} }
//选择批量下载 //选择批量下载
download() { download() {
this.isDownload = !this.isDownload this.isDownload = !this.isDownload;
if (!this.isDownload) { //取消批量下载时数组清空 if (!this.isDownload) {
this.allImages.forEach(element => {element.checked = false}); //取消批量下载时数组清空
this.downloadList = [] this.allImages.forEach((element) => {
element.checked = false;
});
this.downloadList = [];
} }
} }
// 预览图片---批量选择图片 // 预览图片---批量选择图片
operation(e, index) { operation(e, index) {
if (this.isDownload) { //批量选择图片 if (this.isDownload) {
e.checked = !e.checked //批量选择图片
if (e.checked==true) {this.downloadList.push(e)} e.checked = !e.checked;
else {this.downloadList.splice(this.downloadList.findIndex(item => item.id === e.id), 1)} if (e.checked == true) {
} else { //预览图片 this.downloadList.push(e);
} else {
this.downloadList.splice(
this.downloadList.findIndex((item) => item.id === e.id),
1
);
}
} else {
//预览图片
let data = { let data = {
selectReal: this.selectReal, selectReal: this.selectReal,
allImages: this.allImages, allImages: this.allImages,
imgIndex: index} imgIndex: index,
let dialogRef = this.dialog.open(previewImg3, };
{data}); let dialogRef = this.dialog.open(previewImg3, { data });
dialogRef.afterClosed().subscribe(); dialogRef.afterClosed().subscribe();
} }
} }
//新建实景图文件 //新建实景图文件
addReal () { addReal() {}
}
//编辑实景图文件 //编辑实景图文件
editReal () { editReal() {}
}
//删除实景图文件 //删除实景图文件
delete() { delete() {
let companyId = this.route.snapshot.queryParams.id let companyId = this.route.snapshot.queryParams.id;
if (this.selectReal) { if (this.selectReal) {
let isDelete = confirm('您确定要删除吗') let isDelete = confirm("您确定要删除吗");
if (isDelete) { if (isDelete) {
this.http.delete(`/api/RealityImageGroups/${this.selectReal.id}`).subscribe(data=>{ this.http
this.http.get('/api/RealityImageGroups',{params:{ .delete(`/api/RealityImageGroups/${this.selectReal.id}`)
companyId : companyId .subscribe((data) => {
}}).subscribe((data:any)=>{ this.http
this.allRealPicture = data .get("/api/RealityImageGroups", {
this.selectReal = data[this.selectRealIndex] params: {
this.allImages = [] companyId: companyId,
this.getAllRealPicture() },
})
}) })
.subscribe((data: any) => {
this.allRealPicture = data;
this.selectReal = data[this.selectRealIndex];
this.allImages = [];
this.getAllRealPicture();
});
});
} }
} }
} }
//实景图修改 //实景图修改
preservationImg(e) { preservationImg(e) {
let data = { let data = {
id: e.id, id: e.id,
name: e.nameStart + e.nameEnd, name: e.nameStart + e.nameEnd,
imageUrl: e.imageUrl, imageUrl: e.imageUrl,
realityImageGroupId:e.realityImageGroupId realityImageGroupId: e.realityImageGroupId,
} };
this.http.put(`/api/RealityImages/${e.id}`,data).subscribe(data=>{ this.http.put(`/api/RealityImages/${e.id}`, data).subscribe((data) => {
this.getAllRealPicture() this.getAllRealPicture();
const config = new MatSnackBarConfig(); const config = new MatSnackBarConfig();
config.verticalPosition = 'top'; config.verticalPosition = "top";
config.duration = 3000 config.duration = 3000;
this.snackBar.open('图片修改成功','确定',config); this.snackBar.open("图片修改成功", "确定", config);
}) });
} }
//实景图删除 //实景图删除
deleteImg(e) { deleteImg(e) {
let isDelete = confirm('您确定要删除吗') let isDelete = confirm("您确定要删除吗");
if (isDelete) { if (isDelete) {
this.http.delete(`/api/RealityImages/${e.id}`).subscribe(data=>{ this.http.delete(`/api/RealityImages/${e.id}`).subscribe((data) => {
this.getAllRealPicture() this.getAllRealPicture();
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('图片删除成功','确定',config);
})
this.http.delete(`/api/Objects/PlanPlatform/${e.imageUrl}`).subscribe(data=>{})
}
}
isLoading:boolean = false; //loading加载
//上传文件↓
file:any; //上传的文件
objectName:any; //上传对象名
uploadId:any; //上传分块上传事件编号
//change选择文件
uploadFile (e) {
if (this.selectReal) {
this.file = e.target.files[0] || null //上传的文件
let URL = window.URL.createObjectURL(this.file)
var img = new Image()
img.src = URL
let that = this
img.onload = function () {
if(img.width>=4096 || img.height>=5000 ){
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
that.snackBar.open('请选择分辨率小于4096*5000的图片','确定',config);
that.uploader.clearQueue(); //清空input控件文件
(<HTMLInputElement>document.getElementById('uploadFile')).value = null //清空input框缓存
}else{ that.startUploading() }
} //onload
} else {
const config = new MatSnackBarConfig(); const config = new MatSnackBarConfig();
config.verticalPosition = 'top'; config.verticalPosition = "top";
config.duration = 3000 config.duration = 3000;
this.snackBar.open('请选择或创建实景图文件夹','确定',config); this.snackBar.open("图片删除成功", "确定", config);
this.uploader.clearQueue(); //清空input控件文件
(<HTMLInputElement>document.getElementById('uploadFile')).value = null //清空input框缓存
}
}
//上传文件
startUploading () {
let file = this.file || null //获取上传的文件
let fileSize = file.size || null //上传文件的总大小
let shardSize = 5 * 1024 * 1024 //5MB一个分片
let maxdSize = 20 * 1024 * 1024 //限制20MB
if (file && fileSize<=shardSize) { //上传文件<=5MB时
this.uploader.queue[0].upload();//开始上传
this.uploader.queue[0].onSuccess = (response, status, headers) => {
if (status == 201) { // 上传文件成功,上传文件后获取服务器返回的数据
let tempRes = JSON.parse(response);
this.objectName = tempRes.objectName
this.addRealImg()
}else { // 上传文件后获取服务器返回的数据错误
let tempRes = JSON.parse(response);
}};
} else if (file && fileSize>shardSize && fileSize<maxdSize) { //上传文件>5MB时,
let data = {filename: file.name}
this.isLoading = true
this.http.post(`/api/NewMultipartUpload/PlanPlatform/${this.companyId}/RealImgs`,{},{params:data}).subscribe((data:any)=>{ //初始化分段上传
this.objectName = data.objectName
this.uploadId = data.uploadId
this.subsectionUploading()
})
}
}
PartNumberETag:any=[]; //每次返回需要保存的信息
//开始分段上传
async subsectionUploading () {
let file = this.file || null //获取上传的文件
let fileSize = file.size || null //上传文件的总大小
let shardSize = 5 * 1024 * 1024 //5MB一个分片
let allSlice = Math.ceil(fileSize / shardSize) //总文件/5MB===共分多少段
for (let i = 0;i < allSlice;i++) { //循环分段上传
let start = i * shardSize //切割文件开始位置
let end = Math.min(fileSize, start + shardSize); //切割文件结束位置
let formData = new FormData()
formData.append("file",file.slice(start, end))
//同步写法实现异步调用
let result = await new Promise((resolve, reject) => {
// await 需要后面返回一个 promise 对象
this.http.post(`/api/MultipartUpload/PlanPlatform/${this.objectName}?uploadId=${this.uploadId}&partNumber=${i+1}`,formData).subscribe((data:any)=>{
let msg = {
"partNumber":data.partNumber || null,
"eTag": data.eTag || null}
resolve(msg) // 调用 promise 内置方法处理成功
})
}); });
this.PartNumberETag.push(result) this.http
if (this.PartNumberETag.length === allSlice) {this.endUploading()} .delete(`/api/Objects/PlanPlatform/${e.imageUrl}`)
}//for循环 .subscribe((data) => {});
} }
//完成分块上传
endUploading () {
let data = this.PartNumberETag
let paramsData = {uploadId:this.uploadId}
this.http.post(`/api/CompleteMultipartUpload/PlanPlatform/${this.objectName}`,data,{params:paramsData}).subscribe(data=>{
this.addRealImg() //上传完成后,发送请求创建实景图
this.isLoading = false
this.uploader.clearQueue(); //清空input控件文件
this.PartNumberETag =[] //清空保存返回的信息
})
} }
//上传图片成功后获取url地址发送请求创建实景图 isLoading: boolean = false; //loading加载
addRealImg () {
let data = {
name: this.file.name,
imageUrl:this.objectName,
realityImageGroupId: this.selectReal.id,
}
this.http.post('/api/RealityImages',data).subscribe(data=>{
(<HTMLInputElement>document.getElementById('uploadFile')).value = null //清空input框缓存
this.getAllRealPicture()
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('图片上传成功','确定',config);
})
}
//批量下载↓ //批量下载↓
//开始下载 //开始下载
async batchDownload() { async batchDownload() {
if (this.downloadList.length) { //开始批量循环下载 if (this.downloadList.length) {
this.isLoading = true //开始批量循环下载
this.isLoading = true;
for (let i = 0; i < this.downloadList.length; i++) { for (let i = 0; i < this.downloadList.length; i++) {
let result = await new Promise((result, reject) => { let result = await new Promise((result, reject) => {
this.http.get(`/api/Objects/PlanPlatform/${this.downloadList[i].imageUrl}`,{responseType: 'blob'},).subscribe(data=>{ this.http
.get(`/api/Objects/PlanPlatform/${this.downloadList[i].imageUrl}`, {
responseType: "blob",
})
.subscribe((data) => {
let url = window.URL.createObjectURL(new Blob([data])); //createObjectURL创建一个下载Blob的url地址 let url = window.URL.createObjectURL(new Blob([data])); //createObjectURL创建一个下载Blob的url地址
let link = document.createElement("a"); let link = document.createElement("a");
link.style.display = "none"; link.style.display = "none";
@ -357,67 +312,69 @@ export class RealisticPictureLookComponent implements OnInit {
link.setAttribute("download", this.downloadList[i].name); link.setAttribute("download", this.downloadList[i].name);
document.body.appendChild(link); document.body.appendChild(link);
link.click(); link.click();
result('success')}) result("success");
}) });
if(i == this.downloadList.length-1) { //判断是否下载完毕 });
this.isLoading = false if (i == this.downloadList.length - 1) {
this.isDownload = false //判断是否下载完毕
this.allImages.forEach(element => {element.checked = false}); this.isLoading = false;
this.downloadList = []} this.isDownload = false;
this.allImages.forEach((element) => {
element.checked = false;
});
this.downloadList = [];
}
} //for循环 } //for循环
} else { } else {
const config = new MatSnackBarConfig(); const config = new MatSnackBarConfig();
config.verticalPosition = 'top'; config.verticalPosition = "top";
config.duration = 3000 config.duration = 3000;
this.snackBar.open('请选择图片','确定',config);} this.snackBar.open("请选择图片", "确定", config);
}
} }
} }
//预览图片组件 //预览图片组件
@Component({ @Component({
selector: 'app-previewImg', selector: "app-previewImg",
templateUrl: './previewImg.html', templateUrl: "./previewImg.html",
styleUrls: ['./realistic-picture.component.scss'] styleUrls: ["./realistic-picture.component.scss"],
}) })
export class previewImg3 { export class previewImg3 {
constructor(
constructor(private http:HttpClient,public dialog: MatDialog,public dialogRef: MatDialogRef<previewImg3>, private http: HttpClient,
@Inject(MAT_DIALOG_DATA) public data) { } public dialog: MatDialog,
public dialogRef: MatDialogRef<previewImg3>,
@Inject(MAT_DIALOG_DATA) public data
) {}
testSwiper: Swiper; testSwiper: Swiper;
ngOnInit(): void { ngOnInit(): void {
this.allImages = this.data.allImages this.allImages = this.data.allImages;
this.allImages.forEach(element => { this.allImages.forEach((element) => {
if( this.data.selectReal.id == '重点部位'){ if (
element.previewImageUrl = `${element.imageUrl}` //处理图片URL地址 this.data.selectReal.id == "重点部位" ||
this.data.selectReal.id == "安全出口"
) {
element.previewImageUrl = `${element.imageUrl}`; //处理图片URL地址
} else { } else {
element.previewImageUrl = `/api/Objects/PlanPlatform/${element.imageUrl}?x-oss-process=image/auto-orient,1` //处理图片URL地址 element.previewImageUrl = `/api/Objects/PlanPlatform/${element.imageUrl}?x-oss-process=image/auto-orient,1`; //处理图片URL地址
} }
}); });
} }
ngAfterViewInit() { ngAfterViewInit() {
this.testSwiper = new Swiper('.swiper-container', { this.testSwiper = new Swiper(".swiper-container", {
lazy: true, lazy: true,
initialSlide: this.data.imgIndex, initialSlide: this.data.imgIndex,
direction: 'horizontal', direction: "horizontal",
loop: false, loop: false,
// 如果需要前进后退按钮 // 如果需要前进后退按钮
navigation: { navigation: {
nextEl: '.swiper-button-next', nextEl: ".swiper-button-next",
prevEl: '.swiper-button-prev', prevEl: ".swiper-button-prev",
} },
}); });
} }
@ -426,10 +383,9 @@ export class previewImg3 {
//旋转图片 //旋转图片
rotate() { rotate() {
this.rotationAngle = this.rotationAngle+90 this.rotationAngle = this.rotationAngle + 90;
if (this.rotationAngle === 360) {this.rotationAngle = 0} if (this.rotationAngle === 360) {
this.rotationAngle = 0;
}
} }
} }

767
src/app/key-unit/realistic-picture/realistic-picture.component.ts

File diff suppressed because it is too large Load Diff

4
src/app/key-unit/router-gis/router-gis.component.ts

@ -100,7 +100,7 @@ export class RouterGISComponent implements OnInit {
that.map = MapFactory.MapInstance('map',{ that.map = MapFactory.MapInstance('map',{
layers:[layer], //当只想显示标准图层时layers属性可缺省, layers:[layer], //当只想显示标准图层时layers属性可缺省,
}); });
that.map.setCity('唐山市'); that.map.setCity('上海市');
that.startCoordinate && that.endCoordinate? that.queryGISRoute() : null that.startCoordinate && that.endCoordinate? that.queryGISRoute() : null
} }
@ -177,7 +177,7 @@ export class RouterGISComponent implements OnInit {
this.endCoordinate = null this.endCoordinate = null
this.routeGIS? this.routeGIS.clear() : null this.routeGIS? this.routeGIS.clear() : null
this.routes = { distance: 0, time: 0, steps: [], } this.routes = { distance: 0, time: 0, steps: [], }
this.map.setCity('唐山市'); //设置地图中心点 this.map.setCity('上海市'); //设置地图中心点
} }
//交换起始点 //交换起始点

16
src/app/key-unit/view-unit-details-plan/view-unit-details-plan.component.html

@ -1,4 +1,4 @@
<mat-tab-group selectedIndex="7" style="height: 99%;" > <mat-tab-group selectedIndex="10" style="height: 99%;" >
<mat-tab label="1.基本信息"> <mat-tab label="1.基本信息">
<ng-template matTabContent> <ng-template matTabContent>
<app-basicinfo-look></app-basicinfo-look> <app-basicinfo-look></app-basicinfo-look>
@ -24,7 +24,7 @@
<app-function-division-look></app-function-division-look> <app-function-division-look></app-function-division-look>
</ng-template> </ng-template>
</mat-tab> </mat-tab>
<!-- <mat-tab label="6.行车路线"> <mat-tab label="6.行车路线">
<ng-template matTabContent> <ng-template matTabContent>
<app-router-gis></app-router-gis> <app-router-gis></app-router-gis>
</ng-template> </ng-template>
@ -33,23 +33,23 @@
<ng-template matTabContent> <ng-template matTabContent>
<app-water-road></app-water-road> <app-water-road></app-water-road>
</ng-template> </ng-template>
</mat-tab> --> </mat-tab>
<mat-tab label="6.实景图"> <mat-tab label="8.实景图">
<ng-template matTabContent> <ng-template matTabContent>
<app-realistic-picture-look></app-realistic-picture-look> <app-realistic-picture-look></app-realistic-picture-look>
</ng-template> </ng-template>
</mat-tab> </mat-tab>
<mat-tab label="7.上传CAD"> <mat-tab label="9.上传CAD">
<ng-template matTabContent> <ng-template matTabContent>
<app-uploading-cad-look></app-uploading-cad-look> <app-uploading-cad-look></app-uploading-cad-look>
</ng-template> </ng-template>
</mat-tab> </mat-tab>
<!-- <mat-tab label="10.特别警示"> <mat-tab label="10.特别警示">
<ng-template matTabContent> <ng-template matTabContent>
<app-special-warning></app-special-warning> <app-special-warning></app-special-warning>
</ng-template> </ng-template>
</mat-tab> --> </mat-tab>
<mat-tab label="8.作战部署"> <mat-tab label="11.作战部署">
<ng-template matTabContent> <ng-template matTabContent>
<app-collection-tools></app-collection-tools> <app-collection-tools></app-collection-tools>
</ng-template> </ng-template>

12
src/app/key-unit/view-unit-details/view-unit-details.component.html

@ -44,7 +44,7 @@
<app-function-division-look></app-function-division-look> <app-function-division-look></app-function-division-look>
</ng-template> </ng-template>
</mat-tab> </mat-tab>
<!-- <mat-tab label="8.行车路线"> <mat-tab label="8.行车路线">
<ng-template matTabContent> <ng-template matTabContent>
<app-router-gis></app-router-gis> <app-router-gis></app-router-gis>
</ng-template> </ng-template>
@ -53,22 +53,22 @@
<ng-template matTabContent> <ng-template matTabContent>
<app-water-road></app-water-road> <app-water-road></app-water-road>
</ng-template> </ng-template>
</mat-tab> --> </mat-tab>
<mat-tab label="8.实景图"> <mat-tab label="10.实景图">
<ng-template matTabContent> <ng-template matTabContent>
<app-realistic-picture-look></app-realistic-picture-look> <app-realistic-picture-look></app-realistic-picture-look>
</ng-template> </ng-template>
</mat-tab> </mat-tab>
<mat-tab label="9.上传CAD"> <mat-tab label="11.上传CAD">
<ng-template matTabContent> <ng-template matTabContent>
<app-uploading-cad-look></app-uploading-cad-look> <app-uploading-cad-look></app-uploading-cad-look>
</ng-template> </ng-template>
</mat-tab> </mat-tab>
<!-- <mat-tab label="12.特别警示"> <mat-tab label="12.特别警示">
<ng-template matTabContent> <ng-template matTabContent>
<app-special-warning></app-special-warning> <app-special-warning></app-special-warning>
</ng-template> </ng-template>
</mat-tab> --> </mat-tab>
<!-- <mat-tab label="12.unity平面图"> <!-- <mat-tab label="12.unity平面图">
<ng-template matTabContent> <ng-template matTabContent>
<iframe id="main" src="/unityApp2Basic/index.html" name="unityApp" frameborder="0" width="96%" height="100%" style="margin-left:2%;"></iframe> <iframe id="main" src="/unityApp2Basic/index.html" name="unityApp" frameborder="0" width="96%" height="100%" style="margin-left:2%;"></iframe>

2
src/app/key-unit/water-road/water-road.component.ts

@ -324,7 +324,7 @@ export class WaterRoadComponent implements OnInit {
this.map.add(this.unitMarker); this.map.add(this.unitMarker);
this.waterSubmit(1) this.waterSubmit(1)
} else { } else {
this.map.setCity('唐山市'); this.map.setCity('上海市');
let config = new MatSnackBarConfig(); let config = new MatSnackBarConfig();
config.verticalPosition = 'top'; config.verticalPosition = 'top';
config.duration = 3000 config.duration = 3000

4
src/app/pages/home/home.component.ts

@ -889,7 +889,7 @@ export class HomeComponent implements OnInit {
//初始化地图 //初始化地图
adcode:any = 130200 //行政编码 adcode:any = 310000 //行政编码
mapInit () { mapInit () {
//创建地图 //创建地图
this.map = new AMap.Map('chartMap', { this.map = new AMap.Map('chartMap', {
@ -1029,7 +1029,7 @@ export class HomeComponent implements OnInit {
districtExplorer.on('outsideClick', (e) => { districtExplorer.on('outsideClick', (e) => {
// console.log('区域外点击'); // console.log('区域外点击');
this.chartsSetOption('','province') this.chartsSetOption('','province')
adcode = 130200 adcode = 310000
districtExplorer.loadAreaNode(adcode, (error, areaNode)=> { districtExplorer.loadAreaNode(adcode, (error, areaNode)=> {
//更新地图视野 //更新地图视野
// this.map.setBounds(areaNode.getBounds(), null, null, true); // this.map.setBounds(areaNode.getBounds(), null, null, true);

3
src/app/pages/login/login.component.ts

@ -83,6 +83,9 @@ export class LoginComponent implements OnInit {
//查看更新内容 //查看更新内容
lookUpdateData() { lookUpdateData() {
let dialogRef = this.dialog.open(lookUpdateDataComponent, let dialogRef = this.dialog.open(lookUpdateDataComponent,
{ width: '668px' }); { width: '668px' });

16
src/app/pages/login/lookUpdateData.html

@ -1,13 +1,7 @@
<p style="text-align: center;">更新公告</p> <p style="text-align: center;">更新公告</p>
<p>更新内容如下:</p> <p>更新内容如下:</p>
<p>1.增加V级文本预案模板导入功能;</p> <p>1.单位管理模块现在支持按照重点单位和一般单位进行查询。</p>
<p>2.已上传至预案编制管理平台的Ⅴ级文本预案,增加【转在线导入】功能;</p> <p>2.在单位管理模块的列表中,我们将“关注/取消”改为了“重点单位/一般单位”,并且重点单位名称前面有红星标记,一般单位前面无标记,以便更好地区分。</p>
<p>3.增加V级文本预案自定义在线编制功能;</p> <p>3.在预案管理模块中,我们去掉了预案列表中的编制级别,并且增加了按照重点单位和一般单位进行查询的功能。在预案列表中的单位名称前面增加了一列显示栏,区分重点单位和一般单位。</p>
<p>为了预案导入功能正常使用,且提高文本预案识别导入的成功率,需要注意以下几点:</p> <p>4.预案列表页面中,预案的名称支持手动修改,同时转在线导入文档转成功后名称去掉 “转在线编制”。 </p>
<p>1.【转在线导入】功能,仅支持以Ⅴ级文本预案模板做预案的文档,其他文档不支持【转在线导入】功能。</p> <p>5.点击系统右上角的“?”下载重点单位设置说明,以便更好地了解如何设置重点单位。 </p>
<p>2.Ⅴ级文本预案模板可以随意修改内容,但整体框架不得做任何修改,不允许随意删除、合并、增加单元格,否则影响预案识别导入的内容。</p>
<p>3.文档导入成功后,可在线编辑,也可以自行添加新的功能模块。</p>
<p>4.V级预案模板导入时仅支持微软Office保存并且格式为.docx的文档,其余格式无法导入。</p>
<p>5.V级预案模板文档以及V级预案使用说明、视频可点击右上角帮助进行下载、查看。其中Ⅴ级文本预案模板文件夹内放置九大类型预案模板、V级预案转在线导入文件夹内包含使用说明及视频、V级预案自定义文件夹内包含使用说明及视频、V级在线编制文件夹内包含使用说明及视频。</p>

90
src/app/pipes/boolean.pipe.ts

@ -1,83 +1,95 @@
import { Pipe, PipeTransform } from '@angular/core'; import { Pipe, PipeTransform } from "@angular/core";
import { isno, PlanTypeEnum, AuditStatusEnum, PlanLevelEnum } from '../interface' import {
@Pipe({ name: 'isno' }) isno,
PlanTypeEnum,
AuditStatusEnum,
PlanLevelEnum,
PlanAuditStatusEnum,
} from "../interface";
@Pipe({ name: "isno" })
export class IsnoPipe implements PipeTransform { export class IsnoPipe implements PipeTransform {
transform(value: boolean): string { transform(value: boolean): string {
if (value) { if (value) {
var x = 0 var x = 0;
} else { } else {
x = 1 x = 1;
} }
return isno[x] return isno[x];
} }
} }
@Pipe({ name: 'plantype' }) @Pipe({ name: "plantype" })
export class PlanType implements PipeTransform { export class PlanType implements PipeTransform {
transform(value: number): string { transform(value: number): string {
return PlanTypeEnum[value] return PlanTypeEnum[value];
} }
} }
@Pipe({ name: 'auditsatus' }) @Pipe({ name: "auditsatus" })
export class AuditSatus implements PipeTransform { export class AuditSatus implements PipeTransform {
transform(value: number): string { transform(value: number): string {
return AuditStatusEnum[value] return AuditStatusEnum[value];
} }
} }
@Pipe({ name: 'planlevel' }) @Pipe({ name: "planlevel" })
export class PlanLevel implements PipeTransform { export class PlanLevel implements PipeTransform {
transform(value: number): string { transform(value: number): string {
return PlanLevelEnum[value] return PlanLevelEnum[value];
} }
} }
@Pipe({ name: 'state' }) @Pipe({ name: "state" })
export class state implements PipeTransform { export class state implements PipeTransform {
transform(value: number): string { transform(value: number): string {
if (value == 3) { if (value == 3) {
return '维护中' return "维护中";
} else if (value == 4) { } else if (value == 4) {
return '维护通过审核' return "维护通过审核";
} else if (value == 5) { } else if (value == 5) {
return '维护驳回审核' return "维护驳回审核";
} else { } else {
return '未维护' return "未维护";
} }
} }
} }
@Pipe({ name: 'differentContentTitle' }) @Pipe({ name: "auditState" })
export class auditState implements PipeTransform {
transform(value: number): string {
return PlanAuditStatusEnum[value];
}
}
@Pipe({ name: "differentContentTitle" })
export class differentContentTitle implements PipeTransform { export class differentContentTitle implements PipeTransform {
transform(value: string): string { transform(value: string): string {
if (typeof (value) == 'boolean' && value) { if (typeof value == "boolean" && value) {
return '是' return "是";
} else if (typeof (value) == 'boolean' && !value) { } else if (typeof value == "boolean" && !value) {
return '否' return "否";
} else if (JSON.stringify(value) == "{}") { } else if (JSON.stringify(value) == "{}") {
return '空' return "空";
} else if (!value) { } else if (!value) {
return '空' return "空";
} else { } else {
return value return value;
} }
} }
} }
@Pipe({ name: 'yuan' }) @Pipe({ name: "yuan" })
export class yuan implements PipeTransform { export class yuan implements PipeTransform {
transform(value: string): string { transform(value: string): string {
if (value == 'LevelOne') { if (value == "LevelOne") {
return '一级预案' return "一级预案";
} else if (value == 'LevelTwo') { } else if (value == "LevelTwo") {
return '二级预案' return "二级预案";
} else if (value == 'LevelThree') { } else if (value == "LevelThree") {
return '三级预案' return "三级预案";
}else if (value == 'LevelFour') { } else if (value == "LevelFour") {
return '四级预案' return "四级预案";
}else if (value == 'LevelFive') { } else if (value == "LevelFive") {
return '五级预案' return "五级预案";
}else if (value == 'PlanText') { } else if (value == "PlanText") {
return '文本预案' return "文本预案";
} }
} }
} }

2
src/app/plan-audit/fireforce-audit/fireforce-audit.component.ts

@ -53,7 +53,7 @@ export class FireforceAuditComponent implements OnInit {
// 将 markers 添加到地图 // 将 markers 添加到地图
this.map.add(this.newPositionMarker); this.map.add(this.newPositionMarker);
}else{ }else{
this.map.setCity('唐山市'); this.map.setCity('上海市');
} }
}, 0); }, 0);

2
src/app/plan-audit/linkageforces-audit/linkageforces-audit.component.ts

@ -59,7 +59,7 @@ export class LinkageforcesAuditComponent implements OnInit {
// 将 markers 添加到地图 // 将 markers 添加到地图
this.map.add(this.newPositionMarker); this.map.add(this.newPositionMarker);
}else{ }else{
this.map.setCity('唐山市'); this.map.setCity('上海市');
} }
}, 0); }, 0);

25
src/app/plan-audit/plan-audit/plan-audit.component.html

@ -12,9 +12,11 @@
<div class="queryField ordiv"> <div class="queryField ordiv">
<label style="margin-right: 10px;">消防救援站:</label> <label style="margin-right: 10px;">消防救援站:</label>
<mat-form-field> <mat-form-field>
<input readonly matInput placeholder="请选择消防救援站" [(ngModel)]="selectOrganizationIName" name="selectOrganizationIName" (focus)="openorganizationbox()"> <input readonly matInput placeholder="请选择消防救援站" [(ngModel)]="selectOrganizationIName"
name="selectOrganizationIName" (focus)="openorganizationbox()">
</mat-form-field> </mat-form-field>
<mat-checkbox style="margin-left: 5px;" [(ngModel)]="HasChildrenOrganization" name="HasChildrenOrganization">包含下级</mat-checkbox> <mat-checkbox style="margin-left: 5px;" [(ngModel)]="HasChildrenOrganization"
name="HasChildrenOrganization">包含下级</mat-checkbox>
<div class="organizationbox" *ngIf="isorganizationbox"> <div class="organizationbox" *ngIf="isorganizationbox">
<div (click)="closediv()" class="closediv"><mat-icon>clear</mat-icon></div> <div (click)="closediv()" class="closediv"><mat-icon>clear</mat-icon></div>
@ -23,7 +25,8 @@
<button type="button" mat-icon-button disabled></button> <button type="button" mat-icon-button disabled></button>
<li>{{node.name}}</li> <li>{{node.name}}</li>
</mat-tree-node> </mat-tree-node>
<mat-tree-node *matTreeNodeDef="let node;when: hasChild" matTreeNodePadding (click)='add(node)' class="organizationlist"> <mat-tree-node *matTreeNodeDef="let node;when: hasChild" matTreeNodePadding (click)='add(node)'
class="organizationlist">
<button type="button" mat-icon-button matTreeNodeToggle [attr.aria-label]="'toggle ' + node.name"> <button type="button" mat-icon-button matTreeNodeToggle [attr.aria-label]="'toggle ' + node.name">
<mat-icon class="mat-icon-rtl-mirror"> <mat-icon class="mat-icon-rtl-mirror">
{{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}} {{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}
@ -78,7 +81,8 @@
</mat-option> </mat-option>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
<mat-checkbox style="margin-left: 5px;" [(ngModel)]="HasChildrenPlanLevel" name="HasChildrenPlanLevel">包含下级</mat-checkbox> <mat-checkbox style="margin-left: 5px;" [(ngModel)]="HasChildrenPlanLevel"
name="HasChildrenPlanLevel">包含下级</mat-checkbox>
</div> </div>
</div> </div>
@ -155,9 +159,12 @@
<ng-container matColumnDef="operation"> <ng-container matColumnDef="operation">
<th mat-header-cell *matHeaderCellDef>操作</th> <th mat-header-cell *matHeaderCellDef>操作</th>
<td mat-cell *matCellDef="let element"> <td mat-cell *matCellDef="let element">
<label style="color: #0000FF;cursor: pointer;" (click)='toExamine(element)' *ngIf="element.auditStatus!=4">预案审核</label> <label style="color: #0000FF;cursor: pointer;" (click)='toExamine(element)'
<label style="color: #0000FF;margin-left: 10px;cursor: pointer;" (click)='openReserve(element)' *ngIf="element.auditStatus==2">预案公开</label> *ngIf="element.auditStatus!=4">预案审核</label>
<label style="color: #0000FF;margin-left: 10px;cursor: pointer;" (click)='closeReserve(element)' *ngIf="element.auditStatus==2">预案取消公开</label> <label style="color: #0000FF;margin-left: 10px;cursor: pointer;" (click)='openReserve(element)'
*ngIf="element.auditStatus==2">预案公开</label>
<label style="color: #0000FF;margin-left: 10px;cursor: pointer;" (click)='closeReserve(element)'
*ngIf="element.auditStatus==2">预案取消公开</label>
<label style="color: #999;" *ngIf="element.auditStatus==4">预案已驳回</label> <label style="color: #999;" *ngIf="element.auditStatus==4">预案已驳回</label>
</td> </td>
</ng-container> </ng-container>
@ -165,9 +172,7 @@
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr> <tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr> <tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
</table> </table>
<mat-paginator [length]="length" <mat-paginator [length]="length" [pageSize]="pageSize" [pageSizeOptions]="pageSizeOptions"
[pageSize]="pageSize"
[pageSizeOptions]="pageSizeOptions"
(page)="chagePage($event)"> (page)="chagePage($event)">
</mat-paginator> </mat-paginator>
</div> </div>

10
src/app/plan-audit/plan-pass/plan-pass.component.ts

@ -82,11 +82,10 @@ export class PlanPassComponent implements OnInit {
this.http.get(`/api/ObjectMetadata/PlanPlatform/${item}`).subscribe((data: any) => { this.http.get(`/api/ObjectMetadata/PlanPlatform/${item}`).subscribe((data: any) => {
data.isLoading = false data.isLoading = false
this.allFile.push(data) this.allFile.push(data)
this.allFile = new MatTableDataSource<any>(this.allFile) }) this.allFile = new MatTableDataSource<any>(this.allFile)
})
}); });
} else if (this.planData.planMode==1) { //预案planMode=1时, 解析文档 } else if (this.planData.planMode == 1 || this.planData.planMode == 2) { //预案planMode=2时, 跳查看页面组件
} else if (this.planData.planMode==2) { //预案planMode=2时, 跳查看页面组件
sessionStorage.setItem("buildingTypeId", this.compantData.buildingTypes.length ? this.compantData.buildingTypes[0].id : undefined); sessionStorage.setItem("buildingTypeId", this.compantData.buildingTypes.length ? this.compantData.buildingTypes[0].id : undefined);
sessionStorage.setItem("companyId", this.route.snapshot.queryParams.id); sessionStorage.setItem("companyId", this.route.snapshot.queryParams.id);
sessionStorage.setItem("planId", this.route.snapshot.queryParams.auditPlanId); sessionStorage.setItem("planId", this.route.snapshot.queryParams.auditPlanId);
@ -143,7 +142,8 @@ export class PlanPassComponent implements OnInit {
let result = await new Promise((result, reject) => { let result = await new Promise((result, reject) => {
this.http.get(`/api/Objects/PlanPlatform/${file.objectName}`, { headers: { 'range': `bytes= ${start}-${end}` }, responseType: 'blob' }).subscribe(data => { this.http.get(`/api/Objects/PlanPlatform/${file.objectName}`, { headers: { 'range': `bytes= ${start}-${end}` }, responseType: 'blob' }).subscribe(data => {
result(data) }) result(data)
})
}) })
allFile.push(result) allFile.push(result)
e.progress = Number((i / allSlice).toFixed(2)) * 100 + '%' e.progress = Number((i / allSlice).toFixed(2)) * 100 + '%'

92
src/app/plan-audit/plan-record/plan-record.component.html

@ -1,11 +1,3 @@
<!--
* @Descripttion:
* @version:
* @Author: sueRimn
* @Date: 2020-12-25 10:19:31
* @LastEditors: sueRimn
* @LastEditTime: 2021-08-16 15:49:49
-->
<div class="box"> <div class="box">
<div class="boxleft"> <div class="boxleft">
<div class="lefthead"> <div class="lefthead">
@ -32,18 +24,18 @@
<span>类型:</span> <span>类型:</span>
<mat-form-field> <mat-form-field>
<mat-select placeholder='请选择单位类型' name="unittype" [(ngModel)]="projectlevel"> <mat-select placeholder='请选择单位类型' name="unittype" [(ngModel)]="projectlevel">
<!-- <mat-option value="1">Ⅰ级预案</mat-option> <mat-option value="1">Ⅰ级预案</mat-option>
<mat-option value="2">Ⅱ级预案</mat-option> --> <mat-option value="2">Ⅱ级预案</mat-option>
<mat-option value="3">Ⅲ级预案</mat-option> <mat-option value="3">Ⅲ级预案</mat-option>
<mat-option value="4">Ⅳ级预案</mat-option> <mat-option value="4">Ⅳ级预案</mat-option>
<mat-option value="5">Ⅴ级预案</mat-option> <mat-option value="5">Ⅴ级预案</mat-option>
<!-- <mat-option value="6">应急预案(国家级)</mat-option> <mat-option value="6">应急预案(国家级)</mat-option>
<mat-option value="7">应急预案(市级)</mat-option> --> <mat-option value="7">应急预案(市级)</mat-option>
<mat-option value="8">类型预案</mat-option> <mat-option value="8">类型预案</mat-option>
<mat-option value="11">重点单位</mat-option> <mat-option value="11">重点单位</mat-option>
<!-- <mat-option value="12">消防水源</mat-option> <mat-option value="12">消防水源</mat-option>
<mat-option value="13">消防力量</mat-option> <mat-option value="13">消防力量</mat-option>
<mat-option value="14">联动力量</mat-option> --> <mat-option value="14">联动力量</mat-option>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
<span>状态:</span> <span>状态:</span>
@ -67,7 +59,8 @@
<mat-form-field class="example-full-width" style="margin-bottom: 0;"> <mat-form-field class="example-full-width" style="margin-bottom: 0;">
<input type="date" matInput name="companyName" autocomplete="off" [(ngModel)]="addtime"> <input type="date" matInput name="companyName" autocomplete="off" [(ngModel)]="addtime">
</mat-form-field> </mat-form-field>
<mat-icon *ngIf="!pcshow" aria-hidden="false" style="position: relative;right: 120px;top: 5px;" id="padshow">arrow forward</mat-icon> <mat-icon *ngIf="!pcshow" aria-hidden="false" style="position: relative;right: 120px;top: 5px;"
id="padshow">arrow forward</mat-icon>
<span style="margin-left: 15px;" id="pcshow" *ngIf="pcshow">🠊</span> <span style="margin-left: 15px;" id="pcshow" *ngIf="pcshow">🠊</span>
<mat-form-field class="example-full-width" style="margin-left: 10px;margin-bottom: 0;"> <mat-form-field class="example-full-width" style="margin-left: 10px;margin-bottom: 0;">
<input type="date" matInput name="companyName" autocomplete="off" [(ngModel)]="endtime"> <input type="date" matInput name="companyName" autocomplete="off" [(ngModel)]="endtime">
@ -81,35 +74,14 @@
<mat-option value="16">文本预案</mat-option> <mat-option value="16">文本预案</mat-option>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
</div>
<div class="btnbox">
<button mat-raised-button color="primary" type="submit">查询</button> <button mat-raised-button color="primary" type="submit">查询</button>
<button mat-raised-button color="primary" (click)='record()'><img src="../../../assets/images/refresh.png" > 重置</button> <button mat-raised-button color="primary" type="button" (click)='record()'>重置</button>
</div> </div>
</form> </form>
<!-- <div class="tablediv">
<table cellspacing="0" cellpadding="0">
<thead>
<th style="width: 15%;">类型</th>
<th style="width: 15%;">操作</th>
<th style="width: 15%;">所属组织</th>
<th style="width: 15%;">审核状态</th>
<th style="width: 15%;">提交人</th>
<th style="width: 25%;">提交时间</th>
</thead>
<tbody>
<tr *ngFor="let item of tableDate">
<td>{{item.level}}</td>
<td [ngClass]="{'green': item.option == '更新','red':item.option == '删除','blue':item.option == '新增'}">{{item.option}}</td>
<td>{{item.orgication}}</td>
<td [ngClass]="{'green': item.unitstate == '已通过','red':item.unitstate == '已拒绝'}">{{item.unitstate}}</td>
<td>{{item.addname}}</td>
<td>{{item.addtime}}</td>
</tr>
</tbody>
</table>
</div> -->
<div class="tablediv"> <div class="tablediv">
<table cellspacing="0" cellpadding="0" style="margin-top: 10px;"> <table class="header" cellspacing="0" cellpadding="0" style="margin-top: 10px;">
<thead> <thead>
<th style="width: 10%;">状态</th> <th style="width: 10%;">状态</th>
<th style="width: 10%;">类型</th> <th style="width: 10%;">类型</th>
@ -124,34 +96,53 @@
</table> </table>
<div class="tbodycss" id="tbodydiv"> <div class="tbodycss" id="tbodydiv">
<table cellspacing="0" cellpadding="0" id="table"> <table cellspacing="0" cellpadding="0" id="table">
<tr [ngClass]="{'selectedTr': item.id == id}" *ngFor="let item of tableDate;let key = index" (click)='tableClick($event,item)'> <tr [ngClass]="{'selectedTr': item.id == id}" *ngFor="let item of tableDate;let key = index"
<td style="width: 10%;" [ngClass]="{'green': item.itemMaintenanceState == '0','yellow':item.itemMaintenanceState != '0'}">{{item.itemMaintenanceState=='0'?'新增':'维护'}}</td> (click)='tableClick($event,item)'>
<td style="width: 10%;"
[ngClass]="{'green': item.itemMaintenanceState == '0','yellow':item.itemMaintenanceState != '0'}">
{{item.itemMaintenanceState=='0'?'新增':'维护'}}</td>
<td style="width: 10%;"> <td style="width: 10%;">
<!-- <input type="radio" name="yuan" value={{item.id}} [(ngModel)]="checked" (click)='radioClick(item)'> --> <!-- <input type="radio" name="yuan" value={{item.id}} [(ngModel)]="checked" (click)='radioClick(item)'> -->
{{item.contentType=='1'?'Ⅰ级预案':item.contentType=='2'?'Ⅱ级预案':item.contentType=='3'?'Ⅲ级预案':item.contentType=='4'?'Ⅳ级预案':item.contentType=='5'? {{item.contentType=='1'?'Ⅰ级预案':item.contentType=='2'?'Ⅱ级预案':item.contentType=='3'?'Ⅲ级预案':item.contentType=='4'?'Ⅳ级预案':item.contentType=='5'?
'Ⅴ级预案':item.contentType=='6'?'应急预案(国家级)':item.contentType=='7'?'应急预案(市级)':item.contentType=='8'?'类型预案':item.contentType=='11'?'重点单位':item.contentType=='12'?'水源':item.contentType=='13'?'消防力量':item.contentType=='14'?'联动力量':'未知'}}</td> 'Ⅴ级预案':item.contentType=='6'?'应急预案(国家级)':item.contentType=='7'?'应急预案(市级)':item.contentType=='8'?'类型预案':(item.contentType=='11'
&&item.itemObj&&
item.itemObj?.isFollowed)?'重点单位':(item.contentType=='11'
&&item.itemObj&&
!item.itemObj?.isFollowed)?'一般单位':(item.contentType=='11'
&&!item.itemObj)?'已删除':item.contentType=='12'?'水源':item.contentType=='13'?'消防力量':item.contentType=='14'?'联动力量':'未知'}}
</td>
<td style="width: 10%;"> <td style="width: 10%;">
{{item.planType=='1'?'二维预案':item.planType=='2'?'三维预案':item.planType=='4'?'其它预案':item.planType=='16'?'文本预案':''}} {{item.planType=='1'?'二维预案':item.planType=='2'?'三维预案':item.planType=='4'?'其它预案':item.planType=='16'?'文本预案':''}}
</td> </td>
<td style="width: 10%;">{{item.title}}</td> <td style="width: 10%;">{{item.title}}</td>
<td style="width: 5%;" [ngClass]="{'green': item.operation == '0','red':item.operation == '2','yellow':item.operation == '1'}">{{item.operation=='0'?'新增':item.operation=='1'?'更新':'删除'}}</td> <td style="width: 5%;"
[ngClass]="{'green': item.operation == '0','red':item.operation == '2','yellow':item.operation == '1'}">
{{item.operation=='0'?'新增':item.operation=='1'?'更新':'删除'}}</td>
<td style="width: 20%;">{{item.organizationName}}</td> <td style="width: 20%;">{{item.organizationName}}</td>
<td style="width: 10%;" [ngClass]="{'green': item.verifyState == '1'||item.verifyState == '4','red':item.verifyState == '2'||item.verifyState == '5'}">{{item.verifyState=='0'?'待初审':item.verifyState=='1'? <td style="width: 10%;"
'初审通过':item.verifyState=='2'?'初审驳回':item.verifyState=='3'?'待终审':item.verifyState=='4'?'终审通过':'终审驳回'}}</td> [ngClass]="{'green': item.verifyState == '1'||item.verifyState == '4','red':item.verifyState == '2'||item.verifyState == '5'}">
{{item.verifyState=='0'?'待初审':item.verifyState=='1'?
'初审通过':item.verifyState=='2'?'初审驳回':item.verifyState=='3'?'待终审':item.verifyState=='4'?'终审通过':'终审驳回'}}
</td>
<td style="width: 10%;">{{item.creatorName}}</td> <td style="width: 10%;">{{item.creatorName}}</td>
<td style="width: 15%;">{{item.createTime|date:'yyyy-MM-dd'}}</td> <td style="width: 15%;">{{item.createTime|date:'yyyy-MM-dd'}}</td>
</tr> </tr>
</table> </table>
<mat-paginator [length]="count" [pageIndex]="PageNumber - 1" [pageSize]="10" (page)="chagePage($event)">
</mat-paginator>
</div> </div>
</div> </div>
</div> </div>
<div class="mask" *ngIf="isTableData">
<mat-spinner [diameter]="30"></mat-spinner>
</div>
</div> </div>
<div class="boxright"> <div class="boxright">
<div class="company" *ngIf="showtype == 3"> <div class="company" *ngIf="showtype == 3">
<mat-tab-group *ngIf="showtype == 3" style="flex: 1;overflow-y: auto;margin-top: 10px;" [selectedIndex]="selected.value" (selectedIndexChange)="selected.setValue($event)"> <mat-tab-group *ngIf="showtype == 3" style="flex: 1;overflow-y: auto;margin-top: 10px;"
[selectedIndex]="selected.value" (selectedIndexChange)="selected.setValue($event)">
<mat-tab label="基本信息"> <mat-tab label="基本信息">
<ng-template matTabContent> <ng-template matTabContent>
<app-basic-info></app-basic-info> <app-basic-info></app-basic-info>
@ -197,9 +188,10 @@
<div class="word" *ngIf="showtype==0"> <div class="word" *ngIf="showtype==0">
<div class="shadow" *ngIf="!iftrue"> <div class="shadow" *ngIf="!iftrue">
<mat-spinner></mat-spinner> <mat-spinner [diameter]="30"></mat-spinner>
</div> </div>
<button mat-raised-button color="primary" style="float: right;margin-top: 10px;margin-right: 15px;" *ngIf="showtype == 0||bianzhi" (click)='lookNew()'>查看详情</button> <button mat-raised-button color="primary" style="float: right;margin-top: 10px;margin-right: 15px;"
*ngIf="showtype == 0||bianzhi" (click)='lookNew()'>查看详情</button>
<iframe [src]='iframeSrc' (load)='ifranmeLoad()' id="myiframe"></iframe> <iframe [src]='iframeSrc' (load)='ifranmeLoad()' id="myiframe"></iframe>
</div> </div>
<div id="viewer" *ngIf="showtype==1"></div> <div id="viewer" *ngIf="showtype==1"></div>

172
src/app/plan-audit/plan-record/plan-record.component.scss

@ -2,6 +2,7 @@
height: 100%; height: 100%;
width: 100%; width: 100%;
display: flex; display: flex;
.boxleft { .boxleft {
height: 100%; height: 100%;
width: 45%; width: 45%;
@ -9,178 +10,226 @@
background-color: #FFFFFF; background-color: #FFFFFF;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
position: relative;
.lefthead { .lefthead {
height: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.headdiv { .headdiv {
@media screen and (min-device-width:1400px) { @media screen and (min-device-width:1400px) {
margin: 30px 0 0 28px; margin: 30px 0 0 28px;
} }
@media screen and (max-device-width:1200px) { @media screen and (max-device-width:1200px) {
margin-top: 10px; margin-top: 10px;
} }
@media screen and (max-device-width:1400px) and (min-device-width:1200px) { @media screen and (max-device-width:1400px) and (min-device-width:1200px) {
margin: 20px 0 0 15px; margin: 20px 0 0 15px;
} }
height: 40px; height: 40px;
display: flex; display: flex;
align-items: center;
flex-direction: row; flex-direction: row;
span { span {
@media screen and (min-device-width:1400px) { @media screen and (min-device-width:1400px) {
font-size: 16px; font-size: 16px;
} }
@media screen and (max-device-width:1200px) { @media screen and (max-device-width:1200px) {
font-size: 13px; font-size: 13px;
} }
@media screen and (max-device-width:1400px) and (min-device-width:1200px) { @media screen and (max-device-width:1400px) and (min-device-width:1200px) {
font-size: 16px; font-size: 16px;
} }
margin-left: 3px; margin-left: 3px;
} }
input { input {
@media screen and (min-device-width:1400px) { @media screen and (min-device-width:1400px) {
margin-left: 50px; margin-left: 40px;
top: 6px;
} }
@media screen and (max-device-width:1200px) { @media screen and (max-device-width:1200px) {
margin-left: 12px; margin-left: 12px;
top: 3px;
} }
@media screen and (max-device-width:1400px) and (min-device-width:1200px) { @media screen and (max-device-width:1400px) and (min-device-width:1200px) {
margin-left: 12px; margin-left: 12px;
top: 6px;
} }
position: relative; position: relative;
} }
.count { .count {
@media screen and (min-device-width:1400px) { @media screen and (min-device-width:1400px) {
margin-left: 110px; margin-left: 110px;
} }
@media screen and (max-device-width:1200px) { @media screen and (max-device-width:1200px) {
margin-left: 20px; margin-left: 20px;
position: relative; position: relative;
bottom: 4px; bottom: 4px;
} }
@media screen and (max-device-width:1400px) and (min-device-width:1200px) { @media screen and (max-device-width:1400px) and (min-device-width:1200px) {
margin-left: 20px; margin-left: 20px;
} }
} }
} }
.headdivtwo { .headdivtwo {
@media screen and (min-device-width:1400px) { @media screen and (min-device-width:1400px) {
margin: 0 0 0 28px; margin: 0 0 0 28px;
} }
@media screen and (max-device-width:1200px) { @media screen and (max-device-width:1200px) {
margin-left: 0; margin-left: 0;
} }
@media screen and (max-device-width:1400px) and (min-device-width:1200px) { @media screen and (max-device-width:1400px) and (min-device-width:1200px) {
margin: 0 0 0 15px; margin: 0 0 0 15px;
} }
//height: 40px; //height: 40px;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center;
span { span {
@media screen and (min-device-width:1200px) { @media screen and (min-device-width:1200px) {
font-size: 16px; font-size: 16px;
} }
@media screen and (max-device-width:1200px) { @media screen and (max-device-width:1200px) {
font-size: 13px; font-size: 13px;
} }
margin-left: 3px; margin-left: 3px;
} }
input { input {
@media screen and (min-device-width:1400px) { @media screen and (min-device-width:1400px) {
margin-left: 50px; margin-left: 40px;
top: 5px;
} }
@media screen and (max-device-width:1200px) { @media screen and (max-device-width:1200px) {
margin-left: 0; margin-left: 0;
top: 3px;
} }
@media screen and (max-device-width:1400px) and (min-device-width:1200px) { @media screen and (max-device-width:1400px) and (min-device-width:1200px) {
margin-left: 0; margin-left: 0;
top: 5px;
} }
position: relative; position: relative;
left: 2px; left: 2px;
} }
.count { .count {
@media screen and (min-device-width:1400px) { @media screen and (min-device-width:1400px) {
margin-left: 110px; margin-left: 110px;
} }
@media screen and (max-device-width:1400px) { @media screen and (max-device-width:1400px) {
margin-left: 20px; margin-left: 20px;
} }
} }
} }
.headthree { .headthree {
height: 45px; height: 45px;
@media screen and (min-device-width:1400px) { @media screen and (min-device-width:1400px) {
margin-left: 30px; margin-left: 30px;
} }
@media screen and (max-device-width:1200px) { @media screen and (max-device-width:1200px) {
font-size: 13px; font-size: 13px;
mat-form-field { mat-form-field {
width: 50px; width: 50px;
} }
} }
@media screen and (max-device-width:1400px) and (min-device-width:1200px) { @media screen and (max-device-width:1400px) and (min-device-width:1200px) {
margin-left: 15px; margin-left: 15px;
mat-form-field { mat-form-field {
width: 50px; width: 50px;
} }
} }
} }
.headfour { .headfour {
@media screen and (max-device-width:1200px) { @media screen and (max-device-width:1200px) {
font-size: 13px; font-size: 13px;
mat-form-field { mat-form-field {
width: 80px; width: 80px;
} }
} }
@media screen and (max-device-width:1400px) and (min-device-width:1200px) { @media screen and (max-device-width:1400px) and (min-device-width:1200px) {
margin-left: 15px; margin-left: 15px;
mat-form-field { mat-form-field {
width: 80px; width: 80px;
} }
} }
@media screen and (min-device-width:1400px) { @media screen and (min-device-width:1400px) {
margin-left: 30px; margin-left: 30px;
} }
span { span {
@media screen and (min-device-width:1400px) { @media screen and (min-device-width:1400px) {
//margin-left: 30px; //margin-left: 30px;
} }
} }
button { button {
@media screen and (min-device-width:1400px) { @media screen and (min-device-width:1400px) {
margin-left: 40px; margin-left: 40px;
font-size: 16px; font-size: 13px;
width: 80px; width: 65px;
height: 36px; height: 34px;
} }
@media screen and (max-device-width:1200px) { @media screen and (max-device-width:1200px) {
margin-left: 80px; margin-left: 80px;
} }
@media screen and (max-device-width:1400px) and (min-device-width:1200px) { @media screen and (max-device-width:1400px) and (min-device-width:1200px) {
margin-left: 80px; margin-left: 80px;
} }
} }
img { img {
@media screen and (max-device-width:1400px) and (min-device-width:1200px) { @media screen and (max-device-width:1400px) and (min-device-width:1200px) {
height: 14px; height: 14px;
width: 14px; width: 14px;
} }
@media screen and (min-device-width:1400px) { @media screen and (min-device-width:1400px) {
height: 14px; height: 14px;
width: 14px; width: 14px;
} }
@media screen and (max-device-width:1200px) { @media screen and (max-device-width:1200px) {
height: 12px; height: 12px;
width: 12px; width: 12px;
@ -188,40 +237,42 @@
} }
} }
}
.tablediv{ .btnbox {
width: 100%; display: flex;
height: 100%; justify-content: center;
padding-bottom: 20px; align-items: center;
.tbodycss{ button {
//overflow-y: auto; margin: 0 6px;
@media screen and (min-device-width:1400px){
overflow-y: auto;
} }
height:550px;
width: 100%;
.selectedTr{
background-color: #b3d3ee;
} }
} }
table{
//margin: 20px 20px; .tablediv {
width: 100%;
flex: 1;
display: flex;
flex-direction: column;
overflow: hidden;
.header {
margin-left: 10px; margin-left: 10px;
margin-right: 10px; margin-right: 10px;
width: 97.5%; width: 97.5%;
//border: 1px solid #2196F3;
thead { thead {
height: 48px; height: 48px;
color: #FFFFFF; color: #FFFFFF;
background-color: #2196F3; background-color: #2196F3;
//font-size: 16px;
th { th {
font-weight: 10; font-weight: 10;
@media screen and (min-device-width:1200px) { @media screen and (min-device-width:1200px) {
font-size: 16px; font-size: 16px;
} }
@media screen and (max-device-width:1200px) { @media screen and (max-device-width:1200px) {
font-size: 13px; font-size: 13px;
} }
@ -233,8 +284,29 @@
background: #FAFAFA; background: #FAFAFA;
} }
} }
.tbodycss {
flex: 1;
width: 100%;
overflow-y: auto;
.selectedTr {
background-color: #b3d3ee;
}
}
}
.mask {
position: absolute;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.2);
display: flex;
justify-content: center;
align-items: center;
} }
} }
.boxright { .boxright {
height: 100%; height: 100%;
width: 53%; width: 53%;
@ -243,20 +315,25 @@
margin-left: 10px; margin-left: 10px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@media screen and (max-device-width:1300px) { @media screen and (max-device-width:1300px) {
overflow-y: auto; overflow-y: auto;
} }
.company { .company {
@media screen and (min-device-width:1300px) { @media screen and (min-device-width:1300px) {
overflow-y: auto; overflow-y: auto;
} }
flex: 1; flex: 1;
//overflow-y: auto; //overflow-y: auto;
margin-top: 10px; margin-top: 10px;
} }
.word { .word {
width: 100%; width: 100%;
height: 100%; height: 100%;
.shadow { .shadow {
height: 95%; height: 95%;
width: 97%; width: 97%;
@ -267,12 +344,14 @@
z-index: 998; z-index: 998;
background-color: #FFFFFF; background-color: #FFFFFF;
opacity: 0.6; opacity: 0.6;
mat-spinner { mat-spinner {
position: relative; position: relative;
top: 40%; top: 40%;
left: 40%; left: 40%;
} }
} }
iframe { iframe {
height: 94%; height: 94%;
width: 97%; width: 97%;
@ -281,12 +360,16 @@
border: medium none; border: medium none;
} }
} }
#viewer { #viewer {
margin: 30px 10px 10px 10px; margin: 30px 10px 10px 10px;
width: 97%; width: 97%;
height: 94%; height: 94%;
} }
.waterAudit,.fireForceAudit,.LinkageForcesAudit{
.waterAudit,
.fireForceAudit,
.LinkageForcesAudit {
flex: 1; flex: 1;
width: 100%; width: 100%;
height: 100%; height: 100%;
@ -294,29 +377,48 @@
} }
} }
} }
th,td{
th,
td {
height: 48px; height: 48px;
@media screen and (min-device-width:1200px) { @media screen and (min-device-width:1200px) {
font-size: 16px; font-size: 16px;
} }
@media screen and (max-device-width:1200px) { @media screen and (max-device-width:1200px) {
font-size: 13px; font-size: 13px;
} }
text-align: center; text-align: center;
} }
.green{color: #00C756;}
.red{color: #FF4D4D;} .green {
.yellow{color: #FFC94B;} color: #00C756;
}
.red {
color: #FF4D4D;
}
.yellow {
color: #FFC94B;
}
.twoD { .twoD {
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: left; align-items: left;
.planBox { .planBox {
margin: 30px 30px; margin: 30px 30px;
color: black; color: black;
:first-child {margin-right: 10px;}
:first-child {
margin-right: 10px;
}
} }
} }
@ -326,9 +428,11 @@ th,td{
width: 6px; width: 6px;
background-color: white; background-color: white;
} }
::-webkit-scrollbar-thumb { ::-webkit-scrollbar-thumb {
background-color: #2196F3; background-color: #2196F3;
} }
.mat-form-field-infix { .mat-form-field-infix {
width: 100px; width: 100px;
} }

452
src/app/plan-audit/plan-record/plan-record.component.ts

@ -1,340 +1,376 @@
/* import { Component, OnInit, Inject } from "@angular/core";
* @Descripttion: import { FormControl } from "@angular/forms";
* @version: import { MatSnackBar, MatSnackBarConfig } from "@angular/material/snack-bar";
* @Author: sueRimn import {
* @Date: 2020-12-25 10:19:31 MatDialog,
* @LastEditors: sueRimn MatDialogRef,
* @LastEditTime: 2021-08-16 15:29:41 MAT_DIALOG_DATA,
*/ } from "@angular/material/dialog";
import { Component, OnInit, Inject } from '@angular/core'; import { HttpClient } from "@angular/common/http";
import { FormControl } from '@angular/forms'; import { DomSanitizer } from "@angular/platform-browser";
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar'; import { Viewer } from "photo-sphere-viewer";
import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; declare var CryptoJS;
import { HttpClient } from '@angular/common/http'
import { DomSanitizer } from '@angular/platform-browser';
import { Viewer } from 'photo-sphere-viewer';
declare var CryptoJS
@Component({ @Component({
selector: 'app-plan-record', selector: "app-plan-record",
templateUrl: './plan-record.component.html', templateUrl: "./plan-record.component.html",
styleUrls: ['./plan-record.component.scss'] styleUrls: ["./plan-record.component.scss"],
}) })
export class PlanRecordComponent implements OnInit { export class PlanRecordComponent implements OnInit {
constructor(
private http: HttpClient,
public snackBar: MatSnackBar,
private sanitizer: DomSanitizer,
public dialog: MatDialog
) {}
constructor(private http: HttpClient, public snackBar: MatSnackBar, private sanitizer: DomSanitizer, public dialog: MatDialog) { } pcshow;
pcshow
ngOnInit(): void { ngOnInit(): void {
if (window.matchMedia("(max-width: 1300px)").matches) { if (window.matchMedia("(max-width: 1300px)").matches) {
this.pcshow = false this.pcshow = false;
} else { } else {
this.pcshow = true this.pcshow = true;
} }
let level = sessionStorage.getItem("level"); let level = sessionStorage.getItem("level");
if (level == "0") {//如果是总队 if (level == "0") {
//如果是总队
this.preparelevels = [ this.preparelevels = [
{ name: "总队", value: "0" }, { name: "总队", value: "0" },
{ name: "支队", value: "1" }, { name: "支队", value: "1" },
{ name: "大队", value: "2" }, { name: "大队", value: "2" },
{ name: "中队", value: "3" } { name: "中队", value: "3" },
] ];
} }
if (level == "1") {//如果是支队 if (level == "1") {
//如果是支队
this.preparelevels = [ this.preparelevels = [
{ name: "支队", value: "1" }, { name: "支队", value: "1" },
{ name: "大队", value: "2" }, { name: "大队", value: "2" },
{ name: "中队", value: "3" } { name: "中队", value: "3" },
] ];
} }
if (level == "2") {//如果是大队 if (level == "2") {
//如果是大队
this.preparelevels = [ this.preparelevels = [
{ name: "大队", value: "2" }, { name: "大队", value: "2" },
{ name: "中队", value: "3" } { name: "中队", value: "3" },
] ];
} }
if (level == "3") {//如果是中队 if (level == "3") {
this.preparelevels = [ //如果是中队
{ name: "中队", value: "3" } this.preparelevels = [{ name: "中队", value: "3" }];
]
} }
this.iframeSrc = this.sanitizer.bypassSecurityTrustResourceUrl(this.src); this.iframeSrc = this.sanitizer.bypassSecurityTrustResourceUrl(this.src);
this.getAlltabledate() this.getAlltabledate();
} }
wordShow = true wordShow = true;
iframeSrc iframeSrc;
src = '' src = "";
selected = new FormControl(0); //选项卡 实例 selected = new FormControl(0); //选项卡 实例
preparelevels: any preparelevels: any;
level = ''//类型 level = ""; //类型
verifyState = ''//审核状态 verifyState = ""; //审核状态
projectlevel//组织机构 projectlevel; //组织机构
PlanLevel//编制级别 PlanLevel; //编制级别
addtime//时间 addtime; //时间
endtime//结束时间 endtime; //结束时间
count//一共多少条 count; //一共多少条
tableDate tableDate;
showPvt = false//全景图是否显示 showPvt = false; //全景图是否显示
shenheTable = []//选中要审核的对象 shenheTable = []; //选中要审核的对象
chuorzhong//判断初审还是终审 chuorzhong; //判断初审还是终审
radioid//选中的id radioid; //选中的id
showtype = -1//0:word,1:全景图,2:二维三维,3:重点单位 showtype = -1; //0:word,1:全景图,2:二维三维,3:重点单位
compantData = { name: '', buildingTypes: [], address: '' } compantData = { name: "", buildingTypes: [], address: "" };
organizationName organizationName;
planData planData;
id id;
itemid itemid;
companyId companyId;
fetchUrl fetchUrl;
companyName companyName;
plantypes plantypes;
IsNewData=[true,false] IsNewData = [true, false];
//获取表格数据 //获取表格数据
PageNumber = 1;
isTableData = false;
getAlltabledate() { getAlltabledate() {
this.isTableData = true;
let paramsdata: any = { let paramsdata: any = {
Operation: this.level || [], Operation: this.level || [],
ContentType: Number(this.projectlevel) || [], ContentType: Number(this.projectlevel) || [],
Level: this.PlanLevel || [], Level: this.PlanLevel || [],
verifyState: this.verifyState || [1, 2, 4, 5], verifyState: this.verifyState || [1, 2, 4, 5],
QueryStartTime: this.addtime || '', QueryStartTime: this.addtime || "",
QueryEndTime: this.endtime || '', QueryEndTime: this.endtime || "",
PlanType: this.plantypes || [], PlanType: this.plantypes || [],
IsNewData:this.IsNewData IsNewData: this.IsNewData,
} PageNumber: this.PageNumber,
this.http.get("/api/ContentVerifies", { params: paramsdata }).subscribe((data: any) => { PageSize: 10,
PageType: 2,
};
this.http
.get("/api/ContentVerifies", { params: paramsdata })
.subscribe((data: any) => {
//console.log(data) //console.log(data)
this.tableDate = data.items this.isTableData = false;
this.count = data.totalCount this.tableDate = data.items;
}) this.count = data.totalCount;
});
} }
//提交查询 //提交查询
onSubmit(value) { onSubmit(value) {
//console.log(value) this.PageNumber = 1;
this.getAlltabledate() this.getAlltabledate();
} }
//刷新 //刷新
record() { record() {
this.verifyState = '' this.verifyState = "";
this.level = '' this.level = "";
this.projectlevel = '' this.projectlevel = "";
this.addtime = '' this.IsNewData = [true, false];
this.endtime = '' this.addtime = "";
let level = sessionStorage.getItem("level"); this.endtime = "";
this.PlanLevel = '' this.PlanLevel = "";
this.plantypes=[] this.plantypes = [];
this.getAlltabledate() this.PageNumber = 1; //分页事件触发刷新
this.getAlltabledate();
}
//分页事件
chagePage(e) {
console.log("分页事件", e);
this.PageNumber = e.pageIndex + 1;
this.getAlltabledate();
} }
//表格点击事件 //表格点击事件
viewer//全景图对象 viewer; //全景图对象
waterData: any//需要传递给子组件的水源信息 waterData: any; //需要传递给子组件的水源信息
LinkageForceDetailInfo: any//需要传递给子组件的联动力量信息 LinkageForceDetailInfo: any; //需要传递给子组件的联动力量信息
fireForceDetailInfo: any//需要传递给子组件的消防力量信息 fireForceDetailInfo: any; //需要传递给子组件的消防力量信息
postlevel: any postlevel: any;
bianzhi = false bianzhi = false;
tableClick(e, item) { tableClick(e, item) {
this.showtype = -1 this.showtype = -1;
//e.target.parentElement.bgColor='#2196F3' //e.target.parentElement.bgColor='#2196F3'
// console.log(item) // console.log(item)
this.organizationName = '' this.organizationName = "";
this.itemid = item.itemId this.itemid = item.itemId;
this.id = item.id this.id = item.id;
this.fetchUrl = '' this.fetchUrl = "";
this.viewer = {} this.viewer = {};
if (item.contentType == 11) { if (item.contentType == 11) {
this.bianzhi = false this.bianzhi = false;
window.setTimeout(() => { window.setTimeout(() => {
this.showtype = 3 this.showtype = 3;
sessionStorage.setItem('companyId', item.itemId) sessionStorage.setItem("companyId", item.itemId);
}, 0) }, 0);
} else if (item.contentType == 12) { } else if (item.contentType == 12) {
this.bianzhi = false this.bianzhi = false;
//水源 //水源
this.http.get(`/api/WaterSources/${item.itemId}`).subscribe((data) => { this.http.get(`/api/WaterSources/${item.itemId}`).subscribe((data) => {
this.waterData = data this.waterData = data;
this.showtype = 12 this.showtype = 12;
}) });
} else if (item.contentType == 13) { } else if (item.contentType == 13) {
this.bianzhi = false this.bianzhi = false;
//消防力量 //消防力量
this.http.get(`/api/CustomFireForce/${item.itemId}`).subscribe((data: any) => { this.http
if (data.forceType != 0) {//如果是其他消防力量 .get(`/api/CustomFireForce/${item.itemId}`)
this.postlevel = 4 .subscribe((data: any) => {
if (data.forceType != 0) {
//如果是其他消防力量
this.postlevel = 4;
} else { } else {
this.postlevel = data.level this.postlevel = data.level;
} }
// console.log('xxx',data) // console.log('xxx',data)
data.fireForceDetailInfo.location ? null : data.fireForceDetailInfo.location = { x: null, y: null } data.fireForceDetailInfo.location
this.fireForceDetailInfo = data.fireForceDetailInfo ? null
this.showtype = 13 : (data.fireForceDetailInfo.location = { x: null, y: null });
}) this.fireForceDetailInfo = data.fireForceDetailInfo;
this.showtype = 13;
});
} else if (item.contentType == 14) { } else if (item.contentType == 14) {
this.bianzhi = false this.bianzhi = false;
//联动力量 //联动力量
this.http.get(`/api/LinkageForces/${item.itemId}`).subscribe((data: any) => { this.http
.get(`/api/LinkageForces/${item.itemId}`)
data.location ? null : data.location = { x: null, y: null } .subscribe((data: any) => {
this.LinkageForceDetailInfo = data data.location ? null : (data.location = { x: null, y: null });
this.showtype = 14 this.LinkageForceDetailInfo = data;
}) this.showtype = 14;
});
} else { } else {
this.http.get(`/api/PlanComponents/${item.itemId}`).subscribe((data: any) => { this.http
this.companyId = data.companyId .get(`/api/PlanComponents/${item.itemId}`)
this.companyName = data.companyName .subscribe((data: any) => {
this.companyId = data.companyId;
this.companyName = data.companyName;
//this.bianzhi = false //this.bianzhi = false
if (data.planType != 2 && data.planType != 1) { if (data.planType != 2 && data.planType != 1) {
if (data.planMode == 2) { if (data.planMode == 2) {
this.showtype = 0 this.showtype = 0;
this.bianzhi = true this.bianzhi = true;
this.src = `/CreatePlanOnlineFive?navIsOpen=false&companyId=${data.companyId}&planName=${data.name}&unitName=${data.companyName}&planCategory=${data.planCategory}&planId=${data.id}&unitTypeId=${data.company.buildingTypes[0].id}&orName=${data.company.organizationName}&orId=${data.company.organizationId}&pattern=false` this.src = `/CreatePlanOnlineFive?navIsOpen=false&companyId=${data.companyId}&planName=${data.name}&unitName=${data.companyName}&planCategory=${data.planCategory}&planId=${data.id}&unitTypeId=${data.company.buildingTypes[0].id}&orName=${data.company.organizationName}&orId=${data.company.organizationId}&pattern=false`;
this.iframeSrc = this.sanitizer.bypassSecurityTrustResourceUrl(this.src); this.iframeSrc = this.sanitizer.bypassSecurityTrustResourceUrl(
this.src
);
//this.src=`/keyUnit/viewunitinfoplan?id=${data.companyId}&orName=${data.company.organizationId}&orId=${data.company.organizationName}` //this.src=`/keyUnit/viewunitinfoplan?id=${data.companyId}&orName=${data.company.organizationId}&orId=${data.company.organizationName}`
} else { } else {
this.bianzhi = false this.bianzhi = false;
this.fetchUrl = data.attachmentUrls[0] this.fetchUrl = data.attachmentUrls[0];
var index = this.fetchUrl.indexOf("\/") var index = this.fetchUrl.indexOf("/");
if (this.fetchUrl.substr(0, index) == 'psw') { if (this.fetchUrl.substr(0, index) == "psw") {
this.showtype = 1 this.showtype = 1;
var obj = document.getElementById('viewer') var obj = document.getElementById("viewer");
if (obj != null) { if (obj != null) {
obj.innerHTML = '' obj.innerHTML = "";
} }
window.setTimeout(() => { window.setTimeout(() => {
this.viewer = new Viewer({ this.viewer = new Viewer({
container: document.querySelector('#viewer'), container: document.querySelector("#viewer"),
panorama: '/api/Objects/PlanPlatform/' + this.fetchUrl, panorama: "/api/Objects/PlanPlatform/" + this.fetchUrl,
});
}); });
})
} else { } else {
this.lookWord() this.lookWord();
} }
} }
} else { } else {
this.organizationName = item.organizationName this.organizationName = item.organizationName;
this.planData = data this.planData = data;
this.handleData() this.handleData();
return return;
//this.src=`/planAudit/planpass?id=${data.companyId}&companyName=${data.companyName}&auditPlanId=${data.id}&auditStatus=${data.auditStatus}&planType=1` //this.src=`/planAudit/planpass?id=${data.companyId}&companyName=${data.companyName}&auditPlanId=${data.id}&auditStatus=${data.auditStatus}&planType=1`
//this.iframeSrc=this.sanitizer.bypassSecurityTrustResourceUrl(this.src); //this.iframeSrc=this.sanitizer.bypassSecurityTrustResourceUrl(this.src);
//window.open(`/planAudit/planpass?id=${data.companyId}&companyName=${data.companyName}&auditPlanId=${data.id}&auditStatus=${data.auditStatus}&planType=1`) //window.open(`/planAudit/planpass?id=${data.companyId}&companyName=${data.companyName}&auditPlanId=${data.id}&auditStatus=${data.auditStatus}&planType=1`)
} }
});
})
} }
if (e.checked) { if (e.checked) {
this.shenheTable.push(item) this.shenheTable.push(item);
} } else {
else {
for (var i = 0; i < this.shenheTable.length; i++) { for (var i = 0; i < this.shenheTable.length; i++) {
if (this.shenheTable[i].id == item.id) { if (this.shenheTable[i].id == item.id) {
this.shenheTable.splice(i, 1) this.shenheTable.splice(i, 1);
} }
} }
} }
this.radioid = item.itemId this.radioid = item.itemId;
/* this.chuorzhong=item.verifyState /* this.chuorzhong=item.verifyState
this.radioid=item.itemId */ this.radioid=item.itemId */
} }
//毕升 //毕升
lookWord() { lookWord() {
this.showtype = 0 this.showtype = 0;
let suffix = this.fetchUrl.split('.')[this.fetchUrl.split('.').length - 1].toLowerCase() let suffix = this.fetchUrl
if (suffix == 'docx' || suffix == 'doc') { .split(".")
let arr = this.fetchUrl.split('.') [this.fetchUrl.split(".").length - 1].toLowerCase();
arr[arr.length - 1] = 'pdf' if (suffix == "docx" || suffix == "doc") {
this.src = `/api/Objects/PlanPlatform/` + arr.join('.') let arr = this.fetchUrl.split(".");
} else if (suffix == 'pdf') { arr[arr.length - 1] = "pdf";
this.src = `/api/Objects/PlanPlatform/` + this.fetchUrl this.src = `/api/Objects/PlanPlatform/` + arr.join(".");
} else if (suffix == "pdf") {
this.src = `/api/Objects/PlanPlatform/` + this.fetchUrl;
} }
this.iframeSrc = this.sanitizer.bypassSecurityTrustResourceUrl(this.src); this.iframeSrc = this.sanitizer.bypassSecurityTrustResourceUrl(this.src);
} }
//查看按钮跳转 //查看按钮跳转
lookNew() { lookNew() {
window.open(this.src) window.open(this.src);
} }
//查看二维三维预案 //查看二维三维预案
thirdPartyURL thirdPartyURL;
planType planType;
twoOrthree twoOrthree;
handleData() { handleData() {
this.compantData = { name: '', buildingTypes: [], address: '' } console.log(this.planData);
this.planType = this.planData.planMode this.compantData = { name: "", buildingTypes: [], address: "" };
let data = this.planData this.planType = this.planData.planMode;
let data = this.planData;
if (data.planType == 1) { if (data.planType == 1) {
this.twoOrthree = 2 this.twoOrthree = 2;
} else if (data.planType == 2) { } else if (data.planType == 2) {
this.twoOrthree = 3 this.twoOrthree = 3;
} }
if (this.planData.planMode == 0) { //预案planMode=0时, 查看word if (this.planData.planMode == 0) {
//预案planMode=0时, 查看word
//this.lookWord() //this.lookWord()
} else if (this.planData.planMode == 1) { //预案planMode=1时, 解析文档 } else if (this.planData.planMode == 1 || this.planData.planMode == 2) {
//预案planMode=2时, 跳查看页面组件
} else if (this.planData.planMode == 2) { //预案planMode=2时, 跳查看页面组件 this.showtype = 2;
this.showtype = 2
this.http.get(`/api/Plans/${data.companyId}`).subscribe((data: any) => { this.http.get(`/api/Plans/${data.companyId}`).subscribe((data: any) => {
data && data.company ? this.compantData = data.company : null data && data.company ? (this.compantData = data.company) : null;
}) });
sessionStorage.setItem("buildingTypeId", this.compantData.buildingTypes.length ? this.compantData.buildingTypes[0].id : undefined); sessionStorage.setItem(
"buildingTypeId",
this.compantData.buildingTypes.length
? this.compantData.buildingTypes[0].id
: undefined
);
sessionStorage.setItem("companyId", this.companyId); sessionStorage.setItem("companyId", this.companyId);
sessionStorage.setItem("planId", this.itemid); sessionStorage.setItem("planId", this.itemid);
sessionStorage.setItem("editable", '0'); sessionStorage.setItem("editable", "0");
sessionStorage.setItem("planName", data.name) sessionStorage.setItem("planName", data.name);
let companyId = sessionStorage.getItem("companyId") let companyId = sessionStorage.getItem("companyId");
this.thirdPartyURL = this.sanitizer.bypassSecurityTrustResourceUrl(`/keyUnit/viewunitinfoplans?id=${companyId}`); this.thirdPartyURL = this.sanitizer.bypassSecurityTrustResourceUrl(
`/keyUnit/viewunitinfoplans?id=${companyId}`
);
//window.open(`/keyUnit/viewunitinfoplan?id=${companyId}`) //window.open(`/keyUnit/viewunitinfoplan?id=${companyId}`)
} else if (this.planData.planMode == 3) { //预案planMode=3时, 第三方网址' } else if (this.planData.planMode == 3) {
this.showtype = 2 //预案planMode=3时, 第三方网址'
this.showtype = 2;
this.http.get(`/api/Plans/${data.companyId}`).subscribe((data: any) => { this.http.get(`/api/Plans/${data.companyId}`).subscribe((data: any) => {
data && data.company ? this.compantData = data.company : null data && data.company ? (this.compantData = data.company) : null;
}) });
//this.dialog.open(show3D,{width:'1350px',height:'700px',data:{url:data.url}}); //打开图片弹窗 //this.dialog.open(show3D,{width:'1350px',height:'700px',data:{url:data.url}}); //打开图片弹窗
this.thirdPartyURL = this.sanitizer.bypassSecurityTrustResourceUrl(data.url) this.thirdPartyURL = this.sanitizer.bypassSecurityTrustResourceUrl(
data.url
);
} }
} }
//打开三维预案弹窗 //打开三维预案弹窗
oopen3Dshow() { oopen3Dshow() {
this.dialog.open(recordshow3D, { width: '1650px', height: '850px', data: { url: this.thirdPartyURL, twoOrthree: this.twoOrthree } }); this.dialog.open(recordshow3D, {
width: "1650px",
height: "850px",
data: { url: this.thirdPartyURL, twoOrthree: this.twoOrthree },
});
} }
//判断iframe是否加载完成 //判断iframe是否加载完成
iftrue=true iftrue = true;
ifranmeLoad() { ifranmeLoad() {
var iframe = document.getElementById("myiframe"); var iframe = document.getElementById("myiframe");
iframe.onload = function(){ iframe.onload = function () {};
this.iftrue = !this.iftrue;
} }
this.iftrue=!this.iftrue
}
} }
@Component({ @Component({
selector: 'app-wait-examineer-show3D', selector: "app-wait-examineer-show3D",
templateUrl: './show3D.html', templateUrl: "./show3D.html",
styleUrls: ['./plan-record.component.scss'] styleUrls: ["./plan-record.component.scss"],
}) })
export class recordshow3D { export class recordshow3D {
constructor(private sanitizer: DomSanitizer, public dialogRef: MatDialogRef<recordshow3D>, @Inject(MAT_DIALOG_DATA) public data, public dialog: MatDialog) { } constructor(
private sanitizer: DomSanitizer,
public dialogRef: MatDialogRef<recordshow3D>,
@Inject(MAT_DIALOG_DATA) public data,
public dialog: MatDialog
) {}
ngOnInit(): void { ngOnInit(): void {
// console.log(this.data) // console.log(this.data)
this.threedUrl = this.sanitizer.bypassSecurityTrustResourceUrl(this.data.url.changingThisBreaksApplicationSecurity) this.threedUrl = this.sanitizer.bypassSecurityTrustResourceUrl(
this.data.url.changingThisBreaksApplicationSecurity
);
} }
threedUrl threedUrl;
} }

92
src/app/plan-audit/wait-examineer/wait-examineer.component.html

@ -17,18 +17,18 @@
<span>类型:</span> <span>类型:</span>
<mat-form-field> <mat-form-field>
<mat-select placeholder='请选择单位类型' name="unittype" [(ngModel)]="projectlevel"> <mat-select placeholder='请选择单位类型' name="unittype" [(ngModel)]="projectlevel">
<!-- <mat-option value="1">Ⅰ级预案</mat-option> <mat-option value="1">Ⅰ级预案</mat-option>
<mat-option value="2">Ⅱ级预案</mat-option> --> <mat-option value="2">Ⅱ级预案</mat-option>
<mat-option value="3">Ⅲ级预案</mat-option> <mat-option value="3">Ⅲ级预案</mat-option>
<mat-option value="4">Ⅳ级预案</mat-option> <mat-option value="4">Ⅳ级预案</mat-option>
<mat-option value="5">Ⅴ级预案</mat-option> <mat-option value="5">Ⅴ级预案</mat-option>
<!-- <mat-option value="6">应急预案(国家级)</mat-option> <mat-option value="6">应急预案(国家级)</mat-option>
<mat-option value="7">应急预案(市级)</mat-option> --> <mat-option value="7">应急预案(市级)</mat-option>
<mat-option value="8">类型预案</mat-option> <mat-option value="8">类型预案</mat-option>
<mat-option value="11">重点单位</mat-option> <mat-option value="11">重点单位</mat-option>
<!-- <mat-option value="12">消防水源</mat-option> <mat-option value="12">消防水源</mat-option>
<mat-option value="13">消防力量</mat-option> <mat-option value="13">消防力量</mat-option>
<mat-option value="14">联动力量</mat-option> --> <mat-option value="14">联动力量</mat-option>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
<span class="bzjb">编制级别:</span> <span class="bzjb">编制级别:</span>
@ -55,19 +55,18 @@
<mat-option value="16">文本预案</mat-option> <mat-option value="16">文本预案</mat-option>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
<button mat-raised-button color="primary" type="submit" class="find">查询</button>
<button mat-raised-button color="primary" (click)='record()'><img src="../../../assets/images/refresh.png">
重置</button>
</div> </div>
</div>
<div class="btnbox">
<button mat-raised-button color="primary" type="submit">查询</button>
<button mat-raised-button color="primary" type="button" (click)='record()'>重置</button>
</div> </div>
</form> </form>
</div> </div>
<div class="tablediv"> <div class="tablediv">
<table cellspacing="0" cellpadding="0" style="margin-top: 10px;margin-bottom: 5px;"> <table class="theader" cellspacing="0" cellpadding="0" style="margin-top: 10px;margin-bottom: 5px;">
<thead> <thead>
<th style="width: 10%;margin-left: 5px;">状态</th> <th style="width: 10%;margin-left: 5px;">状态</th>
<th style="width: 10%;">类型</th> <th style="width: 10%;">类型</th>
@ -84,14 +83,20 @@
<table cellspacing="0" cellpadding="0" id="table"> <table cellspacing="0" cellpadding="0" id="table">
<tr [ngClass]="{'selectedTr': item.id == id}" *ngFor="let item of tableDate;let key = index" <tr [ngClass]="{'selectedTr': item.id == id}" *ngFor="let item of tableDate;let key = index"
(click)='radioClick($event,item)'> (click)='radioClick($event,item)'>
<td style="width: 10%;" [ngClass]="{'green': item.itemMaintenanceState == '0','yellow':item.itemMaintenanceState != '0'}"> <td style="width: 10%;"
[ngClass]="{'green': item.itemMaintenanceState == '0','yellow':item.itemMaintenanceState != '0'}">
<mat-checkbox color="primary" (change)='radioClick($event,item)' style="float: left;margin-bottom:'2px'"> <mat-checkbox color="primary" (change)='radioClick($event,item)' style="float: left;margin-bottom:'2px'">
</mat-checkbox> </mat-checkbox>
{{item.itemMaintenanceState=='0'?'新增':'维护'}}</td> {{item.itemMaintenanceState=='0'?'新增':'维护'}}
</td>
<td style="width: 10%;"> <td style="width: 10%;">
{{item.contentType=='1'?'Ⅰ级预案':item.contentType=='2'?'Ⅱ级预案':item.contentType=='3'?'Ⅲ级预案':item.contentType=='4'?'Ⅳ级预案':item.contentType=='5'? {{item.contentType=='1'?'Ⅰ级预案':item.contentType=='2'?'Ⅱ级预案':item.contentType=='3'?'Ⅲ级预案':item.contentType=='4'?'Ⅳ级预案':item.contentType=='5'?
'Ⅴ级预案':item.contentType=='6'?'应急预案(国家级)':item.contentType=='7'?'应急预案(市级)':item.contentType=='8'?'类型预案':item.contentType=='11'?'重点单位':item.contentType=='12'?'水源':item.contentType=='13'?'消防力量':item.contentType=='14'?'联动力量':'未知'}} 'Ⅴ级预案':item.contentType=='6'?'应急预案(国家级)':item.contentType=='7'?'应急预案(市级)':item.contentType=='8'?'类型预案':(item.contentType=='11'
&&item.itemObj&&
item.itemObj?.isFollowed)?'重点单位':(item.contentType=='11'
&&item.itemObj&&
!item.itemObj?.isFollowed)?'一般单位':(item.contentType=='11'
&&!item.itemObj)?'已删除':item.contentType=='12'?'水源':item.contentType=='13'?'消防力量':item.contentType=='14'?'联动力量':'未知'}}
</td> </td>
<td style="width: 10%;"> <td style="width: 10%;">
{{item.planType=='1'?'二维预案':item.planType=='2'?'三维预案':item.planType=='4'?'其它预案':item.planType=='16'?'文本预案':''}} {{item.planType=='1'?'二维预案':item.planType=='2'?'三维预案':item.planType=='4'?'其它预案':item.planType=='16'?'文本预案':''}}
@ -101,18 +106,33 @@
[ngClass]="{'green': item.operation == '0','red':item.operation == '2','yellow':item.operation == '1'}"> [ngClass]="{'green': item.operation == '0','red':item.operation == '2','yellow':item.operation == '1'}">
{{item.operation=='0'?'新增':item.operation=='1'?'更新':'删除'}}</td> {{item.operation=='0'?'新增':item.operation=='1'?'更新':'删除'}}</td>
<td style="width: 20%;">{{item.organizationName}}</td> <td style="width: 20%;">{{item.organizationName}}</td>
<td style="width: 10%;" <!-- <td style="width: 10%;"
[ngClass]="{'green': item.verifyState == '1'||item.verifyState == '4','red':item.verifyState == '2'||item.verifyState == '5'}"> [ngClass]="{'green': item.verifyState == '1'||item.verifyState == '4','red':item.verifyState == '2'||item.verifyState == '5'}">
{{item.verifyState=='0'?'待初审':item.verifyState=='1'? {{item.verifyState=='0'?'待初审':item.verifyState=='1'?
'初审通过':item.verifyState=='2'?'初审驳回':item.verifyState=='3'?'待终审':item.verifyState=='4'?'终审通过':'终审驳回'}} '初审通过':item.verifyState=='2'?'初审驳回':item.verifyState=='3'?'待终审':item.verifyState=='4'?'终审通过':'终审驳回'}} -->
<td style="width: 10%;">
<span
*ngIf="item.verifyState=='0' && (item.contentType == 3 || item.contentType == 4 || item.contentType == 5) && item.itemObj?.isFollowed">待初审</span>
<span
*ngIf="item.verifyState=='0' && (item.contentType !== 3 && item.contentType !== 4 && item.contentType !== 5)">待初审</span>
<span
*ngIf="item.verifyState=='0' && (item.contentType == 3 || item.contentType == 4 || item.contentType == 5) && !item.itemObj?.isFollowed">待终审</span>
<span class="green" *ngIf="item.verifyState=='1'">初审通过</span>
<span class="red" *ngIf="item.verifyState=='2'">初审驳回</span>
<span *ngIf="item.verifyState=='3'">待终审</span>
<span class="green" *ngIf="item.verifyState=='4'">终审通过</span>
<span class="red" *ngIf="item.verifyState=='5'">终审驳回</span>
</td> </td>
<td style="width: 7%;">{{item.creatorName}}</td> <td style="width: 7%;">{{item.creatorName}}</td>
<td style="width: 13%;">{{item.createTime|date:'yyyy-MM-dd'}}</td> <td style="width: 13%;">{{item.createTime|date:'yyyy-MM-dd'}}</td>
</tr> </tr>
</table> </table>
<mat-paginator [length]="count" [pageIndex]="PageNumber - 1" [pageSize]="10" (page)="chagePage($event)">
</mat-paginator>
</div> </div>
</div>
<div class="mask" *ngIf="isTableData">
<mat-spinner [diameter]="30"></mat-spinner>
</div> </div>
</div> </div>
@ -129,8 +149,6 @@
</div> </div>
<div class="rightheadone" style="display: block;" *ngIf="showtype == 3"> <div class="rightheadone" style="display: block;" *ngIf="showtype == 3">
<button mat-raised-button color="primary" (click)="buttonChange()">{{isallDate?'显示变更数据':'显示完整数据'}} </button> <button mat-raised-button color="primary" (click)="buttonChange()">{{isallDate?'显示变更数据':'显示完整数据'}} </button>
<!-- <button mat-raised-button *ngIf="isallDate" style="background-color: #FFCC00; color: #FFFFFF;"
(click)="preview()"><img src="../../../assets/images/change.png" style="margin-bottom: 2px;"> 预览得分</button> -->
</div> </div>
</div> </div>
@ -139,7 +157,9 @@
<div *ngIf="showtype == 3" id="firefacilities" style="margin: 10px;"> <div *ngIf="showtype == 3" id="firefacilities" style="margin: 10px;">
<mat-accordion *ngIf="selectedItem.differentContent" class="tableContent" multi> <mat-accordion *ngIf="selectedItem.differentContent" class="tableContent" multi>
<!-- 基本信息 --> <!-- 基本信息 -->
<mat-expansion-panel *ngIf="this.differentContentOfUnitInfo && this.differentContentOfUnitInfo.length != 0 && this.differentContentOfUnitInfo[0].childrens.length != 0" expanded> <mat-expansion-panel
*ngIf="this.differentContentOfUnitInfo && this.differentContentOfUnitInfo.length != 0 && this.differentContentOfUnitInfo[0].childrens.length != 0"
expanded>
<mat-expansion-panel-header collapsedHeight='40px' expandedHeight='40px' class="panelhead" <mat-expansion-panel-header collapsedHeight='40px' expandedHeight='40px' class="panelhead"
style="background-color: #2196F3;"> style="background-color: #2196F3;">
<mat-panel-title style="font-size: 16px;color: #FFFFFF;"> <mat-panel-title style="font-size: 16px;color: #FFFFFF;">
@ -161,9 +181,11 @@
<ng-container *ngIf="i.propertyName == 'imageUrl'; else elseTemplate"> <ng-container *ngIf="i.propertyName == 'imageUrl'; else elseTemplate">
<td> <td>
<span class="spantext" style="vertical-align: top;"></span> <span class="spantext" style="vertical-align: top;"></span>
<img (click)="lookImg(i.oldValue,true)" class="spantext" style="width: 150px;height: 105px;" [src]="i.oldValue ? i.oldValue : '/assets/images/noImg.png'" alt=""> <img (click)="lookImg(i.oldValue,true)" class="spantext" style="width: 150px;height: 105px;"
[src]="i.oldValue ? i.oldValue : '/assets/images/noImg.png'" alt="">
<span class="spantext" style="vertical-align: top;">变更为</span> <span class="spantext" style="vertical-align: top;">变更为</span>
<img (click)="lookImg(i.newValue,true)" class="spantext" style="width: 150px;height: 105px;" [src]="i.newValue ? i.newValue : '/assets/images/noImg.png'" alt=""> <img (click)="lookImg(i.newValue,true)" class="spantext" style="width: 150px;height: 105px;"
[src]="i.newValue ? i.newValue : '/assets/images/noImg.png'" alt="">
</td> </td>
</ng-container> </ng-container>
<ng-template #elseTemplate> <ng-template #elseTemplate>
@ -191,7 +213,9 @@
</div> </div>
</mat-expansion-panel> </mat-expansion-panel>
<!-- 建筑信息 --> <!-- 建筑信息 -->
<mat-expansion-panel *ngIf="this.differentContentOfBuildingsInfo && this.differentContentOfBuildingsInfo.childrens.length != 0" expanded> <mat-expansion-panel
*ngIf="this.differentContentOfBuildingsInfo && this.differentContentOfBuildingsInfo.childrens.length != 0"
expanded>
<mat-expansion-panel-header collapsedHeight='40px' expandedHeight='40px' class="panelhead" <mat-expansion-panel-header collapsedHeight='40px' expandedHeight='40px' class="panelhead"
style="background-color: #2196F3;"> style="background-color: #2196F3;">
<mat-panel-title style="font-size: 16px;color: #FFFFFF;"> <mat-panel-title style="font-size: 16px;color: #FFFFFF;">
@ -227,7 +251,8 @@
</div> </div>
</mat-expansion-panel> </mat-expansion-panel>
<!-- 功能分区 --> <!-- 功能分区 -->
<mat-expansion-panel *ngIf="this.differentContentOfFunction && this.differentContentOfFunction.length != 0" expanded> <mat-expansion-panel *ngIf="this.differentContentOfFunction && this.differentContentOfFunction.length != 0"
expanded>
<mat-expansion-panel-header collapsedHeight='40px' expandedHeight='40px' class="panelhead" <mat-expansion-panel-header collapsedHeight='40px' expandedHeight='40px' class="panelhead"
style="background-color: #2196F3;"> style="background-color: #2196F3;">
<mat-panel-title style="font-size: 16px;color: #FFFFFF;"> <mat-panel-title style="font-size: 16px;color: #FFFFFF;">
@ -259,7 +284,9 @@
</div> </div>
</mat-expansion-panel> </mat-expansion-panel>
<!-- 实景图 --> <!-- 实景图 -->
<mat-expansion-panel *ngIf="this.differentContentOfPicture && this.differentContentOfPicture.length != 0 && this.differentContentOfPicture[0].childrens.length != 0" expanded> <mat-expansion-panel
*ngIf="this.differentContentOfPicture && this.differentContentOfPicture.length != 0 && this.differentContentOfPicture[0].childrens.length != 0"
expanded>
<mat-expansion-panel-header collapsedHeight='40px' expandedHeight='40px' class="panelhead" <mat-expansion-panel-header collapsedHeight='40px' expandedHeight='40px' class="panelhead"
style="background-color: #2196F3;"> style="background-color: #2196F3;">
<mat-panel-title style="font-size: 16px;color: #FFFFFF;"> <mat-panel-title style="font-size: 16px;color: #FFFFFF;">
@ -286,7 +313,8 @@
<tr> <tr>
<th>新增图片</th> <th>新增图片</th>
<td> <td>
<img (click)="lookImg(i.imageUrl)" *ngFor="let i of item.newValue" [src]="'/api/Objects/PlanPlatform/'+i.imageUrl" alt=""> <img (click)="lookImg(i.imageUrl)" *ngFor="let i of item.newValue"
[src]="'/api/Objects/PlanPlatform/'+i.imageUrl" alt="">
</td> </td>
</tr> </tr>
</table> </table>
@ -318,13 +346,15 @@
<!-- 点击每条表格右边显示内容 --> <!-- 点击每条表格右边显示内容 -->
<div style="height: 100%;" *ngIf="isallDate"> <div style="height: 100%;" *ngIf="isallDate">
<!-- word文档 --> <!-- 在新编辑或自定义预案 -->
<div class="word" *ngIf="showtype == 0"> <div class="word" *ngIf="showtype == 0">
<div class="shadow" *ngIf="!iftrue"> <div class="shadow" *ngIf="!iftrue">
<mat-spinner></mat-spinner> <mat-spinner [diameter]="30"></mat-spinner>
</div> </div>
<iframe [src]='iframeSrc' (load)='ifranmeLoad()' id="myiframe"></iframe> <iframe [src]='iframeSrc' (load)='ifranmeLoad()' id="myiframe"></iframe>
</div> </div>
<!-- 图片 -->
<img [src]="src" alt="" *ngIf="showtype == 'img'">
<!-- 全景图 --> <!-- 全景图 -->
<div id="viewer" *ngIf="showtype == 1"></div> <div id="viewer" *ngIf="showtype == 1"></div>
<div class="twoD" *ngIf="showtype == 2"> <div class="twoD" *ngIf="showtype == 2">

181
src/app/plan-audit/wait-examineer/wait-examineer.component.scss

@ -2,72 +2,95 @@
height: 100%; height: 100%;
width: 100%; width: 100%;
display: flex; display: flex;
img { img {
cursor: pointer; cursor: pointer;
} }
.boxleft { .boxleft {
height: 100%; height: 100%;
width: 45%; width: 45%;
background-color: #ffffff; background-color: #ffffff;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
//overflow: auto; overflow: hidden;
position: relative;
.lefthead { .lefthead {
height: 30%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center;
form{
width: 100%;
}
.headdiv { .headdiv {
@media screen and (min-device-width: 1400px) { @media screen and (min-device-width: 1400px) {
margin: 0 0 0 28px; margin: 0 0 0 28px;
} }
@media screen and (max-device-width: 1400px) and (min-device-width: 1200px) { @media screen and (max-device-width: 1400px) and (min-device-width: 1200px) {
margin-left: 15px; margin-left: 15px;
} }
@media screen and (max-device-width: 1200px) { @media screen and (max-device-width: 1200px) {
margin-left: 5px; margin-left: 5px;
} }
height: 40px; height: 40px;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center;
.radio { .radio {
height: 10px; height: 10px;
} }
span { span {
@media screen and (min-device-width: 1400px) { @media screen and (min-device-width: 1400px) {
font-size: 16px; font-size: 16px;
} }
@media screen and (max-device-width: 1400px) and (min-device-width: 1200px) { @media screen and (max-device-width: 1400px) and (min-device-width: 1200px) {
font-size: 16px; font-size: 16px;
} }
@media screen and (max-device-width: 1200px) { @media screen and (max-device-width: 1200px) {
font-size: 14px; font-size: 14px;
} }
margin-left: 3px; margin-left: 3px;
} }
input { input {
position: relative; position: relative;
@media screen and (min-device-width: 1400px) { @media screen and (min-device-width: 1400px) {
margin-left: 50px; margin-left: 40px;
top: 6px;
} }
@media screen and (max-device-width: 1200px) { @media screen and (max-device-width: 1200px) {
margin-left: 8px; margin-left: 8px;
top: 4px;
} }
@media screen and (max-device-width: 1400px) and (min-device-width: 1200px) { @media screen and (max-device-width: 1400px) and (min-device-width: 1200px) {
margin-left: 8px; margin-left: 8px;
top: 6px;
} }
} }
.count { .count {
@media screen and (min-device-width: 1400px) { @media screen and (min-device-width: 1400px) {
margin-left: 110px; margin-left: 110px;
} }
@media screen and (max-device-width: 1200px) { @media screen and (max-device-width: 1200px) {
margin-left: 20px; margin-left: 20px;
position: relative; position: relative;
bottom: 3px; bottom: 3px;
} }
@media screen and (max-device-width: 1400px) and (min-device-width: 1200px) { @media screen and (max-device-width: 1400px) and (min-device-width: 1200px) {
margin-left: 20px; margin-left: 20px;
/* position: relative; /* position: relative;
@ -75,31 +98,39 @@
} }
} }
} }
.headthree { .headthree {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.bzjb { .bzjb {
@media screen and (min-device-width: 1400px) { @media screen and (min-device-width: 1400px) {
margin-left: 100px; margin-left: 100px;
} }
} }
.find { .find {
@media screen and (min-device-width: 1400px) { @media screen and (min-device-width: 1400px) {
margin-left: 200px; margin-left: 80px;
} }
} }
@media screen and (min-device-width: 1400px) { @media screen and (min-device-width: 1400px) {
margin-left: 30px; margin-left: 30px;
} }
@media screen and (max-device-width: 1200px) { @media screen and (max-device-width: 1200px) {
margin-left: 7px; margin-left: 7px;
font-size: 14px; font-size: 14px;
mat-form-field { mat-form-field {
width: 120px; width: 120px;
} }
} }
@media screen and (max-device-width: 1400px) and (min-device-width: 1200px) { @media screen and (max-device-width: 1400px) and (min-device-width: 1200px) {
margin-left: 15px; margin-left: 15px;
//font-size: 14px; //font-size: 14px;
mat-form-field { mat-form-field {
width: 140px; width: 140px;
@ -108,64 +139,64 @@
button { button {
@media screen and (min-device-width: 1400px) { @media screen and (min-device-width: 1400px) {
margin-left: 30px; margin-left: 40px;
font-size: 16px; font-size: 13px;
width: 80px; width: 65px;
height: 36px; height: 34px;
} }
@media screen and (max-device-width: 1400px) { @media screen and (max-device-width: 1400px) {
margin-left: 20px; margin-left: 20px;
font-size: 14px; font-size: 14px;
} }
} }
img { img {
@media screen and (min-device-width: 1400px) { @media screen and (min-device-width: 1400px) {
height: 14px; height: 14px;
width: 14px; width: 14px;
} }
@media screen and (max-device-width: 1400px) { @media screen and (max-device-width: 1400px) {
height: 12px; height: 12px;
width: 12px; width: 12px;
} }
} }
} }
.btnbox{
display: flex;
justify-content: center;
align-items: center;
button{
margin: 0 6px;
}
}
} }
.tablediv { .tablediv {
width: 100%; width: 100%;
height: 62%; flex: 1;
.tbodycss { overflow: hidden;
overflow-y: auto; display: flex;
flex-direction: column;
height: 100%; .theader {
width: 100%;
.selectedTr {
background-color: #b3d3ee;
}
td {
font-weight: 10;
@media screen and (min-device-width: 1200px) {
font-size: 16px;
}
@media screen and (max-device-width: 1200px) {
font-size: 14px;
}
}
}
table {
margin-left: 10px; margin-left: 10px;
margin-right: 10px; margin-right: 10px;
width: 97.5%; width: 97.5%;
//margin-bottom: 10px;
thead { thead {
height: 48px; height: 48px;
color: #ffffff; color: #ffffff;
background-color: #2196f3; background-color: #2196f3;
//font-size: 10px;
th { th {
font-weight: 10; font-weight: 10;
@media screen and (min-device-width: 1200px) { @media screen and (min-device-width: 1200px) {
font-size: 16px; font-size: 16px;
} }
@media screen and (max-device-width: 1200px) { @media screen and (max-device-width: 1200px) {
font-size: 14px; font-size: 14px;
} }
@ -176,11 +207,50 @@
background: #fafafa; background: #fafafa;
} }
} }
.tbodycss {
flex: 1;
width: 100%;
overflow-y: auto;
box-sizing: border-box;
padding-left: 15px;
.selectedTr {
background-color: #b3d3ee;
}
td {
font-weight: 10;
@media screen and (min-device-width: 1200px) {
font-size: 16px;
}
@media screen and (max-device-width: 1200px) {
font-size: 14px;
}
}
} }
} }
.mask {
position: absolute;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.2);
display: flex;
justify-content: center;
align-items: center;
}
}
.boxright { .boxright {
height: 100%; height: 100%;
width: 53%; width: 53%;
@media screen and (max-device-width: 1400px) { @media screen and (max-device-width: 1400px) {
overflow-y: auto; overflow-y: auto;
} }
@ -190,29 +260,36 @@
margin-left: 10px; margin-left: 10px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.company { .company {
//margin-left: 20px; //margin-left: 20px;
@media screen and (min-device-width: 1400px) { @media screen and (min-device-width: 1400px) {
overflow-y: auto; overflow-y: auto;
} }
flex: 1; flex: 1;
//overflow-y: auto; //overflow-y: auto;
margin-top: 10px; margin-top: 10px;
} }
.righthead { .righthead {
width: 100%; width: 100%;
display: flex; display: flex;
height: 50px; height: 50px;
align-items: center; align-items: center;
flex-direction: row-reverse; flex-direction: row-reverse;
button { button {
margin-left: 10px; margin-left: 10px;
font-size: 16px; font-size: 16px;
} }
.rightheadone { .rightheadone {
width: 40%; width: 40%;
margin-right: 7%; margin-right: 7%;
} }
.rightheadtwo { .rightheadtwo {
width: 60%; width: 60%;
margin-right: 2%; margin-right: 2%;
@ -222,6 +299,7 @@
.word { .word {
width: 100%; width: 100%;
height: 100%; height: 100%;
.shadow { .shadow {
height: 95%; height: 95%;
width: 97%; width: 97%;
@ -232,12 +310,14 @@
z-index: 998; z-index: 998;
background-color: #FFFFFF; background-color: #FFFFFF;
opacity: 0.6; opacity: 0.6;
mat-spinner { mat-spinner {
position: relative; position: relative;
top: 40%; top: 40%;
left: 40%; left: 40%;
} }
} }
iframe { iframe {
height: 95%; height: 95%;
width: 97%; width: 97%;
@ -246,11 +326,13 @@
border: medium none; border: medium none;
} }
} }
#viewer { #viewer {
margin: 10px 10px 10px 10px; margin: 10px 10px 10px 10px;
width: 97%; width: 97%;
height: 93%; height: 93%;
} }
.waterAudit, .waterAudit,
.fireForceAudit, .fireForceAudit,
.LinkageForcesAudit { .LinkageForcesAudit {
@ -259,64 +341,81 @@
height: 100%; height: 100%;
box-sizing: border-box; box-sizing: border-box;
} }
.emptyContent { .emptyContent {
width: 100%; width: 100%;
text-align: center; text-align: center;
} }
} }
} }
th, th,
td { td {
height: 43px; height: 43px;
@media screen and (min-device-width: 1400px) { @media screen and (min-device-width: 1400px) {
font-size: 16px; font-size: 16px;
} }
@media screen and (max-device-width: 1400px) { @media screen and (max-device-width: 1400px) {
font-size: 14px; font-size: 14px;
} }
text-align: center; text-align: center;
//white-space: nowrap; //white-space: nowrap;
} }
.green { .green {
color: #00c756; color: #00c756;
} }
.red { .red {
color: #ff4d4d; color: #ff4d4d;
} }
.yellow { .yellow {
color: #FFC94B; color: #FFC94B;
} }
.accordingin { .accordingin {
margin: 5px; margin: 5px;
.panelhead { .panelhead {
background-color: #e8f4fe; background-color: #e8f4fe;
color: #2196f3; color: #2196f3;
font-size: 16px; font-size: 16px;
span { span {
margin-left: 10px; margin-left: 10px;
} }
} }
table { table {
margin: 5px 0; margin: 5px 0;
width: 100%; width: 100%;
th { th {
background-color: #fafafa; background-color: #fafafa;
width: 30%; width: 30%;
font-size: 16px; font-size: 16px;
text-align: right; text-align: right;
} }
td { td {
text-align: left; text-align: left;
font-size: 16px; font-size: 16px;
margin-left: 3px; margin-left: 3px;
.spantext { .spantext {
margin-left: 7px; margin-left: 7px;
} }
.buleColor { .buleColor {
color: #2196f3; color: #2196f3;
} }
} }
} }
.addFiles { .addFiles {
tr { tr {
td { td {
@ -328,10 +427,12 @@ td {
} }
} }
} }
.onebuilding { .onebuilding {
display: flex; display: flex;
margin: 5px 0; margin: 5px 0;
width: 100%; width: 100%;
.accordingleft { .accordingleft {
background-color: #fafafa; background-color: #fafafa;
width: 30%; width: 30%;
@ -339,14 +440,17 @@ td {
font-size: 16px; font-size: 16px;
text-align: right; text-align: right;
} }
.accordingright { .accordingright {
margin: 7px; margin: 7px;
height: 100px; height: 100px;
font-size: 16px; font-size: 16px;
img { img {
margin-left: 10px; margin-left: 10px;
//height: 80px; //height: 80px;
} }
span { span {
margin-left: 10px; margin-left: 10px;
position: relative; position: relative;
@ -355,6 +459,7 @@ td {
} }
} }
} }
.echarts { .echarts {
width: 480px; width: 480px;
height: 304px; height: 304px;
@ -365,12 +470,14 @@ td {
top: 13%; top: 13%;
left: 55%; left: 55%;
z-index: 100; z-index: 100;
.bar { .bar {
height: 100%; height: 100%;
width: 40%; width: 40%;
opacity: 1; opacity: 1;
//margin: 40px 30px; //margin: 40px 30px;
} }
.zhu { .zhu {
margin-bottom: 100px; margin-bottom: 100px;
margin-right: 20px; margin-right: 20px;
@ -379,15 +486,18 @@ td {
opacity: 1; opacity: 1;
} }
} }
.twoD { .twoD {
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: left; align-items: left;
.planBox { .planBox {
margin: 30px 30px; margin: 30px 30px;
color: black; color: black;
:first-child { :first-child {
margin-right: 10px; margin-right: 10px;
} }
@ -399,6 +509,7 @@ td {
width: 6px; width: 6px;
background-color: white; background-color: white;
} }
::-webkit-scrollbar-thumb { ::-webkit-scrollbar-thumb {
background-color: #2196f3; background-color: #2196f3;
} }
@ -408,8 +519,10 @@ td {
height: 100%; height: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.remarkhead { .remarkhead {
width: 100%; width: 100%;
span { span {
font-size: 20px; font-size: 20px;
text-align: center; text-align: center;
@ -417,18 +530,22 @@ td {
margin-left: 40%; margin-left: 40%;
} }
} }
.remarktext { .remarktext {
width: 100%; width: 100%;
margin-top: 20px; margin-top: 20px;
textarea { textarea {
width: 420px; width: 420px;
height: 110px; height: 110px;
outline: none; outline: none;
} }
} }
.remarkbottom { .remarkbottom {
width: 100%; width: 100%;
margin-top: 22px; margin-top: 22px;
button { button {
width: 100px; width: 100px;
height: 36px; height: 36px;

1067
src/app/plan-audit/wait-examineer/wait-examineer.component.ts

File diff suppressed because it is too large Load Diff

2
src/app/plan-audit/water-audit/water-audit.component.ts

@ -38,7 +38,7 @@ export class WaterAuditComponent implements OnInit {
// 将 markers 添加到地图 // 将 markers 添加到地图
this.map.add(this.newPositionMarker); this.map.add(this.newPositionMarker);
}else{ }else{
this.map.setCity('唐山市'); this.map.setCity('上海市');
} }
}, 0); }, 0);

469
src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html

@ -1,13 +1,17 @@
<div class="bigbox"> <div class="bigbox">
<div class="titlebox" *ngIf="pattern == 'edit'"> <div class="titlebox" *ngIf="pattern == 'edit'">
<div class="titleitembox" cdkDropList cdkDropListOrientation="horizontal" (cdkDropListDropped)="drop($event)"> <div class="titleitembox" cdkDropList cdkDropListOrientation="horizontal" (cdkDropListDropped)="drop($event)">
<div cdkDrag class="item" *ngFor="let item of planTemplateData;let key = index" (click)="clickTitleItem(item)" <div cdkDrag class="item" *ngFor="let item of planTemplateData;let key = index"
[ngClass]="{'selectedItem': selectedItem == item.groupName||item.groupName=='新建'}" [title]="item.groupName" (click)="clickTitleItem(item)"
[cdkDragDisabled]="item.groupName == '封面'" [style.display]="item.completed==true?'block':'none'"> [ngClass]="{'selectedItem': selectedItem == item.groupName||item.groupName=='新建'}"
[title]="item.groupName" [cdkDragDisabled]="item.groupName == '封面'"
[style.display]="item.completed==true?'block':'none'">
<img src="../../../assets/images/add.png" *ngIf="item.groupName=='新建'"> <img src="../../../assets/images/add.png" *ngIf="item.groupName=='新建'">
{{item.groupName!='新建'?key + 1:''}}.{{item.groupName}} {{item.groupName!='新建'?key + 1:''}}.{{item.groupName}}
<img style="height: 38%;" src="../../../assets/images/update.png" *ngIf="item.new!=undefined" (click)='upName(key,item.groupName)' > <img style="height: 38%;" src="../../../assets/images/update.png" *ngIf="item.new!=undefined"
<img style="height: 38%;margin-left: 2px;" src="../../../assets/images/deleteblue.png" *ngIf="item.new!=undefined" (click)='delName(key)' > (click)='upName(key,item.groupName)'>
<img style="height: 38%;margin-left: 2px;" src="../../../assets/images/deleteblue.png"
*ngIf="item.new!=undefined" (click)='delName(key)'>
</div> </div>
</div> </div>
<div class="btnbox"> <div class="btnbox">
@ -32,7 +36,8 @@
</div> </div>
<div class="leftbox" <div class="leftbox"
*ngIf="pattern == 'edit' && (selectedItem == '重点图示' || selectedItem == '交通水源' || selectedItem == '预案附件' || selectedItem == '单位概况')||(selectedItem!='灾情设定'&&selectedItem!='力量调集'&&selectedItem!='组织指挥'&&selectedItem!='作战行动'&&selectedItem!='社会联动'&&selectedItem!='勤务保障'&&selectedItem!='特别警示'&&selectedItem!='辅助决策'&&selectedItem!='处置要点'&&tuTrue)"> *ngIf="pattern == 'edit' && (selectedItem == '重点图示' || selectedItem == '交通水源' || selectedItem == '预案附件' || selectedItem == '单位概况')||(selectedItem!='灾情设定'&&selectedItem!='力量调集'&&selectedItem!='组织指挥'&&selectedItem!='作战行动'&&selectedItem!='社会联动'&&selectedItem!='勤务保障'&&selectedItem!='特别警示'&&selectedItem!='辅助决策'&&selectedItem!='处置要点'&&tuTrue)">
<div *ngIf="selectedItem == '重点图示'||(selectedItem!='灾情设定'&&selectedItem!='力量调集'&&selectedItem!='组织指挥'&&selectedItem!='作战行动'&&selectedItem!='社会联动'&&selectedItem!='勤务保障'&&selectedItem!='特别警示'&&selectedItem!='辅助决策'&&selectedItem!='处置要点'&&tuTrue)" class="leftKeyImg"> <div *ngIf="selectedItem == '重点图示'||(selectedItem!='灾情设定'&&selectedItem!='力量调集'&&selectedItem!='组织指挥'&&selectedItem!='作战行动'&&selectedItem!='社会联动'&&selectedItem!='勤务保障'&&selectedItem!='特别警示'&&selectedItem!='辅助决策'&&selectedItem!='处置要点'&&tuTrue)"
class="leftKeyImg">
<div class="keyImgTitle"> <div class="keyImgTitle">
重点图示 重点图示
</div> </div>
@ -193,7 +198,8 @@
</div> </div>
</div> </div>
<div class="leftnew" *ngIf="pattern == 'edit' && ( selectedItem == '组织指挥' || selectedItem == '社会联动' || selectedItem == '勤务保障'|| selectedItem == '辅助决策')"> <div class="leftnew"
*ngIf="pattern == 'edit' && ( selectedItem == '组织指挥' || selectedItem == '社会联动' || selectedItem == '勤务保障'|| selectedItem == '辅助决策')">
<div class="newHead"> <div class="newHead">
<span>模板列表</span> <span>模板列表</span>
</div> </div>
@ -207,20 +213,20 @@
</div> </div>
<div class="searchText"> <div class="searchText">
<div class="queryField ordiv" *ngIf="searchType=='1'"> <div class="queryField ordiv" *ngIf="searchType=='1'">
<input readonly placeholder="请输入组织" autocomplete="off" [(ngModel)]="js" name="js" (focus)="openorganizationbox()"> <input readonly placeholder="请输入组织" autocomplete="off" [(ngModel)]="js" name="js"
(focus)="openorganizationbox()">
<!-- <mat-checkbox style="margin-left: 6px;" [(ngModel)]="jscheck" name="jscheck">包含下级</mat-checkbox> --> <!-- <mat-checkbox style="margin-left: 6px;" [(ngModel)]="jscheck" name="jscheck">包含下级</mat-checkbox> -->
<div class="organizationbox" *ngIf="isorganizationbox"> <div class="organizationbox" *ngIf="isorganizationbox">
<div (click)="closediv()" class="closediv"><mat-icon>clear</mat-icon></div> <div (click)="closediv()" class="closediv"><mat-icon>clear</mat-icon></div>
<mat-tree [dataSource]="dataSource" [treeControl]="treeControl"> <mat-tree [dataSource]="dataSource" [treeControl]="treeControl">
<mat-tree-node *matTreeNodeDef="let node" matTreeNodePadding (click)='add(node)' class="organizationlist"> <mat-tree-node *matTreeNodeDef="let node" matTreeNodePadding (click)='add(node)'
class="organizationlist">
<button type="button" mat-icon-button disabled></button> <button type="button" mat-icon-button disabled></button>
<li>{{node.name}}</li> <li>{{node.name}}</li>
</mat-tree-node> </mat-tree-node>
<mat-tree-node *matTreeNodeDef="let node;when: hasChild" matTreeNodePadding (click)='add(node)' class="organizationlist"> <mat-tree-node *matTreeNodeDef="let node;when: hasChild" matTreeNodePadding
<button (click)='add(node)' class="organizationlist">
type="button" <button type="button" mat-icon-button matTreeNodeToggle
mat-icon-button
matTreeNodeToggle
[attr.aria-label]="'toggle ' + node.name"> [attr.aria-label]="'toggle ' + node.name">
<mat-icon class="mat-icon-rtl-mirror"> <mat-icon class="mat-icon-rtl-mirror">
{{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}} {{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}
@ -254,9 +260,7 @@
</div> </div>
<div class="fenye"> <div class="fenye">
<mat-paginator pageEvent [length]="length" <mat-paginator pageEvent [length]="length" [pageSize]="pageSize" [pageSizeOptions]="pageSizeOptions"
[pageSize]="pageSize"
[pageSizeOptions]="pageSizeOptions"
(page)="changePage($event)"> (page)="changePage($event)">
</mat-paginator> </mat-paginator>
@ -330,7 +334,7 @@
防火管辖: 防火管辖:
</div> </div>
<div> <div>
{{item.attribute.fireproofingAdminister}} {{orName}}
</div> </div>
</li> </li>
<li> <li>
@ -407,7 +411,7 @@
</div> </div>
<div style="text-align: center;margin-bottom:20px;"> <div style="text-align: center;margin-bottom:20px;">
<span>防火管辖:</span> <span>防火管辖:</span>
<span> {{item.attribute.fireproofingAdminister}}</span> <span> {{orName}}</span>
</div> </div>
<div style="text-align: center;margin-bottom:20px;"> <div style="text-align: center;margin-bottom:20px;">
<span>灭火责任队站:</span> <span>灭火责任队站:</span>
@ -433,13 +437,18 @@
</div> </div>
</div> </div>
</div> </div>
<div class="centerBox" <div class="centerBox"
*ngIf="item.groupName!='单位概况'&&item.groupName!='交通水源'&&item.groupName!='重点图示'&&item.groupName!='预案附件'&&item.groupName!='封面'"> *ngIf="item.groupName!='单位概况'&&item.groupName!='交通水源'&&item.groupName!='重点图示'&&item.groupName!='预案附件'&&item.groupName!='封面'">
<div class="titleItem"> <div class="titleItem">
<span *ngIf="item.new==undefined">{{item.groupName}}</span> <span *ngIf="item.new==undefined">{{item.groupName}}</span>
<input type="text" placeholder="请输入内容" [(ngModel)]="item.headName" *ngIf="item.new!=undefined&&pattern == 'edit'"> <input type="text" placeholder="请输入内容" [(ngModel)]="item.headName"
*ngIf="item.new!=undefined&&pattern == 'edit'">
<span *ngIf="item.new!=undefined&&pattern != 'edit'">{{item.headName}}</span> <span *ngIf="item.new!=undefined&&pattern != 'edit'">{{item.headName}}</span>
<img src="../../../assets/images/add.png" (click)='addAttribute(item.groupName)' *ngIf="pattern == 'edit'&&item.new!=undefined"> <img src="../../../assets/images/add.png" (click)='addAttribute(item.groupName)'
*ngIf="pattern == 'edit'&&item.new!=undefined">
</div> </div>
<div class="boxBody" *ngFor="let element of item.attribute;let i=index" style="height: 100%; <div class="boxBody" *ngFor="let element of item.attribute;let i=index" style="height: 100%;
@ -455,17 +464,25 @@
height: 40px; height: 40px;
line-height: 40px; line-height: 40px;
color: #b99a00;">{{element.headName}}</span> color: #b99a00;">{{element.headName}}</span>
<img src="../../../assets/images/delyello.png" *ngIf="pattern == 'edit'" (click)='delTd(key,i)'> <img src="../../../assets/images/delyello.png" *ngIf="pattern == 'edit'"
<img src="../../../assets/images/downyello.png" *ngIf="item.new!=undefined&&i<item.attribute.length-1&&pattern == 'edit'" (click)='downPai(key,i)'> (click)='delTd(key,i)'>
<img src="../../../assets/images/uoyello.png" *ngIf="item.new!=undefined&&i>0 &&pattern == 'edit'" (click)='upPai(key,i)'> <img src="../../../assets/images/downyello.png"
<img src="../../../assets/images/updateyello.png" *ngIf="(element.level==1||element.level==2)&&pattern == 'edit'" (click)='updataHl(key,i)'> *ngIf="item.new!=undefined&&i<item.attribute.length-1&&pattern == 'edit'"
<img src="../../../assets/images/addyello.png" *ngIf="element.level==1&&pattern == 'edit'" (click)='addTd(key,i)'> (click)='downPai(key,i)'>
<img src="../../../assets/images/uoyello.png"
*ngIf="item.new!=undefined&&i>0 &&pattern == 'edit'" (click)='upPai(key,i)'>
<img src="../../../assets/images/updateyello.png"
*ngIf="(element.level==1||element.level==2)&&pattern == 'edit'"
(click)='updataHl(key,i)'>
<img src="../../../assets/images/addyello.png"
*ngIf="element.level==1&&pattern == 'edit'" (click)='addTd(key,i)'>
</div> </div>
<div class="body"> <div class="body">
<!--表格类型--> <!--表格类型-->
<table *ngIf="element.level==1" style="width: 100%;border-collapse: collapse;"> <table *ngIf="element.level==1" style="width: 100%;border-collapse: collapse;">
<thead *ngIf="pattern == 'edit'"> <thead *ngIf="pattern == 'edit'">
<th *ngFor="let itemth of element.tableth;let tablethi=index;TrackBy:trackByFn" style="border: 1px solid #999; <th *ngFor="let itemth of element.tableth;let tablethi=index;TrackBy:trackByFn"
style="border: 1px solid #999;
height: 40px; height: 40px;
font-size: 16px; font-size: 16px;
text-align: center;"> text-align: center;">
@ -474,7 +491,8 @@
</th> </th>
</thead> </thead>
<thead *ngIf="pattern == 'look'"> <thead *ngIf="pattern == 'look'">
<th *ngFor="let itemth of element.tableth;let tablethi=index;TrackBy:trackByFn" style="border: 1px solid #999; <th *ngFor="let itemth of element.tableth;let tablethi=index;TrackBy:trackByFn"
style="border: 1px solid #999;
height: 40px; height: 40px;
font-size: 16px; font-size: 16px;
text-align: center;"> text-align: center;">
@ -496,7 +514,8 @@
</tbody> </tbody>
<tbody *ngIf="pattern == 'look'"> <tbody *ngIf="pattern == 'look'">
<tr *ngFor="let itemtr of element.tabletr"> <tr *ngFor="let itemtr of element.tabletr">
<td *ngFor="let itemtd of itemtr.tabletd;let tabletdi=index;TrackBy:trackByFn" style="border: 1px solid #999; <td *ngFor="let itemtd of itemtr.tabletd;let tabletdi=index;TrackBy:trackByFn"
style="border: 1px solid #999;
height: 40px; height: 40px;
font-size: 16px; font-size: 16px;
text-align: center;"> text-align: center;">
@ -508,7 +527,8 @@
<!--文本区域--> <!--文本区域-->
<textarea style="width: 99%;height: 100px;" *ngIf="element.level==3&&pattern == 'edit'" <textarea style="width: 99%;height: 100px;" *ngIf="element.level==3&&pattern == 'edit'"
[(ngModel)]="element.tableth"></textarea> [(ngModel)]="element.tableth"></textarea>
<div style="height: 100px;width: 98%; border: 1px solid #000000;" *ngIf="element.level==3&&pattern == 'look'">{{element.tableth||''}}</div> <div style="height: 100px;width: 98%; border: 1px solid #000000;"
*ngIf="element.level==3&&pattern == 'look'">{{element.tableth||''}}</div>
<!--输入框--> <!--输入框-->
<div class="inputtext" *ngIf="element.level==2"> <div class="inputtext" *ngIf="element.level==2">
<div class="inputj" style="height: 100%;width: 100%;" <div class="inputj" style="height: 100%;width: 100%;"
@ -516,8 +536,8 @@
<div style="height: 100%;width: 100%;" <div style="height: 100%;width: 100%;"
*ngFor="let itemthj of element.tableth[tablethi];let tablethj=index;TrackBy:trackByFn"> *ngFor="let itemthj of element.tableth[tablethi];let tablethj=index;TrackBy:trackByFn">
<input type="text" placeholder="请输入内容" <input type="text" placeholder="请输入内容"
style="background-color: #E8E9E9;width: 40%;" style="background-color: #E8E9E9;width: 40%;" [(ngModel)]="itemthj.head"
[(ngModel)]="itemthj.head" *ngIf="pattern == 'edit'"> *ngIf="pattern == 'edit'">
<input type="text" placeholder="请输入内容" style="width: 60%;" <input type="text" placeholder="请输入内容" style="width: 60%;"
[(ngModel)]="itemthj.body" *ngIf="pattern == 'edit'"> [(ngModel)]="itemthj.body" *ngIf="pattern == 'edit'">
@ -530,7 +550,8 @@
<td style="border: 1px solid #999; <td style="border: 1px solid #999;
height: 40px; height: 40px;
font-size: 16px; font-size: 16px;
text-align: center; white-space:pre-wrap; width: 185px;" *ngFor="let itemthj of element.tableth[tablethi];let tablethj=index;TrackBy:trackByFn"> text-align: center; white-space:pre-wrap; width: 185px;"
*ngFor="let itemthj of element.tableth[tablethi];let tablethj=index;TrackBy:trackByFn">
<span>{{itemthj.head}}</span> <span>{{itemthj.head}}</span>
<span>{{itemthj.body}}</span> <span>{{itemthj.body}}</span>
</td> </td>
@ -553,7 +574,8 @@
<div class="keyImgImg"> <div class="keyImgImg">
<div style="margin-top: 10px; <div style="margin-top: 10px;
text-align: center; text-align: center;
position: relative;" class="imgbox" *ngFor="let imgUrl of element.tableth.json;let imgkey = index"> position: relative;" class="imgbox"
*ngFor="let imgUrl of element.tableth.json;let imgkey = index">
<mat-icon *ngIf="pattern == 'edit'" class="deleteImg" <mat-icon *ngIf="pattern == 'edit'" class="deleteImg"
(click)="deleteImgItem(element.tableth.json,imgkey)">delete (click)="deleteImgItem(element.tableth.json,imgkey)">delete
</mat-icon> </mat-icon>
@ -561,83 +583,8 @@
width: auto; width: auto;
height: auto;" [src]="imgUrl" alt=""> height: auto;" [src]="imgUrl" alt="">
</div> </div>
<div class="uploadBtn" *ngIf="pattern == 'edit'&&element.tableth.json.length<=0"> <div class="uploadBtn"
<button mat-stroked-button> *ngIf="pattern == 'edit'&&element.tableth.json.length<=0">
<mat-icon>add</mat-icon>上传图片
</button>
<input (change)="filechange($event,element)" type="file" name="" id="">
</div>
</div>
</div>
</div>
</div>
</div>
<!-- <div class="centerBox" *ngIf="item.new!=undefined">
<div class="titleItem" >
<input type="text" placeholder="请输入内容" [(ngModel)]="item.headName">
<img src="../../../assets/images/add.png" (click)='addAttribute(item.groupName,key)' *ngIf="pattern == 'edit'">
</div>
<div class="attack" *ngFor="let element of item.attribute;let attributei=index">
<div class="attackLeft" [style.width]="pattern == 'edit'?'70%':'100%'">
<div class="attackleftHead">
<input type="text" placeholder="请输入内容" [(ngModel)]="element.headName">
<img src="../../../assets/images/delyello.png" *ngIf="element.level==1&&pattern == 'edit'"
(click)='delTd(key,attributei)'>
<img src="../../../assets/images/addyello.png" *ngIf="element.level==1&&pattern == 'edit'"
(click)='addTd(key,attributei)' style="margin-left: 6px;">
</div>
<div class="attackleftTable">
<table *ngIf="element.level==1">
<thead>
<th *ngFor="let itemth of element.tableth;let tablethi=index;TrackBy:trackByFn"><input type="text"
placeholder="请输入内容" [(ngModel)]="element.tableth[tablethi]"></th>
</thead>
<tbody *ngIf="pattern == 'edit'">
<tr *ngFor="let itemtr of element.tabletr">
<td
*ngFor="let itemtd of itemtr.tabletd;let tabletdi=index;TrackBy:trackByFn">
<input type="text" placeholder="请输入"
[(ngModel)]="itemtr.tabletd[tabletdi]">
</td>
</tr>
</tbody>
</table>
<textarea *ngIf="element.level==3" [(ngModel)]="element.tableth"></textarea>
<div class="inputtext" *ngIf="element.level==2">
<div class="inputj" style="height: 100%;width: 100%;"
*ngFor="let itemth of element.tableth;let tablethi=index;TrackBy:trackByFn">
<div style="height: 100%;width: 100%;"
*ngFor="let itemthj of element.tableth[tablethi];let tablethj=index;TrackBy:trackByFn">
<input type="text" placeholder="请输入内容" style="background-color: #E8E9E9;width: 40%;"
[(ngModel)]="itemthj.head">
<input type="text" placeholder="请输入内容" style="width: 60%;" [(ngModel)]="itemthj.body">
</div>
</div>
</div>
<div style="height: 100%;width: 100%;" *ngIf="element.level==4">
<div class="keyImg">
<div style="border: 1px solid #e8e9e9;width: 100%;" class="keyImgItem">
<div class="keyImgTitle" style="height: 30px;
position: relative;">
</div>
<div class="keyImgImg">
<div style="margin-top: 10px;
text-align: center;
position: relative;" class="imgbox" *ngFor="let imgUrl of element.tableth.json;let imgkey = index">
<mat-icon *ngIf="pattern == 'edit'" class="deleteImg"
(click)="delImg(key,attributei,imgkey)">delete
</mat-icon>
<img style="max-width: 100%;
width: auto;
height: auto;" [src]="imgUrl" alt="">
</div>
<div class="uploadBtn" *ngIf="pattern == 'edit'">
<button mat-stroked-button> <button mat-stroked-button>
<mat-icon>add</mat-icon>上传图片 <mat-icon>add</mat-icon>上传图片
</button> </button>
@ -649,19 +596,6 @@
</div> </div>
</div> </div>
</div> </div>
</div>
<div class="attackRight" *ngIf="pattern == 'edit'">
<div class="rightButton">
<button mat-raised-button color="primary" (click)='attackAdd(item.groupName,attributei,element.level)'
*ngIf="element.level==1"><img src="../../../assets/images/addbai.png"> 新增</button>
<button mat-raised-button color="#ECF6FF" style="margin-left: 10px;"
(click)='delDisaster(item.groupName,attributei)'><img src="../../../assets/images/deletehui.png">
删除</button>
</div>
</div>
</div>
</div> -->
<div class="keyImg" <div class="keyImg"
*ngIf="item.groupName == '重点图示' || item.groupName == '交通水源' || item.groupName == '预案附件'"> *ngIf="item.groupName == '重点图示' || item.groupName == '交通水源' || item.groupName == '预案附件'">
@ -678,16 +612,16 @@
border: 0; border: 0;
box-sizing: border-box; box-sizing: border-box;
padding: 0 5px;"> {{ i.name }} </div> padding: 0 5px;"> {{ i.name }} </div>
<img src="../../../assets/images/deletered.png" class="deleteItem" *ngIf="key != 0 && pattern == 'edit'" <img src="../../../assets/images/deletered.png" class="deleteItem"
(click)="deleteItem(item,key)" /> *ngIf="key != 0 && pattern == 'edit'" (click)="deleteItem(item,key)" />
</div> </div>
<div class="keyImgImg"> <div class="keyImgImg">
<div style="margin-top: 10px; <div style="margin-top: 10px;
text-align: center; text-align: center;
position: relative;" class="imgbox" *ngFor="let imgUrl of i.imgArr;let imgkey = index"> position: relative;" class="imgbox" *ngFor="let imgUrl of i.imgArr;let imgkey = index">
<img src="../../../assets/images/deletered.png" *ngIf="pattern == 'edit'" class="deleteImg" <img src="../../../assets/images/deletered.png" *ngIf="pattern == 'edit'"
(click)="deleteImgItem(i.imgArr,imgkey)"/> class="deleteImg" (click)="deleteImgItem(i.imgArr,imgkey)" />
<img style="max-width: 100%; <img style="max-width: 100%;
width: auto; width: auto;
@ -709,7 +643,8 @@
</div> </div>
</div> </div>
<div class="unit" *ngIf="item.groupName == '单位概况'"> <div class="unit" *ngIf="item.groupName == '单位概况'">
<div *ngFor="let itemunit of item.building;let uniti=index"> <!-- style="border-bottom: 3px solid #999;" --> <div *ngFor="let itemunit of item.building;let uniti=index">
<!-- style="border-bottom: 3px solid #999;" -->
<div *ngIf="itemunit.completed"> <div *ngIf="itemunit.completed">
<div class="unithead" style=" height: 40px; <div class="unithead" style=" height: 40px;
width: 100%; width: 100%;
@ -720,8 +655,10 @@
opacity: 1; opacity: 1;
height: 40px; height: 40px;
line-height: 40px;">{{itemunit.name}}</span> line-height: 40px;">{{itemunit.name}}</span>
<img src="../../../assets/images/update.png" *ngIf="planMode==4&&pattern == 'edit'" (click)='unitZdyaaa()'> <img src="../../../assets/images/update.png" *ngIf="planMode==4&&pattern == 'edit'"
<span style="float: right;margin-right: 30px;cursor: pointer;" *ngIf="planMode==4&&pattern == 'edit'" (click)='zdyDw()'>自定义</span> (click)='unitZdyaaa()'>
<span style="float: right;margin-right: 30px;cursor: pointer;"
*ngIf="planMode==4&&pattern == 'edit'" (click)='zdyDw()'>自定义</span>
</div> </div>
<div class="unitbody" *ngFor="let element of itemunit.body;let elei=index" style=" height: 100%; <div class="unitbody" *ngFor="let element of itemunit.body;let elei=index" style=" height: 100%;
width: 100%; width: 100%;
@ -737,11 +674,15 @@
height: 40px; height: 40px;
line-height: 40px; line-height: 40px;
color: #ffffff;">{{element.surveyName}}</span> color: #ffffff;">{{element.surveyName}}</span>
<!-- <img src="../../../assets/images/deletered.png" > -->
<img src="../../../assets/images/delyello.png" *ngIf="haveNew!=undefined&&pattern == 'edit'"> <img src="../../../assets/images/delyello.png"
<img src="../../../assets/images/updatabai.png" (click)='addBuildingmb(element)' *ngIf="planMode==4&&pattern == 'edit'&&(element.surveyName=='建筑信息'||element.surveyName=='消防设施')"> *ngIf="haveNew!=undefined&&pattern == 'edit'">
<img src="../../../assets/images/updatabai.png"
(click)='addBuildingmb(element)'
*ngIf="planMode==4&&pattern == 'edit'&&(element.surveyName=='建筑信息'||element.surveyName=='消防设施')">
<img src="../../../assets/images/addbai.png" <img src="../../../assets/images/addbai.png"
(click)='unitadd(element.surveyName,uniti,elei)' *ngIf="pattern == 'edit'"> (click)='unitadd(element.surveyName,uniti,elei)'
*ngIf="pattern == 'edit'">
</div> </div>
<div class="body"> <div class="body">
@ -757,7 +698,8 @@
height: 40px; height: 40px;
line-height: 40px; line-height: 40px;
color: #b99a00;">{{attack.head}}</span> color: #b99a00;">{{attack.head}}</span>
<img src="../../../assets/images/deleteblue.png" *ngIf="pattern == 'edit'" <img src="../../../assets/images/deleteblue.png"
*ngIf="pattern == 'edit'"
(click)='unitDel(element.surveyName,uniti,attacki)'> (click)='unitDel(element.surveyName,uniti,attacki)'>
<img src="../../../assets/images/add.png" <img src="../../../assets/images/add.png"
*ngIf="pattern == 'edit'" *ngIf="pattern == 'edit'"
@ -777,7 +719,8 @@
height: 40px; height: 40px;
font-size: 16px; font-size: 16px;
text-align: center;" text-align: center;"
*ngFor="let itemth of attack.tableth;let tablethi=index;TrackBy:trackByFn">{{attack.tableth[tablethi]}}</th> *ngFor="let itemth of attack.tableth;let tablethi=index;TrackBy:trackByFn">
{{attack.tableth[tablethi]}}</th>
</thead> </thead>
<tbody *ngIf="pattern == 'edit'"> <tbody *ngIf="pattern == 'edit'">
<tr *ngFor="let itemtr of attack.tabletr"> <tr *ngFor="let itemtr of attack.tabletr">
@ -803,35 +746,48 @@
</table> </table>
</div> </div>
</div> </div>
</div> </div>
<!-- 单位和建筑信息 --> <!-- 单位和建筑信息 -->
<div class="building" *ngIf="element.surveyName=='单位基本信息'||element.surveyName=='建筑信息'"> <div class="building"
*ngIf="element.surveyName=='单位基本信息'||element.surveyName=='建筑信息'">
<div *ngFor="let info of element.attinf;let infoi=index"> <div *ngFor="let info of element.attinf;let infoi=index">
<div *ngIf="info.completed&&pattern != 'look'" class="onetext"> <div *ngIf="info.completed&&pattern != 'look'" class="onetext">
<input type="text" placeholder="请输入内容" style="width: 30%;background-color: #F9F9F9;text-align: center;" [(ngModel)]="info.propertyName" *ngIf="pattern == 'edit'" [readonly]='info.zdy==undefined'> <input type="text" placeholder="请输入内容"
<input type="text" placeholder="请输入内容" style="width: 40%;background-color: #FFFFFF;" [(ngModel)]="info.propertyValue" *ngIf="pattern == 'edit'"> style="width: 30%;background-color: #F9F9F9;text-align: center;"
<!-- <input type="text" style="width: 30%;background-color: #FFFFFF;color: #999;" [(ngModel)]="info.olddata" *ngIf="pattern == 'edit'&&oldData" readonly> --> [(ngModel)]="info.propertyName" *ngIf="pattern == 'edit'"
<!-- <span style="width: 30%;background-color: #FFFFFF;color: #999;" *ngIf="pattern == 'edit'&&oldData">{{info.olddata||'无原数据'}}</span> --> [readonly]='info.zdy==undefined'>
<input type="text" style="width: 27%;background-color: #FFFFFF;color: #999;" *ngIf="pattern == 'edit'&&oldData" [value]="info.olddata||'无原数据'" readonly> <input type="text" placeholder="请输入内容"
<img style="float: right;" src="../../../assets/images/deletered.png" *ngIf="pattern == 'edit'&&info.zdy" (click)='unitDel(element.surveyName,uniti,infoi)'> style="width: 40%;background-color: #FFFFFF;"
[(ngModel)]="info.value" *ngIf="pattern == 'edit'">
<input type="text"
style="width: 27%;background-color: #FFFFFF;color: #999;"
*ngIf="pattern == 'edit'&&oldData"
[value]="info.olddata||'无原数据'" readonly>
<img style="float: right;"
src="../../../assets/images/deletered.png"
*ngIf="pattern == 'edit'&&info.zdy"
(click)='unitDel(element.surveyName,uniti,infoi)'>
</div> </div>
</div> </div>
<table *ngIf="pattern == 'look'" style="width: 100%;border-collapse: collapse;"> <table *ngIf="pattern == 'look'"
style="width: 100%;border-collapse: collapse;">
<tr *ngFor="let info of element.attinf;let infoi=index"> <tr *ngFor="let info of element.attinf;let infoi=index">
<th style="border: 1px solid #999; <th style="border: 1px solid #999;
height: 40px; height: 40px;
width: 30%; width: 30%;
font-size: 16px; font-size: 16px;
text-align: center;" *ngIf="info.completed"><span>{{info.propertyName}}</span></th> text-align: center;" *ngIf="info.completed">
<span>{{info.propertyName}}</span>
</th>
<td style="border: 1px solid #999; <td style="border: 1px solid #999;
height: 40px; height: 40px;
width: 70%; width: 70%;
font-size: 16px; font-size: 16px;
text-align: center;"*ngIf="info.completed"><span>{{info.propertyValue}}</span> </td> text-align: center;" *ngIf="info.completed">
<span>{{info.value}}</span>
</td>
</tr> </tr>
</table> </table>
</div> </div>
@ -843,36 +799,59 @@
width: 100%; width: 100%;
background-color: #FFFBE8; background-color: #FFFBE8;
text-align: center;"> text-align: center;">
<input type="text" placeholder="请输入内容" [(ngModel)]="attack.name" [readonly]='attack.zdy==undefined' *ngIf="pattern == 'edit'"> <input type="text" placeholder="请输入内容"
<span style=" margin-left: 20px;font-size: 16px;color: #b99a00;opacity: 1;height: 40px;line-height: 40px;" *ngIf="pattern != 'edit'">{{attack.name}}</span> [(ngModel)]="attack.name"
<img src="../../../assets/images/delyello.png" *ngIf="pattern == 'edit'" [readonly]='attack.zdy==undefined'
*ngIf="pattern == 'edit'">
<span
style=" margin-left: 20px;font-size: 16px;color: #b99a00;opacity: 1;height: 40px;line-height: 40px;"
*ngIf="pattern != 'edit'">{{attack.name}}</span>
<img src="../../../assets/images/delyello.png"
*ngIf="pattern == 'edit'"
(click)='unitDel(element.surveyName,uniti,attacki)'> (click)='unitDel(element.surveyName,uniti,attacki)'>
<img src="../../../assets/images/addyello.png" <img src="../../../assets/images/addyello.png"
*ngIf="pattern == 'edit'" *ngIf="pattern == 'edit'"
(click)='unitadd(element.surveyName,uniti,attacki,0)'><!-- &&attack.zdy!=undefined --> (click)='unitadd(element.surveyName,uniti,attacki,0)'><!-- &&attack.zdy!=undefined -->
<img src="../../../assets/images/updateyello.png" (click)='fileAdd(attack.facilityItems,attacki,attack.name)' *ngIf="pattern == 'edit'&&attack.zdy==undefined"> <img src="../../../assets/images/updateyello.png"
(click)='fileAdd(attack.facilityItems,attacki,attack.name)'
*ngIf="pattern == 'edit'&&attack.zdy==undefined">
</div> </div>
<div class="fileBody"> <div class="fileBody">
<div *ngFor="let info of attack.facilityItems;let filenum=index"> <div
<div *ngIf="info.completed&&pattern != 'look'" class="onetext"> *ngFor="let info of attack.facilityItems;let filenum=index">
<input type="text" placeholder="请输入内容" style="width: 40%;background-color: #F9F9F9;text-align: center;" [(ngModel)]="info.name" *ngIf="pattern == 'edit'" [readonly]='info.zdy==undefined'> <div *ngIf="info.completed&&pattern != 'look'"
<input type="text" placeholder="请输入内容" style="width: 57%;background-color: #FFFFFF;" [(ngModel)]="info.value" *ngIf="pattern == 'edit'"> class="onetext">
<img src="../../../assets/images/deletered.png" *ngIf="pattern == 'edit'&&info.zdy" (click)='unitDel(element.surveyName,uniti,attacki,filenum)'> <input type="text" placeholder="请输入内容"
style="width: 40%;background-color: #F9F9F9;text-align: center;"
[(ngModel)]="info.name"
*ngIf="pattern == 'edit'"
[readonly]='info.zdy==undefined'>
<input type="text" placeholder="请输入内容"
style="width: 57%;background-color: #FFFFFF;"
[(ngModel)]="info.value"
*ngIf="pattern == 'edit'">
<img src="../../../assets/images/deletered.png"
*ngIf="pattern == 'edit'&&info.zdy"
(click)='unitDel(element.surveyName,uniti,attacki,filenum)'>
</div> </div>
</div> </div>
<table *ngIf="pattern == 'look'" style="width: 100%;border-collapse: collapse;"> <table *ngIf="pattern == 'look'"
<tr *ngFor="let info of attack.facilityItems;let filenum=index"> style="width: 100%;border-collapse: collapse;">
<tr
*ngFor="let info of attack.facilityItems;let filenum=index">
<th style="border: 1px solid #999; <th style="border: 1px solid #999;
height: 40px; height: 40px;
width: 40%; width: 40%;
font-size: 16px; font-size: 16px;
text-align: center;" *ngIf="info.completed">{{info.name}}</th> text-align: center;" *ngIf="info.completed">
{{info.name}}</th>
<td style="border: 1px solid #999; <td style="border: 1px solid #999;
height: 40px; height: 40px;
width: 60%; width: 60%;
font-size: 16px; font-size: 16px;
text-align: center;" *ngIf="info.completed">{{info.value}}</td> text-align: center;" *ngIf="info.completed">
{{info.value}}</td>
</tr> </tr>
</table> </table>
</div> </div>
@ -884,15 +863,25 @@
<!-- 四周毗邻 --> <!-- 四周毗邻 -->
<div *ngIf="element.surveyName=='四周毗邻'"> <div *ngIf="element.surveyName=='四周毗邻'">
<div class="fouradj" *ngIf="pattern != 'look'"> <div class="fouradj" *ngIf="pattern != 'look'">
<div class="fourTexttwo" *ngFor="let info of element.attinf;let infoi=index"> <div class="fourTexttwo"
<input type="text" placeholder="请输入内容" style="width: 30%;background-color: #F9F9F9;text-align: center;" [(ngModel)]="info.name" *ngIf="pattern == 'edit'" [readonly]='info.zdy==undefined'> *ngFor="let info of element.attinf;let infoi=index">
<input type="text" placeholder="请输入内容" style="width: 65%;background-color: #FFFFFF;" [(ngModel)]="info.value" *ngIf="pattern == 'edit'"> <input type="text" placeholder="请输入内容"
<img style="position: relative;bottom: 30px;left: 347px;" src="../../../assets/images/deletered.png" (click)='unitDel(element.surveyName,uniti,infoi)' *ngIf="pattern == 'edit'&&info.zdy"> style="width: 30%;background-color: #F9F9F9;text-align: center;"
[(ngModel)]="info.name" *ngIf="pattern == 'edit'"
[readonly]='info.zdy==undefined'>
<input type="text" placeholder="请输入内容"
style="width: 65%;background-color: #FFFFFF;"
[(ngModel)]="info.value" *ngIf="pattern == 'edit'">
<img style="position: relative;bottom: 30px;left: 347px;"
src="../../../assets/images/deletered.png"
(click)='unitDel(element.surveyName,uniti,infoi)'
*ngIf="pattern == 'edit'&&info.zdy">
</div> </div>
</div> </div>
<table *ngIf="pattern == 'look'" style="width: 100%;border-collapse: collapse;"> <table *ngIf="pattern == 'look'"
style="width: 100%;border-collapse: collapse;">
<tr *ngFor="let info of element.attinf;let infoi=index"> <tr *ngFor="let info of element.attinf;let infoi=index">
<th style="border: 1px solid #999; <th style="border: 1px solid #999;
height: 40px; height: 40px;
@ -910,15 +899,23 @@
<!-- 功能分区 --> <!-- 功能分区 -->
<div *ngIf="element.surveyName=='功能分区'"> <div *ngIf="element.surveyName=='功能分区'">
<div class="fouradj" *ngIf="pattern != 'look'"> <div class="fouradj" *ngIf="pattern != 'look'">
<div class="onetext" *ngFor="let info of element.attinf;let infoi=index"> <div class="onetext"
<input type="text" placeholder="请输入内容" style="width: 30%;background-color: #F9F9F9;text-align: center;" [(ngModel)]="info.name" *ngIf="pattern == 'edit'"> *ngFor="let info of element.attinf;let infoi=index">
<input type="text" placeholder="请输入内容" style="width: 67%;background-color: #FFFFFF;" [(ngModel)]="info.value" *ngIf="pattern == 'edit'"> <input type="text" placeholder="请输入内容"
<img src="../../../assets/images/deletered.png" (click)='unitDel(element.surveyName,uniti,infoi)' *ngIf="pattern == 'edit'"> style="width: 30%;background-color: #F9F9F9;text-align: center;"
[(ngModel)]="info.name" *ngIf="pattern == 'edit'">
<input type="text" placeholder="请输入内容"
style="width: 67%;background-color: #FFFFFF;"
[(ngModel)]="info.value" *ngIf="pattern == 'edit'">
<img src="../../../assets/images/deletered.png"
(click)='unitDel(element.surveyName,uniti,infoi)'
*ngIf="pattern == 'edit'">
</div> </div>
</div> </div>
<table *ngIf="pattern == 'look'" style="width: 100%;border-collapse: collapse;"> <table *ngIf="pattern == 'look'"
style="width: 100%;border-collapse: collapse;">
<tr *ngFor="let info of element.attinf;let infoi=index"> <tr *ngFor="let info of element.attinf;let infoi=index">
<th style="border: 1px solid #999; <th style="border: 1px solid #999;
height: 40px; height: 40px;
@ -940,47 +937,82 @@
height: 40px; height: 40px;
background-color: #FFFBE8; background-color: #FFFBE8;
text-align: center;"> text-align: center;">
<input type="text" placeholder="请输入内容" [(ngModel)]="parts.heafName" *ngIf="pattern == 'edit'"> <input type="text" placeholder="请输入内容"
[(ngModel)]="parts.heafName" *ngIf="pattern == 'edit'">
<!-- <textarea [(ngModel)]="parts.heafName" *ngIf="pattern == 'look'" style="width: 100%;height: 100%;color: #b99a00;" disabled></textarea> --> <!-- <textarea [(ngModel)]="parts.heafName" *ngIf="pattern == 'look'" style="width: 100%;height: 100%;color: #b99a00;" disabled></textarea> -->
<span style="font-size: 16px; <span style="font-size: 16px;
text-align: center; text-align: center;
height: 40px; height: 40px;
line-height: 40px; line-height: 40px;
color: #b99a00;" *ngIf="pattern == 'look'">{{parts.heafName}}</span> color: #b99a00;"
<img src="../../../assets/images/deletered.png" (click)='unitDel(element.surveyName,uniti,infoi)' *ngIf="pattern == 'edit'"> *ngIf="pattern == 'look'">{{parts.heafName}}</span>
<img src="../../../assets/images/deletered.png"
(click)='unitDel(element.surveyName,uniti,infoi)'
*ngIf="pattern == 'edit'">
</div> </div>
<div class="partsBody" *ngIf="pattern!='look'"> <div class="partsBody" *ngIf="pattern!='look'">
<div class="duohang"> <div class="duohang">
<div class="duohangHalf"> <div class="duohangHalf">
<input type="text" placeholder="请输入内容" style="width: 40%;background-color: #F9F9F9;text-align: center;" [(ngModel)]="parts.body[0].name" *ngIf="pattern == 'edit'"> <input type="text" placeholder="请输入内容"
<input type="text" placeholder="请输入内容" style="width: 60%;background-color: #FFFFFF;" [(ngModel)]="parts.body[0].value" *ngIf="pattern == 'edit'"> style="width: 40%;background-color: #F9F9F9;text-align: center;"
[(ngModel)]="parts.body[0].name"
*ngIf="pattern == 'edit'">
<input type="text" placeholder="请输入内容"
style="width: 60%;background-color: #FFFFFF;"
[(ngModel)]="parts.body[0].value"
*ngIf="pattern == 'edit'">
</div> </div>
<div class="duohangHalf"> <div class="duohangHalf">
<input type="text" placeholder="请输入内容" style="width: 40%;background-color: #F9F9F9;text-align: center;"[(ngModel)]="parts.body[1].name" *ngIf="pattern == 'edit'"> <input type="text" placeholder="请输入内容"
<input type="text" placeholder="请输入内容" style="width: 60%;background-color: #FFFFFF;" [(ngModel)]="parts.body[1].value" *ngIf="pattern == 'edit'"> style="width: 40%;background-color: #F9F9F9;text-align: center;"
[(ngModel)]="parts.body[1].name"
*ngIf="pattern == 'edit'">
<input type="text" placeholder="请输入内容"
style="width: 60%;background-color: #FFFFFF;"
[(ngModel)]="parts.body[1].value"
*ngIf="pattern == 'edit'">
</div> </div>
</div> </div>
<div class="duohang"> <div class="duohang">
<div class="duohangHalf"> <div class="duohangHalf">
<input type="text" placeholder="请输入内容" style="width: 40%;background-color: #F9F9F9;text-align: center;" [(ngModel)]="parts.body[2].name" *ngIf="pattern == 'edit'"> <input type="text" placeholder="请输入内容"
<input type="text" placeholder="请输入内容" style="width: 60%;background-color: #FFFFFF;" [(ngModel)]="parts.body[2].value" *ngIf="pattern == 'edit'"> style="width: 40%;background-color: #F9F9F9;text-align: center;"
[(ngModel)]="parts.body[2].name"
*ngIf="pattern == 'edit'">
<input type="text" placeholder="请输入内容"
style="width: 60%;background-color: #FFFFFF;"
[(ngModel)]="parts.body[2].value"
*ngIf="pattern == 'edit'">
</div> </div>
<div class="duohangHalf"> <div class="duohangHalf">
<input type="text" placeholder="请输入内容" style="width: 40%;background-color: #F9F9F9;text-align: center;" [(ngModel)]="parts.body[3].name" *ngIf="pattern == 'edit'"> <input type="text" placeholder="请输入内容"
<input type="text" placeholder="请输入内容" style="width: 60%;background-color: #FFFFFF;" [(ngModel)]="parts.body[3].value" *ngIf="pattern == 'edit'"> style="width: 40%;background-color: #F9F9F9;text-align: center;"
[(ngModel)]="parts.body[3].name"
*ngIf="pattern == 'edit'">
<input type="text" placeholder="请输入内容"
style="width: 60%;background-color: #FFFFFF;"
[(ngModel)]="parts.body[3].value"
*ngIf="pattern == 'edit'">
</div> </div>
</div> </div>
<div class="danhang"> <div class="danhang">
<input type="text" placeholder="请输入内容" style="width: 40%;background-color: #F9F9F9;text-align: center;" [(ngModel)]="parts.body[4].name" *ngIf="pattern == 'edit'"> <input type="text" placeholder="请输入内容"
<input type="text" placeholder="请输入内容" style="width: 60%;background-color: #FFFFFF;" [(ngModel)]="parts.body[4].value" *ngIf="pattern == 'edit'"> style="width: 40%;background-color: #F9F9F9;text-align: center;"
[(ngModel)]="parts.body[4].name"
*ngIf="pattern == 'edit'">
<input type="text" placeholder="请输入内容"
style="width: 60%;background-color: #FFFFFF;"
[(ngModel)]="parts.body[4].value"
*ngIf="pattern == 'edit'">
</div> </div>
</div> </div>
<table *ngIf="pattern == 'look'" style="width: 100%;border-collapse: collapse;"> <table *ngIf="pattern == 'look'"
style="width: 100%;border-collapse: collapse;">
<tr *ngFor="let partsbody of parts.body"> <tr *ngFor="let partsbody of parts.body">
<th style="border: 1px solid #999; <th style="border: 1px solid #999;
height: 40px; height: 40px;
@ -1007,7 +1039,8 @@
<div class="centerBox" <div class="centerBox"
*ngIf="element.surveyName!='单位基本信息'&&element.surveyName!='建筑信息'&&element.surveyName!='四周毗邻'&&element.surveyName!='消防设施'&&element.surveyName!='进攻通道'&&element.surveyName!='重点部位'&&element.surveyName!='功能分区'"> *ngIf="element.surveyName!='单位基本信息'&&element.surveyName!='建筑信息'&&element.surveyName!='四周毗邻'&&element.surveyName!='消防设施'&&element.surveyName!='进攻通道'&&element.surveyName!='重点部位'&&element.surveyName!='功能分区'">
<div class="boxBody" *ngFor="let element of element.attinf;let i=index" style="height: 100%; <div class="boxBody" *ngFor="let element of element.attinf;let i=index"
style="height: 100%;
width: 100%; width: 100%;
display: flex; display: flex;
flex-direction: column;"> flex-direction: column;">
@ -1020,18 +1053,23 @@
height: 40px; height: 40px;
line-height: 40px; line-height: 40px;
color: #b99a00;">{{element.headName}}</span> color: #b99a00;">{{element.headName}}</span>
<img src="../../../assets/images/delyello.png" *ngIf="pattern == 'edit'" <img src="../../../assets/images/delyello.png"
(click)='delTd(key,i)'> *ngIf="pattern == 'edit'"
<img src="../../../assets/images/updateyello.png" *ngIf="(element.level==1||element.level==2)&&pattern == 'edit'" (click)='delTd2(key,i,uniti,elei)'>
<img src="../../../assets/images/updateyello.png"
*ngIf="(element.level==1||element.level==2)&&pattern == 'edit'"
(click)='updataHl(key,uniti,elei,i)'> (click)='updataHl(key,uniti,elei,i)'>
<img src="../../../assets/images/addyello.png" *ngIf="element.level==1&&pattern == 'edit'" <img src="../../../assets/images/addyello.png"
*ngIf="element.level==1&&pattern == 'edit'"
(click)='unitNewadd(key,uniti,elei,i)'> (click)='unitNewadd(key,uniti,elei,i)'>
</div> </div>
<div class="body"> <div class="body">
<!--表格类型--> <!--表格类型-->
<table *ngIf="element.level==1" style="width: 100%;border-collapse: collapse;"> <table *ngIf="element.level==1"
style="width: 100%;border-collapse: collapse;">
<thead *ngIf="pattern == 'edit'"> <thead *ngIf="pattern == 'edit'">
<th *ngFor="let itemth of element.tableth;let tablethi=index;TrackBy:trackByFn" style="border: 1px solid #999; <th *ngFor="let itemth of element.tableth;let tablethi=index;TrackBy:trackByFn"
style="border: 1px solid #999;
height: 40px; height: 40px;
font-size: 16px; font-size: 16px;
text-align: center;"> text-align: center;">
@ -1040,7 +1078,8 @@
</th> </th>
</thead> </thead>
<thead *ngIf="pattern == 'look'"> <thead *ngIf="pattern == 'look'">
<th *ngFor="let itemth of element.tableth;let tablethi=index;TrackBy:trackByFn" style="border: 1px solid #999; <th *ngFor="let itemth of element.tableth;let tablethi=index;TrackBy:trackByFn"
style="border: 1px solid #999;
height: 40px; height: 40px;
font-size: 16px; font-size: 16px;
text-align: center;"> text-align: center;">
@ -1049,19 +1088,22 @@
</th> </th>
</thead> </thead>
<tbody *ngIf="pattern == 'edit'"> <tbody *ngIf="pattern == 'edit'">
<tr *ngFor="let itemtr of element.tabletr;let tri=index"> <tr
*ngFor="let itemtr of element.tabletr;let tri=index">
<td <td
*ngFor="let itemtd of itemtr.tabletd;let tabletdi=index;TrackBy:trackByFn"> *ngFor="let itemtd of itemtr.tabletd;let tabletdi=index;TrackBy:trackByFn">
<input type="text" placeholder="请输入" <input type="text" placeholder="请输入"
[(ngModel)]="itemtr.tabletd[tabletdi]"> [(ngModel)]="itemtr.tabletd[tabletdi]">
</td> </td>
<img src="../../../assets/images/deletered.png" (click)='delTd(key,uniti,elei,i,tri)'> <img src="../../../assets/images/deletered.png"
(click)='delTd(key,uniti,elei,i,tri)'>
</tr> </tr>
</tbody> </tbody>
<tbody *ngIf="pattern == 'look'"> <tbody *ngIf="pattern == 'look'">
<tr *ngFor="let itemtr of element.tabletr"> <tr *ngFor="let itemtr of element.tabletr">
<td *ngFor="let itemtd of itemtr.tabletd;let tabletdi=index;TrackBy:trackByFn" style="border: 1px solid #999; <td *ngFor="let itemtd of itemtr.tabletd;let tabletdi=index;TrackBy:trackByFn"
style="border: 1px solid #999;
height: 40px; height: 40px;
font-size: 16px; font-size: 16px;
text-align: center;"> text-align: center;">
@ -1071,9 +1113,12 @@
</tbody> </tbody>
</table> </table>
<!--文本区域--> <!--文本区域-->
<textarea style="width: 99%;height: 100px;" *ngIf="element.level==3&&pattern == 'edit'" <textarea style="width: 99%;height: 100px;"
*ngIf="element.level==3&&pattern == 'edit'"
[(ngModel)]="element.tableth"></textarea> [(ngModel)]="element.tableth"></textarea>
<div style="height: 100px;width: 98%; border: 1px solid #000000;" *ngIf="element.level==3&&pattern == 'look'">{{element.tableth||''}}</div> <div style="height: 100px;width: 98%; border: 1px solid #000000;"
*ngIf="element.level==3&&pattern == 'look'">
{{element.tableth||''}}</div>
<!--输入框--> <!--输入框-->
<div class="inputtext" *ngIf="element.level==2"> <div class="inputtext" *ngIf="element.level==2">
<div class="inputj" style="height: 100%;width: 100%;" <div class="inputj" style="height: 100%;width: 100%;"
@ -1082,16 +1127,20 @@
*ngFor="let itemthj of element.tableth[tablethi];let tablethj=index;TrackBy:trackByFn"> *ngFor="let itemthj of element.tableth[tablethi];let tablethj=index;TrackBy:trackByFn">
<input type="text" placeholder="请输入内容" <input type="text" placeholder="请输入内容"
style="background-color: #E8E9E9;width: 25%;text-align: center;" style="background-color: #E8E9E9;width: 25%;text-align: center;"
[(ngModel)]="itemthj.head" *ngIf="pattern == 'edit'"> [(ngModel)]="itemthj.head"
<input type="text" placeholder="请输入内容" style="width: 75%;" *ngIf="pattern == 'edit'">
[(ngModel)]="itemthj.body" *ngIf="pattern == 'edit'"> <input type="text" placeholder="请输入内容"
style="width: 75%;" [(ngModel)]="itemthj.body"
*ngIf="pattern == 'edit'">
</div> </div>
</div> </div>
<table *ngIf="pattern == 'look'" style="width: 100%;border-collapse: collapse;"> <table *ngIf="pattern == 'look'"
<tr *ngFor="let itemth of element.tableth;let tablethi=index;TrackBy:trackByFn"> style="width: 100%;border-collapse: collapse;">
<tr
*ngFor="let itemth of element.tableth;let tablethi=index;TrackBy:trackByFn">
<td style="border: 1px solid #999; <td style="border: 1px solid #999;
height: 40px;width: 30%; height: 40px;width: 30%;
font-size: 16px; font-size: 16px;
@ -1118,19 +1167,23 @@
<div class="keyImgImg"> <div class="keyImgImg">
<div style="margin-top: 10px; <div style="margin-top: 10px;
text-align: center; text-align: center;
position: relative;" class="imgbox" *ngFor="let imgUrl of element.tableth.json;let imgkey = index"> position: relative;" class="imgbox"
<mat-icon *ngIf="pattern == 'edit'" class="deleteImg" *ngFor="let imgUrl of element.tableth.json;let imgkey = index">
<mat-icon *ngIf="pattern == 'edit'"
class="deleteImg"
(click)="deleteImgItem(element.tableth.json,imgkey)">delete (click)="deleteImgItem(element.tableth.json,imgkey)">delete
</mat-icon> </mat-icon>
<img style="max-width: 100%; <img style="max-width: 100%;
width: auto; width: auto;
height: auto;" [src]="imgUrl" alt=""> height: auto;" [src]="imgUrl" alt="">
</div> </div>
<div class="uploadBtn" *ngIf="pattern == 'edit'&&element.tableth.json.length<=0"> <div class="uploadBtn"
*ngIf="pattern == 'edit'&&element.tableth.json.length<=0">
<button mat-stroked-button> <button mat-stroked-button>
<mat-icon>add</mat-icon>上传图片 <mat-icon>add</mat-icon>上传图片
</button> </button>
<input (change)="filechange($event,element)" type="file" name="" id=""> <input (change)="filechange($event,element)"
type="file" name="" id="">
</div> </div>
</div> </div>
</div> </div>

3455
src/app/plan-management/create-plan-online-five/create-plan-online-five.component.ts

File diff suppressed because it is too large Load Diff

58
src/app/plan-management/drill-record/drill-record.component.html

@ -0,0 +1,58 @@
<!-- <p>演练记录</p> -->
<div class="box">
<div class="header">
<form class="queryBox" (ngSubmit)="onSubmit()">
<div class="queryField">
<span style="width: 108px;">预案名称:</span>
<input name="name" nz-input placeholder="请输入预案名称" [(ngModel)]="name" />
</div>
<div class="queryField" style="margin-right: 35px;">
<span>组织机构:</span>
<nz-tree-select [nzDropdownClassName]="'maxHeightTreeSelect'" style="width: 250px"
[nzExpandedKeys]="expandKeys" [nzNodes]="nodes" nzShowSearch nzPlaceHolder="请选择组织机构" name="orId"
[(ngModel)]="orId">
</nz-tree-select>
</div>
<div class="queryField">
<span>熟悉时间:</span>
<nz-range-picker name="time" [(ngModel)]="time"></nz-range-picker>
</div>
<div class="queryField btnbox">
<button nz-button nzType="primary">查询</button>
<button nz-button type="button" nzType="default" (click)="reset()">重置</button>
</div>
</form>
</div>
<div class="tablebox">
<table mat-table [dataSource]="tabledataSource" class="mat-elevation-z8">
<ng-container matColumnDef="name">
<th mat-header-cell *matHeaderCellDef>演练对象</th>
<td mat-cell *matCellDef="let element">{{element.company.name}}</td>
</ng-container>
<ng-container matColumnDef="or">
<th mat-header-cell *matHeaderCellDef>组织机构</th>
<td mat-cell *matCellDef="let element">{{element.company.organizationName}}</td>
</ng-container>
<ng-container matColumnDef="people">
<th mat-header-cell *matHeaderCellDef>带队人员</th>
<td mat-cell *matCellDef="let element">{{element.teamLeader}}</td>
</ng-container>
<ng-container matColumnDef="time">
<th mat-header-cell *matHeaderCellDef>演练时间</th>
<td mat-cell *matCellDef="let element">{{element.startTime | date:'yyyy-MM-dd HH:mm'}} -
{{element.endTime | date:'yyyy-MM-dd HH:mm'}}</td>
</ng-container>
<ng-container matColumnDef="operate">
<th mat-header-cell *matHeaderCellDef style="width: 200px;">操作</th>
<td mat-cell *matCellDef="let element" class="operate">
<span (click)="look(element)">查看</span>
<span (click)="delete(element)">删除</span>
</td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
</table>
<mat-paginator [length]="length" [pageSize]="pageSize" (page)="chagePage($event)">
</mat-paginator>
</div>
</div>

59
src/app/plan-management/drill-record/drill-record.component.scss

@ -0,0 +1,59 @@
.box {
height: 100%;
overflow: auto;
}
.header {
width: 100%;
box-sizing: border-box;
padding: 20px 30px 8px 30px;
.queryBox {
display: flex;
flex-wrap: wrap;
align-items: center;
.queryField {
display: flex;
align-items: center;
margin-right: 20px;
span {
display: inline-block;
width: 80px;
}
}
.btnbox{
button{
margin-right: 12px;
}
}
}
}
.tablebox {
table {
width: 100%;
margin-top: 15px;
}
mat-paginator {
width: 100%;
}
}
.mat-header-cell,
.mat-cell {
text-align: center;
}
.operate {
span {
color: #40a9ff;
cursor: pointer;
margin: 0 3px;
}
}

25
src/app/plan-management/drill-record/drill-record.component.spec.ts

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { DrillRecordComponent } from './drill-record.component';
describe('DrillRecordComponent', () => {
let component: DrillRecordComponent;
let fixture: ComponentFixture<DrillRecordComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ DrillRecordComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(DrillRecordComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

141
src/app/plan-management/drill-record/drill-record.component.ts

@ -0,0 +1,141 @@
import { Component, OnInit, ViewChild, Inject } from "@angular/core";
import { HttpClient } from "@angular/common/http";
import { MatPaginator } from "@angular/material/paginator";
import { Router, ActivatedRoute } from "@angular/router";
import { PageEvent } from "@angular/material/paginator";
import { MatDialog } from "@angular/material/dialog";
import { MatSnackBar } from "@angular/material/snack-bar";
import { TreeService } from "../../http-interceptors/tree.service";
import { DatePipe } from "@angular/common";
import { UploadDrillComponent } from "@src/app/key-unit/key-unit-management/upload-drill/upload-drill.component";
@Component({
selector: "app-drill-record",
templateUrl: "./drill-record.component.html",
styleUrls: ["./drill-record.component.scss"],
providers: [DatePipe],
})
export class DrillRecordComponent implements OnInit {
constructor(
private http: HttpClient,
public dialog: MatDialog,
public snackBar: MatSnackBar,
private datePipe: DatePipe
) {}
//分页
@ViewChild(MatPaginator, { static: true })
pageEvent: PageEvent;
paginator: MatPaginator;
displayedColumns: string[] = ["name", "or", "people", "time", "operate"];
tabledataSource: any; //表格数据
ngOnInit(): void {
this.getOrganizations();
}
//获得所有组织机构
allorganizations: any; //所有组织机构
getOrganizations() {
this.http.get("/api/Organizations").subscribe((data: any) => {
this.allorganizations = data;
this.getpresentOrganization();
});
}
//得到当前单位所在组织机构的tree型数据
expandKeys = [];
nodes = [];
organizationId;
getpresentOrganization() {
this.allorganizations.forEach((item) => {
item.key = item.id;
item.title = item.name;
item.children = [];
this.allorganizations.forEach((element) => {
if (element.parentId == item.id) {
item.children.push(element);
}
if (item.children.length === 0) {
item.isLeaf = true;
} else {
item.isLeaf = false;
}
});
});
this.http.get("/api/Account/Profiles").subscribe((data: any) => {
this.allorganizations.forEach((item) => {
if (item.name == data.organizationName) {
this.expandKeys = [item.id];
this.organizationId = item.id;
this.orId = item.id;
this.nodes = [...[item]];
this.getTabledataSource();
}
});
});
}
length: any; //共多少条数据
pageSize: any = 10; //每页条数
PageNumber: any = 1; //第几页
getTabledataSource() {
let params = {
OrganizationId: this.orId,
CompanyName: this.name || "",
StartTime: this.time
? this.datePipe.transform(this.time[0], "yyyy-MM-ddT00:00:00")
: "2020-01-01T00:00:00",
EndTime: this.time
? this.datePipe.transform(this.time[1], "yyyy-MM-ddT23:59:59")
: "2030-01-01T00:00:00",
PageNumber: this.PageNumber,
PageSize: this.pageSize,
};
this.http
.get("/api/DrillRecords", { params: params })
.subscribe((data: any) => {
this.tabledataSource = data.items;
this.length = data.totalCount;
});
}
//分页事件
chagePage(e) {
this.PageNumber = e.pageIndex + 1;
this.getTabledataSource();
}
name;
orId;
time;
//查询
onSubmit() {
this.PageNumber = 1;
this.pageEvent.pageIndex = 0;
this.getTabledataSource();
}
//重置
reset() {
this.name = "";
this.orId = this.organizationId;
this.time = null;
this.onSubmit();
}
look(element) {
this.dialog.open(UploadDrillComponent, {
width: "700px",
data: { unitInfo: element.company, isEditMode: false },
});
}
delete(element) {
if (confirm("确认删除此记录吗")) {
this.http
.delete(`/api/DrillRecords/${element.id}`)
.subscribe((data: any) => {
alert("删除成功");
this.getTabledataSource();
});
}
}
}

28
src/app/plan-management/entry-plan-look/AddPlanone.html

@ -16,9 +16,8 @@
<form [formGroup]="firstFormGroup"> <form [formGroup]="firstFormGroup">
<ng-template matStepLabel>填写名称与类型</ng-template> <ng-template matStepLabel>填写名称与类型</ng-template>
<mat-form-field> <mat-form-field>
<input matInput id="name" name="name" type='text' <input matInput id="name" name="name" type='text' required autocomplete="off" placeholder="请输入预案名称"
required autocomplete="off" formControlName="firstCtrlone">
placeholder="请输入预案名称" formControlName="firstCtrlone">
</mat-form-field> </mat-form-field>
<div> <div>
@ -55,32 +54,38 @@
<span class="pigepadding">预案形式:</span> <span class="pigepadding">预案形式:</span>
</div> </div>
<mat-radio-group required name="planup" [(ngModel)]="defaultisshow" style="float: left;" (change)="selectradio($event)"> <mat-radio-group required name="planup" [(ngModel)]="defaultisshow" style="float: left;"
(change)="selectradio($event)">
<div *ngIf="localup"> <div *ngIf="localup">
<mat-radio-button value="1" style="margin-right: 10px;">本地上传</mat-radio-button> <mat-radio-button value="1" style="margin-right: 10px;">本地上传</mat-radio-button>
<input style="width: 175px;" type="file" name="" id="uploadFile" *ngIf="isup" (change)="filechange($event)"> <input style="width: 175px;" type="file" name="" id="uploadFile" *ngIf="isup"
(change)="filechange($event)">
<span *ngIf="uploadover" style="font-size: 13px;">(已上传)</span> <span *ngIf="uploadover" style="font-size: 13px;">(已上传)</span>
</div> </div>
<!-- <div *ngIf="inputword"> <div *ngIf="inputword">
<mat-radio-button value="2" style="margin-right: 10px;">模板在线编制</mat-radio-button> <mat-radio-button value="2" style="margin-right: 10px;">模板在线编制</mat-radio-button>
</div> </div>
<div *ngIf="inputNew"> <div *ngIf="inputNew">
<mat-radio-button value="4" style="margin-right: 10px;">自定义在线编制</mat-radio-button> <mat-radio-button value="4" style="margin-right: 10px;">自定义在线编制</mat-radio-button>
</div> --> </div>
<!-- <div *ngIf="inputword"> <!-- <div *ngIf="inputword">
<mat-radio-button value="1" style="margin-right: 10px;">导入word文档</mat-radio-button> <mat-radio-button value="1" style="margin-right: 10px;">导入word文档</mat-radio-button>
<input type="file" name="" id="" *ngIf="isinput" (change)="fileInput($event)"> <input type="file" name="" id="" *ngIf="isinput" (change)="fileInput($event)">
</div> --> </div> -->
<!-- <div *ngIf="pswShow"> <div *ngIf="pswShow">
<!-- <mat-radio-group >
<mat-radio-button value='psw' >是否为全景图</mat-radio-button>
</mat-radio-group> -->
<mat-checkbox [(ngModel)]='psw' name='psw' style="margin-left: 2px;">是否为全景图</mat-checkbox> <mat-checkbox [(ngModel)]='psw' name='psw' style="margin-left: 2px;">是否为全景图</mat-checkbox>
</div> --> </div>
<div *ngIf="onlineedit"> <div *ngIf="onlineedit">
<mat-radio-button value="2">在线编辑</mat-radio-button> <mat-radio-button value="2">在线编辑</mat-radio-button>
</div> </div>
<div *ngIf="website"> <div *ngIf="website">
<mat-radio-button value="3">网页地址</mat-radio-button> <mat-radio-button value="3">网页地址</mat-radio-button>
<input type="text" *ngIf="isweb" name="webaddress" [(ngModel)]="webaddress" style="width: 175px;height: 20px;margin-left:10px;"> <input type="text" *ngIf="isweb" name="webaddress" [(ngModel)]="webaddress"
style="width: 175px;height: 20px;margin-left:10px;">
</div> </div>
</mat-radio-group> </mat-radio-group>
@ -90,7 +95,8 @@
<div class="progressBox" *ngIf="uploadisLoading"> <div class="progressBox" *ngIf="uploadisLoading">
<span style="font-size: 13px;">上传中...</span> <span style="font-size: 13px;">上传中...</span>
<mat-progress-bar mode="determinate" [value]="uploadProgress" class="progress" style="width: 320px;left: 64px;"></mat-progress-bar> <mat-progress-bar mode="determinate" [value]="uploadProgress" class="progress"
style="width: 320px;left: 64px;"></mat-progress-bar>
<button type="button" mat-raised-button (click)="cancel()">取消上传</button> <button type="button" mat-raised-button (click)="cancel()">取消上传</button>
</div> </div>
<div> <div>

48
src/app/plan-management/entry-plan-look/auditresult.html

@ -1,11 +1,3 @@
<!--
* @Descripttion:
* @version:
* @Author: sueRimn
* @Date: 2020-12-24 10:59:48
* @LastEditors: sueRimn
* @LastEditTime: 2021-03-16 14:34:07
-->
<div style="text-align: center;"> <div style="text-align: center;">
<span mat-dialog-title>审批结果</span> <span mat-dialog-title>审批结果</span>
</div> </div>
@ -15,15 +7,49 @@
<p>提交时间:{{data.element.committedTime| date:'yyyy-MM-dd HH:mm:ss'}}</p> <p>提交时间:{{data.element.committedTime| date:'yyyy-MM-dd HH:mm:ss'}}</p>
<p>发起申请:{{commitOrganizationName }}</p> <p>发起申请:{{commitOrganizationName }}</p>
<mat-divider></mat-divider> <mat-divider></mat-divider>
<p>初审时间:{{data.element.firstAudittedTime| date:'yyyy-MM-dd HH:mm:ss'}}</p> <p>
<ng-container *ngIf="data.element.plan.company.isFollowed; else elseTemplate">初审</ng-container>
<ng-template #elseTemplate>终审</ng-template>时间:{{data.element.firstAudittedTime| date:'yyyy-MM-dd HH:mm:ss'}}
</p>
<p>
<ng-container *ngIf="data.element.plan.company.isFollowed; else elseTemplate">初审</ng-container>
<ng-template #elseTemplate>终审</ng-template>机构:{{data.element.firstAuditorOrganizationName}}
</p>
<p>
<ng-container *ngIf="data.element.plan.company.isFollowed; else elseTemplate">初审</ng-container>
<ng-template #elseTemplate>终审</ng-template>意见:{{data.element.firstAuditOpinion}}
</p>
<p>
<ng-container *ngIf="data.element.plan.company.isFollowed; else elseTemplate">初审</ng-container>
<ng-template #elseTemplate>终审</ng-template>结果:
<ng-container *ngIf="data.element.auditStatus==16">待终审</ng-container>
<ng-container *ngIf="data.element.auditStatus==32">
<ng-container *ngIf="data.element.plan.company.isFollowed; else elseTemplate">初审</ng-container>
<ng-template #elseTemplate>终审</ng-template>退回</ng-container>
<ng-container *ngIf="data.element.auditStatus==2 ||data.element.auditStatus==4">
<ng-container *ngIf="data.element.plan.company.isFollowed; else elseTemplate">初审</ng-container>
<ng-template #elseTemplate>终审</ng-template>通过</ng-container>
</p>
<ng-container *ngIf="data.element.plan.company.isFollowed">
<mat-divider></mat-divider>
<p>终审时间:{{data.element.audittedTime| date:'yyyy-MM-dd HH:mm:ss'}}</p>
<p>终审机构:{{data.element.auditorOrganizationName}}</p>
<p>终审意见:{{data.element.auditOpinion}}</p>
<p>终审结果:{{data.element.auditStatus==2?'终审通过':data.element.auditStatus==4?'终审退回':''}}</p>
</ng-container>
<!-- <p>初审时间:{{data.element.firstAudittedTime| date:'yyyy-MM-dd HH:mm:ss'}}</p>
<p>初审机构:{{data.element.firstAuditorOrganizationName}}</p> <p>初审机构:{{data.element.firstAuditorOrganizationName}}</p>
<p>初审意见:{{data.element.firstAuditOpinion}}</p> <p>初审意见:{{data.element.firstAuditOpinion}}</p>
<p>初审结果:{{data.element.auditStatus==16?'待终审':data.element.auditStatus==32?'初审退回':data.element.auditStatus==2||data.element.auditStatus==4?'初审通过':''}}</p> <p>初审结果:{{data.element.auditStatus==16?'待终审':data.element.auditStatus==32?'初审退回':data.element.auditStatus==2||data.element.auditStatus==4?'初审通过':''}}
</p>
<mat-divider></mat-divider> <mat-divider></mat-divider>
<p>终审时间:{{data.element.audittedTime| date:'yyyy-MM-dd HH:mm:ss'}}</p> <p>终审时间:{{data.element.audittedTime| date:'yyyy-MM-dd HH:mm:ss'}}</p>
<p>终审机构:{{data.element.auditorOrganizationName}}</p> <p>终审机构:{{data.element.auditorOrganizationName}}</p>
<p>终审意见:{{data.element.auditOpinion}}</p> <p>终审意见:{{data.element.auditOpinion}}</p>
<p>终审结果:{{data.element.auditStatus==2?'终审通过':data.element.auditStatus==4?'终审退回':''}}</p> <p>终审结果:{{data.element.auditStatus==2?'终审通过':data.element.auditStatus==4?'终审退回':''}}</p> -->
</div> </div>

18
src/app/plan-management/entry-plan-look/edit-plan-category/edit-plan-category.component.html

@ -0,0 +1,18 @@
<form (ngSubmit)="onSubmit(form.value)" #form="ngForm" class="example-container">
<div class="topbox" style="text-align: center;">
<span mat-dialog-title>修改预案级别</span>
</div>
<div class="mainbox">
<mat-form-field>
<mat-select placeholder='请选择预案级别' [(ngModel)]="planCategory" name="integritySort">
<mat-option [value]='3'>Ⅲ级预案</mat-option>
<mat-option [value]='4'>Ⅳ级预案</mat-option>
<mat-option [value]='5'>Ⅴ级预案</mat-option>
</mat-select>
</mat-form-field>
</div>
<div class="btn" style="margin-top:10px;">
<button mat-raised-button color="primary" style="margin-right: 12px;">确定</button>
<button type="button" mat-button (click)="onNoClick()" mat-raised-button>取消</button>
</div>
</form>

0
src/app/plan-management/entry-plan-look/edit-plan-category/edit-plan-category.component.scss

25
src/app/plan-management/entry-plan-look/edit-plan-category/edit-plan-category.component.spec.ts

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { EditPlanCategoryComponent } from './edit-plan-category.component';
describe('EditPlanCategoryComponent', () => {
let component: EditPlanCategoryComponent;
let fixture: ComponentFixture<EditPlanCategoryComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ EditPlanCategoryComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(EditPlanCategoryComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

37
src/app/plan-management/entry-plan-look/edit-plan-category/edit-plan-category.component.ts

@ -0,0 +1,37 @@
import { HttpClient } from "@angular/common/http";
import { Component, OnInit, Inject } from "@angular/core";
import { MatDialogRef, MAT_DIALOG_DATA } from "@angular/material/dialog";
import { MatSnackBar } from "@angular/material/snack-bar";
@Component({
selector: "app-edit-plan-category",
templateUrl: "./edit-plan-category.component.html",
styleUrls: ["./edit-plan-category.component.scss"],
})
export class EditPlanCategoryComponent implements OnInit {
constructor(
private http: HttpClient,
public dialogRef: MatDialogRef<EditPlanCategoryComponent>,
@Inject(MAT_DIALOG_DATA) public data,
public snackBar: MatSnackBar
) {}
planCategory;
ngOnInit(): void {
this.planCategory = this.data.planCategory;
}
onNoClick(): void {
this.dialogRef.close();
}
onSubmit(value) {
let body = {
planCategory: this.planCategory,
};
this.http
.put(`/api/PlanComponents/${this.data.id}`, body)
.subscribe((data) => {
this.dialogRef.close("success");
});
}
}

23
src/app/plan-management/entry-plan-look/entry-plan-look.component.html

@ -67,7 +67,10 @@
<ng-container matColumnDef="planCategory"> <ng-container matColumnDef="planCategory">
<th mat-header-cell *matHeaderCellDef>预案级别</th> <th mat-header-cell *matHeaderCellDef>预案级别</th>
<td mat-cell *matCellDef="let element"> <td mat-cell *matCellDef="let element">
{{element.planCategory=='3'?'Ⅲ级预案':element.planCategory=='4'?'Ⅳ级预案':'Ⅴ级预案'}}</td> {{element.planCategory=='3'?'Ⅲ级预案':element.planCategory=='4'?'Ⅳ级预案':'Ⅴ级预案'}}
<mat-icon *ngIf="element.auditStatus==8 || element.maintenanceVerifyState=='未提交审核'"
class="editPlanCategory" (click)="editPlanCategory(element)">create</mat-icon>
</td>
</ng-container> </ng-container>
<ng-container matColumnDef="plantype"> <ng-container matColumnDef="plantype">
<th mat-header-cell *matHeaderCellDef style="width: 150px;">预案类型</th> <th mat-header-cell *matHeaderCellDef style="width: 150px;">预案类型</th>
@ -85,15 +88,9 @@
</td> </td>
</ng-container> </ng-container>
<ng-container matColumnDef="auditstate"> <ng-container matColumnDef="auditstate">
<th mat-header-cell *matHeaderCellDef>新增审核</th> <th mat-header-cell *matHeaderCellDef>审核状态</th>
<td mat-cell *matCellDef="let element">
{{element.newVerifyState==null?'':element.newVerifyState}}
</td>
</ng-container>
<ng-container matColumnDef="weihustate">
<th mat-header-cell *matHeaderCellDef>维护审核</th>
<td mat-cell *matCellDef="let element"> <td mat-cell *matCellDef="let element">
{{element.maintenanceVerifyState==null?'':element.maintenanceVerifyState}} {{element.auditStatus | auditState}}
</td> </td>
</ng-container> </ng-container>
<ng-container matColumnDef="isopen"> <ng-container matColumnDef="isopen">
@ -107,9 +104,10 @@
<ng-container *ngIf="isoperation == 'true'" matColumnDef="operation"> <ng-container *ngIf="isoperation == 'true'" matColumnDef="operation">
<th mat-header-cell *matHeaderCellDef>操作</th> <th mat-header-cell *matHeaderCellDef>操作</th>
<td mat-cell *matCellDef="let element"> <td mat-cell *matCellDef="let element">
<span (click)="changeName(element)" *ngIf="element.auditStatus==8">改名</span> <span (click)="changeName(element)"
<!-- <span (click)="upzhuanMb(element)" *ngIf="element.auditStatus==8 || element.maintenanceVerifyState=='未提交审核'">改名</span>
*ngIf="element.planMode==1&&element.planType==16&&element.planCategory==5">转在线导入</span> --> <span (click)="upzhuanMb(element)"
*ngIf="element.planMode==1&&element.planType==16&&element.planCategory==5">转在线导入</span>
<span (click)="editPlan(element)" <span (click)="editPlan(element)"
[ngClass]="{'grey': !(element.auditStatus!='16' && element.auditStatus != '1' )}">编辑</span> [ngClass]="{'grey': !(element.auditStatus!='16' && element.auditStatus != '1' )}">编辑</span>
<span (click)="lookPlan(element)" <span (click)="lookPlan(element)"
@ -127,6 +125,7 @@
<ng-container *ngIf="isoperation == 'false'" matColumnDef="operation"> <ng-container *ngIf="isoperation == 'false'" matColumnDef="operation">
<th mat-header-cell *matHeaderCellDef>操作</th> <th mat-header-cell *matHeaderCellDef>操作</th>
<td mat-cell *matCellDef="let element"> <td mat-cell *matCellDef="let element">
<!-- <span (click)="sixFamiliarize(element)">六熟悉</span> -->
<span (click)="lookPlan(element)">查看</span> <span (click)="lookPlan(element)">查看</span>
<span (click)="readFile(element)" <span (click)="readFile(element)"
[ngClass]="{'grey': element.planMode == '1' || element.planMode == '2' || element.planMode == '3'}">下载</span> [ngClass]="{'grey': element.planMode == '1' || element.planMode == '2' || element.planMode == '3'}">下载</span>

57
src/app/plan-management/entry-plan-look/entry-plan-look.component.scss

@ -5,6 +5,7 @@
flex-direction: row; flex-direction: row;
flex-wrap: wrap; flex-wrap: wrap;
align-items: center; align-items: center;
// justify-content:center; // justify-content:center;
div { div {
width: 300px; width: 300px;
@ -12,10 +13,13 @@
// margin: 0 30px; // margin: 0 30px;
margin-left: 80px; margin-left: 80px;
} }
// margin-bottom: 30px; // margin-bottom: 30px;
} }
.body { .body {
overflow: auto; overflow: auto;
.btn { .btn {
button { button {
width: 80px; width: 80px;
@ -23,8 +27,10 @@
margin-left: 2%; margin-left: 2%;
} }
} }
.tablebox { .tablebox {
overflow: auto; overflow: auto;
.add { .add {
cursor: auto; cursor: auto;
text-decoration: none; text-decoration: none;
@ -50,11 +56,21 @@
line-height: 20px; line-height: 20px;
margin-left: 40px; margin-left: 40px;
} }
.editPlanCategory {
width: 13px;
height: 13px;
font-size: 18px;
vertical-align: sub;
cursor: pointer;
}
table { table {
width: 100%; width: 100%;
margin-left: 0%; margin-left: 0%;
margin-top: 15px; margin-top: 15px;
} }
mat-paginator { mat-paginator {
width: 100%; width: 100%;
margin-left: 0%; margin-left: 0%;
@ -62,30 +78,37 @@
} }
} }
} }
.upbox { .upbox {
height: 100px; height: 100px;
margin-bottom: 15px; margin-bottom: 15px;
mat-radio-group { mat-radio-group {
div { div {
margin: 10px 0; margin: 10px 0;
} }
} }
} }
.createbtnbox { .createbtnbox {
button { button {
margin: 0 6px; margin: 0 6px;
} }
} }
.mat-header-cell { .mat-header-cell {
text-align: center; text-align: center;
} }
.mat-cell { .mat-cell {
text-align: center; text-align: center;
span { span {
color: #0000BF; color: #0000BF;
margin: 0 3px; margin: 0 3px;
cursor: pointer; cursor: pointer;
} }
.grey { .grey {
color: grey; color: grey;
pointer-events: none; pointer-events: none;
@ -99,9 +122,11 @@
position: relative; position: relative;
display: inline-block; display: inline-block;
width: 100%; width: 100%;
button { button {
float: right; float: right;
} }
.progress { .progress {
display: inline-block; display: inline-block;
position: absolute; position: absolute;
@ -124,37 +149,55 @@
.fileDiv { .fileDiv {
cursor: pointer; cursor: pointer;
} }
.fileDiv:hover { .fileDiv:hover {
background-color: #fafafa; background-color: #fafafa;
} }
.auditDiv { .auditDiv {
p { p {
margin: 8px 0; margin: 8px 0;
margin-left: 16px; margin-left: 16px;
} }
} }
.btn { .btn {
text-align: center; text-align: center;
button { button {
margin: 0 3px; margin: 0 3px;
} }
} }
#viewer { #viewer {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.mat-dialog-container { .mat-dialog-container {
padding: 0; padding: 0;
} }
//预览图片旋转角度 //预览图片旋转角度
.rotateA {transform: rotate(90deg) scale(0.75);} .rotateA {
.rotateB {transform: rotate(180deg)} transform: rotate(90deg) scale(0.75);
.rotateC {transform: rotate(270deg) scale(0.75);} }
.rotateB {
transform: rotate(180deg)
}
.rotateC {
transform: rotate(270deg) scale(0.75);
}
@media screen and (max-width:1200px) { @media screen and (max-width:1200px) {
.bigimgbox { .bigimgbox {
width: 880px; width: 880px;
height: 580px; height: 580px;
//预览图片 //预览图片
.previewImgBox { .previewImgBox {
width: 800px; width: 800px;
@ -163,10 +206,12 @@
} }
} }
} }
@media screen and (min-width:1200px) and (max-width:1400px) { @media screen and (min-width:1200px) and (max-width:1400px) {
.bigimgbox { .bigimgbox {
width: 880px; width: 880px;
height: 610px; height: 610px;
//预览图片 //预览图片
.previewImgBox { .previewImgBox {
width: 800px; width: 800px;
@ -176,16 +221,19 @@
} }
} }
@media screen and (min-width:1400px) { @media screen and (min-width:1400px) {
.bigimgbox { .bigimgbox {
width: 1110px; width: 1110px;
height: 860px; height: 860px;
//预览图片 //预览图片
.previewImgBox { .previewImgBox {
width: 900px; width: 900px;
height: 100%; height: 100%;
text-align: center; text-align: center;
} }
.previewImgBottom { .previewImgBottom {
text-align: center; text-align: center;
height: 30px; height: 30px;
@ -194,6 +242,7 @@
} }
} }
.shadow { .shadow {
height: 100%; height: 100%;
width: 100%; width: 100%;
@ -201,6 +250,7 @@
z-index: 998; z-index: 998;
background-color: #FFFFFF; background-color: #FFFFFF;
opacity: 0.3; opacity: 0.3;
mat-spinner { mat-spinner {
position: relative; position: relative;
top: 40%; top: 40%;
@ -214,6 +264,7 @@
height: 100%; height: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.file { .file {
text-align: center; text-align: center;
} }

2493
src/app/plan-management/entry-plan-look/entry-plan-look.component.ts

File diff suppressed because it is too large Load Diff

29
src/app/plan-management/entry-plan-look/six-familiarize/six-familiarize.component.html

@ -0,0 +1,29 @@
<h2 mat-dialog-title>六熟悉</h2>
<div class="box">
<div class="contentItem">
<div class="content">
<div class="textbox">
<span class="name">熟悉对象:</span>
<span>{{data.unitdata.unitname}}</span>
</div>
<div>
<span class="name">人员数量:</span>
<input type="number" [disabled]="!isEditMode" name="memberCount" [(ngModel)]="memberCount" nz-input
placeholder="人员数量" />
</div>
<div>
<span class="name">熟悉时间:</span>
<nz-range-picker [disabled]="!isEditMode" [nzShowTime]="{ nzFormat: 'HH:mm' }"
nzFormat="yyyy-MM-dd HH:mm" [nzPlaceHolder]="['开始时间', '结束时间']" name="time"
[(ngModel)]="time"></nz-range-picker>
</div>
</div>
</div>
<div class="mask" *ngIf="isLoading">
<mat-spinner [diameter]="30"></mat-spinner>
</div>
</div>
<mat-dialog-actions align="end">
<button mat-button mat-dialog-close [disabled]="isLoading || isLoadingSave">取消</button>
<button mat-button cdkFocusInitial (click)="save()" [disabled]="isLoading || isLoadingSave">确定</button>
</mat-dialog-actions>

118
src/app/plan-management/entry-plan-look/six-familiarize/six-familiarize.component.scss

@ -0,0 +1,118 @@
.box {
width: 100%;
position: relative;
.contentItem {
display: flex;
margin: 6px 0;
// border-bottom: 1px dashed rgb(180, 178, 178);
.title {
width: 75px;
color: #1890ff;
display: flex;
align-items: center;
}
.content {
flex: 1;
display: flex;
flex-wrap: wrap;
flex-direction: column;
div {
display: flex;
align-items: center;
input,
nz-range-picker {
flex: 1;
}
}
div {
margin-bottom: 8px;
.name {
display: inline-block;
width: 70px;
margin-right: 3px;
text-align: right;
}
}
}
.textbox {
height: 32px;
line-height: 32px;
width: 100%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.uploadbox {
position: relative;
display: flex;
align-items: center;
input {
width: 88px;
height: 32px;
position: absolute;
left: 0;
top: 0;
opacity: 0;
z-index: 2;
cursor: pointer;
}
button {
z-index: 1;
cursor: pointer;
}
.imgbox {
height: 100%;
display: flex;
align-items: center;
li {
display: flex;
align-items: center;
position: relative;
}
img {
width: 50px;
height: 50px;
margin: 0 5px;
cursor: pointer;
}
.close {
position: absolute;
right: 0;
top: 0;
font-size: 15px;
cursor: pointer;
}
}
}
}
.mask {
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
background: rgba(0, 0, 0, 0.2);
display: flex;
justify-content: center;
align-items: center;
z-index: 3;
}
}

25
src/app/plan-management/entry-plan-look/six-familiarize/six-familiarize.component.spec.ts

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { SixFamiliarizeComponent } from './six-familiarize.component';
describe('SixFamiliarizeComponent', () => {
let component: SixFamiliarizeComponent;
let fixture: ComponentFixture<SixFamiliarizeComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ SixFamiliarizeComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(SixFamiliarizeComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

110
src/app/plan-management/entry-plan-look/six-familiarize/six-familiarize.component.ts

@ -0,0 +1,110 @@
import { HttpClient } from "@angular/common/http";
import { Component, OnInit, Inject } from "@angular/core";
import { MatDialogRef, MAT_DIALOG_DATA } from "@angular/material/dialog";
import { ObjectsService } from "@src/app/services/objects.service";
import { DatePipe } from "@angular/common";
import { MatSnackBar } from "@angular/material/snack-bar";
import Viewer from "viewerjs";
@Component({
selector: "app-six-familiarize",
templateUrl: "./six-familiarize.component.html",
styleUrls: ["./six-familiarize.component.scss"],
providers: [DatePipe],
})
export class SixFamiliarizeComponent implements OnInit {
constructor(
public dialogRef: MatDialogRef<SixFamiliarizeComponent>,
@Inject(MAT_DIALOG_DATA) public data: any,
private objectsSer: ObjectsService,
private http: HttpClient,
private datePipe: DatePipe,
public snackBar: MatSnackBar
) {}
isEditMode = true;
ngOnInit(): void {
console.log('传递的数据',this.data);
this.isEditMode = this.data.isEditMode;
this.getData();
}
isHttpPost;
getData() {
this.http
.get("/api/SixFamiliars", {
params: {
PlanComponentId: this.data.id,
},
})
.subscribe((data: any) => {
console.log("六熟悉记录数据", data);
if (data.totalCount === 0) {
this.isHttpPost = true;
} else {
this.isHttpPost = false;
let item = data.items[0];
this.familiarizeId = item.id;
this.memberCount = item.memberCount;
this.time = [item.startTime, item.endTime];
}
});
}
isLoading = false;
memberCount;
time;
familiarizeId;
isLoadingSave = false;
save() {
if (!this.isEditMode) {
this.dialogRef.close();
return;
}
if (!this.memberCount || !this.time) {
this.snackBar.open("请输入人员数量和熟悉时间", "确定", {
verticalPosition: "top",
duration: 3000,
});
return;
}
this.isLoadingSave = true;
let body: any = {
planComponentId: this.data.planData.id,
memberCount: Number(this.memberCount),
startTime: this.datePipe.transform(this.time[0], "yyyy-MM-ddTHH:mm:ss"),
endTime: this.datePipe.transform(this.time[1], "yyyy-MM-ddTHH:mm:ss"),
};
if (this.isHttpPost) {
this.http.post("/api/SixFamiliars", body).subscribe((data: any) => {
this.familiarizeId = data.id;
this.isHttpPost = false;
this.isLoadingSave = false;
this.snackBar.open("保存成功", "确定", {
verticalPosition: "top",
duration: 3000,
});
this.dialogRef.close();
});
} else {
body.id = this.familiarizeId;
this.http.put(`/api/SixFamiliars/${this.familiarizeId}`, body).subscribe(
(data: any) => {
this.isLoadingSave = false;
this.snackBar.open("保存成功", "确定", {
verticalPosition: "top",
duration: 3000,
});
this.dialogRef.close();
},
(err) => {
this.isLoadingSave = false;
}
);
}
}
}

40
src/app/plan-management/entry-plan/entry-plan.component.html

@ -91,20 +91,26 @@
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
</div> </div>
<div class="queryField" *ngIf="!padMore&&!pcMore"> <div class="queryField" *ngIf="!padMore&&!pcMore">
<label style="margin-right: 10px;">重点单位:</label>
<mat-form-field>
<mat-select placeholder='是否为重点单位' [(ngModel)]="isFollowed" name="isFollowed">
<mat-option value=0>一般单位</mat-option>
<mat-option value=1>重点单位</mat-option>
</mat-select>
</mat-form-field>
</div>
<!-- <div class="queryField" *ngIf="!padMore&&!pcMore">
<label style="margin-right: 10px;">编制级别:</label> <label style="margin-right: 10px;">编制级别:</label>
<mat-form-field> <mat-form-field>
<mat-select name="preparelevel" [(ngModel)]="preparelevel" placeholder='请选择编制级别'> <mat-select name="preparelevel" [(ngModel)]="preparelevel" placeholder='请选择编制级别'>
<!-- <mat-option value="1">总队</mat-option>
<mat-option value="2">支队</mat-option>
<mat-option value="4">大队</mat-option>
<mat-option value="8">中队</mat-option> -->
<mat-option *ngFor="let item of preparelevels" [value]="item.value">{{item.name}} <mat-option *ngFor="let item of preparelevels" [value]="item.value">{{item.name}}
</mat-option> </mat-option>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
<mat-checkbox style="margin-left: 6px;" [(ngModel)]="plcheck" name="plcheck">包含下级</mat-checkbox> <mat-checkbox style="margin-left: 6px;" [(ngModel)]="plcheck" name="plcheck">包含下级</mat-checkbox>
</div> </div> -->
<div class="queryField" *ngIf="!padMore&&!pcMore"> <div class="queryField" *ngIf="!padMore&&!pcMore">
<label style="margin-right: 10px;">审核状态:</label> <label style="margin-right: 10px;">审核状态:</label>
<mat-form-field> <mat-form-field>
@ -152,12 +158,14 @@
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
</div> </div>
<!-- <div class="queryField" *ngIf="!padMore&&!pcMore"> <div class="queryField" *ngIf="!padMore&&!pcMore">
<mat-checkbox (ngModelChange)="templatePlanChange($event,1)" [(ngModel)]="templatePlan" name="templatePlan">模板录入预案</mat-checkbox> <mat-checkbox (ngModelChange)="templatePlanChange($event,1)" [(ngModel)]="templatePlan"
name="templatePlan">模板录入预案</mat-checkbox>
</div> </div>
<div class="queryField" *ngIf="!padMore&&!pcMore"> <div class="queryField" *ngIf="!padMore&&!pcMore">
<mat-checkbox (ngModelChange)="templatePlanChange($event,2)" [(ngModel)]="customPlan" name="customPlan">自定义预案</mat-checkbox> <mat-checkbox (ngModelChange)="templatePlanChange($event,2)" [(ngModel)]="customPlan"
</div> --> name="customPlan">自定义预案</mat-checkbox>
</div>
</div> </div>
</form> </form>
</div> </div>
@ -173,6 +181,16 @@
<span class="weihu" *ngIf="!element.company.isNewData">维护更新</span> <span class="weihu" *ngIf="!element.company.isNewData">维护更新</span>
</td> </td>
</ng-container> </ng-container>
<ng-container matColumnDef="isFollowed">
<th mat-header-cell *matHeaderCellDef style="width: 3%;">重点单位</th>
<td mat-cell *matCellDef="let element">
<span title="重点单位" *ngIf="element.company.isFollowed">
<mat-icon style="margin-top: 6px;color: red;">star</mat-icon>
</span>
</td>
</ng-container>
<ng-container matColumnDef="unitname"> <ng-container matColumnDef="unitname">
<th mat-header-cell *matHeaderCellDef>单位名称</th> <th mat-header-cell *matHeaderCellDef>单位名称</th>
<td mat-cell *matCellDef="let element">{{element.company.name}}</td> <td mat-cell *matCellDef="let element">{{element.company.name}}</td>
@ -343,10 +361,10 @@
<th mat-header-cell *matHeaderCellDef>审核状态</th> <th mat-header-cell *matHeaderCellDef>审核状态</th>
<td mat-cell *matCellDef="let element">{{element.auditStatus}}</td> <td mat-cell *matCellDef="let element">{{element.auditStatus}}</td>
</ng-container> </ng-container>
<ng-container matColumnDef="projectlevel"> <!-- <ng-container matColumnDef="projectlevel">
<th mat-header-cell *matHeaderCellDef>编制级别</th> <th mat-header-cell *matHeaderCellDef>编制级别</th>
<td mat-cell *matCellDef="let element">{{element.planLevel}}</td> <td mat-cell *matCellDef="let element">{{element.planLevel}}</td>
</ng-container> </ng-container> -->
<ng-container matColumnDef="operation"> <ng-container matColumnDef="operation">
<th mat-header-cell *matHeaderCellDef>操作</th> <th mat-header-cell *matHeaderCellDef>操作</th>
<td mat-cell *matCellDef="let element"> <td mat-cell *matCellDef="let element">

472
src/app/plan-management/entry-plan/entry-plan.component.ts

@ -1,36 +1,58 @@
import { Component, OnInit, ViewChild, Inject } from '@angular/core'; import { Component, OnInit, ViewChild, Inject } from "@angular/core";
import { HttpClient } from '@angular/common/http' import { HttpClient } from "@angular/common/http";
import { MatTreeFlatDataSource, MatTreeFlattener } from '@angular/material/tree'; import {
import { MatPaginator } from '@angular/material/paginator'; MatTreeFlatDataSource,
import { FlatTreeControl } from '@angular/cdk/tree'; MatTreeFlattener,
import { FormControl } from '@angular/forms'; } from "@angular/material/tree";
import { Router, ActivatedRoute } from '@angular/router' import { MatPaginator } from "@angular/material/paginator";
import { PageEvent } from '@angular/material/paginator'; import { FlatTreeControl } from "@angular/cdk/tree";
import { MatDialogRef, MatDialog, MAT_DIALOG_DATA } from '@angular/material/dialog'; import { FormControl } from "@angular/forms";
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar'; import { Router, ActivatedRoute } from "@angular/router";
import { TreeService } from '../../http-interceptors/tree.service' import { PageEvent } from "@angular/material/paginator";
import { ConstantPool } from '@angular/compiler'; import {
MatDialogRef,
MatDialog,
MAT_DIALOG_DATA,
} from "@angular/material/dialog";
import { MatSnackBar, MatSnackBarConfig } from "@angular/material/snack-bar";
import { TreeService } from "../../http-interceptors/tree.service";
import { ConstantPool } from "@angular/compiler";
@Component({ @Component({
selector: 'app-entry-plan', selector: "app-entry-plan",
templateUrl: './entry-plan.component.html', templateUrl: "./entry-plan.component.html",
styleUrls: ['./entry-plan.component.scss'] styleUrls: ["./entry-plan.component.scss"],
}) })
export class EntryPlanComponent implements OnInit { export class EntryPlanComponent implements OnInit {
constructor(
private http: HttpClient,
private router: Router,
private route: ActivatedRoute,
private tree: TreeService,
public dialog: MatDialog,
public snackBar: MatSnackBar
) {}
constructor(private http: HttpClient, private router: Router, private route: ActivatedRoute, private tree: TreeService, public dialog: MatDialog, public snackBar: MatSnackBar) { } private _transformer = (node, level: number) => {
//初始化tree
private _transformer = (node, level: number) => { //初始化tree
return { return {
expandable: !!node.children && node.children.length > 0, expandable: !!node.children && node.children.length > 0,
name: node.name, name: node.name,
level: level, level: level,
id: node.id, id: node.id,
parentId: node.parentId, parentId: node.parentId,
children: node.children children: node.children,
}; };
} };
treeControl = new FlatTreeControl<any>(node => node.level, node => node.expandable); treeControl = new FlatTreeControl<any>(
treeFlattener = new MatTreeFlattener(this._transformer, node => node.level, node => node.expandable, node => node.children); (node) => node.level,
(node) => node.expandable
);
treeFlattener = new MatTreeFlattener(
this._transformer,
(node) => node.level,
(node) => node.expandable,
(node) => node.children
);
dataSource = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener); dataSource = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener);
myControl = new FormControl(); myControl = new FormControl();
hasChild = (_: number, node: any) => node.expandable; hasChild = (_: number, node: any) => node.expandable;
@ -40,21 +62,31 @@ export class EntryPlanComponent implements OnInit {
paginator: MatPaginator; paginator: MatPaginator;
length: any; //共多少条数据 length: any; //共多少条数据
pageSize: any; //每页条数 pageSize: any; //每页条数
pageSizeOptions: number[] = [10] //设置每页条数 pageSizeOptions: number[] = [10]; //设置每页条数
PageNumber: any; //第几页 PageNumber: any; //第几页
IsNewData = '' //预案维护更新或者新增 IsNewData = ""; //预案维护更新或者新增
IsNewCompanyData = ''//单位维护更新或者新增 IsNewCompanyData = ""; //单位维护更新或者新增
displayedColumns: string[] = [
"state",
"isFollowed",
"unitname",
"integrity",
"level",
"jurisdictionsquadron",
"unittype",
"plantype",
"passstate",
"operation",
];
allorganizations: any; //所有组织机构
allunittype: any; //所有单位类型
tabledataSource: any; //表格数据
displayedColumns: string[] = ['state', 'unitname', 'integrity', 'level', 'jurisdictionsquadron', 'unittype', 'plantype', 'passstate', 'projectlevel', 'operation']; organizationName: any; //当前单位组织机构名称
allorganizations: any //所有组织机构 preparelevels: any;
allunittype: any //所有单位类型 integritySort: any = "desc"; //完整度排序
tabledataSource: any //表格数据 haveyuan; //有无预案
organizationName: any //当前单位组织机构名称
preparelevels: any
integritySort: any //完整度排序
haveyuan//有无预案
colorRgb(sColor) { colorRgb(sColor) {
var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/; var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
var sColor = sColor.toLowerCase(); var sColor = sColor.toLowerCase();
@ -84,7 +116,7 @@ export class EntryPlanComponent implements OnInit {
var strHex = "#"; var strHex = "#";
for (var i = 0; i < aColor.length; i++) { for (var i = 0; i < aColor.length; i++) {
var hex: any = Number(aColor[i]).toString(16); var hex: any = Number(aColor[i]).toString(16);
hex = hex < 10 ? 0 + '' + hex : hex;// 保证每个rgb的值为2位 hex = hex < 10 ? 0 + "" + hex : hex; // 保证每个rgb的值为2位
if (hex === "0") { if (hex === "0") {
hex += hex; hex += hex;
} }
@ -101,7 +133,7 @@ export class EntryPlanComponent implements OnInit {
} else if (aNum.length === 3) { } else if (aNum.length === 3) {
var numHex = "#"; var numHex = "#";
for (var i = 0; i < aNum.length; i += 1) { for (var i = 0; i < aNum.length; i += 1) {
numHex += (aNum[i] + aNum[i]); numHex += aNum[i] + aNum[i];
} }
return numHex; return numHex;
} }
@ -110,7 +142,7 @@ export class EntryPlanComponent implements OnInit {
} }
} }
gradientColor(startColor, endColor, step) { gradientColor(startColor, endColor, step) {
let _this = this let _this = this;
let startRGB = _this.colorRgb(startColor); //转换为rgb数组模式 let startRGB = _this.colorRgb(startColor); //转换为rgb数组模式
let startR = startRGB[0]; let startR = startRGB[0];
let startG = startRGB[1]; let startG = startRGB[1];
@ -128,289 +160,333 @@ export class EntryPlanComponent implements OnInit {
var colorArr = []; var colorArr = [];
for (var i = 0; i < step; i++) { for (var i = 0; i < step; i++) {
//计算每一步的hex值 //计算每一步的hex值
var hex = _this.colorHex('rgb(' + parseInt((sR * i + startR)) + ',' + parseInt((sG * i + startG)) + ',' + parseInt((sB * i + startB)) + ')'); var hex = _this.colorHex(
"rgb(" +
parseInt(sR * i + startR) +
"," +
parseInt(sG * i + startG) +
"," +
parseInt(sB * i + startB) +
")"
);
colorArr.push(hex); colorArr.push(hex);
} }
return colorArr; return colorArr;
} }
integrity(width) { integrity(width) {
let _this = this let _this = this;
let style: any = {} let style: any = {};
style.width = width + '%'; style.width = width + "%";
if (width < 30) { if (width < 30) {
let colorArr = this.gradientColor('#D50000', '#E53935', 30); let colorArr = this.gradientColor("#D50000", "#E53935", 30);
for (let i = 0; i < 30; i++) { for (let i = 0; i < 30; i++) {
if (i == width) { if (i == width) {
style.background = colorArr[i] style.background = colorArr[i];
} }
} }
} }
if (width >= 30 && width < 60) { if (width >= 30 && width < 60) {
let colorArr = this.gradientColor('#FF9800', '#E65100', 30); let colorArr = this.gradientColor("#FF9800", "#E65100", 30);
for (let i = 30; i < 60; i++) { for (let i = 30; i < 60; i++) {
if (i == width) { if (i == width) {
style.background = colorArr[i - 30] style.background = colorArr[i - 30];
} }
} }
} }
if (width >= 60) { if (width >= 60) {
let colorArr = this.gradientColor('#81C784', '#2E7D32', 41); let colorArr = this.gradientColor("#81C784", "#2E7D32", 41);
for (let i = 60; i <= 100; i++) { for (let i = 60; i <= 100; i++) {
if (i == width) { if (i == width) {
style.background = colorArr[i - 60] style.background = colorArr[i - 60];
} }
} }
} }
return style return style;
} }
integrityDetails(width, zong) { integrityDetails(width, zong) {
let style: any = {} let style: any = {};
style.width = (width / zong) * 100 + '%'; style.width = (width / zong) * 100 + "%";
return style return style;
} }
level level;
ngOnInit(): void { ngOnInit(): void {
if (window.matchMedia("(max-width: 1400px)").matches) { if (window.matchMedia("(max-width: 1400px)").matches) {
this.pcMore = false this.pcMore = false;
this.padMore = true this.padMore = true;
this.pcfind = false this.pcfind = false;
this.padjt = true this.padjt = true;
} else { } else {
this.pcfind = true this.pcfind = true;
this.pcMore = true this.pcMore = true;
this.padMore = false this.padMore = false;
this.padjt = false this.padjt = false;
} }
this.getunitdata(); this.getunitdata();
this.getOrganizations(); this.getOrganizations();
this.getUnittype(); this.getUnittype();
this.getAllPlanInfo(); this.getAllPlanInfo();
this.level = sessionStorage.getItem("level"); this.level = sessionStorage.getItem("level");
if (this.level == "0") {//如果是总队 if (this.level == "0") {
//如果是总队
this.preparelevels = [ this.preparelevels = [
{ name: "总队", value: "1" }, { name: "总队", value: "1" },
{ name: "支队", value: "2" }, { name: "支队", value: "2" },
{ name: "大队", value: "4" }, { name: "大队", value: "4" },
{ name: "中队", value: "8" } { name: "中队", value: "8" },
] ];
} }
if (this.level == "1") {//如果是支队 if (this.level == "1") {
//如果是支队
this.preparelevels = [ this.preparelevels = [
{ name: "支队", value: "2" }, { name: "支队", value: "2" },
{ name: "大队", value: "4" }, { name: "大队", value: "4" },
{ name: "中队", value: "8" } { name: "中队", value: "8" },
] ];
} }
if (this.level == "2") {//如果是大队 if (this.level == "2") {
//如果是大队
this.preparelevels = [ this.preparelevels = [
{ name: "大队", value: "4" }, { name: "大队", value: "4" },
{ name: "中队", value: "8" } { name: "中队", value: "8" },
] ];
} }
if (this.level == "3") {//如果是中队 if (this.level == "3") {
this.preparelevels = [ //如果是中队
{ name: "中队", value: "8" } this.preparelevels = [{ name: "中队", value: "8" }];
] }
} }
} pcMore; //pc更多
pcMore//pc更多 pcput = false; //pc收起
pcput = false//pc收起 pcfind; //pc查询
pcfind//pc查询 padjt = false;
padjt = false padMore = true; //pad收缩控制
padMore = true//pad收缩控制 padput = false; //pad收起按钮
padput = false//pad收起按钮 imgsrcopen = "../../../assets/images/routdown2.png";
imgsrcopen = "../../../assets/images/routdown2.png" imgsrcdown = "../../../assets/images/routup2.png";
imgsrcdown = "../../../assets/images/routup2.png"
pcInfo() { pcInfo() {
this.pcMore = !this.pcMore this.pcMore = !this.pcMore;
this.pcput = !this.pcput this.pcput = !this.pcput;
} }
padInfo() { padInfo() {
this.padMore = !this.padMore this.padMore = !this.padMore;
this.padput = !this.padput this.padput = !this.padput;
} }
//得到当前单位信息 //得到当前单位信息
getunitdata() { getunitdata() {
this.http.get("/api/Account/Profiles").subscribe( this.http.get("/api/Account/Profiles").subscribe((data: any) => {
(data: any) => { this.organizationName = data.organizationName;
this.organizationName = data.organizationName });
}
)
} }
treedata: any //组织机构树型数据 treedata: any; //组织机构树型数据
newArr: any = [] newArr: any = [];
newallorganizations: any //用于存储在原始数据基础上的每个机构增加children字段 newallorganizations: any; //用于存储在原始数据基础上的每个机构增加children字段
//得到当前单位所在组织机构的tree型数据 //得到当前单位所在组织机构的tree型数据
getpresentOrganization() { getpresentOrganization() {
this.newallorganizations = this.allorganizations this.newallorganizations = this.allorganizations;
this.newallorganizations.forEach(item => { this.newallorganizations.forEach((item) => {
item.children = [] item.children = [];
this.newallorganizations.forEach(element => { this.newallorganizations.forEach((element) => {
if (element.parentId == item.id) { if (element.parentId == item.id) {
item.children.push(element) item.children.push(element);
} }
}); });
}); });
this.http.get("/api/Account/Profiles").subscribe( this.http.get("/api/Account/Profiles").subscribe((data: any) => {
(data: any) => { this.organizationName = data.organizationName;
this.organizationName = data.organizationName
if (this.organizationName) { if (this.organizationName) {
this.newallorganizations.forEach(item => { this.newallorganizations.forEach((item) => {
if (item.name == this.organizationName) { if (item.name == this.organizationName) {
this.dataSource.data = [item] this.dataSource.data = [item];
} }
}); });
} else { } else {
this.dataSource.data = this.tree.toTree(this.treedata); this.dataSource.data = this.tree.toTree(this.treedata);
} }
} });
)
} }
//获得所有组织机构 //获得所有组织机构
getOrganizations() { getOrganizations() {
this.http.get('/api/Organizations').subscribe( this.http.get("/api/Organizations").subscribe((data: any) => {
(data: any) => { this.allorganizations = data;
this.allorganizations = data
this.treedata = this.tree.toTree(data); this.treedata = this.tree.toTree(data);
this.getpresentOrganization(); this.getpresentOrganization();
} });
)
} }
//获得所有单位类型 //获得所有单位类型
getUnittype() { getUnittype() {
this.http.get('/api/BuildingTypes/Simple').subscribe( this.http.get("/api/BuildingTypes/Simple").subscribe((data) => {
data => { this.allunittype = data;
this.allunittype = data });
}
)
} }
//分页事件 //分页事件
chagePage(e) { chagePage(e) {
this.PageNumber = e.pageIndex + 1 this.PageNumber = e.pageIndex + 1;
this.getAllPlanInfo(); this.getAllPlanInfo();
} }
//辖区中队div是否显示 //辖区中队div是否显示
isorganizationbox: boolean = false isorganizationbox: boolean = false;
//点击辖区中队树,将选择的辖区中队添加到变量 //点击辖区中队树,将选择的辖区中队添加到变量
add(node) { add(node) {
this.isorganizationbox = false this.isorganizationbox = false;
this.js = node.name this.js = node.name;
this.jsId = node.id this.jsId = node.id;
} }
//打开辖区中队隐藏框 //打开辖区中队隐藏框
openorganizationbox() { openorganizationbox() {
this.isorganizationbox = true this.isorganizationbox = true;
} }
//关闭出现的组织机构div //关闭出现的组织机构div
closediv() { closediv() {
this.isorganizationbox = false this.isorganizationbox = false;
} }
allPlanInfo: any //存储所有预案信息 allPlanInfo: any; //存储所有预案信息
//获得所有预案信息 //获得所有预案信息
templatePlan: boolean = false//模板录入预案checkbox templatePlan: boolean = false; //模板录入预案checkbox
customPlan: boolean = false//自定义预案 customPlan: boolean = false; //自定义预案
getAllPlanInfo() { getAllPlanInfo() {
let planmode = [] let follow;
this.templatePlan ? planmode.push(2) : null if (!this.isFollowed) {
this.customPlan ? planmode.push(4) : null follow = "";
let reservePlanType }
this.reservePlanType ? reservePlanType = JSON.parse(JSON.stringify(this.reservePlanType)) : reservePlanType = '' if (this.isFollowed == "0") {
follow = false;
}
if (this.isFollowed == "1") {
follow = true;
}
let planmode = [];
this.templatePlan ? planmode.push(2) : null;
this.customPlan ? planmode.push(4) : null;
let reservePlanType;
this.reservePlanType
? (reservePlanType = JSON.parse(JSON.stringify(this.reservePlanType)))
: (reservePlanType = "");
if (this.reservePlanType && this.reservePlanType.length != 0) { if (this.reservePlanType && this.reservePlanType.length != 0) {
reservePlanType = eval(this.reservePlanType.join("|")) reservePlanType = eval(this.reservePlanType.join("|"));
} }
let singleSignOn = sessionStorage.getItem("singleSignOn");
let paramsdata: any = { let paramsdata: any = {
CompanyName: this.companyName || '', CompanyName: this.companyName || "",
OrganizationId: this.jsId || '', OrganizationId: this.jsId || "",
HasChildrenOrganization: this.jscheck || '', HasChildrenOrganization: this.jscheck || "",
BuildingTypeId: this.unittype || '', BuildingTypeId: this.unittype || "",
PlanType: reservePlanType || '', PlanType: reservePlanType || "",
AuditStatus: this.toExamine || '', AuditStatus: this.toExamine || "",
PlanLevel: this.preparelevel || '', PlanLevel: this.preparelevel || "",
HasChildrenPlanLevel: this.plcheck || '', HasChildrenPlanLevel: this.plcheck || "",
PageNumber: this.PageNumber || '1', IsCompanyFollow: follow,
PageNumber: this.PageNumber || "1",
PageSize: this.pageSizeOptions[0], PageSize: this.pageSizeOptions[0],
Sort: this.integritySort ? 'integrityscore' : '', Sort: this.integritySort ? "integrityscore" : "",
SortType: this.integritySort || '', SortType: this.integritySort || "",
HasPlanComponents: this.haveyuan || '', HasPlanComponents: this.haveyuan || "",
PlanCategories: this.planCategory, PlanCategories: this.planCategory,
IsNewData: this.IsNewData, IsNewData: this.IsNewData,
IsNewCompanyData: this.IsNewCompanyData, IsNewCompanyData: this.IsNewCompanyData,
PlanModes: planmode PlanModes: planmode,
} CompanyNames: singleSignOn
this.http.get("/api/Plans", { params: paramsdata }).subscribe((data: any) => { ? [
"大连路地铁站",
this.length = data.totalCount "东方渔人码头投资开发有限公司",
this.allPlanInfo = data "上海孚宝港务有限公司",
"上海国际会议中心",
this.tabledataSource = data.items ]
}) : [],
};
this.http
.get("/api/Plans", { params: paramsdata })
.subscribe((data: any) => {
this.length = data.totalCount;
this.allPlanInfo = data;
this.tabledataSource = data.items;
console.log("预案列表", this.tabledataSource);
});
} }
operation = true operation = true;
//查看预案按钮跳转 //查看预案按钮跳转
routerTo(element) { routerTo(element) {
this.level == '0' ? this.operation = false : true this.level == "0" ? (this.operation = false) : true;
sessionStorage.setItem("companyName", element.company.name) sessionStorage.setItem("companyName", element.company.name);
window.open(`/planManagement/entryPlandetail?unitId=${element.company.id}&unitTypeId=${element.company.buildingTypes.length == 0 ? null : element.company.buildingTypes[0].id}&operation=${this.operation}&pagetype=entryplan&unitName=${element.company.name}&orName=${element.company.organizationName}&orId=${element.company.organizationId}&unitType=${element.company.buildingTypes.length == 0 ? null : element.company.buildingTypes[0].name}&unitAdd=${element.company.address}&usci=${element.company.usci}`); const buildingType = element.company.buildingTypes[0] || {};
const unitTypeId = buildingType.id || null;
const unitTypeName = buildingType.name || null;
const params = new URLSearchParams({
unitId: element.company.id.toString(), // 确保是字符串
unitTypeId: unitTypeId ? unitTypeId.toString() : "", // 确保是字符串
operation: this.operation.toString(), // 将 boolean 转换为字符串
pagetype: "entryplan",
unitName: element.company.name.toString(), // 确保是字符串
orName: element.company.organizationName.toString(), // 确保是字符串
orId: element.company.organizationId.toString(), // 确保是字符串
unitType: unitTypeName ? unitTypeName.toString() : "", // 确保是字符串
unitAdd: element.company.address.toString(), // 确保是字符串
usci: element.company.usci.toString(), // 确保是字符串
});
window.open(`/planManagement/entryPlandetail?${params.toString()}`);
} }
//查询 //查询
onSubmit(value) { onSubmit(value) {
this.PageNumber = 1 this.PageNumber = 1;
this.pageEvent.pageIndex = 0 this.pageEvent.pageIndex = 0;
this.getAllPlanInfo() this.getAllPlanInfo();
} }
templatePlanChange($event, type) { templatePlanChange($event, type) {
if (type == 1) { if (type == 1) {
this.templatePlan = $event this.templatePlan = $event;
} else if (type == 2) { } else if (type == 2) {
this.customPlan = $event this.customPlan = $event;
} }
if (this.templatePlan || this.customPlan) { if (this.templatePlan || this.customPlan) {
this.reservePlanType = ['16'] this.reservePlanType = ["16"];
} else { } else {
this.reservePlanType = [] this.reservePlanType = [];
} }
} }
companyName: any //单位名称 companyName: any; //单位名称
js: any //所选组织机构 js: any; //所选组织机构
jsId: any //所选组织机构的id jsId: any; //所选组织机构的id
jscheck: boolean //所选组织机构勾选框 jscheck: boolean; //所选组织机构勾选框
unittype: any //单位类型 unittype: any; //单位类型
reservePlanType: any //预案类型 reservePlanType: any; //预案类型
toExamine: any //审核状态 toExamine: any; //审核状态
preparelevel: any //编制级别 preparelevel: any; //编制级别
plcheck: boolean //编制级别勾选框 plcheck: boolean; //编制级别勾选框
planCategory = [] //预案级别 planCategory = []; //预案级别
isFollowed; //重点单位
//重置 //重置
reset() { reset() {
this.IsNewCompanyData = '' this.IsNewCompanyData = "";
this.IsNewData = '' this.IsNewData = "";
this.companyName = '' this.companyName = "";
this.js = '' this.js = "";
this.jsId = '' this.jsId = "";
this.jscheck = false this.jscheck = false;
this.unittype = '' this.unittype = "";
this.reservePlanType = '' this.reservePlanType = "";
this.toExamine = '' this.toExamine = "";
this.preparelevel = '' this.preparelevel = "";
this.integritySort = '' this.integritySort = "";
this.plcheck = false this.plcheck = false;
this.haveyuan = '' this.haveyuan = "";
this.planCategory = [] this.isFollowed = "";
this.planCategory = [];
//重新获取初始化列表 //重新获取初始化列表
// console.log(this.pageEvent) // console.log(this.pageEvent)
this.pageEvent.pageIndex = 0 this.pageEvent.pageIndex = 0;
this.PageNumber = 1 this.PageNumber = 1;
this.templatePlan = false this.templatePlan = false;
this.customPlan = false this.customPlan = false;
this.getAllPlanInfo(); this.getAllPlanInfo();
} }
} }

47
src/app/plan-management/meet-plan/meet-plan.component.html

@ -21,8 +21,10 @@
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
<mat-checkbox style="margin-left: 6px;" [(ngModel)]="plcheck" name="plcheck">包含下级</mat-checkbox> <mat-checkbox style="margin-left: 6px;" [(ngModel)]="plcheck" name="plcheck">包含下级</mat-checkbox>
<span *ngIf="padMore" style="margin-left: 20px; color: #0080FF;" (click)='padInfo()'>更多筛选条件<img [src]='imgsrcopen'style="width: 10px;height: 6px;margin:0 0 3px 2px;"> </span> <span *ngIf="padMore" style="margin-left: 20px; color: #0080FF;" (click)='padInfo()'>更多筛选条件<img
<span *ngIf="padput" style="margin-left: 10px; color: #0080FF;" (click)='padInfo()'>收起<img [src]='imgsrcdown'style="width: 10px;height: 6px;margin:0 0 3px 2px;"> </span> [src]='imgsrcopen' style="width: 10px;height: 6px;margin:0 0 3px 2px;"> </span>
<span *ngIf="padput" style="margin-left: 10px; color: #0080FF;" (click)='padInfo()'>收起<img [src]='imgsrcdown'
style="width: 10px;height: 6px;margin:0 0 3px 2px;"> </span>
</div> </div>
@ -45,8 +47,10 @@
<mat-form-field class="example-full-width"> <mat-form-field class="example-full-width">
<input matInput placeholder="请输入添加人" name="addname" autocomplete="off" [(ngModel)]="addname"> <input matInput placeholder="请输入添加人" name="addname" autocomplete="off" [(ngModel)]="addname">
</mat-form-field> </mat-form-field>
<span *ngIf="pcMore" style="margin-left: 15px; color: #0080FF; cursor: pointer;" (click)='pcInfo()'>更多筛选条件<img [src]='imgsrcopen'style="width: 10px;height: 6px;margin:0 0 3px 2px;"> </span> <span *ngIf="pcMore" style="margin-left: 15px; color: #0080FF; cursor: pointer;" (click)='pcInfo()'>更多筛选条件<img
<span *ngIf="pcput" style="margin-left: 10px; color: #0080FF; cursor: pointer;" (click)='pcInfo()'>收起<img [src]='imgsrcdown'style="width: 10px;height: 6px;margin:0 0 3px 2px;"> </span> [src]='imgsrcopen' style="width: 10px;height: 6px;margin:0 0 3px 2px;"> </span>
<span *ngIf="pcput" style="margin-left: 10px; color: #0080FF; cursor: pointer;" (click)='pcInfo()'>收起<img
[src]='imgsrcdown' style="width: 10px;height: 6px;margin:0 0 3px 2px;"> </span>
</div> </div>
<div class="queryField" *ngIf="pcfind"> <div class="queryField" *ngIf="pcfind">
<button mat-raised-button color="primary">查询</button> <button mat-raised-button color="primary">查询</button>
@ -58,7 +62,8 @@
<input type="date" matInput name="addtime" autocomplete="off" [(ngModel)]="addtime"> <input type="date" matInput name="addtime" autocomplete="off" [(ngModel)]="addtime">
</mat-form-field> </mat-form-field>
<!-- <mat-icon aria-hidden="false" style="position: relative;right: 120px;top: 5px;">arrow forward</mat-icon> --> <!-- <mat-icon aria-hidden="false" style="position: relative;right: 120px;top: 5px;">arrow forward</mat-icon> -->
<mat-icon *ngIf="padjt" aria-hidden="false" style="position: relative;right: 120px;top: 5px;" id="padshow">arrow forward</mat-icon> <mat-icon *ngIf="padjt" aria-hidden="false" style="position: relative;right: 120px;top: 5px;"
id="padshow">arrow forward</mat-icon>
<span style="margin-left: 15px;" id="pcshow" *ngIf="!padMore&&!padjt">🠊</span> <span style="margin-left: 15px;" id="pcshow" *ngIf="!padMore&&!padjt">🠊</span>
<mat-form-field class="example-full-width" style="margin-left: 10px;"> <mat-form-field class="example-full-width" style="margin-left: 10px;">
<input type="date" matInput name="endtime" autocomplete="off" [(ngModel)]="endtime"> <input type="date" matInput name="endtime" autocomplete="off" [(ngModel)]="endtime">
@ -85,9 +90,11 @@
</mat-form-field> </mat-form-field>
</div> </div>
<div class="queryField" *ngIf="!padMore&&!pcMore"> <div class="queryField" *ngIf="!padMore&&!pcMore">
<input type="radio" style="height: 16px;width: 16px;position: relative;top: 2px;" name="whgx" [value]='true' [(ngModel)]="IsNewData"> <input type="radio" style="height: 16px;width: 16px;position: relative;top: 2px;" name="whgx" [value]='true'
[(ngModel)]="IsNewData">
<label style="margin-right: 10px;margin-left: 2px;">新增</label> <label style="margin-right: 10px;margin-left: 2px;">新增</label>
<input type="radio" style="height: 16px;width: 16px;position: relative;top: 2px;" name="whgx" [value]='false' [(ngModel)]="IsNewData"> <input type="radio" style="height: 16px;width: 16px;position: relative;top: 2px;" name="whgx" [value]='false'
[(ngModel)]="IsNewData">
<label style="margin-right: 10px;margin-left: 2px;">维护更新</label> <label style="margin-right: 10px;margin-left: 2px;">维护更新</label>
</div> </div>
@ -101,7 +108,8 @@
<!-- <mat-divider></mat-divider> --> <!-- <mat-divider></mat-divider> -->
<div class="newadd"> <div class="newadd">
<div> <div>
<button *ngIf="levels=='0'" mat-raised-button color="primary" (click)='addunit()'><img style="margin-bottom: 3px;" src="../../../assets/images/newadd.png"> 新增</button> <button *ngIf="levels=='0'" mat-raised-button color="primary" (click)='addunit()'><img style="margin-bottom: 3px;"
src="../../../assets/images/newadd.png"> 新增</button>
<!-- <button mat-raised-button color="primary" (click)='word("table","ceshi.doc")'></button> --> <!-- <button mat-raised-button color="primary" (click)='word("table","ceshi.doc")'></button> -->
</div> </div>
@ -158,29 +166,32 @@
</ng-container> </ng-container>
<ng-container matColumnDef="projectlevel"> <ng-container matColumnDef="projectlevel">
<th mat-header-cell *matHeaderCellDef style="width: 8%;">编制级别</th> <th mat-header-cell *matHeaderCellDef style="width: 8%;">编制级别</th>
<td mat-cell *matCellDef="let element">{{element.planLevel=='1'?'总队':element.planLevel=='2'?'支队':element.planLevel=='4'?'大队':'中队'}}</td> <td mat-cell *matCellDef="let element">
{{element.planLevel=='1'?'总队':element.planLevel=='2'?'支队':element.planLevel=='4'?'大队':'中队'}}</td>
</ng-container> </ng-container>
<ng-container matColumnDef="weihustate"> <ng-container matColumnDef="auditstate">
<th mat-header-cell *matHeaderCellDef style="width: 8%;">维护审核</th> <th mat-header-cell *matHeaderCellDef style="width: 8%;">审核状态</th>
<td mat-cell *matCellDef="let element">{{element.maintenanceVerifyState}}</td> <td mat-cell *matCellDef="let element">
{{element.auditStatus | auditState}}
</td>
</ng-container> </ng-container>
<ng-container matColumnDef="operation"> <ng-container matColumnDef="operation">
<th mat-header-cell *matHeaderCellDef style="width: 20%;">操作</th> <th mat-header-cell *matHeaderCellDef style="width: 20%;">操作</th>
<td mat-cell *matCellDef="let element" style="white-space: nowrap;cursor: pointer;"> <td mat-cell *matCellDef="let element" style="white-space: nowrap;cursor: pointer;">
<span style="color: blue;" (click)='openPlan(element)'>查看预案</span> <span style="color: blue;" (click)='openPlan(element)'>查看预案</span>
<span style="color: blue;margin-left: 4px;" (click)="submitAudit(element)" *ngIf="(element.isNewData && element.newVerifyState=='未提交审核')||(!element.isNewData&&(element.maintenanceVerifyState=='审核通过'||element.maintenanceVerifyState=='未提交审核'))">提交审核</span> <span style="color: blue;margin-left: 4px;" (click)="submitAudit(element)"
<span style="color: blue;margin-left: 4px;" (click)="cancelAudit(element)" *ngIf="element.auditStatus == 1||element.auditStatus == 16">撤销审核</span> *ngIf="(element.isNewData && element.newVerifyState=='未提交审核')||(!element.isNewData&&(element.maintenanceVerifyState=='审核通过'||element.maintenanceVerifyState=='未提交审核'))">提交审核</span>
<span style="color: blue;margin-left: 4px;" (click)="cancelAudit(element)"
*ngIf="element.auditStatus == 1||element.auditStatus == 16">撤销审核</span>
<span style="color: blue;margin-left: 4px;" (click)="auditResult(element)">审批结果</span> <span style="color: blue;margin-left: 4px;" (click)="auditResult(element)">审批结果</span>
<span style="color: blue;margin-left: 4px;" (click)='readFile(element)'>下载</span> <span style="color: blue;margin-left: 4px;" (click)='readFile(element)'>下载</span>
<span style="color: red;margin-left: 4px" (click)='deletePlan(element.id)' *ngIf="element.auditStatus == 8"> 删除</span> <span style="color: red;margin-left: 4px" (click)='deletePlan(element.id)'> 删除</span>
</td> </td>
</ng-container> </ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr> <tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr> <tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
</table> </table>
<mat-paginator pageEvent [length]="length" <mat-paginator pageEvent [length]="length" [pageSize]="pageSize" [pageSizeOptions]="pageSizeOptions"
[pageSize]="pageSize"
[pageSizeOptions]="pageSizeOptions"
(page)="changePage($event)"> (page)="changePage($event)">
</mat-paginator> </mat-paginator>

6
src/app/plan-management/meet-plan/meet-plan.component.ts

@ -84,7 +84,7 @@ export class MeetPlanComponent implements OnInit {
preparelevels: any preparelevels: any
plcheck: boolean //编制级别勾选框 plcheck: boolean //编制级别勾选框
IsNewData = '' //维护更新活新增 IsNewData = '' //维护更新活新增
displayedColumns: string[] = ['state','unitname', 'level', 'addname', 'addtime', 'plantype', 'isopen', 'projectlevel','passstate','weihustate', 'operation']; displayedColumns: string[] = ['state', 'unitname', 'level', 'addname', 'addtime', 'plantype', 'isopen', 'projectlevel', 'passstate', 'auditstate', 'operation'];
tabledataSource tabledataSource
typePlan//新预案类型 typePlan//新预案类型
unitname//预案名称 unitname//预案名称
@ -215,9 +215,9 @@ export class MeetPlanComponent implements OnInit {
const config = new MatSnackBarConfig(); const config = new MatSnackBarConfig();
config.verticalPosition = 'top'; config.verticalPosition = 'top';
config.duration = 3000 config.duration = 3000
/* if(element.auditStatus == 4){ if (element.auditStatus == 4 || element.auditStatus == 32) {
this.snackBar.open('审核退回的预案需要修改后方可再次提交审核!', '确定', config); this.snackBar.open('审核退回的预案需要修改后方可再次提交审核!', '确定', config);
} */ }
this.http.put(`/api/PlanComponentsMajor/${element.id}/Commit`, "").subscribe(data => { this.http.put(`/api/PlanComponentsMajor/${element.id}/Commit`, "").subscribe(data => {
this.getAlltabledate() this.getAlltabledate()
}, err => { }, err => {

47
src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.html

@ -28,8 +28,10 @@
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
<mat-checkbox style="margin-left: 6px;" [(ngModel)]="plcheck" name="plcheck">包含下级</mat-checkbox> <mat-checkbox style="margin-left: 6px;" [(ngModel)]="plcheck" name="plcheck">包含下级</mat-checkbox>
<span *ngIf="padMore" style="margin-left: 10px; color: #0080FF;" (click)='padInfo()'>更多筛选条件<img [src]='imgsrcopen'style="width: 10px;height: 6px;margin:0 0 3px 2px;"> </span> <span *ngIf="padMore" style="margin-left: 10px; color: #0080FF;" (click)='padInfo()'>更多筛选条件<img
<span *ngIf="padput" style="margin-left: 10px; color: #0080FF;" (click)='padInfo()'>收起<img [src]='imgsrcdown'style="width: 10px;height: 6px;margin:0 0 3px 2px;"> </span> [src]='imgsrcopen' style="width: 10px;height: 6px;margin:0 0 3px 2px;"> </span>
<span *ngIf="padput" style="margin-left: 10px; color: #0080FF;" (click)='padInfo()'>收起<img [src]='imgsrcdown'
style="width: 10px;height: 6px;margin:0 0 3px 2px;"> </span>
</div> </div>
<div class="queryField" *ngIf="!pcfind"> <div class="queryField" *ngIf="!pcfind">
<button mat-raised-button color="primary">查询</button> <button mat-raised-button color="primary">查询</button>
@ -47,8 +49,10 @@
<mat-form-field> <mat-form-field>
<input matInput placeholder="请输入预案类型" name="reservePlanType" autocomplete="off" [(ngModel)]="typePlan"> <input matInput placeholder="请输入预案类型" name="reservePlanType" autocomplete="off" [(ngModel)]="typePlan">
</mat-form-field> </mat-form-field>
<span *ngIf="pcMore" style="margin-left: 15px; color: #0080FF; cursor: pointer;" (click)='pcInfo()'>更多筛选条件<img [src]='imgsrcopen'style="width: 10px;height: 6px;margin:0 0 3px 2px;"> </span> <span *ngIf="pcMore" style="margin-left: 15px; color: #0080FF; cursor: pointer;" (click)='pcInfo()'>更多筛选条件<img
<span *ngIf="pcput" style="margin-left: 10px; color: #0080FF; cursor: pointer;" (click)='pcInfo()'>收起<img [src]='imgsrcdown'style="width: 10px;height: 6px;margin:0 0 3px 2px;"> </span> [src]='imgsrcopen' style="width: 10px;height: 6px;margin:0 0 3px 2px;"> </span>
<span *ngIf="pcput" style="margin-left: 10px; color: #0080FF; cursor: pointer;" (click)='pcInfo()'>收起<img
[src]='imgsrcdown' style="width: 10px;height: 6px;margin:0 0 3px 2px;"> </span>
</div> </div>
<div class="queryField" *ngIf="pcfind"> <div class="queryField" *ngIf="pcfind">
@ -61,7 +65,8 @@
<input type="date" matInput name="addtime" autocomplete="off" [(ngModel)]="addtime"> <input type="date" matInput name="addtime" autocomplete="off" [(ngModel)]="addtime">
</mat-form-field> </mat-form-field>
<!-- <mat-icon aria-hidden="false" style="position: relative;right: 120px;top: 5px;">arrow forward</mat-icon> --> <!-- <mat-icon aria-hidden="false" style="position: relative;right: 120px;top: 5px;">arrow forward</mat-icon> -->
<mat-icon *ngIf="padjt" aria-hidden="false" style="position: relative;right: 120px;top: 5px;" id="padshow">arrow forward</mat-icon> <mat-icon *ngIf="padjt" aria-hidden="false" style="position: relative;right: 120px;top: 5px;"
id="padshow">arrow forward</mat-icon>
<span style="margin-left: 15px;" id="pcshow" *ngIf="!padMore&&!padjt">🠊</span> <span style="margin-left: 15px;" id="pcshow" *ngIf="!padMore&&!padjt">🠊</span>
<mat-form-field class="example-full-width" style="margin-left: 10px;"> <mat-form-field class="example-full-width" style="margin-left: 10px;">
<input type="date" matInput name="endtime" autocomplete="off" [(ngModel)]="endtime"> <input type="date" matInput name="endtime" autocomplete="off" [(ngModel)]="endtime">
@ -80,9 +85,11 @@
</mat-form-field> </mat-form-field>
</div> </div>
<div class="queryField" *ngIf="!padMore&&!pcMore"> <div class="queryField" *ngIf="!padMore&&!pcMore">
<input type="radio" style="height: 16px;width: 16px;position: relative;top: 2px;" name="whgx" [value]='true' [(ngModel)]="IsNewData"> <input type="radio" style="height: 16px;width: 16px;position: relative;top: 2px;" name="whgx" [value]='true'
[(ngModel)]="IsNewData">
<label style="margin-right: 10px;margin-left: 2px;">新增</label> <label style="margin-right: 10px;margin-left: 2px;">新增</label>
<input type="radio" style="height: 16px;width: 16px;position: relative;top: 2px;" name="whgx" [value]='false' [(ngModel)]="IsNewData"> <input type="radio" style="height: 16px;width: 16px;position: relative;top: 2px;" name="whgx" [value]='false'
[(ngModel)]="IsNewData">
<label style="margin-right: 10px;margin-left: 2px;">维护更新</label> <label style="margin-right: 10px;margin-left: 2px;">维护更新</label>
</div> </div>
@ -93,7 +100,8 @@
<!-- <mat-divider></mat-divider> --> <!-- <mat-divider></mat-divider> -->
<div class="newadd"> <div class="newadd">
<div> <div>
<button *ngIf="levels=='0'||levels=='1'" mat-raised-button color="primary" (click)="addunit()"><img style="margin-bottom: 3px;" src="../../../assets/images/newadd.png"> 新增</button> <button *ngIf="levels=='0'||levels=='1'" mat-raised-button color="primary" (click)="addunit()"><img
style="margin-bottom: 3px;" src="../../../assets/images/newadd.png"> 新增</button>
</div> </div>
<div class="progressBox" style="margin-left: 100px;" *ngIf="downloadisLoading"> <div class="progressBox" style="margin-left: 100px;" *ngIf="downloadisLoading">
@ -136,12 +144,8 @@
<td mat-cell *matCellDef="let element">{{element.disasterType}}</td> <td mat-cell *matCellDef="let element">{{element.disasterType}}</td>
</ng-container> </ng-container>
<ng-container matColumnDef="passstate"> <ng-container matColumnDef="passstate">
<th mat-header-cell *matHeaderCellDef style="width: 8%;">新增审核</th> <th mat-header-cell *matHeaderCellDef style="width: 8%;">审核状态</th>
<td mat-cell *matCellDef="let element">{{element.newVerifyState}}</td> <td mat-cell *matCellDef="let element"> {{element.auditStatus | auditState}}</td>
</ng-container>
<ng-container matColumnDef="weihustate">
<th mat-header-cell *matHeaderCellDef style="width: 8%;">维护审核</th>
<td mat-cell *matCellDef="let element">{{element.maintenanceVerifyState}}</td>
</ng-container> </ng-container>
<ng-container matColumnDef="isopen"> <ng-container matColumnDef="isopen">
<th mat-header-cell *matHeaderCellDef style="width: 8%;">是否公开</th> <th mat-header-cell *matHeaderCellDef style="width: 8%;">是否公开</th>
@ -149,26 +153,27 @@
</ng-container> </ng-container>
<ng-container matColumnDef="projectlevel"> <ng-container matColumnDef="projectlevel">
<th mat-header-cell *matHeaderCellDef style="width: 8%;">编制级别</th> <th mat-header-cell *matHeaderCellDef style="width: 8%;">编制级别</th>
<td mat-cell *matCellDef="let element">{{element.planLevel=='1'?'总队':element.planLevel=='2'?'支队':element.planLevel=='4'?'大队':'中队'}}</td> <td mat-cell *matCellDef="let element">
{{element.planLevel=='1'?'总队':element.planLevel=='2'?'支队':element.planLevel=='4'?'大队':'中队'}}</td>
</ng-container> </ng-container>
<ng-container matColumnDef="operation"> <ng-container matColumnDef="operation">
<th mat-header-cell *matHeaderCellDef style="width: 20%;">操作</th> <th mat-header-cell *matHeaderCellDef style="width: 20%;">操作</th>
<td mat-cell *matCellDef="let element" style="white-space: nowrap;cursor: pointer;"> <td mat-cell *matCellDef="let element" style="white-space: nowrap;cursor: pointer;">
<span style="color: blue;" (click)='openPlan(element)'>查看预案</span> <span style="color: blue;" (click)='openPlan(element)'>查看预案</span>
<span style="color: blue;margin-left: 4px;" (click)="submitAudit(element)" *ngIf="(element.isNewData && element.newVerifyState=='未提交审核')||(!element.isNewData&&(element.maintenanceVerifyState=='审核通过'||element.maintenanceVerifyState=='未提交审核'))">提交审核</span> <span style="color: blue;margin-left: 4px;" (click)="submitAudit(element)"
<span style="color: blue;margin-left: 4px;" (click)="cancelAudit(element)" *ngIf="element.auditStatus == 1||element.auditStatus == 16">撤销审核</span> *ngIf="(element.isNewData && element.newVerifyState=='未提交审核')||(!element.isNewData&&(element.maintenanceVerifyState=='审核通过'||element.maintenanceVerifyState=='未提交审核'))">提交审核</span>
<span style="color: blue;margin-left: 4px;" (click)="cancelAudit(element)"
*ngIf="element.auditStatus == 1||element.auditStatus == 16">撤销审核</span>
<span style="color: blue;margin-left: 4px;" (click)="auditResult(element)">审批结果</span> <span style="color: blue;margin-left: 4px;" (click)="auditResult(element)">审批结果</span>
<!-- <span style="color: blue;margin-left: 4px;" *ngIf="element.auditStatus == 2">审核通过</span> --> <!-- <span style="color: blue;margin-left: 4px;" *ngIf="element.auditStatus == 2">审核通过</span> -->
<span style="color: blue;margin-left: 4px;" (click)='readFile(element)'>下载</span> <span style="color: blue;margin-left: 4px;" (click)='readFile(element)'>下载</span>
<span style="color: red;margin-left: 4px" (click)='deletePlan(element.id)' *ngIf="element.auditStatus == 8"> 删除</span> <span style="color: red;margin-left: 4px" (click)='deletePlan(element.id)'> 删除</span>
</td> </td>
</ng-container> </ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr> <tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr> <tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
</table> </table>
<mat-paginator pageEvent [length]="length" <mat-paginator pageEvent [length]="length" [pageSize]="pageSize" [pageSizeOptions]="pageSizeOptions"
[pageSize]="pageSize"
[pageSizeOptions]="pageSizeOptions"
(page)="changePage($event)"> (page)="changePage($event)">
</mat-paginator> </mat-paginator>

854
src/app/plan-management/onetwo-entry-plan/onetwo-entry-plan.component.ts

File diff suppressed because it is too large Load Diff

19
src/app/plan-management/open-plan/open-plan.component.html

@ -66,14 +66,14 @@
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
</div> </div>
<!-- <div class="queryField" *ngIf="!padMore"> <div class="queryField" *ngIf="!padMore">
<mat-checkbox (ngModelChange)="templatePlanChange($event,1)" [(ngModel)]="templatePlan" name="templatePlan"> <mat-checkbox (ngModelChange)="templatePlanChange($event,1)" [(ngModel)]="templatePlan" name="templatePlan">
模板录入预案</mat-checkbox> 模板录入预案</mat-checkbox>
</div> </div>
<div class="queryField" *ngIf="!padMore"> <div class="queryField" *ngIf="!padMore">
<mat-checkbox (ngModelChange)="templatePlanChange($event,2)" [(ngModel)]="customPlan" name="customPlan">自定义预案 <mat-checkbox (ngModelChange)="templatePlanChange($event,2)" [(ngModel)]="customPlan" name="customPlan">自定义预案
</mat-checkbox> </mat-checkbox>
</div> --> </div>
<div class="queryField" *ngIf="pcfind"> <div class="queryField" *ngIf="pcfind">
<button mat-raised-button color="primary">查询</button> <button mat-raised-button color="primary">查询</button>
<button mat-raised-button style="margin-left: 25px;" type="button" (click)="reset()">重置</button> <button mat-raised-button style="margin-left: 25px;" type="button" (click)="reset()">重置</button>
@ -122,15 +122,14 @@
margin: 3px 0 0 3px;" src="../../../assets/images/custom.png" alt=""> margin: 3px 0 0 3px;" src="../../../assets/images/custom.png" alt="">
</td> </td>
</ng-container> </ng-container>
<ng-container matColumnDef="auditStatus">
<th mat-header-cell *matHeaderCellDef>新增审核</th>
<td mat-cell *matCellDef="let element">{{element.newVerifyState}}</td>
</ng-container>
<ng-container matColumnDef="weihuStatus">
<th mat-header-cell *matHeaderCellDef>维护审核</th>
<td mat-cell *matCellDef="let element">{{element.maintenanceVerifyState}}</td>
</ng-container>
<ng-container matColumnDef="auditstate">
<th mat-header-cell *matHeaderCellDef>审核状态</th>
<td mat-cell *matCellDef="let element">
{{element.auditStatus | auditState}}
</td>
</ng-container>
<ng-container matColumnDef="openRange"> <ng-container matColumnDef="openRange">
<th mat-header-cell *matHeaderCellDef>是否公开</th> <th mat-header-cell *matHeaderCellDef>是否公开</th>
<td mat-cell *matCellDef="let element">{{element.openRange}}</td> <td mat-cell *matCellDef="let element">{{element.openRange}}</td>

433
src/app/plan-management/open-plan/open-plan.component.ts

@ -1,38 +1,63 @@
import { Component, OnInit, ViewChild, Inject } from '@angular/core'; import { Component, OnInit, ViewChild, Inject } from "@angular/core";
import { HttpClient } from '@angular/common/http' import { HttpClient } from "@angular/common/http";
import { MatTreeFlatDataSource, MatTreeFlattener } from '@angular/material/tree'; import {
import { MatPaginator } from '@angular/material/paginator'; MatTreeFlatDataSource,
import { FlatTreeControl } from '@angular/cdk/tree'; MatTreeFlattener,
import { FormControl } from '@angular/forms'; } from "@angular/material/tree";
import { Router, ActivatedRoute } from '@angular/router' import { MatPaginator } from "@angular/material/paginator";
import { PageEvent } from '@angular/material/paginator'; import { FlatTreeControl } from "@angular/cdk/tree";
import { MatDialogRef, MatDialog, MAT_DIALOG_DATA } from '@angular/material/dialog'; import { FormControl } from "@angular/forms";
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar'; import { Router, ActivatedRoute } from "@angular/router";
import { TreeService } from '../../http-interceptors/tree.service' import { PageEvent } from "@angular/material/paginator";
import { Viewer } from 'photo-sphere-viewer'; import {
import { ImgDetails, PsViewer } from '../entry-plan-look/entry-plan-look.component'; MatDialogRef,
declare var CryptoJS MatDialog,
MAT_DIALOG_DATA,
} from "@angular/material/dialog";
import { MatSnackBar, MatSnackBarConfig } from "@angular/material/snack-bar";
import { TreeService } from "../../http-interceptors/tree.service";
import { Viewer } from "photo-sphere-viewer";
import {
ImgDetails,
PsViewer,
} from "../entry-plan-look/entry-plan-look.component";
declare var CryptoJS;
@Component({ @Component({
selector: 'app-open-plan', selector: "app-open-plan",
templateUrl: './open-plan.component.html', templateUrl: "./open-plan.component.html",
styleUrls: ['./open-plan.component.scss'] styleUrls: ["./open-plan.component.scss"],
}) })
export class OpenPlanComponent implements OnInit { export class OpenPlanComponent implements OnInit {
constructor(
private http: HttpClient,
private router: Router,
private route: ActivatedRoute,
private tree: TreeService,
public dialog: MatDialog,
public snackBar: MatSnackBar
) {}
constructor(private http: HttpClient, private router: Router, private route: ActivatedRoute, private tree: TreeService, public dialog: MatDialog, public snackBar: MatSnackBar) { } private _transformer = (node, level: number) => {
//初始化tree
private _transformer = (node, level: number) => { //初始化tree
return { return {
expandable: !!node.children && node.children.length > 0, expandable: !!node.children && node.children.length > 0,
name: node.name, name: node.name,
level: level, level: level,
id: node.id, id: node.id,
parentId: node.parentId, parentId: node.parentId,
children: node.children children: node.children,
}; };
} };
treeControl = new FlatTreeControl<any>(node => node.level, node => node.expandable); treeControl = new FlatTreeControl<any>(
treeFlattener = new MatTreeFlattener(this._transformer, node => node.level, node => node.expandable, node => node.children); (node) => node.level,
(node) => node.expandable
);
treeFlattener = new MatTreeFlattener(
this._transformer,
(node) => node.level,
(node) => node.expandable,
(node) => node.children
);
dataSource = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener); dataSource = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener);
myControl = new FormControl(); myControl = new FormControl();
hasChild = (_: number, node: any) => node.expandable; hasChild = (_: number, node: any) => node.expandable;
@ -42,306 +67,342 @@ export class OpenPlanComponent implements OnInit {
paginator: MatPaginator; paginator: MatPaginator;
length: any; //共多少条数据 length: any; //共多少条数据
pageSize: any; //每页条数 pageSize: any; //每页条数
pageSizeOptions: number[] = [10] //设置每页条数 pageSizeOptions: number[] = [10]; //设置每页条数
PageNumber: any; //第几页 PageNumber: any; //第几页
IsNewData = '' //维护更新活新增 IsNewData = ""; //维护更新活新增
displayedColumns: string[] = ['state', 'unitname', 'planname', 'addpeople', 'addtime', 'plantype', 'auditStatus', 'weihuStatus', 'openRange', 'projectlevel', 'operation']; displayedColumns: string[] = [
"state",
"unitname",
"planname",
"addpeople",
"addtime",
"plantype",
"auditstate",
"openRange",
"projectlevel",
"operation",
];
allorganizations: any //所有组织机构 allorganizations: any; //所有组织机构
allunittype: any //所有单位类型 allunittype: any; //所有单位类型
tabledataSource: any //表格数据 tabledataSource: any; //表格数据
preparelevels: any //编制级别 preparelevels: any; //编制级别
ngOnInit(): void { ngOnInit(): void {
if (window.matchMedia("(max-width: 1400px)").matches) { if (window.matchMedia("(max-width: 1400px)").matches) {
this.pcMore = false this.pcMore = false;
this.padMore = true this.padMore = true;
this.pcfind = false this.pcfind = false;
this.padjt = true this.padjt = true;
} else { } else {
this.pcfind = true this.pcfind = true;
this.pcMore = true this.pcMore = true;
this.padMore = false this.padMore = false;
this.padjt = false this.padjt = false;
} }
this.getunitdata(); this.getunitdata();
this.getOrganizations(); this.getOrganizations();
this.getUnittype(); this.getUnittype();
this.getAllPlanInfo(); //得到所有单位 this.getAllPlanInfo(); //得到所有单位
let level = sessionStorage.getItem("level"); let level = sessionStorage.getItem("level");
if (level == "0") {//如果是总队 if (level == "0") {
//如果是总队
this.preparelevels = [ this.preparelevels = [
{ name: "总队", value: "1" }, { name: "总队", value: "1" },
{ name: "支队", value: "2" }, { name: "支队", value: "2" },
{ name: "大队", value: "4" }, { name: "大队", value: "4" },
{ name: "中队", value: "8" } { name: "中队", value: "8" },
] ];
} }
if (level == "1") {//如果是支队 if (level == "1") {
//如果是支队
this.preparelevels = [ this.preparelevels = [
{ name: "支队", value: "2" }, { name: "支队", value: "2" },
{ name: "大队", value: "4" }, { name: "大队", value: "4" },
{ name: "中队", value: "8" } { name: "中队", value: "8" },
] ];
} }
if (level == "2") {//如果是大队 if (level == "2") {
//如果是大队
this.preparelevels = [ this.preparelevels = [
{ name: "大队", value: "4" }, { name: "大队", value: "4" },
{ name: "中队", value: "8" } { name: "中队", value: "8" },
] ];
} }
if (level == "3") {//如果是中队 if (level == "3") {
this.preparelevels = [ //如果是中队
{ name: "中队", value: "8" } this.preparelevels = [{ name: "中队", value: "8" }];
]
} }
} }
pcMore//pc更多 pcMore; //pc更多
pcput = false//pc收起 pcput = false; //pc收起
pcfind//pc查询 pcfind; //pc查询
padjt = false padjt = false;
padMore = true//pad收缩控制 padMore = true; //pad收缩控制
padput = false//pad收起按钮 padput = false; //pad收起按钮
imgsrcopen = "../../../assets/images/routdown2.png" imgsrcopen = "../../../assets/images/routdown2.png";
imgsrcdown = "../../../assets/images/routup2.png" imgsrcdown = "../../../assets/images/routup2.png";
pcInfo() { pcInfo() {
this.pcMore = !this.pcMore this.pcMore = !this.pcMore;
this.pcput = !this.pcput this.pcput = !this.pcput;
} }
padInfo() { padInfo() {
this.padMore = !this.padMore this.padMore = !this.padMore;
this.padput = !this.padput this.padput = !this.padput;
} }
allPlanInfo: any //存储所有预案信息 allPlanInfo: any; //存储所有预案信息
//获得所有预案信息 //获得所有预案信息
IsNewCompanyData = '' IsNewCompanyData = "";
templatePlan: boolean = false//模板录入预案checkbox templatePlan: boolean = false; //模板录入预案checkbox
customPlan: boolean = false//自定义预案 customPlan: boolean = false; //自定义预案
getAllPlanInfo() { getAllPlanInfo() {
let planmode = [] let planmode = [];
this.templatePlan ? planmode.push(2) : null this.templatePlan ? planmode.push(2) : null;
this.customPlan ? planmode.push(4) : null this.customPlan ? planmode.push(4) : null;
let paramsdata: any = { let paramsdata: any = {
CompanyName: this.companyName || '', CompanyName: this.companyName || "",
OrganizationId: '', OrganizationId: "",
HasChildrenOrganization: '', HasChildrenOrganization: "",
BuildingTypeId: this.unittype || '', BuildingTypeId: this.unittype || "",
PlanType: this.reservePlanType || '', PlanType: this.reservePlanType || "",
AuditStatus: '', //审核状态 AuditStatus: "", //审核状态
PlanLevel: this.preparelevel || '', PlanLevel: this.preparelevel || "",
HasChildrenPlanLevel: this.plcheck || '', HasChildrenPlanLevel: this.plcheck || "",
PageNumber: this.PageNumber || '1', PageNumber: this.PageNumber || "1",
PageSize: this.pageSizeOptions[0], PageSize: this.pageSizeOptions[0],
Sort: '', Sort: "",
IsNewData: this.IsNewData, IsNewData: this.IsNewData,
IsNewCompanyData: this.IsNewCompanyData, IsNewCompanyData: this.IsNewCompanyData,
PlanModes: planmode PlanModes: planmode,
} };
this.http.get("/api/PublicPlans", { params: paramsdata }).subscribe((data: any) => { this.http
.get("/api/PublicPlans", { params: paramsdata })
.subscribe((data: any) => {
// console.log(111,data) // console.log(111,data)
this.length = data.totalCount this.length = data.totalCount;
this.allPlanInfo = data this.allPlanInfo = data;
this.tabledataSource = data.items this.tabledataSource = data.items;
}) });
} }
//得到当前单位信息 //得到当前单位信息
getunitdata() { getunitdata() {
this.http.get("/api/Account/Profiles").subscribe( this.http.get("/api/Account/Profiles").subscribe((data: any) => {
(data: any) => { this.organizationName = data.organizationName;
this.organizationName = data.organizationName });
}
)
} }
organizationName: any //当前单位组织机构名称 organizationName: any; //当前单位组织机构名称
treedata: any //组织机构树型数据 treedata: any; //组织机构树型数据
newArr: any = [] newArr: any = [];
newallorganizations: any //用于存储在原始数据基础上的每个机构增加children字段 newallorganizations: any; //用于存储在原始数据基础上的每个机构增加children字段
//得到当前单位所在组织机构的tree型数据 //得到当前单位所在组织机构的tree型数据
getpresentOrganization() { getpresentOrganization() {
this.newallorganizations = this.allorganizations this.newallorganizations = this.allorganizations;
this.newallorganizations.forEach(item => { this.newallorganizations.forEach((item) => {
item.children = [] item.children = [];
this.newallorganizations.forEach(element => { this.newallorganizations.forEach((element) => {
if (element.parentId == item.id) { if (element.parentId == item.id) {
item.children.push(element) item.children.push(element);
} }
}); });
}); });
// console.log(666,this.organizationName) // console.log(666,this.organizationName)
if (this.organizationName) { if (this.organizationName) {
this.newallorganizations.forEach(item => { this.newallorganizations.forEach((item) => {
if (item.name == this.organizationName) { if (item.name == this.organizationName) {
this.dataSource.data = [item] this.dataSource.data = [item];
} }
}); });
} else { } else {
this.dataSource.data = this.tree.toTree(this.treedata); this.dataSource.data = this.tree.toTree(this.treedata);
} }
} }
//获得所有组织机构 //获得所有组织机构
getOrganizations() { getOrganizations() {
this.http.get('/api/Organizations').subscribe( this.http.get("/api/Organizations").subscribe((data: any) => {
(data: any) => { this.allorganizations = data;
this.allorganizations = data
this.treedata = this.tree.toTree(data); this.treedata = this.tree.toTree(data);
this.getpresentOrganization(); this.getpresentOrganization();
} });
)
} }
//获得所有单位类型 //获得所有单位类型
getUnittype() { getUnittype() {
this.http.get('/api/BuildingTypes/Simple').subscribe( this.http.get("/api/BuildingTypes/Simple").subscribe((data) => {
data => { this.allunittype = data;
this.allunittype = data });
}
)
} }
//跳转查看预案页面 公开预案 //跳转查看预案页面 公开预案
routerTo(e) { routerTo(e) {
console.log(e) console.log(e);
if (e.planType == 16 || e.planType == 4 || e.planType == 8) { if (e.planType == 16 || e.planType == 4 || e.planType == 8) {
if (e.planType == 16 && e.attachmentUrls == null) { if (e.planType == 16 && e.attachmentUrls == null) {
window.open(`/planManagement/createplanonlinefive?navIsOpen=false&companyId=${e.companyId}&planName=${e.name}&unitName=${e.company.name}&planCategory=${e.planCategory}&planId=${e.id}&unitTypeId=${e.company.buildingTypes[0].id}&orName=${e.company.organizationName}&orId=${e.company.organizationId}&pattern=false`) window.open(
`/planManagement/createplanonlinefive?navIsOpen=false&companyId=${e.companyId}&planName=${e.name}&unitName=${e.company.name}&planCategory=${e.planCategory}&planId=${e.id}&unitTypeId=${e.company.buildingTypes[0].id}&orName=${e.company.organizationName}&orId=${e.company.organizationId}&pattern=false`
);
} else { } else {
var index = e.attachmentUrls[0].indexOf("\/") var index = e.attachmentUrls[0].indexOf("/");
if (e.attachmentUrls[0].substr(0, index) == 'psw') { if (e.attachmentUrls[0].substr(0, index) == "psw") {
const dialogRef = this.dialog.open(PsViewer, { const dialogRef = this.dialog.open(PsViewer, {
width: '1500px', width: "1500px",
height: '800px', height: "800px",
data: e.attachmentUrls[0] data: e.attachmentUrls[0],
}); });
} else if (e.attachmentUrls[0].substr(e.attachmentUrls[0].length - 3, e.attachmentUrls[0].length) == 'JPG' || e.attachmentUrls[0].substr(e.attachmentUrls[0].length - 3, e.attachmentUrls[0].length) == 'png' || e.attachmentUrls[0].substr(e.attachmentUrls[0].length - 3, e.attachmentUrls[0].length) == 'jpeg' || e.attachmentUrls[0].substr(e.attachmentUrls[0].length - 3, e.attachmentUrls[0].length) == 'jpg') { } else if (
let data = e e.attachmentUrls[0].substr(
const dialogRef = this.dialog.open(ImgDetails, {//调用open方法打开对话框并且携带参数过去 e.attachmentUrls[0].length - 3,
e.attachmentUrls[0].length
) == "JPG" ||
e.attachmentUrls[0].substr(
e.attachmentUrls[0].length - 3,
e.attachmentUrls[0].length
) == "png" ||
e.attachmentUrls[0].substr(
e.attachmentUrls[0].length - 3,
e.attachmentUrls[0].length
) == "jpeg" ||
e.attachmentUrls[0].substr(
e.attachmentUrls[0].length - 3,
e.attachmentUrls[0].length
) == "jpg"
) {
let data = e;
const dialogRef = this.dialog.open(ImgDetails, {
//调用open方法打开对话框并且携带参数过去
data: data.attachmentUrls, data: data.attachmentUrls,
}); });
dialogRef.afterClosed().subscribe(); dialogRef.afterClosed().subscribe();
} else { } else {
let fetchUrl = e.attachmentUrls[0] let fetchUrl = e.attachmentUrls[0];
if (fetchUrl) { if (fetchUrl) {
let suffix = fetchUrl.split('.')[fetchUrl.split('.').length - 1].toLowerCase() let suffix = fetchUrl
if (suffix == 'docx' || suffix == 'doc') { .split(".")
let arr = fetchUrl.split('.') [fetchUrl.split(".").length - 1].toLowerCase();
arr[arr.length - 1] = 'pdf' if (suffix == "docx" || suffix == "doc") {
window.open(`/api/Objects/PlanPlatform/` + arr.join('.')) let arr = fetchUrl.split(".");
} else if (suffix == 'pdf') { arr[arr.length - 1] = "pdf";
window.open(`/api/Objects/PlanPlatform/` + fetchUrl) window.open(`/api/Objects/PlanPlatform/` + arr.join("."));
} else if (suffix == "pdf") {
window.open(`/api/Objects/PlanPlatform/` + fetchUrl);
} else { } else {
let config = new MatSnackBarConfig(); let config = new MatSnackBarConfig();
config.verticalPosition = 'top'; config.verticalPosition = "top";
config.duration = 3000 config.duration = 3000;
this.snackBar.open('该文件类型暂不支持在线查看', '确定', config); this.snackBar.open("该文件类型暂不支持在线查看", "确定", config);
} }
} }
} }
} }
} }
if (e.planMode == 2 && e.planType == 1) { //如果是在线编辑 if (e.planMode == 2 && e.planType == 1) {
let id = e.id //如果是在线编辑
sessionStorage.setItem("planId", id) let id = e.id;
sessionStorage.setItem("companyId", e.companyId) sessionStorage.setItem("planId", id);
sessionStorage.setItem("companyId", e.companyId);
//sessionStorage.setItem("buildingTypeId",this.unittypeId) //sessionStorage.setItem("buildingTypeId",this.unittypeId)
sessionStorage.setItem("editable", "0") sessionStorage.setItem("editable", "0");
sessionStorage.setItem("planName", e.name) sessionStorage.setItem("planName", e.name);
let companyId = sessionStorage.getItem("companyId") let companyId = sessionStorage.getItem("companyId");
window.open(`/keyUnit/viewunitinfoplan?id=${companyId}`); window.open(`/keyUnit/viewunitinfoplan?id=${companyId}`);
} }
if (e.planMode == 3) { //如果是跳转网页 if (e.planMode == 3) {
sessionStorage.setItem("url", e.url) //如果是跳转网页
window.open(`/planManagement/webLook`) sessionStorage.setItem("url", e.url);
window.open(`/planManagement/webLook`);
} }
} }
templatePlanChange($event, type) { templatePlanChange($event, type) {
if (type == 1) { if (type == 1) {
this.templatePlan = $event this.templatePlan = $event;
} else if (type == 2) { } else if (type == 2) {
this.customPlan = $event this.customPlan = $event;
} }
if (this.templatePlan || this.customPlan) { if (this.templatePlan || this.customPlan) {
this.reservePlanType = ['16'] this.reservePlanType = ["16"];
} else { } else {
this.reservePlanType = [] this.reservePlanType = [];
} }
} }
//分页事件 //分页事件
chagePage(e) { chagePage(e) {
this.PageNumber = e.pageIndex + 1 this.PageNumber = e.pageIndex + 1;
this.getAllPlanInfo(); this.getAllPlanInfo();
} }
//辖区中队div是否显示 //辖区中队div是否显示
isorganizationbox: boolean = false isorganizationbox: boolean = false;
//点击辖区中队树,将选择的辖区中队添加到变量 //点击辖区中队树,将选择的辖区中队添加到变量
add(node) { add(node) {
this.isorganizationbox = false this.isorganizationbox = false;
this.js = node.name this.js = node.name;
this.jsId = node.id this.jsId = node.id;
} }
//关闭辖区中队隐藏框 //关闭辖区中队隐藏框
closeorganizationbox() { closeorganizationbox() {
this.isorganizationbox = false this.isorganizationbox = false;
} }
//打开辖区中队隐藏框 //打开辖区中队隐藏框
openorganizationbox() { openorganizationbox() {
this.isorganizationbox = true this.isorganizationbox = true;
} }
//关闭出现的组织机构div //关闭出现的组织机构div
closediv() { closediv() {
this.isorganizationbox = false this.isorganizationbox = false;
} }
//查询 //查询
onSubmit(e) { onSubmit(e) {
this.getAllPlanInfo() this.getAllPlanInfo();
} }
companyName: any //单位名称 companyName: any; //单位名称
js: any //所选组织机构 js: any; //所选组织机构
jsId: any //所选组织机构的id jsId: any; //所选组织机构的id
// jscheck:boolean //所选组织机构勾选框 // jscheck:boolean //所选组织机构勾选框
unittype: any //单位类型 unittype: any; //单位类型
reservePlanType: any //预案类型 reservePlanType: any; //预案类型
preparelevel: any //编制级别 preparelevel: any; //编制级别
plcheck: boolean //编制级别勾选框 plcheck: boolean; //编制级别勾选框
//重置 //重置
reset() { reset() {
this.companyName = '' this.companyName = "";
// this.js = '' // this.js = ''
// this.jsId = '' // this.jsId = ''
// this.jscheck = false // this.jscheck = false
this.unittype = '' this.unittype = "";
this.reservePlanType = '' this.reservePlanType = "";
this.preparelevel = '' this.preparelevel = "";
this.plcheck = false this.plcheck = false;
//重新获取初始化列表 //重新获取初始化列表
this.pageEvent.pageIndex = 0 this.pageEvent.pageIndex = 0;
this.PageNumber = 1 this.PageNumber = 1;
this.templatePlan = false this.templatePlan = false;
this.customPlan = false this.customPlan = false;
this.getAllPlanInfo(); this.getAllPlanInfo();
this.IsNewCompanyData = '' this.IsNewCompanyData = "";
this.IsNewData = '' this.IsNewData = "";
} }
} }
@Component({ @Component({
selector: 'PsViewer', selector: "PsViewer",
templateUrl: './PsvShow.html', templateUrl: "./PsvShow.html",
styleUrls: ['./open-plan.component.scss'] styleUrls: ["./open-plan.component.scss"],
}) })
export class GkhtmlPsViewer { export class GkhtmlPsViewer {
constructor(private router: Router, private http: HttpClient, public dialog: MatDialog, public snackBar: MatSnackBar, public dialogRef: MatDialogRef<GkhtmlPsViewer>, @Inject(MAT_DIALOG_DATA) public data: any) { } constructor(
private router: Router,
private http: HttpClient,
public dialog: MatDialog,
public snackBar: MatSnackBar,
public dialogRef: MatDialogRef<GkhtmlPsViewer>,
@Inject(MAT_DIALOG_DATA) public data: any
) {}
ngOnInit(): void { ngOnInit(): void {
// console.log(this.data) // console.log(this.data)
const viewer = new Viewer({ const viewer = new Viewer({
container: document.querySelector('#viewer'), container: document.querySelector("#viewer"),
panorama: '/api/Objects/PlanPlatform/' + this.data, panorama: "/api/Objects/PlanPlatform/" + this.data,
}); });
} }
} }

10
src/app/plan-management/pass-plan/open-or/open-or.component.html

@ -0,0 +1,10 @@
<h3 mat-dialog-title>选择要公开的消防救援站</h3>
<div class="box">
<nz-tree #nzTreeComponent [nzData]="nodes" nzCheckable nzCheckStrictly [nzCheckedKeys]="defaultCheckedKeys"
[nzExpandedKeys]="defaultExpandedKeys">
</nz-tree>
</div>
<mat-dialog-actions align="end">
<button mat-button mat-dialog-close [disabled]="isLoading">取消</button>
<button mat-button cdkFocusInitial (click)="save()" [disabled]="isLoading">确定</button>
</mat-dialog-actions>

4
src/app/plan-management/pass-plan/open-or/open-or.component.scss

@ -0,0 +1,4 @@
.box{
max-height: 400px;
overflow-y: auto;
}

25
src/app/plan-management/pass-plan/open-or/open-or.component.spec.ts

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { OpenOrComponent } from './open-or.component';
describe('OpenOrComponent', () => {
let component: OpenOrComponent;
let fixture: ComponentFixture<OpenOrComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ OpenOrComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(OpenOrComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

126
src/app/plan-management/pass-plan/open-or/open-or.component.ts

@ -0,0 +1,126 @@
import { HttpClient } from "@angular/common/http";
import {
Component,
OnInit,
AfterViewInit,
ViewChild,
Inject,
} from "@angular/core";
import { MatSnackBar } from "@angular/material/snack-bar";
import { MatDialogRef, MAT_DIALOG_DATA } from "@angular/material/dialog";
import {
NzFormatEmitEvent,
NzTreeComponent,
NzTreeNodeOptions,
} from "ng-zorro-antd/tree";
@Component({
selector: "app-open-or",
templateUrl: "./open-or.component.html",
styleUrls: ["./open-or.component.scss"],
})
export class OpenOrComponent implements OnInit {
constructor(
private http: HttpClient,
public snackBar: MatSnackBar,
@Inject(MAT_DIALOG_DATA) public data: any,
public dialogRef: MatDialogRef<OpenOrComponent>
) {}
@ViewChild("nzTreeComponent", { static: false })
nzTreeComponent!: NzTreeComponent;
defaultCheckedKeys = [];
defaultExpandedKeys = [];
isLoading = false;
nodes: NzTreeNodeOptions[] = [];
ngOnInit(): void {
this.getOrganizations();
}
//获得所有组织机构
allorganizations = [];
getOrganizations() {
this.http.get("/api/Organizations").subscribe((data: any) => {
this.allorganizations = data;
this.getpresentOrganization();
});
}
//得到当前单位所在组织机构的tree型数据
organizationName;
getpresentOrganization() {
let orData = JSON.parse(JSON.stringify(this.allorganizations));
orData.forEach((item) => {
item.children = [];
orData.forEach((element) => {
if (element.parentId == item.id) {
item.children.push(element);
}
});
});
orData.forEach((item) => {
item.title = item.name;
item.key = item.id;
item.selectable = false;
if (item.children.length === 0) {
item.isLeaf = true;
}
});
this.http.get("/api/Account/Profiles").subscribe((data: any) => {
this.organizationName = data.organizationName;
if (this.organizationName) {
orData.forEach((item) => {
if (item.name == this.organizationName) {
function lookForAllId(data = [], arr = []) {
for (let item of data) {
arr.push(item.id);
if (item.children && item.children.length)
lookForAllId(item.children, arr);
}
return arr;
}
function lookForNode(data, id, node = []) {
for (let item of data) {
if (item.id === id) {
node.push(item);
} else {
if (item.children && item.children.length) {
lookForNode(item.children, id, node);
}
}
}
return node;
}
if (this.data.plan.publicOrganizationIds.length === 0) {
this.defaultCheckedKeys = [...lookForAllId([item])];
} else {
this.defaultCheckedKeys = this.data.plan.publicOrganizationIds;
}
this.nodes = [...[item]];
}
});
}
});
}
save() {
let ids =
this.nzTreeComponent.getCheckedNodeList().map((item) => {
return item.key;
}) || [];
if (ids.length === 0) {
this.snackBar.open("至少选择一个队站公开", "确定", {
verticalPosition: "top",
duration: 3000,
});
}
this.http
.put(`/api/PlanAudits/${this.data.plan.id}/Public`, ids)
.subscribe((data) => {
this.snackBar.open("预案已公开", "确定", {
verticalPosition: "top",
duration: 3000,
});
this.dialogRef.close("公开成功");
});
}
}

26
src/app/plan-management/pass-plan/pass-plan.component.html

@ -90,11 +90,11 @@
<label style="margin-right: 10px;">预案级别:</label> <label style="margin-right: 10px;">预案级别:</label>
<mat-form-field> <mat-form-field>
<mat-select placeholder='请选择预案级别' [(ngModel)]="planCategory" name="planCategory" [multiple]="true"> <mat-select placeholder='请选择预案级别' [(ngModel)]="planCategory" name="planCategory" [multiple]="true">
<!-- <mat-option value=6>应急预案(国家级)</mat-option> <mat-option value=6>应急预案(国家级)</mat-option>
<mat-option value=7>应急预案(市级)</mat-option> --> <mat-option value=7>应急预案(市级)</mat-option>
<mat-option value=8>类型预案</mat-option> <mat-option value=8>类型预案</mat-option>
<!-- <mat-option value=1>Ⅰ级预案</mat-option> <mat-option value=1>Ⅰ级预案</mat-option>
<mat-option value=2>Ⅱ级预案</mat-option> --> <mat-option value=2>Ⅱ级预案</mat-option>
<mat-option value=3>Ⅲ级预案</mat-option> <mat-option value=3>Ⅲ级预案</mat-option>
<mat-option value=4>Ⅳ级预案</mat-option> <mat-option value=4>Ⅳ级预案</mat-option>
<mat-option value=5>Ⅴ级预案</mat-option> <mat-option value=5>Ⅴ级预案</mat-option>
@ -131,14 +131,14 @@
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
</div> </div>
<!-- <div class="queryField" *ngIf="!padMore&&!pcMore"> <div class="queryField" *ngIf="!padMore&&!pcMore">
<mat-checkbox (ngModelChange)="templatePlanChange($event,1)" [(ngModel)]="templatePlan" name="templatePlan"> <mat-checkbox (ngModelChange)="templatePlanChange($event,1)" [(ngModel)]="templatePlan" name="templatePlan">
模板录入预案</mat-checkbox> 模板录入预案</mat-checkbox>
</div> </div>
<div class="queryField" *ngIf="!padMore&&!pcMore"> <div class="queryField" *ngIf="!padMore&&!pcMore">
<mat-checkbox (ngModelChange)="templatePlanChange($event,2)" [(ngModel)]="customPlan" name="customPlan">自定义预案 <mat-checkbox (ngModelChange)="templatePlanChange($event,2)" [(ngModel)]="customPlan" name="customPlan">自定义预案
</mat-checkbox> </mat-checkbox>
</div> --> </div>
</div> </div>
</form> </form>
@ -187,15 +187,13 @@
margin: 3px 0 0 3px;" src="../../../assets/images/custom.png" alt=""> margin: 3px 0 0 3px;" src="../../../assets/images/custom.png" alt="">
</td> </td>
</ng-container> </ng-container>
<ng-container matColumnDef="auditStatus">
<th mat-header-cell *matHeaderCellDef>新增审核</th>
<td mat-cell *matCellDef="let element">{{element.newVerifyState}}</td>
</ng-container>
<ng-container matColumnDef="weihuState">
<th mat-header-cell *matHeaderCellDef>维护审核</th>
<td mat-cell *matCellDef="let element">{{element.maintenanceVerifyState}}</td>
</ng-container>
<ng-container matColumnDef="auditstate">
<th mat-header-cell *matHeaderCellDef>审核状态</th>
<td mat-cell *matCellDef="let element">
{{element.auditStatus | auditState}}
</td>
</ng-container>
<ng-container matColumnDef="openRange"> <ng-container matColumnDef="openRange">
<th mat-header-cell *matHeaderCellDef>是否公开</th> <th mat-header-cell *matHeaderCellDef>是否公开</th>
<td mat-cell *matCellDef="let element">{{element.openRange}}</td> <td mat-cell *matCellDef="let element">{{element.openRange}}</td>

594
src/app/plan-management/pass-plan/pass-plan.component.ts

@ -1,38 +1,64 @@
import { Component, OnInit, ViewChild, Inject } from '@angular/core'; import { Component, OnInit, ViewChild, Inject } from "@angular/core";
import { HttpClient } from '@angular/common/http' import { HttpClient } from "@angular/common/http";
import { MatTreeFlatDataSource, MatTreeFlattener } from '@angular/material/tree'; import {
import { MatPaginator } from '@angular/material/paginator'; MatTreeFlatDataSource,
import { FlatTreeControl } from '@angular/cdk/tree'; MatTreeFlattener,
import { FormControl } from '@angular/forms'; } from "@angular/material/tree";
import { Router, ActivatedRoute } from '@angular/router' import { MatPaginator } from "@angular/material/paginator";
import { PageEvent } from '@angular/material/paginator'; import { FlatTreeControl } from "@angular/cdk/tree";
import { MatDialogRef, MatDialog, MAT_DIALOG_DATA } from '@angular/material/dialog'; import { FormControl } from "@angular/forms";
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar'; import { Router, ActivatedRoute } from "@angular/router";
import { TreeService } from '../../http-interceptors/tree.service' import { PageEvent } from "@angular/material/paginator";
import { Viewer } from 'photo-sphere-viewer'; import {
import { ImgDetails, PsViewer } from '../entry-plan-look/entry-plan-look.component'; MatDialogRef,
declare var CryptoJS MatDialog,
MAT_DIALOG_DATA,
} from "@angular/material/dialog";
import { MatSnackBar, MatSnackBarConfig } from "@angular/material/snack-bar";
import { TreeService } from "../../http-interceptors/tree.service";
import { Viewer } from "photo-sphere-viewer";
import {
ImgDetails,
PsViewer,
} from "../entry-plan-look/entry-plan-look.component";
import { OpenOrComponent } from "./open-or/open-or.component";
declare var CryptoJS;
@Component({ @Component({
selector: 'app-pass-plan', selector: "app-pass-plan",
templateUrl: './pass-plan.component.html', templateUrl: "./pass-plan.component.html",
styleUrls: ['./pass-plan.component.scss'] styleUrls: ["./pass-plan.component.scss"],
}) })
export class PassPlanComponent implements OnInit { export class PassPlanComponent implements OnInit {
constructor(
private http: HttpClient,
private router: Router,
private route: ActivatedRoute,
private tree: TreeService,
public dialog: MatDialog,
public snackBar: MatSnackBar
) {}
constructor(private http: HttpClient, private router: Router, private route: ActivatedRoute, private tree: TreeService, public dialog: MatDialog, public snackBar: MatSnackBar) { } private _transformer = (node, level: number) => {
//初始化tree
private _transformer = (node, level: number) => { //初始化tree
return { return {
expandable: !!node.children && node.children.length > 0, expandable: !!node.children && node.children.length > 0,
name: node.name, name: node.name,
level: level, level: level,
id: node.id, id: node.id,
parentId: node.parentId, parentId: node.parentId,
children: node.children children: node.children,
}; };
} };
treeControl = new FlatTreeControl<any>(node => node.level, node => node.expandable); treeControl = new FlatTreeControl<any>(
treeFlattener = new MatTreeFlattener(this._transformer, node => node.level, node => node.expandable, node => node.children); (node) => node.level,
(node) => node.expandable
);
treeFlattener = new MatTreeFlattener(
this._transformer,
(node) => node.level,
(node) => node.expandable,
(node) => node.children
);
dataSource = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener); dataSource = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener);
myControl = new FormControl(); myControl = new FormControl();
hasChild = (_: number, node: any) => node.expandable; hasChild = (_: number, node: any) => node.expandable;
@ -42,118 +68,138 @@ export class PassPlanComponent implements OnInit {
paginator: MatPaginator; paginator: MatPaginator;
length: any; //共多少条数据 length: any; //共多少条数据
pageSize: any; //每页条数 pageSize: any; //每页条数
pageSizeOptions: number[] = [10] //设置每页条数 pageSizeOptions: number[] = [10]; //设置每页条数
PageNumber: any; //第几页 PageNumber: any; //第几页
displayedColumns: string[] = ['state', 'planname', 'addpeople', 'level', 'addtime', 'plantype', 'auditStatus', 'weihuState', 'openRange', 'projectlevel', 'operation']; displayedColumns: string[] = [
allorganizations: any //所有组织机构 "state",
allunittype: any //所有单位类型 "planname",
tabledataSource: any //表格数据 "addpeople",
IsNewData = '' //维护更新活新增 "level",
url "addtime",
"plantype",
"auditstate",
"openRange",
"projectlevel",
"operation",
];
allorganizations: any; //所有组织机构
allunittype: any; //所有单位类型
tabledataSource: any; //表格数据
IsNewData = ""; //维护更新活新增
url;
preparelevels: any preparelevels: any;
ngOnInit(): void { ngOnInit(): void {
if (window.matchMedia("(max-width: 1400px)").matches) { if (window.matchMedia("(max-width: 1400px)").matches) {
this.pcMore = false this.pcMore = false;
this.padMore = true this.padMore = true;
this.pcfind = false this.pcfind = false;
this.padjt = true this.padjt = true;
} else { } else {
this.pcfind = true this.pcfind = true;
this.pcMore = true this.pcMore = true;
this.padMore = false this.padMore = false;
this.padjt = false this.padjt = false;
} }
this.getunitdata(); this.getunitdata();
this.getOrganizations(); this.getOrganizations();
this.getUnittype(); this.getUnittype();
this.getAllPlanInfo(); this.getAllPlanInfo();
let level = sessionStorage.getItem("level"); let level = sessionStorage.getItem("level");
if (level == "0") {//如果是总队 if (level == "0") {
//如果是总队
this.preparelevels = [ this.preparelevels = [
{ name: "总队", value: "1" }, { name: "总队", value: "1" },
{ name: "支队", value: "2" }, { name: "支队", value: "2" },
{ name: "大队", value: "4" }, { name: "大队", value: "4" },
{ name: "中队", value: "8" } { name: "中队", value: "8" },
] ];
} }
if (level == "1") {//如果是支队 if (level == "1") {
//如果是支队
this.preparelevels = [ this.preparelevels = [
{ name: "支队", value: "2" }, { name: "支队", value: "2" },
{ name: "大队", value: "4" }, { name: "大队", value: "4" },
{ name: "中队", value: "8" } { name: "中队", value: "8" },
] ];
} }
if (level == "2") {//如果是大队 if (level == "2") {
//如果是大队
this.preparelevels = [ this.preparelevels = [
{ name: "大队", value: "4" }, { name: "大队", value: "4" },
{ name: "中队", value: "8" } { name: "中队", value: "8" },
] ];
} }
if (level == "3") {//如果是中队 if (level == "3") {
this.preparelevels = [ //如果是中队
{ name: "中队", value: "8" } this.preparelevels = [{ name: "中队", value: "8" }];
]
} }
this.url = window.location.href.substring(window.location.href.length - 1, window.location.href.length) this.url = window.location.href.substring(
window.location.href.length - 1,
window.location.href.length
);
//console.log(this.url) //console.log(this.url)
} }
pcMore//pc更多 pcMore; //pc更多
pcput = false//pc收起 pcput = false; //pc收起
pcfind//pc查询 pcfind; //pc查询
padjt = false padjt = false;
padMore = true//pad收缩控制 padMore = true; //pad收缩控制
padput = false//pad收起按钮 padput = false; //pad收起按钮
imgsrcopen = "../../../assets/images/routdown2.png" imgsrcopen = "../../../assets/images/routdown2.png";
imgsrcdown = "../../../assets/images/routup2.png" imgsrcdown = "../../../assets/images/routup2.png";
pcInfo() { pcInfo() {
this.pcMore = !this.pcMore this.pcMore = !this.pcMore;
this.pcput = !this.pcput this.pcput = !this.pcput;
} }
padInfo() { padInfo() {
this.padMore = !this.padMore this.padMore = !this.padMore;
this.padput = !this.padput this.padput = !this.padput;
} }
allPlanInfo: any //存储所有预案信息 allPlanInfo: any; //存储所有预案信息
IsNewCompanyData = '' //单位是新增还是维护更新 IsNewCompanyData = ""; //单位是新增还是维护更新
templatePlan: boolean = false//模板录入预案checkbox templatePlan: boolean = false; //模板录入预案checkbox
customPlan: boolean = false//自定义预案 customPlan: boolean = false; //自定义预案
//获得所有预案信息 //获得所有预案信息
getAllPlanInfo() { getAllPlanInfo() {
let planmode = [] let planmode = [];
this.templatePlan ? planmode.push(2) : null this.templatePlan ? planmode.push(2) : null;
this.customPlan ? planmode.push(4) : null this.customPlan ? planmode.push(4) : null;
let reservePlanType let reservePlanType;
this.reservePlanType ? reservePlanType = JSON.parse(JSON.stringify(this.reservePlanType)) : reservePlanType = '' this.reservePlanType
? (reservePlanType = JSON.parse(JSON.stringify(this.reservePlanType)))
: (reservePlanType = "");
if (this.reservePlanType && this.reservePlanType.length != 0) { if (this.reservePlanType && this.reservePlanType.length != 0) {
reservePlanType = eval(this.reservePlanType.join("|")) reservePlanType = eval(this.reservePlanType.join("|"));
} }
let paramsdata: any = { let paramsdata: any = {
CompanyName: this.companyName || '', CompanyName: this.companyName || "",
OrganizationId: this.jsId || '', OrganizationId: this.jsId || "",
HasChildrenOrganization: this.jscheck || '', HasChildrenOrganization: this.jscheck || "",
BuildingTypeId: this.unittype || '', BuildingTypeId: this.unittype || "",
PlanType: this.reservePlanType || '', PlanType: this.reservePlanType || "",
AuditStatus: '', //审核状态 AuditStatus: "", //审核状态
PlanLevel: this.preparelevel || '', PlanLevel: this.preparelevel || "",
HasChildrenPlanLevel: this.plcheck || '', HasChildrenPlanLevel: this.plcheck || "",
CreationTimeRangeStart: this.addtime || '', CreationTimeRangeStart: this.addtime || "",
CreationTimeRangeEnd: this.endtime || '', CreationTimeRangeEnd: this.endtime || "",
PageNumber: this.PageNumber || '1', PageNumber: this.PageNumber || "1",
PageSize: this.pageSizeOptions[0], PageSize: this.pageSizeOptions[0],
Sort: '', Sort: "",
PlanCategories: this.planCategory, PlanCategories: this.planCategory,
IsNewData: this.IsNewData, IsNewData: this.IsNewData,
IsNewCompanyData: this.IsNewCompanyData, IsNewCompanyData: this.IsNewCompanyData,
PlanModes: planmode PlanModes: planmode,
} };
this.http.get("/api/ApprovedPlans", { params: paramsdata }).subscribe((data: any) => { this.http
this.length = data.totalCount .get("/api/ApprovedPlans", { params: paramsdata })
this.allPlanInfo = data .subscribe((data: any) => {
this.tabledataSource = data.items this.length = data.totalCount;
}) this.allPlanInfo = data;
this.tabledataSource = data.items;
});
} }
colorRgb(sColor) { colorRgb(sColor) {
@ -185,7 +231,7 @@ export class PassPlanComponent implements OnInit {
var strHex = "#"; var strHex = "#";
for (var i = 0; i < aColor.length; i++) { for (var i = 0; i < aColor.length; i++) {
var hex: any = Number(aColor[i]).toString(16); var hex: any = Number(aColor[i]).toString(16);
hex = hex < 10 ? 0 + '' + hex : hex;// 保证每个rgb的值为2位 hex = hex < 10 ? 0 + "" + hex : hex; // 保证每个rgb的值为2位
if (hex === "0") { if (hex === "0") {
hex += hex; hex += hex;
} }
@ -202,7 +248,7 @@ export class PassPlanComponent implements OnInit {
} else if (aNum.length === 3) { } else if (aNum.length === 3) {
var numHex = "#"; var numHex = "#";
for (var i = 0; i < aNum.length; i += 1) { for (var i = 0; i < aNum.length; i += 1) {
numHex += (aNum[i] + aNum[i]); numHex += aNum[i] + aNum[i];
} }
return numHex; return numHex;
} }
@ -212,7 +258,7 @@ export class PassPlanComponent implements OnInit {
} }
gradientColor(startColor, endColor, step) { gradientColor(startColor, endColor, step) {
let _this = this let _this = this;
let startRGB = _this.colorRgb(startColor); //转换为rgb数组模式 let startRGB = _this.colorRgb(startColor); //转换为rgb数组模式
let startR = startRGB[0]; let startR = startRGB[0];
let startG = startRGB[1]; let startG = startRGB[1];
@ -230,111 +276,108 @@ export class PassPlanComponent implements OnInit {
var colorArr = []; var colorArr = [];
for (var i = 0; i < step; i++) { for (var i = 0; i < step; i++) {
//计算每一步的hex值 //计算每一步的hex值
var hex = _this.colorHex('rgb(' + parseInt((sR * i + startR)) + ',' + parseInt((sG * i + startG)) + ',' + parseInt((sB * i + startB)) + ')'); var hex = _this.colorHex(
"rgb(" +
parseInt(sR * i + startR) +
"," +
parseInt(sG * i + startG) +
"," +
parseInt(sB * i + startB) +
")"
);
colorArr.push(hex); colorArr.push(hex);
} }
return colorArr; return colorArr;
} }
integrity(width) { integrity(width) {
let _this = this let _this = this;
let style: any = {} let style: any = {};
style.width = width + '%'; style.width = width + "%";
if (width < 30) { if (width < 30) {
let colorArr = this.gradientColor('#D50000', '#E53935', 30); let colorArr = this.gradientColor("#D50000", "#E53935", 30);
for (let i = 0; i < 30; i++) { for (let i = 0; i < 30; i++) {
if (i == width) { if (i == width) {
style.background = colorArr[i] style.background = colorArr[i];
} }
} }
} }
if (width >= 30 && width < 60) { if (width >= 30 && width < 60) {
let colorArr = this.gradientColor('#FF9800', '#E65100', 30); let colorArr = this.gradientColor("#FF9800", "#E65100", 30);
for (let i = 30; i < 60; i++) { for (let i = 30; i < 60; i++) {
if (i == width) { if (i == width) {
style.background = colorArr[i - 30] style.background = colorArr[i - 30];
} }
} }
} }
if (width >= 60) { if (width >= 60) {
let colorArr = this.gradientColor('#81C784', '#2E7D32', 41); let colorArr = this.gradientColor("#81C784", "#2E7D32", 41);
for (let i = 60; i <= 100; i++) { for (let i = 60; i <= 100; i++) {
if (i == width) { if (i == width) {
style.background = colorArr[i - 60] style.background = colorArr[i - 60];
} }
} }
} }
return style return style;
} }
integrityDetails(width, zong) { integrityDetails(width, zong) {
let style: any = {} let style: any = {};
style.width = (width / zong) * 100 + '%'; style.width = (width / zong) * 100 + "%";
return style return style;
} }
//得到当前单位信息 //得到当前单位信息
getunitdata() { getunitdata() {
this.http.get("/api/Account/Profiles").subscribe( this.http.get("/api/Account/Profiles").subscribe((data: any) => {
(data: any) => { this.organizationName = data.organizationName;
this.organizationName = data.organizationName });
} }
) addtime; //开始时间
} endtime; //结束时间
addtime//开始时间 integrityScoreMin; //完整度最小值
endtime//结束时间 integrityScoreMax; //完整度最大值
integrityScoreMin//完整度最小值 organizationName: any; //当前单位组织机构名称
integrityScoreMax//完整度最大值 treedata: any; //组织机构树型数据
organizationName: any //当前单位组织机构名称 newArr: any = [];
treedata: any //组织机构树型数据 newallorganizations: any; //用于存储在原始数据基础上的每个机构增加children字段
newArr: any = []
newallorganizations: any //用于存储在原始数据基础上的每个机构增加children字段
//得到当前单位所在组织机构的tree型数据 //得到当前单位所在组织机构的tree型数据
getpresentOrganization() { getpresentOrganization() {
this.newallorganizations = this.allorganizations this.newallorganizations = this.allorganizations;
this.newallorganizations.forEach(item => { this.newallorganizations.forEach((item) => {
item.children = [] item.children = [];
this.newallorganizations.forEach(element => { this.newallorganizations.forEach((element) => {
if (element.parentId == item.id) { if (element.parentId == item.id) {
item.children.push(element) item.children.push(element);
} }
}); });
}); });
this.http.get("/api/Account/Profiles").subscribe( this.http.get("/api/Account/Profiles").subscribe((data: any) => {
(data: any) => { this.organizationName = data.organizationName;
this.organizationName = data.organizationName
if (this.organizationName) { if (this.organizationName) {
this.newallorganizations.forEach(item => { this.newallorganizations.forEach((item) => {
if (item.name == this.organizationName) { if (item.name == this.organizationName) {
this.dataSource.data = [item] this.dataSource.data = [item];
} }
}); });
} else { } else {
this.dataSource.data = this.tree.toTree(this.treedata); this.dataSource.data = this.tree.toTree(this.treedata);
} }
} });
)
} }
//获得所有组织机构 //获得所有组织机构
getOrganizations() { getOrganizations() {
this.http.get('/api/Organizations').subscribe( this.http.get("/api/Organizations").subscribe((data: any) => {
(data: any) => { this.allorganizations = data;
this.allorganizations = data
this.treedata = this.tree.toTree(data); this.treedata = this.tree.toTree(data);
this.getpresentOrganization(); this.getpresentOrganization();
} });
)
} }
//获得所有单位类型 //获得所有单位类型
getUnittype() { getUnittype() {
this.http.get('/api/BuildingTypes/Simple').subscribe( this.http.get("/api/BuildingTypes/Simple").subscribe((data) => {
data => { this.allunittype = data;
this.allunittype = data });
}
)
} }
//查看单位信息 //查看单位信息
lookUnitInfo(element) { lookUnitInfo(element) {
@ -343,193 +386,238 @@ export class PassPlanComponent implements OnInit {
// width: '1500px', // width: '1500px',
// height:'800px' // height:'800px'
// }); // });
sessionStorage.setItem("editable", "0") sessionStorage.setItem("editable", "0");
sessionStorage.setItem("companyName", element.company.name) sessionStorage.setItem("companyName", element.company.name);
sessionStorage.setItem("companyId", element.company.id) sessionStorage.setItem("companyId", element.company.id);
sessionStorage.setItem(element.company.id, JSON.stringify(element.company.companyIntegrityScore)) sessionStorage.setItem(
window.open(`/keyUnit/viewunitinfo?id=${element.company.id}&usci=${element.company.usci}`, '_blank'); element.company.id,
JSON.stringify(element.company.companyIntegrityScore)
);
window.open(
`/keyUnit/viewunitinfo?id=${element.company.id}&usci=${element.company.usci}`,
"_blank"
);
} }
//跳转查看预案页面 审核通过预案 //跳转查看预案页面 审核通过预案
routerTo(e) { routerTo(e) {
console.log(e) console.log(e);
if (e.planType == 16 || e.planType == 4 || e.planType == 8) { if (e.planType == 16 || e.planType == 4 || e.planType == 8) {
if (e.planType == 16 && e.attachmentUrls == null) { if (e.planType == 16 && e.attachmentUrls == null) {
window.open(`/planManagement/createplanonlinefive?navIsOpen=false&companyId=${e.companyId}&planName=${e.name}&unitName=${e.company.name}&planCategory=${e.planCategory}&planId=${e.id}&unitTypeId=${e.company.buildingTypes[0].id}&orName=${e.company.organizationName}&orId=${e.company.organizationId}&pattern=false`) window.open(
`/planManagement/createplanonlinefive?navIsOpen=false&companyId=${e.companyId}&planName=${e.name}&unitName=${e.company.name}&planCategory=${e.planCategory}&planId=${e.id}&unitTypeId=${e.company.buildingTypes[0].id}&orName=${e.company.organizationName}&orId=${e.company.organizationId}&pattern=false`
);
} else { } else {
var index = e.attachmentUrls[0].indexOf("\/") var index = e.attachmentUrls[0].indexOf("/");
if (e.attachmentUrls[0].substr(0, index) == 'psw') { if (e.attachmentUrls[0].substr(0, index) == "psw") {
const dialogRef = this.dialog.open(PsViewer, { const dialogRef = this.dialog.open(PsViewer, {
width: '1500px', width: "1500px",
height: '800px', height: "800px",
data: e.attachmentUrls[0] data: e.attachmentUrls[0],
}); });
} else if (e.attachmentUrls[0].substr(e.attachmentUrls[0].length - 3, e.attachmentUrls[0].length) == 'JPG' || e.attachmentUrls[0].substr(e.attachmentUrls[0].length - 3, e.attachmentUrls[0].length) == 'png' || e.attachmentUrls[0].substr(e.attachmentUrls[0].length - 3, e.attachmentUrls[0].length) == 'jpeg' || e.attachmentUrls[0].substr(e.attachmentUrls[0].length - 3, e.attachmentUrls[0].length) == 'jpg') { } else if (
let data = e e.attachmentUrls[0].substr(
const dialogRef = this.dialog.open(ImgDetails, {//调用open方法打开对话框并且携带参数过去 e.attachmentUrls[0].length - 3,
e.attachmentUrls[0].length
) == "JPG" ||
e.attachmentUrls[0].substr(
e.attachmentUrls[0].length - 3,
e.attachmentUrls[0].length
) == "png" ||
e.attachmentUrls[0].substr(
e.attachmentUrls[0].length - 3,
e.attachmentUrls[0].length
) == "jpeg" ||
e.attachmentUrls[0].substr(
e.attachmentUrls[0].length - 3,
e.attachmentUrls[0].length
) == "jpg"
) {
let data = e;
const dialogRef = this.dialog.open(ImgDetails, {
//调用open方法打开对话框并且携带参数过去
data: data.attachmentUrls, data: data.attachmentUrls,
}); });
dialogRef.afterClosed().subscribe(); dialogRef.afterClosed().subscribe();
} else { } else {
let fetchUrl = e.attachmentUrls[0] let fetchUrl = e.attachmentUrls[0];
if (fetchUrl) { if (fetchUrl) {
let suffix = fetchUrl.split('.')[fetchUrl.split('.').length - 1].toLowerCase() let suffix = fetchUrl
if (suffix == 'docx' || suffix == 'doc') { .split(".")
let arr = fetchUrl.split('.') [fetchUrl.split(".").length - 1].toLowerCase();
arr[arr.length - 1] = 'pdf' if (suffix == "docx" || suffix == "doc") {
window.open(`/api/Objects/PlanPlatform/` + arr.join('.')) let arr = fetchUrl.split(".");
} else if (suffix == 'pdf') { arr[arr.length - 1] = "pdf";
window.open(`/api/Objects/PlanPlatform/` + fetchUrl) window.open(`/api/Objects/PlanPlatform/` + arr.join("."));
} else if (suffix == "pdf") {
window.open(`/api/Objects/PlanPlatform/` + fetchUrl);
} else { } else {
let config = new MatSnackBarConfig(); let config = new MatSnackBarConfig();
config.verticalPosition = 'top'; config.verticalPosition = "top";
config.duration = 3000 config.duration = 3000;
this.snackBar.open('该文件类型暂不支持在线查看', '确定', config); this.snackBar.open("该文件类型暂不支持在线查看", "确定", config);
} }
} }
} }
} }
} }
if (e.planMode == 2 && e.planType == 1) { //如果是在线编辑 if (e.planMode == 2 && e.planType == 1) {
let id = e.id //如果是在线编辑
sessionStorage.setItem("planId", id) let id = e.id;
sessionStorage.setItem("companyId", e.companyId) sessionStorage.setItem("planId", id);
sessionStorage.setItem("companyId", e.companyId);
//sessionStorage.setItem("buildingTypeId",this.unittypeId) //sessionStorage.setItem("buildingTypeId",this.unittypeId)
sessionStorage.setItem("editable", "0") sessionStorage.setItem("editable", "0");
sessionStorage.setItem("planName", e.name) sessionStorage.setItem("planName", e.name);
let companyId = sessionStorage.getItem("companyId") let companyId = sessionStorage.getItem("companyId");
window.open(`/keyUnit/viewunitinfoplan?id=${companyId}`); window.open(`/keyUnit/viewunitinfoplan?id=${companyId}`);
} }
if (e.planMode == 3) { //如果是跳转网页 if (e.planMode == 3) {
sessionStorage.setItem("url", e.url) //如果是跳转网页
window.open(`/planManagement/webLook`) sessionStorage.setItem("url", e.url);
window.open(`/planManagement/webLook`);
} }
} }
templatePlanChange($event, type) { templatePlanChange($event, type) {
if (type == 1) { if (type == 1) {
this.templatePlan = $event this.templatePlan = $event;
} else if (type == 2) { } else if (type == 2) {
this.customPlan = $event this.customPlan = $event;
} }
if (this.templatePlan || this.customPlan) { if (this.templatePlan || this.customPlan) {
this.reservePlanType = ['16'] this.reservePlanType = ["16"];
} else { } else {
this.reservePlanType = [] this.reservePlanType = [];
} }
} }
//预案公开 //预案公开
openReserve(e) { openReserve(e) {
this.http.put(`/api/PlanAudits/${e.id}/Public`, []).subscribe(data => { const dialogRef = this.dialog.open(OpenOrComponent, {
const config = new MatSnackBarConfig(); width: "500px",
config.verticalPosition = 'top'; data: { plan: e },
config.duration = 3000 });
this.snackBar.open('预案已公开', '确定', config); dialogRef.afterClosed().subscribe((result) => {
}) if (result && result === "公开成功") {
this.getAllPlanInfo();
}
});
} }
//预案取消公开 //预案取消公开
closeReserve(e) { closeReserve(e) {
this.http.put(`/api/PlanAudits/${e.id}/Unpublic`, []).subscribe(data => { this.http.put(`/api/PlanAudits/${e.id}/Unpublic`, []).subscribe((data) => {
const config = new MatSnackBarConfig(); const config = new MatSnackBarConfig();
config.verticalPosition = 'top'; config.verticalPosition = "top";
config.duration = 3000 config.duration = 3000;
this.snackBar.open('预案已取消公开', '确定', config); this.snackBar.open("预案已取消公开", "确定", config);
}) this.getAllPlanInfo();
});
} }
//分页事件 //分页事件
chagePage(e) { chagePage(e) {
this.PageNumber = e.pageIndex + 1 this.PageNumber = e.pageIndex + 1;
this.getAllPlanInfo(); this.getAllPlanInfo();
} }
//辖区中队div是否显示 //辖区中队div是否显示
isorganizationbox: boolean = false isorganizationbox: boolean = false;
//点击辖区中队树,将选择的辖区中队添加到变量 //点击辖区中队树,将选择的辖区中队添加到变量
add(node) { add(node) {
this.isorganizationbox = false this.isorganizationbox = false;
this.js = node.name this.js = node.name;
this.jsId = node.id this.jsId = node.id;
} }
//关闭辖区中队隐藏框 //关闭辖区中队隐藏框
closeorganizationbox() { closeorganizationbox() {
this.isorganizationbox = false this.isorganizationbox = false;
} }
//打开辖区中队隐藏框 //打开辖区中队隐藏框
openorganizationbox() { openorganizationbox() {
this.isorganizationbox = true this.isorganizationbox = true;
} }
//关闭出现的组织机构div //关闭出现的组织机构div
closediv() { closediv() {
this.isorganizationbox = false this.isorganizationbox = false;
} }
//查询 //查询
onSubmit(e) { onSubmit(e) {
this.PageNumber = 1 this.PageNumber = 1;
this.pageEvent.pageIndex = 0 this.pageEvent.pageIndex = 0;
this.getAllPlanInfo() this.getAllPlanInfo();
} }
companyName: any //单位名称 companyName: any; //单位名称
js: any //所选组织机构 js: any; //所选组织机构
jsId: any //所选组织机构的id jsId: any; //所选组织机构的id
jscheck: boolean //所选组织机构勾选框 jscheck: boolean; //所选组织机构勾选框
unittype: any //单位类型 unittype: any; //单位类型
reservePlanType: any //预案类型 reservePlanType: any; //预案类型
preparelevel: any //编制级别 preparelevel: any; //编制级别
plcheck: boolean //编制级别勾选框 plcheck: boolean; //编制级别勾选框
planCategory = []//预案级别 planCategory = []; //预案级别
//重置 //重置
reset() { reset() {
this.IsNewData = '' this.IsNewData = "";
this.IsNewCompanyData = '' this.IsNewCompanyData = "";
this.companyName = '' this.companyName = "";
this.js = '' this.js = "";
this.jsId = '' this.jsId = "";
this.jscheck = false this.jscheck = false;
this.unittype = '' this.unittype = "";
this.reservePlanType = '' this.reservePlanType = "";
this.preparelevel = '' this.preparelevel = "";
this.addtime = '' this.addtime = "";
this.endtime = '' this.endtime = "";
this.plcheck = false this.plcheck = false;
//重新获取初始化列表 //重新获取初始化列表
this.pageEvent.pageIndex = 0 this.pageEvent.pageIndex = 0;
this.PageNumber = 1 this.PageNumber = 1;
this.planCategory = [] this.planCategory = [];
this.templatePlan = false this.templatePlan = false;
this.customPlan = false this.customPlan = false;
this.getAllPlanInfo(); this.getAllPlanInfo();
} }
} }
@Component({ @Component({
selector: 'PsViewer', selector: "PsViewer",
templateUrl: './PsvShow.html', templateUrl: "./PsvShow.html",
styleUrls: ['./pass-plan.component.scss'] styleUrls: ["./pass-plan.component.scss"],
}) })
export class GkPsViewer { export class GkPsViewer {
constructor(private router: Router, private http: HttpClient, public dialog: MatDialog, public snackBar: MatSnackBar, public dialogRef: MatDialogRef<GkPsViewer>, @Inject(MAT_DIALOG_DATA) public data: any) { } constructor(
private router: Router,
private http: HttpClient,
public dialog: MatDialog,
public snackBar: MatSnackBar,
public dialogRef: MatDialogRef<GkPsViewer>,
@Inject(MAT_DIALOG_DATA) public data: any
) {}
ngOnInit(): void { ngOnInit(): void {
// console.log(this.data) // console.log(this.data)
const viewer = new Viewer({ const viewer = new Viewer({
container: document.querySelector('#viewer'), container: document.querySelector("#viewer"),
panorama: '/api/Objects/PlanPlatform/' + this.data, panorama: "/api/Objects/PlanPlatform/" + this.data,
}); });
} }
} }
@Component({ @Component({
selector: 'unitInfo', selector: "unitInfo",
templateUrl: './unitInfo.html', templateUrl: "./unitInfo.html",
styleUrls: ['./pass-plan.component.scss'] styleUrls: ["./pass-plan.component.scss"],
}) })
export class UnitInfo { export class UnitInfo {
constructor(private router: Router, private http: HttpClient, public dialog: MatDialog, public snackBar: MatSnackBar, public dialogRef: MatDialogRef<UnitInfo>, @Inject(MAT_DIALOG_DATA) public data: any) { } constructor(
private router: Router,
private http: HttpClient,
public dialog: MatDialog,
public snackBar: MatSnackBar,
public dialogRef: MatDialogRef<UnitInfo>,
@Inject(MAT_DIALOG_DATA) public data: any
) {}
ngOnInit(): void { ngOnInit(): void {
// console.log(this.data) // console.log(this.data)
} }

35
src/app/plan-management/plan-deduction/add-plan/add-plan.component.html

@ -0,0 +1,35 @@
<h2 mat-dialog-title>新增预案推演</h2>
<div class="box">
<div class="contentItem">
<div class="content">
<div>
<span class="name">预案名称:</span>
<input name="planname" [(ngModel)]="planname" nz-input placeholder="请输入预案名称" />
</div>
<div>
<span class="name">单位名称:</span>
<nz-select nzShowSearch nzServerSearch (nzOnSearch)="search($event)" [(ngModel)]="unitid"
(nzScrollToBottom)="loadMore()" nzPlaceHolder="请选择单位" nzAllowClear
[nzDropdownRender]="renderTemplate">
<nz-option *ngFor="let o of optionList" [nzValue]="o.id" [nzLabel]="o.name"></nz-option>
</nz-select>
<ng-template #renderTemplate>
<nz-spin *ngIf="isLoading"></nz-spin>
</ng-template>
</div>
<div>
<span class="name">创建机构:</span>
<nz-tree-select [nzDropdownClassName]="'maxHeightTreeSelect'" [nzNodes]="nodes" nzShowSearch
nzPlaceHolder="请选择创建人" [(ngModel)]="orid">
</nz-tree-select>
</div>
</div>
</div>
<!-- <div class="mask" *ngIf="isLoading">
<mat-spinner [diameter]="30"></mat-spinner>
</div> -->
</div>
<mat-dialog-actions align="end">
<button mat-button mat-dialog-close [disabled]="isLoading">取消</button>
<button mat-button cdkFocusInitial (click)="save()" [disabled]="isLoading">确定</button>
</mat-dialog-actions>

122
src/app/plan-management/plan-deduction/add-plan/add-plan.component.scss

@ -0,0 +1,122 @@
.box {
width: 100%;
position: relative;
.contentItem {
display: flex;
margin: 6px 0;
// border-bottom: 1px dashed rgb(180, 178, 178);
.title {
width: 75px;
color: #1890ff;
display: flex;
align-items: center;
}
.content {
flex: 1;
display: flex;
flex-wrap: wrap;
flex-direction: column;
div {
display: flex;
align-items: center;
input {
flex: 1;
}
nz-select,
nz-tree-select {
width: 72.5%;
}
}
div {
margin-bottom: 8px;
.name {
display: inline-block;
width: 70px;
margin-right: 3px;
text-align: right;
}
}
}
.textbox {
height: 32px;
line-height: 32px;
width: 50%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.uploadbox {
position: relative;
display: flex;
align-items: center;
input {
width: 88px;
height: 32px;
position: absolute;
left: 0;
top: 0;
opacity: 0;
z-index: 2;
cursor: pointer;
}
button {
z-index: 1;
cursor: pointer;
}
.imgbox {
height: 100%;
display: flex;
align-items: center;
li {
display: flex;
align-items: center;
position: relative;
}
img {
width: 50px;
height: 50px;
margin: 0 5px;
cursor: pointer;
}
.close {
position: absolute;
right: 0;
top: 0;
font-size: 15px;
cursor: pointer;
}
}
}
}
.mask {
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
background: rgba(0, 0, 0, 0.2);
display: flex;
justify-content: center;
align-items: center;
z-index: 3;
}
}

25
src/app/plan-management/plan-deduction/add-plan/add-plan.component.spec.ts

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { AddPlanComponent } from './add-plan.component';
describe('AddPlanComponent', () => {
let component: AddPlanComponent;
let fixture: ComponentFixture<AddPlanComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ AddPlanComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(AddPlanComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

103
src/app/plan-management/plan-deduction/add-plan/add-plan.component.ts

@ -0,0 +1,103 @@
import { HttpClient } from "@angular/common/http";
import { Component, OnInit, Inject } from "@angular/core";
import { MatDialogRef, MAT_DIALOG_DATA } from "@angular/material/dialog";
import { DatePipe } from "@angular/common";
import { MatSnackBar } from "@angular/material/snack-bar";
import { Observable } from "rxjs";
import { map } from "rxjs/operators";
@Component({
selector: "app-add-plan",
templateUrl: "./add-plan.component.html",
styleUrls: ["./add-plan.component.scss"],
providers: [DatePipe],
})
export class AddPlanComponent implements OnInit {
constructor(
public dialogRef: MatDialogRef<AddPlanComponent>,
@Inject(MAT_DIALOG_DATA) public data: any,
private http: HttpClient,
public snackBar: MatSnackBar
) {}
ngOnInit(): void {
console.log("传递的数据", this.data);
this.nodes = this.data;
this.getCompanies();
}
isLoading = false;
planname;
unitid;
orid;
optionList: string[] = [];
PageNumber = 1;
PageSize = 10;
IntegrityScoreMin = 0;
IntegrityScoreMax = 1;
loadMore(): void {
console.log("需要加载下一页了");
this.PageNumber += 1;
this.getCompanies();
}
getCompanies(name?: string) {
this.isLoading = true;
let params: any = {
Name: name || "",
PageNumber: this.PageNumber,
PageSize: this.PageSize,
IntegrityScoreMin: this.IntegrityScoreMin,
IntegrityScoreMax: this.IntegrityScoreMax,
};
this.http
.get("/api/Companies", { params: params })
.subscribe((data: any) => {
console.log("单位列表", data.items);
this.isLoading = false;
this.optionList = [...this.optionList, ...data.items];
});
}
Name;
search($event) {
console.log($event);
this.Name = $event;
this.PageNumber = 1;
this.optionList = [];
this.getCompanies($event);
}
nodes;
save() {
console.log(1, this.planname);
console.log(2, this.unitid);
console.log(3, this.orid);
// return;
if (!this.planname || !this.unitid) {
this.snackBar.open("请输入完整", "确定", {
verticalPosition: "top",
duration: 3000,
});
return;
}
let body: any = {
name: this.planname,
planCategory: 9, //temp
planMode: 2,
planType: 1,
exCreatorId: this.orid ? this.orid : "",
};
this.http
.post(`/api/PlanComponents2D?companyId=${this.unitid}`, body)
.subscribe((data: any) => {
this.snackBar.open("创建成功", "确定", {
verticalPosition: "top",
duration: 3000,
});
this.dialogRef.close(data);
});
}
}

62
src/app/plan-management/plan-deduction/plan-deduction.component.html

@ -0,0 +1,62 @@
<!-- <p>六熟悉记录</p> -->
<div class="box">
<div class="header">
<form class="queryBox" (ngSubmit)="onSubmit()">
<div class="queryField">
<span style="width: 108px;">预案名称:</span>
<input name="name" nz-input placeholder="请输入预案名称" [(ngModel)]="name" />
</div>
<div class="queryField">
<span style="width: 108px;">单位名称:</span>
<input name="companyname" nz-input placeholder="请输入单位名称" [(ngModel)]="companyname" />
</div>
<div class="queryField" style="margin-right: 35px;">
<span style="width: 153px;">创建人(消防救援站):</span>
<nz-tree-select [nzDropdownClassName]="'maxHeightTreeSelect'" style="width: 250px"
[nzExpandedKeys]="expandKeys" [nzNodes]="nodes" nzShowSearch nzPlaceHolder="请选择组织机构" name="orId"
[(ngModel)]="orId">
</nz-tree-select>
</div>
<!-- <div class="queryField">
<span>熟悉时间:</span>
<nz-range-picker name="time" [(ngModel)]="time"></nz-range-picker>
</div> -->
<div class="queryField btnbox">
<button nz-button nzType="primary">查询</button>
<button nz-button type="button" nzType="default" (click)="reset()">重置</button>
</div>
</form>
</div>
<div class="tablebox">
<button nz-button nzType="primary" class="add" (click)="add()">新增</button>
<table mat-table [dataSource]="tabledataSource" class="mat-elevation-z8">
<ng-container matColumnDef="planname">
<th mat-header-cell *matHeaderCellDef>预案名称</th>
<td mat-cell *matCellDef="let element">{{element.name}}</td>
</ng-container>
<ng-container matColumnDef="name">
<th mat-header-cell *matHeaderCellDef>单位名称</th>
<td mat-cell *matCellDef="let element">{{element.companyName}}</td>
</ng-container>
<ng-container matColumnDef="people">
<th mat-header-cell *matHeaderCellDef>创建人</th>
<td mat-cell *matCellDef="let element">{{element.committerOrganizationName}}</td>
</ng-container>
<ng-container matColumnDef="time">
<th mat-header-cell *matHeaderCellDef>创建时间</th>
<td mat-cell *matCellDef="let element">{{element.creationTime | date:'yyyy-MM-dd HH:mm'}}</td>
</ng-container>
<ng-container matColumnDef="operate">
<th mat-header-cell *matHeaderCellDef style="width: 200px;">操作</th>
<td mat-cell *matCellDef="let element" class="operate">
<span (click)="look(element)">查看</span>
<span (click)="delete(element)">删除</span>
</td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
</table>
<mat-paginator [length]="length" [pageSize]="pageSize" (page)="chagePage($event)">
</mat-paginator>
</div>
</div>

63
src/app/plan-management/plan-deduction/plan-deduction.component.scss

@ -0,0 +1,63 @@
.box {
height: 100%;
overflow: auto;
}
.header {
width: 100%;
box-sizing: border-box;
padding: 20px 30px 8px 30px;
.queryBox {
display: flex;
flex-wrap: wrap;
align-items: center;
.queryField {
display: flex;
align-items: center;
margin-right: 20px;
span {
display: inline-block;
width: 80px;
}
}
.btnbox {
button {
margin-right: 12px;
}
}
}
}
.tablebox {
.add{
margin-left: 30px;
}
table {
width: 100%;
margin-top: 15px;
}
mat-paginator {
width: 100%;
}
}
.mat-header-cell,
.mat-cell {
text-align: center;
}
.operate {
span {
color: #40a9ff;
cursor: pointer;
margin: 0 3px;
}
}

25
src/app/plan-management/plan-deduction/plan-deduction.component.spec.ts

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { PlanDeductionComponent } from './plan-deduction.component';
describe('PlanDeductionComponent', () => {
let component: PlanDeductionComponent;
let fixture: ComponentFixture<PlanDeductionComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ PlanDeductionComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(PlanDeductionComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

180
src/app/plan-management/plan-deduction/plan-deduction.component.ts

@ -0,0 +1,180 @@
import { Component, OnInit, ViewChild } from "@angular/core";
import { HttpClient } from "@angular/common/http";
import { MatPaginator } from "@angular/material/paginator";
import { PageEvent } from "@angular/material/paginator";
import { MatDialog } from "@angular/material/dialog";
import { MatSnackBar } from "@angular/material/snack-bar";
import { DatePipe } from "@angular/common";
import { AddPlanComponent } from "./add-plan/add-plan.component";
@Component({
selector: "app-plan-deduction",
templateUrl: "./plan-deduction.component.html",
styleUrls: ["./plan-deduction.component.scss"],
providers: [DatePipe],
})
export class PlanDeductionComponent implements OnInit {
constructor(
private http: HttpClient,
public dialog: MatDialog,
public snackBar: MatSnackBar,
private datePipe: DatePipe
) {}
//分页
@ViewChild(MatPaginator, { static: true })
pageEvent: PageEvent;
paginator: MatPaginator;
displayedColumns: string[] = [
"planname",
"name",
"people",
"time",
"operate",
];
tabledataSource: any; //表格数据
ngOnInit(): void {
this.getOrganizations();
}
//获得所有组织机构
allorganizations: any; //所有组织机构
getOrganizations() {
this.http.get("/api/Organizations").subscribe((data: any) => {
this.allorganizations = data;
this.getpresentOrganization();
});
}
//得到当前单位所在组织机构的tree型数据
expandKeys = [];
nodes = [];
organizationId;
getpresentOrganization() {
this.allorganizations.forEach((item) => {
item.key = item.id;
item.title = item.name;
item.children = [];
this.allorganizations.forEach((element) => {
if (element.parentId == item.id) {
item.children.push(element);
}
if (item.children.length === 0) {
item.isLeaf = true;
} else {
item.isLeaf = false;
}
});
});
this.http.get("/api/Account/Profiles").subscribe((data: any) => {
this.allorganizations.forEach((item) => {
if (item.name == data.organizationName) {
this.expandKeys = [item.id];
this.organizationId = item.id;
// this.orId = item.id;
this.nodes = [...[item]];
this.getTabledataSource();
}
});
});
}
length: any; //共多少条数据
pageSize: any = 10; //每页条数
PageNumber: any = 1; //第几页
getTabledataSource() {
let params: any = {
Name: this.name || "",
CompanyName: this.companyname || "",
CommitterOrganizationId: this.orId || "",
PlanCategory: 9,
PageNumber: this.PageNumber,
PageSize: this.pageSize,
};
this.http
.get("/api/PlanComponents/GetAll", { params: params })
.subscribe((data: any) => {
console.log("预案数据", data);
this.tabledataSource = data.items;
this.length = data.totalCount;
});
}
//分页事件
chagePage(e) {
this.PageNumber = e.pageIndex + 1;
this.getTabledataSource();
}
name;
companyname;
orId;
time;
//查询
onSubmit() {
this.PageNumber = 1;
this.pageEvent.pageIndex = 0;
this.getTabledataSource();
}
//重置
reset() {
this.name = "";
this.companyname = "";
this.orId = "";
this.onSubmit();
}
add() {
const dialogRef = this.dialog.open(AddPlanComponent, {
width: "400px",
data: this.nodes,
});
dialogRef.afterClosed().subscribe((data) => {
if (data) {
console.log("创建成功", data);
this.onSubmit();
sessionStorage.setItem("planId", data.id);
sessionStorage.setItem("companyId", data.plan.companyId);
sessionStorage.setItem(
"buildingTypeId",
data.plan.company.buildingTypes[0].id
);
sessionStorage.setItem("editable", "1");
let orId = data.plan.company.organizationId;
let orName = data.plan.company.organizationName;
window.open(
`/keyUnit/editunitinfo?id=${data.plan.company.id}&orName=${orName}&orId=${orId}`
);
}
});
}
look(element) {
console.log(element);
sessionStorage.setItem("planId", element.id);
sessionStorage.setItem("companyId", element.companyId);
sessionStorage.setItem(
"buildingTypeId",
element.company.buildingTypes[0].id
);
sessionStorage.setItem("editable", "1");
let orId = element.company.organizationId;
let orName = element.company.organizationName;
window.open(
`/keyUnit/editunitinfo?id=${element.companyId}&orName=${orName}&orId=${orId}`
);
}
delete(element) {
if (confirm("确认删除此预案吗")) {
this.http
.delete(`/api/PlanComponents2D/${element.id}`)
.subscribe((data: any) => {
alert("删除成功");
this.getTabledataSource();
});
}
}
}

6
src/app/plan-management/plan-management-routing.module.ts

@ -20,6 +20,9 @@ import { MaintainUpComponent } from './maintain-up/maintain-up.component'
import { from } from 'rxjs'; import { from } from 'rxjs';
import { ReinforcePlanComponent } from './reinforce-plan/reinforce-plan.component'; import { ReinforcePlanComponent } from './reinforce-plan/reinforce-plan.component';
import { CreatePlanOnlineFiveComponent } from './create-plan-online-five/create-plan-online-five.component'; import { CreatePlanOnlineFiveComponent } from './create-plan-online-five/create-plan-online-five.component';
import { SixFamiliarityComponent } from './six-familiarity/six-familiarity.component';
import { DrillRecordComponent } from './drill-record/drill-record.component';
import { PlanDeductionComponent } from './plan-deduction/plan-deduction.component';
const routes: Routes = [ const routes: Routes = [
{ path: 'entryPlan', component: EntryPlanComponent}, { path: 'entryPlan', component: EntryPlanComponent},
@ -35,6 +38,9 @@ const routes: Routes = [
{ path: 'maintainup',component:MaintainUpComponent},//维护更新 { path: 'maintainup',component:MaintainUpComponent},//维护更新
{ path: 'reinforceplan',component:ReinforcePlanComponent},//增援预案 { path: 'reinforceplan',component:ReinforcePlanComponent},//增援预案
{ path: 'createplanonlinefive',component:CreatePlanOnlineFiveComponent},//在线编制五级预案 { path: 'createplanonlinefive',component:CreatePlanOnlineFiveComponent},//在线编制五级预案
// { path: 'sixFamiliarity',component:SixFamiliarityComponent},//六熟悉
// { path: 'drillRecord',component:DrillRecordComponent},//演练记录
// { path: 'PlanDeduction',component:PlanDeductionComponent},//预案推演
]; ];
@NgModule({ @NgModule({

259
src/app/plan-management/plan-management.module.ts

@ -1,88 +1,163 @@
import { NgModule } from '@angular/core'; import { NgModule } from "@angular/core";
import { CommonModule } from '@angular/common'; import { CommonModule } from "@angular/common";
import { PlanManagementRoutingModule } from './plan-management-routing.module'; import { PlanManagementRoutingModule } from "./plan-management-routing.module";
import { ReactiveFormsModule, FormsModule } from '@angular/forms'; import { ReactiveFormsModule, FormsModule } from "@angular/forms";
import { A11yModule } from '@angular/cdk/a11y'; import { A11yModule } from "@angular/cdk/a11y";
import { DragDropModule } from '@angular/cdk/drag-drop'; import { DragDropModule } from "@angular/cdk/drag-drop";
import { PortalModule } from '@angular/cdk/portal'; import { PortalModule } from "@angular/cdk/portal";
import { ScrollingModule } from '@angular/cdk/scrolling'; import { ScrollingModule } from "@angular/cdk/scrolling";
import { CdkStepperModule } from '@angular/cdk/stepper'; import { CdkStepperModule } from "@angular/cdk/stepper";
import { CdkTableModule } from '@angular/cdk/table'; import { CdkTableModule } from "@angular/cdk/table";
import { CdkTreeModule } from '@angular/cdk/tree'; import { CdkTreeModule } from "@angular/cdk/tree";
import { MatAutocompleteModule } from '@angular/material/autocomplete'; import { MatAutocompleteModule } from "@angular/material/autocomplete";
import { MatBadgeModule } from '@angular/material/badge'; import { MatBadgeModule } from "@angular/material/badge";
import { MatBottomSheetModule } from '@angular/material/bottom-sheet'; import { MatBottomSheetModule } from "@angular/material/bottom-sheet";
import { MatButtonModule } from '@angular/material/button'; import { MatButtonModule } from "@angular/material/button";
import { MatButtonToggleModule } from '@angular/material/button-toggle'; import { MatButtonToggleModule } from "@angular/material/button-toggle";
import { MatCardModule } from '@angular/material/card'; import { MatCardModule } from "@angular/material/card";
import { MatCheckboxModule } from '@angular/material/checkbox'; import { MatCheckboxModule } from "@angular/material/checkbox";
import { MatChipsModule } from '@angular/material/chips'; import { MatChipsModule } from "@angular/material/chips";
import { MatStepperModule } from '@angular/material/stepper'; import { MatStepperModule } from "@angular/material/stepper";
import { MatDatepickerModule } from '@angular/material/datepicker'; import { MatDatepickerModule } from "@angular/material/datepicker";
import { MatDialogModule } from '@angular/material/dialog'; import { MatDialogModule } from "@angular/material/dialog";
import { MatDividerModule } from '@angular/material/divider'; import { MatDividerModule } from "@angular/material/divider";
import { MatExpansionModule } from '@angular/material/expansion'; import { MatExpansionModule } from "@angular/material/expansion";
import { MatGridListModule } from '@angular/material/grid-list'; import { MatGridListModule } from "@angular/material/grid-list";
import { MatIconModule } from '@angular/material/icon'; import { MatIconModule } from "@angular/material/icon";
import { MatInputModule } from '@angular/material/input'; import { MatInputModule } from "@angular/material/input";
import { MatListModule } from '@angular/material/list'; import { MatListModule } from "@angular/material/list";
import { MatMenuModule } from '@angular/material/menu'; import { MatMenuModule } from "@angular/material/menu";
import { MatNativeDateModule, MatRippleModule } from '@angular/material/core'; import { MatNativeDateModule, MatRippleModule } from "@angular/material/core";
import { MatPaginatorModule } from '@angular/material/paginator'; import { MatPaginatorModule } from "@angular/material/paginator";
import { MatProgressBarModule } from '@angular/material/progress-bar'; import { MatProgressBarModule } from "@angular/material/progress-bar";
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; import { MatProgressSpinnerModule } from "@angular/material/progress-spinner";
import { MatRadioModule } from '@angular/material/radio'; import { MatRadioModule } from "@angular/material/radio";
import { MatSelectModule } from '@angular/material/select'; import { MatSelectModule } from "@angular/material/select";
import { MatSidenavModule } from '@angular/material/sidenav'; import { MatSidenavModule } from "@angular/material/sidenav";
import { MatSliderModule } from '@angular/material/slider'; import { MatSliderModule } from "@angular/material/slider";
import { MatSlideToggleModule } from '@angular/material/slide-toggle'; import { MatSlideToggleModule } from "@angular/material/slide-toggle";
import { MatSnackBarModule } from '@angular/material/snack-bar'; import { MatSnackBarModule } from "@angular/material/snack-bar";
import { MatSortModule } from '@angular/material/sort'; import { MatSortModule } from "@angular/material/sort";
import { MatTableModule } from '@angular/material/table'; import { MatTableModule } from "@angular/material/table";
import { MatTabsModule } from '@angular/material/tabs'; import { MatTabsModule } from "@angular/material/tabs";
import { MatToolbarModule } from '@angular/material/toolbar'; import { MatToolbarModule } from "@angular/material/toolbar";
import { MatTooltipModule } from '@angular/material/tooltip'; import { MatTooltipModule } from "@angular/material/tooltip";
import { MatTreeModule } from '@angular/material/tree'; import { MatTreeModule } from "@angular/material/tree";
import { EntryPlanComponent } from './entry-plan/entry-plan.component';
import { PassPlanComponent, UnitInfo } from './pass-plan/pass-plan.component';
import { OpenPlanComponent } from './open-plan/open-plan.component';
import { EntryPlanLookComponent, AddPlanone, DownloadFile, AuditResult, ChangeName, ImgDetails } from './entry-plan-look/entry-plan-look.component';
import { PlanType, AuditSatus, PlanLevel, state } from '../pipes/boolean.pipe';
import { WebLookComponent } from './web-look/web-look.component';
import { OnetwoEntryPlanComponent } from './onetwo-entry-plan/onetwo-entry-plan.component';
import { newunitComponent } from './onetwo-entry-plan/onetwo-entry-plan.component';
import { MeetPlanComponent } from './meet-plan/meet-plan.component';
import { newunitMeet } from './meet-plan/meet-plan.component';
import { TypePlanComponent } from './type-plan/type-plan.component';
import { newunitType } from './type-plan/type-plan.component';
import { PsViewer } from './entry-plan-look/entry-plan-look.component'
import { onetwoAuditResult } from './onetwo-entry-plan/onetwo-entry-plan.component';
import { meetAuditResult } from './meet-plan/meet-plan.component';
import { typeAuditResult } from './type-plan/type-plan.component';
import { MaintainUpComponent } from './maintain-up/maintain-up.component'
import { GkPsViewer } from './pass-plan/pass-plan.component'
import { GkhtmlPsViewer } from './open-plan/open-plan.component';
import { ReinforcePlanComponent } from './reinforce-plan/reinforce-plan.component';
import { CreatePlanOnlineFiveComponent, OpenPlanToolDialog } from './create-plan-online-five/create-plan-online-five.component';
import { CreatePlanOnlineThreeComponent } from './create-plan-online-three/create-plan-online-three.component'
import { UiModule } from '../ui/ui.module';
import { TreeDiagramModule } from '../ui/ng-tree-diagram/src/ng-tree-diagram';
import { KeyUnitModule } from '../key-unit/key-unit.module';
import { yinYong } from './create-plan-online-five/create-plan-online-five.component'
import { newTitle } from './create-plan-online-five/create-plan-online-five.component'
import { disaster } from './create-plan-online-five/create-plan-online-five.component'
import { updataHl } from './create-plan-online-five/create-plan-online-five.component'
import {ChangeUrl} from './entry-plan-look/entry-plan-look.component'
import {adddwsurveys} from './create-plan-online-five/create-plan-online-five.component'
import { editUpload } from './entry-plan-look/entry-plan-look.component'
import { wenbenUpload } from './entry-plan-look/entry-plan-look.component'
import { EntryPlanComponent } from "./entry-plan/entry-plan.component";
import { PassPlanComponent, UnitInfo } from "./pass-plan/pass-plan.component";
import { OpenPlanComponent } from "./open-plan/open-plan.component";
import {
EntryPlanLookComponent,
AddPlanone,
DownloadFile,
AuditResult,
ChangeName,
ImgDetails,
} from "./entry-plan-look/entry-plan-look.component";
import {
PlanType,
AuditSatus,
PlanLevel,
state,
auditState,
} from "../pipes/boolean.pipe";
import { WebLookComponent } from "./web-look/web-look.component";
import { OnetwoEntryPlanComponent } from "./onetwo-entry-plan/onetwo-entry-plan.component";
import { newunitComponent } from "./onetwo-entry-plan/onetwo-entry-plan.component";
import { MeetPlanComponent } from "./meet-plan/meet-plan.component";
import { newunitMeet } from "./meet-plan/meet-plan.component";
import { TypePlanComponent } from "./type-plan/type-plan.component";
import { newunitType } from "./type-plan/type-plan.component";
import { PsViewer } from "./entry-plan-look/entry-plan-look.component";
import { onetwoAuditResult } from "./onetwo-entry-plan/onetwo-entry-plan.component";
import { meetAuditResult } from "./meet-plan/meet-plan.component";
import { typeAuditResult } from "./type-plan/type-plan.component";
import { MaintainUpComponent } from "./maintain-up/maintain-up.component";
import { GkPsViewer } from "./pass-plan/pass-plan.component";
import { GkhtmlPsViewer } from "./open-plan/open-plan.component";
import { ReinforcePlanComponent } from "./reinforce-plan/reinforce-plan.component";
import {
CreatePlanOnlineFiveComponent,
OpenPlanToolDialog,
} from "./create-plan-online-five/create-plan-online-five.component";
import { CreatePlanOnlineThreeComponent } from "./create-plan-online-three/create-plan-online-three.component";
import { UiModule } from "../ui/ui.module";
import { TreeDiagramModule } from "../ui/ng-tree-diagram/src/ng-tree-diagram";
import { KeyUnitModule } from "../key-unit/key-unit.module";
import { yinYong } from "./create-plan-online-five/create-plan-online-five.component";
import { newTitle } from "./create-plan-online-five/create-plan-online-five.component";
import { disaster } from "./create-plan-online-five/create-plan-online-five.component";
import { updataHl } from "./create-plan-online-five/create-plan-online-five.component";
import { ChangeUrl } from "./entry-plan-look/entry-plan-look.component";
import { adddwsurveys } from "./create-plan-online-five/create-plan-online-five.component";
import { editUpload } from "./entry-plan-look/entry-plan-look.component";
import { wenbenUpload } from "./entry-plan-look/entry-plan-look.component";
import { EditPlanCategoryComponent } from "./entry-plan-look/edit-plan-category/edit-plan-category.component";
import { SixFamiliarityComponent } from "./six-familiarity/six-familiarity.component";
import { DrillRecordComponent } from "./drill-record/drill-record.component";
import { NzDatePickerModule } from "ng-zorro-antd/date-picker";
import { NzInputModule } from "ng-zorro-antd/input";
import { NzButtonModule } from "ng-zorro-antd/button";
import { NzTreeSelectModule } from "ng-zorro-antd/tree-select";
import { SixFamiliarizeComponent } from "./entry-plan-look/six-familiarize/six-familiarize.component";
import { PlanDeductionComponent } from "./plan-deduction/plan-deduction.component";
import { AddPlanComponent } from "./plan-deduction/add-plan/add-plan.component";
import { NzSelectModule } from "ng-zorro-antd/select";
import { NzSpinModule } from "ng-zorro-antd/spin";
import { OpenOrComponent } from "./pass-plan/open-or/open-or.component";
import { NzTreeModule } from "ng-zorro-antd/tree";
@NgModule({ @NgModule({
declarations: [EntryPlanComponent, PassPlanComponent, OpenPlanComponent, EntryPlanLookComponent, AddPlanone, PlanType, AuditSatus, PlanLevel, DownloadFile, AuditResult, ChangeName, declarations: [
WebLookComponent, OnetwoEntryPlanComponent, newunitComponent, MeetPlanComponent, newunitMeet, TypePlanComponent, newunitType, PsViewer, onetwoAuditResult, meetAuditResult, EntryPlanComponent,
typeAuditResult, MaintainUpComponent, GkPsViewer, GkhtmlPsViewer, UnitInfo, ReinforcePlanComponent, state, ImgDetails, CreatePlanOnlineFiveComponent, CreatePlanOnlineThreeComponent, PassPlanComponent,
OpenPlanToolDialog,yinYong,newTitle,disaster,updataHl,ChangeUrl,adddwsurveys,editUpload,wenbenUpload], OpenPlanComponent,
EntryPlanLookComponent,
AddPlanone,
PlanType,
AuditSatus,
PlanLevel,
DownloadFile,
AuditResult,
ChangeName,
WebLookComponent,
OnetwoEntryPlanComponent,
newunitComponent,
MeetPlanComponent,
newunitMeet,
TypePlanComponent,
newunitType,
PsViewer,
onetwoAuditResult,
meetAuditResult,
typeAuditResult,
MaintainUpComponent,
GkPsViewer,
GkhtmlPsViewer,
UnitInfo,
ReinforcePlanComponent,
state,
ImgDetails,
CreatePlanOnlineFiveComponent,
CreatePlanOnlineThreeComponent,
OpenPlanToolDialog,
yinYong,
newTitle,
disaster,
updataHl,
ChangeUrl,
adddwsurveys,
editUpload,
wenbenUpload,
EditPlanCategoryComponent,
SixFamiliarityComponent,
DrillRecordComponent,
SixFamiliarizeComponent,
PlanDeductionComponent,
AddPlanComponent,
OpenOrComponent,
auditState,
],
imports: [ imports: [
CommonModule, CommonModule,
PlanManagementRoutingModule, PlanManagementRoutingModule,
@ -132,8 +207,22 @@ import { wenbenUpload } from './entry-plan-look/entry-plan-look.component'
MatTreeModule, MatTreeModule,
UiModule, UiModule,
TreeDiagramModule, TreeDiagramModule,
KeyUnitModule KeyUnitModule,
NzDatePickerModule,
NzInputModule,
NzButtonModule,
NzTreeSelectModule,
NzSelectModule,
NzSpinModule,
NzTreeModule,
],
exports: [
PlanType,
AuditSatus,
PlanLevel,
state,
CreatePlanOnlineFiveComponent,
auditState,
], ],
exports: [PlanType, AuditSatus, PlanLevel, state]
}) })
export class PlanManagementModule {} export class PlanManagementModule {}

38
src/app/plan-management/reinforce-plan/reinforce-plan.component.html

@ -13,11 +13,14 @@
<div class="queryField ordiv"> <div class="queryField ordiv">
<label style="margin-right: 10px;">消防救援站:</label> <label style="margin-right: 10px;">消防救援站:</label>
<mat-form-field class="example-full-width"> <mat-form-field class="example-full-width">
<input readonly matInput placeholder="请选择消防救援站" autocomplete="off" [(ngModel)]="js" name="js" (focus)="openorganizationbox()"> <input readonly matInput placeholder="请选择消防救援站" autocomplete="off" [(ngModel)]="js" name="js"
(focus)="openorganizationbox()">
</mat-form-field> </mat-form-field>
<mat-checkbox style="margin-left: 6px;" [(ngModel)]="jscheck" name="jscheck">包含下级</mat-checkbox> <mat-checkbox style="margin-left: 6px;" [(ngModel)]="jscheck" name="jscheck">包含下级</mat-checkbox>
<span *ngIf="padMore" style="margin-left: 10px; color: #0080FF;" (click)='padInfo()'>更多筛选条件<img [src]='imgsrcopen'> </span> <span *ngIf="padMore" style="margin-left: 10px; color: #0080FF;" (click)='padInfo()'>更多筛选条件<img
<span *ngIf="padput" style="margin-left: 10px; color: #0080FF;" (click)='padInfo()'>收起<img [src]='imgsrcdown'> </span> [src]='imgsrcopen'> </span>
<span *ngIf="padput" style="margin-left: 10px; color: #0080FF;" (click)='padInfo()'>收起<img [src]='imgsrcdown'>
</span>
<div class="organizationbox" *ngIf="isorganizationbox"> <div class="organizationbox" *ngIf="isorganizationbox">
<div (click)="closediv()" class="closediv"><mat-icon>clear</mat-icon></div> <div (click)="closediv()" class="closediv"><mat-icon>clear</mat-icon></div>
<mat-tree [dataSource]="dataSource" [treeControl]="treeControl"> <mat-tree [dataSource]="dataSource" [treeControl]="treeControl">
@ -25,12 +28,9 @@
<button type="button" mat-icon-button disabled></button> <button type="button" mat-icon-button disabled></button>
<li>{{node.name}}</li> <li>{{node.name}}</li>
</mat-tree-node> </mat-tree-node>
<mat-tree-node *matTreeNodeDef="let node;when: hasChild" matTreeNodePadding (click)='add(node)' class="organizationlist"> <mat-tree-node *matTreeNodeDef="let node;when: hasChild" matTreeNodePadding (click)='add(node)'
<button class="organizationlist">
type="button" <button type="button" mat-icon-button matTreeNodeToggle [attr.aria-label]="'toggle ' + node.name">
mat-icon-button
matTreeNodeToggle
[attr.aria-label]="'toggle ' + node.name">
<mat-icon class="mat-icon-rtl-mirror"> <mat-icon class="mat-icon-rtl-mirror">
{{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}} {{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}
</mat-icon> </mat-icon>
@ -132,7 +132,8 @@
<ng-container matColumnDef="level"> <ng-container matColumnDef="level">
<th mat-header-cell *matHeaderCellDef>预案级别</th> <th mat-header-cell *matHeaderCellDef>预案级别</th>
<td mat-cell *matCellDef="let element">{{element.planCategory==1?'Ⅰ级预案':element.planCategory==2?'Ⅱ级预案': <td mat-cell *matCellDef="let element">{{element.planCategory==1?'Ⅰ级预案':element.planCategory==2?'Ⅱ级预案':
element.planCategory==3?'Ⅲ级预案':element.planCategory==4?'Ⅳ级预案':element.planCategory==5?'Ⅴ级预案':element.planCategory==8?'类型预案':'应急预案'}}</td> element.planCategory==3?'Ⅲ级预案':element.planCategory==4?'Ⅳ级预案':element.planCategory==5?'Ⅴ级预案':element.planCategory==8?'类型预案':'应急预案'}}
</td>
</ng-container> </ng-container>
<ng-container matColumnDef="addtime"> <ng-container matColumnDef="addtime">
<th mat-header-cell *matHeaderCellDef>添加时间</th> <th mat-header-cell *matHeaderCellDef>添加时间</th>
@ -142,13 +143,11 @@
<th mat-header-cell *matHeaderCellDef>预案类型</th> <th mat-header-cell *matHeaderCellDef>预案类型</th>
<td mat-cell *matCellDef="let element">二维预案</td> <td mat-cell *matCellDef="let element">二维预案</td>
</ng-container> </ng-container>
<ng-container matColumnDef="auditStatus"> <ng-container matColumnDef="auditstate">
<th mat-header-cell *matHeaderCellDef>新增审核</th> <th mat-header-cell *matHeaderCellDef>审核状态</th>
<td mat-cell *matCellDef="let element">{{element.newVerifyState}}</td> <td mat-cell *matCellDef="let element">
</ng-container> {{element.auditStatus | auditState}}
<ng-container matColumnDef="weihuStatus"> </td>
<th mat-header-cell *matHeaderCellDef>维护审核</th>
<td mat-cell *matCellDef="let element">{{element.maintenanceVerifyState}}</td>
</ng-container> </ng-container>
<ng-container matColumnDef="openRange"> <ng-container matColumnDef="openRange">
<th mat-header-cell *matHeaderCellDef>是否公开</th> <th mat-header-cell *matHeaderCellDef>是否公开</th>
@ -167,10 +166,7 @@
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr> <tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr> <tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
</table> </table>
<mat-paginator <mat-paginator [length]="length" [pageSize]="pageSize" [pageSizeOptions]="pageSizeOptions"
[length]="length"
[pageSize]="pageSize"
[pageSizeOptions]="pageSizeOptions"
(page)="chagePage($event)"> (page)="chagePage($event)">
</mat-paginator> </mat-paginator>

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save