shuishen
2022-02-09 35298bdcd712499f2066c0e80d37acc96c1d2a63
样式调整
1 files renamed
5 files modified
1 files added
92 ■■■■ changed files
public/img/icon/tool-area.png patch | view | raw | blame | history
public/img/icon/tool-ranging.png patch | view | raw | blame | history
src/components/map/components/dimension.vue 12 ●●●●● patch | view | raw | blame | history
src/pcviews/tool/area.vue 61 ●●●●● patch | view | raw | blame | history
src/pcviews/tool/ranging.vue 15 ●●●● patch | view | raw | blame | history
src/pcviews/tool/sign.vue 1 ●●●● patch | view | raw | blame | history
src/styles/pcpage/tool/ranging.scss 3 ●●●● patch | view | raw | blame | history
public/img/icon/tool-area.png
public/img/icon/tool-ranging.png

src/components/map/components/dimension.vue
@@ -1,10 +1,6 @@
<template>
    <div class="dimension-cut">
        <el-radio-group
            v-model="dimensionValue"
            size="medium"
            @change="dimensionChange"
        >
        <el-radio-group v-model="dimensionValue" size="medium" @change="dimensionChange">
            <el-radio-button label="三 维"></el-radio-button>
            <el-radio-button label="真三维"></el-radio-button>
        </el-radio-group>
@@ -592,8 +588,8 @@
                                e.overlay.attr['楼栋号'] == '8栋'
                                    ? '9栋'
                                    : e.overlay.attr['楼栋号'] == '9栋'
                                    ? '8栋'
                                    : e.overlay.attr['楼栋号']
                                        ? '8栋'
                                        : e.overlay.attr['楼栋号']
                            this.$store.commit('CLEAR_ALL', null)
                            getDetail({ mechanismname: '香琴湾' + rid }).then(
                                (res) => {
@@ -1233,7 +1229,7 @@
}
</script>
<style lang='scss' scope>
<style lang="scss" scoped>
.dimension-cut {
    position: fixed;
    top: 100px;
src/pcviews/tool/area.vue
@@ -7,10 +7,10 @@
 */
<template>
    <div class="tool-ranging">
    <div class="tool-area" ref="toolAreaBox">
        <div class="header" @mousedown="move" :class="{'move': moveFlag}">
            <div class="title">
                <img class="icon deblurring" src="/img/icon/dtcj.png" alt />
                <img class="icon deblurring" src="/img/icon/tool-area.png" alt />
                <span>地图测面</span>
            </div>
            <img class="close" src="/img/navicon/close.png" alt @click="closeModel" />
@@ -28,6 +28,11 @@
import { mapGetters } from 'vuex'
export default {
    data () {
        return {
            moveFlag: false
        }
    },
    computed: {
        ...mapGetters([
            'viewer'
@@ -36,6 +41,53 @@
    created () {
    },
    methods: {
        move (e) {
            const that = this
            const odiv = this.$refs.toolAreaBox // 获取目标元素
            // 算出鼠标相对元素的位置
            const disX = e.clientX - odiv.offsetLeft
            const disY = e.clientY - odiv.offsetTop
            const disH = odiv.offsetHeight
            const disW = odiv.offsetWidth
            document.onmousemove = (e) => {
                that.moveFlag = true
                // 鼠标按下并移动的事件
                // 用鼠标的位置减去鼠标相对元素的位置,得到元素的位置
                let left = e.clientX - disX
                let top = e.clientY - disY
                // 绑定元素位置到positionX和positionY上面
                if (left >= window.innerWidth - disW) {
                    left = window.innerWidth - disW
                }
                if (left <= 0) {
                    left = 0
                }
                if (top >= window.innerHeight - disH) {
                    top = window.innerHeight - disH
                }
                if (top <= 60) {
                    top = 60
                }
                // 移动当前元素
                odiv.style.left = (left) + 'px'
                odiv.style.top = (top) + 'px'
                odiv.style.bottom = 'auto'
            }
            document.onmouseup = (e) => {
                that.moveFlag = false
                document.onmousemove = null
                document.onmouseup = null
            }
        },
        calcDistance () {
            this.viewer.measure.areaSurface()
        },
@@ -54,5 +106,8 @@
}
</script>
<style>
<style lang="scss" scoped>
.move {
    cursor: move;
}
</style>
src/pcviews/tool/ranging.vue
@@ -7,10 +7,10 @@
 */
<template>
    <div class="tool-ranging">
    <div class="tool-ranging" ref="toolRangingBox">
        <div class="header" @mousedown="move" :class="{ move: moveFlag }">
            <div class="title">
                <img class="icon deblurring" src="/img/icon/dtcj.png" alt />
                <img class="icon deblurring" src="/img/icon/tool-ranging.png" alt />
                <span>地图测距</span>
            </div>
            <img class="close" src="/img/navicon/close.png" alt @click="closeModel" />
@@ -27,6 +27,11 @@
import { mapGetters } from 'vuex'
export default {
    data () {
        return {
            moveFlag: false
        }
    },
    computed: {
        ...mapGetters(['viewer'])
    },
@@ -34,7 +39,7 @@
    methods: {
        move (e) {
            const that = this
            const odiv = this.$refs.publicOrgNavBar // 获取目标元素
            const odiv = this.$refs.toolRangingBox // 获取目标元素
            // 算出鼠标相对元素的位置
            const disX = e.clientX - odiv.offsetLeft
            const disY = e.clientY - odiv.offsetTop
@@ -96,5 +101,7 @@
}
</script>
<style>
<style lang="sass" scoped>
.move
    cursor: move
</style>
src/pcviews/tool/sign.vue
@@ -15,6 +15,7 @@
    created () {
        var that = this
        that.DC = global.DC
        that.viewer.tooltip.enable = true
        that.viewer.on(that.DC.MouseEventType.MOUSE_MOVE, (e) => {
            that.viewer.tooltip.showAt(e.windowPosition, '我是鼠标提示')
        })
src/styles/pcpage/tool/ranging.scss
@@ -1,4 +1,5 @@
.tool-ranging {
.tool-ranging,
.tool-area {
    position: fixed;
    top: 100px;
    left: 140px;