增加地图从参数请求

This commit is contained in:
胡昊 2024-07-20 11:25:13 +08:00
parent 4ced3b23c8
commit f9c142a7ca
7 changed files with 186 additions and 147 deletions

View File

@ -17,7 +17,7 @@ module.exports = merge(prodEnv, {
// VUE_APP_API_URL: '"http://10.10.150.237/"' // VUE_APP_API_URL: '"http://10.10.150.237/"'
VUE_APP_BASE_API: '"/api"', VUE_APP_BASE_API: '"/api"',
VUE_APP_BASE_APIURL: '"http://ds.hzzxq.com/api"', VUE_APP_BASE_APIURL: '"http://ds2.hzzxq.com/api2"',
VUE_APP_FULL_API: '"http://10.10.151.5:5555"', VUE_APP_FULL_API: '"http://10.10.151.5:5555"',
VUE_APP_BASE_API_FRONT: '"http://10.10.150.128:8080/satellitePub/pub/index.html"', VUE_APP_BASE_API_FRONT: '"http://10.10.150.128:8080/satellitePub/pub/index.html"',
VUE_APP_FILE_API: '"http://10.10.151.5:5555/archives"', VUE_APP_FILE_API: '"http://10.10.151.5:5555/archives"',

View File

@ -15,7 +15,7 @@ module.exports = {
// target: 'http://120.48.105.88', // 线上 // target: 'http://120.48.105.88', // 线上
// target: 'http://10.0.90.70', // 测试环境 // target: 'http://10.0.90.70', // 测试环境
// target: 'http://1.95.42.191:8080', // 测试环境 // target: 'http://1.95.42.191:8080', // 测试环境
target: 'http://ds.hzzxq.com', // 测试环境 target: 'http://ds2.hzzxq.com/api2', // 测试环境
changeOrigin: true, // 是否跨域 changeOrigin: true, // 是否跨域
secure: false, // 是否使用https secure: false, // 是否使用https
pathRewrite: { pathRewrite: {

View File

@ -13,8 +13,10 @@ module.exports = {
// VUE_APP_BASE_APIURL: '"http://120.48.105.88/api"', // 生产环境 // VUE_APP_BASE_APIURL: '"http://120.48.105.88/api"', // 生产环境
// VUE_APP_BASE_API: '"/api"', // 生产环境 // VUE_APP_BASE_API: '"/api"', // 生产环境
// VUE_APP_BASE_APIURL: '"http://1.95.42.191:8080/api"', // 生产环境 // VUE_APP_BASE_APIURL: '"http://1.95.42.191:8080/api"', // 生产环境
VUE_APP_BASE_API: '"/api"', // VUE_APP_BASE_API: '"/api"',
VUE_APP_BASE_APIURL: '"http://ds.hzzxq.com/api"', // VUE_APP_BASE_APIURL: '"http://ds.hzzxq.com/api"',
VUE_APP_BASE_API: '"./"',
VUE_APP_BASE_APIURL: '"./"',
VUE_APP_FULL_API: '"http://10.10.151.3:5555"', VUE_APP_FULL_API: '"http://10.10.151.3:5555"',
VUE_APP_BASE_API_FRONT: '"http://10.10.150.128:8080/satellitePub/pub/index.html"', VUE_APP_BASE_API_FRONT: '"http://10.10.150.128:8080/satellitePub/pub/index.html"',
VUE_APP_CAS_LOGIN_FRONT: '"http://10.10.150.237/login?service=http://10.10.151.3:5555/api/login/cas?sign=asos_client"', VUE_APP_CAS_LOGIN_FRONT: '"http://10.10.150.237/login?service=http://10.10.151.3:5555/api/login/cas?sign=asos_client"',

258
package-lock.json generated
View File

@ -1446,12 +1446,33 @@
"integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==",
"dev": true "dev": true
}, },
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true
},
"emoji-regex": { "emoji-regex": {
"version": "9.2.2", "version": "9.2.2",
"resolved": "https://registry.npmmirror.com/emoji-regex/-/emoji-regex-9.2.2.tgz", "resolved": "https://registry.npmmirror.com/emoji-regex/-/emoji-regex-9.2.2.tgz",
"integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==",
"dev": true "dev": true
}, },
"is-fullwidth-code-point": {
"version": "3.0.0",
"resolved": "https://registry.npmmirror.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
"integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
"dev": true
},
"string-width": { "string-width": {
"version": "5.1.2", "version": "5.1.2",
"resolved": "https://registry.npmmirror.com/string-width/-/string-width-5.1.2.tgz", "resolved": "https://registry.npmmirror.com/string-width/-/string-width-5.1.2.tgz",
@ -1463,6 +1484,40 @@
"strip-ansi": "^7.0.1" "strip-ansi": "^7.0.1"
} }
}, },
"string-width-cjs": {
"version": "npm:string-width@4.2.3",
"resolved": "https://registry.npmmirror.com/string-width/-/string-width-4.2.3.tgz",
"integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
"dev": true,
"requires": {
"emoji-regex": "^8.0.0",
"is-fullwidth-code-point": "^3.0.0",
"strip-ansi": "^6.0.1"
},
"dependencies": {
"ansi-regex": {
"version": "5.0.1",
"resolved": "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-5.0.1.tgz",
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
"dev": true
},
"emoji-regex": {
"version": "8.0.0",
"resolved": "https://registry.npmmirror.com/emoji-regex/-/emoji-regex-8.0.0.tgz",
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
"dev": true
},
"strip-ansi": {
"version": "6.0.1",
"resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-6.0.1.tgz",
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
"dev": true,
"requires": {
"ansi-regex": "^5.0.1"
}
}
}
},
"strip-ansi": { "strip-ansi": {
"version": "7.1.0", "version": "7.1.0",
"resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-7.1.0.tgz", "resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-7.1.0.tgz",
@ -1472,6 +1527,23 @@
"ansi-regex": "^6.0.1" "ansi-regex": "^6.0.1"
} }
}, },
"strip-ansi-cjs": {
"version": "npm:strip-ansi@6.0.1",
"resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-6.0.1.tgz",
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
"dev": true,
"requires": {
"ansi-regex": "^5.0.1"
},
"dependencies": {
"ansi-regex": {
"version": "5.0.1",
"resolved": "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-5.0.1.tgz",
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
"dev": true
}
}
},
"wrap-ansi": { "wrap-ansi": {
"version": "8.1.0", "version": "8.1.0",
"resolved": "https://registry.npmmirror.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz", "resolved": "https://registry.npmmirror.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz",
@ -1482,6 +1554,60 @@
"string-width": "^5.0.1", "string-width": "^5.0.1",
"strip-ansi": "^7.0.1" "strip-ansi": "^7.0.1"
} }
},
"wrap-ansi-cjs": {
"version": "npm:wrap-ansi@7.0.0",
"resolved": "https://registry.npmmirror.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
"integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
"dev": true,
"requires": {
"ansi-styles": "^4.0.0",
"string-width": "^4.1.0",
"strip-ansi": "^6.0.0"
},
"dependencies": {
"ansi-regex": {
"version": "5.0.1",
"resolved": "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-5.0.1.tgz",
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
"dev": true
},
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"emoji-regex": {
"version": "8.0.0",
"resolved": "https://registry.npmmirror.com/emoji-regex/-/emoji-regex-8.0.0.tgz",
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
"dev": true
},
"string-width": {
"version": "4.2.3",
"resolved": "https://registry.npmmirror.com/string-width/-/string-width-4.2.3.tgz",
"integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
"dev": true,
"requires": {
"emoji-regex": "^8.0.0",
"is-fullwidth-code-point": "^3.0.0",
"strip-ansi": "^6.0.1"
}
},
"strip-ansi": {
"version": "6.0.1",
"resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-6.0.1.tgz",
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
"dev": true,
"requires": {
"ansi-regex": "^5.0.1"
}
}
}
} }
} }
}, },
@ -18170,46 +18296,6 @@
"strip-ansi": "^3.0.0" "strip-ansi": "^3.0.0"
} }
}, },
"string-width-cjs": {
"version": "npm:string-width@4.2.3",
"resolved": "https://registry.npmmirror.com/string-width/-/string-width-4.2.3.tgz",
"integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
"dev": true,
"requires": {
"emoji-regex": "^8.0.0",
"is-fullwidth-code-point": "^3.0.0",
"strip-ansi": "^6.0.1"
},
"dependencies": {
"ansi-regex": {
"version": "5.0.1",
"resolved": "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-5.0.1.tgz",
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
"dev": true
},
"emoji-regex": {
"version": "8.0.0",
"resolved": "https://registry.npmmirror.com/emoji-regex/-/emoji-regex-8.0.0.tgz",
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
"dev": true
},
"is-fullwidth-code-point": {
"version": "3.0.0",
"resolved": "https://registry.npmmirror.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
"integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
"dev": true
},
"strip-ansi": {
"version": "6.0.1",
"resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-6.0.1.tgz",
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
"dev": true,
"requires": {
"ansi-regex": "^5.0.1"
}
}
}
},
"string.prototype.trim": { "string.prototype.trim": {
"version": "1.2.9", "version": "1.2.9",
"resolved": "https://registry.npmmirror.com/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz", "resolved": "https://registry.npmmirror.com/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz",
@ -18266,23 +18352,6 @@
"ansi-regex": "^2.0.0" "ansi-regex": "^2.0.0"
} }
}, },
"strip-ansi-cjs": {
"version": "npm:strip-ansi@6.0.1",
"resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-6.0.1.tgz",
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
"dev": true,
"requires": {
"ansi-regex": "^5.0.1"
},
"dependencies": {
"ansi-regex": {
"version": "5.0.1",
"resolved": "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-5.0.1.tgz",
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
"dev": true
}
}
},
"strip-bom": { "strip-bom": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmmirror.com/strip-bom/-/strip-bom-2.0.0.tgz", "resolved": "https://registry.npmmirror.com/strip-bom/-/strip-bom-2.0.0.tgz",
@ -21078,81 +21147,6 @@
} }
} }
}, },
"wrap-ansi-cjs": {
"version": "npm:wrap-ansi@7.0.0",
"resolved": "https://registry.npmmirror.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
"integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
"dev": true,
"requires": {
"ansi-styles": "^4.0.0",
"string-width": "^4.1.0",
"strip-ansi": "^6.0.0"
},
"dependencies": {
"ansi-regex": {
"version": "5.0.1",
"resolved": "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-5.0.1.tgz",
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
"dev": true
},
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true
},
"emoji-regex": {
"version": "8.0.0",
"resolved": "https://registry.npmmirror.com/emoji-regex/-/emoji-regex-8.0.0.tgz",
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
"dev": true
},
"is-fullwidth-code-point": {
"version": "3.0.0",
"resolved": "https://registry.npmmirror.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
"integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
"dev": true
},
"string-width": {
"version": "4.2.3",
"resolved": "https://registry.npmmirror.com/string-width/-/string-width-4.2.3.tgz",
"integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
"dev": true,
"requires": {
"emoji-regex": "^8.0.0",
"is-fullwidth-code-point": "^3.0.0",
"strip-ansi": "^6.0.1"
}
},
"strip-ansi": {
"version": "6.0.1",
"resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-6.0.1.tgz",
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
"dev": true,
"requires": {
"ansi-regex": "^5.0.1"
}
}
}
},
"wrappy": { "wrappy": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "https://registry.npmmirror.com/wrappy/-/wrappy-1.0.2.tgz", "resolved": "https://registry.npmmirror.com/wrappy/-/wrappy-1.0.2.tgz",

View File

@ -77,3 +77,12 @@ export function getVoyageLine(query) {
params: query params: query
}) })
} }
// 获取从参数列表
export function getParamsList(query) {
return request({
url: '/param/list.htm',
method: 'get',
params: query
})
}

View File

@ -268,7 +268,7 @@
<script> <script>
import { getDataSearch, voyageNameList, PlatformTypeList, equipmentTypeList, dataTypeList, dataPoints, sampleLineList, sampleStationList } from '../api/dataSearch' import { getDataSearch, voyageNameList, PlatformTypeList, equipmentTypeList, dataTypeList, dataPoints, sampleLineList, sampleStationList } from '../api/dataSearch'
import { getVoyageLine } from '../api/home' import { getParamsList, getVoyageLine } from '../api/home'
const Cesium = window.Cesium const Cesium = window.Cesium
export default { export default {
name: 'Shuju', name: 'Shuju',
@ -327,12 +327,15 @@ export default {
job: '', job: '',
chooseStation: null, chooseStation: null,
chooseLine: null, chooseLine: null,
//
CesiumHostAddr: ''
} }
}, },
created() { created() {
this.getParams()
}, },
mounted() { mounted() {
this.initCesium() // this.initCesium()
}, },
watch: { watch: {
radio(val) { radio(val) {
@ -359,6 +362,20 @@ export default {
} }
}, },
methods: { methods: {
//
getParams() {
getParamsList().then(res => {
const arr = res.array
if (arr.length) {
arr.forEach(item => {
if (item.param_name === 'CesiumHostAddr') {
this.CesiumHostAddr = item.param_value
this.initCesium()
}
})
}
})
},
// //
getList() { getList() {
this.clearAll() this.clearAll()
@ -486,7 +503,7 @@ export default {
// //
const earthMap = new Cesium.WebMapTileServiceImageryProvider( const earthMap = new Cesium.WebMapTileServiceImageryProvider(
{ {
url: 'http://124.222.8.13:9801/tiles/geoserver/gwc/service/wmts/rest/ne:gmrt_20231018/{TileMatrixSet}/{TileMatrixSet}:{TileMatrix}/{TileRow}/{TileCol}?format=image/jpeg', url: this.CesiumHostAddr + 'geoserver/gwc/service/wmts/rest/ougp:world/EPSG:4326/EPSG:4326:{z}/{y}/{x}?format=image/png',
layer: 'ne:gmrt_20231018', layer: 'ne:gmrt_20231018',
style: 'default', style: 'default',
tileMatrixSetID: 'EPSG:4326', tileMatrixSetID: 'EPSG:4326',
@ -498,7 +515,7 @@ export default {
// 线 /geoserver/gwc/service/wmts/rest/ne:GSHHS_f_L1/EPSG:4326/EPSG:4326:{z}/{y}/{x}?format=image/png // 线 /geoserver/gwc/service/wmts/rest/ne:GSHHS_f_L1/EPSG:4326/EPSG:4326:{z}/{y}/{x}?format=image/png
const coastline = new Cesium.WebMapTileServiceImageryProvider( const coastline = new Cesium.WebMapTileServiceImageryProvider(
{ {
url: 'http://124.222.8.13:9801/tiles/geoserver/gwc/service/wmts/rest/ne:GSHHS_f_L1/{TileMatrixSet}/{TileMatrixSet}:{TileMatrix}/{TileRow}/{TileCol}?format=image/png', url: this.CesiumHostAddr + 'geoserver/gwc/service/wmts/rest/ougp:GSHHS_f_L1/EPSG:4326/EPSG:4326:{z}/{y}/{x}?format=image/png',
layer: 'ne:GSHHS_f_L1', layer: 'ne:GSHHS_f_L1',
style: 'default', style: 'default',
tileMatrixSetID: 'EPSG:4326', tileMatrixSetID: 'EPSG:4326',
@ -510,7 +527,7 @@ export default {
// /geoserver/gwc/service/wmts/rest/ne:No1ShipWreck_UP/EPSG:4326/EPSG:4326:{z}/{y}/{x}?format=image/png // /geoserver/gwc/service/wmts/rest/ne:No1ShipWreck_UP/EPSG:4326/EPSG:4326:{z}/{y}/{x}?format=image/png
const shipline = new Cesium.WebMapTileServiceImageryProvider( const shipline = new Cesium.WebMapTileServiceImageryProvider(
{ {
url: 'http://124.222.8.13:9801/tiles/geoserver/gwc/service/wmts/rest/ne:No1ShipWreck_UP/{TileMatrixSet}/{TileMatrixSet}:{TileMatrix}/{TileRow}/{TileCol}?format=image/png', url: this.CesiumHostAddr + 'geoserver/gwc/service/wmts/rest/ougp:正射影像图_GM输出_20240516/EPSG:4326/EPSG:4326:{z}/{y}/{x}?format=image/png',
layer: 'ne:No1ShipWreck_UP', layer: 'ne:No1ShipWreck_UP',
style: 'default', style: 'default',
tileMatrixSetID: 'EPSG:4326', tileMatrixSetID: 'EPSG:4326',

View File

@ -213,7 +213,7 @@
</template> </template>
<script> <script>
import { getVoyage, getVoyageLine } from '../api/home' import { getVoyage, getVoyageLine, getParamsList } from '../api/home'
import { swiper, swiperSlide } from 'vue-awesome-swiper' import { swiper, swiperSlide } from 'vue-awesome-swiper'
import 'swiper/swiper-bundle.css' import 'swiper/swiper-bundle.css'
const Cesium = window.Cesium const Cesium = window.Cesium
@ -308,7 +308,9 @@ export default {
} }
], ],
viewer: null, viewer: null,
color: [Cesium.Color.RED, Cesium.Color.GREEN, Cesium.Color.BLUE, Cesium.Color.CHARTREUSE, Cesium.Color.DARKBLUE] color: [Cesium.Color.RED, Cesium.Color.GREEN, Cesium.Color.BLUE, Cesium.Color.CHARTREUSE, Cesium.Color.DARKBLUE],
//
CesiumHostAddr: ''
} }
}, },
@ -319,11 +321,26 @@ export default {
}, },
created() { created() {
this.getVoyageList() this.getVoyageList()
this.getParams()
}, },
mounted() { mounted() {
this.initCesium() // this.initCesium()
}, },
methods: { methods: {
//
getParams() {
getParamsList().then(res => {
const arr = res.array
if (arr.length) {
arr.forEach(item => {
if (item.param_name === 'CesiumHostAddr') {
this.CesiumHostAddr = item.param_value
this.initCesium()
}
})
}
})
},
// //
getVoyageList() { getVoyageList() {
getVoyage().then(res => { getVoyage().then(res => {
@ -375,7 +392,7 @@ export default {
// //
const earthMap = new Cesium.WebMapTileServiceImageryProvider( const earthMap = new Cesium.WebMapTileServiceImageryProvider(
{ {
url: 'http://124.222.8.13:9801/tiles/geoserver/gwc/service/wmts/rest/ougp:world/EPSG:4326/EPSG:4326:{z}/{y}/{x}?format=image/png', url: this.CesiumHostAddr + 'geoserver/gwc/service/wmts/rest/ougp:world/EPSG:4326/EPSG:4326:{z}/{y}/{x}?format=image/png',
layer: 'ne:gmrt_20231018', layer: 'ne:gmrt_20231018',
style: 'default', style: 'default',
tileMatrixSetID: 'EPSG:4326', tileMatrixSetID: 'EPSG:4326',
@ -387,7 +404,7 @@ export default {
// 线 // 线
const coastline = new Cesium.WebMapTileServiceImageryProvider( const coastline = new Cesium.WebMapTileServiceImageryProvider(
{ {
url: 'http://124.222.8.13:9801/tiles/geoserver/gwc/service/wmts/rest/ougp:GSHHS_f_L1/EPSG:4326/EPSG:4326:{z}/{y}/{x}?format=image/png', url: this.CesiumHostAddr + 'geoserver/gwc/service/wmts/rest/ougp:GSHHS_f_L1/EPSG:4326/EPSG:4326:{z}/{y}/{x}?format=image/png',
layer: 'ne:GSHHS_f_L1', layer: 'ne:GSHHS_f_L1',
style: 'default', style: 'default',
tileMatrixSetID: 'EPSG:4326', tileMatrixSetID: 'EPSG:4326',
@ -399,7 +416,7 @@ export default {
// //
const shipline = new Cesium.WebMapTileServiceImageryProvider( const shipline = new Cesium.WebMapTileServiceImageryProvider(
{ {
url: 'http://124.222.8.13:9801/tiles/geoserver/gwc/service/wmts/rest/ougp:正射影像图_GM输出_20240516/EPSG:4326/EPSG:4326:{z}/{y}/{x}?format=image/png', url: this.CesiumHostAddr + 'geoserver/gwc/service/wmts/rest/ougp:正射影像图_GM输出_20240516/EPSG:4326/EPSG:4326:{z}/{y}/{x}?format=image/png',
layer: 'ne:No1ShipWreck_UP', layer: 'ne:No1ShipWreck_UP',
style: 'default', style: 'default',
tileMatrixSetID: 'EPSG:4326', tileMatrixSetID: 'EPSG:4326',