From 866f47aee553c4eadb3d29987d2d0b09b4d2114e Mon Sep 17 00:00:00 2001
From: wangqi <magical1908@outlook.com>
Date: 星期三, 07 四月 2021 16:12:35 +0800
Subject: [PATCH] Merge branch 'develop' of http://xearth.cn:6600/r/wuyushui/SewerAndRainNetwork into develop
---
src/assets/css/map/map-panel-style.less | 5
src/components/plugin/PathDashFlow.js | 1
src/components/BaseNav/PublicBounced/GasComponents/PublicTable.vue | 3
src/components/BaseNav/SolidWaste/directive/dir.js | 104 ++++++++---------
src/components/BaseNav/PublicBounced/GasComponents/PublicTabs.vue | 34 +++++
src/components/BaseNav/PublicBounced/PublicBounced.vue | 169 ++++++++++++++++------------
6 files changed, 185 insertions(+), 131 deletions(-)
diff --git a/src/assets/css/map/map-panel-style.less b/src/assets/css/map/map-panel-style.less
index a23fdc6..3a72b11 100644
--- a/src/assets/css/map/map-panel-style.less
+++ b/src/assets/css/map/map-panel-style.less
@@ -301,6 +301,9 @@
.el-table .success-row {
background: #30455f;
}
+.el-table tbody tr:hover>td {
+ background-color:#28304d !important;
+}
/***********************************************鍔ㄧ敾鏁堟灉************/
.transition{
transition: all .5s;
@@ -337,4 +340,4 @@
margin: 0 auto;
}
-}
\ No newline at end of file
+}
diff --git a/src/components/BaseNav/PublicBounced/GasComponents/PublicTable.vue b/src/components/BaseNav/PublicBounced/GasComponents/PublicTable.vue
index a1e01bd..262f1c9 100644
--- a/src/components/BaseNav/PublicBounced/GasComponents/PublicTable.vue
+++ b/src/components/BaseNav/PublicBounced/GasComponents/PublicTable.vue
@@ -10,8 +10,7 @@
<el-table :data="listData" style="width: 100%" stripe='stripe'
:height="300"
tooltip-effect="dark" :row-class-name="tableRowClassName">
- <el-table-column v-for="(item, index) in listLabel" :key="index" :prop="item.prop"
- :label="item.label"></el-table-column>
+ <el-table-column v-for="(item, index) in listLabel" :key="index" :prop="item.prop" :label="item.label"></el-table-column>
</el-table>
</div>
</div>
diff --git a/src/components/BaseNav/PublicBounced/GasComponents/PublicTabs.vue b/src/components/BaseNav/PublicBounced/GasComponents/PublicTabs.vue
index 8e5f267..3b33e08 100644
--- a/src/components/BaseNav/PublicBounced/GasComponents/PublicTabs.vue
+++ b/src/components/BaseNav/PublicBounced/GasComponents/PublicTabs.vue
@@ -53,7 +53,37 @@
props: ['displayContentTab', 'value', 'setWasteGasdata', 'setWasteWaterdata'],
data () {
return {
- tabData: []
+ tabData: [],
+ listLabel: [
+ {
+ label: '搴忓彿',
+ prop: 'StoragePlaceId'
+ },
+ {
+ label: '绫诲埆',
+ prop: 'StoragePlaceTypeName'
+ },
+ {
+ label: '鍥哄簾鍚嶇О',
+ prop: 'StoragePlaceName'
+ },
+ {
+ label: '浠g爜',
+ prop: 'StorageZDMJ'
+ },
+ {
+ label: '浜х敓閲�(t)',
+ prop: 'StorageZCL'
+ },
+ {
+ label: '璐瓨閲�(t)',
+ prop: 'StorageZCNL'
+ },
+ {
+ label: '浜х敓瑁呯疆',
+ prop: 'StorageType'
+ }
+ ]
}
},
mounted () {
@@ -144,7 +174,7 @@
z-index: 999;
position: absolute;
width: 10px;
- //height: 10px;
+ height: 10px;
background: rgba(0, 0, 0, 0);
border: 1px solid #47d5ea;
}
diff --git a/src/components/BaseNav/PublicBounced/PublicBounced.vue b/src/components/BaseNav/PublicBounced/PublicBounced.vue
index 18e321b..6cdf973 100644
--- a/src/components/BaseNav/PublicBounced/PublicBounced.vue
+++ b/src/components/BaseNav/PublicBounced/PublicBounced.vue
@@ -1,28 +1,50 @@
<template>
- <div class="public-bounced" v-draw v-if="flag">
- <div class="public-bounced-title">
- <span>{{ displayContentTitle }}</span>
- <i class="el-icon-circle-close" @click="closePopup"></i>
- </div>
- <div class="public-bounced-content">
- <div class="public-bounced-content-left">
- <public-tabs :displayContentTab="displayContentTab" :value="value"
- :setWasteGasdata="setWasteGasdata" :setWasteWaterdata="setWasteWaterdata"></public-tabs>
- <div class="public-bounced-content-left-bottom">
- <public-table v-if="value === 'gufei'"
- :displayContentTable="displayContentTable"></public-table>
- <public-chart v-else :getWasteGasDetails="getWasteGasDetails"
- :value="value"
- :getWasteWaterMonitoringDetails="getWasteWaterMonitoringDetails"
- :getWasteWaterMonitoring="getWasteWaterMonitoring">
- </public-chart>
- </div>
- </div>
- <div class="public-bounced-content-right">
- <public-video></public-video>
- </div>
- </div>
+ <div class="public-bounced" v-drag v-if="flag">
+ <div class="public-bounced-title">
+ <span>{{ displayContentTitle }}</span>
+ <i class="el-icon-circle-close" @click="closePopup"></i>
</div>
+ <div class="public-bounced-content">
+ <div class="public-bounced-content-left">
+ <public-tabs :displayContentTab="displayContentTab" :value="value"
+ :setWasteGasdata="setWasteGasdata" :setWasteWaterdata="setWasteWaterdata"></public-tabs>
+ <div class="public-bounced-content-left-bottom">
+ <public-table v-if="value === 'gufei'"
+ :displayContentTable="displayContentTable"></public-table>
+ <public-chart v-else :getWasteGasDetails="getWasteGasDetails"
+ :getWasteWaterMonitoring="getWasteWaterMonitoring"></public-chart>
+ </div>
+ </div>
+ <div class="public-bounced-content-right">
+ <public-video></public-video>
+ </div>
+ </div>
+ </div>
+<!-- <el-dialog-->
+<!-- :visible.sync="flag"-->
+<!-- width="70%"-->
+<!-- class="public-bounced"-->
+<!-- :modal="false">-->
+<!-- <div class="public-bounced-title">-->
+<!-- <span>{{ displayContentTitle }}</span>-->
+<!-- <i class="el-icon-circle-close" @click="closePopup"></i>-->
+<!-- </div>-->
+<!-- <div class="public-bounced-content">-->
+<!-- <div class="public-bounced-content-left">-->
+<!-- <public-tabs :displayContentTab="displayContentTab" :value="value"-->
+<!-- :setWasteGasdata="setWasteGasdata" :setWasteWaterdata="setWasteWaterdata"></public-tabs>-->
+<!-- <div class="public-bounced-content-left-bottom">-->
+<!-- <public-table v-if="value === 'gufei'"-->
+<!-- :displayContentTable="displayContentTable"></public-table>-->
+<!-- <public-chart v-else :getWasteGasDetails="getWasteGasDetails"-->
+<!-- :getWasteWaterMonitoring="getWasteWaterMonitoring"></public-chart>-->
+<!-- </div>-->
+<!-- </div>-->
+<!-- <div class="public-bounced-content-right">-->
+<!-- <public-video></public-video>-->
+<!-- </div>-->
+<!-- </div>-->
+<!-- </el-dialog>-->
</template>
<script>
@@ -56,6 +78,9 @@
}
},
methods: {
+ closePopup () {
+ this.flag = false
+ },
setData (dataBasic, dataDetailed, value) {
this.flag = true
this.value = value
@@ -84,62 +109,62 @@
this.displayContentTitle = dataWater.Name
this.flag = true
this.value = value
- },
- closePopup () {
- this.flag = false
}
}
}
</script>
<style lang="less" scoped>
- .public-bounced {
- width: 75%;
- z-index: 999;
- position: absolute;
- bottom: 5%;
- left: 15%;
- background-color: #002432;
- border: 1px #9fc5c8 solid;
+.public-bounced {
+ width: 75%;
+ //height: 540px;
+ height: 65%;
+ z-index: 999;
+ position: absolute;
+ bottom: 5%;
+ left: 15%;
+ background-color: #002432;
+ border: 1px #9fc5c8 solid;
- .public-bounced-title {
- border: 1px #a4c0d8 solid;
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding: 5px 0;
+ .public-bounced-title {
+ border: 1px #a4c0d8 solid;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ padding: 5px 0;
- span {
- color: #f4f7ff;
- margin: 0 15px;
- font-size: 14px;
- }
-
- i {
- color: white;
- margin: 0 15px;
- font-size: 22px;
- }
- }
-
- .public-bounced-content {
- margin: 15px auto;
- display: flex;
- //align-items: center;
- justify-content: space-around;
- padding: 10px;
-
- .public-bounced-content-left {
- flex: 3;
- height: 100%;
- margin-right: 10px;
- }
-
- .public-bounced-content-right {
- flex: 2;
- //width: 48%;
- height: 100%;
- }
- }
+ span {
+ color: #f4f7ff;
+ margin: 0 15px;
+ font-size: 14px;
}
+
+ i {
+ color: white;
+ margin: 0 15px;
+ font-size: 22px;
+ cursor: pointer;
+ }
+ }
+
+ .public-bounced-content {
+ margin: 15px 0;
+ display: flex;
+ //align-items: center;
+ justify-content: space-around;
+ padding: 10px;
+
+ .public-bounced-content-left {
+ flex: 3;
+ height: 100%;
+ margin-right: 10px;
+ }
+
+ .public-bounced-content-right {
+ flex: 2;
+ //width: 48%;
+ height: 100%;
+ }
+ }
+}
</style>
diff --git a/src/components/BaseNav/SolidWaste/directive/dir.js b/src/components/BaseNav/SolidWaste/directive/dir.js
index d51b377..ef3a982 100644
--- a/src/components/BaseNav/SolidWaste/directive/dir.js
+++ b/src/components/BaseNav/SolidWaste/directive/dir.js
@@ -1,59 +1,55 @@
import Vue from 'vue'
-
-// 鑷畾涔夊厓绱犲疄鐜板脊妗嗘嫋鎷絒閲嶇偣]
-Vue.directive('draw', {
- // inserted: function (el, binding, vNode) {
- // el.setAttribute('style', 'position: fixed; z-index: 9999')
- // },
- bind: function (el, bindding, vNode) {
- el.setAttribute('draggable', true)
- let left, top, width, height
- el._dragstart = function (event) {
- event.stopPropagation()
- left = event.clientX - el.offsetLeft
- top = event.clientY - el.offsetTop
- width = el.offsetWidth
- height = el.offsetHeight
- }
- el._checkPosition = function () { // 闃叉琚嫋鍑鸿竟鐣�
- const width = el.offsetWidth
- const height = el.offsetHeight
- let left = Math.min(el.offsetLeft, document.body.clientWidth - width)
- left = Math.max(0, left)
- let top = Math.min(el.offsetTop, document.body.clientHeight - height)
- top = Math.max(0, top)
- el.style.left = left + 'px'
- el.style.top = top + 'px'
- el.style.width = width + 'px'
- el.style.height = height + 'px'
- }
- el._dragEnd = function (event) {
- event.stopPropagation()
- left = event.clientX - left
- top = event.clientY - top
- el.style.left = left + 'px'
- el.style.top = top + 'px'
- el.style.width = width + 'px'
- el.style.height = height + 'px'
- el._checkPosition()
- }
- el._documentAllowDraop = function (event) {
- event.preventDefault()
- }
- document.body.addEventListener('dragover', el._documentAllowDraop)
- el.addEventListener('dragstart', el._dragstart)
- el.addEventListener('dragend', el._dragEnd)
- window.addEventListener('resize', el._checkPosition)
+// 浣跨敤Vue.directive()瀹氫箟涓�涓叏灞�鎸囦护
+// 1.鍙傛暟涓�锛氭寚浠ょ殑鍚嶇О锛屽畾涔夋椂鎸囦护鍓嶉潰涓嶉渶瑕佸啓v-
+// 2.鍙傛暟浜岋細鏄竴涓璞★紝璇ュ璞′腑鏈夌浉鍏崇殑鎿嶄綔鍑芥暟
+// 3.鍦ㄨ皟鐢ㄧ殑鏃跺�欏繀椤诲啓v-
+const drag = Vue.directive('drag', {
+ // 1.鎸囦护缁戝畾鍒板厓绱犱笂鍥炵珛鍒绘墽琛宐ind鍑芥暟锛屽彧鎵ц涓�娆�
+ // 2.姣忎釜鍑芥暟涓涓�涓弬鏁版案杩滄槸el锛岃〃绀虹粦瀹氭寚浠ょ殑鍏冪礌锛宔l鍙傛暟鏄師鐢焜s瀵硅薄
+ // 3.閫氳繃el.focus()鏄棤娉曡幏鍙栫劍鐐圭殑锛屽洜涓哄彧鏈夋彃鍏OM鍚庢墠鐢熸晥
+ bind: function (el) {
+ el.style.cursor = 'move' // 榧犳爣鏍峰紡鍙榤ove鏍峰紡
},
+ // inserted琛ㄧず涓�涓厓绱狅紝鎻掑叆鍒癉OM涓細鎵цinserted鍑芥暟锛屽彧瑙﹀彂涓�娆�
+ inserted: function (el) {
+ el.onmousedown = function (e) {
+ var distX = e.pageX - el.offsetLeft
+ var distY = e.pageY - el.offsetTop
+ // console.log('鍏冪礌鏈韩鐨勯珮锛�' + el.clientHeight + ',鍏冪礌鏈韩鐨勫锛�' + el.clientWidth)
- unbind: function (el, bindding, vNode) {
- document.body.removeEventListener('dragover', el._documentAllowDraop)
- el.removeEventListener('dragstart', el._dragstart)
- el.removeEventListener('dragend', el._dragEnd)
- window.removeEventListener('resize', el._checkPosition)
- delete el._documentAllowDraop
- delete el._dragstart
- delete el._dragEnd
- delete el._checkPosition
+ if (e.preventDefault) {
+ e.preventDefault()
+ } else {
+ e.returnValue = false
+ }
+ // 瑙e喅蹇�熸嫋鍔ㄦ粸鍚庨棶棰�
+
+ document.onmousemove = function (e) {
+ // 鐢ㄩ紶鏍囩殑浣嶇疆鍑忓幓榧犳爣鐩稿鍏冪礌鐨勪綅缃紝寰楀埌鍏冪礌鐨勪綅缃�
+ let left = e.clientX - distX
+ let top = e.clientY - distY
+
+ if (left <= 0) {
+ left = 5 // 璁剧疆鎴�5鏄负浜嗕笉绂昏竟缂樺お杩�
+ } else if (left > document.documentElement.clientWidth - el.clientWidth) {
+ // document.documentElement.clientWidth 灞忓箷鐨勫彲瑙嗗搴�
+ left = document.documentElement.clientWidth - el.clientWidth - 5
+ }
+ if (top <= 0) {
+ top = 5
+ } else if (top > document.documentElement.clientHeight - el.clientHeight) {
+ top = document.documentElement.clientHeight - el.clientHeight - 5
+ }
+ el.style.left = left + 'px'
+ el.style.top = top + 'px'
+ }
+ document.onmouseup = function () {
+ document.onmousemove = document.onmouseup = null
+ }
+ }
+ },
+ // 褰揤Node鏇存柊鐨勬椂鍊欎細鎵цupdated锛屽彲浠ヨЕ鍙戝娆�
+ updated: function (el) {
}
})
+export default drag
diff --git a/src/components/plugin/PathDashFlow.js b/src/components/plugin/PathDashFlow.js
index a868066..bd1d263 100644
--- a/src/components/plugin/PathDashFlow.js
+++ b/src/components/plugin/PathDashFlow.js
@@ -71,6 +71,7 @@
}
},
_fillStroke: function (ctx, layer) {
+ // debugger
var options = layer.options
if (options.fill) {
--
Gitblit v1.8.0