| | |
| | | <!--时间线--> |
| | | <div> |
| | | <div class="current-select" @click="listFlag = !listFlag"> |
| | | <div class="title">2019-2M第一季度</div> |
| | | <div class="title">{{ currentTitle }}</div> |
| | | <i class="el-icon-caret-bottom"></i> |
| | | </div> |
| | | |
| | |
| | | |
| | | export default { |
| | | name: 'selectTime', |
| | | props: ['leftOrRight', 'type'], |
| | | props: ['leftOrRight', 'type', 'selectList'], |
| | | data () { |
| | | return { |
| | | selectList: [{ |
| | | title: '2012-2M第一季度' |
| | | }, { |
| | | title: '2013-2M第一季度' |
| | | }, { |
| | | title: '2014-2M第一季度' |
| | | }, { |
| | | title: '2015-2M第一季度' |
| | | }, { |
| | | title: '2016-2M第一季度' |
| | | }, { |
| | | title: '2017-2M第一季度' |
| | | }, { |
| | | title: '2018-2M第一季度' |
| | | }, { |
| | | title: '2019-2M第一季度' |
| | | }, { |
| | | title: '2020-2M第一季度' |
| | | }, { |
| | | title: '2021-2M第一季度' |
| | | }, { |
| | | title: '2022-2M第一季度' |
| | | }], |
| | | listFlag: false, |
| | | currentTitle: null, |
| | | currentIndex: null |
| | |
| | | |
| | | methods: { |
| | | init () { |
| | | if (this.leftOrRight == 'left') { |
| | | this.currentTitle = this.selectList[0].title |
| | | this.currentIndex = 0 |
| | | this.leftAddLayer(this.selectList[0]) |
| | | } else { |
| | | this.currentTitle = this.selectList[1].title |
| | | this.currentIndex = 1 |
| | | this.rightAddLayer(this.selectList[1]) |
| | | } |
| | | }, |
| | | |
| | | screenInit () { |
| | | this.currentTitle = this.selectList[0].title |
| | | this.currentIndex = 0 |
| | | |
| | | if (this.leftOrRight == 'left') { |
| | | this.leftAddLayer() |
| | | } else { |
| | | this.rightAddLayer() |
| | | if (this.type == 'viewerOne') { |
| | | this.removeLayers('splitScreenOneLayers') |
| | | this.addLayers('splitScreenOneLayers', this.selectList[0]) |
| | | } else if (this.type == 'viewerTwo') { |
| | | this.removeLayers('splitScreenTwoLayers') |
| | | this.addLayers('splitScreenTwoLayers', this.selectList[0]) |
| | | } else if (this.type == 'viewerThree') { |
| | | this.removeLayers('splitScreenThreeLayers') |
| | | this.addLayers('splitScreenThreeLayers', this.selectList[0]) |
| | | } else if (this.type == 'viewerFour') { |
| | | this.removeLayers('splitScreenFourLayers') |
| | | this.addLayers('splitScreenFourLayers', this.selectList[0]) |
| | | } |
| | | }, |
| | | |
| | |
| | | } |
| | | }, |
| | | |
| | | leftAddLayer () { |
| | | leftAddLayer (params) { |
| | | leftCurrentLayer = global.viewer.imageryLayers.addImageryProvider( |
| | | new global.DC.Namespace.Cesium.WebMapTileServiceImageryProvider({ |
| | | url: 'http://arcgis.jxpskj.com:6080/arcgis/rest/services/nanchengyjjddom/MapServer/WMTS', |
| | | // url: 'http://arcgis.jxpskj.com:6080/arcgis/rest/services/nanchengdom/MapServer/WMTS', |
| | | layer: 'nanchengyjjddom', |
| | | style: 'default', |
| | | tileMatrixSetID: 'default028mm', |
| | | format: 'image/png', |
| | | tilingScheme: new global.DC.Namespace.Cesium.GeographicTilingScheme(), |
| | | maximumLevel: 19, |
| | | tileMatrixLabels: [ |
| | | '0', |
| | | '1', |
| | | '2', |
| | | '3', |
| | | '4', |
| | | '5', |
| | | '6', |
| | | '7', |
| | | '8', |
| | | '9', |
| | | '10', |
| | | '11', |
| | | '12', |
| | | '13', |
| | | '14', |
| | | '15', |
| | | '16', |
| | | '17', |
| | | '18', |
| | | '19' |
| | | ] |
| | | url: params.url, |
| | | layer: params.layer, |
| | | style: params.style, |
| | | tileMatrixSetID: params.tileMatrixSetID, |
| | | format: params.format, |
| | | tilingScheme: params.tilingScheme, |
| | | maximumLevel: params.maximumLevel, |
| | | tileMatrixLabels: params.tileMatrixLabels |
| | | }), 10 |
| | | ) |
| | | }, |
| | | |
| | | rightAddLayer () { |
| | | rightAddLayer (params) { |
| | | rightCurrentLayer = global.viewer.mapSplit.addBaseLayer( |
| | | new global.DC.Namespace.Cesium.WebMapTileServiceImageryProvider({ |
| | | url: 'http://arcgis.jxpskj.com:6080/arcgis/rest/services/nanchengdom/MapServer/WMTS', |
| | | // url: 'http://arcgis.jxpskj.com:6080/arcgis/rest/services/nanchengdom/MapServer/WMTS', |
| | | layer: 'nanchengdom', |
| | | style: 'default', |
| | | tileMatrixSetID: 'default028mm', |
| | | format: 'image/png', |
| | | tilingScheme: new global.DC.Namespace.Cesium.GeographicTilingScheme(), |
| | | maximumLevel: 19, |
| | | tileMatrixLabels: [ |
| | | '0', |
| | | '1', |
| | | '2', |
| | | '3', |
| | | '4', |
| | | '5', |
| | | '6', |
| | | '7', |
| | | '8', |
| | | '9', |
| | | '10', |
| | | '11', |
| | | '12', |
| | | '13', |
| | | '14', |
| | | '15', |
| | | '16', |
| | | '17', |
| | | '18', |
| | | '19' |
| | | ] |
| | | url: params.url, |
| | | layer: params.layer, |
| | | style: params.style, |
| | | tileMatrixSetID: params.tileMatrixSetID, |
| | | format: params.format, |
| | | tilingScheme: params.tilingScheme, |
| | | maximumLevel: params.maximumLevel, |
| | | tileMatrixLabels: params.tileMatrixLabels |
| | | }), 21 |
| | | ) |
| | | }, |
| | |
| | | } |
| | | }, |
| | | |
| | | addLayers (variable) { |
| | | addLayers (variable, params) { |
| | | window[variable] = window[this.type].imageryLayers.addImageryProvider( |
| | | new global.DC.Namespace.Cesium.WebMapTileServiceImageryProvider({ |
| | | url: 'http://arcgis.jxpskj.com:6080/arcgis/rest/services/nanchengdom/MapServer/WMTS', |
| | | // url: 'http://arcgis.jxpskj.com:6080/arcgis/rest/services/nanchengdom/MapServer/WMTS', |
| | | layer: 'nanchengdom', |
| | | style: 'default', |
| | | tileMatrixSetID: 'default028mm', |
| | | format: 'image/png', |
| | | tilingScheme: new global.DC.Namespace.Cesium.GeographicTilingScheme(), |
| | | maximumLevel: 19, |
| | | tileMatrixLabels: [ |
| | | '0', |
| | | '1', |
| | | '2', |
| | | '3', |
| | | '4', |
| | | '5', |
| | | '6', |
| | | '7', |
| | | '8', |
| | | '9', |
| | | '10', |
| | | '11', |
| | | '12', |
| | | '13', |
| | | '14', |
| | | '15', |
| | | '16', |
| | | '17', |
| | | '18', |
| | | '19' |
| | | ] |
| | | url: params.url, |
| | | layer: params.layer, |
| | | style: params.style, |
| | | tileMatrixSetID: params.tileMatrixSetID, |
| | | format: params.format, |
| | | tilingScheme: params.tilingScheme, |
| | | maximumLevel: params.maximumLevel, |
| | | tileMatrixLabels: params.tileMatrixLabels |
| | | }), 10 |
| | | ) |
| | | }, |
| | |
| | | } |
| | | |
| | | if (this.leftOrRight) { |
| | | this.currentTitle = item.title |
| | | this.currentIndex = index |
| | | |
| | | if (this.leftOrRight == 'left') { |
| | | this.removeLeftAddLayer() |
| | | this.leftAddLayer() |
| | | this.leftAddLayer(item) |
| | | } else { |
| | | this.removeRightAddLayer() |
| | | this.rightAddLayer() |
| | | this.rightAddLayer(item) |
| | | } |
| | | |
| | | this.listFlag = false |
| | | } else { |
| | | this.currentTitle = item.title |
| | | this.currentIndex = index |
| | | |
| | | if (this.type == 'viewerOne') { |
| | | this.removeLayers('splitScreenOneLayers') |
| | | this.addLayers('splitScreenOneLayers') |
| | | this.addLayers('splitScreenOneLayers', item) |
| | | } else if (this.type == 'viewerTwo') { |
| | | this.removeLayers('splitScreenTwoLayers') |
| | | this.addLayers('splitScreenTwoLayers') |
| | | this.addLayers('splitScreenTwoLayers', item) |
| | | } else if (this.type == 'viewerThree') { |
| | | this.removeLayers('splitScreenThreeLayers') |
| | | this.addLayers('splitScreenThreeLayers') |
| | | this.addLayers('splitScreenThreeLayers', item) |
| | | } else if (this.type == 'viewerFour') { |
| | | this.removeLayers('splitScreenFourLayers') |
| | | this.addLayers('splitScreenFourLayers') |
| | | this.addLayers('splitScreenFourLayers', item) |
| | | } |
| | | |
| | | this.listFlag = false |
| | |
| | | }, |
| | | |
| | | destroyed () { |
| | | if (this.type) { |
| | | if (this.type == 'viewerOne') { |
| | | this.removeLayers('splitScreenOneLayers') |
| | | this.addLayers('splitScreenOneLayers') |
| | | } else if (this.type == 'viewerTwo') { |
| | | this.removeLayers('splitScreenTwoLayers') |
| | | this.addLayers('splitScreenTwoLayers') |
| | | } else if (this.type == 'viewerThree') { |
| | | this.removeLayers('splitScreenThreeLayers') |
| | | this.addLayers('splitScreenThreeLayers') |
| | | } else if (this.type == 'viewerFour') { |
| | | this.removeLayers('splitScreenFourLayers') |
| | | this.addLayers('splitScreenFourLayers') |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | </script> |
| | |
| | | |
| | | li { |
| | | line-height: 30px; |
| | | text-align: center; |
| | | cursor: pointer; |
| | | } |
| | | } |
| | | </style> |