From 9cf09818be0c2db5070a5b1342ca46d9e6497fad Mon Sep 17 00:00:00 2001
From: chenzeping <ChenZeping02609@163.com>
Date: 星期日, 25 四月 2021 10:36:09 +0800
Subject: [PATCH] Merge branch 'develop' of http://xearth.cn:6600/r/wuyushui/SewerAndRainNetwork into develop
---
src/components/panel/RightSearchPanel.vue | 10 +++--
src/components/BaseNav/pipeline/AffiliatedFacilities.vue | 4 +-
src/assets/css/map/map-panel-style.less | 7 +++
src/utils/dialogDrag.js | 83 +++++++++++++++++++++++++++++++++++++++++
src/components/panel/topicSearch/SewersSearch.vue | 9 +++-
5 files changed, 105 insertions(+), 8 deletions(-)
diff --git a/src/assets/css/map/map-panel-style.less b/src/assets/css/map/map-panel-style.less
index 188176a..edb9f1c 100644
--- a/src/assets/css/map/map-panel-style.less
+++ b/src/assets/css/map/map-panel-style.less
@@ -724,6 +724,13 @@
}
}
+.btn00fff6{
+ background: none;color:#00fff6;border-color:#00fff6
+}
+.btn00fff6:hover{
+ background: @background-color;color:@color-highlight;border-color:@color-highlight
+}
+
/****************************搴熸按寮规鍏叡鏍峰紡***/
.echarts-box {
.tab-scroll {
diff --git a/src/components/BaseNav/pipeline/AffiliatedFacilities.vue b/src/components/BaseNav/pipeline/AffiliatedFacilities.vue
index 050491f..b38b54c 100644
--- a/src/components/BaseNav/pipeline/AffiliatedFacilities.vue
+++ b/src/components/BaseNav/pipeline/AffiliatedFacilities.vue
@@ -7,9 +7,9 @@
:visible.sync="dialogVisible"
:append-to-body="true"
:modal="false"
- v-dialogDrag
+ v-dialogDragBottom
>
- <div class="search-panel ">
+ <div class="search-panel">
<el-form ref="form" :model="form" label-width="90px" class="search-form">
<!-- <el-form-item label="绠$嚎淇℃伅锛�" size="mini" class="search-panel-item">
<div class="el-select el-select--mini">8888</div>
diff --git a/src/components/panel/RightSearchPanel.vue b/src/components/panel/RightSearchPanel.vue
index 17cc936..33a4380 100644
--- a/src/components/panel/RightSearchPanel.vue
+++ b/src/components/panel/RightSearchPanel.vue
@@ -286,7 +286,7 @@
//top: 10px;
height: 0;
position: absolute;
- top: 0.42979rem;
+ top: 0.73979rem;
right: 0.14583rem;
z-index: 501;
display: -webkit-box;
@@ -618,12 +618,14 @@
background: #0B3B6D;
}
}
-
.environmental-risk-list.hover,
- .environmental-risk-list:hover {
- color: @color-highlight;
+ .environmental-risk-list:hover{
background: @background-color;
}
+ .environmental-risk-list.hover h3,
+ .environmental-risk-list h3:hover {
+ color: @color-highlight;
+ }
input::-webkit-input-placeholder {
color: #569ee1;
diff --git a/src/components/panel/topicSearch/SewersSearch.vue b/src/components/panel/topicSearch/SewersSearch.vue
index ba6c05b..2213bef 100644
--- a/src/components/panel/topicSearch/SewersSearch.vue
+++ b/src/components/panel/topicSearch/SewersSearch.vue
@@ -39,7 +39,7 @@
<h3 @click="handleLocation(item,index)">{{ item.properties.pipename }}</h3>
<p>鎵�灞炰紒涓氾細<span>{{ item.properties.orgcode }}</span>
<p>璁炬柦绫诲瀷锛�<span>{{ item.properties.teetype }}</span>
- <!-- <el-button v-if="fuShuSheShiShow" class="rt" size="mini" style="margin-right: 0.04rem" @click="btnAffiliatedFacilities(item)" >闄勫睘璁炬柦</el-button> -->
+ <el-button v-if="fuShuSheShiShow" class="rt btn00fff6" size="mini" style="margin-right: 0.04rem;" @click="btnAffiliatedFacilities(item,index)" >闄勫睘璁炬柦</el-button>
</p>
</div>
</div>
@@ -111,6 +111,7 @@
isRouteHover: false,
facilitiesParameter: null,
fuShuSheShiShow: true,
+ fuShuSheShiPanelShow: true,
activeNum: -1
}
},
@@ -154,8 +155,12 @@
},
handleLocation (val, index) {
this.activeNum = index
- this.facilitiesParameter = val
// layer && layer.openPopup()
+ window.layerFactory.flyByFeature(val, this.form.dataType.code)
+ },
+ btnAffiliatedFacilities (val, index) {
+ this.activeNum = index
+ this.facilitiesParameter = val
// 鍒ゆ柇閫夋嫨鏄惁鏄绾匡紝濡傛灉鏄垯鏄剧ず銆婇檮灞炶鏂姐�嬪脊妗�
if (this.form.pipelineType === '绠$嚎') {
this.fuShuSheShiShow = true
diff --git a/src/utils/dialogDrag.js b/src/utils/dialogDrag.js
index 466f856..1e05409 100644
--- a/src/utils/dialogDrag.js
+++ b/src/utils/dialogDrag.js
@@ -82,3 +82,86 @@
}
}
})
+
+// v-dialogDrag: 寮圭獥鎷栨嫿灞炴��
+Vue.directive('dialogDragBottom', {
+ bind (el, binding, vnode, oldVnode) {
+ const dialogHeaderEl = el.querySelector('.el-dialog__header')
+ const dragDom = el.querySelector('.el-dialog')
+ // dialogHeaderEl.style.cursor = 'move';
+ dialogHeaderEl.style.cssText += ';cursor:move;'
+ //console.log(dragDom.style.cssText)
+ //dragDom.style.cssText += ';top:0px;'
+ dragDom.style.cssText = 'bottom:15px;'
+ // 鑾峰彇鍘熸湁灞炴�� ie dom鍏冪礌.currentStyle 鐏嫄璋锋瓕 window.getComputedStyle(dom鍏冪礌, null);
+ const sty = (function () {
+ if (window.document.currentStyle) {
+ return (dom, attr) => dom.currentStyle[attr]
+ } else {
+ return (dom, attr) => getComputedStyle(dom, false)[attr]
+ }
+ })()
+
+ dialogHeaderEl.onmousedown = (e) => {
+
+ // 榧犳爣鎸変笅锛岃绠楀綋鍓嶅厓绱犺窛绂诲彲瑙嗗尯鐨勮窛绂�
+ const disX = e.clientX - dialogHeaderEl.offsetLeft
+ const disY = e.clientY - dialogHeaderEl.offsetTop
+
+ const screenWidth = document.body.clientWidth // body褰撳墠瀹藉害
+ const screenHeight = document.documentElement.clientHeight // 鍙鍖哄煙楂樺害(搴斾负body楂樺害锛屽彲鏌愪簺鐜涓嬫棤娉曡幏鍙�)
+
+ const dragDomWidth = dragDom.offsetWidth // 瀵硅瘽妗嗗搴�
+ const dragDomheight = dragDom.offsetHeight // 瀵硅瘽妗嗛珮搴�
+
+ const minDragDomLeft = dragDom.offsetLeft
+ const maxDragDomLeft = screenWidth - dragDom.offsetLeft - dragDomWidth
+
+ const minDragDomTop = dragDom.offsetTop
+ const maxDragDomTop = screenHeight - dragDom.offsetTop - dragDomheight
+
+ // 鑾峰彇鍒扮殑鍊煎甫px 姝e垯鍖归厤鏇挎崲
+ let styL = sty(dragDom, 'left')
+ let styT = sty(dragDom, 'top')
+
+ // 娉ㄦ剰鍦╥e涓� 绗竴娆¤幏鍙栧埌鐨勫�间负缁勪欢鑷甫50% 绉诲姩涔嬪悗璧嬪�间负px
+ if (styL.includes('%')) {
+ styL = +document.body.clientWidth * (+styL.replace(/\%/g, '') / 100)
+ styT = +document.body.clientHeight * (+styT.replace(/\%/g, '') / 100)
+ } else {
+ styL = +styL.replace(/\px/g, '')
+ styT = +styT.replace(/\px/g, '')
+ };
+
+ document.onmousemove = function (e) {
+ // 閫氳繃浜嬩欢濮旀墭锛岃绠楃Щ鍔ㄧ殑璺濈
+ let left = e.clientX - disX
+ let top = e.clientY - disY
+
+ // 杈圭晫澶勭悊
+ if (-(left) > minDragDomLeft) {
+ left = -(minDragDomLeft)
+ } else if (left > maxDragDomLeft) {
+ left = maxDragDomLeft
+ }
+
+ if (-(top) > minDragDomTop) {
+ top = -(minDragDomTop)
+ } else if (top > maxDragDomTop) {
+ top = maxDragDomTop
+ }
+
+ // 绉诲姩褰撳墠鍏冪礌
+ //dragDom.style.cssText += `;left:${left + styL}px;top:${top + styT}px;`
+ dragDom.style.cssText = `;left:${left + styL}px;top:${top + styT}px;`
+ //console.log(left , styL,top , styT)
+ }
+
+ document.onmouseup = function (e) {
+ document.onmousemove = null
+ document.onmouseup = null
+ }
+ }
+ }
+})
+
--
Gitblit v1.8.0