|
@@ -4,9 +4,18 @@
|
|
|
<li v-for="item in toolList" :key="item">
|
|
|
<template v-if="item.subLayer && item.code === currentTool">
|
|
|
<div class="sub-layer my-bg" v-if="item.code !== 'baseMapChange'">
|
|
|
- <div class="img-div" v-for="child in item.subLayer">
|
|
|
- <img :src="subImgSrc(child)" @click="changeChildTool(child)" :title="child.name" alt="">
|
|
|
- </div>
|
|
|
+ <template v-if="item.code === 'pipeAnalysis'">
|
|
|
+ <template v-if="pipeToolShow">
|
|
|
+ <div class="img-div" v-for="child in item.subLayer">
|
|
|
+ <img :src="subImgSrc(child)" @click="changeChildTool(child)" :title="child.name" alt="">
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <div class="img-div" v-for="child in item.subLayer">
|
|
|
+ <img :src="subImgSrc(child)" @click="changeChildTool(child)" :title="child.name" alt="">
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
</div>
|
|
|
</template>
|
|
|
<template v-if="item.code === 'baseMapChange' " >
|
|
@@ -34,13 +43,28 @@
|
|
|
</li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
+ <template v-if="pipeListShow&¤tTool == 'pipeAnalysis'">
|
|
|
+ <div class="pipe-table my-bg">
|
|
|
+ <div class="pipe-table-title">
|
|
|
+ <span class="fly_title_name">已申请分析列表</span>
|
|
|
+ </div>
|
|
|
+ <div class="fly_content scroll">
|
|
|
+ <ul>
|
|
|
+ <li v-for="(item,index) in pipeList" class="fly_item" :key="index">
|
|
|
+ <span>{{index + 1}}</span>
|
|
|
+ <span class="fly_name" @click="goToItem(item)" :title="item.reason">{{item.reason}}</span>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import {ref} from 'vue'
|
|
|
import {
|
|
|
AddBaseMapLayer,
|
|
|
- addBufferLayer,
|
|
|
+ addBufferLayer, AddDataArea, addDataLine,
|
|
|
AddSingleLayer,
|
|
|
AddYaoganMapLayer,
|
|
|
AddZhenwuMapLayer,
|
|
@@ -57,7 +81,7 @@ import {
|
|
|
LineSight,
|
|
|
MapClickByType,
|
|
|
setBoatGPS,
|
|
|
- setBoatHeatmap,
|
|
|
+ setBoatHeatmap, setExtent,
|
|
|
setMapCircleWatch,
|
|
|
setMapCircleWatchInner,
|
|
|
setMapClick,
|
|
@@ -71,6 +95,7 @@ import {getBoatRealTimePosition, getMyApplyHomeTableDataPipe} from "@/service/my
|
|
|
import {all} from "axios";
|
|
|
import {useMapStore, useRootStore} from "@/pinia/useStore";
|
|
|
import {urlTheme} from "@/unit/Theme/Theme";
|
|
|
+import {showMessage} from "@/unit/element-ui/tip";
|
|
|
export default {
|
|
|
name: "RightTool",
|
|
|
props:{
|
|
@@ -92,6 +117,9 @@ export default {
|
|
|
"type": "scene"
|
|
|
})
|
|
|
}
|
|
|
+ const pipeList = ref([]);
|
|
|
+ const pipeListShow = ref(false);
|
|
|
+ const pipeToolShow = ref(false);
|
|
|
const is3d = ref(true);
|
|
|
const currentBaseMap = ref('air');
|
|
|
const isBaseMap = ref(false);
|
|
@@ -120,7 +148,38 @@ export default {
|
|
|
},
|
|
|
])
|
|
|
const mapStore = useMapStore();
|
|
|
- const store = useRootStore()
|
|
|
+ const store = useRootStore();
|
|
|
+ function goToItem(item){
|
|
|
+ console.log("item",item);
|
|
|
+ let rings = JSON.parse(item.frameSelection)[0];
|
|
|
+ mapStore.changePipeExtent(rings);
|
|
|
+ pipeListShow.value = false;
|
|
|
+ pipeToolShow.value = true;
|
|
|
+ // 分别提取所有的 x 和 y 值
|
|
|
+ const xs = rings.map(point => point[0]);
|
|
|
+ const ys = rings.map(point => point[1]);
|
|
|
+
|
|
|
+ // 使用 Math.min 和 Math.max 计算最小值和最大值
|
|
|
+ const xmin = Math.min(...xs);
|
|
|
+ const xmax = Math.max(...xs);
|
|
|
+ const ymin = Math.min(...ys);
|
|
|
+ const ymax = Math.max(...ys);
|
|
|
+ setExtent({
|
|
|
+ xmin,
|
|
|
+ xmax,
|
|
|
+ ymin,
|
|
|
+ ymax
|
|
|
+ })
|
|
|
+ setPipeTheme(true);
|
|
|
+ AddDataArea({
|
|
|
+ is_clear:false,
|
|
|
+ position:[
|
|
|
+ {
|
|
|
+ rings
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ })
|
|
|
+ }
|
|
|
function currentTime(type) {
|
|
|
let date
|
|
|
if(type =="current"){
|
|
@@ -214,7 +273,14 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
function changeChildTool(item){
|
|
|
- let currentCode = item.code === props.currentToolSmall?'':item.code
|
|
|
+ let currentCode = item.code === props.currentToolSmall?'':item.code;
|
|
|
+ if(props.currentTool === 'pipeAnalysis'){
|
|
|
+ addDataLine(true,[
|
|
|
+ {
|
|
|
+ paths:mapStore.pipeExtent
|
|
|
+ }
|
|
|
+ ])
|
|
|
+ }
|
|
|
if (props.currentTool === 'sunAna'){
|
|
|
// setMapSumAna(false);
|
|
|
getDefinedLayer(true);
|
|
@@ -347,26 +413,21 @@ export default {
|
|
|
user_id:store.userInfo.gxjh_usercode
|
|
|
}).then(res => {
|
|
|
let data = res.data.Rows;
|
|
|
- console.log("rings",data)
|
|
|
if(data.length >0){
|
|
|
- let rings = [];
|
|
|
- data.forEach((item) =>{
|
|
|
- rings.push(JSON.parse(item.frameSelection));
|
|
|
- })
|
|
|
- setPipeTheme(true);
|
|
|
- Draw3DExtent({
|
|
|
- status:"show",
|
|
|
- rings:rings
|
|
|
+ pipeListShow.value = true;
|
|
|
+ pipeList.value = data
|
|
|
+ }else{
|
|
|
+ pipeListShow.value = false
|
|
|
+ showMessage({
|
|
|
+ type:"warning",
|
|
|
+ message:"当前用户并无申请内容,请前往资源中心申请后使用"
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
-
|
|
|
- importantAreaPosition(-270, -1308, 266, 9, 46,true);
|
|
|
}else{
|
|
|
+ pipeListShow.value = false;
|
|
|
+ pipeToolShow.value =false;
|
|
|
setPipeTheme(false);
|
|
|
- Draw3DExtent({
|
|
|
- status:"hide"
|
|
|
- })
|
|
|
}
|
|
|
|
|
|
if (currentCode === 'pqAna'){
|
|
@@ -931,7 +992,11 @@ export default {
|
|
|
currentBaseMap,
|
|
|
is3d,
|
|
|
changeIs3d,
|
|
|
- urlTheme
|
|
|
+ urlTheme,
|
|
|
+ pipeList,
|
|
|
+ goToItem,
|
|
|
+ pipeListShow,
|
|
|
+ pipeToolShow,
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -1014,4 +1079,52 @@ export default {
|
|
|
background: var(--theme-background-color);
|
|
|
box-shadow: 0px 1px 5px 0px rgba(0, 34, 103, 0.15);
|
|
|
}
|
|
|
+.pipe-table{
|
|
|
+ position: absolute;
|
|
|
+ top: 87px;
|
|
|
+ right:80px;
|
|
|
+ font-size: 16px;
|
|
|
+ min-width: 300px;
|
|
|
+ .pipe-table-title{
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ padding: 16px 24px;
|
|
|
+ border-radius: 4px;
|
|
|
+ border-bottom: 1px solid rgba(0, 170, 255, 0.4);
|
|
|
+ color:var(--theme-font-common-color);
|
|
|
+ .fly_title_name{
|
|
|
+ width: 120px;
|
|
|
+ text-align: left;
|
|
|
+ color:var(--theme-font-common-color);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .fly_content{
|
|
|
+ overflow: auto;
|
|
|
+ width: 100%;
|
|
|
+ max-height: 150px;
|
|
|
+ >ul{
|
|
|
+ list-style-type: none;
|
|
|
+ padding: 0px;
|
|
|
+ margin:0px 24px;
|
|
|
+ .fly_item{
|
|
|
+ align-items: center;
|
|
|
+ display: flex;
|
|
|
+ padding: 12px 0px;
|
|
|
+ justify-content: flex-start;
|
|
|
+ color:var(--theme-font-common-color);
|
|
|
+ .fly_name{
|
|
|
+ padding-left: 10px;
|
|
|
+ cursor: pointer;
|
|
|
+ width: 200px;
|
|
|
+ text-align: left;
|
|
|
+ white-space: nowrap;
|
|
|
+ overflow: hidden;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|