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,1046 @@
|
|
|
1
|
+
<style lang='scss' scoped>
|
|
2
|
+
.fileDemo { width: 100%; height: 100%; }
|
|
3
|
+
.fileCenter { width: 100%; height: 92%; }
|
|
4
|
+
.yl-box { height: 0.5rem; line-height: 0.5rem; }
|
|
5
|
+
:deep(.el-radio-group) { overflow: hidden; }
|
|
6
|
+
:deep(.tool-style) { right: 9% !important; top: 1.2% !important; }
|
|
7
|
+
.bakc_page { position: absolute; top: 3%; right: 16%; }
|
|
8
|
+
.bqhz { position: absolute; top: 3%; right: 11%; }
|
|
9
|
+
.qcbq { position: absolute; top: 3%; right: 6%; }
|
|
10
|
+
.bqxz { position: absolute; top: 2.9%; right: 1%; height: 0.35rem; border-radius: 0; }
|
|
11
|
+
.btn_bqqd { position: absolute; right: 1.5%; top: 3%; background: var(--cx-colorPrimary13); }
|
|
12
|
+
.fold_botton { position: absolute; bottom: 1%; }
|
|
13
|
+
#chart3d { position: relative; }
|
|
14
|
+
:deep(.cx-card) { max-width: 15.5rem; }
|
|
15
|
+
:deep(.toolbar) { right: -0.6rem !important; }
|
|
16
|
+
.dc_col { margin-left: 0.1rem; }
|
|
17
|
+
.text_col { width: 3.95rem; margin-top: 0.1rem; margin-left: 0.1rem; }
|
|
18
|
+
</style>
|
|
19
|
+
|
|
20
|
+
<template>
|
|
21
|
+
<DataPreview
|
|
22
|
+
:noShowTool="false"
|
|
23
|
+
ref="DataPreview"
|
|
24
|
+
:baseMapArr="baseMapArr"
|
|
25
|
+
:services="att"
|
|
26
|
+
:showBaseMap="showBaseMap"
|
|
27
|
+
:legendList="legendList"
|
|
28
|
+
@drawBq="drawBq"
|
|
29
|
+
@clearDrawBq="clearDrawBq"
|
|
30
|
+
@exportShp="exportShp"
|
|
31
|
+
@saveShp="saveShp"
|
|
32
|
+
/>
|
|
33
|
+
<el-button class="bqxz" @click="backPage">返回</el-button>
|
|
34
|
+
<template v-if="showTab">
|
|
35
|
+
<cx-fold-button class="fold_botton" v-bind="foldbuttonTop" @fold-change="foldChange">
|
|
36
|
+
<cx-card :size="size" v-bind="card" style="height:100%;">
|
|
37
|
+
<cx-grid-table v-bind="fldList" @plugin-click="onClick" />
|
|
38
|
+
</cx-card>
|
|
39
|
+
</cx-fold-button>
|
|
40
|
+
</template>
|
|
41
|
+
|
|
42
|
+
<el-dialog title="靶区属性" v-model="dialogFormVisible" :showClose="false" style="width: 4.5rem;top:22%;background-color: var(--cx-colorBg5);">
|
|
43
|
+
<div class="dc_col" style="margin-bottom: 0.1rem;color: var(--cx-colorPrimary4);">填写信息确定后,点击"保存靶区"按钮可将靶区存入数据列表</div>
|
|
44
|
+
<span class="dc_col">靶区代号</span><el-input v-model="bqdh"></el-input>
|
|
45
|
+
<span class="dc_col">靶区面积(m²)</span><el-input v-model="bqmj"></el-input>
|
|
46
|
+
<span class="dc_col">靶区依据</span><el-input class="text_col" type="textarea" :row="4" v-model="bqyj"></el-input>
|
|
47
|
+
<template #footer>
|
|
48
|
+
<el-button @click="delBj">取 消</el-button>
|
|
49
|
+
<el-button type="primary" @click="addBqCs">确 定</el-button>
|
|
50
|
+
</template>
|
|
51
|
+
</el-dialog>
|
|
52
|
+
</template>
|
|
53
|
+
<script>
|
|
54
|
+
/**
|
|
55
|
+
* 插件 - 文件预览 (基于cx-file-view实现)
|
|
56
|
+
*/
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* 调用说明:
|
|
60
|
+
* @param {Object} params
|
|
61
|
+
* @param {Object} params.data 文件预览插件需求的参数对象
|
|
62
|
+
* @param {String} params.data.src 文件的url地址,必传!如:'static/test.excel'
|
|
63
|
+
* @param {String} params.data.filetype 文件后缀类型,必传!如:flv
|
|
64
|
+
* @param {String} [params.data.title] 文件名称,非必传
|
|
65
|
+
* @param {Object} [params.data.comProps] 自定义传给对应文件预览组件的参数对象
|
|
66
|
+
* @param {Object} [params.data.comListeners] 自定义传给对应文件预览组件的事件监听注册对象
|
|
67
|
+
* @param {Object} [params.data.custCom] 自定义的组件配置对象,格式:{name: 'cx-file-view'},custCom比filetype优先级高
|
|
68
|
+
*
|
|
69
|
+
* (更多参数见cx-file-view的文档)
|
|
70
|
+
*/
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* 修改记录:
|
|
74
|
+
* 24-05-24 张光辉 首次提交
|
|
75
|
+
*/
|
|
76
|
+
import DataPreview from '@/plugins/zbcxCesium/coms/dataPreview/DataPreview.vue'
|
|
77
|
+
import WebProj4Class from '@/plugins/app/com/WebProj4'
|
|
78
|
+
import Api from '../Api.js'
|
|
79
|
+
import TableEarth from '../coms/TableEarth.vue'
|
|
80
|
+
import PubCxe from '@/plugins/zbcxCesium/pub/PubCxe.js'
|
|
81
|
+
let layer, layerBqqdDraw
|
|
82
|
+
export default
|
|
83
|
+
{
|
|
84
|
+
mixins: [],
|
|
85
|
+
components: { DataPreview, TableEarth },
|
|
86
|
+
data()
|
|
87
|
+
{
|
|
88
|
+
return {
|
|
89
|
+
data: null,
|
|
90
|
+
type: true,
|
|
91
|
+
types:
|
|
92
|
+
{
|
|
93
|
+
doc: 'doc',
|
|
94
|
+
geojson: 'geojson',
|
|
95
|
+
grd: 'grd',
|
|
96
|
+
grd2D: 'grd2D',
|
|
97
|
+
grd3D: 'grd3D',
|
|
98
|
+
excel: 'excel'
|
|
99
|
+
},
|
|
100
|
+
baseMapArr: [],
|
|
101
|
+
showBaseMap: false,
|
|
102
|
+
grdRadio: '',
|
|
103
|
+
refresh: true,
|
|
104
|
+
Grd2DSrc: '',
|
|
105
|
+
legendList: [],
|
|
106
|
+
geometry: [],
|
|
107
|
+
card: {
|
|
108
|
+
foldable: false
|
|
109
|
+
},
|
|
110
|
+
showTab: false,
|
|
111
|
+
fldList: {
|
|
112
|
+
table: {
|
|
113
|
+
elAtts: {
|
|
114
|
+
stripe: true,
|
|
115
|
+
height: 250
|
|
116
|
+
},
|
|
117
|
+
border: true,
|
|
118
|
+
operFix: 'right',
|
|
119
|
+
operCols: [
|
|
120
|
+
{
|
|
121
|
+
colname: '操作',
|
|
122
|
+
title: '操作',
|
|
123
|
+
width: 150,
|
|
124
|
+
btns: [
|
|
125
|
+
{
|
|
126
|
+
name: 'dw',
|
|
127
|
+
enable: true,
|
|
128
|
+
show: true,
|
|
129
|
+
type: 'primary',
|
|
130
|
+
title: '定位'
|
|
131
|
+
}
|
|
132
|
+
]
|
|
133
|
+
}
|
|
134
|
+
],
|
|
135
|
+
list: [],
|
|
136
|
+
cols: []
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
bqdh: null,
|
|
140
|
+
bqyj: null,
|
|
141
|
+
bqmj: null,
|
|
142
|
+
dialogFormVisible: false,
|
|
143
|
+
index: -1,
|
|
144
|
+
checkLayerId: null,
|
|
145
|
+
drawPolygonDr: null,
|
|
146
|
+
layer: null,
|
|
147
|
+
mrSjj: null, // 默认数据集
|
|
148
|
+
WebProj4: null
|
|
149
|
+
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
|
|
153
|
+
created()
|
|
154
|
+
{
|
|
155
|
+
this.getMrSjj()
|
|
156
|
+
this.WebProj4 = new WebProj4Class()
|
|
157
|
+
},
|
|
158
|
+
|
|
159
|
+
mounted()
|
|
160
|
+
{
|
|
161
|
+
let self = this
|
|
162
|
+
// 添加点击监听
|
|
163
|
+
let handler2 = new Cesium.ScreenSpaceEventHandler(Viewer.scene.canvas)
|
|
164
|
+
handler2.setInputAction((movement) =>
|
|
165
|
+
{
|
|
166
|
+
let pickedObject = Viewer.scene.pick(movement.position)
|
|
167
|
+
if (pickedObject && pickedObject.id && pickedObject.id.polygon)
|
|
168
|
+
self.checkLayerId = pickedObject.id.polygon.name
|
|
169
|
+
}, Cesium.ScreenSpaceEventType.LEFT_CLICK)
|
|
170
|
+
layerBqqdDraw = new cxe.VectorLayer('layerBqqdDraw')
|
|
171
|
+
layerBqqdDraw.setStyle({
|
|
172
|
+
clampToGround: true,
|
|
173
|
+
disableDepthTestDistance: Number.POSITIVE_INFINITY
|
|
174
|
+
})
|
|
175
|
+
this.getMapservice()
|
|
176
|
+
Viewer.layers.addLayer(layerBqqdDraw)
|
|
177
|
+
setTimeout(() =>
|
|
178
|
+
{
|
|
179
|
+
this.flyToPos()
|
|
180
|
+
})
|
|
181
|
+
},
|
|
182
|
+
|
|
183
|
+
methods:
|
|
184
|
+
{
|
|
185
|
+
async flyToPos()
|
|
186
|
+
{
|
|
187
|
+
let data = await cx.svr.data.query($app.TabConst.sjj.major, $app.TabConst.sjj.minor,
|
|
188
|
+
{
|
|
189
|
+
args: [['userid', '=', $g.user.id, null], ['defdata', '=', 1, 'and']]
|
|
190
|
+
})
|
|
191
|
+
if (!data[0].xmax1 || !data[0].ymax1)
|
|
192
|
+
return this.$showMsg('未设置数据集范围', 'warning')
|
|
193
|
+
if (data && data.length)
|
|
194
|
+
{
|
|
195
|
+
let target1 = this.WebProj4.transform(data[0].epsg, 'EPSG:4326', data[0].xmax1, data[0].ymax1)
|
|
196
|
+
let target2 = this.WebProj4.transform(data[0].epsg, 'EPSG:4326', data[0].xmin1, data[0].ymin1)
|
|
197
|
+
const rectangle = Cesium.Rectangle.fromDegrees(target2[0], target1[1], target1[0], target2[1])
|
|
198
|
+
// 将相机视角调整到矩形
|
|
199
|
+
window.Viewer.camera.flyTo({
|
|
200
|
+
destination: rectangle
|
|
201
|
+
// 可选的其他相机设置参数
|
|
202
|
+
})
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
/**
|
|
206
|
+
* 获取默认数据集
|
|
207
|
+
*/
|
|
208
|
+
getMrSjj()
|
|
209
|
+
{
|
|
210
|
+
cx.svr.data.query($app.TabConst.sjj.major, $app.TabConst.sjj.minor, { args: [['userid', '=', $g.user.id, null], ['defdata', '=', 1, 'and']] }).then((item) =>
|
|
211
|
+
{
|
|
212
|
+
this.mrSjj = item[0]
|
|
213
|
+
}).catch(() =>
|
|
214
|
+
{
|
|
215
|
+
})
|
|
216
|
+
},
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* 初始化数据
|
|
220
|
+
* @param {Object} att 属性数据
|
|
221
|
+
* @param {String} type 类型
|
|
222
|
+
*/
|
|
223
|
+
async initData(att, type)
|
|
224
|
+
{
|
|
225
|
+
let medData = await this.queryMedia($app.TabConst.yclsjj.major, $app.TabConst.yclsjj.minor, att.id)
|
|
226
|
+
this.params = {}
|
|
227
|
+
this.params.data = att
|
|
228
|
+
this.params.data.src = medData[0]?.filename ? medData[0]?.filename : att.src
|
|
229
|
+
this.params.data.mediaId = medData[0]?.id
|
|
230
|
+
this.data = att
|
|
231
|
+
this.getType(type)
|
|
232
|
+
},
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* 查询媒体数据
|
|
236
|
+
* @param {Number} major 主表ID
|
|
237
|
+
* @param {Number} minor 子表ID
|
|
238
|
+
* @param {Number} entityid 实体ID
|
|
239
|
+
* @returns {Promise} 查询结果
|
|
240
|
+
*/
|
|
241
|
+
queryMedia(major, minor, entityid)
|
|
242
|
+
{
|
|
243
|
+
let param = { args: [['major', '=', major], ['minor', '=', minor, 'and'], ['entityid', '=', entityid, 'and']] }
|
|
244
|
+
return cx.svr.data.query(cx.consts.SYSTAB, cx.consts.MEDIA, param)
|
|
245
|
+
},
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* 获取数据类型
|
|
249
|
+
* @param {String} typeShow 显示类型
|
|
250
|
+
*/
|
|
251
|
+
getType(typeShow)
|
|
252
|
+
{
|
|
253
|
+
switch (this.params?.data?.datatype)
|
|
254
|
+
{
|
|
255
|
+
case 'csv':
|
|
256
|
+
case 'xls':
|
|
257
|
+
case 'xlsx':
|
|
258
|
+
case 'excel':
|
|
259
|
+
this.type = this.types.excel
|
|
260
|
+
this.makeExcelData(typeShow)
|
|
261
|
+
break
|
|
262
|
+
case this.types.geojson:
|
|
263
|
+
this.type = this.types.geojson
|
|
264
|
+
this.makeGeojsonData(this.params.data.src, typeShow)
|
|
265
|
+
break
|
|
266
|
+
case this.types.grd:
|
|
267
|
+
this.type = this.types.grd
|
|
268
|
+
this.makegrd3DData(typeShow)
|
|
269
|
+
break
|
|
270
|
+
case 'POLYGON':
|
|
271
|
+
case 'POLYLINE':
|
|
272
|
+
this.type = this.types.geojson
|
|
273
|
+
let geojsonData = null
|
|
274
|
+
if (this.params.data.memo)
|
|
275
|
+
geojsonData = JSON.parse(this.params.data.memo)
|
|
276
|
+
this.makeGeojsonData(this.params.data.src, geojsonData, null, typeShow)
|
|
277
|
+
break
|
|
278
|
+
}
|
|
279
|
+
},
|
|
280
|
+
/**
|
|
281
|
+
* 处理Excel文件
|
|
282
|
+
* @param {String} type 类型
|
|
283
|
+
*/
|
|
284
|
+
makeExcelData(type)
|
|
285
|
+
{
|
|
286
|
+
if (window?.Viewer?.layers?._layerCache?.vector['layer' + this.params.data.mediaId])
|
|
287
|
+
{
|
|
288
|
+
window.Viewer.layers._layerCache.vector['layer' + this.params.data.mediaId].show = type
|
|
289
|
+
return
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
cx.http.post(cx.service.url('ImpSvr/getExcelData'), { id: this.params.data.mediaId }).then((res) =>
|
|
293
|
+
{
|
|
294
|
+
if (res.ret == 0)
|
|
295
|
+
this.initTabData(res.data[0])
|
|
296
|
+
else
|
|
297
|
+
this.$showMsg('excel解析失败', 'error')
|
|
298
|
+
}).catch((e) =>
|
|
299
|
+
{
|
|
300
|
+
this.$showMsg('excel解析失败', 'error')
|
|
301
|
+
})
|
|
302
|
+
},
|
|
303
|
+
|
|
304
|
+
/**
|
|
305
|
+
* 初始化表格数据
|
|
306
|
+
* @param {Array} data 数据
|
|
307
|
+
*/
|
|
308
|
+
initTabData(data)
|
|
309
|
+
{
|
|
310
|
+
let dataFld
|
|
311
|
+
for (let i in data)
|
|
312
|
+
dataFld = data[i]
|
|
313
|
+
let cols = dataFld[0].map((item) =>
|
|
314
|
+
{
|
|
315
|
+
return {
|
|
316
|
+
colname: item,
|
|
317
|
+
align: 'center',
|
|
318
|
+
title: item,
|
|
319
|
+
width: 80,
|
|
320
|
+
visible: 1
|
|
321
|
+
}
|
|
322
|
+
})
|
|
323
|
+
this.fldList.table.cols = cols
|
|
324
|
+
dataFld.shift()
|
|
325
|
+
let list = dataFld.map((item) =>
|
|
326
|
+
{
|
|
327
|
+
let params = {}
|
|
328
|
+
for (let i in cols)
|
|
329
|
+
params[cols[i].colname] = item[i]
|
|
330
|
+
return params
|
|
331
|
+
})
|
|
332
|
+
this.cdNum = cols.length
|
|
333
|
+
this.drawPoint(list)
|
|
334
|
+
},
|
|
335
|
+
|
|
336
|
+
/**
|
|
337
|
+
* 绘制点
|
|
338
|
+
* @param {Array} points 点数据数组
|
|
339
|
+
*/
|
|
340
|
+
drawPoint(points)
|
|
341
|
+
{
|
|
342
|
+
let self = this
|
|
343
|
+
let layer = new cxe.VectorLayer('layer' + this.params.data.mediaId)
|
|
344
|
+
window.Viewer.layers.addLayer(layer)
|
|
345
|
+
// 循环
|
|
346
|
+
let len = points.length
|
|
347
|
+
for (let i = 0; i < len; i++)
|
|
348
|
+
{
|
|
349
|
+
// 有x y不存在的情况,跳过
|
|
350
|
+
if ((points[i][this.data.x] && points[i][this.data.y]))
|
|
351
|
+
{
|
|
352
|
+
let x = Number(points[i][this.data.x]), y = Number(points[i][this.data.y])
|
|
353
|
+
let target = this.WebProj4.transform(this.data.epsg, 'EPSG:4326', x, y)
|
|
354
|
+
let lng = target[0]
|
|
355
|
+
let lat = target[1]
|
|
356
|
+
let point = new cxe.Point({ lng: lng, lat: lat })
|
|
357
|
+
point.setStyle(this.setPointStyle())
|
|
358
|
+
point.att = points[i]
|
|
359
|
+
layer.addOverlay(point)
|
|
360
|
+
}
|
|
361
|
+
else
|
|
362
|
+
this.$showMsg(`${points[i].x}坐标异常`, 'error')
|
|
363
|
+
}
|
|
364
|
+
window.Viewer.flyTo(layer)
|
|
365
|
+
// 添加点击监听
|
|
366
|
+
let handler2 = new Cesium.ScreenSpaceEventHandler(Viewer.scene.canvas)
|
|
367
|
+
handler2.setInputAction((movement) =>
|
|
368
|
+
{
|
|
369
|
+
let pickedObject = Viewer.scene.pick(movement.position)
|
|
370
|
+
if (Cesium.defined(pickedObject) && pickedObject.id && pickedObject.id.att)
|
|
371
|
+
{
|
|
372
|
+
self.fldList.table.list = [pickedObject.id.att]
|
|
373
|
+
self.showTab = true
|
|
374
|
+
}
|
|
375
|
+
}, Cesium.ScreenSpaceEventType.LEFT_CLICK)
|
|
376
|
+
},
|
|
377
|
+
|
|
378
|
+
/**
|
|
379
|
+
* 点击按钮事件
|
|
380
|
+
* @param {Object} btn 按钮对象
|
|
381
|
+
* @param {Object} row 行数据
|
|
382
|
+
*/
|
|
383
|
+
onClick(btn, row)
|
|
384
|
+
{
|
|
385
|
+
if (btn.name === 'dw')
|
|
386
|
+
{
|
|
387
|
+
let x = Number(row[this.data.x]), y = Number(row[this.data.y])
|
|
388
|
+
let target = this.WebProj4.transform(this.data.epsg, 'EPSG:4326', x, y)
|
|
389
|
+
let lng = target[0]
|
|
390
|
+
let lat = target[1]
|
|
391
|
+
window.Viewer.flyToPos({ lng: Number(lng * 1), lat: Number(lat * 1), alt: 300 })
|
|
392
|
+
}
|
|
393
|
+
},
|
|
394
|
+
|
|
395
|
+
/**
|
|
396
|
+
* 折叠控制事件
|
|
397
|
+
* @param {Boolean} isOpen 是否打开
|
|
398
|
+
*/
|
|
399
|
+
foldChange(isOpen)
|
|
400
|
+
{
|
|
401
|
+
self.showTab = isOpen
|
|
402
|
+
},
|
|
403
|
+
|
|
404
|
+
/**
|
|
405
|
+
* 设置点样式
|
|
406
|
+
* @returns {Object} 样式对象
|
|
407
|
+
*/
|
|
408
|
+
setPointStyle()
|
|
409
|
+
{
|
|
410
|
+
return {
|
|
411
|
+
pixelSize: 10,
|
|
412
|
+
color: Cesium.Color.RED,
|
|
413
|
+
outlineColor: Cesium.Color.BLUE,
|
|
414
|
+
outlineWidth: 2
|
|
415
|
+
}
|
|
416
|
+
},
|
|
417
|
+
|
|
418
|
+
/**
|
|
419
|
+
* 处理GeoJSON格式数据
|
|
420
|
+
* @param {String} file 文件
|
|
421
|
+
* @param {Object} geojson GeoJSON对象
|
|
422
|
+
* @param {Function} loadCallBack 加载回调
|
|
423
|
+
* @param {String} type 类型
|
|
424
|
+
* @param {String} epsgTr EPSG转换
|
|
425
|
+
*/
|
|
426
|
+
async makeGeojsonData(file, geojson, loadCallBack, type, epsgTr)
|
|
427
|
+
{
|
|
428
|
+
if (window?.Viewer?.layers?._layerCache?.geojson && window?.Viewer?.layers?._layerCache?.geojson['layer' + (this.params.data.mediaId ? this.params.data.mediaId : this.params.data.id)])
|
|
429
|
+
{
|
|
430
|
+
window.Viewer.layers._layerCache.geojson['layer' + (this.params.data.mediaId ? this.params.data.mediaId : this.params.data.id)].show = type
|
|
431
|
+
return
|
|
432
|
+
}
|
|
433
|
+
let self = this
|
|
434
|
+
// 不为靶区的则不需要epsg 转换
|
|
435
|
+
if (!geojson)
|
|
436
|
+
{
|
|
437
|
+
let projObj =
|
|
438
|
+
{
|
|
439
|
+
file: file ? file : '',
|
|
440
|
+
geojson: geojson ? geojson : '',
|
|
441
|
+
src: this.params?.data.epsg,
|
|
442
|
+
dest: 'EPSG:4326'
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
Api.geojsonproj(projObj).then(async res =>
|
|
446
|
+
{
|
|
447
|
+
if (res.ret === 0)
|
|
448
|
+
{
|
|
449
|
+
await self.getTop(res)
|
|
450
|
+
self.att =
|
|
451
|
+
{
|
|
452
|
+
id: 'layer' + (this.params.data.mediaId ? this.params.data.mediaId : this.params.data.id),
|
|
453
|
+
name: 'layer' + (this.params.data.mediaId ? this.params.data.mediaId : this.params.data.id),
|
|
454
|
+
url: res.geojson,
|
|
455
|
+
maptype: 'geojson',
|
|
456
|
+
layer: '',
|
|
457
|
+
epsg: this.params?.data.epsg,
|
|
458
|
+
params: {},
|
|
459
|
+
|
|
460
|
+
style:
|
|
461
|
+
{
|
|
462
|
+
clampToGround: true,
|
|
463
|
+
alpha: 0.1
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
if (loadCallBack)
|
|
467
|
+
self.att.callback = loadCallBack
|
|
468
|
+
self.$refs.DataPreview.loadData(self.att)
|
|
469
|
+
}
|
|
470
|
+
}).catch(err =>
|
|
471
|
+
{
|
|
472
|
+
this.$showMsg('geojson坐标系转换失败', 'error')
|
|
473
|
+
console.error(err)
|
|
474
|
+
})
|
|
475
|
+
}
|
|
476
|
+
else
|
|
477
|
+
{
|
|
478
|
+
self.att =
|
|
479
|
+
{
|
|
480
|
+
id: 'layer' + (this.params.data.mediaId ? this.params.data.mediaId : this.params.data.id),
|
|
481
|
+
name: 'layer' + (this.params.data.mediaId ? this.params.data.mediaId : this.params.data.id),
|
|
482
|
+
url: geojson,
|
|
483
|
+
maptype: 'geojson',
|
|
484
|
+
layer: '',
|
|
485
|
+
// epsg: this.params?.data.epsg,
|
|
486
|
+
params: {},
|
|
487
|
+
style:
|
|
488
|
+
{
|
|
489
|
+
clampToGround: true,
|
|
490
|
+
alpha: 0.8
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
if (loadCallBack)
|
|
494
|
+
self.att.callback = loadCallBack
|
|
495
|
+
self.$refs.DataPreview.loadData(self.att)
|
|
496
|
+
}
|
|
497
|
+
},
|
|
498
|
+
|
|
499
|
+
/**
|
|
500
|
+
* 获取高程数据
|
|
501
|
+
* @param {Object} res 返回结果
|
|
502
|
+
*/
|
|
503
|
+
async getTop(res)
|
|
504
|
+
{
|
|
505
|
+
if (!Viewer.terrainProvider._layers || !Viewer.terrainProvider._layers.length) return
|
|
506
|
+
for (let i in res.geojson.features)
|
|
507
|
+
{
|
|
508
|
+
for (let j in res.geojson.features[i].geometry.coordinates)
|
|
509
|
+
{
|
|
510
|
+
for (let k in res.geojson.features[i].geometry.coordinates[j])
|
|
511
|
+
{
|
|
512
|
+
let pos = await Cesium.sampleTerrainMostDetailed(Viewer.terrainProvider, [Cesium.Cartographic.fromDegrees(res.geojson.features[i].geometry.coordinates[j][k][0], res.geojson.features[i].geometry.coordinates[j][k][1])])
|
|
513
|
+
if (pos[0].height)
|
|
514
|
+
res.geojson.features[i].geometry.coordinates[j][k].push(pos[0].height)
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
},
|
|
519
|
+
/**
|
|
520
|
+
* 处理GRD格式数据
|
|
521
|
+
* @param {Object} form 表单数据
|
|
522
|
+
* @returns {Object} 参数对象
|
|
523
|
+
*/
|
|
524
|
+
makeGrdData(form)
|
|
525
|
+
{
|
|
526
|
+
let params =
|
|
527
|
+
{
|
|
528
|
+
file: this.params.data.src,
|
|
529
|
+
type: form.type,
|
|
530
|
+
axis: false,
|
|
531
|
+
param: {}
|
|
532
|
+
}
|
|
533
|
+
if (form.levels && form.levels.length)
|
|
534
|
+
params.levels = form.levels?.split(',')
|
|
535
|
+
for (let key in form.param)
|
|
536
|
+
params.param[key] = form[key]
|
|
537
|
+
|
|
538
|
+
return params
|
|
539
|
+
},
|
|
540
|
+
|
|
541
|
+
/**
|
|
542
|
+
* 处理2D GRD
|
|
543
|
+
* @param {Object} params 参数
|
|
544
|
+
*/
|
|
545
|
+
makeGrd2DData(params)
|
|
546
|
+
{
|
|
547
|
+
const self = this
|
|
548
|
+
this.refresh = false
|
|
549
|
+
Api.grdToGraph(params).then(res =>
|
|
550
|
+
{
|
|
551
|
+
if (res.ret === 0)
|
|
552
|
+
{
|
|
553
|
+
self.Grd2DSrc = 'data:image/png;base64,' + res.graph
|
|
554
|
+
self.data.datatype = 'png'
|
|
555
|
+
self.data.comProps = { elAttrs: { fit: 'scale-down' } }
|
|
556
|
+
this.refresh = true
|
|
557
|
+
}
|
|
558
|
+
}).catch(err =>
|
|
559
|
+
{
|
|
560
|
+
this.$showMsg('grd转换失败', 'error')
|
|
561
|
+
console.error(err)
|
|
562
|
+
})
|
|
563
|
+
},
|
|
564
|
+
|
|
565
|
+
async makegrd3DData(type)
|
|
566
|
+
{
|
|
567
|
+
// if (window?.Viewer?.layers?._layerCache?.geojson && window?.Viewer?.layers?._layerCache?.geojson['layer' + this.params.data.mediaId])
|
|
568
|
+
// {
|
|
569
|
+
// window.Viewer.layers._layerCache.geojson['layer' + this.params.data.mediaId].show = type
|
|
570
|
+
// return
|
|
571
|
+
// }
|
|
572
|
+
if (window?.Viewer?.entities?.values)
|
|
573
|
+
{
|
|
574
|
+
let flag = false
|
|
575
|
+
window.Viewer.entities.values.forEach((item) =>
|
|
576
|
+
{
|
|
577
|
+
if ((item.name == 'layer' + this.params.data.mediaId) && item.data.showType !== this.params.data.showType && type)
|
|
578
|
+
|
|
579
|
+
Viewer.entities.remove(item)
|
|
580
|
+
|
|
581
|
+
else if (item.name == 'layer' + this.params.data.mediaId)
|
|
582
|
+
{
|
|
583
|
+
flag = true
|
|
584
|
+
item.show = type
|
|
585
|
+
}
|
|
586
|
+
})
|
|
587
|
+
if (flag)
|
|
588
|
+
return
|
|
589
|
+
}
|
|
590
|
+
let form = {
|
|
591
|
+
cmap: this.params.data.showType ? this.params.data.showType : 'brg',
|
|
592
|
+
file: this.params.data.src,
|
|
593
|
+
num: 20,
|
|
594
|
+
param: {
|
|
595
|
+
cmap: this.params.data.showType ? this.params.data.showType : 'brg',
|
|
596
|
+
levels: [],
|
|
597
|
+
num: 20
|
|
598
|
+
},
|
|
599
|
+
type: 'contourpol'
|
|
600
|
+
}
|
|
601
|
+
let params = this.makeGrdData(form)
|
|
602
|
+
// const self = this
|
|
603
|
+
// self.legendList = []
|
|
604
|
+
// Api.grdToGeojson(params).then(res =>
|
|
605
|
+
// {
|
|
606
|
+
// if (res.ret === 0)
|
|
607
|
+
// {
|
|
608
|
+
// let arr = []
|
|
609
|
+
// for (let i in res.legend)
|
|
610
|
+
// arr.push({ name: i, url: this.createColorImage(res.legend[i], 50, 30) })
|
|
611
|
+
// self.legendList = arr.reverse()
|
|
612
|
+
// self.makeGeojsonData('', res.geojson, self.geojsonLoadCallBack, null, true)
|
|
613
|
+
// }
|
|
614
|
+
// }).catch(err =>
|
|
615
|
+
// {
|
|
616
|
+
// this.$showMsg('grd转换失败', 'error')
|
|
617
|
+
// console.error(err)
|
|
618
|
+
// })
|
|
619
|
+
// ---------------------------------------图片模式-----------------------------------------
|
|
620
|
+
let data = await cx.svr.data.query($app.TabConst.sjj.major, $app.TabConst.sjj.minor,
|
|
621
|
+
{
|
|
622
|
+
args: this.params.nodeId ? [['userid', '=', $g.user.id, null], ['id', '=', this.params.nodeId, 'and']] : [['userid', '=', $g.user.id, null], ['defdata', '=', 1, 'and']]
|
|
623
|
+
})
|
|
624
|
+
|
|
625
|
+
Api.grdToGraph(params).then(res =>
|
|
626
|
+
{
|
|
627
|
+
if (res.ret === 0)
|
|
628
|
+
{
|
|
629
|
+
let target1 = this.WebProj4.transform(data[0].epsg, 'EPSG:4326', res.info.bound[0], res.info.bound[1])
|
|
630
|
+
let target2 = this.WebProj4.transform(data[0].epsg, 'EPSG:4326', res.info.bound[2], res.info.bound[3])
|
|
631
|
+
let target3 = [target1[0], target2[1]]
|
|
632
|
+
let target4 = [target2[0], target1[1]]
|
|
633
|
+
let entity = Viewer.entities.add({
|
|
634
|
+
name: 'layer' + this.params.data.mediaId,
|
|
635
|
+
data: JSON.parse(JSON.stringify(this.params.data)),
|
|
636
|
+
polygon: {
|
|
637
|
+
hierarchy: Cesium.Cartesian3.fromDegreesArray([
|
|
638
|
+
Number(target1[0]),
|
|
639
|
+
Number(target1[1]),
|
|
640
|
+
Number(target3[0]),
|
|
641
|
+
Number(target3[1]),
|
|
642
|
+
Number(target2[0]),
|
|
643
|
+
Number(target2[1]),
|
|
644
|
+
Number(target4[0]),
|
|
645
|
+
Number(target4[1])
|
|
646
|
+
]),
|
|
647
|
+
material: new Cesium.ImageMaterialProperty({ image: 'data:image/png;base64,' + res.graph, transparent: true }), // image的值为图片地址。ImageMaterialProperty默认图片不重复,不需要额外设置
|
|
648
|
+
clampToGround: true,
|
|
649
|
+
heightReference: Cesium.HeightReference.CLAMP_TO_GROUND
|
|
650
|
+
}
|
|
651
|
+
})
|
|
652
|
+
Viewer.flyTo(entity)
|
|
653
|
+
}
|
|
654
|
+
}).catch(err =>
|
|
655
|
+
{
|
|
656
|
+
this.$showMsg('grd转换失败', 'error')
|
|
657
|
+
console.error(err)
|
|
658
|
+
})
|
|
659
|
+
// -------------------------------------------------------------------------------------------
|
|
660
|
+
},
|
|
661
|
+
|
|
662
|
+
/**
|
|
663
|
+
* 创建颜色图片
|
|
664
|
+
* @param {String} color 颜色
|
|
665
|
+
* @param {Number} width 宽度
|
|
666
|
+
* @param {Number} height 高度
|
|
667
|
+
* @returns {String} 图片URL
|
|
668
|
+
*/
|
|
669
|
+
createColorImage(color, width, height)
|
|
670
|
+
{
|
|
671
|
+
let canvas = document.createElement('canvas')
|
|
672
|
+
canvas.width = width
|
|
673
|
+
canvas.height = height
|
|
674
|
+
let ctx = canvas.getContext('2d')
|
|
675
|
+
ctx.fillStyle = color
|
|
676
|
+
ctx.fillRect(0, 0, width, height)
|
|
677
|
+
let img = document.createElement('img')
|
|
678
|
+
img.src = canvas.toDataURL('image/png')
|
|
679
|
+
return img.src
|
|
680
|
+
},
|
|
681
|
+
|
|
682
|
+
/**
|
|
683
|
+
* 获取地图服务
|
|
684
|
+
*/
|
|
685
|
+
getMapservice()
|
|
686
|
+
{
|
|
687
|
+
// if (cx.localCache.get('baseMapArr'))
|
|
688
|
+
// this.baseMapArr = JSON.parse(cx.localCache.get('baseMapArr')).filter(item => item.maptype == 'tdt')
|
|
689
|
+
// else if (!$g.init.mapservice)
|
|
690
|
+
// {
|
|
691
|
+
// cx.svr.data.query(cx.consts.SYSTAB, cx.consts.TAB_MAPSERVICE, { args: [['basemap', '=', 1]] }).then(ret =>
|
|
692
|
+
// {
|
|
693
|
+
// if (ret.length)
|
|
694
|
+
// {
|
|
695
|
+
// // 设置底图
|
|
696
|
+
// this.baseMapArr = ret.filter(item => item.basemap === 1)
|
|
697
|
+
// cx.localCache.set('baseMapArr', JSON.stringify(this.baseMapArr))
|
|
698
|
+
// let pubCxe = new PubCxe()
|
|
699
|
+
// pubCxe.loadBasemap(this.baseMapArr)
|
|
700
|
+
// }
|
|
701
|
+
// })
|
|
702
|
+
// }
|
|
703
|
+
// else
|
|
704
|
+
// this.baseMapArr = $g.init.mapservice.filter(item => item.basemap === 1)
|
|
705
|
+
let baseLayer = new cxe.ImageryLayer('tdt', {
|
|
706
|
+
style: 'img',
|
|
707
|
+
key: '569737ea36171685d686b54ce079a49d'
|
|
708
|
+
})
|
|
709
|
+
let baseLayerZj = new cxe.ImageryLayer('tdt', {
|
|
710
|
+
style: 'cva',
|
|
711
|
+
key: '569737ea36171685d686b54ce079a49d'
|
|
712
|
+
})
|
|
713
|
+
Viewer.layers.addImageryLayer(baseLayer)
|
|
714
|
+
Viewer.layers.addImageryLayer(baseLayerZj)
|
|
715
|
+
},
|
|
716
|
+
|
|
717
|
+
/**
|
|
718
|
+
* 确定按钮事件
|
|
719
|
+
* @param {Object} form 表单数据
|
|
720
|
+
* @param {String} grdRadio 单选值
|
|
721
|
+
*/
|
|
722
|
+
onOk(form, grdRadio)
|
|
723
|
+
{
|
|
724
|
+
let params = this.makeGrdData(form)
|
|
725
|
+
this.grdRadio = grdRadio
|
|
726
|
+
if (grdRadio === this.types.grd2D)
|
|
727
|
+
this.makeGrd2DData(params)
|
|
728
|
+
else
|
|
729
|
+
this.makegrd3DData(params)
|
|
730
|
+
},
|
|
731
|
+
|
|
732
|
+
/**
|
|
733
|
+
* GeoJSON加载回调
|
|
734
|
+
* @param {Object} layer 图层
|
|
735
|
+
*/
|
|
736
|
+
geojsonLoadCallBack(layer)
|
|
737
|
+
{
|
|
738
|
+
layer.eachOverlay((item) =>
|
|
739
|
+
{
|
|
740
|
+
if (item.polygon)
|
|
741
|
+
{
|
|
742
|
+
if (item.properties?.color.getValue())
|
|
743
|
+
{
|
|
744
|
+
item.polygon.height = 1
|
|
745
|
+
item.polygon.fill = true
|
|
746
|
+
let color = item.properties?.color.getValue()
|
|
747
|
+
item.polygon.material = Cesium.Color.fromCssColorString(color) // 材质
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
})
|
|
751
|
+
},
|
|
752
|
+
|
|
753
|
+
/**
|
|
754
|
+
* 绘制靶区
|
|
755
|
+
*/
|
|
756
|
+
drawBq()
|
|
757
|
+
{
|
|
758
|
+
let self = this
|
|
759
|
+
this.index += 1
|
|
760
|
+
|
|
761
|
+
if (self.drawPolygonDr)
|
|
762
|
+
|
|
763
|
+
this.drawPolygonDr.start()
|
|
764
|
+
|
|
765
|
+
else
|
|
766
|
+
{
|
|
767
|
+
this.drawPolygonDr = new cxe.DrawPolygon(Viewer, { layer: layerBqqdDraw })
|
|
768
|
+
this.drawPolygonDr.start()
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
// 绘制结束的回调(修改绘制面的颜色)
|
|
772
|
+
this.drawPolygonDr._drawFinish = function(graph, event)
|
|
773
|
+
{
|
|
774
|
+
self.bqmj = graph.graph.area.toFixed(2)
|
|
775
|
+
let coordinates = []
|
|
776
|
+
|
|
777
|
+
if (self.drawPolygonDr)
|
|
778
|
+
{
|
|
779
|
+
graph.graph.setStyle({
|
|
780
|
+
material: Cesium.Color.fromCssColorString('rgba(9, 105, 241, 0.6)'),
|
|
781
|
+
name: 'layerBqqd' + self.index,
|
|
782
|
+
clampToGround: true
|
|
783
|
+
})
|
|
784
|
+
let arr = []
|
|
785
|
+
graph.graph.positions.forEach(item =>
|
|
786
|
+
{
|
|
787
|
+
arr.push([item._lng, item._lat, item._alt])
|
|
788
|
+
})
|
|
789
|
+
coordinates.push(arr)
|
|
790
|
+
self.setGeoJson(coordinates)
|
|
791
|
+
setTimeout(() =>
|
|
792
|
+
{
|
|
793
|
+
self.drawPolygonDr.sleep()
|
|
794
|
+
})
|
|
795
|
+
// self.drawPolygonDr = null
|
|
796
|
+
self.dialogFormVisible = true
|
|
797
|
+
}
|
|
798
|
+
}
|
|
799
|
+
},
|
|
800
|
+
|
|
801
|
+
// DrawPolygon(arr)
|
|
802
|
+
// {
|
|
803
|
+
// if (!layerBqqdDraw)
|
|
804
|
+
// {
|
|
805
|
+
// layerBqqdDraw = new cxe.VectorLayer('layerBqqdDraw')
|
|
806
|
+
// layerBqqdDraw.setStyle({
|
|
807
|
+
// clampToGround: true,
|
|
808
|
+
// disableDepthTestDistance: Number.POSITIVE_INFINITY
|
|
809
|
+
// })
|
|
810
|
+
// Viewer.layers.addLayer(layerBqqdDraw)
|
|
811
|
+
// }
|
|
812
|
+
// let Polygon = new cxe.Polygon(arr.join(';'))
|
|
813
|
+
// Polygon.setStyle({
|
|
814
|
+
// material: Cesium.Color.fromCssColorString('rgba(9, 105, 241, 0.6)'),
|
|
815
|
+
// name: 'layerBqqd' + this.index,
|
|
816
|
+
// clampToGround: true
|
|
817
|
+
// })
|
|
818
|
+
// layerBqqdDraw.addOverlay(Polygon)
|
|
819
|
+
// },
|
|
820
|
+
|
|
821
|
+
/**
|
|
822
|
+
* 删除标记
|
|
823
|
+
*/
|
|
824
|
+
delBj()
|
|
825
|
+
{
|
|
826
|
+
this.geometry[this.index] = null
|
|
827
|
+
if (Viewer?.layers?._layerCache?.vector?.layerBqqdDraw?._cache)
|
|
828
|
+
{
|
|
829
|
+
for (let i in Viewer.layers._layerCache.vector.layerBqqdDraw._cache)
|
|
830
|
+
{
|
|
831
|
+
if (Viewer.layers._layerCache.vector.layerBqqdDraw._cache[i].style.name == 'layerBqqd' + this.index)
|
|
832
|
+
Viewer.layers._layerCache.vector.layerBqqdDraw._cache[i].show = false
|
|
833
|
+
}
|
|
834
|
+
}
|
|
835
|
+
this.dialogFormVisible = false
|
|
836
|
+
},
|
|
837
|
+
|
|
838
|
+
/**
|
|
839
|
+
* 清除绘制的靶区
|
|
840
|
+
*/
|
|
841
|
+
clearDrawBq()
|
|
842
|
+
{
|
|
843
|
+
if (this.checkLayerId)
|
|
844
|
+
{
|
|
845
|
+
for (let i in Viewer.layers._layerCache.vector.layerBqqdDraw._cache)
|
|
846
|
+
{
|
|
847
|
+
if (Viewer.layers._layerCache.vector.layerBqqdDraw._cache[i].style.name == this.checkLayerId)
|
|
848
|
+
{
|
|
849
|
+
Viewer.layers._layerCache.vector.layerBqqdDraw._cache[i].show = false
|
|
850
|
+
this.geometry[Number(this.checkLayerId.replace('layerBqqd', ''))] = null
|
|
851
|
+
}
|
|
852
|
+
}
|
|
853
|
+
}
|
|
854
|
+
else
|
|
855
|
+
this.$showMsg('请点击要删除的靶区', 'warning')
|
|
856
|
+
},
|
|
857
|
+
|
|
858
|
+
/**
|
|
859
|
+
* 构造GeoJSON对象
|
|
860
|
+
* @param {Array} coordinates 坐标数组
|
|
861
|
+
*/
|
|
862
|
+
setGeoJson(coordinates)
|
|
863
|
+
{
|
|
864
|
+
coordinates[0].push(coordinates[0][0])
|
|
865
|
+
let arr = []
|
|
866
|
+
coordinates[0].forEach((item) =>
|
|
867
|
+
{
|
|
868
|
+
let target = this.WebProj4.transform('EPSG:4326', 'EPSG:4326', item[0], item[1])
|
|
869
|
+
let lng = target[0]
|
|
870
|
+
let lat = target[1]
|
|
871
|
+
arr.push([lng, lat])
|
|
872
|
+
})
|
|
873
|
+
let geometry =
|
|
874
|
+
{
|
|
875
|
+
type: 'FeatureCollection',
|
|
876
|
+
features: [
|
|
877
|
+
{
|
|
878
|
+
properties: {
|
|
879
|
+
version: 0
|
|
880
|
+
},
|
|
881
|
+
id: this.index,
|
|
882
|
+
type: 'Feature',
|
|
883
|
+
geometry: {
|
|
884
|
+
type: 'Polygon',
|
|
885
|
+
coordinates: [arr]
|
|
886
|
+
}
|
|
887
|
+
}
|
|
888
|
+
]
|
|
889
|
+
}
|
|
890
|
+
this.geometry[this.index] = geometry
|
|
891
|
+
},
|
|
892
|
+
|
|
893
|
+
/**
|
|
894
|
+
* 添加靶区参数
|
|
895
|
+
*/
|
|
896
|
+
addBqCs()
|
|
897
|
+
{
|
|
898
|
+
this.geometry[this.index].features[0].properties.bqmj = this.bqmj
|
|
899
|
+
this.geometry[this.index].features[0].properties.bqyj = this.bqyj
|
|
900
|
+
this.geometry[this.index].features[0].properties.bqdh = this.bqdh
|
|
901
|
+
this.bqmj = ''
|
|
902
|
+
this.bqyj = ''
|
|
903
|
+
this.bqdh = ''
|
|
904
|
+
this.dialogFormVisible = false
|
|
905
|
+
},
|
|
906
|
+
|
|
907
|
+
/**
|
|
908
|
+
* 导出SHP
|
|
909
|
+
*/
|
|
910
|
+
exportShp()
|
|
911
|
+
{
|
|
912
|
+
if (this.geometry.length)
|
|
913
|
+
{
|
|
914
|
+
let geometry = {
|
|
915
|
+
type: 'FeatureCollection',
|
|
916
|
+
features: [
|
|
917
|
+
]
|
|
918
|
+
}
|
|
919
|
+
this.geometry.forEach((item) =>
|
|
920
|
+
{
|
|
921
|
+
if (item)
|
|
922
|
+
geometry.features.push(item.features[0])
|
|
923
|
+
})
|
|
924
|
+
cx.http.post(cx.service.url('GisSvr/GeoJsonToShp'), { rename: ['靶区范围'], data: geometry }).then((res) =>
|
|
925
|
+
{
|
|
926
|
+
if (!res.ret)
|
|
927
|
+
cx.svr.file.download({ filename: res.data[0].filename })
|
|
928
|
+
else
|
|
929
|
+
this.$showMsg('shp文件生成失败')
|
|
930
|
+
})
|
|
931
|
+
}
|
|
932
|
+
else
|
|
933
|
+
this.$showMsg('请先绘制靶区范围')
|
|
934
|
+
},
|
|
935
|
+
|
|
936
|
+
/**
|
|
937
|
+
* 保存靶区
|
|
938
|
+
*/
|
|
939
|
+
saveShp()
|
|
940
|
+
{
|
|
941
|
+
if (this.geometry.length)
|
|
942
|
+
{
|
|
943
|
+
let geometry = {
|
|
944
|
+
type: 'FeatureCollection',
|
|
945
|
+
features: [
|
|
946
|
+
]
|
|
947
|
+
}
|
|
948
|
+
this.geometry.forEach((item) =>
|
|
949
|
+
{
|
|
950
|
+
if (item)
|
|
951
|
+
geometry.features.push(item.features[0])
|
|
952
|
+
})
|
|
953
|
+
let att = JSON.parse(JSON.stringify(this.mrSjj))
|
|
954
|
+
att.memo = JSON.stringify(geometry)
|
|
955
|
+
att.datatype = 'POLYGON'
|
|
956
|
+
att.sjjname = att.name
|
|
957
|
+
att.anlycol = att.name
|
|
958
|
+
att.layer = att.name
|
|
959
|
+
att.glid = att.id
|
|
960
|
+
att.username = att.userid
|
|
961
|
+
att.sourceid = 0
|
|
962
|
+
att.yxlx = ''
|
|
963
|
+
att.udate = cx.formatter.dateDb(cx.datetime.now())
|
|
964
|
+
att.gcsj = 1 // 为过程数据
|
|
965
|
+
delete att.id
|
|
966
|
+
let fld = JSON.parse(JSON.stringify($g.field.fld.yclsjj))
|
|
967
|
+
fld.forEach((item) =>
|
|
968
|
+
{
|
|
969
|
+
if (item.colname == 'memo')
|
|
970
|
+
{
|
|
971
|
+
item.editable = 0
|
|
972
|
+
item.newedit = 0
|
|
973
|
+
}
|
|
974
|
+
})
|
|
975
|
+
let params =
|
|
976
|
+
{
|
|
977
|
+
major: $app.TabConst.yclsjj.major,
|
|
978
|
+
minor: $app.TabConst.yclsjj.minor,
|
|
979
|
+
flds: fld,
|
|
980
|
+
att: att,
|
|
981
|
+
title: '属性录入',
|
|
982
|
+
onOk: this.onOkAdd
|
|
983
|
+
}
|
|
984
|
+
cx.run.runPlug('AttInput', params)
|
|
985
|
+
}
|
|
986
|
+
else
|
|
987
|
+
this.$showMsg('请先绘制靶区范围')
|
|
988
|
+
},
|
|
989
|
+
|
|
990
|
+
/**
|
|
991
|
+
* 添加成功回调
|
|
992
|
+
* @param {Object} att 属性数据
|
|
993
|
+
* @returns {Promise<Boolean>} 是否成功
|
|
994
|
+
*/
|
|
995
|
+
async onOkAdd(att)
|
|
996
|
+
{
|
|
997
|
+
att.gcsj = 1
|
|
998
|
+
let flag = await this.isSameName(att)
|
|
999
|
+
if (!flag)
|
|
1000
|
+
{
|
|
1001
|
+
this.$showMsg('已存在数据名称与图层名称相同数据', 'warning')
|
|
1002
|
+
return false
|
|
1003
|
+
}
|
|
1004
|
+
cx.svr.data.add($app.TabConst.yclsjj.major, $app.TabConst.yclsjj.minor, att, 1).then(ret =>
|
|
1005
|
+
{
|
|
1006
|
+
if (!ret)
|
|
1007
|
+
return
|
|
1008
|
+
this.$showMsg('保存成功', 'success')
|
|
1009
|
+
cx.events.publish('getNewTree', { resData: ret })
|
|
1010
|
+
cx.run.closeRun('AttInput')
|
|
1011
|
+
}).catch(err =>
|
|
1012
|
+
{
|
|
1013
|
+
this.onError(err)
|
|
1014
|
+
})
|
|
1015
|
+
},
|
|
1016
|
+
|
|
1017
|
+
/**
|
|
1018
|
+
* 判断名称是否相同
|
|
1019
|
+
* @param {Object} att 属性数据
|
|
1020
|
+
* @returns {Promise<Boolean>} 是否相同
|
|
1021
|
+
*/
|
|
1022
|
+
async isSameName(att)
|
|
1023
|
+
{
|
|
1024
|
+
let data = await cx.svr.data.query($app.TabConst.yclsjj.major, $app.TabConst.yclsjj.minor, { args: [['username', '=', $g.user.id, null], ['glid', '=', att.glid, 'and'], ['name', '=', att.name, 'and'], ['layer', '=', att.layer, 'and']] })
|
|
1025
|
+
.catch(() =>
|
|
1026
|
+
{
|
|
1027
|
+
})
|
|
1028
|
+
if (data.length)
|
|
1029
|
+
return false
|
|
1030
|
+
else
|
|
1031
|
+
return true
|
|
1032
|
+
},
|
|
1033
|
+
|
|
1034
|
+
/**
|
|
1035
|
+
* 返回选择页
|
|
1036
|
+
*/
|
|
1037
|
+
backPage()
|
|
1038
|
+
{
|
|
1039
|
+
if (this.$route.name === 'Bqqd')
|
|
1040
|
+
cx.run.runPlug('Sjfxcl')
|
|
1041
|
+
else
|
|
1042
|
+
cx.run.runPlug('Sjj')
|
|
1043
|
+
}
|
|
1044
|
+
}
|
|
1045
|
+
}
|
|
1046
|
+
</script>
|