| | |
| | | "@turf/turf": "^7.0.0",
|
| | | "axios": "^1.7.2",
|
| | | "core-js": "^3.6.4",
|
| | | "echarts": "^5.6.0",
|
| | | "element-ui": "^2.13.1",
|
| | | "html-docx-js": "^0.3.1",
|
| | | "jsencrypt": "^3.3.2",
|
| | |
| | | "node": ">=6.9.0"
|
| | | }
|
| | | },
|
| | | "node_modules/@vue/babel-plugin-resolve-type/node_modules/@vue/compiler-sfc": {
|
| | | "version": "3.5.2",
|
| | | "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.5.2.tgz",
|
| | | "integrity": "sha512-vErEtybSU290LbMW+ChYllI9tNJEdTW1oU+8cZWINZyjlWeTSa9YqDl4/pZJSnozOI+HmcaC1Vz2eFKmXNSXZA==",
|
| | | "dev": true,
|
| | | "dependencies": {
|
| | | "@babel/parser": "^7.25.3",
|
| | | "@vue/compiler-core": "3.5.2",
|
| | | "@vue/compiler-dom": "3.5.2",
|
| | | "@vue/compiler-ssr": "3.5.2",
|
| | | "@vue/shared": "3.5.2",
|
| | | "estree-walker": "^2.0.2",
|
| | | "magic-string": "^0.30.11",
|
| | | "postcss": "^8.4.44",
|
| | | "source-map-js": "^1.2.0"
|
| | | }
|
| | | },
|
| | | "node_modules/@vue/babel-plugin-transform-vue-jsx": {
|
| | | "version": "1.4.0",
|
| | | "resolved": "https://registry.npmjs.org/@vue/babel-plugin-transform-vue-jsx/-/babel-plugin-transform-vue-jsx-1.4.0.tgz",
|
| | |
| | | }
|
| | | },
|
| | | "node_modules/@vue/compiler-core": {
|
| | | "version": "3.5.2",
|
| | | "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.5.2.tgz",
|
| | | "integrity": "sha512-1aP7FL2GkqfcskHWGg3lfWQpJnrmewKc+rNJ/hq9WNaAw4BEyJ5QbNChnqmbw+tJ409zdy1XWmUeXXMrCKJcQQ==",
|
| | | "version": "3.5.13",
|
| | | "resolved": "https://registry.npmmirror.com/@vue/compiler-core/-/compiler-core-3.5.13.tgz",
|
| | | "integrity": "sha512-oOdAkwqUfW1WqpwSYJce06wvt6HljgY3fGeM9NcVA1HaYOij3mZG9Rkysn0OHuyUAGMbEbARIpsG+LPVlBJ5/Q==",
|
| | | "dev": true,
|
| | | "dependencies": {
|
| | | "@babel/parser": "^7.25.3",
|
| | | "@vue/shared": "3.5.2",
|
| | | "@vue/shared": "3.5.13",
|
| | | "entities": "^4.5.0",
|
| | | "estree-walker": "^2.0.2",
|
| | | "source-map-js": "^1.2.0"
|
| | |
| | | },
|
| | | "node_modules/@vue/compiler-core/node_modules/entities": {
|
| | | "version": "4.5.0",
|
| | | "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz",
|
| | | "resolved": "https://registry.npmmirror.com/entities/-/entities-4.5.0.tgz",
|
| | | "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==",
|
| | | "dev": true,
|
| | | "engines": {
|
| | |
| | | }
|
| | | },
|
| | | "node_modules/@vue/compiler-dom": {
|
| | | "version": "3.5.2",
|
| | | "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.5.2.tgz",
|
| | | "integrity": "sha512-QY4DpT8ZIUyu/ZA5gErpSEDocGNEbHmpkZIC/d5jbp/rUF0iOJNigAy3HCCKc0PMMhDlrcysO3ufQ6Ab4MpEcQ==",
|
| | | "version": "3.5.13",
|
| | | "resolved": "https://registry.npmmirror.com/@vue/compiler-dom/-/compiler-dom-3.5.13.tgz",
|
| | | "integrity": "sha512-ZOJ46sMOKUjO3e94wPdCzQ6P1Lx/vhp2RSvfaab88Ajexs0AHeV0uasYhi99WPaogmBlRHNRuly8xV75cNTMDA==",
|
| | | "dev": true,
|
| | | "dependencies": {
|
| | | "@vue/compiler-core": "3.5.2",
|
| | | "@vue/shared": "3.5.2"
|
| | | "@vue/compiler-core": "3.5.13",
|
| | | "@vue/shared": "3.5.13"
|
| | | }
|
| | | },
|
| | | "node_modules/@vue/compiler-sfc": {
|
| | | "version": "2.7.16",
|
| | | "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-2.7.16.tgz",
|
| | | "integrity": "sha512-KWhJ9k5nXuNtygPU7+t1rX6baZeqOYLEforUPjgNDBnLicfHCoi48H87Q8XyLZOrNNsmhuwKqtpDQWjEFe6Ekg==",
|
| | | "version": "3.5.13",
|
| | | "resolved": "https://registry.npmmirror.com/@vue/compiler-sfc/-/compiler-sfc-3.5.13.tgz",
|
| | | "integrity": "sha512-6VdaljMpD82w6c2749Zhf5T9u5uLBWKnVue6XWxprDobftnletJ8+oel7sexFfM3qIxNmVE7LSFGTpv6obNyaQ==",
|
| | | "dev": true,
|
| | | "dependencies": {
|
| | | "@babel/parser": "^7.23.5",
|
| | | "postcss": "^8.4.14",
|
| | | "source-map": "^0.6.1"
|
| | | },
|
| | | "optionalDependencies": {
|
| | | "prettier": "^1.18.2 || ^2.0.0"
|
| | | "@babel/parser": "^7.25.3",
|
| | | "@vue/compiler-core": "3.5.13",
|
| | | "@vue/compiler-dom": "3.5.13",
|
| | | "@vue/compiler-ssr": "3.5.13",
|
| | | "@vue/shared": "3.5.13",
|
| | | "estree-walker": "^2.0.2",
|
| | | "magic-string": "^0.30.11",
|
| | | "postcss": "^8.4.48",
|
| | | "source-map-js": "^1.2.0"
|
| | | }
|
| | | },
|
| | | "node_modules/@vue/compiler-ssr": {
|
| | | "version": "3.5.2",
|
| | | "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.5.2.tgz",
|
| | | "integrity": "sha512-vMtA4tQK/AM3UAYJsmouQzQpgG+h9TKiD5BV+Zt+ZyAMdicxzSEEFGWf/CykRnDpqj9fMfIHPhOezJVNxiXe2A==",
|
| | | "version": "3.5.13",
|
| | | "resolved": "https://registry.npmmirror.com/@vue/compiler-ssr/-/compiler-ssr-3.5.13.tgz",
|
| | | "integrity": "sha512-wMH6vrYHxQl/IybKJagqbquvxpWCuVYpoUJfCqFZwa/JY1GdATAQ+TgVtgrwwMZ0D07QhA99rs/EAAWfvG6KpA==",
|
| | | "dev": true,
|
| | | "dependencies": {
|
| | | "@vue/compiler-dom": "3.5.2",
|
| | | "@vue/shared": "3.5.2"
|
| | | "@vue/compiler-dom": "3.5.13",
|
| | | "@vue/shared": "3.5.13"
|
| | | }
|
| | | },
|
| | | "node_modules/@vue/component-compiler-utils": {
|
| | |
| | | }
|
| | | },
|
| | | "node_modules/@vue/shared": {
|
| | | "version": "3.5.2",
|
| | | "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.5.2.tgz",
|
| | | "integrity": "sha512-Ce89WNFBzcDca/AgFTxgX4/K4iAyF7oFIp8Z5aBbFBNbtpwnQr+5pZOoHndxnjE2h+YFcipVMzs9UL11XB6dwA==",
|
| | | "version": "3.5.13",
|
| | | "resolved": "https://registry.npmmirror.com/@vue/shared/-/shared-3.5.13.tgz",
|
| | | "integrity": "sha512-/hnE/qP5ZoGpol0a5mDi45bOd7t3tjYJBjsgCsivow7D48cJeV5l05RD82lPqi7gRiphZM37rnhW1l6ZoCNNnQ==",
|
| | | "dev": true
|
| | | },
|
| | | "node_modules/@vue/web-component-wrapper": {
|
| | |
| | | },
|
| | | "funding": {
|
| | | "url": "https://github.com/sponsors/sindresorhus"
|
| | | }
|
| | | },
|
| | | "node_modules/bindings": {
|
| | | "version": "1.5.0",
|
| | | "resolved": "https://registry.npmmirror.com/bindings/-/bindings-1.5.0.tgz",
|
| | | "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
|
| | | "dev": true,
|
| | | "optional": true,
|
| | | "dependencies": {
|
| | | "file-uri-to-path": "1.0.0"
|
| | | }
|
| | | },
|
| | | "node_modules/bluebird": {
|
| | |
| | | "safer-buffer": "^2.1.0"
|
| | | }
|
| | | },
|
| | | "node_modules/echarts": {
|
| | | "version": "5.6.0",
|
| | | "resolved": "https://registry.npmmirror.com/echarts/-/echarts-5.6.0.tgz",
|
| | | "integrity": "sha512-oTbVTsXfKuEhxftHqL5xprgLoc0k7uScAwtryCgWF6hPYFLRwOUHiFmHGCBKP5NPFNkDVopOieyUqYGH8Fa3kA==",
|
| | | "dependencies": {
|
| | | "tslib": "2.3.0",
|
| | | "zrender": "5.6.1"
|
| | | }
|
| | | },
|
| | | "node_modules/echarts/node_modules/tslib": {
|
| | | "version": "2.3.0",
|
| | | "resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.3.0.tgz",
|
| | | "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg=="
|
| | | },
|
| | | "node_modules/ee-first": {
|
| | | "version": "1.1.1",
|
| | | "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
|
| | |
| | | "version": "2.0.5",
|
| | | "resolved": "https://registry.npmmirror.com/file-saver/-/file-saver-2.0.5.tgz",
|
| | | "integrity": "sha512-P9bmyZ3h/PRG+Nzga+rbdI4OEpNDzAVyy74uVO9ATgzLK6VtAsYybF/+TOCvrc0MO793d6+42lLyZTw7/ArVzA=="
|
| | | },
|
| | | "node_modules/file-uri-to-path": {
|
| | | "version": "1.0.0",
|
| | | "resolved": "https://registry.npmmirror.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
|
| | | "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==",
|
| | | "dev": true,
|
| | | "optional": true
|
| | | },
|
| | | "node_modules/filesize": {
|
| | | "version": "3.6.1",
|
| | |
| | | "dev": true
|
| | | },
|
| | | "node_modules/picocolors": {
|
| | | "version": "1.1.0",
|
| | | "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.0.tgz",
|
| | | "integrity": "sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw=="
|
| | | "version": "1.1.1",
|
| | | "resolved": "https://registry.npmmirror.com/picocolors/-/picocolors-1.1.1.tgz",
|
| | | "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA=="
|
| | | },
|
| | | "node_modules/picomatch": {
|
| | | "version": "2.3.1",
|
| | |
| | | }
|
| | | },
|
| | | "node_modules/postcss": {
|
| | | "version": "8.4.45",
|
| | | "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.45.tgz",
|
| | | "integrity": "sha512-7KTLTdzdZZYscUc65XmjFiB73vBhBfbPztCYdUNvlaso9PrzjzcmjqBPR0lNGkcVlcO4BjiO5rK/qNz+XAen1Q==",
|
| | | "version": "8.5.1",
|
| | | "resolved": "https://registry.npmmirror.com/postcss/-/postcss-8.5.1.tgz",
|
| | | "integrity": "sha512-6oz2beyjc5VMn/KV1pPw8fliQkhBXrVn1Z3TVyqZxU8kZpzEKhBdmCFqI6ZbmGtamQvQGuU1sgPTk8ZrXDD7jQ==",
|
| | | "funding": [
|
| | | {
|
| | | "type": "opencollective",
|
| | |
| | | }
|
| | | ],
|
| | | "dependencies": {
|
| | | "nanoid": "^3.3.7",
|
| | | "picocolors": "^1.0.1",
|
| | | "source-map-js": "^1.2.0"
|
| | | "nanoid": "^3.3.8",
|
| | | "picocolors": "^1.1.1",
|
| | | "source-map-js": "^1.2.1"
|
| | | },
|
| | | "engines": {
|
| | | "node": "^10 || ^12 || >=14"
|
| | |
| | | "dev": true
|
| | | },
|
| | | "node_modules/postcss/node_modules/nanoid": {
|
| | | "version": "3.3.7",
|
| | | "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz",
|
| | | "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==",
|
| | | "version": "3.3.8",
|
| | | "resolved": "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.8.tgz",
|
| | | "integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==",
|
| | | "funding": [
|
| | | {
|
| | | "type": "github",
|
| | |
| | | }
|
| | | },
|
| | | "node_modules/source-map-js": {
|
| | | "version": "1.2.0",
|
| | | "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz",
|
| | | "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==",
|
| | | "version": "1.2.1",
|
| | | "resolved": "https://registry.npmmirror.com/source-map-js/-/source-map-js-1.2.1.tgz",
|
| | | "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==",
|
| | | "engines": {
|
| | | "node": ">=0.10.0"
|
| | | }
|
| | |
| | | "integrity": "sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==",
|
| | | "dev": true
|
| | | },
|
| | | "node_modules/vue/node_modules/@vue/compiler-sfc": {
|
| | | "version": "2.7.16",
|
| | | "resolved": "https://registry.npmmirror.com/@vue/compiler-sfc/-/compiler-sfc-2.7.16.tgz",
|
| | | "integrity": "sha512-KWhJ9k5nXuNtygPU7+t1rX6baZeqOYLEforUPjgNDBnLicfHCoi48H87Q8XyLZOrNNsmhuwKqtpDQWjEFe6Ekg==",
|
| | | "dependencies": {
|
| | | "@babel/parser": "^7.23.5",
|
| | | "postcss": "^8.4.14",
|
| | | "source-map": "^0.6.1"
|
| | | },
|
| | | "optionalDependencies": {
|
| | | "prettier": "^1.18.2 || ^2.0.0"
|
| | | }
|
| | | },
|
| | | "node_modules/vuex": {
|
| | | "version": "3.6.2",
|
| | | "resolved": "https://registry.npmjs.org/vuex/-/vuex-3.6.2.tgz",
|
| | |
| | | "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz",
|
| | | "integrity": "sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==",
|
| | | "dev": true
|
| | | },
|
| | | "node_modules/zrender": {
|
| | | "version": "5.6.1",
|
| | | "resolved": "https://registry.npmmirror.com/zrender/-/zrender-5.6.1.tgz",
|
| | | "integrity": "sha512-OFXkDJKcrlx5su2XbzJvj/34Q3m6PvyCZkVPHGYpcCJ52ek4U/ymZyfuV1nKE23AyBJ51E/6Yr0mhZ7xGTO4ag==",
|
| | | "dependencies": {
|
| | | "tslib": "2.3.0"
|
| | | }
|
| | | },
|
| | | "node_modules/zrender/node_modules/tslib": {
|
| | | "version": "2.3.0",
|
| | | "resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.3.0.tgz",
|
| | | "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg=="
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | "@turf/turf": "^7.0.0",
|
| | | "axios": "^1.7.2",
|
| | | "core-js": "^3.6.4",
|
| | | "echarts": "^5.6.0",
|
| | | "element-ui": "^2.13.1",
|
| | | "html-docx-js": "^0.3.1",
|
| | | "jsencrypt": "^3.3.2",
|
| | |
| | | case "getParam": |
| | | this.addTetrahedron(res); |
| | | break; |
| | | case "attackentity": |
| | | this.addPolyLine(res); |
| | | break; |
| | | } |
| | | }, |
| | | creatQueryMeta(res) { |
| | |
| | | }); |
| | | }, |
| | | |
| | | //绘制线 |
| | | addPolyLine(res) { |
| | | // 解析 LINESTRING 字符串为经纬度坐标数组 |
| | | const coordinates = res.bombpoint |
| | | .replace("LINESTRING", "") // 去除 'LINESTRING' 部分 |
| | | .replace(/[()]/g, "") // 去除括号 |
| | | .split(",") // 按逗号分割 |
| | | .map(coord => { |
| | | const [lon, lat] = coord.trim().split(" "); // 将每对坐标分开 |
| | | return [parseFloat(lon), parseFloat(lat)]; // 转换为数字 |
| | | }); |
| | | const positions = coordinates.map(coord => { |
| | | return { |
| | | x: coord[0], |
| | | y: coord[1], |
| | | z: 21 |
| | | }; |
| | | }); |
| | | positions.forEach((item,index) => { |
| | | const particle = earthCtrl.factory.createParticleEffect("flame", item, { |
| | | translation: SmartEarth.Cesium.Cartesian3.fromElements(0, 0, 0), //平移 |
| | | emissionRate: 500, |
| | | startScale: 15, |
| | | endScale: 45, |
| | | }); |
| | | if (index == positions.length/2) { |
| | | earthCtrl.camera.flyTo(item.x, item.y, 3000, 0, -90, 0, 2); |
| | | } |
| | | this.layerList.push({ |
| | | layer: particle, |
| | | func: 'attackentity' |
| | | }); |
| | | }) |
| | | }, |
| | | |
| | | removeAll() { |
| | | store.state.setListColor = []; |
| | | store.state.showLenged = false; |
| | |
| | | this.layerList.splice(i, 1); |
| | | i--; |
| | | } |
| | | else if (obj.func == "attackentity") { |
| | | this.layerList[i].layer.deleteObject(); |
| | | this.layerList.splice(i, 1); |
| | | i--; |
| | | } |
| | | } |
| | | if (!window.terrain) { |
| | | window.terrain = earthCtrl.factory.createTerrainLayer({ |
| | |
| | | historyList: [],
|
| | | sessionId:null,
|
| | | setListColor:[],
|
| | | showRelationBox:false,
|
| | | relationData:{}
|
| | | },
|
| | | mutations: {
|
| | | setHunmanMessage(state, msg) {
|
| | |
| | | // console.log('Received message:', event.data);
|
| | | console.log(event);
|
| | |
|
| | | if (event.data != "连接成功" || event.data != "收到消息,消息内容:心跳包检测") {
|
| | | if (
|
| | | event.data != "连接成功" ||
|
| | | event.data.indexOf("收到消息,消息内容:心跳包检测") <= 0
|
| | | ) {
|
| | | console.log(event.data);
|
| | | const val = JSON.parse(event.data);
|
| | | if (val.session_id == this.uuid) {
|
| | |
| | | 0.001313831409284339,
|
| | | 2
|
| | | );
|
| | | } else {
|
| | | //关闭地图
|
| | | // this.$store.state.setScreenFlag = false;
|
| | | }
|
| | | mapImg.removeInit();
|
| | | mapSetFunc.removeAll();
|
| | | this.$store.state.setListColor = [];
|
| | | this.$store.state.showLenged = false;
|
| | | this.$store.state.showRelationBox = false;
|
| | |
|
| | | // const formData = new FormData();
|
| | | // formData.append("message", res);
|
| | |
| | |
|
| | | const type = response.type;
|
| | | //普通对话信息查询
|
| | | if (type == "message") {
|
| | | if (type == "message" || type == "Rag") {
|
| | | //关闭地图
|
| | | if (!this.closeMap) {
|
| | | this.$store.state.setScreenFlag = false;
|
| | |
| | | var rolMsg = [
|
| | | {
|
| | | type: "text",
|
| | | val: response.msg,
|
| | | val: type == "Rag" ? response.content : response.msg,
|
| | | },
|
| | | ];
|
| | | this.refashMsg(rolMsg);
|
| | |
| | | this.$store.state.setScreenFlag = true;
|
| | | this.setMapfunc(response.content, obj);
|
| | | }
|
| | | // if (type == "Map") {
|
| | | // this.setMapfunc(response.content, obj);
|
| | | // } else if (type == "Rag") {
|
| | | // this.setMapRag(response, obj);
|
| | | // } else {
|
| | | // // this.setMapfunc(response.content, obj);
|
| | | // }
|
| | | })
|
| | | .catch((error) => {
|
| | | var rolMsg = [
|
| | |
| | | } else {
|
| | | roleMsg = msgData.getAffairsData([{ type: "text", val: res.msg }]);
|
| | | }
|
| | |
|
| | | this.refashMsg(roleMsg.list);
|
| | | break;
|
| | | case "queryMeta":
|
| | |
| | | var roleMsg = msgData.getAffairsData([
|
| | | { type: "text", val: "地图已显示" },
|
| | | ]);
|
| | | console.log("roleMsg----", roleMsg);
|
| | | this.refashMsg(roleMsg.list);
|
| | | break;
|
| | | case "aroundPoi":
|
| | |
| | | this.setUpdateHistoryInFor(obj, res.msg);
|
| | | this.refashMsg(roleMsg.list);
|
| | | break;
|
| | | // default:
|
| | | // this.setUpdateHistoryInFor(obj, res.msg);
|
| | | // var roleMsg1 = msgData.getAffairsData([
|
| | | // { type: "text", val: res.msg },
|
| | | // ]);
|
| | | // this.refashMsg(roleMsg1.list);
|
| | | // break;
|
| | | case "attackentity":
|
| | | mapSetFunc.init(res);
|
| | | this.setUpdateHistoryInFor(obj, res.msg);
|
| | | if (res.data.length === 1) {
|
| | | var roleMsg = msgData.getAffairsData([
|
| | | { type: "text", val: res.data[0].targetinfo },
|
| | | ]);
|
| | | this.refashMsg(roleMsg.list);
|
| | | } else {
|
| | | const markData = res.data
|
| | | .map((item) => `| ${item.name} | ${item.targetinfo} |`)
|
| | | .join("\n");
|
| | | let markAttr = `| 名称 | 属性信息 |\n|------|------|\n` + markData;
|
| | | var roleMsg = msgData.getMdData("markdown", markAttr);
|
| | | this.refashMsg(roleMsg.list);
|
| | | }
|
| | | break;
|
| | | case "getRelatedEntity":
|
| | | this.setUpdateHistoryInFor(obj, res.msg);
|
| | | this.handleRelationData(res.data);
|
| | | var roleMsg = msgData.getAffairsData([
|
| | | { type: "text", val: "页面已显示" },
|
| | | ]);
|
| | | this.refashMsg(roleMsg.list);
|
| | | break;
|
| | | default:
|
| | | this.setUpdateHistoryInFor(obj, res.msg);
|
| | | var roleMsg1 = msgData.getAffairsData([
|
| | | { type: "text", val: res.msg },
|
| | | ]);
|
| | | this.refashMsg(roleMsg1.list);
|
| | | break;
|
| | | }
|
| | | },
|
| | | setUpdateHistoryInFor(obj, message) {
|
| | |
| | | this.loading = false;
|
| | | this.list[this.list.length - 1].list = res;
|
| | | },
|
| | | //关系数据处理
|
| | | handleRelationData(data) {
|
| | | // 准备节点和边
|
| | | let graphData = [];
|
| | | let links = [];
|
| | | // 处理主类型(mainType)
|
| | | Object.keys(data.mainType).forEach((main) => {
|
| | | graphData.push({
|
| | | name: main,
|
| | | category: "mainType",
|
| | | symbolSize: 70,
|
| | | itemStyle: {
|
| | | color: "#4169E1",
|
| | | },
|
| | | });
|
| | |
|
| | | data.mainType[main].forEach((sec) => {
|
| | | graphData.push({
|
| | | name: sec,
|
| | | category: "secType",
|
| | | symbolSize: 60,
|
| | | itemStyle: {
|
| | | color: "#87CEFA",
|
| | | },
|
| | | });
|
| | |
|
| | | // 处理子类型(secType)
|
| | | if (data.secType[sec]) {
|
| | | data.secType[sec].forEach((sub) => {
|
| | | graphData.push({
|
| | | name: sub,
|
| | | category: "subType",
|
| | | symbolSize: 50,
|
| | | itemStyle: {
|
| | | color: "#30ECA6",
|
| | | },
|
| | | });
|
| | |
|
| | | // 处理具体项(subtype)
|
| | | if (data.subtype[sub]) {
|
| | | data.subtype[sub].forEach((item) => {
|
| | | graphData.push({
|
| | | name: item.name,
|
| | | category: "subTypeItem",
|
| | | symbolSize: 50,
|
| | | itemStyle: {
|
| | | color: "#00BFFF",
|
| | | },
|
| | | uuid: item.uuid,
|
| | | lontitude: item.lontitude,
|
| | | lattitude: item.lattitude,
|
| | | });
|
| | | links.push({ source: sub, target: item.name });
|
| | | });
|
| | | }
|
| | | // 父子节点连接
|
| | | links.push({ source: sec, target: sub });
|
| | | });
|
| | | }
|
| | | // 父子节点连接
|
| | | links.push({ source: main, target: sec });
|
| | | });
|
| | | });
|
| | | console.log("nodes---", graphData, "links---", links);
|
| | | this.$store.state.showRelationBox = true;
|
| | | this.$store.state.relationData = {
|
| | | nodes: graphData,
|
| | | links: links,
|
| | | };
|
| | | },
|
| | | },
|
| | | };
|
| | | </script>
|
| | |
| | | <button @click="setQueryErroInfo(true)">询问</button> |
| | | <button @click="setQueryErroInfo(false)">关闭</button> |
| | | </div> |
| | | </div> |
| | | <!-- <!-- <img :src="http://localhost:12315/image/1.jpg" /> --> |
| | | |
| | | <!-- <img :src="$store.state.ImageUrl" style="width:100%;height:50%"> --> |
| | | </div> |
| | | |
| | | <div class="relationBox" v-if="$store.state.showRelationBox"> |
| | | <div class="chartBox" id="relationChart"></div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import mapView from "./../../assets/js/map/mapView.js"; |
| | | import bus from "./../../assets/js/bus.js"; |
| | | import mapServer from "../../assets/js/map/mapServer.js"; |
| | | import * as echarts from "echarts"; |
| | | // import { nextTick } from "vue/types/umd"; |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | lengedList: [ |
| | | { |
| | | name: "军事目标", |
| | | color: "#73afff" |
| | | color: "#73afff", |
| | | }, |
| | | { |
| | | name: "政治目标", |
| | | color: "#fffd72" |
| | | color: "#fffd72", |
| | | }, |
| | | { |
| | | name: "经济目标", |
| | | color: "#fabc56" |
| | | color: "#fabc56", |
| | | }, |
| | | { |
| | | name: "社会目标", |
| | | color: "#272424" |
| | | color: "#272424", |
| | | }, |
| | | { |
| | | name: "民宅", |
| | | color: "#979696" |
| | | } |
| | | ] |
| | | color: "#979696", |
| | | }, |
| | | ], |
| | | }; |
| | | }, |
| | | computed: { |
| | | erroInfo() { |
| | | return this.$store.state.erroInfoMessage; |
| | | } |
| | | }, |
| | | relationInfo() { |
| | | return this.$store.state.relationData; |
| | | }, |
| | | }, |
| | | watch: { |
| | | erroInfo(nVal, Oval) { |
| | | if (nVal) { |
| | | this.setErrorMessage(nVal); |
| | | } |
| | | } |
| | | }, |
| | | relationInfo(data, Oval) { |
| | | if (data) { |
| | | setTimeout(() => { |
| | | this.initChart(data); |
| | | }, 500); |
| | | } |
| | | }, |
| | | }, |
| | | methods: { |
| | | getBackgroundColor(res) { |
| | | return `background-color: ${res.color};` |
| | | return `background-color: ${res.color};`; |
| | | }, |
| | | setMapViewStart() { |
| | | mapView.initMap(); |
| | | |
| | | }, |
| | | setErrorMessage(res) { |
| | | this.errInfoMessage = res; |
| | |
| | | const obj = JSON.parse(JSON.stringify(this.errInfoMessage)); |
| | | bus.$emit("mapInfo", { |
| | | type: "erroInfo", |
| | | value: obj.val |
| | | value: obj.val, |
| | | }); |
| | | |
| | | } |
| | | this.$nextTick(() => { |
| | | this.errInfoFlag = false; |
| | | document.getElementById("inforMessage").innerHTML = ""; |
| | | this.errInfoMessage = null; |
| | | }); |
| | | } |
| | | }, |
| | | initChart(data) { |
| | | let dom = document.getElementById("relationChart"); |
| | | let myChart = echarts.init(dom); |
| | | const option = { |
| | | tooltip: {}, |
| | | series: [ |
| | | { |
| | | type: "graph", |
| | | layout: "force", |
| | | data: data.nodes, |
| | | links: data.links, |
| | | symbolSize: function (size) { |
| | | return size; |
| | | }, |
| | | roam: true, // 启用缩放和拖拽 |
| | | label: { |
| | | show: true, |
| | | textStyle: { |
| | | fontSize: 13, |
| | | color: "#fff", |
| | | }, |
| | | }, |
| | | force: { |
| | | repulsion: 500, |
| | | }, |
| | | edgeSymbol: ["none", "arrow"], //线2头标记 |
| | | lineStyle: { |
| | | opacity: 1, |
| | | width: 1, |
| | | curveness: 0, |
| | | color: "#fff", |
| | | type: "dashed", |
| | | }, |
| | | }, |
| | | ], |
| | | }; |
| | | if (option && typeof option === "object") { |
| | | myChart.setOption(option); |
| | | } |
| | | window.addEventListener("resize", myChart.resize); |
| | | const that = this; |
| | | myChart.on("click", function (params) { |
| | | //定位到对应实体 |
| | | if (params.data.uuid) { |
| | | that.flyToEntity(params.data); |
| | | } |
| | | }); |
| | | }, |
| | | flyToEntity(entity) { |
| | | const modelLayer = mapServer.listData.filter((obj) => { |
| | | if (obj.name == config.modelLayer) { |
| | | return obj; |
| | | } |
| | | }); |
| | | modelLayer[0].layer.style = new Cesium.Cesium3DTileStyle({ |
| | | color: { |
| | | evaluateColor: (feature) => { |
| | | const id = feature.getProperty("id"); |
| | | if (id.indexOf(entity.uuid) > -1) { |
| | | console.log("id**********", id); |
| | | return new SmartEarth.Cesium.Color.fromCssColorString("#FF0000"); |
| | | } |
| | | }, |
| | | }, |
| | | }); |
| | | earthCtrl.camera.flyTo(entity.lontitude, entity.lattitude, 3000, 0, -90, 0, 2); |
| | | }, |
| | | }, |
| | | |
| | | mounted() { |
| | | this.setMapViewStart(); |
| | | } |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | |
| | | width: 100%; |
| | | height: 100%; |
| | | position: absolute; |
| | | |
| | | } |
| | | |
| | | .mapLenged { |
| | | position: absolute; |
| | | z-index: 40; |
| | | border: 1px solid #808080; |
| | | background: rgba(255, 255, 255, .7); |
| | | background: rgba(255, 255, 255, 0.7); |
| | | padding: 4px; |
| | | bottom: 20px; |
| | | left: 20px; |
| | |
| | | align-items: center; |
| | | margin-left: 10px; |
| | | font-size: 16px; |
| | | |
| | | } |
| | | |
| | | .mapLenged li { |
| | |
| | | line-height: normal; |
| | | font-size: 12px; |
| | | } |
| | | |
| | | .relationBox { |
| | | position: absolute; |
| | | z-index: 40; |
| | | background: rgba(0, 0, 0, 0.4); |
| | | padding: 4px; |
| | | top: 20px; |
| | | left: 20px; |
| | | width: 95%; |
| | | height: 50%; |
| | | width: 45vw; |
| | | } |
| | | .chartBox { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | </style> |
| | | <style> |
| | | .infoTitle { |
| | |
| | | assetFilter: function (assetFilename) {
|
| | | return assetFilename.endsWith(".js") || assetFilename.endsWith(".css");
|
| | | }
|
| | | }
|
| | | },
|
| | | devtool:"source map"
|
| | | }
|
| | | };
|