Compare commits

...

2 Commits

  1. 791
      package-lock.json
  2. 18
      src/app/home/basic-info/unit-details/unit-details.component.html
  3. 40
      src/app/home/basic-info/unit-details/unit-details.component.scss
  4. 502
      src/app/home/basic-info/unit-details/unit-details.component.ts
  5. 34
      src/app/home/home.module.ts
  6. BIN
      src/assets/images/tdt/end.png
  7. BIN
      src/assets/images/tdt/start.png
  8. 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",

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();
});
}

34
src/app/home/home.module.ts

@ -77,11 +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 { 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,
@ -132,7 +133,7 @@ import { UnitListComponent } from './statistic-analysis/home/unit-list/unit-list
FormComponent,
ExamineComponent,
ReviewComponent,
UnitListComponent
UnitListComponent,
],
imports: [
CommonModule,
@ -171,9 +172,26 @@ import { UnitListComponent } from './statistic-analysis/home/unit-list/unit-list
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 {}

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