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,545 @@
|
|
|
1
|
+
<style lang="scss" scoped>
|
|
2
|
+
:deep(.el-tag) {color: var(--cx-colorText2);height: 0.25rem;}
|
|
3
|
+
:deep(.el-cascader) {width: 100%;}
|
|
4
|
+
</style>
|
|
5
|
+
|
|
6
|
+
<template>
|
|
7
|
+
<cx-layout class="cx-plug-attinput" :size="size" padding>
|
|
8
|
+
<cx-region region="center" class="region-padding-top">
|
|
9
|
+
<el-form
|
|
10
|
+
:model="form"
|
|
11
|
+
:rules="rules"
|
|
12
|
+
ref="ruleForm"
|
|
13
|
+
label-width="1.35rem"
|
|
14
|
+
@validate="validate"
|
|
15
|
+
>
|
|
16
|
+
<el-form-item v-for="(item,index) in flds" :key="index" :label="item.namec" :prop="item.colname">
|
|
17
|
+
<template v-if="item.colname === 'name'">
|
|
18
|
+
<el-input v-if="selDateset" v-model="form[item.colname]" />
|
|
19
|
+
<el-input v-else v-model="form[item.colname]" readonly>
|
|
20
|
+
<template #append >
|
|
21
|
+
<cx-button icon="cx-fi ic-search" @click="onSelYssjj"/>
|
|
22
|
+
</template>
|
|
23
|
+
</el-input>
|
|
24
|
+
</template>
|
|
25
|
+
<template v-else-if="item.colname === 'epsg'">
|
|
26
|
+
<el-input v-model="form[item.colname]" clearable>
|
|
27
|
+
<template #append >
|
|
28
|
+
<cx-button icon="cx-fi ic-search" @click="onSelEpsg(form[item.colname])"/>
|
|
29
|
+
</template>
|
|
30
|
+
</el-input>
|
|
31
|
+
</template>
|
|
32
|
+
|
|
33
|
+
<template v-else-if="item.colname === 'x' || item.colname === 'y'">
|
|
34
|
+
<el-select
|
|
35
|
+
v-model="form[item.colname]"
|
|
36
|
+
clearable
|
|
37
|
+
:placeholder="'请选择' + item.colname"
|
|
38
|
+
>
|
|
39
|
+
<el-option
|
|
40
|
+
v-for="opt in item.options"
|
|
41
|
+
:key="opt.value"
|
|
42
|
+
:label="opt.label"
|
|
43
|
+
:value="opt.value"
|
|
44
|
+
/>
|
|
45
|
+
</el-select>
|
|
46
|
+
</template>
|
|
47
|
+
|
|
48
|
+
<template v-else-if="item.colname === 'anlycol'">
|
|
49
|
+
<el-cascader
|
|
50
|
+
v-model="form[item.colname]"
|
|
51
|
+
:size="size"
|
|
52
|
+
:options="item.options"
|
|
53
|
+
:props="{ multiple: true }"
|
|
54
|
+
collapse-tags
|
|
55
|
+
collapse-tags-tooltip
|
|
56
|
+
clearable
|
|
57
|
+
@change="onChangeAnlycol"
|
|
58
|
+
/>
|
|
59
|
+
</template>
|
|
60
|
+
|
|
61
|
+
<template v-else-if="item.colname === 'layer'&¶ms.att._datatype!=='Grd'&¶ms.att._datatype!=='grd'&¶ms.att._datatype!=='tif'">
|
|
62
|
+
<el-cascader
|
|
63
|
+
v-model="form[item.colname]"
|
|
64
|
+
:size="size"
|
|
65
|
+
:props="{ multiple: true }"
|
|
66
|
+
:options="item.options"
|
|
67
|
+
placeholder="根据分析对象自动选择"
|
|
68
|
+
collapse-tags
|
|
69
|
+
collapse-tags-tooltip
|
|
70
|
+
/>
|
|
71
|
+
</template>
|
|
72
|
+
|
|
73
|
+
<el-input v-else v-model="form[item.colname]"></el-input>
|
|
74
|
+
</el-form-item>
|
|
75
|
+
</el-form>
|
|
76
|
+
</cx-region>
|
|
77
|
+
<cx-region region="south" border>
|
|
78
|
+
<cx-cmd-ok-cancel
|
|
79
|
+
:size="size"
|
|
80
|
+
:disabled-ok="!able"
|
|
81
|
+
@ok-click="onOk"
|
|
82
|
+
@cancel-click="onClose"
|
|
83
|
+
>
|
|
84
|
+
</cx-cmd-ok-cancel>
|
|
85
|
+
</cx-region>
|
|
86
|
+
</cx-layout>
|
|
87
|
+
</template>
|
|
88
|
+
|
|
89
|
+
<script>
|
|
90
|
+
/**
|
|
91
|
+
* 插件 - 预处理数据
|
|
92
|
+
*/
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* 修改记录:
|
|
97
|
+
* 24-05-11 张光辉 首次提交
|
|
98
|
+
*/
|
|
99
|
+
import PreDataApi from './PreDataApi.js'
|
|
100
|
+
import PreData from './PreData.js'
|
|
101
|
+
import Api from '../Api.js'
|
|
102
|
+
|
|
103
|
+
export default
|
|
104
|
+
{
|
|
105
|
+
mixins: [cx.mixin.IPlugBase, PreData],
|
|
106
|
+
|
|
107
|
+
data()
|
|
108
|
+
{
|
|
109
|
+
return {
|
|
110
|
+
form: {}, // 存写入的结果
|
|
111
|
+
flds: [],
|
|
112
|
+
rules: {},
|
|
113
|
+
defCols: ['name', 'memo'], // 默认显示的字段
|
|
114
|
+
selDateset: false, // 是否获取了表头,用于控制显示获取表头的按钮,没有获取表头或者没有属性的时候,数据集要选择
|
|
115
|
+
curFiletype: ''
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
|
|
119
|
+
computed:
|
|
120
|
+
{
|
|
121
|
+
able()
|
|
122
|
+
{
|
|
123
|
+
return true
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
|
|
127
|
+
created()
|
|
128
|
+
{
|
|
129
|
+
this.selDateset = this.params.selDateset
|
|
130
|
+
this.getEpsg()
|
|
131
|
+
},
|
|
132
|
+
|
|
133
|
+
beforeUnmount()
|
|
134
|
+
{
|
|
135
|
+
this.selDateset = false
|
|
136
|
+
},
|
|
137
|
+
|
|
138
|
+
methods:
|
|
139
|
+
{
|
|
140
|
+
/**
|
|
141
|
+
* 获取 EPSG
|
|
142
|
+
*/
|
|
143
|
+
getEpsg()
|
|
144
|
+
{
|
|
145
|
+
if (this.params.att.epsg)
|
|
146
|
+
|
|
147
|
+
this.form.epsg = this.params.att.epsg
|
|
148
|
+
|
|
149
|
+
else
|
|
150
|
+
{
|
|
151
|
+
cx.svr.data.query($app.TabConst.sjj.major, $app.TabConst.sjj.minor, { args: [['id', '=', this.params.att.glid]] }).then((res) =>
|
|
152
|
+
{
|
|
153
|
+
if (res.length)
|
|
154
|
+
|
|
155
|
+
this.form.epsg = res[0].epsg
|
|
156
|
+
}).catch(() =>
|
|
157
|
+
{})
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* 初始化数据
|
|
163
|
+
*/
|
|
164
|
+
initData()
|
|
165
|
+
{
|
|
166
|
+
this.initFld(this.params.att, this.params.selDateset)
|
|
167
|
+
},
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* 初始化字段
|
|
171
|
+
* @param {Object} att 属性数据
|
|
172
|
+
* @param {Boolean} selDateset 是否选择数据集
|
|
173
|
+
*/
|
|
174
|
+
initFld(att, selDateset)
|
|
175
|
+
{
|
|
176
|
+
// 如果已经有att,就赋值默认值,并自动获取表头
|
|
177
|
+
if (selDateset)
|
|
178
|
+
{
|
|
179
|
+
this.makeFldsShow(att)
|
|
180
|
+
this.getVal(att)
|
|
181
|
+
this.getHeader(att)
|
|
182
|
+
}
|
|
183
|
+
else
|
|
184
|
+
{
|
|
185
|
+
// 需要用户先选择原始数据,再点击获取表头按钮,然后填充数据
|
|
186
|
+
this.makeFldsShow()
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* 获取表头
|
|
192
|
+
* @param {Object} att 属性数据
|
|
193
|
+
*/
|
|
194
|
+
getHeader(att)
|
|
195
|
+
{
|
|
196
|
+
// 从media查询数据出来
|
|
197
|
+
this.queryMedia(att).then(ret =>
|
|
198
|
+
{
|
|
199
|
+
if (!ret.length)
|
|
200
|
+
return
|
|
201
|
+
this.form.filename = ret[0].filename
|
|
202
|
+
if (att?._datatype.toLowerCase() === 'grd' || att?._datatype.toLowerCase() === 'tif' || att?._datatype.toLowerCase() === 'img')
|
|
203
|
+
return
|
|
204
|
+
PreDataApi.getHeader(ret[0], att._datatype.toLowerCase(), att).then(res =>
|
|
205
|
+
{
|
|
206
|
+
if (res.ret !== 0)
|
|
207
|
+
return
|
|
208
|
+
|
|
209
|
+
let filesInfo = []
|
|
210
|
+
if (att._datatype.toLowerCase() === 'shp' || att._datatype.toLowerCase() === 'mapgis' || att._datatype.toLowerCase() === 'dgss')
|
|
211
|
+
filesInfo = res.filesInfo
|
|
212
|
+
if (att._datatype.toLowerCase() === 'excel' || att._datatype.toLowerCase() === 'csv')
|
|
213
|
+
filesInfo = res.header.map(item => ({ filename: item }))
|
|
214
|
+
|
|
215
|
+
let x = this.flds.find(item => item.colname === 'x')
|
|
216
|
+
if (x)
|
|
217
|
+
x.options = this.makeSelectOpts(filesInfo)
|
|
218
|
+
|
|
219
|
+
let y = this.flds.find(item => item.colname === 'y')
|
|
220
|
+
if (y)
|
|
221
|
+
y.options = this.makeSelectOpts(filesInfo)
|
|
222
|
+
|
|
223
|
+
let anlycol = this.flds.find(item => item.colname === 'anlycol')
|
|
224
|
+
if (anlycol)
|
|
225
|
+
anlycol.options = this.makeAnlyCol(filesInfo)
|
|
226
|
+
|
|
227
|
+
this.filesInfo = filesInfo
|
|
228
|
+
})
|
|
229
|
+
}).catch((err) =>
|
|
230
|
+
{
|
|
231
|
+
this.onError(err)
|
|
232
|
+
})
|
|
233
|
+
},
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* 查询媒体数据
|
|
237
|
+
* @param {Object} att 属性数据
|
|
238
|
+
* @returns {Promise} 查询结果
|
|
239
|
+
*/
|
|
240
|
+
queryMedia(att)
|
|
241
|
+
{
|
|
242
|
+
let param = { args: [['major', '=', $app.TabConst.ysjj.major], ['minor', '=', $app.TabConst.ysjj.minor, 'and'], ['entityid', '=', att.id, 'and']] }
|
|
243
|
+
return cx.svr.data.query(cx.consts.SYSTAB, cx.consts.MEDIA, param)
|
|
244
|
+
},
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* 获取字段列
|
|
248
|
+
* @param {String} type 文件类型
|
|
249
|
+
* @returns {Array} 字段列表
|
|
250
|
+
*/
|
|
251
|
+
getColByType(type)
|
|
252
|
+
{
|
|
253
|
+
const alwaysCols = this.defCols
|
|
254
|
+
switch (type?.toLowerCase())
|
|
255
|
+
{
|
|
256
|
+
case 'excel':
|
|
257
|
+
case 'csv':
|
|
258
|
+
return [...alwaysCols, 'epsg', 'x', 'y', 'anlycol']
|
|
259
|
+
case 'grd':
|
|
260
|
+
case 'tif':
|
|
261
|
+
return [...alwaysCols, 'epsg', 'layer']
|
|
262
|
+
case 'mapgis':
|
|
263
|
+
case 'dgss':
|
|
264
|
+
case 'shp':
|
|
265
|
+
return [...alwaysCols, 'epsg', 'anlycol', 'layer']
|
|
266
|
+
default : return alwaysCols
|
|
267
|
+
}
|
|
268
|
+
},
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* 选择原始数据集
|
|
272
|
+
*/
|
|
273
|
+
onSelYssjj()
|
|
274
|
+
{
|
|
275
|
+
let params =
|
|
276
|
+
{
|
|
277
|
+
...$app.TabConst.ysjj,
|
|
278
|
+
fixedExp: cx.sqlexp.from([['username', '=', $g.user.id]]),
|
|
279
|
+
onOk: this.selYssjj
|
|
280
|
+
}
|
|
281
|
+
cx.run.runPlug('SelData', params)
|
|
282
|
+
},
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* 选择数据集回调
|
|
286
|
+
* @param {Array} selection 选中数据
|
|
287
|
+
*/
|
|
288
|
+
selYssjj(selection)
|
|
289
|
+
{
|
|
290
|
+
if (selection && selection.length)
|
|
291
|
+
{
|
|
292
|
+
this.clear()
|
|
293
|
+
this.initFld(selection[0], true)
|
|
294
|
+
}
|
|
295
|
+
},
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
* 选择 EPSG
|
|
299
|
+
* @param {String} fld 字段值
|
|
300
|
+
*/
|
|
301
|
+
onSelEpsg(fld)
|
|
302
|
+
{
|
|
303
|
+
let params =
|
|
304
|
+
{
|
|
305
|
+
onOk: this.selEpsg
|
|
306
|
+
}
|
|
307
|
+
cx.run.runPlug('SelCoorSys', params)
|
|
308
|
+
},
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* 选择 EPSG 回调
|
|
312
|
+
* @param {Object} selected 选中数据
|
|
313
|
+
*/
|
|
314
|
+
selEpsg(selected)
|
|
315
|
+
{
|
|
316
|
+
this.form.epsg = 'EPSG:' + selected.epsgbm
|
|
317
|
+
},
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* 字段值发生变化
|
|
321
|
+
* @param {Object} fld 字段信息
|
|
322
|
+
* @param {Boolean} changed 是否变更
|
|
323
|
+
*/
|
|
324
|
+
onFldChange(fld, changed)
|
|
325
|
+
{
|
|
326
|
+
console.log(fld)
|
|
327
|
+
},
|
|
328
|
+
|
|
329
|
+
/**
|
|
330
|
+
* 校验表单
|
|
331
|
+
* @param {Object} FormItemProp 表单项
|
|
332
|
+
* @param {Boolean} isValid 是否有效
|
|
333
|
+
* @param {String} message 提示信息
|
|
334
|
+
*/
|
|
335
|
+
validate(FormItemProp, isValid, message)
|
|
336
|
+
{
|
|
337
|
+
},
|
|
338
|
+
|
|
339
|
+
/**
|
|
340
|
+
* 分析字段变更
|
|
341
|
+
* @param {Array} CascaderValue 选中值
|
|
342
|
+
*/
|
|
343
|
+
onChangeAnlycol(CascaderValue)
|
|
344
|
+
{
|
|
345
|
+
if (this.curFiletype.toLowerCase() === 'shp' || this.curFiletype.toLowerCase() === 'mapgis' || this.curFiletype.toLowerCase() === 'dgss')
|
|
346
|
+
{
|
|
347
|
+
let fld = this.flds.find(item => item.colname === 'layer')
|
|
348
|
+
if (fld)
|
|
349
|
+
{
|
|
350
|
+
let arr = CascaderValue.map(item => item[0])
|
|
351
|
+
let set = new Set(arr)
|
|
352
|
+
fld.options = this.makeLayer(Array.from(set))
|
|
353
|
+
|
|
354
|
+
this.form.layer = Array.from(set)
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
},
|
|
358
|
+
|
|
359
|
+
/**
|
|
360
|
+
* 消息响应函数-OK
|
|
361
|
+
*/
|
|
362
|
+
async onOk()
|
|
363
|
+
{
|
|
364
|
+
let flag = await this.checkFileData()
|
|
365
|
+
if (flag)
|
|
366
|
+
return
|
|
367
|
+
const self = this
|
|
368
|
+
self.$refs.ruleForm.validate(async valid =>
|
|
369
|
+
{
|
|
370
|
+
if (valid)
|
|
371
|
+
{
|
|
372
|
+
// 添加数据
|
|
373
|
+
vm.$processing.show()
|
|
374
|
+
let { adds, medias } = await self.makeAtt()
|
|
375
|
+
let flag = await self.isSameName(adds[0])
|
|
376
|
+
if (!flag)
|
|
377
|
+
{
|
|
378
|
+
self.$showMsg('已存在数据名称与图层名称相同数据', 'warning')
|
|
379
|
+
vm.$processing.close()
|
|
380
|
+
return false
|
|
381
|
+
}
|
|
382
|
+
cx.svr.data.addsJson($app.TabConst.yclsjj.major, $app.TabConst.yclsjj.minor, adds, 1).then(async ret =>
|
|
383
|
+
{
|
|
384
|
+
if (!ret)
|
|
385
|
+
return
|
|
386
|
+
let medias_ = medias.map((item, index) => ({ ...item, entityid: ret[index].id, mode: 2 }))
|
|
387
|
+
if (medias_.length)
|
|
388
|
+
{
|
|
389
|
+
cx.svr.data.addsJson(cx.consts.SYSTAB, cx.consts.MEDIA, medias_, 1).then(res =>
|
|
390
|
+
{
|
|
391
|
+
vm.$processing.close()
|
|
392
|
+
self.$showSuccess('add')
|
|
393
|
+
cx.events.publish('add-yclsjj')
|
|
394
|
+
self.onClose()
|
|
395
|
+
if (self.params.afterAdd)
|
|
396
|
+
self.params.afterAdd()
|
|
397
|
+
}).catch(err =>
|
|
398
|
+
{
|
|
399
|
+
self.onError(err)
|
|
400
|
+
})
|
|
401
|
+
}
|
|
402
|
+
}).catch(err =>
|
|
403
|
+
{
|
|
404
|
+
self.onError(err)
|
|
405
|
+
})
|
|
406
|
+
}
|
|
407
|
+
else
|
|
408
|
+
{
|
|
409
|
+
this.$showMsg('请将内容填写完整', 'error')
|
|
410
|
+
return false
|
|
411
|
+
}
|
|
412
|
+
})
|
|
413
|
+
},
|
|
414
|
+
|
|
415
|
+
/**
|
|
416
|
+
* 检查 CSV 文件数据
|
|
417
|
+
* @returns {Promise<Boolean>} 是否有问题
|
|
418
|
+
*/
|
|
419
|
+
async checkFileData()
|
|
420
|
+
{
|
|
421
|
+
if (this.curFiletype.toLowerCase() === 'csv' || this.curFiletype.toLowerCase() === 'excel')
|
|
422
|
+
{
|
|
423
|
+
let flag = false
|
|
424
|
+
let res = await Api.preprocesscheck({ file: this.form.filename, cols: this.form.anlycol[0] })
|
|
425
|
+
for (let i in res.column)
|
|
426
|
+
{
|
|
427
|
+
flag = true
|
|
428
|
+
this.$showMsg(i + ': ' + res.column[i], 'warning')
|
|
429
|
+
}
|
|
430
|
+
return flag
|
|
431
|
+
}
|
|
432
|
+
else
|
|
433
|
+
return false
|
|
434
|
+
},
|
|
435
|
+
|
|
436
|
+
/**
|
|
437
|
+
* 判断同名校验
|
|
438
|
+
* @param {Object} att 属性数据
|
|
439
|
+
* @returns {Promise<Boolean>} 是否同名
|
|
440
|
+
*/
|
|
441
|
+
async isSameName(att)
|
|
442
|
+
{
|
|
443
|
+
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']] })
|
|
444
|
+
.catch(() =>
|
|
445
|
+
{
|
|
446
|
+
})
|
|
447
|
+
if (data.length)
|
|
448
|
+
return false
|
|
449
|
+
else
|
|
450
|
+
return true
|
|
451
|
+
},
|
|
452
|
+
|
|
453
|
+
/**
|
|
454
|
+
* 构造入库的数据格式
|
|
455
|
+
*/
|
|
456
|
+
async makeAtt()
|
|
457
|
+
{
|
|
458
|
+
let self = this
|
|
459
|
+
let adds = [], medias = []
|
|
460
|
+
let { anlycol } = self.form
|
|
461
|
+
if (!anlycol)
|
|
462
|
+
{
|
|
463
|
+
adds.push({ ...self.form, datatype: self.curFiletype, anlycol: self.form.name, sjjname: self.params.att.sjjname, glid: self.params.att.glid })
|
|
464
|
+
medias.push({ ...$app.TabConst.yclsjj, entityid: 0, filename: self.form.filename, title: self.form.layer + '.' + self.form.filename.split('.')[1], uperson: $g.user.name })
|
|
465
|
+
}
|
|
466
|
+
else
|
|
467
|
+
{
|
|
468
|
+
for (let i = 0; i < anlycol.length; i++)
|
|
469
|
+
{
|
|
470
|
+
let ay = anlycol[i]
|
|
471
|
+
if (self.curFiletype.toLowerCase() === 'shp' || self.curFiletype.toLowerCase() === 'mapgis' || self.curFiletype.toLowerCase() === 'dgss')
|
|
472
|
+
{
|
|
473
|
+
// 处理shp为geojson格式的数据
|
|
474
|
+
// let filesList = self.filesInfo.filter((item) =>
|
|
475
|
+
// {
|
|
476
|
+
// return item.filename == anlycol[i][0]
|
|
477
|
+
// })
|
|
478
|
+
|
|
479
|
+
let files = self.filesInfo.map(item => item.filePath)
|
|
480
|
+
let geojsonRet = await Api.shpToGeojson({ files })
|
|
481
|
+
|
|
482
|
+
if (geojsonRet.ret === 0)
|
|
483
|
+
{
|
|
484
|
+
self.filesInfo.forEach((filesInfo, index) =>
|
|
485
|
+
{
|
|
486
|
+
let geojsonPath = geojsonRet.tranfiles[index]
|
|
487
|
+
if (filesInfo.filename === ay[0])
|
|
488
|
+
{
|
|
489
|
+
let temp = filesInfo
|
|
490
|
+
if (temp)
|
|
491
|
+
{
|
|
492
|
+
Api.pubSave({ files: [geojsonPath.replace(/^\//, '')] }).then((res2) =>
|
|
493
|
+
{
|
|
494
|
+
|
|
495
|
+
})
|
|
496
|
+
medias.push({ ...$app.TabConst.yclsjj, entityid: 0, mode: 2, filename: geojsonPath.replace(/^\//, ''), title: self.form.layer + '.' + geojsonPath.replace(/^\//, '').split('.')[1], uperson: $g.user.name })
|
|
497
|
+
adds.push({ ...self.form, datatype: temp.shptype, layer: ay[0], anlycol: ay[1], sjjname: self.params.att.sjjname, glid: self.params.att.glid })
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
})
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
// if (geojsonRet.ret === 0)
|
|
504
|
+
// {
|
|
505
|
+
// self.filesInfo.forEach((filesInfo, index) =>
|
|
506
|
+
// {
|
|
507
|
+
// let geojsonPath = geojsonRet.tranfiles[index]
|
|
508
|
+
// if (filesInfo.filename === ay[0])
|
|
509
|
+
// {
|
|
510
|
+
// let temp = filesInfo
|
|
511
|
+
// if (temp)
|
|
512
|
+
// {
|
|
513
|
+
// medias.push({ ...$app.TabConst.yclsjj, entityid: 0, filename: geojsonPath.replace(/^\//, ''), title: self.form.layer + '.' + geojsonPath.replace(/^\//, '').split('.')[1], uperson: $g.user.name })
|
|
514
|
+
// adds.push({ ...self.form, datatype: temp.shptype, layer: ay[0], anlycol: ay[1], sjjname: self.params.att.sjjname, glid: self.params.att.glid })
|
|
515
|
+
// }
|
|
516
|
+
// }
|
|
517
|
+
// })
|
|
518
|
+
// }
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
if (self.curFiletype === 'excel' || self.curFiletype === 'csv')
|
|
522
|
+
{
|
|
523
|
+
adds.push({ ...self.form, datatype: this.curFiletype, anlycol: ay[0], sjjname: self.params.att.sjjname, glid: self.params.att.glid })
|
|
524
|
+
medias.push({ ...$app.TabConst.yclsjj, entityid: 0, filename: self.form.filename, title: cx.file.getFileName(self.form.filename), uperson: $g.user.name })
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
return new Promise((resolve, reject) =>
|
|
529
|
+
{
|
|
530
|
+
resolve({ adds, medias })
|
|
531
|
+
})
|
|
532
|
+
},
|
|
533
|
+
|
|
534
|
+
/**
|
|
535
|
+
* 清空数据
|
|
536
|
+
*/
|
|
537
|
+
clear()
|
|
538
|
+
{
|
|
539
|
+
this.rules = {}
|
|
540
|
+
this.flds = []
|
|
541
|
+
this.form = {}
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
</script>
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 接口类 - 预处理数据模块,获取文件的字段
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* 维护记录:
|
|
7
|
+
* 24-05-11 张光辉 首次编写
|
|
8
|
+
*/
|
|
9
|
+
class PreData
|
|
10
|
+
{
|
|
11
|
+
// media的filename
|
|
12
|
+
static getFilename(att)
|
|
13
|
+
{
|
|
14
|
+
return att.filename
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* 获取数据的键值
|
|
19
|
+
* @param {Object} att 数据
|
|
20
|
+
* @param {String} type 数据
|
|
21
|
+
* @param {Object} data 原始数据
|
|
22
|
+
* @returns Promise
|
|
23
|
+
*/
|
|
24
|
+
static getHeader(att, type, data)
|
|
25
|
+
{
|
|
26
|
+
let filename = this.getFilename(att)
|
|
27
|
+
switch (type)
|
|
28
|
+
{
|
|
29
|
+
case 'excel':
|
|
30
|
+
case 'csv':
|
|
31
|
+
return this.getExcelHeader(filename)
|
|
32
|
+
case 'grd':
|
|
33
|
+
return false
|
|
34
|
+
case 'mapgis':
|
|
35
|
+
case 'dgss':
|
|
36
|
+
case 'shp':
|
|
37
|
+
return this.getMDSHeader(filename, type, data)
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* excel文件的表头
|
|
43
|
+
* @param {String} filename 文件路径
|
|
44
|
+
* @returns Promise
|
|
45
|
+
*/
|
|
46
|
+
static getExcelHeader(filename)
|
|
47
|
+
{
|
|
48
|
+
return new Promise((resolve, reject) =>
|
|
49
|
+
{
|
|
50
|
+
let params = { file: filename }
|
|
51
|
+
cx.http.post(`s_znycpjSvr_sys1` + '/doc/tablefile/header', params).then((result) =>
|
|
52
|
+
{
|
|
53
|
+
resolve(result)
|
|
54
|
+
}).catch((err) =>
|
|
55
|
+
{
|
|
56
|
+
reject(err)
|
|
57
|
+
})
|
|
58
|
+
})
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* shp文件的属性键值
|
|
63
|
+
* @param {String} filename 文件路径
|
|
64
|
+
* @returns Promise
|
|
65
|
+
*/
|
|
66
|
+
static getShpHeader(filename)
|
|
67
|
+
{
|
|
68
|
+
return new Promise((resolve, reject) =>
|
|
69
|
+
{
|
|
70
|
+
let params = { file: filename }
|
|
71
|
+
cx.http.post(`s_znycpjSvr_sys1` + '/doc/shpfile/getshpinfo', params).then((result) =>
|
|
72
|
+
{
|
|
73
|
+
resolve(result)
|
|
74
|
+
}).catch((err) =>
|
|
75
|
+
{
|
|
76
|
+
reject(err)
|
|
77
|
+
})
|
|
78
|
+
})
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* shp文件的属性键值
|
|
83
|
+
* @param {String} filename 文件路径
|
|
84
|
+
* @returns Promise
|
|
85
|
+
*/
|
|
86
|
+
static getMDSHeader(filename, type, att)
|
|
87
|
+
{
|
|
88
|
+
return new Promise((resolve, reject) =>
|
|
89
|
+
{
|
|
90
|
+
let params = { file: filename, format: type, reversal: att.reversal ? true : false }
|
|
91
|
+
cx.http.post(`s_znycpjSvr_sys1` + '/doc/mapgisfile/tran', params).then((result) =>
|
|
92
|
+
{
|
|
93
|
+
resolve(result)
|
|
94
|
+
}).catch((err) =>
|
|
95
|
+
{
|
|
96
|
+
reject(err)
|
|
97
|
+
})
|
|
98
|
+
})
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
export default PreData
|