zbcx_ckyc 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/package.json +90 -0
- package/src/plugins/app/com/CesiumTool.js +730 -0
- package/src/plugins/app/com/MapMethods.js +355 -0
- package/src/plugins/app/com/MapTool.vue +772 -0
- package/src/plugins/app/com/MenuRouter.vue +157 -0
- package/src/plugins/app/com/ParamsDes.vue +35 -0
- package/src/plugins/app/com/SelCoorSys.vue +235 -0
- package/src/plugins/app/com/WebProj4.js +32 -0
- package/src/plugins/app/com/measure.js +127 -0
- package/src/plugins/app/com/yx.js +238 -0
- package/src/plugins/app/modelmanagement/D3DrawGraph.js +708 -0
- package/src/plugins/app/modelmanagement/MineralGo.vue +241 -0
- package/src/plugins/app/modelmanagement/MineralModel.vue +1203 -0
- package/src/plugins/app/modelmanagement/ModelCloudmap.vue +69 -0
- package/src/plugins/app/modelmanagement/ModelMst.vue +60 -0
- package/src/plugins/app/modelmanagement/ModelSy.vue +173 -0
- package/src/plugins/app/modelmanagement/ModelTp.vue +51 -0
- package/src/plugins/app/modelmanagement/ModelUpload.vue +774 -0
- package/src/plugins/app/znycpjxt/Api.js +714 -0
- package/src/plugins/app/znycpjxt/Bf/AttFactory.js +25 -0
- package/src/plugins/app/znycpjxt/Bf/IAnomalyhandle.js +102 -0
- package/src/plugins/app/znycpjxt/Bf/IComposeanomaly.js +140 -0
- package/src/plugins/app/znycpjxt/Bf/IContinueanaly.js +138 -0
- package/src/plugins/app/znycpjxt/Bf/IContrastanaly.js +138 -0
- package/src/plugins/app/znycpjxt/Bf/ICustomNode.js +145 -0
- package/src/plugins/app/znycpjxt/Bf/IDerivanaly.js +139 -0
- package/src/plugins/app/znycpjxt/Bf/IFilterananly.js +141 -0
- package/src/plugins/app/znycpjxt/Bf/IMeananaly.js +137 -0
- package/src/plugins/app/znycpjxt/Bf/IModelNodeBase.js +135 -0
- package/src/plugins/app/znycpjxt/Bf/IMoveaverage.js +135 -0
- package/src/plugins/app/znycpjxt/Bf/IReducepole.js +141 -0
- package/src/plugins/app/znycpjxt/Bf/ISmoothanaly.js +135 -0
- package/src/plugins/app/znycpjxt/Bf/ITrendanaly.js +144 -0
- package/src/plugins/app/znycpjxt/Bf/IVector2grd.js +144 -0
- package/src/plugins/app/znycpjxt/Bf/IYcfj.js +84 -0
- package/src/plugins/app/znycpjxt/Bf/IYcxxjs.js +105 -0
- package/src/plugins/app/znycpjxt/Bf/IYgsbtq.js +112 -0
- package/src/plugins/app/znycpjxt/Bf/IYgtxrh.js +112 -0
- package/src/plugins/app/znycpjxt/Bf/Iinteranaly.js +135 -0
- package/src/plugins/app/znycpjxt/Bf/index.js +44 -0
- package/src/plugins/app/znycpjxt/Bf/input/InputData.js +21 -0
- package/src/plugins/app/znycpjxt/Bf/input/InputExcel.js +28 -0
- package/src/plugins/app/znycpjxt/Bf/input/InputKd.js +31 -0
- package/src/plugins/app/znycpjxt/Bqqd/Bqqd.vue +380 -0
- package/src/plugins/app/znycpjxt/Bqqd/BqqdMap.vue +1046 -0
- package/src/plugins/app/znycpjxt/Bqqd/SetOpacity.vue +101 -0
- package/src/plugins/app/znycpjxt/Bqqd/SjzxTree.vue +244 -0
- package/src/plugins/app/znycpjxt/Bqqd/YclsjjTree.vue +212 -0
- package/src/plugins/app/znycpjxt/Bqqd/api/DsjzxApi.js +37 -0
- package/src/plugins/app/znycpjxt/Ckycmx/Ckycmx.vue +161 -0
- package/src/plugins/app/znycpjxt/Ckycmx/Ckycmxgl/CfgGloalParams.vue +92 -0
- package/src/plugins/app/znycpjxt/Ckycmx/Ckycmxgl/CfgNodeFlds.vue +102 -0
- package/src/plugins/app/znycpjxt/Ckycmx/Ckycmxgl/CfgNodeParams.vue +277 -0
- package/src/plugins/app/znycpjxt/Ckycmx/Ckycmxgl/Ckycmxgl.vue +303 -0
- package/src/plugins/app/znycpjxt/Ckycmx/Ckycmxgl/SetLabelParam.vue +68 -0
- package/src/plugins/app/znycpjxt/Ckycmx/Ckycmxgl/SetModelParam.vue +69 -0
- package/src/plugins/app/znycpjxt/Ckycmx/Ckycmxtab/Ckycmxtab.vue +107 -0
- package/src/plugins/app/znycpjxt/Ckycmx/Ckycmxtab/Dtzzylwl.vue +156 -0
- package/src/plugins/app/znycpjxt/Ckycmx/Ckycmxtab/Jjsjwl.vue +230 -0
- package/src/plugins/app/znycpjxt/Ckycmx/Ckycmxtab/Sjsl.vue +126 -0
- package/src/plugins/app/znycpjxt/Ckycmx/Ckycmxtab/Zcxlj.vue +128 -0
- package/src/plugins/app/znycpjxt/Ckycmx/Ckycmxtab/Zjq.vue +123 -0
- package/src/plugins/app/znycpjxt/Ckycmx/Ckycmxtab/Zstp.vue +271 -0
- package/src/plugins/app/znycpjxt/Ckycmx/Ckycmxtab/Zzylwl.vue +149 -0
- package/src/plugins/app/znycpjxt/Ckycmx/Ckycmxtab/coms/ParamsData.vue +323 -0
- package/src/plugins/app/znycpjxt/Ckycmx/Ckycmxtab/coms/ParamsDataNew.vue +336 -0
- package/src/plugins/app/znycpjxt/Ckycmx/Ckycmxtab/coms/QqtEcharts.vue +137 -0
- package/src/plugins/app/znycpjxt/Ckycmx/Ckycrwgl/Ckycrwgl.vue +290 -0
- package/src/plugins/app/znycpjxt/CusTools/CodeApi.js +83 -0
- package/src/plugins/app/znycpjxt/CusTools/CodeEditor/CodeEditor.md +36 -0
- package/src/plugins/app/znycpjxt/CusTools/CodeEditor/CodeEditor.vue +227 -0
- package/src/plugins/app/znycpjxt/CusTools/CodeEditor/PlugCodeEditor.vue +78 -0
- package/src/plugins/app/znycpjxt/CusTools/CodeEditor/demo/basic.png +0 -0
- package/src/plugins/app/znycpjxt/CusTools/CodeEditor/demo/basic.vue +27 -0
- package/src/plugins/app/znycpjxt/CusTools/DmbjForm.vue +76 -0
- package/src/plugins/app/znycpjxt/CusTools/DmfbForm.vue +351 -0
- package/src/plugins/app/znycpjxt/CusTools/GjForm.vue +206 -0
- package/src/plugins/app/znycpjxt/CusTools/Gjbjyfb.vue +200 -0
- package/src/plugins/app/znycpjxt/CusTools/ParamSelect.vue +222 -0
- package/src/plugins/app/znycpjxt/CusTools/ParamSelect2.vue +204 -0
- package/src/plugins/app/znycpjxt/CusTools/Zngjj.vue +105 -0
- package/src/plugins/app/znycpjxt/DataAnlyModel/DataAnlyModel.vue +134 -0
- package/src/plugins/app/znycpjxt/DataAnlyModel/Hgfx/HgfxEcharts.vue +98 -0
- package/src/plugins/app/znycpjxt/DataAnlyModel/Hgfx/HgfxTab.vue +73 -0
- package/src/plugins/app/znycpjxt/DataAnlyModel/Hgfx.vue +101 -0
- package/src/plugins/app/znycpjxt/DataAnlyModel/Jctj/JctjjgTab.vue +70 -0
- package/src/plugins/app/znycpjxt/DataAnlyModel/Jctj/Plzft.vue +154 -0
- package/src/plugins/app/znycpjxt/DataAnlyModel/Jctj.vue +118 -0
- package/src/plugins/app/znycpjxt/DataAnlyModel/Jlfx/JlfxImg.vue +80 -0
- package/src/plugins/app/znycpjxt/DataAnlyModel/Jlfx.vue +91 -0
- package/src/plugins/app/znycpjxt/DataAnlyModel/PCAfx/PcaTab.vue +161 -0
- package/src/plugins/app/znycpjxt/DataAnlyModel/PCAfx.vue +101 -0
- package/src/plugins/app/znycpjxt/DataAnlyModel/Qqt/QqtEcharts.vue +202 -0
- package/src/plugins/app/znycpjxt/DataAnlyModel/Qqt.vue +88 -0
- package/src/plugins/app/znycpjxt/DataAnlyModel/Xgxfx/XgxfxImg.vue +80 -0
- package/src/plugins/app/znycpjxt/DataAnlyModel/Xgxfx.vue +96 -0
- package/src/plugins/app/znycpjxt/DatasetMan/CreateDataset.vue +296 -0
- package/src/plugins/app/znycpjxt/DatasetMan/DatasetMan.vue +141 -0
- package/src/plugins/app/znycpjxt/DatasetMan/PreData.js +91 -0
- package/src/plugins/app/znycpjxt/DatasetMan/PreData.vue +545 -0
- package/src/plugins/app/znycpjxt/DatasetMan/PreDataApi.js +101 -0
- package/src/plugins/app/znycpjxt/DatasetMan/SelData.vue +186 -0
- package/src/plugins/app/znycpjxt/DatasetMan/SjTree.vue +130 -0
- package/src/plugins/app/znycpjxt/DatasetMan/Sjj.vue +478 -0
- package/src/plugins/app/znycpjxt/DatasetMan/Yclsjj.vue +445 -0
- package/src/plugins/app/znycpjxt/DatasetMan/Yssjj.vue +389 -0
- package/src/plugins/app/znycpjxt/DocList/DocList.vue +496 -0
- package/src/plugins/app/znycpjxt/DocList/unit/DocItem.vue +137 -0
- package/src/plugins/app/znycpjxt/ExceptHandlModel/AnomalyExtraction/Dchj.vue +107 -0
- package/src/plugins/app/znycpjxt/ExceptHandlModel/AnomalyExtraction/GeophysicalAnomaly.vue +115 -0
- package/src/plugins/app/znycpjxt/ExceptHandlModel/AnomalyExtraction/Jxyt.vue +98 -0
- package/src/plugins/app/znycpjxt/ExceptHandlModel/AnomalyExtraction/Lbjs.vue +127 -0
- package/src/plugins/app/znycpjxt/ExceptHandlModel/AnomalyExtraction/Pjcjs.vue +103 -0
- package/src/plugins/app/znycpjxt/ExceptHandlModel/AnomalyExtraction/Qdjs.vue +103 -0
- package/src/plugins/app/znycpjxt/ExceptHandlModel/ExceptHandlModel.vue +163 -0
- package/src/plugins/app/znycpjxt/ExceptHandlModel/GeneralCalculation/Cdjs.vue +102 -0
- package/src/plugins/app/znycpjxt/ExceptHandlModel/GeneralCalculation/Czfx.vue +163 -0
- package/src/plugins/app/znycpjxt/ExceptHandlModel/GeneralCalculation/GetFormData.vue +343 -0
- package/src/plugins/app/znycpjxt/ExceptHandlModel/GeneralCalculation/Hdpj.vue +100 -0
- package/src/plugins/app/znycpjxt/ExceptHandlModel/GeneralCalculation/Pjtd.vue +90 -0
- package/src/plugins/app/znycpjxt/ExceptHandlModel/GeneralCalculation/Qsfx.vue +109 -0
- package/src/plugins/app/znycpjxt/ExceptHandlModel/GeneralCalculation/ResultOnlyData.vue +121 -0
- package/src/plugins/app/znycpjxt/ExceptHandlModel/GeneralCalculation/ResultTable.vue +231 -0
- package/src/plugins/app/znycpjxt/ExceptHandlModel/GeneralCalculation/UniversalComputing.vue +139 -0
- package/src/plugins/app/znycpjxt/ExceptHandlModel/GeneralCalculation/Xgxsjs.vue +93 -0
- package/src/plugins/app/znycpjxt/ExceptHandlModel/GeneralCalculation/Xxsjs.vue +90 -0
- package/src/plugins/app/znycpjxt/ExceptHandlModel/GeneralCalculation/Ycfj.vue +116 -0
- package/src/plugins/app/znycpjxt/ExceptHandlModel/GeneralCalculation/Yhcl.vue +100 -0
- package/src/plugins/app/znycpjxt/ExceptHandlModel/extgeoanomalies/AnomalsGard.vue +91 -0
- package/src/plugins/app/znycpjxt/ExceptHandlModel/extgeoanomalies/Dqhxycht.vue +113 -0
- package/src/plugins/app/znycpjxt/ExceptHandlModel/extgeoanomalies/GeocAnomalies.vue +99 -0
- package/src/plugins/app/znycpjxt/ExceptHandlModel/extgeoanomalies/JgTableList.vue +203 -0
- package/src/plugins/app/znycpjxt/ExceptHandlModel/extgeoanomalies/Lszcl.vue +110 -0
- package/src/plugins/app/znycpjxt/ExceptHandlModel/extgeoanomalies/Ycxxjs.vue +116 -0
- package/src/plugins/app/znycpjxt/ExceptHandlModel/geoAnomalyExtraction/GeoAnomalyExtraction.vue +108 -0
- package/src/plugins/app/znycpjxt/ExceptHandlModel/geoAnomalyExtraction/coms/AttWeight.vue +99 -0
- package/src/plugins/app/znycpjxt/ExceptHandlModel/geoAnomalyExtraction/coms/Ckdctq.vue +98 -0
- package/src/plugins/app/znycpjxt/ExceptHandlModel/geoAnomalyExtraction/coms/LeftForm.vue +266 -0
- package/src/plugins/app/znycpjxt/ExceptHandlModel/ygyctq/Ygsbtq.vue +150 -0
- package/src/plugins/app/znycpjxt/ExceptHandlModel/ygyctq/Ygtxrh.vue +107 -0
- package/src/plugins/app/znycpjxt/ExceptHandlModel/ygyctq/ygyctq.vue +98 -0
- package/src/plugins/app/znycpjxt/Index/DataCard.vue +45 -0
- package/src/plugins/app/znycpjxt/Index/Index.vue +123 -0
- package/src/plugins/app/znycpjxt/Rzgl/Rzgl.vue +156 -0
- package/src/plugins/app/znycpjxt/coms/CmapColor.vue +70 -0
- package/src/plugins/app/znycpjxt/coms/CustomFileView.vue +343 -0
- package/src/plugins/app/znycpjxt/coms/CustomForm.vue +220 -0
- package/src/plugins/app/znycpjxt/coms/GrdView.vue +355 -0
- package/src/plugins/app/znycpjxt/coms/LeftForm.vue +195 -0
- package/src/plugins/app/znycpjxt/coms/MakeData.js +472 -0
- package/src/plugins/app/znycpjxt/coms/PreView.js +55 -0
- package/src/plugins/app/znycpjxt/coms/RightContent.vue +71 -0
- package/src/plugins/app/znycpjxt/coms/TableEarth.vue +259 -0
- package/src/plugins/app/znycpjxt/intellPred/ModelList.vue +200 -0
- package/src/plugins/app/znycpjxt/intellPred/coms/D3DrawGraph.js +634 -0
- package/src/plugins/app/znycpjxt/intellPred/coms/MineralGo.vue +249 -0
- package/src/plugins/app/znycpjxt/intellPred/coms/ModelCard.vue +298 -0
- package/src/plugins/app/znycpjxt/intellPred/coms/ModelEdit.vue +292 -0
- package/src/plugins/app/znycpjxt/intellPred/coms/ModelSpecif.vue +46 -0
- package/src/plugins/app/znycpjxt/intellPred/intellPred.vue +71 -0
- package/src/plugins/bf/BfApi.js +92 -0
- package/src/plugins/bf/BfColAdd.vue +78 -0
- package/src/plugins/bf/BfColEdit.vue +68 -0
- package/src/plugins/bf/BfColFilter.vue +112 -0
- package/src/plugins/bf/BfDataGroup.vue +80 -0
- package/src/plugins/bf/BfDataPreview.vue +118 -0
- package/src/plugins/bf/BfDataStat.vue +81 -0
- package/src/plugins/bf/BfDuplicateDel.vue +82 -0
- package/src/plugins/bf/BfProcCall.vue +82 -0
- package/src/plugins/bf/BfRunHis.vue +289 -0
- package/src/plugins/bf/BfRunParams.vue +94 -0
- package/src/plugins/bf/BfSaveFlow.vue +186 -0
- package/src/plugins/bf/BfSelFlow.vue +123 -0
- package/src/plugins/bf/BfTabCombine.vue +127 -0
- package/src/plugins/bf/BfTabJoin.vue +108 -0
- package/src/plugins/bf/BfTabMerge.vue +68 -0
- package/src/plugins/bf/BfTabReader.vue +126 -0
- package/src/plugins/bf/BfValFormat.vue +68 -0
- package/src/plugins/bf/BfValNumber.vue +68 -0
- package/src/plugins/bf/BfValProc.vue +78 -0
- package/src/plugins/bf/BfValSort.vue +78 -0
- package/src/plugins/bf/BiFlow.vue +1177 -0
- package/src/plugins/bf/IBfPlug.js +205 -0
- package/src/plugins/bf/coms/ColAdd.vue +75 -0
- package/src/plugins/bf/coms/ColEdit.vue +52 -0
- package/src/plugins/bf/coms/ColList.vue +91 -0
- package/src/plugins/bf/coms/DataGroup.vue +90 -0
- package/src/plugins/bf/coms/DataStat.vue +67 -0
- package/src/plugins/bf/coms/EditTable.vue +161 -0
- package/src/plugins/bf/coms/NodeTree.vue +105 -0
- package/src/plugins/bf/coms/PlugCmd.vue +95 -0
- package/src/plugins/bf/coms/RunParams.vue +68 -0
- package/src/plugins/bf/coms/TabCombine.vue +60 -0
- package/src/plugins/bf/coms/TabJoin.vue +69 -0
- package/src/plugins/bf/coms/ValFormat.vue +53 -0
- package/src/plugins/bf/coms/ValProc.vue +77 -0
- package/src/plugins/bf/coms/ValSort.vue +89 -0
- package/src/plugins/bf/parts/Icon.vue +105 -0
- package/src/plugins/bf/parts/Rect.vue +98 -0
- package/src/plugins/bf/parts/index.js +11 -0
- package/src/plugins/cxMixin/IAttBase.js +78 -0
- package/src/plugins/cxMixin/IAttDlg.js +45 -0
- package/src/plugins/cxMixin/IAttProc.js +98 -0
- package/src/plugins/cxMixin/IComBase.js +42 -0
- package/src/plugins/cxMixin/IContextMenu.js +74 -0
- package/src/plugins/cxMixin/IDataAcce.js +1106 -0
- package/src/plugins/cxMixin/IDataList.js +775 -0
- package/src/plugins/cxMixin/IDataMan.js +1670 -0
- package/src/plugins/cxMixin/IDataMan2.js +2561 -0
- package/src/plugins/cxMixin/IDataProc.js +379 -0
- package/src/plugins/cxMixin/IDatagrid.js +234 -0
- package/src/plugins/cxMixin/IEditableDg.js +477 -0
- package/src/plugins/cxMixin/IExpBase.js +51 -0
- package/src/plugins/cxMixin/IFormBase.js +29 -0
- package/src/plugins/cxMixin/IGridBpm.js +732 -0
- package/src/plugins/cxMixin/IGridData.js +109 -0
- package/src/plugins/cxMixin/IOperMore.js +323 -0
- package/src/plugins/cxMixin/IPlugBase.js +341 -0
- package/src/plugins/cxMixin/ISendCode.js +86 -0
- package/src/plugins/cxMixin/ISinglePage.js +112 -0
- package/src/plugins/cxMixin/ITags.js +81 -0
- package/src/plugins/cxe/CxeMap.vue +61 -0
- package/src/plugins/home/HeadNav.vue +194 -0
- package/src/plugins/home/Home.vue +59 -0
- package/src/plugins/home/HomePage.vue +237 -0
- package/src/plugins/home/Login.vue +139 -0
- package/src/plugins/zbcxCesium/coms/GraDrawBarWgt.vue +176 -0
- package/src/plugins/zbcxCesium/coms/baseMapSwitch/BaseMap.scss +42 -0
- package/src/plugins/zbcxCesium/coms/baseMapSwitch/BaseMap.vue +59 -0
- package/src/plugins/zbcxCesium/coms/dataPreview/DataPreview.vue +526 -0
- package/src/plugins/zbcxCesium/coms/dataPreview/DataPreviewPlug.vue +79 -0
- package/src/plugins/zbcxCesium/coms/dataPreview/ReadShpFile.js +42 -0
- package/src/plugins/zbcxCesium/coms/legend/Legend.vue +78 -0
- package/src/plugins/zbcxCesium/coms/popup/dialog-left-bg.png +0 -0
- package/src/plugins/zbcxCesium/coms/popup/index.js +88 -0
- package/src/plugins/zbcxCesium/coms/popup/index.vue +93 -0
- package/src/plugins/zbcxCesium/pub/LoadGeojson.js +44 -0
- package/src/plugins/zbcxCesium/pub/LoadModel.js +128 -0
- package/src/plugins/zbcxCesium/pub/LoadOgc.js +226 -0
- package/src/plugins/zbcxCesium/pub/Opacity.vue +139 -0
- package/src/plugins/zbcxCesium/pub/PubCxe.js +97 -0
- package/src/plugins/zbcxCesium/pub/SceneSet.vue +178 -0
- package/src/plugins/zbcxCesium/pub/ShowEffect.vue +216 -0
- package/src/plugins/zbcxCesium/pub/TMeasure.vue +122 -0
- package/src/plugins/zbcxCesium/pub/ToDefView3.vue +109 -0
- package/src/plugins/zbcxCesium/pub/getWmsGetCapabilities.js +127 -0
- package/src/plugins/zbcxCesium/utils/ShpToGeoJson.js +24 -0
- package/src/plugins/zbcxCesium/utils/WebProj4.js +32 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
<style lang='scss' scoped>
|
|
2
|
+
// 1、定位:position, display, float, left, right, top, bottom, overflow, clear, z-index
|
|
3
|
+
// 2、自身:width, height, padding, border, margin, background
|
|
4
|
+
// 3、文字:font-family, font-size, font-style, font-weight, font-varient, color, letter-spacing, color, text-align
|
|
5
|
+
// 4、文本:text-align, vertical-align, text-wrap, text-transform, text-indent, text-decoration, letter-spacing, word-spacing, white-space, text-overflow
|
|
6
|
+
// 5、其他:content, box-shadow, border-radius, transform
|
|
7
|
+
.legendBox{width:1.5rem;max-height: 5rem;display: flex;align-items: center;padding: 0.02rem;}
|
|
8
|
+
header{text-align: center;font-size: 20px;font-weight: 700;color:#fff;}
|
|
9
|
+
.legend{overflow:auto;max-height: 5rem;border-radius: .05rem;}
|
|
10
|
+
::-webkit-scrollbar{width:0.04rem;height:0.04rem;}
|
|
11
|
+
</style>
|
|
12
|
+
|
|
13
|
+
<template>
|
|
14
|
+
<!-- 标签语义化:header、nav、main、article、aside、footer、section -->
|
|
15
|
+
<div class="legend">
|
|
16
|
+
<!-- <header>图例</header> -->
|
|
17
|
+
<div v-for="legend in legendList" :key="legend.name" class="legendBox">
|
|
18
|
+
<img :src="getSrc(legend)"/>
|
|
19
|
+
<p>{{legend.name}}</p>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
</template>
|
|
23
|
+
|
|
24
|
+
<script>
|
|
25
|
+
/**
|
|
26
|
+
* 组件名称: 图例组件
|
|
27
|
+
*
|
|
28
|
+
* 调用说明:
|
|
29
|
+
* @prop {Array} legendList 图例数组
|
|
30
|
+
* @prop {String} legendList.name 图例名
|
|
31
|
+
* @prop {String} legendList.url 图例图片
|
|
32
|
+
*/
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* 维护历史:
|
|
36
|
+
* 2023-9-4 张光辉 首次编写
|
|
37
|
+
*/
|
|
38
|
+
|
|
39
|
+
export default
|
|
40
|
+
{
|
|
41
|
+
mixins: [],
|
|
42
|
+
components: {},
|
|
43
|
+
props:
|
|
44
|
+
{
|
|
45
|
+
legendList: { type: Array, default: () => [] } // 图例数据
|
|
46
|
+
},
|
|
47
|
+
data()
|
|
48
|
+
{
|
|
49
|
+
return {
|
|
50
|
+
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
|
|
54
|
+
computed:
|
|
55
|
+
{},
|
|
56
|
+
|
|
57
|
+
watch:
|
|
58
|
+
{},
|
|
59
|
+
|
|
60
|
+
created()
|
|
61
|
+
{
|
|
62
|
+
},
|
|
63
|
+
|
|
64
|
+
mounted()
|
|
65
|
+
{},
|
|
66
|
+
|
|
67
|
+
beforeUnmount()
|
|
68
|
+
{},
|
|
69
|
+
|
|
70
|
+
methods:
|
|
71
|
+
{
|
|
72
|
+
getSrc(legend)
|
|
73
|
+
{
|
|
74
|
+
return legend.url || legend.uri
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
</script>
|
|
Binary file
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { createApp } from 'vue'
|
|
2
|
+
import Label from './index.vue'
|
|
3
|
+
import ElementPlus from 'element-plus'
|
|
4
|
+
import 'element-plus/dist/index.css'
|
|
5
|
+
import zhCn from 'element-plus/dist/locale/zh-cn'
|
|
6
|
+
|
|
7
|
+
// 动态构造组件
|
|
8
|
+
function mountComponent(RootComponent, props)
|
|
9
|
+
{
|
|
10
|
+
const app = createApp(RootComponent, props)
|
|
11
|
+
|
|
12
|
+
app.use(ElementPlus, { locale: zhCn })
|
|
13
|
+
const root = document.createElement('div')
|
|
14
|
+
document.body.appendChild(root)
|
|
15
|
+
return {
|
|
16
|
+
instance: app.mount(root),
|
|
17
|
+
unmount()
|
|
18
|
+
{
|
|
19
|
+
document.body.removeChild(root)
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export default class Popup
|
|
25
|
+
{
|
|
26
|
+
constructor(val)
|
|
27
|
+
{
|
|
28
|
+
this.viewer = val.viewer
|
|
29
|
+
this.position = val.position
|
|
30
|
+
|
|
31
|
+
this.vmInstance = mountComponent(Label, {
|
|
32
|
+
title: val.title,
|
|
33
|
+
formList: val.formList,
|
|
34
|
+
btnList: val.btnList
|
|
35
|
+
}) // 根据模板创建一个组件实例
|
|
36
|
+
|
|
37
|
+
this.vmInstance.instance.closeEvent = e =>
|
|
38
|
+
{
|
|
39
|
+
this.windowClose()
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
val.viewer._widgetContainer.appendChild(this.vmInstance.instance.$el) // 将字符串模板生成的内容添加到DOM上
|
|
43
|
+
this.addPostRender()
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// 添加场景事件
|
|
47
|
+
addPostRender()
|
|
48
|
+
{
|
|
49
|
+
this.viewer.scene.postRender.addEventListener(this.postRender, this)
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// 场景渲染事件 实时更新窗口的位置 使其与笛卡尔坐标一致
|
|
53
|
+
postRender()
|
|
54
|
+
{
|
|
55
|
+
if (!this.vmInstance.instance.$el || !this.vmInstance.instance.$el.style) return
|
|
56
|
+
const canvasHeight = this.viewer.scene.canvas.height
|
|
57
|
+
const windowPosition = new Cesium.Cartesian2()
|
|
58
|
+
Cesium.SceneTransforms.wgs84ToWindowCoordinates(
|
|
59
|
+
this.viewer.scene,
|
|
60
|
+
this.position,
|
|
61
|
+
windowPosition
|
|
62
|
+
)
|
|
63
|
+
this.vmInstance.instance.$el.style.bottom =
|
|
64
|
+
canvasHeight - windowPosition.y + 20 + 'px'
|
|
65
|
+
const elWidth = this.vmInstance.instance.$el.offsetWidth
|
|
66
|
+
this.vmInstance.instance.$el.style.left = windowPosition.x - elWidth / 2 + 'px'
|
|
67
|
+
|
|
68
|
+
const camerPosition = this.viewer.camera.position
|
|
69
|
+
let height = this.viewer.scene.globe.ellipsoid.cartesianToCartographic(camerPosition).height
|
|
70
|
+
height += this.viewer.scene.globe.ellipsoid.maximumRadius
|
|
71
|
+
|
|
72
|
+
if ((!(Cesium.Cartesian3.distance(camerPosition, this.position) > height)) && this.viewer.camera.positionCartographic.height < 50000000)
|
|
73
|
+
this.vmInstance.instance.$el.style.display = 'block'
|
|
74
|
+
else
|
|
75
|
+
this.vmInstance.instance.$el.style.display = 'none'
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// 关闭
|
|
79
|
+
windowClose()
|
|
80
|
+
{
|
|
81
|
+
if (this.vmInstance)
|
|
82
|
+
{
|
|
83
|
+
this.vmInstance.instance.$el.remove()
|
|
84
|
+
this.vmInstance.unmount()
|
|
85
|
+
}
|
|
86
|
+
this.viewer.scene.postRender.removeEventListener(this.postRender, this) // 移除事件监听
|
|
87
|
+
}
|
|
88
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
<style lang='scss' scoped>
|
|
2
|
+
//滚动条样式
|
|
3
|
+
::-webkit-scrollbar {width: 0.06rem;height: 0.05rem;border-radius: 0.15rem;-webkit-border-radius: 0.15rem;}
|
|
4
|
+
::-webkit-scrollbar-track-piece {border: 1px solid gray;border-radius: 0.15rem;-webkit-border-radius: 0.15rem;}
|
|
5
|
+
::-webkit-scrollbar-thumb:vertical {height: 0.05rem;background-color: gray; border-radius: 0.15rem;-webkit-border-radius: 0.15rem;}
|
|
6
|
+
::-webkit-scrollbar-thumb:horizontal {width: 7px;background-color: gray;border-radius: 0.15rem;-webkit-border-radius: 0.15rem;}
|
|
7
|
+
.cx-fi{margin-right:0.02rem;font-size: 0.18rem;}
|
|
8
|
+
.container{position:absolute;width: 5rem;height: 2.5rem;background:#fff;
|
|
9
|
+
.head{display: flex;justify-content: space-between;width: 100%;height: 16%;align-items: center;color: #fff;font-size: 0.18rem;background: #f0f5ff;
|
|
10
|
+
.title{display: flex;flex-direction: column;justify-content: center;width: 50%;height: 100%;text-indent: 1em;background: url('./dialog-left-bg.png');background-size: 100% 100%;}
|
|
11
|
+
.el-icon{margin-right: 0.1rem;font-style: normal;cursor: pointer;}}}
|
|
12
|
+
.body{padding: 0.1rem 0.2rem;height: 58%;border-bottom: 2px solid #ddd;overflow: auto;}
|
|
13
|
+
.footer{display: flex;justify-content: space-around;padding: 0.05rem 0.8rem;height: 13%;font-size: 0.14rem;color: #6d6d6d;align-items: center;
|
|
14
|
+
div{cursor: pointer;}
|
|
15
|
+
img{vertical-align: middle;}}
|
|
16
|
+
.bottom-arrow{position: absolute;left: 50%;bottom: -20px;width: 0;height: 0;border-left: 8px solid transparent;border-right: 8px solid transparent;border-top: 20px solid #fff;transform: translateX(-50%);}
|
|
17
|
+
:deep(.el-form){display: flex;flex-wrap: wrap;justify-content: space-between;}
|
|
18
|
+
:deep(.el-form--inline .el-form-item){margin-right: 0;}
|
|
19
|
+
:deep(.el-form-item){margin-bottom: 0;width: 48%;}
|
|
20
|
+
</style>
|
|
21
|
+
|
|
22
|
+
<template>
|
|
23
|
+
<div class="container">
|
|
24
|
+
<div class="head">
|
|
25
|
+
<div class="title">{{title}}</div>
|
|
26
|
+
<el-icon :size="16" color="#7b86a3" @click="closeClick">X</el-icon>
|
|
27
|
+
</div>
|
|
28
|
+
<div class="body">
|
|
29
|
+
<el-form :inline="true" label-width="1.1rem" label-position="right">
|
|
30
|
+
<el-form-item v-for="item in formList" :key="item.colname" :label="item.namec">
|
|
31
|
+
{{ item.value }}
|
|
32
|
+
</el-form-item>
|
|
33
|
+
</el-form>
|
|
34
|
+
</div>
|
|
35
|
+
<div class="footer">
|
|
36
|
+
<div v-for="(btn, index) in btnList" @click="btn.click" :key="index">
|
|
37
|
+
<span :class="btn.iconClass" :style="{color: btn.color}"></span>{{ btn.name }}
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
<div class="bottom-arrow"></div>
|
|
41
|
+
</div>
|
|
42
|
+
</template>
|
|
43
|
+
|
|
44
|
+
<script>
|
|
45
|
+
/**
|
|
46
|
+
* 组件名称: 气泡弹窗
|
|
47
|
+
* 研发时间: 2022.12.09
|
|
48
|
+
* 研发人员: 张浩
|
|
49
|
+
* 功能说明:
|
|
50
|
+
*
|
|
51
|
+
* 调用说明:
|
|
52
|
+
* @prop {String} tilte 汽包框名字
|
|
53
|
+
* @prop {Array} formList 表单列表数据(格式:[{ value: '', namec: '孔编码:', colname: 'holecode' }])
|
|
54
|
+
* @prop {Array} btnList 表单列表数据(格式:[{ name: '详细信息', iconClass: 'cx-fi ic-service', color: '#467cbe', click: this.lookDetail }])
|
|
55
|
+
*
|
|
56
|
+
* 事件说明:
|
|
57
|
+
* @event 事件名 参数解构 事件和参数说明
|
|
58
|
+
*
|
|
59
|
+
*/
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* 维护历史:
|
|
63
|
+
* 修改时间 人员 说明
|
|
64
|
+
*/
|
|
65
|
+
export default {
|
|
66
|
+
data()
|
|
67
|
+
{
|
|
68
|
+
return {
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
props: {
|
|
72
|
+
title: { type: String, default: '' },
|
|
73
|
+
formList: { type: Array, default: () => [] },
|
|
74
|
+
btnList: { type: Array, default: () => [] }
|
|
75
|
+
},
|
|
76
|
+
created()
|
|
77
|
+
{
|
|
78
|
+
|
|
79
|
+
},
|
|
80
|
+
methods: {
|
|
81
|
+
|
|
82
|
+
// 关闭属性查看弹窗
|
|
83
|
+
closeClick()
|
|
84
|
+
{
|
|
85
|
+
if (this.closeEvent)
|
|
86
|
+
{
|
|
87
|
+
delete window.popups
|
|
88
|
+
this.closeEvent()
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
</script>
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
|
|
2
|
+
class LoadGeojson
|
|
3
|
+
{
|
|
4
|
+
/**
|
|
5
|
+
* 加载geojson
|
|
6
|
+
* @param {Object} viewer cesium.viewer
|
|
7
|
+
* @param {Object} params 额外参数
|
|
8
|
+
* @param {String} params.id 图层唯一标识
|
|
9
|
+
* @param {String} params.style 图层默认样式,参考cxe
|
|
10
|
+
* @param {String} params.callback 回调函数,参数为layer
|
|
11
|
+
*/
|
|
12
|
+
static async loadGeojson(viewer, params)
|
|
13
|
+
{
|
|
14
|
+
// let WebProj = new cxe.WebProj()
|
|
15
|
+
// Cesium.GeoJsonDataSource.crsNames[
|
|
16
|
+
// 'urn:ogc:def:crs:' + params.epsg
|
|
17
|
+
// ] = Cesium.GeoJsonDataSource.crsNames[params.epsg] = function(coordinates)
|
|
18
|
+
// {
|
|
19
|
+
// const fromProj = params.epsg
|
|
20
|
+
// const toProj = `EPSG:4326`
|
|
21
|
+
// const x = coordinates[0]
|
|
22
|
+
// const y = coordinates[1]
|
|
23
|
+
|
|
24
|
+
// const newCoordinates = WebProj.transform(fromProj, toProj, [x, y])
|
|
25
|
+
// return Cesium.Cartesian3.fromDegrees(newCoordinates[0], newCoordinates[1], 500)
|
|
26
|
+
// }
|
|
27
|
+
// 添加点图层
|
|
28
|
+
if (params && params.url && params.url.crs)
|
|
29
|
+
delete params.url.crs
|
|
30
|
+
let id = params.id || Cesium.createGuid()
|
|
31
|
+
let layer = new cxe.GeoJsonLayer(id, params.url, params.style)
|
|
32
|
+
layer.setStyle({
|
|
33
|
+
name: id,
|
|
34
|
+
clampToGround: true
|
|
35
|
+
})
|
|
36
|
+
if (params.callback) params.callback(layer)
|
|
37
|
+
viewer.layers.addLayer(layer)
|
|
38
|
+
viewer.scene.globe.depthTestAgainstTerrain = false
|
|
39
|
+
if (!params.noFly)
|
|
40
|
+
viewer.flyTo(layer)
|
|
41
|
+
return layer
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
export default LoadGeojson
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 类-加载模型,使用cxe
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
const typeTileset = '3dtiles'
|
|
6
|
+
const typeGltf = 'gltf'
|
|
7
|
+
|
|
8
|
+
class LoadModel
|
|
9
|
+
{
|
|
10
|
+
/**
|
|
11
|
+
* 加载模型
|
|
12
|
+
* @param {Object} modelInfo 加载模型相关参数。
|
|
13
|
+
* @param {Number} modelInfo.maptype 模型格式:3dtiles/gltf。
|
|
14
|
+
* @param {String} modelInfo.url 模型的路径。
|
|
15
|
+
* @param {Boolean} show 是否显示,默认true。
|
|
16
|
+
* @param {String} layerId tiles图的id,默认自动生成一个唯一id。
|
|
17
|
+
* @param {Object} extras 附带属性。
|
|
18
|
+
*/
|
|
19
|
+
static loadModel(Viewer, modelInfo = {}, node)
|
|
20
|
+
{
|
|
21
|
+
// 必须传模型的路径、类型
|
|
22
|
+
if (!modelInfo.url && !modelInfo.maptype)
|
|
23
|
+
return false
|
|
24
|
+
switch (modelInfo.maptype)
|
|
25
|
+
{
|
|
26
|
+
case typeTileset:
|
|
27
|
+
this.loadTileset(Viewer, modelInfo, node)
|
|
28
|
+
break
|
|
29
|
+
case typeGltf:
|
|
30
|
+
this.loadGltf(Viewer, modelInfo, node)
|
|
31
|
+
break
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* 加载3dtiles模型
|
|
37
|
+
* @param {Object} modelInfo 模型信息
|
|
38
|
+
*/
|
|
39
|
+
static async loadTileset(Viewer, modelInfo, node)
|
|
40
|
+
{
|
|
41
|
+
let param = modelInfo.params
|
|
42
|
+
let tile = new cxe.TilesetLayer(modelInfo.name)
|
|
43
|
+
Viewer.layers.addLayer(tile)
|
|
44
|
+
tile.att = { ...modelInfo }
|
|
45
|
+
let tileset = new cxe.Tileset(modelInfo.url)
|
|
46
|
+
tile.addOverlay(tileset)
|
|
47
|
+
|
|
48
|
+
let _Tileset = await tileset._delegate
|
|
49
|
+
this.tilesetTransform(_Tileset, param)
|
|
50
|
+
_Tileset.name = modelInfo.name
|
|
51
|
+
_Tileset.namec = modelInfo.namec
|
|
52
|
+
// cx.events.publish('tilesetLoad', { tileset, modelInfo, node })
|
|
53
|
+
|
|
54
|
+
Viewer.flyTo(tileset)
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* 对3dtiles模型进行矩阵变换
|
|
59
|
+
* @param {Object} tileset
|
|
60
|
+
* @param {Object} param
|
|
61
|
+
*/
|
|
62
|
+
static tilesetTransform(tileset, param)
|
|
63
|
+
{
|
|
64
|
+
let mat
|
|
65
|
+
|
|
66
|
+
// center中心点,格式:{"center":{"lng":119.18,"lat":34.57,"height":0}},就做矩阵变换到目标中心点。
|
|
67
|
+
if (param && param.center)
|
|
68
|
+
{
|
|
69
|
+
let initialPosition = Cesium.Cartesian3.fromDegrees(param.center.lng, param.center.lat, param.center.height) // 经纬度坐标转化为笛卡尔坐标
|
|
70
|
+
mat = Cesium.Transforms.eastNorthUpToFixedFrame(initialPosition)
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// offset平移,格式为{"offset":{"x":1000,"y":0,"z":0}}
|
|
74
|
+
if (param && param.offset)
|
|
75
|
+
{
|
|
76
|
+
let offset = param.offset
|
|
77
|
+
let transition = Cesium.Matrix4.fromTranslation(new Cesium.Cartesian3(offset.x, offset.y, offset.z))
|
|
78
|
+
if (!mat)
|
|
79
|
+
mat = tileset._root.transform
|
|
80
|
+
Cesium.Matrix4.multiply(mat, transition, mat)
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// rotate旋转,格式为{"rotate":{"x":-90,"y":0,"z":0}}
|
|
84
|
+
if (param && param.rotate)
|
|
85
|
+
{
|
|
86
|
+
if (!mat)
|
|
87
|
+
mat = tileset._root.transform
|
|
88
|
+
let rotate = param.rotate
|
|
89
|
+
let rotationX = Cesium.Matrix4.fromRotationTranslation(Cesium.Matrix3.fromRotationX(Cesium.Math.toRadians(rotate.x))) // 倾斜沿x轴翻转
|
|
90
|
+
Cesium.Matrix4.multiply(mat, rotationX, mat)
|
|
91
|
+
let rotationY = Cesium.Matrix4.fromRotationTranslation(Cesium.Matrix3.fromRotationY(Cesium.Math.toRadians(rotate.y))) // 倾斜沿y轴翻转
|
|
92
|
+
Cesium.Matrix4.multiply(mat, rotationY, mat)
|
|
93
|
+
let rotationZ = Cesium.Matrix4.fromRotationTranslation(Cesium.Matrix3.fromRotationZ(Cesium.Math.toRadians(rotate.z))) // 倾斜沿z轴翻转
|
|
94
|
+
Cesium.Matrix4.multiply(mat, rotationZ, mat)
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// scale缩放,格式为{"scale":{"x":-90,"y":0,"z":0}}
|
|
98
|
+
if (param && param.scale)
|
|
99
|
+
{
|
|
100
|
+
if (!mat)
|
|
101
|
+
mat = tileset._root.transform
|
|
102
|
+
let scale = param.scale
|
|
103
|
+
let scalem = Cesium.Matrix4.fromScale(new Cesium.Cartesian3(scale.x, scale.y, scale.z))
|
|
104
|
+
Cesium.Matrix4.multiply(param.root.transform, scalem, param.root.transform)
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// 倾斜模型设置矩阵变化,放在正确位置
|
|
108
|
+
if (mat)
|
|
109
|
+
tileset._root.transform = mat
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* @todo 有待完善
|
|
114
|
+
* 加载GLtf模型
|
|
115
|
+
* @param {Object} modelInfo 模型信息
|
|
116
|
+
* @param {Object} modelInfo.center {lng: 109.16161601119238, lat: 18.355172379996702, alt: 0}
|
|
117
|
+
*/
|
|
118
|
+
static loadGltf(Viewer, modelInfo)
|
|
119
|
+
{
|
|
120
|
+
let gltfLayer = new cxe.VectorLayer(typeGltf)
|
|
121
|
+
Viewer.layers.addLayer(gltfLayer)
|
|
122
|
+
|
|
123
|
+
let gltfModel = new cxe.Model(modelInfo.params.center, modelInfo.url)
|
|
124
|
+
gltfLayer.addOverlay(gltfModel)
|
|
125
|
+
Viewer.flyTo(gltfModel)
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
export default LoadModel
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 类-加载OGC服务,使用cxe
|
|
3
|
+
*/
|
|
4
|
+
import axios from 'axios'
|
|
5
|
+
import X2js from 'x2js'
|
|
6
|
+
const x2js = new X2js()
|
|
7
|
+
const typeWms = 'wms'
|
|
8
|
+
const typeWmts = 'wmts'
|
|
9
|
+
class LoadOgc
|
|
10
|
+
{
|
|
11
|
+
/**
|
|
12
|
+
* 加载ogc服务,根据maptype进行类型
|
|
13
|
+
* @param {Object} Viewer viewer
|
|
14
|
+
* @param {Object} ogcData 服务信息
|
|
15
|
+
* @param {String} ogcData.url 服务地址
|
|
16
|
+
* @param {String} ogcData.maptype 服务类型
|
|
17
|
+
* @param {String} ogcData.url 服务地址
|
|
18
|
+
* @param {String} ogcData.url 服务地址
|
|
19
|
+
* @returns layer
|
|
20
|
+
*/
|
|
21
|
+
static loadOgc(Viewer, ogcData)
|
|
22
|
+
{
|
|
23
|
+
let layer
|
|
24
|
+
switch (ogcData.maptype)
|
|
25
|
+
{
|
|
26
|
+
case typeWms:
|
|
27
|
+
layer = this.loadWms(ogcData)
|
|
28
|
+
break
|
|
29
|
+
case typeWmts:
|
|
30
|
+
layer = this.loadWmts(ogcData)
|
|
31
|
+
break
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
Viewer.layers.addImageryLayer(layer)
|
|
35
|
+
layer.att = ogcData
|
|
36
|
+
layer.att._bid = layer._bid
|
|
37
|
+
if (ogcData.params)
|
|
38
|
+
this.flyLayer(Viewer, ogcData)
|
|
39
|
+
else
|
|
40
|
+
{
|
|
41
|
+
switch (ogcData.maptype)
|
|
42
|
+
{
|
|
43
|
+
case typeWms:
|
|
44
|
+
layer = this.locateMapLayer(layer, Viewer)
|
|
45
|
+
break
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return layer
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// wms定位
|
|
52
|
+
static locateMapLayer(layerObj, viewer)
|
|
53
|
+
{
|
|
54
|
+
// 图层定位
|
|
55
|
+
this.getWmsGetCapabilities(layerObj._att.url).then(res =>
|
|
56
|
+
{
|
|
57
|
+
if (res.WFS_Capabilities.FeatureTypeList.FeatureType.length > 0)
|
|
58
|
+
{
|
|
59
|
+
res.WFS_Capabilities.FeatureTypeList.FeatureType.forEach(item =>
|
|
60
|
+
{
|
|
61
|
+
if (item.Name === layerObj._att.layer)
|
|
62
|
+
{
|
|
63
|
+
let poi = item.WGS84BoundingBox.LowerCorner.__text.split(' ')
|
|
64
|
+
let poi1 = item.WGS84BoundingBox.UpperCorner.__text.split(' ')
|
|
65
|
+
let point1 = Cesium.Cartesian3.fromDegrees(Number(poi[0]), Number(poi[1])) // New York
|
|
66
|
+
let point2 = Cesium.Cartesian3.fromDegrees(Number(poi1[0]), Number(poi1[1])) // San Francisco
|
|
67
|
+
|
|
68
|
+
// 计算这两个点的包围盒(BoundingSphere)
|
|
69
|
+
let boundingSphere = Cesium.BoundingSphere.fromPoints([point1, point2])
|
|
70
|
+
|
|
71
|
+
// 使用flyTo移动视角
|
|
72
|
+
viewer.camera.flyToBoundingSphere(boundingSphere, {
|
|
73
|
+
duration: 1.0 // 动画持续时间,单位秒
|
|
74
|
+
})
|
|
75
|
+
}
|
|
76
|
+
})
|
|
77
|
+
}
|
|
78
|
+
else
|
|
79
|
+
{
|
|
80
|
+
let dataLayer = res.WMS_Capabilities.Capability.Layer.Layer
|
|
81
|
+
if (dataLayer.Name === layerObj.layer)
|
|
82
|
+
{
|
|
83
|
+
let flyData = dataLayer.BoundingBox.find(items => items._CRS === 'CRS:84')
|
|
84
|
+
if (flyData)
|
|
85
|
+
{
|
|
86
|
+
viewer.camera.flyTo({
|
|
87
|
+
destination: new Cesium.Rectangle.fromDegrees(parseFloat(flyData._minx) - 0.0059, flyData._miny, flyData._maxx, flyData._maxy)
|
|
88
|
+
})
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
})
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* 获取有效的url地址,必须以'/WMSServer'结尾。
|
|
97
|
+
* @method
|
|
98
|
+
* @param {String} url url地址
|
|
99
|
+
* @returns {String} 构造好的有效的url地址
|
|
100
|
+
*/
|
|
101
|
+
static getUseUrl(url)
|
|
102
|
+
{
|
|
103
|
+
// 校验url是不是以'/WMSServer'结尾,不是的话拼接上
|
|
104
|
+
if (url.split('/').pop() === 'WMSServer')
|
|
105
|
+
return url.replace('/rest', '')
|
|
106
|
+
return `${url.replace('/rest', '')}`
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* 查询xml的能力文档
|
|
111
|
+
* @param {String} url wms的url
|
|
112
|
+
* @returns Promises
|
|
113
|
+
*/
|
|
114
|
+
static getWmsGetCapabilities(url)
|
|
115
|
+
{
|
|
116
|
+
let str = '?request=GetCapabilities&service=WFS'
|
|
117
|
+
let _url = this.getUseUrl(url)
|
|
118
|
+
return new Promise((resolve, reject) =>
|
|
119
|
+
{
|
|
120
|
+
axios.get(_url + str).then(ret =>
|
|
121
|
+
{
|
|
122
|
+
if (ret.status === 200)
|
|
123
|
+
resolve(this.xmlToJson(ret.data))
|
|
124
|
+
}).catch(reject)
|
|
125
|
+
})
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// xml文档解析成对象
|
|
129
|
+
static xmlToJson(xml)
|
|
130
|
+
{
|
|
131
|
+
let data = x2js.xml2js(xml)
|
|
132
|
+
return data
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
// 根据能力文档取到具体layer的信息
|
|
136
|
+
async getWmsLayerByXml(url, name, isWms)
|
|
137
|
+
{
|
|
138
|
+
let xmlData = await this.getWmsGetCapabilities(url)
|
|
139
|
+
if (isWms && isWms === 'wms')
|
|
140
|
+
{
|
|
141
|
+
let layer = Number(name) + 1
|
|
142
|
+
name = xmlData.WMS_Capabilities.Capability.Layer.Layer.length ? (xmlData.WMS_Capabilities.Capability.Layer.Layer.length - layer).toString() : '0'
|
|
143
|
+
}
|
|
144
|
+
return xmlData.WMS_Capabilities.Capability.Layer.Layer.length ? xmlData.WMS_Capabilities.Capability.Layer.Layer.find(layer => layer.Name === name) : xmlData.WMS_Capabilities.Capability.Layer.Layer
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* 加载wms服务
|
|
150
|
+
* @param {Object} wms wms数据对象
|
|
151
|
+
* @returns layer.id
|
|
152
|
+
*/
|
|
153
|
+
static loadWms(wms)
|
|
154
|
+
{
|
|
155
|
+
let opt = this.getOpts(wms)
|
|
156
|
+
opt.parameters = {
|
|
157
|
+
service: 'WMS',
|
|
158
|
+
format: wms.format,
|
|
159
|
+
transparent: true
|
|
160
|
+
}
|
|
161
|
+
let layer = new cxe.ImageryLayer(wms.maptype, opt)
|
|
162
|
+
return layer
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* 加载wmts服务
|
|
167
|
+
* @param {Object} wmts
|
|
168
|
+
* @returns layer.id
|
|
169
|
+
*/
|
|
170
|
+
static loadWmts(wmts)
|
|
171
|
+
{
|
|
172
|
+
let opt = this.getOpts(wmts)
|
|
173
|
+
let layer = new cxe.ImageryLayer(typeWmts, opt)
|
|
174
|
+
return layer
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* 转换参数,根据数据库mapservice字段来构造cxe添加服务需要的参数
|
|
179
|
+
* @param {object} ogcData 转换服务参数
|
|
180
|
+
*/
|
|
181
|
+
static getOpts(ogcData)
|
|
182
|
+
{
|
|
183
|
+
let opts = {
|
|
184
|
+
url: ogcData.url,
|
|
185
|
+
layer: ogcData.layer,
|
|
186
|
+
layers: ogcData.layer,
|
|
187
|
+
format: ogcData.format
|
|
188
|
+
}
|
|
189
|
+
if (ogcData.params)
|
|
190
|
+
{
|
|
191
|
+
let { style, rectangle, tilingScheme, tileMatrixSetID, tileMatrixLabels } = ogcData.params
|
|
192
|
+
if (style) opts.style = style
|
|
193
|
+
if (rectangle) opts.rectangle = this.getRectangle(ogcData.params.rectangle)
|
|
194
|
+
if (tilingScheme) opts.tilingScheme = tilingScheme
|
|
195
|
+
if (tileMatrixSetID) opts.tileMatrixSetID = tileMatrixSetID
|
|
196
|
+
if (tileMatrixLabels) opts.tileMatrixLabels = tileMatrixLabels
|
|
197
|
+
}
|
|
198
|
+
return opts
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* 定位图层
|
|
203
|
+
* @param {Object} Viewer viewer
|
|
204
|
+
* @param {Object} ogcData 服务参数对象 位置(west, south, east, north,都为经纬度)
|
|
205
|
+
*/
|
|
206
|
+
static flyLayer(Viewer, ogcData)
|
|
207
|
+
{
|
|
208
|
+
let params
|
|
209
|
+
if (ogcData.params.rectangle) params = ogcData.params
|
|
210
|
+
else if (ogcData.params && typeof ogcData.params === 'string')
|
|
211
|
+
params = JSON.parse(ogcData.params)
|
|
212
|
+
if (params && params.rectangle)
|
|
213
|
+
{
|
|
214
|
+
let rectangle = this.getRectangle(params.rectangle)
|
|
215
|
+
Viewer.camera.flyTo({ destination: rectangle })
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
static getRectangle(rectangle)
|
|
220
|
+
{
|
|
221
|
+
let { west, south, east, north } = rectangle
|
|
222
|
+
let rectangle_ = Cesium.Rectangle.fromDegrees(west, south, east, north, new Cesium.Rectangle())
|
|
223
|
+
return rectangle_
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
export default LoadOgc
|