| | |
| | | //======================= |
| | | window.Viewer.imageryLayers.removeAll(); |
| | | |
| | | Viewer.scene.globe.depthTestAgainstTerrain = false; // å¼å¯æ·±åº¦æµè¯ |
| | | Viewer.animation.container.style.visibility = "hidden"; |
| | | Viewer.timeline.container.style.visibility = "hidden"; |
| | | //======================= |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="Echarts_box" :style="{ width: width, height: height }"> |
| | | <div id="myEcharts1" style="width: 100%; height: 100%"></div> |
| | | </div> |
| | | </template> |
| | | <script lang="ts" setup> |
| | | import { |
| | | ref, |
| | | onMounted, |
| | | onBeforeUnmount, |
| | | reactive, |
| | | defineProps, |
| | | defineEmits, |
| | | watch, |
| | | onUnmounted, |
| | | } from "vue"; |
| | | import * as echarts from "echarts"; |
| | | |
| | | //defineProps æ¥æ¥æ¶ç»ä»¶çä¼ å¼ |
| | | const props = defineProps({ |
| | | width: String, |
| | | height: String, |
| | | }); |
| | | let myEcharts = echarts; |
| | | onMounted(() => { |
| | | initChart(); |
| | | }); |
| | | |
| | | onUnmounted(() => { |
| | | myEcharts.dispose; |
| | | }); |
| | | |
| | | function initChart() { |
| | | let chart = myEcharts.init( |
| | | document.getElementById("myEcharts1"), |
| | | "purple-passion" |
| | | ); |
| | | chart.setOption({ |
| | | title: { |
| | | text: "", |
| | | left: "center", |
| | | }, |
| | | toolbox: { |
| | | show: true, //æ¯å¦æ¾ç¤ºå·¥å
·æ ç»ä»¶ |
| | | orient: "horizontal", //å·¥å
·æ icon çå¸å±æå'horizontal' 'vertical' |
| | | itemSize: 15, //å·¥å
·æ icon çå¤§å° |
| | | itemGap: 10, //å·¥å
·æ icon æ¯é¡¹ä¹é´çé´é |
| | | showTitle: true, //æ¯å¦å¨é¼ æ hover çæ¶åæ¾ç¤ºæ¯ä¸ªå·¥å
· icon çæ é¢ |
| | | feature: { |
| | | mark: { |
| | | // 'è¾
å©çº¿å¼å
³' |
| | | show: true, |
| | | }, |
| | | // dataView : { //æ°æ®è§å¾å·¥å
·ï¼å¯ä»¥å±ç°å½åå¾è¡¨æç¨çæ°æ®ï¼ç¼è¾åå¯ä»¥å¨ææ´æ° |
| | | // show: true, //æ¯å¦æ¾ç¤ºè¯¥å·¥å
·ã |
| | | // title:"æ°æ®è§å¾", |
| | | // readOnly: false, //æ¯å¦ä¸å¯ç¼è¾ï¼åªè¯»ï¼ |
| | | // lang: ['æ°æ®è§å¾', 'å
³é', 'å·æ°'], //æ°æ®è§å¾ä¸æä¸ä¸ªè¯æ¯ï¼é»è®¤æ¯['æ°æ®è§å¾', 'å
³é', 'å·æ°'] |
| | | // backgroundColor:"#fff", //æ°æ®è§å¾æµ®å±èæ¯è²ã |
| | | // textareaColor:"#fff", //æ°æ®è§å¾æµ®å±ææ¬è¾å
¥åºèæ¯è² |
| | | // textareaBorderColor:"#333", //æ°æ®è§å¾æµ®å±ææ¬è¾å
¥åºè¾¹æ¡é¢è² |
| | | // textColor:"#000", //ææ¬é¢è²ã |
| | | // buttonColor:"#c23531", //æé®é¢è²ã |
| | | // buttonTextColor:"#fff", //æé®ææ¬é¢è²ã |
| | | // }, |
| | | // magicType: { //å¨æç±»å忢 |
| | | // show: true, |
| | | // title:"忢", //å个类åçæ é¢ææ¬ï¼å¯ä»¥åå«é
ç½®ã |
| | | // type: ['line', 'bar'], //å¯ç¨çå¨æç±»åï¼å
æ¬'line'ï¼åæ¢ä¸ºæçº¿å¾ï¼, 'bar'ï¼åæ¢ä¸ºæ±ç¶å¾ï¼, 'stack'ï¼åæ¢ä¸ºå å æ¨¡å¼ï¼, 'tiled'ï¼åæ¢ä¸ºå¹³éºæ¨¡å¼ï¼ |
| | | // }, |
| | | // restore : { //é
置项è¿åã |
| | | // show: true, //æ¯å¦æ¾ç¤ºè¯¥å·¥å
·ã |
| | | // title:"è¿å", |
| | | // }, |
| | | saveAsImage: { |
| | | //ä¿å为å¾çã |
| | | show: true, //æ¯å¦æ¾ç¤ºè¯¥å·¥å
·ã |
| | | type: "png", //ä¿åçå¾çæ ¼å¼ãæ¯æ 'png' å 'jpeg'ã |
| | | name: "pic1", //ä¿åçæä»¶åç§°ï¼é»è®¤ä½¿ç¨ title.text ä½ä¸ºåç§° |
| | | backgroundColor: "#ffffff", //ä¿åçå¾çèæ¯è²ï¼é»è®¤ä½¿ç¨ backgroundColorï¼å¦æbackgroundColorä¸åå¨çè¯ä¼åç½è² |
| | | title: "ä¿å为å¾ç", |
| | | pixelRatio: 1, //ä¿åå¾ççåè¾¨çæ¯ä¾ï¼é»è®¤è·å®¹å¨ç¸å大å°ï¼å¦æéè¦ä¿åæ´é«å辨ççï¼å¯ä»¥è®¾ç½®ä¸ºå¤§äº 1 çå¼ï¼ä¾å¦ 2 |
| | | }, |
| | | // dataZoom :{ //æ°æ®åºå缩æ¾ãç®ååªæ¯æç´è§åæ ç³»çç¼©æ¾ |
| | | // show: true, //æ¯å¦æ¾ç¤ºè¯¥å·¥å
·ã |
| | | // title:"缩æ¾", //缩æ¾åè¿åçæ é¢ææ¬ |
| | | // xAxisIndex:0, //æå®åªäº xAxis 被æ§å¶ãå¦æç¼ºçåæ§å¶ææçxè½´ãå¦æè®¾ç½®ä¸º false å䏿§å¶ä»»ä½xè½´ãå¦æè®¾ç½®æ 3 åæ§å¶ axisIndex 为 3 çxè½´ãå¦æè®¾ç½®ä¸º [0, 3] åæ§å¶ axisIndex 为 0 å 3 çxè½´ |
| | | // yAxisIndex:false, //æå®åªäº yAxis 被æ§å¶ãå¦æç¼ºçåæ§å¶ææçyè½´ãå¦æè®¾ç½®ä¸º false å䏿§å¶ä»»ä½yè½´ãå¦æè®¾ç½®æ 3 åæ§å¶ axisIndex 为 3 çyè½´ãå¦æè®¾ç½®ä¸º [0, 3] åæ§å¶ axisIndex 为 0 å 3 çyè½´ |
| | | // }, |
| | | }, |
| | | zlevel: 0, //æå±å¾å½¢çCanvasåå±ï¼zlevel 大ç Canvas 伿¾å¨ zlevel å°ç Canvas çä¸é¢ |
| | | z: 2, //æå±ç»ä»¶çzåå±ï¼zå¼å°çå¾å½¢ä¼è¢«zå¼å¤§çå¾å½¢è¦ç |
| | | left: "right", //ç»ä»¶ç¦»å®¹å¨å·¦ä¾§çè·ç¦»,'left', 'center', 'right','20%' |
| | | top: "top", //ç»ä»¶ç¦»å®¹å¨ä¸ä¾§çè·ç¦»,'top', 'middle', 'bottom','20%' |
| | | right: "auto", //ç»ä»¶ç¦»å®¹å¨å³ä¾§çè·ç¦»,'20%' |
| | | bottom: "auto", //ç»ä»¶ç¦»å®¹å¨ä¸ä¾§çè·ç¦»,'20%' |
| | | width: "auto", //å¾ä¾å®½åº¦ |
| | | height: "auto", //å¾ä¾é«åº¦ |
| | | }, |
| | | |
| | | legend: { |
| | | data: [], |
| | | }, |
| | | xAxis: { |
| | | type: "category", |
| | | data: [ |
| | | "䏿", |
| | | "äºæ", |
| | | "䏿", |
| | | "åæ", |
| | | "äºæ", |
| | | "å
æ", |
| | | "䏿", |
| | | "å
«æ", |
| | | "乿", |
| | | "åæ", |
| | | "å䏿", |
| | | "åäºæ", |
| | | ], |
| | | }, |
| | | tooltip: { |
| | | trigger: "axis", |
| | | }, |
| | | yAxis: { |
| | | type: "value", |
| | | }, |
| | | series: [ |
| | | { |
| | | data: [606, 542, 985, 687, 501, 787, 339, 706, 383, 684, 669, 737], |
| | | type: "line", |
| | | smooth: true, |
| | | symbol: "none", //åæ¶æç¹åå |
| | | itemStyle: { |
| | | normal: { |
| | | label: { |
| | | show: false, |
| | | position: "top", |
| | | formatter: "{c}", |
| | | }, |
| | | }, |
| | | }, |
| | | }, |
| | | ], |
| | | }); |
| | | window.onresize = function () { |
| | | chart.resize(); |
| | | }; |
| | | } |
| | | </script> |
| | | <style lang="less" scoped> |
| | | .Echarts_box { |
| | | background: #fff; |
| | | } |
| | | </style> |
| | |
| | | }, |
| | | ], |
| | | // è¿æ¯å¯¹åºbody常éç表头 |
| | | ["layerName", "min", "max", "avg", "lng", "lat"], |
| | | ["layerName", "min", "max", "avg", "lon", "lat"], |
| | | ]; |
| | | body.unshift(...header); // å°å®ä¹å¥½ç表头添å å° body ä¸ |
| | | const sheet = XLSXS.utils.aoa_to_sheet(body); // aoa_to_sheet å°äºç»´æ°ç»è½¬æ sheet |
| | |
| | | positions: Cesium.Cartesian3.fromDegreesArray(std), |
| | | width: 6, |
| | | material: lineColor.value, |
| | | clampToGround: true, |
| | | //clampToGround: true, |
| | | heightReference: Cesium.HeightReference.CLAMP_TO_GROUND, //设置 HeightReference é«åº¦åèç±»å为 CLAMP_TO_GROUND è´´å°ç±»å |
| | | //classificationType: Cesium.ClassificationType.BOTH, //è´´å°å½¢å3dtile BOTH æ CESIUM_3D_TILE æ TERRAIN |
| | | verticalOrigin: Cesium.VerticalOrigin.CENTER, // åç´ä½ç½® |
| | | horizontalOrigin: Cesium.HorizontalOrigin.CENTER, // æ°´å¹³ä½ç½® |
| | | }, |
| | | }); |
| | | var linestring = turf.lineString(coord); |
| | |
| | | outline: true, |
| | | outlineColor: lineColor.value, |
| | | outlineWidth: 2, |
| | | classificationType: Cesium.ClassificationType.BOTH, //è´´å°å½¢å3dtile |
| | | classificationType: Cesium.ClassificationType.BOTH, //è´´å°å½¢å3dtile BOTH æ CESIUM_3D_TILE æ TERRAIN |
| | | clampToGround: true, //å¼å¯è´´å° |
| | | height: 0, |
| | | heightReference: Cesium.HeightReference.CLAMP_TO_GROUND, //设置 HeightReference é«åº¦åèç±»å为 CLAMP_TO_GROUND è´´å°ç±»å |
| | | }, |
| | | }); |
| | | |
| | |
| | | @change="pixelChange" |
| | | > |
| | | <el-option |
| | | v-for="item in options" |
| | | v-for="item in pixeloptions" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | <div class="chart_box" v-if="chartIsshow"> |
| | | <div class="chart" v-if="chartIsshow"> |
| | | <div class="chart_box"> |
| | | <div class="chart_btn"> |
| | | <el-button |
| | | :icon="Search" |
| | | link |
| | | class="linkBtn" |
| | | @click="openDialog" |
| | | ></el-button> |
| | | |
| | | <el-button :icon="Download" link class="linkBtn"></el-button> |
| | | <el-button |
| | | :icon="Delete" |
| | | link |
| | | class="del linkBtn" |
| | | ></el-button> |
| | | </div> |
| | | <Bar-graph :width="'100%'" :height="'260px'"></Bar-graph> |
| | | </div> |
| | | <div class="select_box"> |
| | | <el-select |
| | | v-model="layerValue" |
| | | class="m-2" |
| | | placeholder="éæ©å¾å±" |
| | | size="small" |
| | | > |
| | | <el-option |
| | | v-for="item in layeroptions" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="inquireContent_msg" v-if="!chartIsshow"> |
| | | <div class="inquireContent_msg_k"> |
| | | <span>æåçè¾¹çæ¡</span> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="dialog" v-if="dialogShow" @click.self="dialogShow = false"> |
| | | <div class="chart"> |
| | | <i @click.capture="closeDialog" |
| | | ><el-icon><Close /></el-icon |
| | | ></i> |
| | | <BarGraphAxisLine :width="'856px'" :height="'636px'"></BarGraphAxisLine> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script lang="ts" setup> |
| | |
| | | import { useStore } from "vuex"; // å¼å
¥useStore æ¹æ³ |
| | | //echarts |
| | | import BarGraph from "@/components/BarGraph.vue"; |
| | | import BarGraphAxisLine from "@/components/BarGraphAxisLine.vue"; |
| | | import { saveFSDZJsonToExcel } from "@/utils/downloadCSV.js"; |
| | | import { selectByPoint, selectByPolygon, selectByPolyline } from "@/api/api"; |
| | | import { ElMessage } from "element-plus"; |
| | | import { Search, Delete, Download } from "@element-plus/icons-vue"; |
| | | const store = useStore(); // è¯¥æ¹æ³ç¨äºè¿åstore å®ä¾ |
| | | const emits = defineEmits(["setCloseplotting"]); |
| | | let isShow = ref(false); |
| | |
| | | Scop: "", |
| | | pixel: "1", |
| | | }); |
| | | const options = [ |
| | | let layerValue = ref(""); |
| | | const layeroptions = [ |
| | | { |
| | | value: "å¾å±åç§°", |
| | | label: "å¾å±åç§°", |
| | | }, |
| | | { |
| | | value: "å¾å±åç§°", |
| | | label: "å¾å±åç§°", |
| | | }, |
| | | { |
| | | value: "å¾å±åç§°", |
| | | label: "å¾å±åç§°", |
| | | }, |
| | | ]; |
| | | const pixeloptions = [ |
| | | { |
| | | value: "1", |
| | | label: "1Ã1", |
| | |
| | | }, |
| | | ]; |
| | | let resultList = ref([]); |
| | | let dialogShow = ref(false); |
| | | //å
³é |
| | | const closeDialog = () => { |
| | | dialogShow.value = false; |
| | | // alert(1); |
| | | }; |
| | | //æå¼ |
| | | const openDialog = () => { |
| | | dialogShow.value = true; |
| | | }; |
| | | //åç´ éæ© |
| | | const pixelChange = (val) => { |
| | | if (store.state.plottingInquireData.entitiesData.icon == "d.png") { |
| | |
| | | }); |
| | | } |
| | | if (nVal.entitiesData.icon == "m.png") { |
| | | chartIsshow.value = false; |
| | | if (nVal.entitiesData.name == oVal.entitiesData.name) { |
| | | return; |
| | | } |
| | |
| | | selectPolygon({ wkt: nVal.entitiesData.wkt }); |
| | | } |
| | | if (nVal && nVal.entitiesData.icon == "d.png") { |
| | | chartIsshow.value = false; |
| | | selectPoint({ |
| | | pixel: ScopeBox.value.pixel, |
| | | wkt: nVal.entitiesData.wkt, |
| | |
| | | color: #d6e4ff; |
| | | } |
| | | } |
| | | .chart { |
| | | width: 100%; |
| | | } |
| | | .chart_box { |
| | | width: 100%; |
| | | .chart_btn { |
| | | display: flex; |
| | | justify-content: flex-end; |
| | | margin: 0 10px; |
| | | padding-top: 5px; |
| | | padding-bottom: 5px; |
| | | // border-bottom: 1px solid rgba(214, 228, 255, 0.4); |
| | | .linkBtn { |
| | | color: #d6e4ff; |
| | | } |
| | | .del { |
| | | color: red; |
| | | } |
| | | } |
| | | } |
| | | .select_box { |
| | | display: flex; |
| | | justify-content: center; |
| | | padding-bottom: 20px; |
| | | } |
| | | } |
| | | } |
| | | .dialog { |
| | | position: absolute; |
| | | top: 0; |
| | | height: 0; |
| | | width: 100vw; |
| | | height: 100vh; |
| | | background-color: rgba(255, 255, 255, 0.4); |
| | | z-index: 110; |
| | | .chart { |
| | | position: absolute; |
| | | top: 50%; |
| | | left: 50%; |
| | | transform: translate(-50%, -50%); |
| | | background-color: rgb(33, 37, 44); |
| | | padding: 20px; |
| | | i { |
| | | position: absolute; |
| | | right: 2px; |
| | | top: 2px; |
| | | color: #fff; |
| | | font-size: 14px; |
| | | cursor: pointer; |
| | | } |
| | | } |
| | | } |
| | | </style> |