|
@@ -1,24 +1,14 @@
|
|
|
<template>
|
|
|
- <div class="sm-panel sm-function-module-query" v-if="PoinyQueryShow">
|
|
|
+ <div class="sm-panel sm-function-module-query" v-show="PoinyQueryShow">
|
|
|
<div class="sm-panel-header">
|
|
|
<span>{{ Resource.PoinyQuery }}</span>
|
|
|
<span class="closeBtn" @click="toggleVisibility">×</span>
|
|
|
</div>
|
|
|
<!-- <div class="sm-function-module-content-btn"> -->
|
|
|
<div class="btnList">
|
|
|
- <span
|
|
|
- v-for="(item, index) in actionOptions"
|
|
|
- :key="index"
|
|
|
- class="icon-span"
|
|
|
- :title="item.lable"
|
|
|
- :class="item.isSelect ? 'selected-icon' : ''"
|
|
|
- @click="changleQueryItem(item)"
|
|
|
- >
|
|
|
- <i
|
|
|
- class="iconfont iconSize"
|
|
|
- :class="item.iconName"
|
|
|
- style="margin-top: 0px"
|
|
|
- ></i>
|
|
|
+ <span v-for="(item, index) in actionOptions" :key="index" class="icon-span" :title="item.lable"
|
|
|
+ :class="item.isSelect ? 'selected-icon' : ''" @click="changleQueryItem(item)">
|
|
|
+ <i class="iconfont iconSize" :class="item.iconName" style="margin-top: 0px"></i>
|
|
|
</span>
|
|
|
<!-- <el-button type="primary" size="small" @click.stop="mapLayerQuery"
|
|
|
>点击</el-button
|
|
@@ -29,44 +19,22 @@
|
|
|
</div>
|
|
|
<div class="sm-function-module-content-tabs">
|
|
|
<el-tabs @tab-click="handleTabClick" v-model="activeLayerId">
|
|
|
- <el-tab-pane
|
|
|
- :label="item.label"
|
|
|
- :name="item.id"
|
|
|
- v-for="(item, index) in layerList"
|
|
|
- :key="index"
|
|
|
- ></el-tab-pane>
|
|
|
+ <el-tab-pane :label="item.label" :name="item.id" v-for="(item, index) in layerList" :key="index"></el-tab-pane>
|
|
|
</el-tabs>
|
|
|
</div>
|
|
|
<div class="sm-function-module-content-table">
|
|
|
- <el-collapse
|
|
|
- :value="activeNames"
|
|
|
- @change="handleCollapseChange"
|
|
|
- v-if="
|
|
|
- activeLayerId &&
|
|
|
- queryResults[activeLayerId] &&
|
|
|
- queryResults[activeLayerId].length > 0
|
|
|
- "
|
|
|
- >
|
|
|
- <el-collapse-item
|
|
|
- :title="'查询结果' + (index + 1)"
|
|
|
- :name="'查询结果' + (index + 1)"
|
|
|
- v-for="(item, index) in queryResults[activeLayerId]"
|
|
|
- :key="index"
|
|
|
- >
|
|
|
+ <el-collapse :value="activeNames" @change="handleCollapseChange" v-if="
|
|
|
+ activeLayerId &&
|
|
|
+ queryResults[activeLayerId] &&
|
|
|
+ queryResults[activeLayerId].length > 0
|
|
|
+ ">
|
|
|
+ <el-collapse-item :title="'查询结果' + (index + 1)" :name="'查询结果' + (index + 1)"
|
|
|
+ v-for="(item, index) in queryResults[activeLayerId]" :key="index">
|
|
|
<template slot="title">
|
|
|
查询结果{{ index + 1
|
|
|
- }}<i
|
|
|
- title="定位"
|
|
|
- class="header-icon el-icon-s-promotion flyBtn2"
|
|
|
- @click.stop="flyTo(index)"
|
|
|
- ></i>
|
|
|
+ }}<i title="定位" class="header-icon el-icon-s-promotion flyBtn2" @click.stop="flyTo(index)"></i>
|
|
|
</template>
|
|
|
- <el-table
|
|
|
- :data="item"
|
|
|
- :show-header="false"
|
|
|
- border
|
|
|
- style="width: 100%"
|
|
|
- >
|
|
|
+ <el-table :data="item" :show-header="false" border style="width: 100%">
|
|
|
<el-table-column prop="name" label="字段" width="100">
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="value" label="值" width="208">
|
|
@@ -88,6 +56,7 @@ export default {
|
|
|
name: "clickQuery",
|
|
|
data() {
|
|
|
return {
|
|
|
+ inited: false,
|
|
|
activeLayerName: "",
|
|
|
columns: [
|
|
|
{
|
|
@@ -138,7 +107,8 @@ export default {
|
|
|
return store.state.toolBar[9];
|
|
|
},
|
|
|
},
|
|
|
- created() {},
|
|
|
+ created() {
|
|
|
+ },
|
|
|
watch: {
|
|
|
activeLayerId(val) {
|
|
|
if (val && val != "0") {
|
|
@@ -155,16 +125,18 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ PoinyQueryShow(val) {
|
|
|
+ if (!this.inited) {
|
|
|
+ this.inited = !this.inited;
|
|
|
+ this.viewer = viewer;
|
|
|
+ this.viewer.entities.removeAll();
|
|
|
+ this.handler = new Cesium.ScreenSpaceEventHandler(viewer.scene.canvas);
|
|
|
+ this.dataSourceLayer = new Cesium.CustomDataSource("query");
|
|
|
+ this.viewer.dataSources.add(this.dataSourceLayer);
|
|
|
+ }
|
|
|
+ }
|
|
|
},
|
|
|
mounted() {
|
|
|
- //this.mapLayerQuery();
|
|
|
- this.$nextTick((res) => {
|
|
|
- this.viewer = viewer;
|
|
|
- this.viewer.entities.removeAll();
|
|
|
- this.handler = new Cesium.ScreenSpaceEventHandler(viewer.scene.canvas);
|
|
|
- this.dataSourceLayer = new Cesium.CustomDataSource("query");
|
|
|
- this.viewer.dataSources.add(this.dataSourceLayer);
|
|
|
- });
|
|
|
},
|
|
|
methods: {
|
|
|
toggleVisibility() {
|