|
@@ -1,6 +1,56 @@
|
|
|
<template>
|
|
|
<!-- 同屏对比弹窗 -->
|
|
|
- <el-dialog title="同屏对比" :visible.sync="dialogVisible" :before-close="handleClose"> 同屏对比组件
|
|
|
+ <el-dialog title="同屏对比" fullscreen :visible.sync="dialogVisible" :before-close="handleClose">
|
|
|
+ <template slot="title">
|
|
|
+ <div class="dialogTitle">
|
|
|
+ <div class="dialogTitleIcon"></div>
|
|
|
+ 同屏对比
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <!-- 同屏对比主题 -->
|
|
|
+ <div class="ssc_main">
|
|
|
+ <!-- 地图列表 -->
|
|
|
+ <div class="ssc_main_mapList">
|
|
|
+ <div
|
|
|
+ class="ssc_main_mapList_showList"
|
|
|
+ :id="'map' + index"
|
|
|
+ v-for="(mapIndex, index) in checkedCities"
|
|
|
+ :key="index"
|
|
|
+ :style="mapListBoxStyle()"
|
|
|
+ @mouseover="changeMouseIndex(index)"
|
|
|
+ >
|
|
|
+ <span>{{ mapList[mapIndex].mapName }}</span>
|
|
|
+ <Map
|
|
|
+ :mapUrl="mapList[mapIndex].mapUrl"
|
|
|
+ :index="index"
|
|
|
+ :mouseIndex="mouseIndex"
|
|
|
+ :centerZoom="centerZoom"
|
|
|
+ @changeCenterZoom="changeCenterZoom"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- 底图列表 -->
|
|
|
+ <div class="ssc_main_aimapList">
|
|
|
+ <span>地图底图(最多只能选择6个)</span>
|
|
|
+ <el-checkbox-group v-model="checkedCities" @change="handleCheckedCitiesChange">
|
|
|
+ <el-checkbox
|
|
|
+ class="mapCheckBox"
|
|
|
+ :disabled="checkedCities.length >= 6 && checkedCities.indexOf(index) == -1"
|
|
|
+ @click="
|
|
|
+ index => {
|
|
|
+ if (this.checkedCities.length >= 6 && this.checkedCities.indexOf(index) == -1) {
|
|
|
+ this.$message.info('最多只能选择6个地图底图哦!');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ "
|
|
|
+ v-for="(city, index) in mapList"
|
|
|
+ :label="index"
|
|
|
+ :key="index"
|
|
|
+ >{{ city.mapName }}</el-checkbox
|
|
|
+ >
|
|
|
+ </el-checkbox-group>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
<el-button @click="clearDialogVisible()">取 消</el-button>
|
|
|
<el-button type="primary" @click="subMitDialogVisible()">确 定</el-button>
|
|
@@ -14,13 +64,128 @@
|
|
|
* @author: LiuMengxiang
|
|
|
* @Date: 2022年11月21-25日
|
|
|
*/
|
|
|
+import Map from "../../map/Map.vue";
|
|
|
export default {
|
|
|
name: "SameScreenComparison",
|
|
|
- components: {},
|
|
|
+ components: { Map },
|
|
|
data() {
|
|
|
return {
|
|
|
// 同屏对比弹窗显示状态
|
|
|
- dialogVisible: false
|
|
|
+ dialogVisible: false,
|
|
|
+ checkedCities: [],
|
|
|
+ // 地图暂存显示变量
|
|
|
+ mouseIndex: -1,
|
|
|
+ center: [-40, 10.72521988],
|
|
|
+ zoom: 3,
|
|
|
+ minZoom: 3,
|
|
|
+ maxZoom: 5,
|
|
|
+ bound: [
|
|
|
+ [85, -85],
|
|
|
+ [-85, 85]
|
|
|
+ ],
|
|
|
+ centerZoom: {},
|
|
|
+ mapList: [
|
|
|
+ {
|
|
|
+ mapName: "2018年航空影像图(春季)",
|
|
|
+ mapUrl: "http://t0.tianditu.gov.cn/DataServer?T=img_w&X={x}&Y={y}&L={z}&tk=f331ba0b9ab96fb21c56d91de868935d",
|
|
|
+ active: false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ mapName: "2019年航空影像图(春季)",
|
|
|
+ mapUrl: "http://t0.tianditu.gov.cn/DataServer?T=img_w&X={x}&Y={y}&L={z}&tk=f331ba0b9ab96fb21c56d91de868935d",
|
|
|
+ active: false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ mapName: "2020年航空影像图(春季)",
|
|
|
+ mapUrl: "http://t0.tianditu.gov.cn/DataServer?T=img_w&X={x}&Y={y}&L={z}&tk=f331ba0b9ab96fb21c56d91de868935d",
|
|
|
+ active: false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ mapName: "2021年航空影像图(春季)",
|
|
|
+ mapUrl: "http://t0.tianditu.gov.cn/DataServer?T=img_w&X={x}&Y={y}&L={z}&tk=f331ba0b9ab96fb21c56d91de868935d",
|
|
|
+ active: false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ mapName: "2022年航空影像图(春季)",
|
|
|
+ mapUrl: "http://t0.tianditu.gov.cn/DataServer?T=img_w&X={x}&Y={y}&L={z}&tk=f331ba0b9ab96fb21c56d91de868935d",
|
|
|
+ active: false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ mapName: "2018年卫星影像图(春季)",
|
|
|
+ mapUrl: "http://t0.tianditu.gov.cn/DataServer?T=img_w&X={x}&Y={y}&L={z}&tk=f331ba0b9ab96fb21c56d91de868935d",
|
|
|
+ active: false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ mapName: "2019年卫星影像图(春季)",
|
|
|
+ mapUrl: "http://t0.tianditu.gov.cn/DataServer?T=img_w&X={x}&Y={y}&L={z}&tk=f331ba0b9ab96fb21c56d91de868935d",
|
|
|
+ active: false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ mapName: "2020年卫星影像图(春季)",
|
|
|
+ mapUrl: "http://t0.tianditu.gov.cn/DataServer?T=img_w&X={x}&Y={y}&L={z}&tk=f331ba0b9ab96fb21c56d91de868935d",
|
|
|
+ active: false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ mapName: "2021年卫星影像图(春季)",
|
|
|
+ mapUrl: "http://t0.tianditu.gov.cn/DataServer?T=img_w&X={x}&Y={y}&L={z}&tk=f331ba0b9ab96fb21c56d91de868935d",
|
|
|
+ active: false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ mapName: "2022年卫星影像图(春季)",
|
|
|
+ mapUrl: "http://t0.tianditu.gov.cn/DataServer?T=img_w&X={x}&Y={y}&L={z}&tk=f331ba0b9ab96fb21c56d91de868935d",
|
|
|
+ active: false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ mapName: "2018年航空影像图(秋季)",
|
|
|
+ mapUrl: "http://t0.tianditu.gov.cn/DataServer?T=img_w&X={x}&Y={y}&L={z}&tk=f331ba0b9ab96fb21c56d91de868935d",
|
|
|
+ active: false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ mapName: "2019年航空影像图(秋季)",
|
|
|
+ mapUrl: "http://t0.tianditu.gov.cn/DataServer?T=img_w&X={x}&Y={y}&L={z}&tk=f331ba0b9ab96fb21c56d91de868935d",
|
|
|
+ active: false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ mapName: "2020年航空影像图(秋季)",
|
|
|
+ mapUrl: "http://t0.tianditu.gov.cn/DataServer?T=img_w&X={x}&Y={y}&L={z}&tk=f331ba0b9ab96fb21c56d91de868935d",
|
|
|
+ active: false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ mapName: "2021年航空影像图(秋季)",
|
|
|
+ mapUrl: "http://t0.tianditu.gov.cn/DataServer?T=img_w&X={x}&Y={y}&L={z}&tk=f331ba0b9ab96fb21c56d91de868935d",
|
|
|
+ active: false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ mapName: "2022年航空影像图(秋季)",
|
|
|
+ mapUrl: "http://t0.tianditu.gov.cn/DataServer?T=img_w&X={x}&Y={y}&L={z}&tk=f331ba0b9ab96fb21c56d91de868935d",
|
|
|
+ active: false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ mapName: "2018年卫星影像图(秋季)",
|
|
|
+ mapUrl: "http://t0.tianditu.gov.cn/DataServer?T=img_w&X={x}&Y={y}&L={z}&tk=f331ba0b9ab96fb21c56d91de868935d",
|
|
|
+ active: false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ mapName: "2019年卫星影像图(秋季)",
|
|
|
+ mapUrl: "http://t0.tianditu.gov.cn/DataServer?T=img_w&X={x}&Y={y}&L={z}&tk=f331ba0b9ab96fb21c56d91de868935d",
|
|
|
+ active: false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ mapName: "2020年卫星影像图(秋季)",
|
|
|
+ mapUrl: "http://t0.tianditu.gov.cn/DataServer?T=img_w&X={x}&Y={y}&L={z}&tk=f331ba0b9ab96fb21c56d91de868935d",
|
|
|
+ active: false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ mapName: "2021年卫星影像图(秋季)",
|
|
|
+ mapUrl: "http://t0.tianditu.gov.cn/DataServer?T=img_w&X={x}&Y={y}&L={z}&tk=f331ba0b9ab96fb21c56d91de868935d",
|
|
|
+ active: false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ mapName: "2022年卫星影像图(秋季)",
|
|
|
+ mapUrl: "http://t0.tianditu.gov.cn/DataServer?T=img_w&X={x}&Y={y}&L={z}&tk=f331ba0b9ab96fb21c56d91de868935d",
|
|
|
+ active: false
|
|
|
+ }
|
|
|
+ ]
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
@@ -68,12 +233,95 @@ export default {
|
|
|
// 修改父级菜单变量(弹窗显示状态和显示底部菜单)
|
|
|
this.$emit("changeShowBottomMenusStatus", true);
|
|
|
},
|
|
|
- // 上传数据表单提交
|
|
|
- subMitDialogVisible(){
|
|
|
- this.$message.success('打开其他弹窗!');
|
|
|
+ // 同屏对比表单提交
|
|
|
+ subMitDialogVisible() {
|
|
|
+ this.$message.success("打开其他弹窗!");
|
|
|
this.clearDialogVisible();
|
|
|
+ },
|
|
|
+ // 修改
|
|
|
+ handleCheckedCitiesChange(e) {
|
|
|
+ // console.log("已选中的底图:", this.checkedCities, this.checkedCities.length);
|
|
|
+ },
|
|
|
+ // 根据地图列表,返回合适的样式
|
|
|
+ mapListBoxStyle() {
|
|
|
+ return "width:calc(33% - 2px);height:calc(50% - 2px);";
|
|
|
+ },
|
|
|
+ // 当其中一个地图移动或缩放时
|
|
|
+ changeCenterZoom(data) {
|
|
|
+ this.centerZoom = data;
|
|
|
+ },
|
|
|
+ // 暂存当前光标所在map组件的下标
|
|
|
+ changeMouseIndex(mouseIndex) {
|
|
|
+ this.mouseIndex = mouseIndex;
|
|
|
}
|
|
|
},
|
|
|
watch: {}
|
|
|
};
|
|
|
</script>
|
|
|
+<style lang="less" scoped>
|
|
|
+.ssc_main {
|
|
|
+ display: flex;
|
|
|
+ width: 100%;
|
|
|
+ height: calc(100vh - 190px);
|
|
|
+ &_mapList {
|
|
|
+ width: 60%;
|
|
|
+ height: 100%;
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ padding: 10px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ overflow-x: hidden;
|
|
|
+ overflow-y: auto;
|
|
|
+ scrollbar-width: none; /* Firefox */
|
|
|
+ -ms-overflow-style: none; /* IE 10+ */
|
|
|
+ &::-webkit-scrollbar {
|
|
|
+ display: none; /* Chrome Safari */
|
|
|
+ }
|
|
|
+ &_showList {
|
|
|
+ border: 1px solid #ccc;
|
|
|
+ text-align: right;
|
|
|
+ position: relative;
|
|
|
+ span {
|
|
|
+ position: absolute;
|
|
|
+ right: 10px;
|
|
|
+ top: 10px;
|
|
|
+ font-size: 22px;
|
|
|
+ font-weight: bold;
|
|
|
+ color: #fff;
|
|
|
+ z-index: 999;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ &_aimapList {
|
|
|
+ width: 40%;
|
|
|
+ height: 100%;
|
|
|
+ box-sizing: border-box;
|
|
|
+ overflow-x: hidden;
|
|
|
+ overflow-y: auto;
|
|
|
+ scrollbar-width: none; /* Firefox */
|
|
|
+ -ms-overflow-style: none; /* IE 10+ */
|
|
|
+ &::-webkit-scrollbar {
|
|
|
+ display: none; /* Chrome Safari */
|
|
|
+ }
|
|
|
+ .mapCheckBox:hover {
|
|
|
+ color: #ffffff;
|
|
|
+ background: #002645 !important;
|
|
|
+ }
|
|
|
+ .mapCheckBox[disabled] {
|
|
|
+ color: #666666;
|
|
|
+ cursor: not-allowed;
|
|
|
+ }
|
|
|
+ .mapCheckBox {
|
|
|
+ width: 100%;
|
|
|
+ padding: 10px 5px;
|
|
|
+ border-bottom: 1px solid;
|
|
|
+ color: #cccccc;
|
|
|
+ font-size: 18px;
|
|
|
+ background: #001e37 !important;
|
|
|
+ .el-checkbox__label {
|
|
|
+ font-size: 18px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|