| | |
| | | <div class="popover-content"> |
| | | <div class="popover-content__header">项目信息</div> |
| | | <div class="popover-content__list"> |
| | | <el-input |
| | | v-if="item.children.length > 4" |
| | | size="mini" |
| | | placeholder="请输入内容" |
| | | v-model="searchName" |
| | | > |
| | | <el-button slot="append" icon="el-icon-search"></el-button> |
| | | </el-input> |
| | | <div |
| | | class="popover-content__list__item" |
| | | v-for="child in item.children" |
| | |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import PipeLine from "@/assets/json/pipeline.json" |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | yxImg: require("../../assets/img/Screen/yximg.png"), |
| | | currMenu: "项目展示", |
| | | currProject: "全球管网图", |
| | | searchName: "", |
| | | menuList: [ |
| | | { |
| | | menuName: "项目展示", |
| | |
| | | name: "山东官网新干线", |
| | | id: "sdxgx", |
| | | }, |
| | | { |
| | | name: "中俄东线管道工程", |
| | | id: "zedx", |
| | | }, |
| | | { |
| | | name: "西气东输三线中断管道工程", |
| | | id: "xqds", |
| | | }, |
| | | { |
| | | name: "中缅天然气管道工程", |
| | | id: "zmtrq", |
| | | }, |
| | | { |
| | | name: "山东官网新干线", |
| | | id: "sdxgx", |
| | | }, |
| | | ], |
| | | }, |
| | | ], |
| | |
| | | }, |
| | | handlePopoverClick(child) { |
| | | this.currProject = child.name |
| | | const currMenu = this.currMenu |
| | | switch (currMenu) { |
| | | case "工程巡视": |
| | | this.showPathLine() |
| | | break |
| | | |
| | | default: |
| | | break |
| | | } |
| | | }, |
| | | showPathLine(res) { |
| | | // 西气东输二线西段干线 |
| | | // console.log("PipeLine", PipeLine) |
| | | const features = PipeLine.features |
| | | // features.forEach(item => { |
| | | // const name = item.properties.pipename |
| | | // const rawArr = item.geometry.coordinates |
| | | // }) |
| | | const pipeline = features.find( |
| | | item => item.properties.pipename == "西气东输一线" |
| | | ) |
| | | const name = pipeline.properties.pipename |
| | | const rawArr = pipeline.geometry.coordinates[0] |
| | | const result = [] |
| | | rawArr.forEach(pos => { |
| | | pos.push(50) |
| | | result.push(...pos) |
| | | }) |
| | | // console.log("result", result); |
| | | // sgworld.Command.execute(2, 3, "", data => { |
| | | // data.showPoint = false |
| | | // data.showLine = true |
| | | // data.mode = 1 |
| | | // // 弹窗数据 |
| | | // window.PathAnimationData = { |
| | | // flyData: data, |
| | | // } |
| | | // window.PathAnimationData.winIndex = layer.open({ |
| | | // type: 2, |
| | | // title: "路径动画", |
| | | // shade: false, |
| | | // area: ["352px", "690px"], |
| | | // offset: "r", |
| | | // skin: "other-class", |
| | | // content: SmartEarthRootUrl + "Workers/path/Path.html", |
| | | // end: function () { |
| | | // PathAnimationData.fly && PathAnimationData.fly.exit() |
| | | // }, |
| | | // }) |
| | | // }) |
| | | window.sgworld.Creator.getFlyData(result, data => { |
| | | data.showPoint = false |
| | | data.showLine = true |
| | | data.mode = 1 |
| | | data.height = 2000 |
| | | |
| | | // 弹窗数据 |
| | | window.PathAnimationData = { |
| | | flyData: data, |
| | | } |
| | | window.PathAnimationData.winIndex = layer.open({ |
| | | type: 2, |
| | | title: "路径动画", |
| | | shade: false, |
| | | area: ["352px", "690px"], |
| | | offset: "r", |
| | | skin: "other-class", |
| | | content: SmartEarthRootUrl + "Workers/path/Path.html", |
| | | end: function () { |
| | | PathAnimationData.fly && PathAnimationData.fly.exit() |
| | | }, |
| | | }) |
| | | }) |
| | | }, |
| | | |
| | | //项目展示 |
| | |
| | | //打开或者加载图层 |
| | | |
| | | //开始飞行 |
| | | }, |
| | | filterNode(value, data) { |
| | | if (!value) return true |
| | | return children.name.indexOf(value) !== -1 |
| | | }, |
| | | }, |
| | | } |
| | |
| | | display: flex; |
| | | justify-content: center; |
| | | width: 163px; |
| | | height: 239px; |
| | | background: url(~@/assets/img/Screen/centerTooltip.png); |
| | | height: 218px; |
| | | background: url(~@/assets/img/Screen/centerTooltipBg.png); |
| | | background-size: 100% 100%; |
| | | border: none; |
| | | .popper__arrow { |
| | |
| | | justify-content: center; |
| | | align-items: center; |
| | | text-align: center; |
| | | width: 130px; |
| | | width: 100%; |
| | | height: 30px; |
| | | font-size: 18px; |
| | | color: #fff; |
| | |
| | | height: 8px; |
| | | } |
| | | } |
| | | .el-input { |
| | | width: 119px; |
| | | height: 21.5px; |
| | | background: rgba(0, 48, 111, 0.2); |
| | | border: 0.25px solid #2a80a9; |
| | | &__inner { |
| | | background: rgba(0, 48, 111, 0.2); |
| | | border-radius: inherit; |
| | | border: 0.25px solid #2a80a9; |
| | | } |
| | | .el-input-group__append { |
| | | width: 32px; |
| | | border: none; |
| | | border-radius: inherit; |
| | | height: 20px; |
| | | padding: 0; |
| | | text-align: center; |
| | | background: #3a93c7; |
| | | color: #fff; |
| | | } |
| | | } |
| | | &__list { |
| | | margin-top: 10px; |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: space-evenly; |
| | | height: 190px; |
| | | // justify-content: space-evenly; |
| | | align-items: center; |
| | | width: 145px; |
| | | height: 180px; |
| | | overflow-x: hidden; |
| | | |
| | | &__item { |
| | | margin-top: 10px; |
| | | color: #fff; |
| | | width: 130px; |
| | | height: 30px; |
| | |
| | | } |
| | | } |
| | | } |
| | | ::-webkit-scrollbar { |
| | | width: 2px; |
| | | height: 2px; |
| | | background: rgba(81, 205, 255, 0.9) 0%; |
| | | } |
| | | |
| | | ::-webkit-scrollbar-track { |
| | | background: rgba(76, 104, 135, 0.8); |
| | | } |
| | | |
| | | ::-webkit-scrollbar-thumb { |
| | | background: #409eff; |
| | | border-radius: 5px; |
| | | } |
| | | |
| | | ::-webkit-scrollbar-thumb:hover { |
| | | background: #409eff; |
| | | } |
| | | |
| | | ::-webkit-scrollbar-corner { |
| | | background: #409eff; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | methods: { |
| | | init3DMap() { |
| | | //地图初始化 |
| | | window.sgworld = new SmartEarth.SGWorld("Centermapdiv", { |
| | | licenseServer: window.sceneConfig.licenseServer, |
| | | }) |
| | | // window.sgworld = new SmartEarth.SGWorld("Centermapdiv", { |
| | | // licenseServer: window.sceneConfig.licenseServer, |
| | | // }) |
| | | window.sgworld = new SmartEarth.SGWorld( |
| | | "Centermapdiv", |
| | | SmartEarthRootUrl + "Workers/image/earth.jpg", |
| | | function () {} |
| | | ) |
| | | |
| | | window.viewer = window.Viewer = window.sgworld._Viewer |
| | | Viewer.imageryLayers._layers[0].show = false |
| | | //定位 |
| | | // Viewer.camera.flyTo({ |
| | | // destination: Cesium.Cartesian3.fromDegrees(110, 33, 25000000), |
| | | // }) |
| | | // Viewer.camera.flyTo({ |
| | | // destination: { |
| | | // x: -10834926.182758586, |
| | | // y: 50483318.61217012, |
| | | // z: 38375099.7193183, |
| | | // }, |
| | | // orientation: { |
| | | // heading: 6.283185307179578, |
| | | // roll: 0, |
| | | // pitch: -1.56436861046299, |
| | | // }, |
| | | // }) |
| | | //开启 tick61.2 |
| | | // Viewer.imageryLayers._layers[0].show = false |
| | | |
| | | // Cesium.Camera.DEFAULT_VIEW_RECTANGLE = { |
| | | // west: -3.141592653589793, |
| | | // south: -1.5707963267948966, |
| | | // east: 3.141592653589793, |
| | | // north: 1.5707963267948966, |
| | | // } |
| | | |
| | | viewer.clock.shouldAnimate = true |
| | | // viewer.clock.shouldAnimate = true |
| | | //每次旋转的弧度 越小越慢 |
| | | var angle = Cesium.Math.toRadians(Math.PI * 1) |
| | | // 旋转次数 用来控制停止 |
| | |
| | | } |
| | | // 利用时钟进行监听 |
| | | viewer.clock.onTick.addEventListener(onTickCallback) |
| | | // setTimeout(() => { |
| | | // Viewer.camera.flyTo({ |
| | | // destination: { |
| | | // x: -4022999.313498903, |
| | | // y: 19214082.70976515, |
| | | // z: 13043510.373621361, |
| | | // }, |
| | | // orientation: { |
| | | // heading: 6.283185307179577, |
| | | // roll: 0, |
| | | // pitch: -1.5643686104630592, |
| | | // }, |
| | | // }) |
| | | // }, 1000) |
| | | |
| | | // setTimeout(() => { |
| | | // Viewer.camera.flyTo({ |
| | | // destination: { |
| | | // x: -3919623.6069864673, |
| | | // y: 13752070.475126158, |
| | | // z: 8307291.863719194, |
| | | // }, |
| | | // orientation: { |
| | | // heading: 6.283185307179582, |
| | | // roll: 0, |
| | | // pitch: -1.5707039123519846, |
| | | // }, |
| | | // }) |
| | | // }, 1000) |
| | | |
| | | Viewer.imageryLayers.addImageryProvider( |
| | | new Cesium.UrlTemplateImageryProvider({ |
| | | url: gaoDeBaseUrl[0].url, |