Compare commits

..

2 Commits

  1. 791
      package-lock.json
  2. 2
      package.json
  3. 4
      proxy.config.json
  4. 18
      src/app/home/basic-info/unit-details/unit-details.component.html
  5. 40
      src/app/home/basic-info/unit-details/unit-details.component.scss
  6. 502
      src/app/home/basic-info/unit-details/unit-details.component.ts
  7. 36
      src/app/home/home.module.ts
  8. 8
      src/app/home/statistic-analysis/home/home.component.ts
  9. 7
      src/app/home/statistic-analysis/home/unit-list/unit-list.component.ts
  10. 31
      src/app/home/task/da-monthly-task-overview/da-monthly-task-overview.component.html
  11. 868
      src/app/home/task/da-monthly-task-overview/da-monthly-task-overview.component.ts
  12. 54
      src/app/home/task/da-monthly-task-overview/look-shuangsj/look-shuangsj.component.html
  13. 0
      src/app/home/task/da-monthly-task-overview/look-shuangsj/look-shuangsj.component.scss
  14. 25
      src/app/home/task/da-monthly-task-overview/look-shuangsj/look-shuangsj.component.spec.ts
  15. 35
      src/app/home/task/da-monthly-task-overview/look-shuangsj/look-shuangsj.component.ts
  16. 2
      src/app/home/task/da-oneself-plan/da-oneself-plan.component.ts
  17. 5
      src/app/home/task/da-subordinate-audit/da-subordinate-audit.component.html
  18. 276
      src/app/home/task/da-subordinate-audit/da-subordinate-audit.component.ts
  19. 5
      src/app/home/task/station-task-apply/station-task-apply.component.html
  20. 460
      src/app/home/task/station-task-apply/station-task-apply.component.ts
  21. 5
      src/app/home/task/station-task-execution/station-task-execution.component.html
  22. 409
      src/app/home/task/station-task-execution/station-task-execution.component.ts
  23. 2
      src/app/home/task/station-task-execution/task-details/task-details.component.html
  24. 5
      src/app/home/task/station-weekly-plan/station-weekly-plan.component.html
  25. 1041
      src/app/home/task/station-weekly-plan/station-weekly-plan.component.ts
  26. 11
      src/app/home/task/zhi-audit/zhi-audit.component.html
  27. 125
      src/app/home/task/zhi-audit/zhi-audit.component.ts
  28. 989
      src/app/home/task/zhi-indicators/dist/zhi-indicators.component.js
  29. 5
      src/app/home/task/zhi-indicators/zhi-indicators.component.html
  30. 2
      src/app/home/task/zhi-indicators/zhi-indicators.component.ts
  31. BIN
      src/assets/images/tdt/end.png
  32. BIN
      src/assets/images/tdt/start.png
  33. 6
      src/index.html

791
package-lock.json generated

@ -38,7 +38,6 @@
"@angular/compiler-cli": "~13.1.0",
"@types/jasmine": "~3.10.0",
"@types/node": "^12.11.1",
"d3": "^7.8.2",
"html-docx-js-typescript": "^0.1.5",
"jasmine-core": "~3.10.0",
"karma": "~6.3.0",
@ -4336,428 +4335,6 @@
"integrity": "sha1-XQKkaFCt8bSjF5RqOSj8y1v9BCU=",
"dev": true
},
"node_modules/d3": {
"version": "7.8.2",
"resolved": "https://registry.npmmirror.com/d3/-/d3-7.8.2.tgz",
"integrity": "sha512-WXty7qOGSHb7HR7CfOzwN1Gw04MUOzN8qh9ZUsvwycIMb4DYMpY9xczZ6jUorGtO6bR9BPMPaueIKwiDxu9uiQ==",
"dev": true,
"dependencies": {
"d3-array": "3",
"d3-axis": "3",
"d3-brush": "3",
"d3-chord": "3",
"d3-color": "3",
"d3-contour": "4",
"d3-delaunay": "6",
"d3-dispatch": "3",
"d3-drag": "3",
"d3-dsv": "3",
"d3-ease": "3",
"d3-fetch": "3",
"d3-force": "3",
"d3-format": "3",
"d3-geo": "3",
"d3-hierarchy": "3",
"d3-interpolate": "3",
"d3-path": "3",
"d3-polygon": "3",
"d3-quadtree": "3",
"d3-random": "3",
"d3-scale": "4",
"d3-scale-chromatic": "3",
"d3-selection": "3",
"d3-shape": "3",
"d3-time": "3",
"d3-time-format": "4",
"d3-timer": "3",
"d3-transition": "3",
"d3-zoom": "3"
},
"engines": {
"node": ">=12"
}
},
"node_modules/d3-array": {
"version": "3.2.2",
"resolved": "https://registry.npmmirror.com/d3-array/-/d3-array-3.2.2.tgz",
"integrity": "sha512-yEEyEAbDrF8C6Ob2myOBLjwBLck1Z89jMGFee0oPsn95GqjerpaOA4ch+vc2l0FNFFwMD5N7OCSEN5eAlsUbgQ==",
"dev": true,
"dependencies": {
"internmap": "1 - 2"
},
"engines": {
"node": ">=12"
}
},
"node_modules/d3-axis": {
"version": "3.0.0",
"resolved": "https://registry.npmmirror.com/d3-axis/-/d3-axis-3.0.0.tgz",
"integrity": "sha512-IH5tgjV4jE/GhHkRV0HiVYPDtvfjHQlQfJHs0usq7M30XcSBvOotpmH1IgkcXsO/5gEQZD43B//fc7SRT5S+xw==",
"dev": true,
"engines": {
"node": ">=12"
}
},
"node_modules/d3-brush": {
"version": "3.0.0",
"resolved": "https://registry.npmmirror.com/d3-brush/-/d3-brush-3.0.0.tgz",
"integrity": "sha512-ALnjWlVYkXsVIGlOsuWH1+3udkYFI48Ljihfnh8FZPF2QS9o+PzGLBslO0PjzVoHLZ2KCVgAM8NVkXPJB2aNnQ==",
"dev": true,
"dependencies": {
"d3-dispatch": "1 - 3",
"d3-drag": "2 - 3",
"d3-interpolate": "1 - 3",
"d3-selection": "3",
"d3-transition": "3"
},
"engines": {
"node": ">=12"
}
},
"node_modules/d3-chord": {
"version": "3.0.1",
"resolved": "https://registry.npmmirror.com/d3-chord/-/d3-chord-3.0.1.tgz",
"integrity": "sha512-VE5S6TNa+j8msksl7HwjxMHDM2yNK3XCkusIlpX5kwauBfXuyLAtNg9jCp/iHH61tgI4sb6R/EIMWCqEIdjT/g==",
"dev": true,
"dependencies": {
"d3-path": "1 - 3"
},
"engines": {
"node": ">=12"
}
},
"node_modules/d3-color": {
"version": "3.1.0",
"resolved": "https://registry.npmmirror.com/d3-color/-/d3-color-3.1.0.tgz",
"integrity": "sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA==",
"dev": true,
"engines": {
"node": ">=12"
}
},
"node_modules/d3-contour": {
"version": "4.0.2",
"resolved": "https://registry.npmmirror.com/d3-contour/-/d3-contour-4.0.2.tgz",
"integrity": "sha512-4EzFTRIikzs47RGmdxbeUvLWtGedDUNkTcmzoeyg4sP/dvCexO47AaQL7VKy/gul85TOxw+IBgA8US2xwbToNA==",
"dev": true,
"dependencies": {
"d3-array": "^3.2.0"
},
"engines": {
"node": ">=12"
}
},
"node_modules/d3-delaunay": {
"version": "6.0.2",
"resolved": "https://registry.npmmirror.com/d3-delaunay/-/d3-delaunay-6.0.2.tgz",
"integrity": "sha512-IMLNldruDQScrcfT+MWnazhHbDJhcRJyOEBAJfwQnHle1RPh6WDuLvxNArUju2VSMSUuKlY5BGHRJ2cYyoFLQQ==",
"dev": true,
"dependencies": {
"delaunator": "5"
},
"engines": {
"node": ">=12"
}
},
"node_modules/d3-dispatch": {
"version": "3.0.1",
"resolved": "https://registry.npmmirror.com/d3-dispatch/-/d3-dispatch-3.0.1.tgz",
"integrity": "sha512-rzUyPU/S7rwUflMyLc1ETDeBj0NRuHKKAcvukozwhshr6g6c5d8zh4c2gQjY2bZ0dXeGLWc1PF174P2tVvKhfg==",
"dev": true,
"engines": {
"node": ">=12"
}
},
"node_modules/d3-drag": {
"version": "3.0.0",
"resolved": "https://registry.npmmirror.com/d3-drag/-/d3-drag-3.0.0.tgz",
"integrity": "sha512-pWbUJLdETVA8lQNJecMxoXfH6x+mO2UQo8rSmZ+QqxcbyA3hfeprFgIT//HW2nlHChWeIIMwS2Fq+gEARkhTkg==",
"dev": true,
"dependencies": {
"d3-dispatch": "1 - 3",
"d3-selection": "3"
},
"engines": {
"node": ">=12"
}
},
"node_modules/d3-dsv": {
"version": "3.0.1",
"resolved": "https://registry.npmmirror.com/d3-dsv/-/d3-dsv-3.0.1.tgz",
"integrity": "sha512-UG6OvdI5afDIFP9w4G0mNq50dSOsXHJaRE8arAS5o9ApWnIElp8GZw1Dun8vP8OyHOZ/QJUKUJwxiiCCnUwm+Q==",
"dev": true,
"dependencies": {
"commander": "7",
"iconv-lite": "0.6",
"rw": "1"
},
"bin": {
"csv2json": "bin/dsv2json.js",
"csv2tsv": "bin/dsv2dsv.js",
"dsv2dsv": "bin/dsv2dsv.js",
"dsv2json": "bin/dsv2json.js",
"json2csv": "bin/json2dsv.js",
"json2dsv": "bin/json2dsv.js",
"json2tsv": "bin/json2dsv.js",
"tsv2csv": "bin/dsv2dsv.js",
"tsv2json": "bin/dsv2json.js"
},
"engines": {
"node": ">=12"
}
},
"node_modules/d3-dsv/node_modules/commander": {
"version": "7.2.0",
"resolved": "https://registry.npmmirror.com/commander/-/commander-7.2.0.tgz",
"integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==",
"dev": true,
"engines": {
"node": ">= 10"
}
},
"node_modules/d3-dsv/node_modules/iconv-lite": {
"version": "0.6.3",
"resolved": "https://registry.npmmirror.com/iconv-lite/-/iconv-lite-0.6.3.tgz",
"integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
"dev": true,
"dependencies": {
"safer-buffer": ">= 2.1.2 < 3.0.0"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/d3-ease": {
"version": "3.0.1",
"resolved": "https://registry.npmmirror.com/d3-ease/-/d3-ease-3.0.1.tgz",
"integrity": "sha512-wR/XK3D3XcLIZwpbvQwQ5fK+8Ykds1ip7A2Txe0yxncXSdq1L9skcG7blcedkOX+ZcgxGAmLX1FrRGbADwzi0w==",
"dev": true,
"engines": {
"node": ">=12"
}
},
"node_modules/d3-fetch": {
"version": "3.0.1",
"resolved": "https://registry.npmmirror.com/d3-fetch/-/d3-fetch-3.0.1.tgz",
"integrity": "sha512-kpkQIM20n3oLVBKGg6oHrUchHM3xODkTzjMoj7aWQFq5QEM+R6E4WkzT5+tojDY7yjez8KgCBRoj4aEr99Fdqw==",
"dev": true,
"dependencies": {
"d3-dsv": "1 - 3"
},
"engines": {
"node": ">=12"
}
},
"node_modules/d3-force": {
"version": "3.0.0",
"resolved": "https://registry.npmmirror.com/d3-force/-/d3-force-3.0.0.tgz",
"integrity": "sha512-zxV/SsA+U4yte8051P4ECydjD/S+qeYtnaIyAs9tgHCqfguma/aAQDjo85A9Z6EKhBirHRJHXIgJUlffT4wdLg==",
"dev": true,
"dependencies": {
"d3-dispatch": "1 - 3",
"d3-quadtree": "1 - 3",
"d3-timer": "1 - 3"
},
"engines": {
"node": ">=12"
}
},
"node_modules/d3-format": {
"version": "3.1.0",
"resolved": "https://registry.npmmirror.com/d3-format/-/d3-format-3.1.0.tgz",
"integrity": "sha512-YyUI6AEuY/Wpt8KWLgZHsIU86atmikuoOmCfommt0LYHiQSPjvX2AcFc38PX0CBpr2RCyZhjex+NS/LPOv6YqA==",
"dev": true,
"engines": {
"node": ">=12"
}
},
"node_modules/d3-geo": {
"version": "3.1.0",
"resolved": "https://registry.npmmirror.com/d3-geo/-/d3-geo-3.1.0.tgz",
"integrity": "sha512-JEo5HxXDdDYXCaWdwLRt79y7giK8SbhZJbFWXqbRTolCHFI5jRqteLzCsq51NKbUoX0PjBVSohxrx+NoOUujYA==",
"dev": true,
"dependencies": {
"d3-array": "2.5.0 - 3"
},
"engines": {
"node": ">=12"
}
},
"node_modules/d3-hierarchy": {
"version": "3.1.2",
"resolved": "https://registry.npmmirror.com/d3-hierarchy/-/d3-hierarchy-3.1.2.tgz",
"integrity": "sha512-FX/9frcub54beBdugHjDCdikxThEqjnR93Qt7PvQTOHxyiNCAlvMrHhclk3cD5VeAaq9fxmfRp+CnWw9rEMBuA==",
"dev": true,
"engines": {
"node": ">=12"
}
},
"node_modules/d3-interpolate": {
"version": "3.0.1",
"resolved": "https://registry.npmmirror.com/d3-interpolate/-/d3-interpolate-3.0.1.tgz",
"integrity": "sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g==",
"dev": true,
"dependencies": {
"d3-color": "1 - 3"
},
"engines": {
"node": ">=12"
}
},
"node_modules/d3-path": {
"version": "3.1.0",
"resolved": "https://registry.npmmirror.com/d3-path/-/d3-path-3.1.0.tgz",
"integrity": "sha512-p3KP5HCf/bvjBSSKuXid6Zqijx7wIfNW+J/maPs+iwR35at5JCbLUT0LzF1cnjbCHWhqzQTIN2Jpe8pRebIEFQ==",
"dev": true,
"engines": {
"node": ">=12"
}
},
"node_modules/d3-polygon": {
"version": "3.0.1",
"resolved": "https://registry.npmmirror.com/d3-polygon/-/d3-polygon-3.0.1.tgz",
"integrity": "sha512-3vbA7vXYwfe1SYhED++fPUQlWSYTTGmFmQiany/gdbiWgU/iEyQzyymwL9SkJjFFuCS4902BSzewVGsHHmHtXg==",
"dev": true,
"engines": {
"node": ">=12"
}
},
"node_modules/d3-quadtree": {
"version": "3.0.1",
"resolved": "https://registry.npmmirror.com/d3-quadtree/-/d3-quadtree-3.0.1.tgz",
"integrity": "sha512-04xDrxQTDTCFwP5H6hRhsRcb9xxv2RzkcsygFzmkSIOJy3PeRJP7sNk3VRIbKXcog561P9oU0/rVH6vDROAgUw==",
"dev": true,
"engines": {
"node": ">=12"
}
},
"node_modules/d3-random": {
"version": "3.0.1",
"resolved": "https://registry.npmmirror.com/d3-random/-/d3-random-3.0.1.tgz",
"integrity": "sha512-FXMe9GfxTxqd5D6jFsQ+DJ8BJS4E/fT5mqqdjovykEB2oFbTMDVdg1MGFxfQW+FBOGoB++k8swBrgwSHT1cUXQ==",
"dev": true,
"engines": {
"node": ">=12"
}
},
"node_modules/d3-scale": {
"version": "4.0.2",
"resolved": "https://registry.npmmirror.com/d3-scale/-/d3-scale-4.0.2.tgz",
"integrity": "sha512-GZW464g1SH7ag3Y7hXjf8RoUuAFIqklOAq3MRl4OaWabTFJY9PN/E1YklhXLh+OQ3fM9yS2nOkCoS+WLZ6kvxQ==",
"dev": true,
"dependencies": {
"d3-array": "2.10.0 - 3",
"d3-format": "1 - 3",
"d3-interpolate": "1.2.0 - 3",
"d3-time": "2.1.1 - 3",
"d3-time-format": "2 - 4"
},
"engines": {
"node": ">=12"
}
},
"node_modules/d3-scale-chromatic": {
"version": "3.0.0",
"resolved": "https://registry.npmmirror.com/d3-scale-chromatic/-/d3-scale-chromatic-3.0.0.tgz",
"integrity": "sha512-Lx9thtxAKrO2Pq6OO2Ua474opeziKr279P/TKZsMAhYyNDD3EnCffdbgeSYN5O7m2ByQsxtuP2CSDczNUIZ22g==",
"dev": true,
"dependencies": {
"d3-color": "1 - 3",
"d3-interpolate": "1 - 3"
},
"engines": {
"node": ">=12"
}
},
"node_modules/d3-selection": {
"version": "3.0.0",
"resolved": "https://registry.npmmirror.com/d3-selection/-/d3-selection-3.0.0.tgz",
"integrity": "sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ==",
"dev": true,
"engines": {
"node": ">=12"
}
},
"node_modules/d3-shape": {
"version": "3.2.0",
"resolved": "https://registry.npmmirror.com/d3-shape/-/d3-shape-3.2.0.tgz",
"integrity": "sha512-SaLBuwGm3MOViRq2ABk3eLoxwZELpH6zhl3FbAoJ7Vm1gofKx6El1Ib5z23NUEhF9AsGl7y+dzLe5Cw2AArGTA==",
"dev": true,
"dependencies": {
"d3-path": "^3.1.0"
},
"engines": {
"node": ">=12"
}
},
"node_modules/d3-time": {
"version": "3.1.0",
"resolved": "https://registry.npmmirror.com/d3-time/-/d3-time-3.1.0.tgz",
"integrity": "sha512-VqKjzBLejbSMT4IgbmVgDjpkYrNWUYJnbCGo874u7MMKIWsILRX+OpX/gTk8MqjpT1A/c6HY2dCA77ZN0lkQ2Q==",
"dev": true,
"dependencies": {
"d3-array": "2 - 3"
},
"engines": {
"node": ">=12"
}
},
"node_modules/d3-time-format": {
"version": "4.1.0",
"resolved": "https://registry.npmmirror.com/d3-time-format/-/d3-time-format-4.1.0.tgz",
"integrity": "sha512-dJxPBlzC7NugB2PDLwo9Q8JiTR3M3e4/XANkreKSUxF8vvXKqm1Yfq4Q5dl8budlunRVlUUaDUgFt7eA8D6NLg==",
"dev": true,
"dependencies": {
"d3-time": "1 - 3"
},
"engines": {
"node": ">=12"
}
},
"node_modules/d3-timer": {
"version": "3.0.1",
"resolved": "https://registry.npmmirror.com/d3-timer/-/d3-timer-3.0.1.tgz",
"integrity": "sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA==",
"dev": true,
"engines": {
"node": ">=12"
}
},
"node_modules/d3-transition": {
"version": "3.0.1",
"resolved": "https://registry.npmmirror.com/d3-transition/-/d3-transition-3.0.1.tgz",
"integrity": "sha512-ApKvfjsSR6tg06xrL434C0WydLr7JewBB3V+/39RMHsaXTOG0zmt/OAXeng5M5LBm0ojmxJrpomQVZ1aPvBL4w==",
"dev": true,
"dependencies": {
"d3-color": "1 - 3",
"d3-dispatch": "1 - 3",
"d3-ease": "1 - 3",
"d3-interpolate": "1 - 3",
"d3-timer": "1 - 3"
},
"engines": {
"node": ">=12"
},
"peerDependencies": {
"d3-selection": "2 - 3"
}
},
"node_modules/d3-zoom": {
"version": "3.0.0",
"resolved": "https://registry.npmmirror.com/d3-zoom/-/d3-zoom-3.0.0.tgz",
"integrity": "sha512-b8AmV3kfQaqWAuacbPuNbL6vahnOJflOhexLzMMNLga62+/nh0JzvJ0aO/5a5MVgUFGS7Hu1P9P03o3fJkDCyw==",
"dev": true,
"dependencies": {
"d3-dispatch": "1 - 3",
"d3-drag": "2 - 3",
"d3-interpolate": "1 - 3",
"d3-selection": "2 - 3",
"d3-transition": "2 - 3"
},
"engines": {
"node": ">=12"
}
},
"node_modules/date-fns": {
"version": "2.28.0",
"resolved": "https://registry.npmmirror.com/date-fns/download/date-fns-2.28.0.tgz",
@ -4911,15 +4488,6 @@
"node": ">=8"
}
},
"node_modules/delaunator": {
"version": "5.0.0",
"resolved": "https://registry.npmmirror.com/delaunator/-/delaunator-5.0.0.tgz",
"integrity": "sha512-AyLvtyJdbv/U1GkiS6gUUzclRoAY4Gs75qkMygJJhU75LW4DNuSF2RMzpxs9jw9Oz1BobHjTdkG3zdP55VxAqw==",
"dev": true,
"dependencies": {
"robust-predicates": "^3.0.0"
}
},
"node_modules/delegates": {
"version": "1.0.0",
"resolved": "https://registry.npm.taobao.org/delegates/download/delegates-1.0.0.tgz",
@ -6629,15 +6197,6 @@
"node": ">=8"
}
},
"node_modules/internmap": {
"version": "2.0.3",
"resolved": "https://registry.npmmirror.com/internmap/-/internmap-2.0.3.tgz",
"integrity": "sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==",
"dev": true,
"engines": {
"node": ">=12"
}
},
"node_modules/ip": {
"version": "1.1.5",
"resolved": "https://registry.nlark.com/ip/download/ip-1.1.5.tgz",
@ -9873,12 +9432,6 @@
"rimraf": "bin.js"
}
},
"node_modules/robust-predicates": {
"version": "3.0.1",
"resolved": "https://registry.npmmirror.com/robust-predicates/-/robust-predicates-3.0.1.tgz",
"integrity": "sha512-ndEIpszUHiG4HtDsQLeIuMvRsDnn8c8rYStabochtUeCvfuvNptb5TUbVD68LRAILPX7p9nqQGh4xJgn3EHS/g==",
"dev": true
},
"node_modules/run-async": {
"version": "2.4.1",
"resolved": "https://registry.nlark.com/run-async/download/run-async-2.4.1.tgz",
@ -9897,12 +9450,6 @@
"queue-microtask": "^1.2.2"
}
},
"node_modules/rw": {
"version": "1.3.3",
"resolved": "https://registry.npmmirror.com/rw/-/rw-1.3.3.tgz",
"integrity": "sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ==",
"dev": true
},
"node_modules/rxjs": {
"version": "7.4.0",
"resolved": "https://registry.npmmirror.com/rxjs/download/rxjs-7.4.0.tgz",
@ -14860,317 +14407,6 @@
"integrity": "sha1-XQKkaFCt8bSjF5RqOSj8y1v9BCU=",
"dev": true
},
"d3": {
"version": "7.8.2",
"resolved": "https://registry.npmmirror.com/d3/-/d3-7.8.2.tgz",
"integrity": "sha512-WXty7qOGSHb7HR7CfOzwN1Gw04MUOzN8qh9ZUsvwycIMb4DYMpY9xczZ6jUorGtO6bR9BPMPaueIKwiDxu9uiQ==",
"dev": true,
"requires": {
"d3-array": "3",
"d3-axis": "3",
"d3-brush": "3",
"d3-chord": "3",
"d3-color": "3",
"d3-contour": "4",
"d3-delaunay": "6",
"d3-dispatch": "3",
"d3-drag": "3",
"d3-dsv": "3",
"d3-ease": "3",
"d3-fetch": "3",
"d3-force": "3",
"d3-format": "3",
"d3-geo": "3",
"d3-hierarchy": "3",
"d3-interpolate": "3",
"d3-path": "3",
"d3-polygon": "3",
"d3-quadtree": "3",
"d3-random": "3",
"d3-scale": "4",
"d3-scale-chromatic": "3",
"d3-selection": "3",
"d3-shape": "3",
"d3-time": "3",
"d3-time-format": "4",
"d3-timer": "3",
"d3-transition": "3",
"d3-zoom": "3"
}
},
"d3-array": {
"version": "3.2.2",
"resolved": "https://registry.npmmirror.com/d3-array/-/d3-array-3.2.2.tgz",
"integrity": "sha512-yEEyEAbDrF8C6Ob2myOBLjwBLck1Z89jMGFee0oPsn95GqjerpaOA4ch+vc2l0FNFFwMD5N7OCSEN5eAlsUbgQ==",
"dev": true,
"requires": {
"internmap": "1 - 2"
}
},
"d3-axis": {
"version": "3.0.0",
"resolved": "https://registry.npmmirror.com/d3-axis/-/d3-axis-3.0.0.tgz",
"integrity": "sha512-IH5tgjV4jE/GhHkRV0HiVYPDtvfjHQlQfJHs0usq7M30XcSBvOotpmH1IgkcXsO/5gEQZD43B//fc7SRT5S+xw==",
"dev": true
},
"d3-brush": {
"version": "3.0.0",
"resolved": "https://registry.npmmirror.com/d3-brush/-/d3-brush-3.0.0.tgz",
"integrity": "sha512-ALnjWlVYkXsVIGlOsuWH1+3udkYFI48Ljihfnh8FZPF2QS9o+PzGLBslO0PjzVoHLZ2KCVgAM8NVkXPJB2aNnQ==",
"dev": true,
"requires": {
"d3-dispatch": "1 - 3",
"d3-drag": "2 - 3",
"d3-interpolate": "1 - 3",
"d3-selection": "3",
"d3-transition": "3"
}
},
"d3-chord": {
"version": "3.0.1",
"resolved": "https://registry.npmmirror.com/d3-chord/-/d3-chord-3.0.1.tgz",
"integrity": "sha512-VE5S6TNa+j8msksl7HwjxMHDM2yNK3XCkusIlpX5kwauBfXuyLAtNg9jCp/iHH61tgI4sb6R/EIMWCqEIdjT/g==",
"dev": true,
"requires": {
"d3-path": "1 - 3"
}
},
"d3-color": {
"version": "3.1.0",
"resolved": "https://registry.npmmirror.com/d3-color/-/d3-color-3.1.0.tgz",
"integrity": "sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA==",
"dev": true
},
"d3-contour": {
"version": "4.0.2",
"resolved": "https://registry.npmmirror.com/d3-contour/-/d3-contour-4.0.2.tgz",
"integrity": "sha512-4EzFTRIikzs47RGmdxbeUvLWtGedDUNkTcmzoeyg4sP/dvCexO47AaQL7VKy/gul85TOxw+IBgA8US2xwbToNA==",
"dev": true,
"requires": {
"d3-array": "^3.2.0"
}
},
"d3-delaunay": {
"version": "6.0.2",
"resolved": "https://registry.npmmirror.com/d3-delaunay/-/d3-delaunay-6.0.2.tgz",
"integrity": "sha512-IMLNldruDQScrcfT+MWnazhHbDJhcRJyOEBAJfwQnHle1RPh6WDuLvxNArUju2VSMSUuKlY5BGHRJ2cYyoFLQQ==",
"dev": true,
"requires": {
"delaunator": "5"
}
},
"d3-dispatch": {
"version": "3.0.1",
"resolved": "https://registry.npmmirror.com/d3-dispatch/-/d3-dispatch-3.0.1.tgz",
"integrity": "sha512-rzUyPU/S7rwUflMyLc1ETDeBj0NRuHKKAcvukozwhshr6g6c5d8zh4c2gQjY2bZ0dXeGLWc1PF174P2tVvKhfg==",
"dev": true
},
"d3-drag": {
"version": "3.0.0",
"resolved": "https://registry.npmmirror.com/d3-drag/-/d3-drag-3.0.0.tgz",
"integrity": "sha512-pWbUJLdETVA8lQNJecMxoXfH6x+mO2UQo8rSmZ+QqxcbyA3hfeprFgIT//HW2nlHChWeIIMwS2Fq+gEARkhTkg==",
"dev": true,
"requires": {
"d3-dispatch": "1 - 3",
"d3-selection": "3"
}
},
"d3-dsv": {
"version": "3.0.1",
"resolved": "https://registry.npmmirror.com/d3-dsv/-/d3-dsv-3.0.1.tgz",
"integrity": "sha512-UG6OvdI5afDIFP9w4G0mNq50dSOsXHJaRE8arAS5o9ApWnIElp8GZw1Dun8vP8OyHOZ/QJUKUJwxiiCCnUwm+Q==",
"dev": true,
"requires": {
"commander": "7",
"iconv-lite": "0.6",
"rw": "1"
},
"dependencies": {
"commander": {
"version": "7.2.0",
"resolved": "https://registry.npmmirror.com/commander/-/commander-7.2.0.tgz",
"integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==",
"dev": true
},
"iconv-lite": {
"version": "0.6.3",
"resolved": "https://registry.npmmirror.com/iconv-lite/-/iconv-lite-0.6.3.tgz",
"integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
"dev": true,
"requires": {
"safer-buffer": ">= 2.1.2 < 3.0.0"
}
}
}
},
"d3-ease": {
"version": "3.0.1",
"resolved": "https://registry.npmmirror.com/d3-ease/-/d3-ease-3.0.1.tgz",
"integrity": "sha512-wR/XK3D3XcLIZwpbvQwQ5fK+8Ykds1ip7A2Txe0yxncXSdq1L9skcG7blcedkOX+ZcgxGAmLX1FrRGbADwzi0w==",
"dev": true
},
"d3-fetch": {
"version": "3.0.1",
"resolved": "https://registry.npmmirror.com/d3-fetch/-/d3-fetch-3.0.1.tgz",
"integrity": "sha512-kpkQIM20n3oLVBKGg6oHrUchHM3xODkTzjMoj7aWQFq5QEM+R6E4WkzT5+tojDY7yjez8KgCBRoj4aEr99Fdqw==",
"dev": true,
"requires": {
"d3-dsv": "1 - 3"
}
},
"d3-force": {
"version": "3.0.0",
"resolved": "https://registry.npmmirror.com/d3-force/-/d3-force-3.0.0.tgz",
"integrity": "sha512-zxV/SsA+U4yte8051P4ECydjD/S+qeYtnaIyAs9tgHCqfguma/aAQDjo85A9Z6EKhBirHRJHXIgJUlffT4wdLg==",
"dev": true,
"requires": {
"d3-dispatch": "1 - 3",
"d3-quadtree": "1 - 3",
"d3-timer": "1 - 3"
}
},
"d3-format": {
"version": "3.1.0",
"resolved": "https://registry.npmmirror.com/d3-format/-/d3-format-3.1.0.tgz",
"integrity": "sha512-YyUI6AEuY/Wpt8KWLgZHsIU86atmikuoOmCfommt0LYHiQSPjvX2AcFc38PX0CBpr2RCyZhjex+NS/LPOv6YqA==",
"dev": true
},
"d3-geo": {
"version": "3.1.0",
"resolved": "https://registry.npmmirror.com/d3-geo/-/d3-geo-3.1.0.tgz",
"integrity": "sha512-JEo5HxXDdDYXCaWdwLRt79y7giK8SbhZJbFWXqbRTolCHFI5jRqteLzCsq51NKbUoX0PjBVSohxrx+NoOUujYA==",
"dev": true,
"requires": {
"d3-array": "2.5.0 - 3"
}
},
"d3-hierarchy": {
"version": "3.1.2",
"resolved": "https://registry.npmmirror.com/d3-hierarchy/-/d3-hierarchy-3.1.2.tgz",
"integrity": "sha512-FX/9frcub54beBdugHjDCdikxThEqjnR93Qt7PvQTOHxyiNCAlvMrHhclk3cD5VeAaq9fxmfRp+CnWw9rEMBuA==",
"dev": true
},
"d3-interpolate": {
"version": "3.0.1",
"resolved": "https://registry.npmmirror.com/d3-interpolate/-/d3-interpolate-3.0.1.tgz",
"integrity": "sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g==",
"dev": true,
"requires": {
"d3-color": "1 - 3"
}
},
"d3-path": {
"version": "3.1.0",
"resolved": "https://registry.npmmirror.com/d3-path/-/d3-path-3.1.0.tgz",
"integrity": "sha512-p3KP5HCf/bvjBSSKuXid6Zqijx7wIfNW+J/maPs+iwR35at5JCbLUT0LzF1cnjbCHWhqzQTIN2Jpe8pRebIEFQ==",
"dev": true
},
"d3-polygon": {
"version": "3.0.1",
"resolved": "https://registry.npmmirror.com/d3-polygon/-/d3-polygon-3.0.1.tgz",
"integrity": "sha512-3vbA7vXYwfe1SYhED++fPUQlWSYTTGmFmQiany/gdbiWgU/iEyQzyymwL9SkJjFFuCS4902BSzewVGsHHmHtXg==",
"dev": true
},
"d3-quadtree": {
"version": "3.0.1",
"resolved": "https://registry.npmmirror.com/d3-quadtree/-/d3-quadtree-3.0.1.tgz",
"integrity": "sha512-04xDrxQTDTCFwP5H6hRhsRcb9xxv2RzkcsygFzmkSIOJy3PeRJP7sNk3VRIbKXcog561P9oU0/rVH6vDROAgUw==",
"dev": true
},
"d3-random": {
"version": "3.0.1",
"resolved": "https://registry.npmmirror.com/d3-random/-/d3-random-3.0.1.tgz",
"integrity": "sha512-FXMe9GfxTxqd5D6jFsQ+DJ8BJS4E/fT5mqqdjovykEB2oFbTMDVdg1MGFxfQW+FBOGoB++k8swBrgwSHT1cUXQ==",
"dev": true
},
"d3-scale": {
"version": "4.0.2",
"resolved": "https://registry.npmmirror.com/d3-scale/-/d3-scale-4.0.2.tgz",
"integrity": "sha512-GZW464g1SH7ag3Y7hXjf8RoUuAFIqklOAq3MRl4OaWabTFJY9PN/E1YklhXLh+OQ3fM9yS2nOkCoS+WLZ6kvxQ==",
"dev": true,
"requires": {
"d3-array": "2.10.0 - 3",
"d3-format": "1 - 3",
"d3-interpolate": "1.2.0 - 3",
"d3-time": "2.1.1 - 3",
"d3-time-format": "2 - 4"
}
},
"d3-scale-chromatic": {
"version": "3.0.0",
"resolved": "https://registry.npmmirror.com/d3-scale-chromatic/-/d3-scale-chromatic-3.0.0.tgz",
"integrity": "sha512-Lx9thtxAKrO2Pq6OO2Ua474opeziKr279P/TKZsMAhYyNDD3EnCffdbgeSYN5O7m2ByQsxtuP2CSDczNUIZ22g==",
"dev": true,
"requires": {
"d3-color": "1 - 3",
"d3-interpolate": "1 - 3"
}
},
"d3-selection": {
"version": "3.0.0",
"resolved": "https://registry.npmmirror.com/d3-selection/-/d3-selection-3.0.0.tgz",
"integrity": "sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ==",
"dev": true
},
"d3-shape": {
"version": "3.2.0",
"resolved": "https://registry.npmmirror.com/d3-shape/-/d3-shape-3.2.0.tgz",
"integrity": "sha512-SaLBuwGm3MOViRq2ABk3eLoxwZELpH6zhl3FbAoJ7Vm1gofKx6El1Ib5z23NUEhF9AsGl7y+dzLe5Cw2AArGTA==",
"dev": true,
"requires": {
"d3-path": "^3.1.0"
}
},
"d3-time": {
"version": "3.1.0",
"resolved": "https://registry.npmmirror.com/d3-time/-/d3-time-3.1.0.tgz",
"integrity": "sha512-VqKjzBLejbSMT4IgbmVgDjpkYrNWUYJnbCGo874u7MMKIWsILRX+OpX/gTk8MqjpT1A/c6HY2dCA77ZN0lkQ2Q==",
"dev": true,
"requires": {
"d3-array": "2 - 3"
}
},
"d3-time-format": {
"version": "4.1.0",
"resolved": "https://registry.npmmirror.com/d3-time-format/-/d3-time-format-4.1.0.tgz",
"integrity": "sha512-dJxPBlzC7NugB2PDLwo9Q8JiTR3M3e4/XANkreKSUxF8vvXKqm1Yfq4Q5dl8budlunRVlUUaDUgFt7eA8D6NLg==",
"dev": true,
"requires": {
"d3-time": "1 - 3"
}
},
"d3-timer": {
"version": "3.0.1",
"resolved": "https://registry.npmmirror.com/d3-timer/-/d3-timer-3.0.1.tgz",
"integrity": "sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA==",
"dev": true
},
"d3-transition": {
"version": "3.0.1",
"resolved": "https://registry.npmmirror.com/d3-transition/-/d3-transition-3.0.1.tgz",
"integrity": "sha512-ApKvfjsSR6tg06xrL434C0WydLr7JewBB3V+/39RMHsaXTOG0zmt/OAXeng5M5LBm0ojmxJrpomQVZ1aPvBL4w==",
"dev": true,
"requires": {
"d3-color": "1 - 3",
"d3-dispatch": "1 - 3",
"d3-ease": "1 - 3",
"d3-interpolate": "1 - 3",
"d3-timer": "1 - 3"
}
},
"d3-zoom": {
"version": "3.0.0",
"resolved": "https://registry.npmmirror.com/d3-zoom/-/d3-zoom-3.0.0.tgz",
"integrity": "sha512-b8AmV3kfQaqWAuacbPuNbL6vahnOJflOhexLzMMNLga62+/nh0JzvJ0aO/5a5MVgUFGS7Hu1P9P03o3fJkDCyw==",
"dev": true,
"requires": {
"d3-dispatch": "1 - 3",
"d3-drag": "2 - 3",
"d3-interpolate": "1 - 3",
"d3-selection": "2 - 3",
"d3-transition": "2 - 3"
}
},
"date-fns": {
"version": "2.28.0",
"resolved": "https://registry.npmmirror.com/date-fns/download/date-fns-2.28.0.tgz",
@ -15288,15 +14524,6 @@
}
}
},
"delaunator": {
"version": "5.0.0",
"resolved": "https://registry.npmmirror.com/delaunator/-/delaunator-5.0.0.tgz",
"integrity": "sha512-AyLvtyJdbv/U1GkiS6gUUzclRoAY4Gs75qkMygJJhU75LW4DNuSF2RMzpxs9jw9Oz1BobHjTdkG3zdP55VxAqw==",
"dev": true,
"requires": {
"robust-predicates": "^3.0.0"
}
},
"delegates": {
"version": "1.0.0",
"resolved": "https://registry.npm.taobao.org/delegates/download/delegates-1.0.0.tgz",
@ -16651,12 +15878,6 @@
}
}
},
"internmap": {
"version": "2.0.3",
"resolved": "https://registry.npmmirror.com/internmap/-/internmap-2.0.3.tgz",
"integrity": "sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==",
"dev": true
},
"ip": {
"version": "1.1.5",
"resolved": "https://registry.nlark.com/ip/download/ip-1.1.5.tgz",
@ -19122,12 +18343,6 @@
"glob": "^7.1.3"
}
},
"robust-predicates": {
"version": "3.0.1",
"resolved": "https://registry.npmmirror.com/robust-predicates/-/robust-predicates-3.0.1.tgz",
"integrity": "sha512-ndEIpszUHiG4HtDsQLeIuMvRsDnn8c8rYStabochtUeCvfuvNptb5TUbVD68LRAILPX7p9nqQGh4xJgn3EHS/g==",
"dev": true
},
"run-async": {
"version": "2.4.1",
"resolved": "https://registry.nlark.com/run-async/download/run-async-2.4.1.tgz",
@ -19143,12 +18358,6 @@
"queue-microtask": "^1.2.2"
}
},
"rw": {
"version": "1.3.3",
"resolved": "https://registry.npmmirror.com/rw/-/rw-1.3.3.tgz",
"integrity": "sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ==",
"dev": true
},
"rxjs": {
"version": "7.4.0",
"resolved": "https://registry.npmmirror.com/rxjs/download/rxjs-7.4.0.tgz",

2
package.json

@ -3,7 +3,7 @@
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve --proxy-config proxy.config.json --open --port 8888",
"start": "ng serve --proxy-config proxy.config.json --open --port 8888 ",
"build": "ng build",
"watch": "ng build --watch --configuration development",
"test": "ng test"

4
proxy.config.json

@ -1,13 +1,13 @@
{
"/api": {
"target": "https://fx.anxincloud.cn/",
"target": "https://121.36.37.70:8204/",
"测试": "https://121.36.37.70:8204/",
"生产": "https://fx.anxincloud.cn/",
"secure": false,
"changeOrigin": true
},
"/hubs": {
"target": "https://fx.anxincloud.cn/",
"target": "https://121.36.37.70:8204/",
"secure": false,
"ws": true,
"logLevel": "debug"

18
src/app/home/basic-info/unit-details/unit-details.component.html

@ -74,7 +74,7 @@
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label nzRequired [nzSpan]="8">法人/消防负责人<br/>联系方式</nz-form-label>
<nz-form-label nzRequired [nzSpan]="8">法人/消防负责人<br />联系方式</nz-form-label>
<nz-form-control [nzSpan]="12">
<nz-input-group>
<input nz-input type="text" formControlName="legalPersonPhone" placeholder="请输入联系方式" />
@ -106,7 +106,7 @@
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label nzRequired [nzSpan]="8" style="height: 40px!important">消防安全管理人<br/>联系方式</nz-form-label>
<nz-form-label nzRequired [nzSpan]="8" style="height: 40px!important">消防安全管理人<br />联系方式</nz-form-label>
<nz-form-control [nzSpan]="12">
<nz-input-group>
<input nz-input type="text" formControlName="adminPhone" placeholder="请输入联系方式" />
@ -143,7 +143,7 @@
</div>
<div class="gistopbox" *ngIf="isGisTopBox">
<div class="gistopbox">
<div class="positionItem">
<span>
经度 :
@ -168,8 +168,16 @@
<div class="gistopbox hidden" [ngClass]="{'show': isGisTopBoxTwo}">
<div class="inputBox">
<span>位置: </span>
<input name="position" [(ngModel)]="searchTitle" id="tipinput" class="positionInput" type="text"
autocomplete="off">
<div class="example-input">
<input placeholder="请输入位置" nz-input [(ngModel)]="inputValue" (input)="onInput($event)"
[nzAutocomplete]="auto" />
<nz-autocomplete #auto>
<nz-auto-option *ngFor="let item of options" [nzValue]="item.name"
[nzLabel]="item.name">
{{ item.name }}
</nz-auto-option>
</nz-autocomplete>
</div>
</div>
<div class="setPosition" (click)="search()">
搜索

40
src/app/home/basic-info/unit-details/unit-details.component.scss

@ -1,5 +1,5 @@
.bule {
color: #2196F3;
color: #2196f3;
}
.detailsbox {
@ -52,7 +52,7 @@
.title {
color: #000;
margin: 20px 15px;
background: #EFF1F5;
background: #eff1f5;
height: 35px;
line-height: 35px;
border-radius: 3px;
@ -73,7 +73,7 @@
}
.selected {
color: #2196F3;
color: #2196f3;
}
}
}
@ -172,11 +172,11 @@
top: 10px;
width: 90%;
height: 46px;
background: #FFFFFF;
background: #ffffff;
display: flex;
justify-content: space-around;
align-items: center;
z-index: 999;
.positionItem {
width: 35%;
height: 35px;
@ -184,7 +184,7 @@
align-items: center;
.itemNum {
background: #F2F2F2;
background: #f2f2f2;
box-sizing: border-box;
padding-left: 10px;
width: 80%;
@ -199,7 +199,7 @@
cursor: pointer;
width: 15%;
height: 32px;
background: #2196F3;
background: #2196f3;
color: #fff;
border-radius: 4px;
display: flex;
@ -211,19 +211,19 @@
width: 63%;
display: flex;
align-items: center;
.positionInput {
border: 0;
border-radius: 6px;
width: 90%;
height: 34px;
background: #F2F2F2;
margin-left: 8px;
box-sizing: border-box;
padding-left: 10px;
.example-input {
flex: 1;
input {
border: 0;
border-radius: 6px;
height: 34px;
background: #f2f2f2;
margin-left: 8px;
box-sizing: border-box;
padding-left: 10px;
}
}
}
}
.hidden {
@ -233,7 +233,7 @@
.show {
opacity: 1;
z-index: 1;
z-index: 1000;
}
}
}
@ -249,4 +249,4 @@
top: 50px;
}
}
}
}

502
src/app/home/basic-info/unit-details/unit-details.component.ts

@ -27,6 +27,8 @@ import { OperationLogComponent } from './operation-log/operation-log.component';
declare var $: any;
declare var Print: any;
declare var T: any;
@Component({
selector: 'app-unit-details',
templateUrl: './unit-details.component.html',
@ -530,6 +532,275 @@ export class UnitDetailsComponent implements OnInit {
this.getBuildingTypes();
}
map: any; //天地图实例
zoom = 12;
localsearch; //创建搜索对象 -- 提示列表
geocoder;
labelGisBgT() {
this.map = new T.Map('container', {
// projection: 'EPSG:4326',
});
this.map.centerAndZoom(new T.LngLat(116.40769, 39.89945), this.zoom);
this.localsearch = new T.LocalSearch(this.map, {
pageCapacity: 10,
onSearchComplete: (res) => {
this.localSearchResult(res);
},
});
this.geocoder = new T.Geocoder();
this.createDrivingRoute();
}
//驾车规划
drivingRoute;
createDrivingRoute() {
var startIcon = '../../../../assets/images/tdt/start.png'; //起点图标
var endIcon = '../../../../assets/images/tdt/end.png'; //终点图标
let that = this;
this.drivingRoute = new T.DrivingRoute(this.map, {
policy: 0, //驾车策略
onSearchComplete: (res) => {
searchResult(res);
},
});
searchDrivingRoute();
function searchDrivingRoute() {
that.map.clearOverLays();
let startLngLat = new T.LngLat(116.26762, 39.8001);
let endLngLat = new T.LngLat(116.60889, 40.02656);
//驾车路线搜索
that.drivingRoute.search(startLngLat, endLngLat);
}
function searchResult(result) {
console.log('驾车规划结果', result);
//添加起始点
createStartMarker(result);
// obj = result;
// var resultList = document.createElement('div');
// //获取方案个数
//获得单条驾车方案结果对象
let plan = result.getPlan(0);
console.log('单条驾车方案结果对象', plan);
//显示方案内容
var describeStr =
'<strong>总时间:' +
plan.getDuration() +
'秒,总距离:' +
Math.round(plan.getDistance()) +
'公里</strong>';
describeStr +=
"<div><img src='" +
startIcon +
"'/>" +
'116.267620,39.800100' +
'</div>';
console.log('describeStr', describeStr);
//显示该方案每段的描述信息
var numRoutes = plan.getNumRoutes();
console.log('numRoutes', numRoutes);
// for (var m = 0; m < numRoutes; m++) {
// var route = plan.getRoute(m);
// describeStr +=
// m + 1 + '.<span>' + route.getDescription() + '</span><br/>';
// //显示该方案每段的详细描述信息
// var numStepsStr = '';
// var numSteps = route.getNumSteps();
// for (var n = 0; n < numSteps; n++) {
// var step = route.getStep(n);
// numStepsStr +=
// '<p>' +
// (n + 1) +
// ")<a href='javascript://' onclick='showPosition(\"" +
// step.getPosition().getLng() +
// '","' +
// step.getPosition().getLat() +
// '","' +
// step.getDescription() +
// '");\'>' +
// step.getDescription() +
// '</a></p>';
// }
// describeStr += numStepsStr;
// }
// describeStr +=
// "<div><img src='" +
// endIcon +
// "'/>" +
// '116.608890,40.026560' +
// '</div>';
// div.innerHTML = describeStr;
// resultList.appendChild(div);
// //显示驾车线路
createRoute(plan.getPath(),'red');
// //显示最佳级别
that.map.setViewport(plan.getPath());
//显示公交搜索结果
// document.getElementById('driving_way').appendChild(resultList);
}
function createRoute(lnglats, lineColor?) {
//创建线对象
var line = new T.Polyline(lnglats, {
color: '#2C64A7',
weight: 5,
opacity: 0.9,
});
//向地图上添加线
that.map.addOverLay(line);
}
function createStartMarker(result) {
var startMarker = new T.Marker(result.getStart(), {
icon: new T.Icon({
iconUrl: startIcon,
iconSize: new T.Point(44, 34),
iconAnchor: new T.Point(12, 31),
}),
});
that.map.addOverLay(startMarker);
var endMarker = new T.Marker(result.getEnd(), {
icon: new T.Icon({
iconUrl: endIcon,
iconSize: new T.Point(44, 34),
iconAnchor: new T.Point(12, 31),
}),
});
that.map.addOverLay(endMarker);
}
}
//输入提示
inputValue?: string;
options: any[] = [];
onInput(event: Event): void {
const value = (event.target as HTMLInputElement).value;
this.localsearch.search(value, 4);
//
}
localSearchResult(result) {
this.clearAll();
// this.localsearch.clearResults()
console.log('结果列表', result);
console.log('结果类型', result.getResultType());
// console.log('666', result.suggests[0].getPois());
this.options = result.suggests || [];
//清空地图及搜索列表
}
//解析点数据结果
// pois(obj) {
// if (obj) {
// //显示搜索列表
// var divMarker = document.createElement('div');
// //坐标数组,设置最佳比例尺时会用到
// var zoomArr = [];
// for (var i = 0; i < obj.length; i++) {
// //闭包
// (function (i) {
// //名称
// var name = obj[i].name;
// //地址
// var address = obj[i].address;
// //坐标
// var lnglatArr = obj[i].lonlat.split(',');
// var lnglat = new T.LngLat(lnglatArr[0], lnglatArr[1]);
// var winHtml = '名称:' + name + '<br/>地址:' + address;
// //创建标注对象
// var marker = new T.Marker(lnglat);
// //地图上添加标注点
// map.addOverLay(marker);
// //注册标注点的点击事件
// var markerInfoWin = new T.InfoWindow(winHtml, { autoPan: true });
// marker.addEventListener('click', function () {
// marker.openInfoWindow(markerInfoWin);
// });
// zoomArr.push(lnglat);
// //在页面上显示搜索的列表
// var a = document.createElement('a');
// a.href = 'javascript://';
// a.innerHTML = name;
// a.onclick = function () {
// showPosition(marker, winHtml);
// };
// divMarker.appendChild(document.createTextNode(i + 1 + '.'));
// divMarker.appendChild(a);
// divMarker.appendChild(document.createElement('br'));
// })(i);
// }
// //显示地图的最佳级别
// map.setViewport(zoomArr);
// //显示搜索结果
// divMarker.appendChild(
// document.createTextNode(
// '共' +
// localsearch.getCountNumber() +
// '条记录,分' +
// localsearch.getCountPage() +
// '页,当前第' +
// localsearch.getPageIndex() +
// '页'
// )
// );
// document.getElementById('searchDiv').appendChild(divMarker);
// document.getElementById('resultDiv').style.display = 'block';
// }
// }
//清空地图及搜索列表
clearAll() {
this.map.clearOverLays();
}
//点击位置按钮
setPosition() {
console.log('点击位置');
if (this.disableds) {
return;
}
this.isGisTopBox = false;
this.isGisTopBoxTwo = true;
}
search() {
console.log(this.inputValue);
if (!this.inputValue) {
return;
}
// this.localsearch.search(this.inputValue, 1);
// console.log(this.localsearch.getResultType())
// this.http
// .get(
// `/geocoder?ds={"keyWord":"北京市延庆区延庆镇莲花池村前街50夕阳红养老院"}&tk=3027d4c8ed89bd8a185a9b73dbf3dcad`
// )
// .subscribe((data) => {
// console.log(data);
// });
this.geocoder.getPoint(this.inputValue, (res) => {
console.log(888, res);
this.map.centerAndZoom(
new T.LngLat(res.location.lon, res.location.lat),
16
);
});
}
imageUrl = ''; //单位照片
isLoadingSave: boolean = false;
uploadIndex: string;
@ -601,7 +872,6 @@ export class UnitDetailsComponent implements OnInit {
isMapLabel: boolean;
//地图标注位置
markerPosition: any = { x: 0, y: 0 }; //单位坐标
map: any; //地图实例
isGisTopBox: boolean = false; //点击位置按钮
isGisTopBoxTwo: boolean = false; //点击位置按钮
oldPositionMarker: any; //旧位置marker实例
@ -625,227 +895,6 @@ export class UnitDetailsComponent implements OnInit {
//初始化地图
searchTitle: any; //搜索内容
placeSearch: any; //地址搜索类
search() {
this.placeSearch.search(this.searchTitle, (status, result) => {
// 搜索成功时,result即是对应的匹配数据
if (result.info == 'OK') {
this.newPositionMarker.setPosition([
result.poiList.pois[0].location.lng,
result.poiList.pois[0].location.lat,
]);
this.markerPosition2 = {
x: result.poiList.pois[0].location.lng,
y: result.poiList.pois[0].location.lat,
};
this.map.setCenter([
result.poiList.pois[0].location.lng,
result.poiList.pois[0].location.lat,
]); //设置地图中心点
} else {
alert('查询不到输入地址信息');
}
});
}
//初始化地图
markerPosition2;
labelGis() {
this.map = new AMap.Map('container', {
zoom: 12,
});
this.map.on('complete', () => {
this.isGisTopBox = true;
});
//输入提示
var autoOptions = {
input: 'tipinput',
};
AMap.plugin(['AMap.PlaceSearch', 'AMap.AutoComplete'], () => {
var auto = new AMap.AutoComplete(autoOptions);
this.placeSearch = new AMap.PlaceSearch(); //构造地点查询类
auto.on('select', (e) => {
this.newPositionMarker.setPosition([
e.poi.location.lng,
e.poi.location.lat,
]);
this.markerPosition2 = { x: e.poi.location.lng, y: e.poi.location.lat };
this.map.setCenter([e.poi.location.lng, e.poi.location.lat]); //设置地图中心点
}); //注册监听,当选中某条记录时会触发
});
if (this.isMapLabel) {
//如果已经标注单位坐标
console.log('已标注单位位置');
this.map.setCenter([this.olddata.location.x, this.olddata.location.y]);
this.oldPositionMarker = new AMap.Marker({
position: [this.olddata.location.x, this.olddata.location.y],
content: this.newPositionMarkerContent,
offset: new AMap.Pixel(-34, -36),
});
// 将 markers 添加到地图
this.map.add(this.oldPositionMarker);
} else {
// console.log('未标注单位位置')
this.map.setCity('济南');
}
}
//点击位置按钮
setPosition() {
if (this.disableds) {
return;
}
this.isGisTopBox = false;
this.isGisTopBoxTwo = true;
if (this.isMapLabel) {
//如果已经标注单位坐标
// console.log('已标注单位位置')
if (this.oldPositionMarker) {
this.oldPositionMarker.setContent(this.oldPositionMarkerContent);
}
if (this.newPositionMarker) {
this.newPositionMarker.setContent(this.oldPositionMarkerContent);
}
this.newPositionMarker = new AMap.Marker({
draggable: true,
position: [this.markerPosition.x, this.markerPosition.y],
content: this.newPositionMarkerContentBtn,
offset: new AMap.Pixel(-34, -36),
});
this.map.add(this.newPositionMarker);
if (this.markerPosition.x && this.markerPosition.x != 0) {
this.markerPosition2 = {
x: this.markerPosition.x,
y: this.markerPosition.y,
};
} else {
this.markerPosition2 = {
x: this.map.getCenter().lng,
y: this.map.getCenter().lat,
}; //获取当前地图中心位置
}
this.newPositionMarker.on('dragend', (e) => {
let lnglat = this.map.containerToLngLat(e.pixel);
this.markerPosition2 = { x: lnglat.KL, y: lnglat.kT };
});
this.newPositionMarker.on('dragging', (e) => {
let lnglat = this.map.containerToLngLat(e.pixel);
this.newPositionMarker.setPosition(lnglat);
});
//点击确定
this.renderer2.listen(
this.elementRef.nativeElement.querySelector('#setPositionOk'),
'click',
(event) => {
this.map.clearMap();
this.isGisTopBox = true;
this.isGisTopBoxTwo = false;
this.newPositionMarker = new AMap.Marker({
position: [this.markerPosition2.x, this.markerPosition2.y],
content: this.newPositionMarkerContent,
offset: new AMap.Pixel(-34, -36),
});
this.markerPosition = this.markerPosition2;
this.map.add(this.newPositionMarker);
}
);
//点击取消
this.renderer2.listen(
this.elementRef.nativeElement.querySelector('#setPositionClose'),
'click',
(event) => {
this.isGisTopBox = true;
this.isGisTopBoxTwo = false;
this.map.clearMap();
this.newPositionMarker = new AMap.Marker({
position: [this.markerPosition.x, this.markerPosition.y],
content: this.newPositionMarkerContent,
offset: new AMap.Pixel(-34, -36),
});
this.map.setCenter([this.markerPosition.x, this.markerPosition.y]); //设置地图中心点
this.map.add(this.newPositionMarker);
}
);
} else {
// console.log('未标注单位位置')
if (this.newPositionMarker) {
this.newPositionMarker.setContent(this.oldPositionMarkerContent);
}
let center;
//this.markerPosition---单位坐标
if (this.markerPosition.x && this.markerPosition.x != 0) {
center = [this.markerPosition.x, this.markerPosition.y];
} else {
center = this.map.getCenter(); //获取当前地图中心位置
// console.log('获取当前地图中心位置', center)
this.map.setCenter(center);
}
this.newPositionMarker = new AMap.Marker({
draggable: true,
position: center,
content: this.newPositionMarkerContentBtn,
offset: new AMap.Pixel(-34, -36),
});
this.map.add(this.newPositionMarker);
if (this.markerPosition.x && this.markerPosition.x != 0) {
this.markerPosition2 = {
x: this.markerPosition.x,
y: this.markerPosition.y,
};
} else {
this.markerPosition2 = {
x: this.map.getCenter().lng,
y: this.map.getCenter().lat,
}; //获取当前地图中心位置
}
this.newPositionMarker.on('dragend', (e) => {
let lnglat = this.map.containerToLngLat(e.pixel);
this.markerPosition2 = { x: lnglat.KL, y: lnglat.kT };
});
this.newPositionMarker.on('dragging', (e) => {
let lnglat = this.map.containerToLngLat(e.pixel);
this.newPositionMarker.setPosition(lnglat);
});
//点击确定
this.renderer2.listen(
this.elementRef.nativeElement.querySelector('#setPositionOk'),
'click',
(event) => {
this.isGisTopBox = true;
this.isGisTopBoxTwo = false;
this.markerPosition = this.markerPosition2;
this.map.clearMap();
this.newPositionMarker = new AMap.Marker({
position: [this.markerPosition.x, this.markerPosition.y],
content: this.newPositionMarkerContent,
offset: new AMap.Pixel(-34, -36),
});
this.newPositionMarker.setMap(this.map);
}
);
this.renderer2.listen(
this.elementRef.nativeElement.querySelector('#setPositionClose'),
'click',
(event) => {
this.map.clearMap();
this.isGisTopBox = true;
this.isGisTopBoxTwo = false;
if (this.markerPosition.x && this.markerPosition.x != 0) {
//说明之前标过点
this.newPositionMarker = new AMap.Marker({
position: [this.markerPosition.x, this.markerPosition.y],
content: this.newPositionMarkerContent,
offset: new AMap.Pixel(-34, -36),
});
this.map.setCenter([this.markerPosition.x, this.markerPosition.y]); //设置地图中心点
this.map.add(this.newPositionMarker);
}
}
); //取消
}
}
listOfData: any[] = [];
listOfData2: any[] = [];
@ -1564,10 +1613,10 @@ export class UnitDetailsComponent implements OnInit {
}
edit() {
console.log(this.validateForm)
if(this.validateForm.invalid){
console.log(this.validateForm);
if (this.validateForm.invalid) {
this.message.create('warning', '请填写完整');
return
return;
}
// return
let body = {
@ -1660,7 +1709,8 @@ export class UnitDetailsComponent implements OnInit {
//未标注
this.isMapLabel = false;
}
this.labelGis();
// this.labelGis();
this.labelGisBgT();
});
}

36
src/app/home/home.module.ts

@ -77,12 +77,12 @@ import { chineseNumbers, fileName, absoluteValue } from '../pipe/pipe';
import { TaskDetailsPagesComponent } from './task/station-task-execution/task-details/task-details.component';
import { NzTabsModule } from 'ng-zorro-antd/tabs';
import { CheckagainComponent } from './task/da-oneself-plan/checkagain/checkagain.component';
import { TaskListComponent } from './statistic-analysis/home/task-list/task-list.component';
import { FormComponent } from './statistic-analysis/form/form.component';
import { ExamineComponent } from './statistic-analysis/form/examine/examine.component';
import { ReviewComponent } from './statistic-analysis/form/review/review.component';
import { UnitListComponent } from './statistic-analysis/home/unit-list/unit-list.component';
import { LookShuangsjComponent } from './task/da-monthly-task-overview/look-shuangsj/look-shuangsj.component';
import { TaskListComponent } from './statistic-analysis/home/task-list/task-list.component';
import { FormComponent } from './statistic-analysis/form/form.component';
import { ExamineComponent } from './statistic-analysis/form/examine/examine.component';
import { ReviewComponent } from './statistic-analysis/form/review/review.component';
import { UnitListComponent } from './statistic-analysis/home/unit-list/unit-list.component';
import { NzAutocompleteModule } from 'ng-zorro-antd/auto-complete';
@NgModule({
declarations: [
NavComponent,
@ -134,7 +134,6 @@ import { LookShuangsjComponent } from './task/da-monthly-task-overview/look-shua
ExamineComponent,
ReviewComponent,
UnitListComponent,
LookShuangsjComponent
],
imports: [
CommonModule,
@ -173,9 +172,26 @@ import { LookShuangsjComponent } from './task/da-monthly-task-overview/look-shua
NzListModule,
NzDividerModule,
AngularDraggableModule,
NzTabsModule
NzTabsModule,
NzAutocompleteModule,
],
providers: [StationTaskExecutionComponent, StationWeeklyPlanComponent],
entryComponents: [AddroleComponent, EditroleComponent, AdduserComponent, EdituserComponent, AddorComponent, EditorComponent, ApplyComponent, ApplyLookComponent, LookTaskComponent, AllotPersonComponent, EditOrComponent, CreateTaskComponent, UploadComponent, CheckagainComponent,TaskListComponent]
entryComponents: [
AddroleComponent,
EditroleComponent,
AdduserComponent,
EdituserComponent,
AddorComponent,
EditorComponent,
ApplyComponent,
ApplyLookComponent,
LookTaskComponent,
AllotPersonComponent,
EditOrComponent,
CreateTaskComponent,
UploadComponent,
CheckagainComponent,
TaskListComponent,
],
})
export class HomeModule { }
export class HomeModule {}

8
src/app/home/statistic-analysis/home/home.component.ts

@ -731,7 +731,8 @@ export class HomeComponent implements OnInit {
}
echartsSetData_taskStatByOrg() {
console.log();
console.log()
this.completionOfTaskPie.clear();
this.completionOfTaskBar.clear();
@ -745,7 +746,8 @@ export class HomeComponent implements OnInit {
this.completionOfTaskPie &&
this.completionOfTaskPie.setOption(this.completionOfTaskPieOption);
console.log(666, this.statisticalData_taskStatByOrg);
console.log(666,this.statisticalData_taskStatByOrg)
let taskBar = task['组织机构数据'];
let taskBarx = [];
let taskBary1 = [];
@ -888,7 +890,6 @@ export class HomeComponent implements OnInit {
clickCard(item) {
console.log(item);
// return
if (item.name.indexOf('单位') !== -1) {
this.modal.create({
nzTitle: item.name + '列表',
@ -898,6 +899,7 @@ export class HomeComponent implements OnInit {
nzFooter: null,
nzComponentParams: {
name: item.name,
data: item.data,
},
});
} else {

7
src/app/home/statistic-analysis/home/unit-list/unit-list.component.ts

@ -9,11 +9,14 @@ import { NzMessageService } from 'ng-zorro-antd/message';
})
export class UnitListComponent implements OnInit {
@Input() name?: any;
@Input() data?: any;
constructor(private http: HttpClient, private message: NzMessageService) {}
ngOnInit(): void {
this.getUnitList();
if (this.data.length !== 0) {
this.getUnitList();
}
}
listOfData: any = [];
@ -25,9 +28,9 @@ export class UnitListComponent implements OnInit {
getUnitList() {
this.isloading = true;
let params = {
CompanyIds: this.data,
PageNumber: this.PageNumber,
PageSize: this.PageSize,
CheckType: this.name === '不合格单位数量' ? '不合格单位' : '隐患单位',
};
this.http
.get('/api/Companies', {

31
src/app/home/task/da-monthly-task-overview/da-monthly-task-overview.component.html

@ -2,12 +2,9 @@
<div class="box">
<div class="timebox">
<nz-select [(ngModel)]="selectedYear" (ngModelChange)="selectYear($event)">
<nz-option [nzValue]="2021" nzLabel="2021年"></nz-option>
<nz-option [nzValue]="2022" nzLabel="2022年"></nz-option>
<nz-option [nzValue]="2023" nzLabel="2023年"></nz-option>
<nz-option [nzValue]="2024" nzLabel="2024年"></nz-option>
<nz-option [nzValue]="2025" nzLabel="2025年"></nz-option>
<nz-option [nzValue]="2026" nzLabel="2026年"></nz-option>
<nz-option [nzValue]="2027" nzLabel="2027年"></nz-option>
</nz-select>
<div *ngFor="let item of months" class="monthbtn" (click)="selectMonth(item)"
[ngClass]="{'selectedMonth': item.id == selectedMonth}">
@ -164,10 +161,6 @@
</ng-template>
</ng-template>
</div>
<!-- <span (click)="xxx(i)">xxx</span> -->
<nz-date-picker nzShowTime nzFormat="yyyy-MM-dd HH:mm:ss" [(ngModel)]="i.planTime"
nzPlaceHolder="请选择检查日期" nzBorderless (ngModelChange)="checkTime($event,i,item)">
</nz-date-picker>
</div>
</div>
</div>
@ -457,28 +450,6 @@
检查结果
</span>
</div>
<div class="flexcol" style="flex: 2;">
<span class="ellipsi">
<nz-date-picker nzShowTime nzFormat="yyyy-MM-dd HH:mm:ss"
[(ngModel)]="i.planTime" nzPlaceHolder="请选择检查日期" nzBorderless
(ngModelChange)="checkTime($event,i,element)">
</nz-date-picker>
</span>
<span>
检查时间
</span>
</div>
<div class="flexcol" style="flex: 1;">
<span class="ellipsi">
<span style="cursor: pointer;margin-right: 5px;" (click)="look(i)">查看</span>
<span style="cursor: pointer;color: rgb(255, 64, 77);" (click)="deleteTask(item,i)">删除</span>
</span>
<span>
操作
</span>
</div>
</div>
</div>

868
src/app/home/task/da-monthly-task-overview/da-monthly-task-overview.component.ts

File diff suppressed because it is too large Load Diff

54
src/app/home/task/da-monthly-task-overview/look-shuangsj/look-shuangsj.component.html

@ -1,54 +0,0 @@
<div>
<div class="rowItem">
<span>单位名称:</span><span>{{data.company?.companyName}}</span>
</div>
<div class="rowItem">
<span>单位管理人:</span><span>{{data.company?.directorName}}</span>
</div>
<div class="rowItem">
<span>联系方式:</span><span>{{data.company?.directorPhone}}</span>
</div>
<div class="rowItem">
<span>单位地址:</span><span>{{data.company?.address}}</span>
</div>
<div class="rowItem">
<span>建筑结构:</span><span>{{data.company?.datas?.basicInfo.structure}}</span>
</div>
<div class="rowItem">
<span>建筑高度:</span><span>{{data.company?.datas?.basicInfo.height}}</span>
</div>
<div class="rowItem">
<span>建筑层数:</span><span>{{data.company?.datas?.basicInfo.layer}}</span>
</div>
<div class="rowItem">
<span>控制室位置:</span><span>{{data.company?.datas?.facilities.controlPosition}}</span>
</div>
<div class="rowItem">
<span>安全重点部位:</span><span>{{data.company?.useNature}}</span>
</div>
<div class="rowItem">
<span>单位性质:</span><span>{{data.company?.datas?.basicInfo.nature}}</span>
</div>
<div class="rowItem">
<span>消防设施及器材:</span><span>{{data.company?.datas?.facilities.fireFightingFacilities.title}}</span>
</div>
<div class="rowItem">
<span>单位主要消防设施:</span><span>{{data.company?.zhuyaosheshi?.title}}</span>
</div>
<div class="rowItem">
<span>位置:</span><span>{{data.position.name}}</span>
</div>
<div class="rowItem">
<span>姓名:</span><span>{{data.name}}</span>
</div>
<div class="rowItem">
<span>职务:</span><span>{{data.post}}</span>
</div>
<div class="rowItem">
<span>备注:</span><span>{{data.remarks}}</span>
</div>
<div class="rowItem">
<span>图片列表:</span>
<img *ngFor="let item of data.imgShow2" [src]="item" alt="" (click)="viewImg(item)" width="100" height="100">
</div>
</div>

0
src/app/home/task/da-monthly-task-overview/look-shuangsj/look-shuangsj.component.scss

25
src/app/home/task/da-monthly-task-overview/look-shuangsj/look-shuangsj.component.spec.ts

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

35
src/app/home/task/da-monthly-task-overview/look-shuangsj/look-shuangsj.component.ts

@ -1,35 +0,0 @@
import { Component, Input, OnInit } from '@angular/core';
import Viewer from 'viewerjs';
@Component({
selector: 'app-look-shuangsj',
templateUrl: './look-shuangsj.component.html',
styleUrls: ['./look-shuangsj.component.scss'],
})
export class LookShuangsjComponent implements OnInit {
@Input() data?: any;
constructor() {}
ngOnInit(): void {
console.log(this.data);
}
//查看图片
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);
}
}

2
src/app/home/task/da-oneself-plan/da-oneself-plan.component.ts

@ -23,7 +23,7 @@ export class DaOneselfPlanComponent implements OnInit {
this.getTuesdayThursdayNum()
}
selectedMonth
selectedYear = 2024
selectedYear = 2023
selectedTime
selectMonth(item) {
this.selectedMonth = item.id

5
src/app/home/task/da-subordinate-audit/da-subordinate-audit.component.html

@ -2,12 +2,9 @@
<div class="box">
<div class="timebox">
<nz-select [(ngModel)]="selectedYear" (ngModelChange)="selectYear($event)">
<nz-option [nzValue]="2021" nzLabel="2021年"></nz-option>
<nz-option [nzValue]="2022" nzLabel="2022年"></nz-option>
<nz-option [nzValue]="2023" nzLabel="2023年"></nz-option>
<nz-option [nzValue]="2024" nzLabel="2024年"></nz-option>
<nz-option [nzValue]="2025" nzLabel="2025年"></nz-option>
<nz-option [nzValue]="2026" nzLabel="2026年"></nz-option>
<nz-option [nzValue]="2027" nzLabel="2027年"></nz-option>
</nz-select>
<div *ngFor="let item of months" class="monthbtn" (click)="selectMonth(item)"
[ngClass]="{'selectedMonth': item.id == selectedMonth}">

276
src/app/home/task/da-subordinate-audit/da-subordinate-audit.component.ts

@ -7,36 +7,33 @@ import { AllotPersonComponent } from './allot-person/allot-person.component';
@Component({
selector: 'app-da-subordinate-audit',
templateUrl: './da-subordinate-audit.component.html',
styleUrls: ['./da-subordinate-audit.component.scss'],
styleUrls: ['./da-subordinate-audit.component.scss']
})
export class DaSubordinateAuditComponent implements OnInit {
constructor(
private http: HttpClient,
private modal: NzModalService,
private viewContainerRef: ViewContainerRef,
private message: NzMessageService
) {}
OrganizationId;
selectedTab = 0;
constructor(private http: HttpClient, private modal: NzModalService, private viewContainerRef: ViewContainerRef, private message: NzMessageService) { }
atPresentData = { id: 0, name: '', finished: 0, totalCount: 0, list: [] };
OrganizationId
selectedTab = 0
atPresentData = { id: 0, name: '', finished: 0, totalCount: 0, list: [] }
selectTab(item) {
this.selectedTab = item.id;
this.atPresentData = item;
this.selectedTab = item.id
this.atPresentData = item
}
ngOnInit(): void {
this.OrganizationId = JSON.parse(
sessionStorage.getItem('userData')
).organizationId;
this.selectedMonth = new Date().getMonth() + 1;
this.OrganizationId = JSON.parse(sessionStorage.getItem('userData')).organizationId
this.selectedMonth = new Date().getMonth() + 1
this.getTaskList(0)
this.getTaskList(0);
//获得主协调查人员
this.getSupervisor('main');
this.getSupervisor('assisted');
this.getSupervisor('main')
this.getSupervisor('assisted')
}
months = [
{ id: 1, name: '1月', isable: true },
@ -50,110 +47,104 @@ export class DaSubordinateAuditComponent implements OnInit {
{ id: 9, name: '9月', isable: true },
{ id: 10, name: '10月', isable: true },
{ id: 11, name: '11月', isable: true },
{ id: 12, name: '12月', isable: true },
];
selectedMonth;
selectedYear = new Date().getFullYear();
selectedTime;
{ id: 12, name: '12月', isable: true }
]
selectedMonth
selectedYear = 2023
selectedTime
selectMonth(item) {
this.selectedMonth = item.id;
this.selectedMonth = item.id
this.getTaskList(this.selectedTab);
this.getTaskList(this.selectedTab)
}
selectYear(e) {
this.selectedYear = e;
console.log('年', e);
this.getTaskList(this.selectedTab);
this.selectedYear = e
console.log('年', e)
this.getTaskList(this.selectedTab)
}
PageNumber = 1;
PageSize = 9999;
PageNumber = 1
PageSize = 9999
data = [
{ id: 0, name: '熟悉演练任务', finished: 0, totalCount: 0, list: [] },
{ id: 1, name: '联络指导任务', finished: 0, totalCount: 0, list: [] },
];
{ id: 1, name: '联络指导任务', finished: 0, totalCount: 0, list: [] }
]
isloading = false;
isloading = false
getTaskList(index) {
this.isloading = true;
this.isloading = true
this.data = [
{ id: 0, name: '熟悉演练任务', finished: 0, totalCount: 0, list: [] },
{ id: 1, name: '联络指导任务', finished: 0, totalCount: 0, list: [] },
];
let selectedTime =
this.selectedYear + '-' + this.selectedMonth + '-' + '01';
console.log('查询时间', selectedTime);
{ id: 1, name: '联络指导任务', finished: 0, totalCount: 0, list: [] }
]
let selectedTime = this.selectedYear + '-' + this.selectedMonth + '-' + '01'
console.log('查询时间', selectedTime)
let params = {
Month: selectedTime,
OrganizationId: this.OrganizationId,
PageNumber: this.PageNumber,
PageSize: this.PageSize,
};
this.http
.get('/api/PlanTasks', {
params: params,
})
.subscribe((data: any) => {
let arr1 = [];
let arr2 = [];
data.items.forEach((element) => {
if (element.taskName == '熟悉演练') {
arr1.push(element);
}
if (element.taskName == '联络指导') {
arr2.push(element);
}
});
arr1.forEach((item) => {
if (!!item.approvalStatus) {
this.data[0].finished += 1;
}
});
arr2.forEach((item) => {
if (!!item.approvalStatus) {
this.data[1].finished += 1;
}
});
this.data[0].totalCount = arr1.length;
this.data[0].list = [...arr1];
this.data[1].totalCount = arr2.length;
this.data[1].list = [...arr2];
this.atPresentData = this.data[index];
console.log(this.atPresentData);
this.isloading = false;
PageSize: this.PageSize
}
this.http.get('/api/PlanTasks', {
params: params
}).subscribe((data: any) => {
let arr1 = []
let arr2 = []
data.items.forEach(element => {
if (element.taskName == '熟悉演练') {
arr1.push(element)
}
if (element.taskName == '联络指导') {
arr2.push(element)
}
});
arr1.forEach(item => {
if (!!item.approvalStatus) {
this.data[0].finished += 1
}
});
arr2.forEach(item => {
if (!!item.approvalStatus) {
this.data[1].finished += 1
}
});
this.data[0].totalCount = arr1.length
this.data[0].list = [...arr1]
this.data[1].totalCount = arr2.length
this.data[1].list = [...arr2]
this.atPresentData = this.data[index]
console.log(this.atPresentData)
this.isloading = false
})
}
assitantsupervisorList;
mainsupervisorList;
assitantsupervisorList
mainsupervisorList
getSupervisor(type) {
let params = {
inspectorType: type,
};
this.http
.get('/api/Users/Inspectors', {
params: params,
})
.subscribe((data: any) => {
console.log('检查员列表', data);
if (type == 'main') {
this.mainsupervisorList = data;
} else {
this.assitantsupervisorList = data;
}
});
inspectorType: type
}
this.http.get('/api/Users/Inspectors', {
params: params
}).subscribe((data: any) => {
console.log('检查员列表', data)
if (type == 'main') {
this.mainsupervisorList = data
} else {
this.assitantsupervisorList = data
}
})
}
allot(item) {
console.log(item);
if (
this.mainsupervisorList.length == 0 ||
this.assitantsupervisorList.length == 0
) {
console.log(item)
if (this.mainsupervisorList.length == 0 || this.assitantsupervisorList.length == 0) {
this.message.create('warning', '请从用户管理添加检查人员');
return;
return
}
const modal = this.modal.create({
nzTitle: '分配监督检查员',
@ -163,40 +154,38 @@ export class DaSubordinateAuditComponent implements OnInit {
nzMaskClosable: false,
nzComponentParams: {
mainsupervisorList: this.mainsupervisorList,
assitantsupervisorList: this.assitantsupervisorList,
assitantsupervisorList: this.assitantsupervisorList
},
nzOnOk: async () => {
if (instance.validateForm.valid) {
await new Promise((resolve, reject) => {
let body = {
mainSupervisorId: instance.validateForm.value.main,
assitantSupervisorId: instance.validateForm.value.assitant,
};
assitantSupervisorId: instance.validateForm.value.assitant
}
this.http.patch(`/api/PlanTasks/${item.id}`, body).subscribe({
next: async (data) => {
this.message.create('success', '分配成功');
resolve(data);
this.getTaskList(this.selectedTab);
return true;
resolve(data)
this.getTaskList(this.selectedTab)
return true
},
error: (err) => {
this.message.create('warning', '分配失败');
reject(err);
return false;
},
});
});
reject(err)
return false
}
})
})
} else {
this.message.create('warning', '请填写完整!');
return false;
return false
}
},
}
});
const instance = modal.getContentComponent();
modal.afterOpen.subscribe(() => console.log('[afterOpen] emitted!'));
modal.afterClose.subscribe((result) =>
console.log('[afterClose] The result is:', result)
);
modal.afterClose.subscribe(result => console.log('[afterClose] The result is:', result));
}
agree(item) {
@ -205,23 +194,21 @@ export class DaSubordinateAuditComponent implements OnInit {
nzOkText: '确定',
nzOkType: 'default',
nzOnOk: () => {
this.http
.post(`/api/PlanTasks/Approval/${item.id}`, null, {
params: {
approvalStatus: 'approved',
},
})
.subscribe({
next: (data) => {
this.message.create('success', '审核成功');
this.getTaskList(this.selectedTab);
},
error: (err) => {
this.message.create('warning', '审核失败');
},
});
this.http.post(`/api/PlanTasks/Approval/${item.id}`, null, {
params: {
approvalStatus: 'approved'
}
}).subscribe({
next: (data) => {
this.message.create('success', '审核成功');
this.getTaskList(this.selectedTab)
},
error: (err) => {
this.message.create('warning', '审核失败');
}
})
},
nzCancelText: '取消',
nzCancelText: '取消'
});
}
@ -231,23 +218,22 @@ export class DaSubordinateAuditComponent implements OnInit {
nzOkText: '确定',
nzOkType: 'default',
nzOnOk: () => {
this.http
.post(`/api/PlanTasks/Approval/${item.id}`, null, {
params: {
approvalStatus: 'reject',
},
})
.subscribe({
next: (data) => {
this.message.create('success', '审核成功');
this.getTaskList(this.selectedTab);
},
error: (err) => {
this.message.create('warning', '审核失败');
},
});
this.http.post(`/api/PlanTasks/Approval/${item.id}`, null, {
params: {
approvalStatus: 'reject'
}
}).subscribe({
next: (data) => {
this.message.create('success', '审核成功');
this.getTaskList(this.selectedTab)
},
error: (err) => {
this.message.create('warning', '审核失败');
}
})
},
nzCancelText: '取消',
nzCancelText: '取消'
});
}
}

5
src/app/home/task/station-task-apply/station-task-apply.component.html

@ -23,12 +23,9 @@
</div>
<div class="timebox">
<nz-select [(ngModel)]="selectedYear" (ngModelChange)="selectYear($event)">
<nz-option [nzValue]="2021" nzLabel="2021年"></nz-option>
<nz-option [nzValue]="2022" nzLabel="2022年"></nz-option>
<nz-option [nzValue]="2023" nzLabel="2023年"></nz-option>
<nz-option [nzValue]="2024" nzLabel="2024年"></nz-option>
<nz-option [nzValue]="2025" nzLabel="2025年"></nz-option>
<nz-option [nzValue]="2026" nzLabel="2026年"></nz-option>
<nz-option [nzValue]="2027" nzLabel="2027年"></nz-option>
</nz-select>
<div *ngFor="let item of months" class="monthbtn" (click)="selectMonth(item)"
[ngClass]="{'selectedMonth': item.id == selectedMonth}">

460
src/app/home/task/station-task-apply/station-task-apply.component.ts

@ -1,15 +1,6 @@
import {
Component,
OnInit,
TemplateRef,
ViewContainerRef,
} from '@angular/core';
import { Component, OnInit, TemplateRef, ViewContainerRef } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import {
NzFormatEmitEvent,
NzTreeComponent,
NzTreeNodeOptions,
} from 'ng-zorro-antd/tree';
import { NzFormatEmitEvent, NzTreeComponent, NzTreeNodeOptions } from 'ng-zorro-antd/tree';
import { NzModalService } from 'ng-zorro-antd/modal';
import { NzMessageService } from 'ng-zorro-antd/message';
import { HttpClient, HttpHeaders } from '@angular/common/http';
@ -19,31 +10,25 @@ import { ApplyLookComponent } from './apply-look/apply-look.component';
import { ThisReceiver } from '@angular/compiler';
import { MethodService } from 'src/app/service/method.service';
@Component({
selector: 'app-station-task-apply',
templateUrl: './station-task-apply.component.html',
styleUrls: ['./station-task-apply.component.scss'],
styleUrls: ['./station-task-apply.component.scss']
})
export class StationTaskApplyComponent implements OnInit {
validateForm!: FormGroup;
constructor(
private fb: FormBuilder,
private modal: NzModalService,
private viewContainerRef: ViewContainerRef,
private message: NzMessageService,
private http: HttpClient,
private toTree: TreeService,
public methodService: MethodService
) {}
constructor(private fb: FormBuilder, private modal: NzModalService, private viewContainerRef: ViewContainerRef, private message: NzMessageService, private http: HttpClient, private toTree: TreeService, public methodService: MethodService) { }
searchForm = {
taskname: '',
unitname: '',
unitlevel: '',
or: '',
};
OrganizationId;
or: ''
}
OrganizationId
isSupervisor: boolean; //是否为检查员
isSupervisor: boolean //是否为检查员
months = [
{ id: 1, name: '1月', isable: true },
@ -57,151 +42,142 @@ export class StationTaskApplyComponent implements OnInit {
{ id: 9, name: '9月', isable: true },
{ id: 10, name: '10月', isable: true },
{ id: 11, name: '11月', isable: true },
{ id: 12, name: '12月', isable: true },
];
selectedMonth;
selectedYear = new Date().getFullYear();
selectedTime;
{ id: 12, name: '12月', isable: true }
]
selectedMonth
selectedYear = 2023
selectedTime
selectMonth(item) {
this.selectedMonth = item.id;
this.getTaskList();
this.selectedMonth = item.id
this.getTaskList()
}
selectYear(e) {
this.selectedYear = e;
this.getTaskList();
this.selectedYear = e
this.getTaskList()
}
isloading = false;
totalCount;
PageNumber = 1;
PageSize = 10;
taskLIst = [];
isloading = false
totalCount
PageNumber = 1
PageSize = 10
taskLIst = []
getTaskList() {
this.isloading = true;
let selectedTime =
this.selectedYear + '-' + this.selectedMonth + '-' + '01';
this.isloading = true
let selectedTime = this.selectedYear + '-' + this.selectedMonth + '-' + '01'
let params = {
Month: selectedTime,
TaskName: this.searchForm.taskname,
CompanyName: this.searchForm.unitname,
assistantOrganizationId: this.searchForm.or,
TaskTypes: this.isSupervisor ? ['双随机', '联络指导'] : ['熟悉演练'],
CreatorId: this.isSupervisor ? this.userId : null, //如果是检查员需要传CreatorId只针对这个账户 如果是救援站就不需要
CreatorId: this.isSupervisor ? this.userId : null,//如果是检查员需要传CreatorId只针对这个账户 如果是救援站就不需要
CreationTypes: ['申领任务'],
OrganizationId: this.OrganizationId,
PageNumber: this.PageNumber,
PageSize: this.PageSize,
};
this.http
.get('/api/PlanTasks', {
params: params,
})
.subscribe((data: any) => {
this.isloading = false;
console.log('任务申请列表', data);
this.totalCount = data.totalCount;
this.taskLIst = [...data.items];
});
PageSize: this.PageSize
}
this.http.get('/api/PlanTasks', {
params: params
}).subscribe((data: any) => {
this.isloading = false
console.log('任务申请列表', data);
this.totalCount = data.totalCount
this.taskLIst = [...data.items]
})
}
pageChange($event) {
this.PageNumber = $event;
this.getTaskList();
this.PageNumber = $event
this.getTaskList()
}
search() {
this.PageNumber = 1;
this.getTaskList();
this.PageNumber = 1
this.getTaskList()
}
reset() {
this.PageNumber = 1;
this.PageNumber = 1
this.searchForm = {
taskname: '',
unitname: '',
unitlevel: '',
or: '',
};
this.getTaskList();
or: ''
}
this.getTaskList()
}
expandKeys;
defaultOrId: string;
expandKeys
defaultOrId: string
//获取所有组织机构
organizationList: any;
organizationListAll: any;
nodes: any = [];
organizationList: any
organizationListAll: any
nodes: any = []
async getAllOrganization() {
let params = {
ContainsChildren: 'true',
ContainsChildren: "true",
PageNumber: 1,
PageSize: 9999,
code: '0000',
};
code: '0000'
}
var p = new Promise<void>((resolve, reject) => {
this.http
.get('/api/Organizations', {
params: params,
})
.subscribe((data: any) => {
data.items.forEach((element) => {
element.key = element.id;
element.title = element.name;
element.disableCheckbox = true;
element.selectable = false;
element.level == 'squadron'
? (element.disableCheckbox = false)
: null;
});
this.organizationListAll = JSON.parse(JSON.stringify(data.items));
this.organizationList = JSON.parse(JSON.stringify(data.items)).filter(
(item) => {
return item.level != 'squadron';
}
);
resolve(data);
this.http.get('/api/Organizations', {
params: params
}).subscribe((data: any) => {
data.items.forEach(element => {
element.key = element.id
element.title = element.name
element.disableCheckbox = true
element.selectable = false
element.level == 'squadron' ? element.disableCheckbox = false : null
});
});
return p;
this.organizationListAll = JSON.parse(JSON.stringify(data.items))
this.organizationList = JSON.parse(JSON.stringify(data.items)).filter(item => {
return item.level != 'squadron'
})
resolve(data)
})
})
return p
}
//获得所有检查员
supervisorList = [];
supervisorList = []
async getSupervisor() {
return new Promise<void>((resolve, reject) => {
this.http.get('/api/Users/Inspectors').subscribe((data: any) => {
console.log('检查员列表', data);
data.forEach((element) => {
element.key = element.id;
element.title = element.name;
element.parentId = element.organizationId;
console.log('检查员列表', data)
data.forEach(element => {
element.key = element.id
element.title = element.name
element.parentId = element.organizationId
});
this.supervisorList = data;
resolve(data);
});
});
this.supervisorList = data
resolve(data)
})
})
}
mainsupervisorList = [];
assitantsupervisorList = [];
mainsupervisorList = []
assitantsupervisorList = []
getSupervisortype(type) {
let params = {
inspectorType: type,
};
this.http
.get('/api/Users/Inspectors', {
params: params,
})
.subscribe((data: any) => {
if (type == 'main') {
this.mainsupervisorList = data;
} else {
this.assitantsupervisorList = data;
}
});
inspectorType: type
}
this.http.get('/api/Users/Inspectors', {
params: params
}).subscribe((data: any) => {
if (type == 'main') {
this.mainsupervisorList = data
} else {
this.assitantsupervisorList = data
}
})
}
//获得除了检查员的其他用户
users;
users
async getUsers() {
var p = new Promise<void>((resolve, reject) => {
let params = {
@ -209,66 +185,60 @@ export class StationTaskApplyComponent implements OnInit {
OrganizationLevel: 'squadron',
ContainsChildren: true,
PageNumber: 1,
PageSize: 9999,
};
this.http
.get('/api/Users', {
params: params,
})
.subscribe((data: any) => {
console.log('用户列表', data.items);
data.items.forEach((element) => {
element.key = element.id;
element.title = element.name;
element.parentId = element.organizationId;
});
this.users = data.items;
resolve(data);
PageSize: 9999
}
this.http.get('/api/Users', {
params: params
}).subscribe((data: any) => {
console.log('用户列表', data.items)
data.items.forEach(element => {
element.key = element.id
element.title = element.name
element.parentId = element.organizationId
});
});
return p;
this.users = data.items
resolve(data)
})
})
return p
}
userId;
userId
ngOnInit(): void {
this.OrganizationId = JSON.parse(
sessionStorage.getItem('userData')
).organizationId;
this.userId = JSON.parse(sessionStorage.getItem('userData')).id;
let roles = JSON.parse(sessionStorage.getItem('userData')).roles;
let isSupervisor = roles.find((item) => {
return item.name.indexOf('检查') != -1;
});
isSupervisor ? (this.isSupervisor = true) : (this.isSupervisor = false);
this.selectedMonth = new Date().getMonth() + 1;
this.getTaskList();
Promise.all([
this.getAllOrganization(),
this.getSupervisor(),
this.getUsers(),
]).then((results) => {
if (this.isSupervisor) {
// let arr = [...this.users, ...this.organizationListAll]
let arr = [...this.organizationListAll];
this.nodes = this.toTree.toTree(JSON.parse(JSON.stringify(arr)));
} else {
let arr = [...this.supervisorList, ...this.organizationList];
this.nodes = this.toTree.toTree(JSON.parse(JSON.stringify(arr)));
}
});
this.OrganizationId = JSON.parse(sessionStorage.getItem('userData')).organizationId
this.userId = JSON.parse(sessionStorage.getItem('userData')).id
let roles = JSON.parse(sessionStorage.getItem('userData')).roles
let isSupervisor = roles.find(item => {
return item.name.indexOf('检查') != -1
})
isSupervisor ? this.isSupervisor = true : this.isSupervisor = false
this.selectedMonth = new Date().getMonth() + 1
this.getTaskList()
Promise.all([this.getAllOrganization(), this.getSupervisor(), this.getUsers()])
.then((results) => {
if (this.isSupervisor) {
// let arr = [...this.users, ...this.organizationListAll]
let arr = [...this.organizationListAll]
this.nodes = this.toTree.toTree(JSON.parse(JSON.stringify(arr)))
} else {
let arr = [...this.supervisorList, ...this.organizationList]
this.nodes = this.toTree.toTree(JSON.parse(JSON.stringify(arr)))
}
});
setTimeout(() => {
this.rollStart();
this.rollStart()
}, 0);
//获得主协调查人员
this.getSupervisortype('main');
this.getSupervisortype('assisted');
this.getSupervisortype('main')
this.getSupervisortype('assisted')
}
timer;
timer
rollStart() {
var ROLL_SPEED = 100;
var ROLL_SPEED = 100
var noticeList1 = document.getElementById('notice-list');
var noticeList2 = document.getElementById('notice-list-2');
var listWrapper = document.getElementById('list-wrapper');
@ -276,20 +246,18 @@ export class StationTaskApplyComponent implements OnInit {
this.timer = setInterval(rollStart, ROLL_SPEED);
function rollStart() {
if (
Math.abs(_subStr(listWrapper.style.top)) >= noticeList1.clientHeight
) {
listWrapper.style.top = '0px';
if (Math.abs(_subStr(listWrapper.style.top)) >= noticeList1.clientHeight) {
listWrapper.style.top = '0px'
} else {
var top = listWrapper.style.top;
listWrapper.style.top = _subStr(top) - 1 + 'px';
var top = listWrapper.style.top
listWrapper.style.top = _subStr(top) - 1 + 'px'
}
}
// 截取px前数值
function _subStr(str) {
var index = str.indexOf('px');
if (index > -1) {
return parseFloat(str.substr(0, index + 1));
return parseFloat(str.substr(0, index + 1))
}
}
}
@ -297,20 +265,20 @@ export class StationTaskApplyComponent implements OnInit {
window.clearInterval(this.timer);
}
mouseleave() {
this.rollStart();
this.rollStart()
}
ngOnDestroy(): void {
console.log('退出了');
this.mouseEnter();
console.log('退出了')
this.mouseEnter()
}
apply() {
if (this.nodes.length == 0) {
this.message.create('warning', '组织机构为空,请稍后重试');
return;
return
}
if (this.supervisorList.length == 0) {
this.message.create('warning', '检查员名单为空,请稍后重试');
return;
return
}
const modal = this.modal.create({
nzTitle: '申请',
@ -319,53 +287,40 @@ export class StationTaskApplyComponent implements OnInit {
nzWidth: 660,
nzMaskClosable: false,
nzComponentParams: {
title: this.isSupervisor ? ['联络指导', '双随机'] : ['熟悉演练'],
title: this.isSupervisor ? ["联络指导", "双随机"] : ["熟悉演练"],
isSupervisor: this.isSupervisor,
supervisorList: JSON.parse(JSON.stringify(this.supervisorList)),
organizationList: JSON.parse(JSON.stringify(this.organizationList)),
users: JSON.parse(JSON.stringify(this.users)),
nodes: JSON.parse(JSON.stringify(this.nodes)),
mainsupervisorList: JSON.parse(JSON.stringify(this.mainsupervisorList)),
assitantsupervisorList: JSON.parse(
JSON.stringify(this.assitantsupervisorList)
),
assitantsupervisorList: JSON.parse(JSON.stringify(this.assitantsupervisorList))
},
nzOnOk: async () => {
console.log(instance.validateForm.value);
console.log(instance.validateForm.value)
if (instance.validateForm.valid && instance.selectedUnitData.id) {
if (instance.taskType == '双随机') {
if (
!instance.validateForm.value.main ||
!instance.validateForm.value.assist
) {
if (!instance.validateForm.value.main || !instance.validateForm.value.assist) {
this.message.create('warning', '请填写检查人员!');
return false;
return false
}
}
await new Promise((resolve, reject) => {
let selectedMonth =
this.selectedMonth < 10
? '0' + this.selectedMonth
: this.selectedMonth;
let selectedTime =
this.selectedYear + '-' + selectedMonth + '-' + '01';
let supervisorIds;
let assistantOrganizationIds;
let selectedMonth = this.selectedMonth < 10 ? "0" + this.selectedMonth : this.selectedMonth;
let selectedTime = this.selectedYear + '-' + selectedMonth + '-' + '01'
let supervisorIds
let assistantOrganizationIds
if (this.isSupervisor) {
if (instance.taskType == '双随机') {
supervisorIds = [
instance.validateForm.value.main,
instance.validateForm.value.assist,
];
supervisorIds = [instance.validateForm.value.main, instance.validateForm.value.assist]
} else {
supervisorIds = [];
supervisorIds = []
}
assistantOrganizationIds =
instance.validateForm.value.organization;
assistantOrganizationIds = instance.validateForm.value.organization
} else {
supervisorIds = instance.validateForm.value.organization;
assistantOrganizationIds = [];
supervisorIds = instance.validateForm.value.organization
assistantOrganizationIds = []
}
let body = {
@ -377,35 +332,36 @@ export class StationTaskApplyComponent implements OnInit {
supervisorIds: supervisorIds,
assistantOrganizationIds: assistantOrganizationIds,
creationType: '申领任务',
approvalStatus: '待处理',
};
approvalStatus: '待处理'
}
this.http.post('/api/PlanTasks', body).subscribe({
next: (data) => {
this.message.create('success', '创建成功');
resolve(data);
this.getTaskList();
return true;
resolve(data)
this.getTaskList()
return true
},
error: (err) => {
this.message.create('warning', '创建失败');
reject(err);
return false;
},
});
});
reject(err)
return false
}
})
})
} else {
this.message.create('warning', '请填写完整!');
return false;
return false
}
},
}
});
const instance = modal.getContentComponent();
modal.afterOpen.subscribe(() => console.log('[afterOpen] emitted!'));
modal.afterClose.subscribe((result) =>
console.log('[afterClose] The result is:', result)
);
modal.afterClose.subscribe(result => console.log('[afterClose] The result is:', result));
}
look(item) {
const modal = this.modal.create({
nzTitle: '详情',
@ -416,40 +372,44 @@ export class StationTaskApplyComponent implements OnInit {
nzComponentParams: {
data: item,
},
nzFooter: null,
nzFooter: null
});
const instance = modal.getContentComponent();
modal.afterOpen.subscribe(() => console.log('[afterOpen] emitted!'));
modal.afterClose.subscribe((result) =>
console.log('[afterClose] The result is:', result)
);
modal.afterClose.subscribe(result => console.log('[afterClose] The result is:', result));
}
//删除任务
deleteTask(item, incomingData) {
console.log(item);
console.log(incomingData);
console.log(item)
console.log(incomingData)
this.modal.confirm({
nzTitle: `确定要删除该任务吗?`,
nzOkText: '确定',
nzOkType: 'primary',
nzOnOk: () => {
this.http.delete(`/api/PlanTasks/${item.id}`).subscribe((data) => {
this.http.delete(`/api/PlanTasks/${item.id}`).subscribe(data => {
for (let index = 0; index < incomingData.length; index++) {
const element = incomingData[index];
if (element.id == item.id) {
incomingData.splice(index, 1);
index--;
incomingData.splice(index, 1)
index--
}
}
this.message.create('success', '删除成功!');
});
})
},
nzCancelText: '取消',
nzOnCancel: () => {},
nzOnCancel: () => {
}
});
}
//待检查撤销
revocationTask(item, taskLIst) {
this.modal.confirm({
@ -457,23 +417,21 @@ export class StationTaskApplyComponent implements OnInit {
nzOkText: '确定',
nzOkType: 'default',
nzOnOk: () => {
this.http
.post(`/api/PlanTasks/Approval/${item.id}`, null, {
params: {
approvalStatus: '待处理',
},
})
.subscribe({
next: (data) => {
this.message.create('success', '已撤销');
item.approvalStatus = '待处理';
},
error: (err) => {
this.message.create('warning', '撤销失败');
},
});
this.http.post(`/api/PlanTasks/Approval/${item.id}`, null, {
params: {
approvalStatus: '待处理'
}
}).subscribe({
next: (data) => {
this.message.create('success', '已撤销');
item.approvalStatus = '待处理'
},
error: (err) => {
this.message.create('warning', '撤销失败');
}
})
},
nzCancelText: '取消',
nzCancelText: '取消'
});
}
}
@ -493,5 +451,5 @@ export enum TaskType {
,
,
,
,
}
}

5
src/app/home/task/station-task-execution/station-task-execution.component.html

@ -23,12 +23,9 @@
</div>
<div class="timebox">
<nz-select [(ngModel)]="selectedYear" (ngModelChange)="selectYear($event)">
<nz-option [nzValue]="2021" nzLabel="2021年"></nz-option>
<nz-option [nzValue]="2022" nzLabel="2022年"></nz-option>
<nz-option [nzValue]="2023" nzLabel="2023年"></nz-option>
<nz-option [nzValue]="2024" nzLabel="2024年"></nz-option>
<nz-option [nzValue]="2025" nzLabel="2025年"></nz-option>
<nz-option [nzValue]="2026" nzLabel="2026年"></nz-option>
<nz-option [nzValue]="2027" nzLabel="2027年"></nz-option>
</nz-select>
<div *ngFor="let item of months" class="monthbtn" (click)="selectMonth(item)"
[ngClass]="{'selectedMonth': item.id == selectedMonth}">

409
src/app/home/task/station-task-execution/station-task-execution.component.ts

@ -1,15 +1,6 @@
import {
Component,
OnInit,
TemplateRef,
ViewContainerRef,
} from '@angular/core';
import { Component, OnInit, TemplateRef, ViewContainerRef } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import {
NzFormatEmitEvent,
NzTreeComponent,
NzTreeNodeOptions,
} from 'ng-zorro-antd/tree';
import { NzFormatEmitEvent, NzTreeComponent, NzTreeNodeOptions } from 'ng-zorro-antd/tree';
import { NzModalService } from 'ng-zorro-antd/modal';
import { NzMessageService } from 'ng-zorro-antd/message';
import { HttpClient, HttpHeaders } from '@angular/common/http';
@ -21,29 +12,21 @@ import { Router } from '@angular/router';
@Component({
selector: 'app-station-task-execution',
templateUrl: './station-task-execution.component.html',
styleUrls: ['./station-task-execution.component.scss'],
styleUrls: ['./station-task-execution.component.scss']
})
export class StationTaskExecutionComponent implements OnInit {
validateForm!: FormGroup;
constructor(
private router: Router,
public methodService: MethodService,
private fb: FormBuilder,
private modal: NzModalService,
private viewContainerRef: ViewContainerRef,
private message: NzMessageService,
private http: HttpClient,
private toTree: TreeService
) {}
constructor(private router: Router, public methodService: MethodService, private fb: FormBuilder, private modal: NzModalService, private viewContainerRef: ViewContainerRef, private message: NzMessageService, private http: HttpClient, private toTree: TreeService) { }
searchForm = {
taskname: '',
unitname: '',
unitlevel: '',
or: '',
};
OrganizationId;
or: ''
}
OrganizationId
isSupervisor: boolean; //是否为检查员
isSupervisor: boolean //是否为检查员
months = [
{ id: 1, name: '1月', isable: true },
@ -57,18 +40,18 @@ export class StationTaskExecutionComponent implements OnInit {
{ id: 9, name: '9月', isable: true },
{ id: 10, name: '10月', isable: true },
{ id: 11, name: '11月', isable: true },
{ id: 12, name: '12月', isable: true },
];
selectedMonth;
selectedYear = new Date().getFullYear();
selectedTime;
{ id: 12, name: '12月', isable: true }
]
selectedMonth
selectedYear = 2023
selectedTime
selectMonth(item) {
this.selectedMonth = item.id;
this.getTaskList();
this.selectedMonth = item.id
this.getTaskList()
}
selectYear(e) {
this.selectedYear = e;
this.getTaskList();
this.selectedYear = e
this.getTaskList()
}
cancel(item) {
@ -77,59 +60,60 @@ export class StationTaskExecutionComponent implements OnInit {
nzOkText: '确定',
nzOkType: 'default',
nzOnOk: () => {
item.isLoading = true;
this.http
.post(`/api/PlanTasks/Approval/${item.id}`, null, {
params: {
approvalStatus: '驳回',
},
})
.subscribe({
next: (data) => {
this.getTaskList();
this.message.create('success', '已驳回');
},
error: (err) => {
this.message.create('warning', '驳回失败');
},
});
item.isLoading = true
this.http.post(`/api/PlanTasks/Approval/${item.id}`, null, {
params: {
approvalStatus: '驳回'
}
}).subscribe({
next: (data) => {
this.getTaskList()
this.message.create('success', '已驳回');
},
error: (err) => {
this.message.create('warning', '驳回失败');
}
})
},
nzCancelText: '取消',
nzCancelText: '取消'
});
}
delete(item) {
console.log(item);
console.log(item)
this.modal.confirm({
nzTitle: `确定要删除该任务吗?`,
nzOkText: '确定',
nzOkType: 'primary',
nzOnOk: () => {
this.http.delete(`/api/PlanTasks/${item.id}`).subscribe((data) => {
this.http.delete(`/api/PlanTasks/${item.id}`).subscribe(data => {
for (let index = 0; index < this.taskLIst.length; index++) {
const element = this.taskLIst[index];
if (element.id == item.id) {
this.taskLIst.splice(index, 1);
index--;
this.taskLIst.splice(index, 1)
index--
}
}
this.message.create('success', '删除成功!');
});
})
},
nzCancelText: '取消',
nzOnCancel: () => {},
nzOnCancel: () => {
}
});
}
isloading = false;
totalCount;
PageNumber = 1;
PageSize = 10;
taskLIst = [];
isloading = false
totalCount
PageNumber = 1
PageSize = 10
taskLIst = []
getTaskList() {
this.isloading = true;
let selectedTime =
this.selectedYear + '-' + this.selectedMonth + '-' + '01';
this.isloading = true
let selectedTime = this.selectedYear + '-' + this.selectedMonth + '-' + '01'
let params = {
Month: selectedTime,
// OrganizationId: this.OrganizationId,
@ -140,97 +124,92 @@ export class StationTaskExecutionComponent implements OnInit {
AssistantOrganizationId: this.isSupervisor ? null : this.OrganizationId,
approvalStatuses: ['待检查', '已检查'],
PageNumber: this.PageNumber,
PageSize: this.PageSize,
};
this.http
.get('/api/PlanTasks', {
params: params,
})
.subscribe((data: any) => {
this.isloading = false;
console.log('任务申请列表', data);
this.totalCount = data.totalCount;
this.taskLIst = [...data.items];
});
PageSize: this.PageSize
}
this.http.get('/api/PlanTasks', {
params: params
}).subscribe((data: any) => {
this.isloading = false
console.log('任务申请列表', data);
this.totalCount = data.totalCount
this.taskLIst = [...data.items]
})
}
pageChange($event) {
this.PageNumber = $event;
this.getTaskList();
this.PageNumber = $event
this.getTaskList()
}
search() {
this.PageNumber = 1;
this.getTaskList();
this.PageNumber = 1
this.getTaskList()
}
reset() {
this.PageNumber = 1;
this.PageNumber = 1
this.searchForm = {
taskname: '',
unitname: '',
unitlevel: '',
or: '',
};
this.getTaskList();
or: ''
}
this.getTaskList()
}
expandKeys;
defaultOrId: string;
expandKeys
defaultOrId: string
//获取所有组织机构
organizationList: any;
organizationListAll: any;
nodes: any = [];
organizationList: any
organizationListAll: any
nodes: any = []
async getAllOrganization() {
let params = {
ContainsChildren: 'true',
ContainsChildren: "true",
PageNumber: 1,
PageSize: 9999,
};
PageSize: 9999
}
var p = new Promise<void>((resolve, reject) => {
this.http
.get('/api/Organizations', {
params: params,
})
.subscribe((data: any) => {
data.items.forEach((element) => {
element.key = element.id;
element.title = element.name;
element.disableCheckbox = true;
element.selectable = false;
});
this.organizationListAll = JSON.parse(JSON.stringify(data.items));
this.organizationList = JSON.parse(JSON.stringify(data.items)).filter(
(item) => {
return item.level != 'squadron';
}
);
resolve(data);
this.http.get('/api/Organizations', {
params: params
}).subscribe((data: any) => {
data.items.forEach(element => {
element.key = element.id
element.title = element.name
element.disableCheckbox = true
element.selectable = false
});
});
return p;
this.organizationListAll = JSON.parse(JSON.stringify(data.items))
this.organizationList = JSON.parse(JSON.stringify(data.items)).filter(item => {
return item.level != 'squadron'
})
resolve(data)
})
})
return p
}
//获得所有检查员
supervisorList = [];
mainsupervisorList = [];
assitantsupervisorList = [];
supervisorList = []
mainsupervisorList = []
assitantsupervisorList = []
async getSupervisor() {
var p = new Promise<void>((resolve, reject) => {
this.http.get('/api/Users/Inspectors').subscribe((data: any) => {
console.log('检查员列表', data);
data.forEach((element) => {
element.key = element.id;
element.title = element.name;
element.parentId = element.organizationId;
console.log('检查员列表', data)
data.forEach(element => {
element.key = element.id
element.title = element.name
element.parentId = element.organizationId
});
this.supervisorList = data;
resolve(data);
});
});
return p;
this.supervisorList = data
resolve(data)
})
})
return p
}
//获得除了检查员的其他用户
users;
users
async getUsers() {
var p = new Promise<void>((resolve, reject) => {
let params = {
@ -238,75 +217,69 @@ export class StationTaskExecutionComponent implements OnInit {
OrganizationLevel: 'squadron',
ContainsChildren: true,
PageNumber: 1,
PageSize: 9999,
};
this.http
.get('/api/Users', {
params: params,
})
.subscribe((data: any) => {
console.log('用户列表', data.items);
data.items.forEach((element) => {
element.key = element.id;
element.title = element.name;
element.parentId = element.organizationId;
});
this.users = data.items;
resolve(data);
PageSize: 9999
}
this.http.get('/api/Users', {
params: params
}).subscribe((data: any) => {
console.log('用户列表', data.items)
data.items.forEach(element => {
element.key = element.id
element.title = element.name
element.parentId = element.organizationId
});
});
return p;
this.users = data.items
resolve(data)
})
})
return p
}
userId;
userId
time1;
time2;
time1
time2
ngOnInit(): void {
this.userId = JSON.parse(sessionStorage.getItem('userData')).id;
this.OrganizationId = JSON.parse(
sessionStorage.getItem('userData')
).organizationId;
this.userId = JSON.parse(sessionStorage.getItem('userData')).id;
let roles = JSON.parse(sessionStorage.getItem('userData')).roles;
let isSupervisor = roles.find((item) => {
return item.name.indexOf('检查') != -1;
});
isSupervisor ? (this.isSupervisor = true) : (this.isSupervisor = false);
this.selectedMonth = new Date().getMonth() + 1;
this.getTaskList();
Promise.all([
this.getAllOrganization(),
this.getSupervisor(),
this.getUsers(),
]).then((results) => {
if (this.isSupervisor) {
let arr = [...this.users, ...this.organizationListAll];
this.nodes = this.toTree.toTree(JSON.parse(JSON.stringify(arr)));
} else {
let arr = [...this.supervisorList, ...this.organizationList];
this.nodes = this.toTree.toTree(JSON.parse(JSON.stringify(arr)));
}
});
this.userId = JSON.parse(sessionStorage.getItem('userData')).id
this.OrganizationId = JSON.parse(sessionStorage.getItem('userData')).organizationId
this.userId = JSON.parse(sessionStorage.getItem('userData')).id
let roles = JSON.parse(sessionStorage.getItem('userData')).roles
let isSupervisor = roles.find(item => {
return item.name.indexOf('检查') != -1
})
isSupervisor ? this.isSupervisor = true : this.isSupervisor = false
this.selectedMonth = new Date().getMonth() + 1
this.getTaskList()
Promise.all([this.getAllOrganization(), this.getSupervisor(), this.getUsers()])
.then((results) => {
if (this.isSupervisor) {
let arr = [...this.users, ...this.organizationListAll]
this.nodes = this.toTree.toTree(JSON.parse(JSON.stringify(arr)))
} else {
let arr = [...this.supervisorList, ...this.organizationList]
this.nodes = this.toTree.toTree(JSON.parse(JSON.stringify(arr)))
}
});
setTimeout(() => {
this.rollStart();
this.rollStart()
}, 0);
let t1 = new Date().getTime();
let date = '2022-9-10';
let t2 = Date.parse(date);
let t1 = new Date().getTime()
let date = '2022-9-10'
let t2 = Date.parse(date)
// this.methodService.countdown(t1, t2, (res) => {
// // console.log(666, res)
// this.time1 = res.day + '天' + res.hour + '小时'
// })
}
timer;
timer
rollStart() {
var ROLL_SPEED = 100;
var ROLL_SPEED = 100
var noticeList1 = document.getElementById('notice-list');
var noticeList2 = document.getElementById('notice-list-2');
var listWrapper = document.getElementById('list-wrapper');
@ -314,20 +287,18 @@ export class StationTaskExecutionComponent implements OnInit {
this.timer = setInterval(rollStart, ROLL_SPEED);
function rollStart() {
if (
Math.abs(_subStr(listWrapper.style.top)) >= noticeList1.clientHeight
) {
listWrapper.style.top = '0px';
if (Math.abs(_subStr(listWrapper.style.top)) >= noticeList1.clientHeight) {
listWrapper.style.top = '0px'
} else {
var top = listWrapper.style.top;
listWrapper.style.top = _subStr(top) - 1 + 'px';
var top = listWrapper.style.top
listWrapper.style.top = _subStr(top) - 1 + 'px'
}
}
// 截取px前数值
function _subStr(str) {
var index = str.indexOf('px');
if (index > -1) {
return parseFloat(str.substr(0, index + 1));
return parseFloat(str.substr(0, index + 1))
}
}
}
@ -336,32 +307,28 @@ export class StationTaskExecutionComponent implements OnInit {
window.clearInterval(this.timer);
}
mouseleave() {
this.rollStart();
this.rollStart()
}
ngOnDestroy(): void {
console.log('退出了');
this.mouseEnter();
console.log('退出了')
this.mouseEnter()
this.methodService.cleartimer()
}
apply() {
this.methodService.cleartimer();
}
apply() {}
look(item) {
console.log(item);
console.log(item)
if (item.approvalStatus == '待检查') {
this.message.create('warning', '该单位未检查');
return;
return
}
this.router.navigate(['/task/taskexecution/taskdetails'], {
queryParams: {
id: item.id,
company: item.company.companyName,
organization: item.organization.name,
legalPersonName: item.company.legalPersonName
? item.company.legalPersonName
: '',
},
});
this.router.navigate(['/task/taskexecution/taskdetails'], { queryParams: { id: item.id, company: item.company.companyName, organization: item.organization.name, legalPersonName: item.company.legalPersonName ? item.company.legalPersonName : '' } })
}
complete(item) {
@ -379,41 +346,39 @@ export class StationTaskExecutionComponent implements OnInit {
await new Promise((resolve, reject) => {
let body = {
inspectionResult: instance.validateForm.value.result,
resultAttachment: instance.fileList,
};
resultAttachment: instance.fileList
}
this.http.patch(`/api/PlanTasks/${item.id}`, body).subscribe({
next: (data) => {
this.message.create('success', '已完成');
this.getTaskList();
resolve(data);
this.getTaskList()
resolve(data)
},
error: (err) => {
this.message.create('warning', '完成失败');
reject(err);
},
});
});
reject(err)
}
})
})
} else {
this.message.create('warning', '请选择结果!');
return false;
return false
}
},
}
});
const instance = modal.getContentComponent();
modal.afterOpen.subscribe(() => console.log('[afterOpen] emitted!'));
modal.afterClose.subscribe((result) =>
console.log('[afterClose] The result is:', result)
);
modal.afterClose.subscribe(result => console.log('[afterClose] The result is:', result));
}
ischat = false;
taskId;
ischat = false
taskId
openchat(item) {
console.log(item);
this.taskId = item.id;
this.ischat = true;
console.log(item)
this.taskId = item.id
this.ischat = true
}
closechat() {
this.ischat = false;
this.ischat = false
}
}

2
src/app/home/task/station-task-execution/task-details/task-details.component.html

@ -1,6 +1,6 @@
<div class="bigbox">
<div class="btnbox">
<!-- <button class="goback" nz-button nzType="primary" (click)="goback()">返回</button> -->
<button class="goback" nz-button nzType="primary" (click)="goback()">返回</button>
<button nz-button nzType="primary" (click)="print()" *ngIf="tabnum == 0" [nzLoading]="isprintLoading">打印表格</button>
<button nz-button nzType="primary" (click)="download(1)" *ngIf="tabnum == 1">下载演练卡</button>
<button nz-button nzType="primary" (click)="download(2)" *ngIf="tabnum == 2">下载数字化预案</button>

5
src/app/home/task/station-weekly-plan/station-weekly-plan.component.html

@ -23,12 +23,9 @@
</div>
<div class="timebox">
<nz-select [(ngModel)]="selectedYear" (ngModelChange)="selectYear($event)">
<nz-option [nzValue]="2021" nzLabel="2021年"></nz-option>
<nz-option [nzValue]="2022" nzLabel="2022年"></nz-option>
<nz-option [nzValue]="2023" nzLabel="2023年"></nz-option>
<nz-option [nzValue]="2024" nzLabel="2024年"></nz-option>
<nz-option [nzValue]="2025" nzLabel="2025年"></nz-option>
<nz-option [nzValue]="2026" nzLabel="2026年"></nz-option>
<nz-option [nzValue]="2027" nzLabel="2027年"></nz-option>
</nz-select>
<div *ngFor="let item of months" class="monthbtn" (click)="selectMonth(item)"
[ngClass]="{'selectedMonth': item.id == selectedMonth}">

1041
src/app/home/task/station-weekly-plan/station-weekly-plan.component.ts

File diff suppressed because it is too large Load Diff

11
src/app/home/task/zhi-audit/zhi-audit.component.html

@ -1,13 +1,10 @@
<!-- <p>任务审批</p> -->
<div class="box">
<div class="timebox">
<nz-select [(ngModel)]="selectedYear">
<nz-option [nzValue]="2022" nzLabel="2022年"></nz-option>
<nz-option [nzValue]="2023" nzLabel="2023年"></nz-option>
<nz-option [nzValue]="2024" nzLabel="2024年"></nz-option>
<nz-option [nzValue]="2025" nzLabel="2025年"></nz-option>
<nz-option [nzValue]="2026" nzLabel="2026年"></nz-option>
<nz-option [nzValue]="2027" nzLabel="2027年"></nz-option>
<nz-select ngModel="2022">
<nz-option nzValue="2021" nzLabel="2021年"></nz-option>
<nz-option nzValue="2022" nzLabel="2022年"></nz-option>
<nz-option nzValue="2023" nzLabel="2023年"></nz-option>
</nz-select>
<div *ngFor="let item of months" class="monthbtn" (click)="selectMonth(item)"
[ngClass]="{'selectedMonth': item.name == selectedMonth}">

125
src/app/home/task/zhi-audit/zhi-audit.component.ts

@ -7,18 +7,13 @@ import { LookTaskComponent } from './look-task/look-task.component';
@Component({
selector: 'app-zhi-audit',
templateUrl: './zhi-audit.component.html',
styleUrls: ['./zhi-audit.component.scss'],
styleUrls: ['./zhi-audit.component.scss']
})
export class ZhiAuditComponent implements OnInit {
validateForm!: FormGroup;
selectedYear = new Date().getFullYear();
constructor(
private fb: FormBuilder,
private http: HttpClient,
private toTree: TreeService,
private modal: NzModalService,
private viewContainerRef: ViewContainerRef
) {}
constructor(private fb: FormBuilder, private http: HttpClient, private toTree: TreeService, private modal: NzModalService, private viewContainerRef: ViewContainerRef) { }
months = [
{ name: '1月', isable: true },
@ -32,46 +27,41 @@ export class ZhiAuditComponent implements OnInit {
{ name: '9月', isable: true },
{ name: '10月', isable: true },
{ name: '11月', isable: true },
{ name: '12月', isable: true },
];
selectedMonth;
{ name: '12月', isable: true }
]
selectedMonth
selectMonth(item) {
this.selectedMonth = item.name;
this.selectedMonth = item.name
}
// 双随机
doubleRandom = {
isExpand: true, //卡片展开
isPopover: false, //选择单位气泡卡片
search1: '', //选择单位气泡卡片---单位选择列表
isExpand: true,//卡片展开
isPopover: false,//选择单位气泡卡片
search1: '',//选择单位气泡卡片---单位选择列表
search1Value: [],
search2: '', //选择单位气泡卡片---组织选择列表
search2: '',//选择单位气泡卡片---组织选择列表
search2Value: [],
selectedMenu: 1, //选择单位气泡卡片
data: [
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
], //表格数据
nodes: [],
};
selectedMenu: 1,//选择单位气泡卡片
data: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],//表格数据
nodes: []
}
// 熟悉演练
rehearsal = {
isExpand: false, //卡片展开
isPopover: false, //选择单位气泡卡片
search1: '', //选择单位气泡卡片---单位选择列表
isExpand: false,//卡片展开
isPopover: false,//选择单位气泡卡片
search1: '',//选择单位气泡卡片---单位选择列表
search1Value: [],
search2: '', //选择单位气泡卡片---组织选择列表
search2: '',//选择单位气泡卡片---组织选择列表
search2Value: [],
selectedMenu: 1, //选择单位气泡卡片
data: [
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
], //表格数据
nodes: [],
};
selectedMenu: 1,//选择单位气泡卡片
data: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],//表格数据
nodes: []
}
isPopover(data) {
data.isPopover = !data.isPopover;
data.isPopover = !data.isPopover
}
//搜索框提交
submitForm(value): void {
@ -79,57 +69,55 @@ export class ZhiAuditComponent implements OnInit {
}
// 弹出 tab
popoverMenuSelect(data, type) {
data.selectedMenu = type;
data.selectedMenu = type
}
expand(data) {
data.isExpand = !data.isExpand;
data.isExpand = !data.isExpand
}
ngOnInit(): void {
this.getAllOrganization();
this.getAllOrganization()
}
nzExpandAll = false;
totalCount: string;
totalCount: string
allOrList: any;
nodes;
allOrList: any
nodes
getAllOrganization() {
let params = {
ContainsChildren: 'true',
ContainsChildren: "true",
PageNumber: 1,
PageSize: 9999,
};
this.http
.get('/api/Organizations', {
params: params,
})
.subscribe((data: any) => {
this.totalCount = data.totalCount;
data.items.forEach((element) => {
element.key = element.id;
element.title = element.name;
element.selectable = false;
});
this.allOrList = data.items;
this.nodes = [...this.toTree.toTree(data.items)];
this.doubleRandom.nodes = JSON.parse(JSON.stringify(this.nodes));
this.rehearsal.nodes = JSON.parse(JSON.stringify(this.nodes));
PageSize: 9999
}
this.http.get('/api/Organizations', {
params: params
}).subscribe((data: any) => {
this.totalCount = data.totalCount
data.items.forEach(element => {
element.key = element.id
element.title = element.name
element.selectable = false
});
this.allOrList = data.items
this.nodes = [...this.toTree.toTree(data.items)]
this.doubleRandom.nodes = JSON.parse(JSON.stringify(this.nodes))
this.rehearsal.nodes = JSON.parse(JSON.stringify(this.nodes))
})
}
orcheckbox(data, $event, node) {
if ($event) {
data.search2Value.push(node.origin.name);
data.search2Value.push(node.origin.name)
} else {
for (let index = 0; index < data.search2Value.length; index++) {
const element = data.search2Value[index];
if (element == node.origin.name) {
data.search2Value.splice(index, 1);
data.search2Value.splice(index, 1)
}
}
}
console.log(data.search2Value);
console.log(data.search2Value)
}
lookTask() {
@ -138,14 +126,13 @@ export class ZhiAuditComponent implements OnInit {
nzContent: LookTaskComponent,
nzViewContainerRef: this.viewContainerRef,
nzFooter: null,
nzWidth: 800,
nzOnOk: () => new Promise((resolve) => setTimeout(resolve, 1000)),
nzWidth:800,
nzOnOk: () => new Promise(resolve => setTimeout(resolve, 1000))
});
const instance = modal.getContentComponent();
modal.afterOpen.subscribe(() => console.log('[afterOpen] emitted!'));
// Return a result when closed
modal.afterClose.subscribe((result) =>
console.log('[afterClose] The result is:', result)
);
modal.afterClose.subscribe(result => console.log('[afterClose] The result is:', result));
}
}

989
src/app/home/task/zhi-indicators/dist/zhi-indicators.component.js vendored

@ -1,989 +0,0 @@
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
var __spreadArrays = (this && this.__spreadArrays) || function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
};
exports.__esModule = true;
exports.ZhiIndicatorsComponent = void 0;
var core_1 = require("@angular/core");
var rxjs_1 = require("rxjs");
var operators_1 = require("rxjs/operators"); // 引入debounceTime、Subject
var edit_or_component_1 = require("./edit-or/edit-or.component");
var allot_person_component_1 = require("../da-subordinate-audit/allot-person/allot-person.component");
var ZhiIndicatorsComponent = /** @class */ (function () {
function ZhiIndicatorsComponent(ngZone, fb, http, toTree, message, modal, viewContainerRef) {
this.ngZone = ngZone;
this.fb = fb;
this.http = http;
this.toTree = toTree;
this.message = message;
this.modal = modal;
this.viewContainerRef = viewContainerRef;
this.valueChange = new rxjs_1.Subject();
this.targetCount = new rxjs_1.Subject();
this.months = [
{ id: 1, name: '1月', isable: true },
{ id: 2, name: '2月', isable: true },
{ id: 3, name: '3月', isable: true },
{ id: 4, name: '4月', isable: true },
{ id: 5, name: '5月', isable: true },
{ id: 6, name: '6月', isable: true },
{ id: 7, name: '7月', isable: true },
{ id: 8, name: '8月', isable: true },
{ id: 9, name: '9月', isable: true },
{ id: 10, name: '10月', isable: true },
{ id: 11, name: '11月', isable: true },
{ id: 12, name: '12月', isable: true },
];
this.selectedYear = 2024;
//投诉举报
this.complaint = {
name: '投诉举报',
allocated: 0,
isExpand: true,
isPopover: false,
isLoading: false,
search1: '',
search1Value: [],
search2: '',
search2Value: [],
searchAll: [],
selectedMenu: 1,
data: [],
nodes: [],
nodes2: [],
isnodes: true,
unitList: []
};
//行政许可
this.permission = {
name: '行政许可',
allocated: 0,
isExpand: true,
isPopover: false,
isLoading: false,
search1: '',
search1Value: [],
search2: '',
search2Value: [],
searchAll: [],
selectedMenu: 1,
data: [],
nodes: [],
nodes2: [],
isnodes: true,
unitList: []
};
// 双随机
this.doubleRandom = {
name: '双随机',
allocated: 0,
allPlanTasks: 0,
isExpand: true,
isPopover: false,
isLoading: false,
search1: '',
search1Value: [],
search2: '',
search2Value: [],
searchAll: [],
selectedMenu: 1,
data: [],
nodes: [],
nodes2: [],
isnodes: true,
unitList: []
};
// 熟悉演练
this.rehearsal = {
name: '熟悉演练',
allocated: 0,
allPlanTasks: 0,
isExpand: true,
isPopover: false,
isLoading: false,
search1: '',
search1Value: [],
search2: '',
search2Value: [],
searchAll: [],
selectedMenu: 1,
data: [],
nodes: [],
nodes2: [],
isnodes: true,
unitList: []
};
this.unitList = [];
this.PageNumber = 1;
this.moreDataLoading = false;
this.iszhanxun = false;
}
ZhiIndicatorsComponent.prototype.saveItem = function () { };
ZhiIndicatorsComponent.prototype.selectMonth = function (item) {
console.log('选择月份');
this.selectedMonth = item.id;
this.initializeData();
this.getTaskList('投诉举报');
this.getTaskList('行政许可');
this.getTaskTarget('双随机');
this.getTaskTarget('熟悉演练');
};
ZhiIndicatorsComponent.prototype.selectYear = function (e) {
console.log('选择年份');
this.selectedYear = e;
this.initializeData();
this.getTaskList('投诉举报');
this.getTaskList('行政许可');
this.getTaskTarget('双随机');
this.getTaskTarget('熟悉演练');
};
ZhiIndicatorsComponent.prototype.initializeData = function () {
this.complaint.isExpand = true;
this.complaint.isPopover = false;
this.complaint.isLoading = false;
this.complaint.search1 = '';
this.complaint.search1Value = [];
this.complaint.search2 = '';
this.complaint.search2Value = [];
this.complaint.selectedMenu = 1;
this.complaint.data = [];
this.permission.isExpand = true;
this.permission.isPopover = false;
this.permission.isLoading = false;
this.permission.search1 = '';
this.permission.search1Value = [];
this.permission.search2 = '';
this.permission.search2Value = [];
this.permission.selectedMenu = 1;
this.permission.data = [];
this.doubleRandom.isExpand = true;
this.doubleRandom.isPopover = false;
this.doubleRandom.isLoading = false;
this.doubleRandom.search1 = '';
this.doubleRandom.search1Value = [];
this.doubleRandom.search2 = '';
this.doubleRandom.search2Value = [];
this.doubleRandom.selectedMenu = 1;
this.doubleRandom.data = [];
this.rehearsal.isExpand = true;
this.rehearsal.isPopover = false;
this.rehearsal.isLoading = false;
this.rehearsal.search1 = '';
this.rehearsal.search1Value = [];
this.rehearsal.search2 = '';
this.rehearsal.search2Value = [];
this.rehearsal.selectedMenu = 1;
this.rehearsal.data = [];
};
ZhiIndicatorsComponent.prototype.log = function (data) {
var arr = [];
data.unitList.forEach(function (item) {
item.checked ? arr.push(item.id) : null;
});
data.search1Value = arr;
};
ZhiIndicatorsComponent.prototype.isPopover = function (data) {
console.log(data);
data.isPopover = !data.isPopover;
data.unitList.forEach(function (element) {
element.checked = false;
});
};
// 弹出 tab
ZhiIndicatorsComponent.prototype.popoverMenuSelect = function (data, type) {
data.selectedMenu = type;
};
ZhiIndicatorsComponent.prototype.expand = function (data) {
data.isExpand = !data.isExpand;
};
//搜索框提交
ZhiIndicatorsComponent.prototype.submitForm = function (data) {
data.unitList = [];
this.PageNumber = 1;
this.getCompanies(data);
};
ZhiIndicatorsComponent.prototype.getCompanies = function (incomingData) {
return __awaiter(this, void 0, void 0, function () {
var params;
var _this = this;
return __generator(this, function (_a) {
params = {
CompanyName: incomingData ? incomingData.search1 : '',
PageNumber: this.PageNumber,
PageSize: 50
};
return [2 /*return*/, new Promise(function (resolve, reject) {
_this.http
.get('/api/Companies', {
params: params
})
.subscribe(function (data) {
_this.moreDataLoading = false;
_this.totalCount = data.totalCount;
data.items.forEach(function (element) {
element.label = element.companyName;
element.value = element.id;
element.parentId = element.organizationId;
element.key = element.id;
element.title = element.companyName;
element.level = 4;
});
_this.unitList = data.items;
// if (incomingData && incomingData.name == '投诉举报') {
// this.complaint.unitList = JSON.parse(JSON.stringify(this.unitList))
// } else if (incomingData && incomingData.name == '行政许可') {
// this.permission.unitList = JSON.parse(JSON.stringify(this.unitList))
// } else if (incomingData && incomingData.name == '双随机') {
// this.doubleRandom.unitList = JSON.parse(JSON.stringify(this.unitList))
// } else if (incomingData && incomingData.name == '熟悉演练') {
// this.rehearsal.unitList = JSON.parse(JSON.stringify(this.unitList))
// } else {
// this.complaint.unitList = JSON.parse(JSON.stringify(this.unitList))
// this.permission.unitList = JSON.parse(JSON.stringify(this.unitList))
// this.doubleRandom.unitList = JSON.parse(JSON.stringify(this.unitList))
// this.rehearsal.unitList = JSON.parse(JSON.stringify(this.unitList))
// }
_this.complaint.unitList = _this.complaint.unitList.concat(JSON.parse(JSON.stringify(data.items)));
_this.complaint.unitList = __spreadArrays(_this.complaint.unitList);
_this.permission.unitList = _this.permission.unitList.concat(JSON.parse(JSON.stringify(data.items)));
_this.permission.unitList = __spreadArrays(_this.permission.unitList);
_this.doubleRandom.unitList = _this.doubleRandom.unitList.concat(JSON.parse(JSON.stringify(data.items)));
_this.doubleRandom.unitList = __spreadArrays(_this.doubleRandom.unitList);
_this.rehearsal.unitList = _this.rehearsal.unitList.concat(JSON.parse(JSON.stringify(data.items)));
_this.rehearsal.unitList = __spreadArrays(_this.rehearsal.unitList);
resolve(data);
});
})];
});
});
};
ZhiIndicatorsComponent.prototype.moreData = function () {
this.moreDataLoading = true;
this.PageNumber += 1;
this.getCompanies();
};
ZhiIndicatorsComponent.prototype.getAllOrganization = function () {
return __awaiter(this, void 0, void 0, function () {
var params;
var _this = this;
return __generator(this, function (_a) {
params = {
ContainsChildren: 'true',
PageNumber: 1,
PageSize: 9999,
code: '0000'
};
return [2 /*return*/, new Promise(function (resolve, reject) {
_this.http
.get('/api/Organizations', {
params: params
})
.subscribe(function (data) {
data.items.forEach(function (element) {
element.key = element.id;
element.title = element.name;
element.selectable = false;
element.disableCheckbox = true;
element.datatype = '机构';
element.level == 'squadron'
? (element.disableCheckbox = false)
: null;
});
_this.allOrList = JSON.parse(JSON.stringify(data.items));
_this.nodes = __spreadArrays(_this.toTree.toTree(JSON.parse(JSON.stringify(data.items))));
_this.complaint.nodes = JSON.parse(JSON.stringify(_this.nodes));
_this.permission.nodes = JSON.parse(JSON.stringify(_this.nodes));
_this.doubleRandom.nodes = JSON.parse(JSON.stringify(_this.nodes));
_this.rehearsal.nodes = JSON.parse(JSON.stringify(_this.nodes));
resolve(data);
});
})];
});
});
};
ZhiIndicatorsComponent.prototype.getUsers = function () {
return __awaiter(this, void 0, void 0, function () {
var _this = this;
return __generator(this, function (_a) {
return [2 /*return*/, new Promise(function (resolve, reject) {
var params = {
OrganizationId: _this.OrganizationId,
OrganizationLevel: 'squadron',
ContainsChildren: true,
PageNumber: 1,
PageSize: 9999
};
_this.http
.get('/api/Users', {
params: params
})
.subscribe(function (data) {
console.log('用户列表', data.items);
data.items.forEach(function (element) {
element.key = element.id;
element.title = element.name;
element.parentId = element.organizationId;
});
_this.users = data.items;
resolve(data);
});
})];
});
});
};
ZhiIndicatorsComponent.prototype.editOr = function (incomingData, item) {
var _this = this;
var modal = this.modal.create({
nzTitle: '修改协助机构',
nzContent: edit_or_component_1.EditOrComponent,
nzViewContainerRef: this.viewContainerRef,
nzWidth: 660,
nzMaskClosable: false,
nzComponentParams: {
selectedData: __spreadArrays(item.supervisorIds, item.assistantOrganizationIds),
organizationList: JSON.parse(JSON.stringify(this.allOrList)),
// users: JSON.parse(JSON.stringify(this.users)),
supervisorList: __spreadArrays(JSON.parse(JSON.stringify(this.assitantsupervisorList)), JSON.parse(JSON.stringify(this.mainsupervisorList)))
},
nzOnOk: function () { return __awaiter(_this, void 0, void 0, function () {
var _this = this;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
if (!instance.validateForm.valid) return [3 /*break*/, 2];
return [4 /*yield*/, new Promise(function (resolve, reject) {
console.log(instance.nzTreeComponent.getCheckedNodeList());
var supervisorIds = [];
var assistantOrganizationIds = [];
instance.nzTreeComponent.getCheckedNodeList().forEach(function (item) {
item.origin.datatype == '机构'
? assistantOrganizationIds.push(item.key)
: supervisorIds.push(item.key);
});
var body = {
supervisorIds: supervisorIds,
assistantOrganizationIds: assistantOrganizationIds
};
_this.http.patch("/api/PlanTasks/" + item.id, body).subscribe({
next: function (data) { return __awaiter(_this, void 0, void 0, function () {
return __generator(this, function (_a) {
this.message.create('success', '修改成功');
incomingData.name == '投诉举报'
? this.getTaskList('投诉举报')
: null;
incomingData.name == '行政许可'
? this.getTaskList('行政许可')
: null;
resolve(data);
return [2 /*return*/];
});
}); },
error: function (err) {
_this.message.create('warning', '修改失败');
reject(err);
}
});
})];
case 1:
_a.sent();
return [3 /*break*/, 3];
case 2:
this.message.create('warning', '请填写完整!');
return [2 /*return*/, false];
case 3: return [2 /*return*/];
}
});
}); }
});
var instance = modal.getContentComponent();
modal.afterOpen.subscribe(function () { return console.log('[afterOpen] emitted!'); });
modal.afterClose.subscribe(function (result) {
return console.log('[afterClose] The result is:', result);
});
};
ZhiIndicatorsComponent.prototype.orcheckbox = function (data, $event, node) {
if ($event) {
data.search2Value.push(node.origin.id);
}
else {
for (var index = 0; index < data.search2Value.length; index++) {
var element = data.search2Value[index];
if (element == node.origin.id) {
data.search2Value.splice(index, 1);
index--;
}
}
}
console.log(data.search2Value);
};
ZhiIndicatorsComponent.prototype.ngOnInit = function () {
var _this = this;
this.OrganizationId = JSON.parse(sessionStorage.getItem('userData')).organizationId;
this.selectedMonth = new Date().getMonth() + 1;
//说明保存防抖
this.valueChange.pipe(operators_1.debounceTime(1000)).subscribe(function (item) {
var body = {
description: item.description
};
return new Promise(function (resolve, reject) {
_this.http.patch("/api/PlanTasks/" + item.id, body).subscribe({
next: function (data) { return __awaiter(_this, void 0, void 0, function () {
return __generator(this, function (_a) {
this.message.create('success', '实时保存成功');
resolve(data);
return [2 /*return*/];
});
}); },
error: function (err) {
_this.message.create('warning', '保存失败');
reject(err);
}
});
});
});
//任务额保存防抖
this.targetCount.pipe(operators_1.debounceTime(1000)).subscribe(function (item) {
// console.log(item)
var body = {
targetCount: item.targetCount
};
return new Promise(function (resolve, reject) {
_this.http.patch("/api/TaskTargets/" + item.id, body).subscribe({
next: function (data) { return __awaiter(_this, void 0, void 0, function () {
return __generator(this, function (_a) {
this.message.create('success', '修改任务额成功');
resolve(data);
return [2 /*return*/];
});
}); },
error: function (err) {
_this.message.create('warning', '修改任务额失败');
reject(err);
}
});
});
});
// this.getUsers()
this.getCompanies();
this.getAllOrganization();
// Promise.all([this.getCompanies(), this.getAllOrganization()])
// .then((results) => {
// let arr = [...JSON.parse(JSON.stringify(this.allOrList)), ...JSON.parse(JSON.stringify(this.unitList))]
// this.nodes = [...this.toTree.toTree(arr)]
// this.complaint.nodes = JSON.parse(JSON.stringify(this.nodes))
// this.permission.nodes = JSON.parse(JSON.stringify(this.nodes))
// this.doubleRandom.nodes = JSON.parse(JSON.stringify(this.nodes))
// this.rehearsal.nodes = JSON.parse(JSON.stringify(this.nodes))
// });
this.getTaskList('投诉举报');
this.getTaskList('行政许可');
this.getTaskTarget('双随机');
this.getTaskTarget('熟悉演练');
//获得主协调查人员
this.getSupervisor('main');
this.getSupervisor('assisted');
var roles = JSON.parse(sessionStorage.getItem('userData')).roles;
var iszhanxun = roles.find(function (item) {
return item.name.indexOf('战训') != -1;
});
if (iszhanxun) {
this.iszhanxun = true;
}
console.log('iszhanxun', iszhanxun);
};
//投诉举报/行政许可 选择单位 确认按钮
ZhiIndicatorsComponent.prototype.selectedUnit = function (data, type) {
var _this = this;
var arr = __spreadArrays(data.search1Value, data.search2Value);
var arrSet = __spreadArrays(new Set(arr));
data.isLoading = true;
var selectedMonth = this.selectedMonth < 10 ? '0' + this.selectedMonth : this.selectedMonth;
var selectedTime = this.selectedYear + '-' + selectedMonth + '-' + '01';
this.http
.post("/api/PlanTasks/Many", null, {
params: {
month: selectedTime,
companyIds: arrSet,
taskType: type
}
})
.subscribe({
next: function (item) {
data.isLoading = false;
data.isPopover = false;
_this.message.create('success', '共创建' +
arrSet.length +
'条任务' +
',成功创建' +
item.length +
'条,剩余' +
(arrSet.length - item.length) +
'个单位已被创建');
type == '投诉举报' ? _this.getTaskList('投诉举报', data) : null;
type == '行政许可' ? _this.getTaskList('行政许可', data) : null;
},
error: function (err) {
data.isLoading = false;
_this.message.create('warning', '创建失败');
}
});
};
//双随机/熟悉演练 选择单位 确认按钮
ZhiIndicatorsComponent.prototype.selectedUnit2 = function (data, type) {
var _this = this;
var selectedMonth = this.selectedMonth < 10 ? '0' + this.selectedMonth : this.selectedMonth;
var selectedTime = this.selectedYear + '-' + selectedMonth + '-' + '01';
var arr = __spreadArrays(data.search1Value, data.search2Value);
var body = __spreadArrays(new Set(arr));
data.isLoading = true;
this.http
.post("/api/TaskTargets/" + selectedTime, body, {
params: {
taskType: type
}
})
.subscribe({
next: function (item) {
data.isLoading = false;
data.isPopover = false;
_this.message.create('success', '共创建' +
body.length +
'条任务' +
',成功创建' +
item.length +
'条,剩余' +
(body.length - item.length) +
'个单位已被创建');
type == '双随机' ? _this.getTaskTarget('双随机', data) : null;
type == '熟悉演练' ? _this.getTaskTarget('熟悉演练', data) : null;
},
error: function (err) {
data.isLoading = false;
_this.message.create('warning', '创建失败');
}
});
};
ZhiIndicatorsComponent.prototype.getTaskTarget = function (TaskType, carddata) {
return __awaiter(this, void 0, void 0, function () {
var selectedTime, params;
var _this = this;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
TaskType == '双随机'
? (this.doubleRandom.isLoading = true)
: (this.rehearsal.isLoading = true);
selectedTime = this.selectedYear + '-' + this.selectedMonth + '-' + '01';
params = {
taskType: TaskType
};
return [4 /*yield*/, new Promise(function (resolve, reject) {
_this.http
.get("/api/TaskTargets/" + selectedTime, {
params: params
})
.subscribe(function (data) {
_this.ngZone.run(function () {
//这里写需要立即渲染的代码
TaskType == '双随机'
? (_this.doubleRandom.isLoading = false)
: (_this.rehearsal.isLoading = false);
console.log(TaskType + '任务指标列表', data);
TaskType == '双随机' ? (_this.doubleRandom.allocated = 0) : null;
TaskType == '熟悉演练' ? (_this.rehearsal.allocated = 0) : null;
TaskType == '双随机' ? (_this.doubleRandom.allPlanTasks = 0) : null;
TaskType == '熟悉演练' ? (_this.rehearsal.allPlanTasks = 0) : null;
TaskType == '双随机' ? (_this.doubleRandom.data = data) : null;
TaskType == '熟悉演练' ? (_this.rehearsal.data = data) : null;
data.forEach(function (element) {
if (element.planTasks) {
if (TaskType == '双随机') {
_this.doubleRandom.allPlanTasks += element.planTasks.length;
}
if (TaskType == '熟悉演练') {
_this.rehearsal.allPlanTasks += element.planTasks.length;
}
element.planTasks.forEach(function (item) {
if (item.approvalStatus == '通过') {
TaskType == '双随机'
? (_this.doubleRandom.allocated += 1)
: null;
TaskType == '熟悉演练'
? (_this.rehearsal.allocated += 1)
: null;
}
});
}
});
});
resolve(data);
});
})];
case 1: return [2 /*return*/, _a.sent()];
}
});
});
};
ZhiIndicatorsComponent.prototype.getTaskList = function (TaskType, carddata) {
return __awaiter(this, void 0, void 0, function () {
var selectedTime, params;
var _this = this;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
TaskType == '投诉举报'
? (this.complaint.isLoading = true)
: (this.permission.isLoading = true);
selectedTime = this.selectedYear + '-' + this.selectedMonth + '-' + '01';
params = {
Month: selectedTime,
OrganizationId: this.OrganizationId,
TaskType: TaskType,
PageNumber: 1,
PageSize: 99999
};
return [4 /*yield*/, new Promise(function (resolve, reject) {
_this.http
.get('/api/PlanTasks', {
params: params
})
.subscribe(function (data) {
_this.ngZone.run(function () {
//这里写需要立即渲染的代码
console.log(TaskType + '任务列表', data.items);
TaskType == '投诉举报'
? (_this.complaint.isLoading = false)
: (_this.permission.isLoading = false);
TaskType == '投诉举报' ? (_this.complaint.allocated = 0) : null;
TaskType == '行政许可' ? (_this.permission.allocated = 0) : null;
TaskType == '投诉举报' ? (_this.complaint.data = data.items) : null;
TaskType == '行政许可' ? (_this.permission.data = data.items) : null;
data.items.forEach(function (item) {
if (item.approvalStatus == '通过') {
TaskType == '投诉举报' ? (_this.complaint.allocated += 1) : null;
TaskType == '行政许可'
? (_this.permission.allocated += 1)
: null;
}
});
});
resolve(data);
});
})];
case 1: return [2 /*return*/, _a.sent()];
}
});
});
};
//修改任务描述
ZhiIndicatorsComponent.prototype.taskDescChange = function (incomingData, item) {
this.valueChange.next(item);
};
//修改任务额
ZhiIndicatorsComponent.prototype.targetCountChange = function (incomingData, item, e) {
this.targetCount.next(item);
};
ZhiIndicatorsComponent.prototype.ngOnDestroy = function () {
// console.log('毁灭了')
// this.doubleRandom.isPopover = false
};
ZhiIndicatorsComponent.prototype.onExpandChange = function (e) {
var node = e.node;
if (node &&
node.getChildren().length === 0 &&
node.isExpanded &&
node.origin.level == 'squadron') {
this.loadNode(node.origin.id).then(function (data) {
node.addChildren(data);
});
}
else {
node.isLoading = false;
}
};
ZhiIndicatorsComponent.prototype.loadNode = function (id) {
var _this = this;
return new Promise(function (resolve) {
var params = {
OrganizationId: id,
PageNumber: 1,
PageSize: 9999
};
_this.http
.get('/api/Companies', {
params: params
})
.subscribe(function (data) {
console.log(data.items);
data.items.forEach(function (element) {
element.key = element.id;
element.title = element.companyName;
element.level = 4;
element.isLeaf = true;
});
resolve(data.items);
});
});
};
ZhiIndicatorsComponent.prototype.getCompaniesByName = function (incomingData) {
return __awaiter(this, void 0, void 0, function () {
var params_1;
var _this = this;
return __generator(this, function (_a) {
// incomingData.search2Value
console.log(incomingData.search2Value);
if (incomingData.search2) {
incomingData.isnodes = false;
params_1 = {
CompanyName: incomingData.search2,
PageNumber: this.PageNumber,
PageSize: 9999
};
return [2 /*return*/, new Promise(function (resolve, reject) {
_this.http
.get('/api/Companies', {
params: params_1
})
.subscribe(function (data) {
_this.moreDataLoading = false;
_this.totalCount = data.totalCount;
data.items.forEach(function (element) {
element.label = element.companyName;
element.value = element.id;
element.parentId = element.organizationId;
element.key = element.id;
element.title = element.companyName;
element.level = 4;
element.isLeaf = true;
incomingData.search2Value.forEach(function (item) {
item == element.id ? (element.isChecked = true) : null;
});
});
if (data.items.length == 0) {
_this.message.create('warning', '没有查询到任何单位');
incomingData.isnodes = true;
return;
}
var allOrList = JSON.parse(JSON.stringify(_this.allOrList));
allOrList.forEach(function (element) {
element.expanded = true;
});
var arr = __spreadArrays(allOrList, data.items);
incomingData.nodes2 = __spreadArrays(_this.toTree.toTree(arr));
resolve(data);
});
})];
}
else {
incomingData.isnodes = true;
}
return [2 /*return*/];
});
});
};
ZhiIndicatorsComponent.prototype.getSupervisor = function (type) {
var _this = this;
var params = {
inspectorType: type
};
this.http
.get('/api/Users/Inspectors', {
params: params
})
.subscribe(function (data) {
console.log('检查员列表', data);
data.forEach(function (element) {
element.parentId = element.organizationId;
element.key = element.id;
element.title = element.name;
element.selectable = false;
element.disableCheckbox = false;
element.datatype = '人员';
});
if (type == 'main') {
_this.mainsupervisorList = data;
}
else {
_this.assitantsupervisorList = data;
}
});
};
ZhiIndicatorsComponent.prototype.allot = function (item, type) {
var _this = this;
console.log(item);
if (this.mainsupervisorList.length == 0 ||
this.assitantsupervisorList.length == 0) {
this.message.create('warning', '请从用户管理添加检查人员');
return;
}
var modal = this.modal.create({
nzTitle: '分配监督检查员',
nzContent: allot_person_component_1.AllotPersonComponent,
nzViewContainerRef: this.viewContainerRef,
nzWidth: 485,
nzMaskClosable: false,
nzComponentParams: {
mainsupervisorList: this.mainsupervisorList,
assitantsupervisorList: this.assitantsupervisorList
},
nzOnOk: function () { return __awaiter(_this, void 0, void 0, function () {
var _this = this;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
if (!instance.validateForm.valid) return [3 /*break*/, 2];
return [4 /*yield*/, new Promise(function (resolve, reject) {
var body = {
supervisorIds: [
instance.validateForm.value.main,
instance.validateForm.value.assitant,
]
};
_this.http.patch("/api/PlanTasks/" + item.id, body).subscribe({
next: function (data) { return __awaiter(_this, void 0, void 0, function () {
return __generator(this, function (_a) {
this.message.create('success', '分配成功');
this.getTaskTarget(type);
resolve(data);
return [2 /*return*/, true];
});
}); },
error: function (err) {
_this.message.create('warning', '分配失败');
reject(err);
return false;
}
});
})];
case 1:
_a.sent();
return [3 /*break*/, 3];
case 2:
this.message.create('warning', '请填写完整!');
return [2 /*return*/, false];
case 3: return [2 /*return*/];
}
});
}); }
});
var instance = modal.getContentComponent();
modal.afterOpen.subscribe(function () { return console.log('[afterOpen] emitted!'); });
modal.afterClose.subscribe(function (result) {
return console.log('[afterClose] The result is:', result);
});
};
ZhiIndicatorsComponent.prototype.distribute = function (item, type) {
var _this = this;
this.modal.confirm({
nzTitle: "\u786E\u5B9A\u8981\u6D3E\u53D1\u8BE5\u4EFB\u52A1\u5417?",
nzOkText: '确定',
nzOkType: 'default',
nzOnOk: function () {
item.isLoading = true;
_this.http
.post("/api/PlanTasks/Approval/" + item.id, null, {
params: {
approvalStatus: '待检查'
}
})
.subscribe({
next: function (data) {
_this.message.create('success', '已派发');
item.approvalStatus = '待检查';
item.isLoading = false;
item.passed += 1;
type == '投诉举报' ? (_this.complaint.allocated += 1) : null;
type == '行政许可' ? (_this.permission.allocated += 1) : null;
type == '双随机' ? (_this.doubleRandom.allocated += 1) : null;
type == '熟悉演练' ? (_this.rehearsal.allocated += 1) : null;
},
error: function (err) {
_this.message.create('warning', '派发失败');
item.isLoading = false;
}
});
},
nzCancelText: '取消'
});
};
//删除任务
ZhiIndicatorsComponent.prototype.deleteTask = function (item, incomingData) {
var _this = this;
console.log(item);
console.log(incomingData);
this.modal.confirm({
nzTitle: "\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u4EFB\u52A1\u5417?",
nzOkText: '确定',
nzOkType: 'primary',
nzOnOk: function () {
_this.http["delete"]("/api/PlanTasks/" + item.id).subscribe(function (data) {
var originaldata;
if (item.taskType == '投诉举报' || item.taskType == '行政许可') {
_this.getTaskList(item.taskType);
}
if (item.taskType == '双随机' || item.taskType == '熟悉演练') {
_this.getTaskTarget(item.taskType);
}
_this.message.create('success', '删除成功!');
});
},
nzCancelText: '取消',
nzOnCancel: function () { }
});
};
ZhiIndicatorsComponent = __decorate([
core_1.Component({
selector: 'app-zhi-indicators',
templateUrl: './zhi-indicators.component.html',
styleUrls: ['./zhi-indicators.component.scss']
})
], ZhiIndicatorsComponent);
return ZhiIndicatorsComponent;
}());
exports.ZhiIndicatorsComponent = ZhiIndicatorsComponent;

5
src/app/home/task/zhi-indicators/zhi-indicators.component.html

@ -2,12 +2,9 @@
<div class="box">
<div class="timebox">
<nz-select [(ngModel)]="selectedYear" (ngModelChange)="selectYear($event)">
<nz-option [nzValue]="2021" nzLabel="2021年"></nz-option>
<nz-option [nzValue]="2022" nzLabel="2022年"></nz-option>
<nz-option [nzValue]="2023" nzLabel="2023年"></nz-option>
<nz-option [nzValue]="2024" nzLabel="2024年"></nz-option>
<nz-option [nzValue]="2025" nzLabel="2025年"></nz-option>
<nz-option [nzValue]="2026" nzLabel="2026年"></nz-option>
<nz-option [nzValue]="2027" nzLabel="2027年"></nz-option>
</nz-select>
<div *ngFor="let item of months" class="monthbtn" (click)="selectMonth(item)"
[ngClass]="{'selectedMonth': item.id == selectedMonth}">

2
src/app/home/task/zhi-indicators/zhi-indicators.component.ts

@ -52,7 +52,7 @@ export class ZhiIndicatorsComponent implements OnInit {
{ id: 12, name: '12月', isable: true },
];
selectedMonth;
selectedYear = new Date().getFullYear();
selectedYear = 2023;
selectedTime;
selectMonth(item) {
console.log('选择月份');

BIN
src/assets/images/tdt/end.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

BIN
src/assets/images/tdt/start.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

6
src/index.html

@ -20,12 +20,12 @@
<script type="text/javascript" src="/assets/wordexport/FileSaver.js"></script>
<script type="text/javascript" src="/assets/wordexport/jquery.wordexport.js"></script>
<script type="text/javascript" src="/assets/wordexport/jquery.print.js"></script>
<script type="text/javascript">
<!-- <script type="text/javascript">
window._AMapSecurityConfig = {
securityJsCode: '0afa0b144398727fad2ca06f5f7156b3'
}
</script>
<script src="https://webapi.amap.com/maps?v=2.0&key=17bb9b27e49451cde8f2e6655b11ff1a"></script>
<script src="https://webapi.amap.com/ui/1.1/main.js?v=1.1.1"></script>
<script src="https://webapi.amap.com/ui/1.1/main.js?v=1.1.1"></script> -->
<script src="http://api.tianditu.gov.cn/api?v=4.0&tk=3027d4c8ed89bd8a185a9b73dbf3dcad" type="text/javascript"></script>
</html>
Loading…
Cancel
Save