Merge branch 'master' of http://xearth.cn:6600/r/wuyushui/SewerAndRainNetwork
Conflicts:
src/components/panel/ToolBoxPanel.vue
| | |
| | | overflow: hidden; |
| | | } |
| | | body .el-scrollbar__wrap { |
| | | overflow-x: hidden; |
| | | // overflow-x: hidden; |
| | | } |
| | | body{ |
| | | -ms-overflow-style: none; |
| | |
| | | <template> |
| | | <div class="float-panel"> |
| | | <div class="title-text-border" @click="switchPanel"> |
| | | <div class="title-icon"></div> |
| | | <div class="title-text">图层控制</div> |
| | | </div> |
| | | <transition name="el-fade-in-linear"> |
| | | <div class="body-box" id="panelContent" :style="{ width:width }"> |
| | | <div v-show="isShow"> |
| | | <slot></slot> |
| | | </div> |
| | | <div :class='["iconBtn",layerControllerVisible ? "active" : ""]' @click="showPanel"><span><img src="@assets/images/map-pages/icon/layer.png" alt="" width="26px" style="display: block;margin: auto"><span class="icon-name">图层</span></span></div> |
| | | <transition name="fade"> |
| | | <div :class="'legend-content map-background'" style="position: absolute;left: 50px;top: 0" v-show="layerControllerVisible"> |
| | | <lc-service-layer></lc-service-layer> |
| | | </div> |
| | | </transition> |
| | | </div> |
| | |
| | | import presets from './layerControllerPresets' |
| | | |
| | | import iconSetting from '@/assets/images/map-pages/icon/setting.png' |
| | | import LcServiceLayer from './modules/LcServiceLayer' |
| | | |
| | | export default { |
| | | name: 'LayerController', |
| | | components: {}, |
| | | components: { LcServiceLayer }, |
| | | props: { |
| | | preset: { |
| | | type: String, |
| | |
| | | }, |
| | | layerHelper () { |
| | | return this.$store.state.map.layerHelper |
| | | }, |
| | | layerControllerVisible () { |
| | | return this.$store.state.map.layerControllerVisible |
| | | } |
| | | }, |
| | | data () { |
| | |
| | | icons: { |
| | | setting: iconSetting |
| | | }, |
| | | layerControllerVisible: false, |
| | | panelSwitch: { |
| | | main: true // 主窗口 |
| | | } |
| | |
| | | }) |
| | | }, |
| | | methods: { |
| | | showPanel () { |
| | | this.layerControllerVisible = !this.layerControllerVisible |
| | | }, |
| | | init () { |
| | | this.initPreset() |
| | | }, |
| | |
| | | </script> |
| | | |
| | | <style lang="less"> |
| | | |
| | | .float-panel { |
| | | position: absolute; |
| | | left: 2px; |
| | | top: 120px; |
| | | height: auto; |
| | | font-size: 11px; |
| | | z-index: 1000; |
| | | |
| | | div { |
| | | color: #90c8e0; |
| | | color: #00fff6; |
| | | } |
| | | |
| | | .iconBtn { |
| | | width:45px; |
| | | text-align: center; |
| | | background: rgba(0, 16, 30, 0.5); |
| | | cursor: pointer; |
| | | color: #00fff6; |
| | | border: 0.00521rem solid #00fff6; |
| | | box-shadow: 0 0 0.03rem #00fff6; |
| | | } |
| | | .active { |
| | | border: 0.00521rem solid #fff700; |
| | | box-shadow: 0 0 0.03rem #fff700; |
| | | } |
| | | .title-border { |
| | | width: 100%; |
| | | height: 28px; |
| | |
| | | margin-left: 30px; |
| | | height: auto; |
| | | } |
| | | |
| | | .switch-head-up { |
| | | width: 22px; |
| | | height: 16px; |
| | | float: right; |
| | | margin-top: 10px; |
| | | margin-right: 10px; |
| | | cursor: pointer; |
| | | background-image: url(../../assets/images/map-pages/icon/xljt1.png); |
| | | transform: rotateX(0deg); |
| | | transform-origin: 50% 50%; |
| | | transition: transform 0.5s linear 0s; |
| | | } |
| | | |
| | | .switch-head-down { |
| | | transform: rotateX(180deg); |
| | | transform-origin: 50% 50%; |
| | |
| | | color: #569EB7; |
| | | padding: 0 16px; |
| | | } |
| | | |
| | | .horn { |
| | | width: 6px; |
| | | height: 6px; |
| | | float: left; |
| | | position: absolute; |
| | | } |
| | | |
| | | .horn-tl { |
| | | background-image: url(../../assets/images/map-pages/cosmetics/horn_tl.png); |
| | | left: -1px; |
| | | top: -1px; |
| | | } |
| | | |
| | | .horn-tr { |
| | | background-image: url(../../assets/images/map-pages/cosmetics/horn_tr.png); |
| | | right: -1px; |
| | | top: -1px; |
| | | } |
| | | |
| | | .horn-bl { |
| | | background-image: url(../../assets/images/map-pages/cosmetics/horn_bl.png); |
| | | left: -1px; |
| | | bottom: -1px; |
| | | } |
| | | |
| | | .horn-br { |
| | | background-image: url(../../assets/images/map-pages/cosmetics/horn_br.png); |
| | | right: -1px; |
| | | bottom: -1px; |
| | | } |
| | | |
| | | ::-webkit-scrollbar { |
| | | width: 7px; |
| | | height: 5px !important; |
New file |
| | |
| | | <template> |
| | | <div class="float-panel"> |
| | | <div class="title-text-border" @click="switchPanel"> |
| | | <div class="title-icon"></div> |
| | | <div class="title-text">图层控制</div> |
| | | </div> |
| | | <transition name="el-fade-in-linear"> |
| | | <div class="body-box" id="panelContent" :style="{ width:width }"> |
| | | <div v-show="isShow"> |
| | | <slot></slot> |
| | | </div> |
| | | </div> |
| | | </transition> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import '@assets/css/map/magic.min.css' |
| | | import presets from './layerControllerPresets' |
| | | |
| | | import iconSetting from '@/assets/images/map-pages/icon/setting.png' |
| | | |
| | | export default { |
| | | name: 'LayerController', |
| | | components: {}, |
| | | props: { |
| | | preset: { |
| | | type: String, |
| | | default: 'default' |
| | | } |
| | | }, |
| | | computed: { |
| | | map () { |
| | | return this.$store.state.map.map |
| | | }, |
| | | L () { |
| | | return this.$store.state.map.L |
| | | }, |
| | | layerHelper () { |
| | | return this.$store.state.map.layerHelper |
| | | }, |
| | | layerControllerVisible () { |
| | | return this.$store.state.map.layerControllerVisible |
| | | } |
| | | }, |
| | | data () { |
| | | return { |
| | | width: '250px', |
| | | isShow: true, |
| | | icons: { |
| | | setting: iconSetting |
| | | }, |
| | | panelSwitch: { |
| | | main: true // 主窗口 |
| | | } |
| | | } |
| | | }, |
| | | mounted () { |
| | | this.$nextTick(function () { |
| | | this.init() |
| | | }) |
| | | }, |
| | | methods: { |
| | | init () { |
| | | this.initPreset() |
| | | }, |
| | | initPreset () { |
| | | if (this.preset !== 'default') { |
| | | const prmPreset = presets[this.preset] |
| | | Object.assign(this.layerControllerVisible, prmPreset) // 防止预设参数与默认参数不一致导致报错,如果没有按照您的配置发生改变,请检查拼写是否正确 |
| | | if (prmPreset === 'undefined') { |
| | | console.log('该图层控制面板的预设没有找到,请检查预设名称是否正确!') |
| | | } else { |
| | | this.$store.commit('updateLayerControllerVisible', this.layerControllerVisible) |
| | | } |
| | | } |
| | | }, |
| | | switchPanel () { |
| | | this.panelSwitch.main = !this.panelSwitch.main |
| | | if (this.panelSwitch.main) { |
| | | this.width = '250px' |
| | | this.isShow = true |
| | | } else { |
| | | this.width = '0px' |
| | | this.isShow = false |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="less"> |
| | | |
| | | .float-panel { |
| | | position: absolute; |
| | | top: 120px; |
| | | height: auto; |
| | | font-size: 11px; |
| | | z-index: 1000; |
| | | |
| | | div { |
| | | color: #90c8e0; |
| | | } |
| | | |
| | | .title-border { |
| | | width: 100%; |
| | | height: 28px; |
| | | background: #10488c; |
| | | -webkit-clip-path: polygon(0px 0px, 0px 28px, 230px 28px, 230px 9px, 95px 9px, 86px 0px); |
| | | clip-path: polygon(0px 0px, 0px 28px, 230px 28px, 230px 9px, 95px 9px, 86px 0px); |
| | | position: relative; |
| | | } |
| | | |
| | | .title-border:before { |
| | | content: ""; |
| | | display: block; |
| | | position: absolute; |
| | | width: 6px; |
| | | height: 6px; |
| | | top: 0; |
| | | left: 0; |
| | | background-color: #38c8ef; |
| | | } |
| | | |
| | | .title-border:after { |
| | | content: ""; |
| | | display: block; |
| | | position: absolute; |
| | | width: 6px; |
| | | height: 6px; |
| | | top: 9px; |
| | | right: 0; |
| | | background-color: #38c8ef; |
| | | -webkit-clip-path: polygon(0px 0px, 0px 1px, 5px 1px, 5px 6px, 6px 6px, 6px 0px); |
| | | clip-path: polygon(0px 0px, 0px 1px, 5px 1px, 5px 6px, 6px 6px, 6px 0px); |
| | | } |
| | | |
| | | .title-text-border { |
| | | width: 30px; |
| | | height: 120px; |
| | | float: left; |
| | | background: #091331; |
| | | // -webkit-clip-path: polygon(1px 1px, 1px 27px, 229px 27px, 229px 10px, 94px 10px, 85px 1px); |
| | | // clip-path: polygon(1px 1px, 1px 27px, 229px 27px, 229px 10px, 94px 10px, 85px 1px); |
| | | } |
| | | |
| | | .title-icon { |
| | | float: left; |
| | | width: 22px; |
| | | height: 22px; |
| | | margin-top: 4px; |
| | | margin-left: 2px; |
| | | background-image: url(../../assets/images/map-pages/icon/setting.png); |
| | | } |
| | | |
| | | .title-text { |
| | | width: 25px; |
| | | color: #00d0f9; |
| | | font-weight: bold; |
| | | margin-top: 6px; |
| | | text-align: center; |
| | | font-size: 14px; |
| | | filter: brightness(100%); |
| | | text-shadow: 0 0 5px #00d0f9, 0 0 0 #00d0f9, 0 0 0 #00d0f9, 0 0 0 #0258c5, 0 0 0 #0258c5, 0 0 2px #0258c5, 0 0 5px #0258c5, 0 0 15px #0258c5; |
| | | } |
| | | |
| | | .title-line { |
| | | display: inline-block; |
| | | width: 120px; |
| | | height: 1px; |
| | | // margin-top: 14px; |
| | | margin-left: 4px; |
| | | background-color: #04527f; |
| | | line-height: 5px; |
| | | vertical-align: middle; |
| | | } |
| | | |
| | | .title-point { |
| | | display: inline-block; |
| | | width: 5px; |
| | | height: 5px; |
| | | // margin-top: 12px; |
| | | background-color: #04527f; |
| | | line-height: 5px; |
| | | vertical-align: middle; |
| | | } |
| | | |
| | | .title-button { |
| | | float: right; |
| | | width: 28px; |
| | | height: 28px; |
| | | cursor: pointer; |
| | | |
| | | :hover { |
| | | font-weight: bold; |
| | | color: white; |
| | | } |
| | | } |
| | | |
| | | .body-box { |
| | | background-color: rgba(44, 62, 80, 0.6); |
| | | border: 1px solid #10488c; |
| | | margin-top: -1px; |
| | | margin-left: 30px; |
| | | height: auto; |
| | | } |
| | | |
| | | .switch-head-up { |
| | | width: 22px; |
| | | height: 16px; |
| | | float: right; |
| | | margin-top: 10px; |
| | | margin-right: 10px; |
| | | cursor: pointer; |
| | | background-image: url(../../assets/images/map-pages/icon/xljt1.png); |
| | | transform: rotateX(0deg); |
| | | transform-origin: 50% 50%; |
| | | transition: transform 0.5s linear 0s; |
| | | } |
| | | |
| | | .switch-head-down { |
| | | transform: rotateX(180deg); |
| | | transform-origin: 50% 50%; |
| | | transition: transform 0.5s linear 0s; |
| | | } |
| | | |
| | | select { |
| | | background: transparent; |
| | | margin: 6px; |
| | | border: .5px solid #569EB7; |
| | | width: 150px; |
| | | color: #569EB7; |
| | | padding: 0 16px; |
| | | } |
| | | |
| | | .horn { |
| | | width: 6px; |
| | | height: 6px; |
| | | float: left; |
| | | position: absolute; |
| | | } |
| | | |
| | | .horn-tl { |
| | | background-image: url(../../assets/images/map-pages/cosmetics/horn_tl.png); |
| | | left: -1px; |
| | | top: -1px; |
| | | } |
| | | |
| | | .horn-tr { |
| | | background-image: url(../../assets/images/map-pages/cosmetics/horn_tr.png); |
| | | right: -1px; |
| | | top: -1px; |
| | | } |
| | | |
| | | .horn-bl { |
| | | background-image: url(../../assets/images/map-pages/cosmetics/horn_bl.png); |
| | | left: -1px; |
| | | bottom: -1px; |
| | | } |
| | | |
| | | .horn-br { |
| | | background-image: url(../../assets/images/map-pages/cosmetics/horn_br.png); |
| | | right: -1px; |
| | | bottom: -1px; |
| | | } |
| | | |
| | | ::-webkit-scrollbar { |
| | | width: 7px; |
| | | height: 5px !important; |
| | | } |
| | | |
| | | ::-webkit-scrollbar-thumb { |
| | | /*滚动条里面小方块*/ |
| | | border-radius: 10px; |
| | | box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2); |
| | | background: #0661AE; |
| | | border: 1px solid transparent; |
| | | } |
| | | |
| | | ::-webkit-scrollbar-track { |
| | | /*滚动条里面轨道*/ |
| | | // box-shadow : inset 0 0 5px rgba(0, 0, 0, 0.2); |
| | | border-radius: 0px; |
| | | background: #0E3565; |
| | | } |
| | | } |
| | | |
| | | </style> |
| | |
| | | <template> |
| | | <div class="inner-panel"> |
| | | <div class="title"> |
| | | 图层控制 |
| | | </div> |
| | | <div class="wms-panel"> |
| | | <div v-for="item in serviceLayers" :key="item.code" class="layerbox"> |
| | | <div><input type="checkbox" :name="'wmsLayer_'+item.code" :checked="item.checked" :value="item.code" |
| | |
| | | |
| | | <style scoped lang="less"> |
| | | .inner-panel { |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | |
| | | .title{ |
| | | color: #ffffff; |
| | | font-size: 16px; |
| | | font-weight: 600; |
| | | margin: 10px; |
| | | text-align: center; |
| | | } |
| | | .btn-filter { |
| | | cursor: pointer; |
| | | color: #ffffff; |
| | |
| | | |
| | | .wms-panel { |
| | | width: 250px; |
| | | display: flex; |
| | | flex-flow: column; |
| | | |
| | | .layerbox { |
| | | width: 100%; |
| | | display: flex; |
| | | flex-flow: column; |
| | | |
| | | .layerbox-item { |
| | | display: flex; |
New file |
| | |
| | | <template> |
| | | <div class="float-panel"> |
| | | <div :class='["btn",active ? "active" : ""]' @click="onClick"> |
| | | <span> |
| | | <img :src="src" alt="" width="26px" style="display: block;margin: auto"> |
| | | <span class="icon-name">{{label}}</span> |
| | | </span> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import '@assets/css/map/magic.min.css' |
| | | |
| | | import iconSetting from '@/assets/images/map-pages/icon/setting.png' |
| | | |
| | | export default { |
| | | name: 'LayerController', |
| | | props: { |
| | | src: String, |
| | | label: String, |
| | | active: Object, |
| | | onClick: Function |
| | | }, |
| | | computed: { |
| | | map () { |
| | | return this.$store.state.map.map |
| | | }, |
| | | L () { |
| | | return this.$store.state.map.L |
| | | }, |
| | | layerHelper () { |
| | | return this.$store.state.map.layerHelper |
| | | } |
| | | }, |
| | | data () { |
| | | return { |
| | | width: '250px', |
| | | isShow: true, |
| | | icons: { |
| | | setting: iconSetting |
| | | }, |
| | | layerControllerVisible: false, |
| | | panelSwitch: { |
| | | main: true // 主窗口 |
| | | } |
| | | } |
| | | }, |
| | | mounted () { |
| | | this.$nextTick(function () { |
| | | this.init() |
| | | }) |
| | | }, |
| | | methods: { |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="less"> |
| | | .float-panel { |
| | | position: absolute; |
| | | left: 2px; |
| | | top: 120px; |
| | | height: auto; |
| | | font-size: 11px; |
| | | z-index: 1000; |
| | | |
| | | div { |
| | | color: #00fff6; |
| | | } |
| | | .btn { |
| | | width:45px; |
| | | text-align: center; |
| | | background: rgba(0, 16, 30, 0.5); |
| | | cursor: pointer; |
| | | color: #00fff6; |
| | | border: 0.00521rem solid #00fff6; |
| | | box-shadow: 0 0 0.03rem #00fff6; |
| | | } |
| | | .active { |
| | | border: 0.00521rem solid #fff700; |
| | | box-shadow: 0 0 0.03rem #fff700; |
| | | } |
| | | .title-border { |
| | | width: 100%; |
| | | height: 28px; |
| | | background: #10488c; |
| | | -webkit-clip-path: polygon(0px 0px, 0px 28px, 230px 28px, 230px 9px, 95px 9px, 86px 0px); |
| | | clip-path: polygon(0px 0px, 0px 28px, 230px 28px, 230px 9px, 95px 9px, 86px 0px); |
| | | position: relative; |
| | | } |
| | | |
| | | .title-border:before { |
| | | content: ""; |
| | | display: block; |
| | | position: absolute; |
| | | width: 6px; |
| | | height: 6px; |
| | | top: 0; |
| | | left: 0; |
| | | background-color: #38c8ef; |
| | | } |
| | | |
| | | .title-border:after { |
| | | content: ""; |
| | | display: block; |
| | | position: absolute; |
| | | width: 6px; |
| | | height: 6px; |
| | | top: 9px; |
| | | right: 0; |
| | | background-color: #38c8ef; |
| | | -webkit-clip-path: polygon(0px 0px, 0px 1px, 5px 1px, 5px 6px, 6px 6px, 6px 0px); |
| | | clip-path: polygon(0px 0px, 0px 1px, 5px 1px, 5px 6px, 6px 6px, 6px 0px); |
| | | } |
| | | |
| | | .title-text-border { |
| | | width: 30px; |
| | | height: 120px; |
| | | float: left; |
| | | background: #091331; |
| | | // -webkit-clip-path: polygon(1px 1px, 1px 27px, 229px 27px, 229px 10px, 94px 10px, 85px 1px); |
| | | // clip-path: polygon(1px 1px, 1px 27px, 229px 27px, 229px 10px, 94px 10px, 85px 1px); |
| | | } |
| | | |
| | | .title-icon { |
| | | float: left; |
| | | width: 22px; |
| | | height: 22px; |
| | | margin-top: 4px; |
| | | margin-left: 2px; |
| | | background-image: url(../../assets/images/map-pages/icon/setting.png); |
| | | } |
| | | |
| | | .title-text { |
| | | width: 25px; |
| | | color: #00d0f9; |
| | | font-weight: bold; |
| | | margin-top: 6px; |
| | | text-align: center; |
| | | font-size: 14px; |
| | | filter: brightness(100%); |
| | | text-shadow: 0 0 5px #00d0f9, 0 0 0 #00d0f9, 0 0 0 #00d0f9, 0 0 0 #0258c5, 0 0 0 #0258c5, 0 0 2px #0258c5, 0 0 5px #0258c5, 0 0 15px #0258c5; |
| | | } |
| | | |
| | | .title-line { |
| | | display: inline-block; |
| | | width: 120px; |
| | | height: 1px; |
| | | // margin-top: 14px; |
| | | margin-left: 4px; |
| | | background-color: #04527f; |
| | | line-height: 5px; |
| | | vertical-align: middle; |
| | | } |
| | | |
| | | .title-point { |
| | | display: inline-block; |
| | | width: 5px; |
| | | height: 5px; |
| | | // margin-top: 12px; |
| | | background-color: #04527f; |
| | | line-height: 5px; |
| | | vertical-align: middle; |
| | | } |
| | | |
| | | .title-button { |
| | | float: right; |
| | | width: 28px; |
| | | height: 28px; |
| | | cursor: pointer; |
| | | |
| | | :hover { |
| | | font-weight: bold; |
| | | color: white; |
| | | } |
| | | } |
| | | |
| | | .body-box { |
| | | background-color: rgba(44, 62, 80, 0.6); |
| | | border: 1px solid #10488c; |
| | | margin-top: -1px; |
| | | margin-left: 30px; |
| | | height: auto; |
| | | } |
| | | .switch-head-down { |
| | | transform: rotateX(180deg); |
| | | transform-origin: 50% 50%; |
| | | transition: transform 0.5s linear 0s; |
| | | } |
| | | |
| | | select { |
| | | background: transparent; |
| | | margin: 6px; |
| | | border: .5px solid #569EB7; |
| | | width: 150px; |
| | | color: #569EB7; |
| | | padding: 0 16px; |
| | | } |
| | | ::-webkit-scrollbar { |
| | | width: 7px; |
| | | height: 5px !important; |
| | | } |
| | | |
| | | ::-webkit-scrollbar-thumb { |
| | | /*滚动条里面小方块*/ |
| | | border-radius: 10px; |
| | | box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2); |
| | | background: #0661AE; |
| | | border: 1px solid transparent; |
| | | } |
| | | |
| | | ::-webkit-scrollbar-track { |
| | | /*滚动条里面轨道*/ |
| | | // box-shadow : inset 0 0 5px rgba(0, 0, 0, 0.2); |
| | | border-radius: 0px; |
| | | background: #0E3565; |
| | | } |
| | | } |
| | | |
| | | </style> |
| | |
| | | <img src="@assets/images/map-pages/icon/toolbox/tool.png" alt=""> |
| | | <span>工具</span> |
| | | </el-button> |
| | | <transition name="animationChange"> |
| | | <el-row v-show="selectGroup" class="specific-tools-group"> |
| | | <el-popover |
| | | placement="bottom" |
| | | width="" |
| | | trigger="click" |
| | | :popper-class="'tools-panel-content'" |
| | | v-for="(item,index) in menuList" :key="index" |
| | | > |
| | | <el-button slot="reference" class="el-button" :class="active === index ? 'tools-panel-choose':''" |
| | | @click="changeChoose(index)"> |
| | | <img :src="item.icon" alt=""/> |
| | | <span>{{ item.label }}</span> |
| | | </el-button> |
| | | <el-button v-for="(itemT,indexT) in item.items" :key="indexT" @click="choiceItem(itemT,indexT)"> |
| | | <img :src="itemT.icon" :title="itemT.title"/> |
| | | </el-button> |
| | | </el-popover> |
| | | <el-button @click="changeSelect" class="special-button"> |
| | | <i :class="selectGroup === false ? 'el-icon-d-arrow-left':'el-icon-d-arrow-left'"></i> |
| | | <el-row v-show="selectGroup" class="specific-tools-group"> |
| | | <el-popover |
| | | placement="bottom" |
| | | width="100%" |
| | | trigger="click" |
| | | :popper-class="'tools-panel-content'" |
| | | v-for="(item,index) in menuList" :key="index" |
| | | > |
| | | <el-button slot="reference" class="el-button" :class="active === index ? 'tools-panel-choose':''" |
| | | @click="changeChoose(index)"> |
| | | <img :src="item.icon" alt=""/> |
| | | <span>{{ item.label }}</span> |
| | | </el-button> |
| | | </el-row> |
| | | </transition> |
| | | <el-button v-for="(itemT,indexT) in item.items" :key="indexT" @click="choiceItem(itemT)" v-show="item.index!=='2'"> |
| | | <img :src="itemT.icon" :title="itemT.title" v-show="item.index!=='2'"/> |
| | | </el-button> |
| | | <div class="base-map-inner-panel" v-show="!isShow&&item.index==='2'"> |
| | | <div v-for="item in basemapList" :key="item.code" class="basemap-layer-item"> |
| | | <img class="base-map-img" width="50" height="50" :src="item.conf.icon_actived" :title="item.name" |
| | | @click="changeBasemap(item)"/> |
| | | <el-checkbox class="base-map-anno" name="basemap" v-model="item.conf.annotationCheck" |
| | | label="标注" @change="changeBasemap(item)"> |
| | | </el-checkbox> |
| | | </div> |
| | | </div> |
| | | </el-popover> |
| | | <el-button @click="changeSelect" class="special-button"> |
| | | <i :class="selectGroup === false ? 'el-icon-d-arrow-right':'el-icon-d-arrow-left'"></i> |
| | | </el-button> |
| | | </el-row> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | // 功能导航 |
| | | import plot from '@assets/images/map-pages/icon/toolbox/biaohui.png' |
| | | import polygon from '@assets/images/map-pages/icon/toolbox/celiang1.png' |
| | | import location from '@assets/images/map-pages/icon/toolbox/ditu.png' |
| | | import fullscreen from '@assets/images/map-pages/icon/toolbox/xiazai.png' |
| | | |
| | | // 标绘的可选择数据 |
| | | import iconRefinery from '@assets/images/map-pages/local.png' |
| | | |
| | | import marker from '@assets/images/map-pages/icon/toolbox/map.png' |
| | | import line from '@assets/images/map-pages/icon/toolbox/line.png' |
| | | import polygonJ from '@assets/images/map-pages/icon/toolbox/polygon.png' |
| | |
| | | import del from '@assets/images/map-pages/icon/toolbox/del.png' |
| | | |
| | | // 选中的内容图片 |
| | | import markerChoose from '@assets/images/map-pages/icon/toolbox/biaohuimark/dingweimark.png' |
| | | import lineChoose from '@assets/images/map-pages/icon/toolbox/biaohuimark/linemark.png' |
| | | import distanceChoose from '@assets/images/map-pages/icon/toolbox/biaohuimark/juliceliangmark.png' |
| | | import mmChoose from '@assets/images/map-pages/icon/toolbox/biaohuimark/mianjiceliangmark.png' |
| | | import delChoose from '@assets/images/map-pages/icon/toolbox/biaohuimark/shanchu.png' |
| | |
| | | // components: { BaseNavMenuItem }, |
| | | data () { |
| | | return { |
| | | isShow: true, |
| | | currentBaseMapCode: 'tianditu_img', |
| | | basemapList: [], |
| | | menuList: [ |
| | | { |
| | | icon: plot, |
| | |
| | | index: '1-1', |
| | | label: '点标绘', |
| | | icon: marker, |
| | | title: '点标绘', |
| | | iconChoose: markerChoose |
| | | title: '点标绘' |
| | | }, |
| | | { |
| | | index: '1-2', |
| | | label: '线标绘', |
| | | icon: line, |
| | | title: '线标绘', |
| | | iconChoose: lineChoose |
| | | title: '线标绘' |
| | | }, |
| | | { |
| | | index: '1-4', |
| | |
| | | label: '圆形', |
| | | icon: polygonY, |
| | | title: '圆形' |
| | | }, |
| | | { |
| | | index: '1-4', |
| | | label: '删除', |
| | | icon: del, |
| | | title: '删除标绘' |
| | | } |
| | | ] |
| | | }, |
| | |
| | | } |
| | | ], |
| | | selectGroup: false, |
| | | active: -1, |
| | | drawLayer: null, |
| | | Draw: null, |
| | | map: null, |
| | | L: window.L |
| | | L: window.L, |
| | | active: 0 |
| | | } |
| | | }, |
| | | computed: { |
| | | basemapHelper () { |
| | | return this.$store.state.map.basemapHelper |
| | | } |
| | | }, |
| | | watch: { |
| | | basemapHelper (newVal) { |
| | | if (newVal != null) { |
| | | this.updateBasemapList() |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | updateBasemapList () { |
| | | this.basemapList = this.basemapHelper.getBasemapList() |
| | | }, |
| | | changeBasemap (itm) { |
| | | const code = itm.code |
| | | this.basemapList.forEach((item) => { |
| | | if (item.code === code) { |
| | | console.log(this.currentBaseMapCode) |
| | | if (this.currentBaseMapCode == null || this.currentBaseMapCode !== code) { |
| | | this.currentBaseMapCode = code |
| | | this.basemapHelper.showBasemap(item.code, item.conf.annotationCheck, true) |
| | | } else { |
| | | this.basemapHelper.showBasemap(item.code, item.conf.annotationCheck, false) |
| | | } |
| | | |
| | | this.basemapHelper.getBasemapList().forEach((item) => { |
| | | item.layer.bringToBack() |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | changeChoose (index) { |
| | | this.active = index |
| | | }, |
| | | changeSelect () { |
| | | this.selectGroup = !this.selectGroup |
| | | }, |
| | | choiceItem (itemT) { |
| | | console.log(itemT.label) |
| | | switch (itemT.label) { |
| | | case '点标绘': |
| | | var myIcon = this.L.icon({ |
| | | iconUrl: iconRefinery, |
| | | iconSize: [26, 32], |
| | | iconAnchor: [13, 16], |
| | | popupAnchor: [26, -32] |
| | | }) |
| | | // MakeTation.StartPointAnnotation(this.map, this.L) |
| | | this.drawLayer = this.map.editTools.startMarker() |
| | | this.drawLayer.setIcon(myIcon) |
| | | this.drawLayer.on('dblclick').on('dblclick', this.drawLayer.toggleEdit) |
| | | break |
| | | case '线标绘': |
| | | this.drawLayer = this.map.editTools.startPolyline() |
| | | this.drawLayer.on('dblclick').on('dblclick', this.drawLayer.toggleEdit) |
| | | break |
| | | case '多边形': |
| | | this.drawLayer = this.map.editTools.startPolygon() |
| | | this.drawLayer.on('dblclick').on('dblclick', this.drawLayer.toggleEdit) |
| | | break |
| | | case '矩形': |
| | | this.drawLayer = this.map.editTools.startRectangle() |
| | | this.drawLayer.on('dblclick').on('dblclick', this.drawLayer.toggleEdit) |
| | | break |
| | | case '圆形': |
| | | this.drawLayer = this.map.editTools.startCircle() |
| | | this.drawLayer.on('dblclick').on('dblclick', this.drawLayer.toggleEdit) |
| | | break |
| | | case '距离': |
| | | Measure.startMeasureLen(this.map, this.L) |
| | |
| | | }).addTo(this.map) |
| | | printerY.printMap('A4Portrait page', 'MyManualPrint') |
| | | break |
| | | case '删除': |
| | | this.map.removeLayer(this.drawLayer) |
| | | break |
| | | } |
| | | this.drawLayer.on('dblclick', this.L.DomEvent.stop).on('dblclick', this.drawLayer.toggleEdit) |
| | | this.drawLayer.setStyle({ |
| | | color: 'red', |
| | | fillColor: '#ffffff', |
| | | fillOpacity: 0.1, |
| | | fill: true |
| | | }) |
| | | }, |
| | | // handleSelect (index) { |
| | | // console.log(index) |
| | | // switch (index) { |
| | | // case '4-1': |
| | | // // this.map.toggleFullscreen() |
| | | // var printer = this.L.easyPrint({ |
| | | // sizeModes: ['Current', 'A4Landscape', 'A4Portrait'], |
| | | // filename: 'map_image', |
| | | // exportOnly: true, |
| | | // hideControlContainer: true |
| | | // }).addTo(this.map) |
| | | // printer.printMap('CurrentSize', 'MyManualPrint') |
| | | // break |
| | | // case '4-2': |
| | | // var printerX = this.L.easyPrint({ |
| | | // sizeModes: ['Current', 'A4Landscape', 'A4Portrait'], |
| | | // filename: 'map_image', |
| | | // exportOnly: true, |
| | | // hideControlContainer: true |
| | | // }).addTo(this.map) |
| | | // printerX.printMap('A4Landscape page', 'MyManualPrint') |
| | | // break |
| | | // case '4-3': |
| | | // var printerY = this.L.easyPrint({ |
| | | // sizeModes: ['Current', 'A4Landscape', 'A4Portrait'], |
| | | // filename: 'map_image', |
| | | // exportOnly: true, |
| | | // hideControlContainer: true |
| | | // }).addTo(this.map) |
| | | // printerY.printMap('A4Portrait page', 'MyManualPrint') |
| | | // break |
| | | // case '1-2': |
| | | // this.drawLayer = this.map.editTools.startPolyline() |
| | | // this.drawLayer.on('dblclick').on('dblclick', this.drawLayer.toggleEdit) |
| | | // Measure.startMeasureLen(this.map, this.L) |
| | | // break |
| | | // case '1-3-1': |
| | | // // alert('圆形') |
| | | // this.drawLayer = this.map.editTools.circleMarker() |
| | | // this.drawLayer.on('dblclick').on('dblclick', this.drawLayer.toggleEdit) |
| | | // break |
| | | // case '1-3-2': |
| | | // this.drawLayer = this.map.editTools.startPolygon() |
| | | // this.drawLayer.on('dblclick').on('dblclick', this.drawLayer.toggleEdit) |
| | | // break |
| | | // case '1-1': |
| | | // MakeTation.StartPointAnnotation(this.map, this.L) |
| | | // break |
| | | // case '图标标注': |
| | | // this.drawLayer = this.map.editTools.startIcon() |
| | | // this.drawLayer.on('dblclick').on('dblclick', this.drawLayer.toggleEdit) |
| | | // break |
| | | // case '文字标注': |
| | | // this.bouncedText = true |
| | | // MakeTation.startMakeText(this.map, this.L) |
| | | // break |
| | | // case '距离测量': |
| | | // Measure.startMeasureLen(this.map, this.L) |
| | | // break |
| | | // case '面积测量': |
| | | // Measure.startMeasureArea(this.map, this.L) |
| | | // break |
| | | // } |
| | | // }, |
| | | // 文字标注控制 |
| | | // 左上功能控制 |
| | | changeSelect () { |
| | | this.selectGroup = !this.selectGroup |
| | | this.isShow = !this.isShow |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | | .animationChange-enter-active, .animationChange-leave-active { |
| | | transition: all 0.5s; |
| | | } |
| | | |
| | | .animationChange-enter, .animationChange-leave-to { |
| | | opacity: 0; |
| | | transform: translateX(-100px); |
| | | } |
| | | |
| | | .left-top-toolbox-panel { |
| | | position: absolute; |
| | | left: 0; |
| | |
| | | |
| | | .specific-tools { |
| | | display: flex; |
| | | |
| | | .el-button { |
| | | z-index: 999; |
| | | padding: 0; |
| | |
| | | height: 45px; |
| | | background: @background-color-tools; |
| | | border: none; |
| | | .base-map-img{ |
| | | position: absolute; |
| | | } |
| | | .base-map-img:hover{ |
| | | cursor:pointer; |
| | | } |
| | | |
| | | img { |
| | | width: 22px; |
| | |
| | | |
| | | span { |
| | | display: block; |
| | | font-size: 0.012rem; |
| | | color: @color-tool; |
| | | } |
| | | } |
| | | |
| | | .specific-tools-group { |
| | | z-index: 1; |
| | | //.tools-panel-content { |
| | | // width:220px!important; |
| | | //} |
| | | .base-map-inner-panel { |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | |
| | | .base-map-img{ |
| | | position: absolute; |
| | | } |
| | | .base-map-img-Tool:hover{ |
| | | cursor:pointer; |
| | | } |
| | | .base-map-anno-Tool{ |
| | | position: absolute;margin-left: 2px;background-color: rgba(0,0,0,.5);color: white; |
| | | .el-checkbox__label{ |
| | | padding-left: 5px !important; |
| | | } |
| | | } |
| | | .basemap-layer-item { |
| | | display: flex; |
| | | width: 50px; |
| | | height: 50px; |
| | | margin: 10px; |
| | | border: 2px solid white; |
| | | input { |
| | | position: relative; |
| | | left: 0; |
| | | top: -53px; |
| | | } |
| | | .basemap-layer-item-name { |
| | | position: relative; |
| | | left: 0; |
| | | top: -53px; |
| | | } |
| | | } |
| | | } |
| | | .tools-panel-choose { |
| | | border: none; |
| | | box-shadow: 0 0 0.03rem @color-shadow; |
| | |
| | | } |
| | | } |
| | | } |
| | | .isD-enter-active, .isD-leave-active{ |
| | | transition: all 0.5s; |
| | | } |
| | | .isD-enter, .isD-leave-to{ |
| | | opacity: 0; |
| | | transform: translateX(-100px); |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <div class="enterprise-panel"> |
| | | <div class="enterprise-function" @click="showWarnDialog()"> |
| | | <img src="@/assets/images/map-pages/icon/map/warn.png" alt="" width="32px"> |
| | | <div :class='["iconBtn",warnVisible ? "active" : ""]'><span><img src="@/assets/images/map-pages/icon/map/warn.png" alt="" width="26px" style="display: block;margin: auto"><span class="icon-name">预报警</span></span></div> |
| | | |
| | | </div> |
| | | <div class="enterprise-function" @click="showStatisDialog()"> |
| | | <img src="@/assets/images/map-pages/icon/map/company.png" alt="" width="32px"> |
| | | <div :class='["iconBtn",companyVisible ? "active" : ""]'><span><img src="@/assets/images/map-pages/icon/map/company.png" alt="" width="26px" style="display: block;margin: auto"><span class="icon-name">指标</span></span></div> |
| | | </div> |
| | | <Dialog ref="warnDialog" title="企业预警报警分类统计"> |
| | | <warn></warn> |
| | |
| | | }, |
| | | data () { |
| | | return { |
| | | comp: Warn |
| | | comp: Warn, |
| | | warnVisible: false, |
| | | companyVisible: false |
| | | } |
| | | }, |
| | | methods: { |
| | |
| | | }, |
| | | showWarnDialog () { |
| | | this.$refs.warnDialog.show() |
| | | this.warnVisible = true |
| | | }, |
| | | showStatisDialog () { |
| | | this.$refs.indexStatisticsDialog.show() |
| | | this.companyVisible = true |
| | | } |
| | | } |
| | | } |
| | |
| | | z-index: 9999; |
| | | |
| | | .enterprise-function{ |
| | | width: 40px; |
| | | width: 50px; |
| | | float: left; |
| | | cursor: pointer; |
| | | } |
| | | .iconBtn { |
| | | width:45px; |
| | | text-align: center; |
| | | background: rgba(0, 16, 30, 0.5); |
| | | cursor: pointer; |
| | | color: #00fff6; |
| | | border: 0.00521rem solid #00fff6; |
| | | box-shadow: 0 0 0.03rem #00fff6; |
| | | } |
| | | .active { |
| | | // border: 0.00521rem solid #fff700; |
| | | // box-shadow: 0 0 0.03rem #fff700; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <div class="summary-sheets"> |
| | | <div> |
| | | <i class="el-icon-c-scale-to-original" @click="closeBtn"></i> |
| | | </div> |
| | | <Dialog ref="summarySheets" title="企业指标分类统计"> |
| | | <tab-handover></tab-handover> |
| | | </Dialog > |
| | | <div :class='["iconBtn",summaryVisible ? "active" : ""]' @click="closeBtn"><span><img src="@assets/images/map-pages/icon/toolbox/table.png" alt="" width="26px" style="display: block;margin: auto"><span class="icon-name">统计表</span></span></div> |
| | | <Dialog ref="summarySheets" title="企业指标分类统计"> |
| | | <tab-handover></tab-handover> |
| | | </Dialog > |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | tabHandover, |
| | | Dialog |
| | | }, |
| | | |
| | | data () { |
| | | return { |
| | | summaryVisible: false |
| | | } |
| | | }, |
| | | methods: { |
| | | closeBtn () { |
| | | // const summary = document.getElementById('summary') |
| | |
| | | left: 1px; |
| | | /*width: 850px;*/ |
| | | /*height: 265px;*/ |
| | | border: #90c8e0 1px solid; |
| | | z-index:2000; |
| | | background-color: rgba(26, 73, 81, 0.901960784313726); |
| | | /*color: #fff;*/ |
| | | .el-icon-c-scale-to-original { |
| | | width: 30px; |
| | | height: 30px; |
| | | font-size: 30px; |
| | | } |
| | | .iconBtn { |
| | | width:45px; |
| | | text-align: center; |
| | | background: rgba(0, 16, 30, 0.5); |
| | | cursor: pointer; |
| | | color: #00fff6; |
| | | border: 0.00521rem solid #00fff6; |
| | | box-shadow: 0 0 0.03rem #00fff6; |
| | | } |
| | | .active { |
| | | border: 0.00521rem solid #fff700; |
| | | box-shadow: 0 0 0.03rem #fff700; |
| | | } |
| | | } |
| | | </style> |
New file |
| | |
| | | /** |
| | | * 废水图层 |
| | | * @type {string} |
| | | */ |
| | | const APP_GIS_HOST_2 = 'http://xearth.cn:6289' |
| | | export const LayerWasteWater = { |
| | | code: 'pipeline', |
| | | name: '废水', |
| | | type: 'geojson', |
| | | // url: APP_GIS_HOST_2 + '/server/ogcserver/PipeLineTest/wms?version=1.1.1', |
| | | // url: APP_GIS_HOST_2 + '/layer/findLayer?layerName={sname}', |
| | | url: APP_GIS_HOST_2 + '/server/ogcserver/PipeLine/wfs?version=1.0.0&TYPENAME={sname}&REQUEST=getfeature&OUTPUTFORMAT=json&maxFeatures=20000', |
| | | checked: true, |
| | | layers: [ |
| | | { |
| | | code: 'rainline', |
| | | name: '企业', |
| | | sname: '企业', // 表名 |
| | | checked: true, // 默认选中状态 |
| | | filter: {}, |
| | | minZoom: 10, // 在指定级别显示 |
| | | childLayer: 'fsss,hbss' // 关联PointLayers |
| | | }, |
| | | { |
| | | code: 'oilline', |
| | | name: '监测点', |
| | | sname: '监测点', |
| | | checked: true, // 默认选中状态 |
| | | filter: {}, |
| | | minZoom: 10, |
| | | childLayer: 'fsss,hbss' // 关联PointLayers |
| | | }, |
| | | { |
| | | code: 'saltline', |
| | | name: '排放口', |
| | | sname: '排放口', |
| | | checked: true, // 默认选中状态 |
| | | filter: {}, |
| | | minZoom: 10, |
| | | childLayer: 'fsss,hbss' // 关联PointLayers |
| | | } |
| | | ] |
| | | } |
| | |
| | | import * as L from 'leaflet' |
| | | import TDT from './TDT' |
| | | import { LayerSewersLine, LayerSewersPoint } from './LayerSewers' |
| | | import { LayerWasteWater } from './LayerWasteWater' |
| | | const curWwwPath = window.document.location.href |
| | | const pathname = window.document.location.pathname |
| | | const pos = curWwwPath.indexOf(pathname) |
| | |
| | | // defaultBasemapCode: 'tianditu_img', // 默认显示 地图类型 |
| | | IntranetBaseMaps: TDT.intranet, |
| | | InternetBaseMaps: TDT.internet, |
| | | Layers: { LayerSewersLine: [LayerSewersLine], layerSewersPoint: LayerSewersPoint } // 污雨水图层配置 |
| | | Layers: { LayerSewersLine: [LayerSewersLine, LayerWasteWater], layerSewersPoint: LayerSewersPoint } // 污雨水图层配置 |
| | | } |
| | | |
| | | /** |
| | |
| | | zoomOffset: 1 |
| | | } |
| | | } |
| | | }, |
| | | { |
| | | code: 'tianditu_ter', |
| | | name: '天地图地形', |
| | | icon_actived: '/assets/images/map-pages/icon/terrain.png', |
| | | icon_deactived: '/assets/images/map-pages/icon/terrain.png', |
| | | isAddToMap: false, |
| | | annotationCheck: true, |
| | | map: { |
| | | layerName: '天地图地形地图', |
| | | type: 'wmts', |
| | | visible: false, |
| | | layerType: 'ter_c', |
| | | isLoadMapByToken: true, |
| | | annotationCheck: true, |
| | | url: TIANDITU_GIS_HOST + '/ter_c/wmts?layer=ter&style=default&tilematrixset=c' + |
| | | '&Service=WMTS&Request=GetTile&Version=1.0.0&Format=tiles&TileMatrix={z}&TileCol={x}&TileRow={y}' + |
| | | '&tk=' + TIANDITU_GIS_TOKEN, |
| | | option: { |
| | | maxZoom: 18, |
| | | minZoom: 1, |
| | | zoomOffset: 1 |
| | | } |
| | | }, |
| | | annotation: { |
| | | layerName: '天地图地形标记', |
| | | type: 'wmts', |
| | | visible: false, |
| | | layerType: 'cta_c', |
| | | isLoadMapByToken: true, |
| | | url: TIANDITU_GIS_HOST + '/cta_c/wmts?layer=cva&style=default&tilematrixset=c' + |
| | | '&Service=WMTS&Request=GetTile&Version=1.0.0&Format=tiles&TileMatrix={z}&TileCol={x}&TileRow={y}' + |
| | | '&tk=' + TIANDITU_GIS_TOKEN, |
| | | option: { |
| | | maxZoom: 18, |
| | | minZoom: 1, |
| | | zoomOffset: 1 |
| | | } |
| | | } |
| | | } |
| | | ] |
| | | export default |