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,774 @@
|
|
|
1
|
+
<style lang="scss" scoped>
|
|
2
|
+
.GeoscienceUpload {
|
|
3
|
+
display: flex; flex-direction: column; justify-content: space-around; align-items: center; margin: auto 0; overflow-y: scroll; height: 100%;
|
|
4
|
+
}
|
|
5
|
+
.el_form { width: 90%; margin: auto; height: 92%; overflow-y: scroll;
|
|
6
|
+
.formItem {
|
|
7
|
+
.el-form-item { margin: 18px 0px;
|
|
8
|
+
.el-textarea { width: 75%; }
|
|
9
|
+
.el-input { width: 75%;
|
|
10
|
+
.el-input__wrapper { box-shadow: 0 0 0 1px transparent inset; .el-input__inner { color: var(--cx-colorText3); } }
|
|
11
|
+
.el-input__wrapper.is-focus { box-shadow: 0 0 0 1px transparent inset !important; }
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
.upload { width: 90%;
|
|
16
|
+
.uploadbox { display: flex; margin: 18px 0;
|
|
17
|
+
.upload-demo { display: flex; flex-direction: column; justify-content: center; align-items: center;
|
|
18
|
+
.el-button { width: 100%; background: transparent; color: var(--cx-colorPrimary4); border: 1px dashed var(--cx-colorBorder2); }
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
.btnitem { width: 100%; display: flex; justify-content: center; margin: 0.45rem auto;}
|
|
24
|
+
.label { width: 1.3rem; display: flex; justify-content: end; align-items: center; color: var(--cx-colorText3);
|
|
25
|
+
span { line-height: 32px; display: inline-block; height: 32px; color: var(--cx-colorText0); font-size: 14px; }
|
|
26
|
+
.f_red { color: red; margin-right: 5px; }
|
|
27
|
+
.f_hid { color: transparent; margin-right: 5px; }
|
|
28
|
+
}
|
|
29
|
+
:deep(.el-input) { width: 75%; }
|
|
30
|
+
:deep(.el-upload--text) { width: 100%; }
|
|
31
|
+
:deep(.el-upload--picture-card) { background: transparent; }
|
|
32
|
+
:deep(.el-upload-list--picture-card .el-upload-list__item-actions span+span) { margin-left: 0px !important; }
|
|
33
|
+
:deep(.el-dialog__body) { display: flex; justify-content: center; padding-left: 0px; padding-right: 0px; }
|
|
34
|
+
:deep(.el-upload-list__item-name) { color: var(--cx-colorText0); .el-icon.el-icon--document { color: var(--cx-colorText0); } }
|
|
35
|
+
:deep(.el-upload-list__item:hover) { background: transparent; }
|
|
36
|
+
:deep(.el-upload-list__item.is-success .el-upload-list__item-name:hover) { color: var(--cx-colorText0); }
|
|
37
|
+
:deep(.el-upload-list__item .el-progress) { top: 0; margin-top: 0.3rem !important; }
|
|
38
|
+
:deep(.el-upload-list--picture-card .el-upload-list__item-actions:hover) { justify-content: space-evenly; }
|
|
39
|
+
:deep(.el-input__wrapper.is-focus) { box-shadow: 0 0 0 1px var(--cx-colorBorder1) inset !important; }
|
|
40
|
+
:deep(.el-form-item__error) { left: 25%; }
|
|
41
|
+
:deep(.el-upload) { border: 1px dashed var(--cx-colorBorder2); width: 1.6rem; height: 1.6rem; }
|
|
42
|
+
</style>
|
|
43
|
+
|
|
44
|
+
<template>
|
|
45
|
+
<div class="GeoscienceUpload" >
|
|
46
|
+
<el-form :model="form" class="el_form" :rules="rules" ref="ruleForm">
|
|
47
|
+
<div class="formItem">
|
|
48
|
+
<el-form-item v-for="(item,index) in baseflds" :key="index" :prop="item.colname">
|
|
49
|
+
<div class="label">
|
|
50
|
+
<span :class="item.nullable === 0 ? 'f_red' : 'f_hid'">*</span>
|
|
51
|
+
<span>{{item.namec}}:</span>
|
|
52
|
+
</div>
|
|
53
|
+
<el-input :placeholder="form.code.join('')" v-if="item.colname==='code'" disabled="true"/>
|
|
54
|
+
<div v-else-if="lngLat.includes(item.colname)" :style="{display:'flex',width:'75%',alignItems:'center',justifyContent:'center'}">
|
|
55
|
+
<el-input v-model="form[item.colname]" style="width:100%;" :placeholder="`请输入${item.namec}`" @change="changeInput(item.colname,'toDfm')" clearable/>
|
|
56
|
+
<cx-icon icon="cx-fi ic-toggle"/>
|
|
57
|
+
<el-input style="width:50%;" placeholder="度" v-model="lngLatForm[item.colname][0]" @change="changeInput(item.colname,'toDeg')"/><pub>°</pub>
|
|
58
|
+
<el-input style="width:50%;" placeholder="分" v-model="lngLatForm[item.colname][1]" @change="changeInput(item.colname,'toDeg')"/><pub>′</pub>
|
|
59
|
+
<el-input style="width:50%;" placeholder="秒" v-model="lngLatForm[item.colname][2]" @change="changeInput(item.colname,'toDeg')"/><pub>″</pub>
|
|
60
|
+
</div>
|
|
61
|
+
<el-input :type="(item.disprows&&item.disprows>=2)?'textarea':'text'" v-model="form[item.colname]" :placeholder="item.colname === 'literature' ?'多个文献需换行输入': `请输入${item.namec}`" v-else-if="item.disptype===1&&!dateCols.includes(item.colname)" :disabled="!item.newedit" :show-password="item.colname=='password'" :readonly = "this.params.att && this.params.att.edit" />
|
|
62
|
+
<el-select v-model="form[item.colname]" placeholder="请选择" style="width:75%" v-else-if="item.disptype===2&&item.colname!=='admdiv'">
|
|
63
|
+
<el-option
|
|
64
|
+
v-for="item in obj[item.colname]"
|
|
65
|
+
:key="item.dbvalue"
|
|
66
|
+
:label="item.dispc"
|
|
67
|
+
:value="item.dbvalue"/>
|
|
68
|
+
</el-select>
|
|
69
|
+
<el-input v-model="form[item.colname]" v-else-if="item.disptype === 7">
|
|
70
|
+
<template #suffix>
|
|
71
|
+
<cx-icon icon="cx-fi ic-add1" @click="addClick(item)" style="font-size:0.2rem;width:0.4rem;cursor:pointer;"/>
|
|
72
|
+
</template>
|
|
73
|
+
</el-input>
|
|
74
|
+
<el-tree-select v-else-if="item.disptype===2&&item.colname==='admdiv'"
|
|
75
|
+
v-model="form[item.colname]"
|
|
76
|
+
check-strictly
|
|
77
|
+
filterable
|
|
78
|
+
:data="getFldValue(item.colname)"
|
|
79
|
+
:render-after-expand="false"
|
|
80
|
+
style="width:75%"/>
|
|
81
|
+
<div v-else-if="dateCols.includes(item.colname)" style="display:flex;align-items:center;width:75%;">
|
|
82
|
+
<el-select v-model="typeObj[item.colname]" placeholder="请选择" style="width:30%" @change="selChange(item.colname)" :disabled="!item.newedit">
|
|
83
|
+
<el-option
|
|
84
|
+
v-for="item in selDType"
|
|
85
|
+
:key="item.value"
|
|
86
|
+
:label="item.label"
|
|
87
|
+
:value="item.value"/>
|
|
88
|
+
</el-select>
|
|
89
|
+
<el-date-picker
|
|
90
|
+
:disabled="!item.newedit"
|
|
91
|
+
v-model="form[item.colname]"
|
|
92
|
+
:type="typeObj[item.colname]"
|
|
93
|
+
:format="dbObj[typeObj[item.colname]]"
|
|
94
|
+
:value-format="dbObj[typeObj[item.colname]]"
|
|
95
|
+
placeholder="选择日期"/>
|
|
96
|
+
</div>
|
|
97
|
+
<el-date-picker
|
|
98
|
+
v-else-if="(item.disptype===3)"
|
|
99
|
+
v-model="form[item.colname]"
|
|
100
|
+
:disabled="!item.newedit"
|
|
101
|
+
value-format="YYYY-MM-DD"
|
|
102
|
+
type="date"
|
|
103
|
+
placeholder="选择日期"/>
|
|
104
|
+
</el-form-item>
|
|
105
|
+
</div>
|
|
106
|
+
<div class="upload">
|
|
107
|
+
<div class="uploadbox uploadImg">
|
|
108
|
+
<div class="label">
|
|
109
|
+
<span class="f_hid">*</span>
|
|
110
|
+
<span>成矿模式图上传:</span>
|
|
111
|
+
</div>
|
|
112
|
+
<el-upload
|
|
113
|
+
v-model:file-list="imgList"
|
|
114
|
+
list-type="picture-card"
|
|
115
|
+
ref="imgUpload"
|
|
116
|
+
:action="url_"
|
|
117
|
+
:limit="1"
|
|
118
|
+
:on-change="imgChange"
|
|
119
|
+
:on-remove="onRemove"
|
|
120
|
+
:on-success="onSuccessImg"
|
|
121
|
+
:on-preview="handlePictureCardPreview"
|
|
122
|
+
:accept="extFilter">
|
|
123
|
+
<el-icon class="avatar-uploader-icon"><Plus /></el-icon>
|
|
124
|
+
<template #tip>
|
|
125
|
+
<div class="el-upload__tip">支持.jpg、.jpeg、png等照片格式</div>
|
|
126
|
+
</template>
|
|
127
|
+
</el-upload>
|
|
128
|
+
</div>
|
|
129
|
+
<el-dialog v-model="dialogVisible">
|
|
130
|
+
<img w-full :src="dialogImageUrl" alt="Preview Image" />
|
|
131
|
+
</el-dialog>
|
|
132
|
+
</div>
|
|
133
|
+
<div class="upload">
|
|
134
|
+
<div class="uploadbox uploadImg">
|
|
135
|
+
<div class="label">
|
|
136
|
+
<span class="f_hid">*</span>
|
|
137
|
+
<span>成矿模式表上传:</span>
|
|
138
|
+
</div>
|
|
139
|
+
<el-upload
|
|
140
|
+
class="upload-demo"
|
|
141
|
+
v-model:file-list="imgList2"
|
|
142
|
+
ref="excelUpload"
|
|
143
|
+
:action="url2_"
|
|
144
|
+
:limit="1"
|
|
145
|
+
:multiple="false"
|
|
146
|
+
:on-remove="onRemove2"
|
|
147
|
+
:on-success="onUploadFile"
|
|
148
|
+
:on-preview="handlePictureCardPreview2"
|
|
149
|
+
accept=".xlsx">
|
|
150
|
+
<el-icon class="avatar-uploader-icon"><Plus /></el-icon>
|
|
151
|
+
<template #tip>
|
|
152
|
+
<div class="el-upload__tip">支持.xlsx格式</div>
|
|
153
|
+
</template>
|
|
154
|
+
</el-upload>
|
|
155
|
+
<cx-button @click="onDownload" style="margin-top:1.3rem;margin-left:0.2rem">成矿模式表模板下载</cx-button>
|
|
156
|
+
</div>
|
|
157
|
+
</div>
|
|
158
|
+
<div class="empty"></div>
|
|
159
|
+
</el-form>
|
|
160
|
+
<div class="btnitem">
|
|
161
|
+
<el-button class="is-text" :icon="CircleCheck" size="mini" type="primary" @click="onSave">确定</el-button>
|
|
162
|
+
<el-button class="is-text" :icon="Close" size="mini" type="plain" @click="onClose">取消</el-button>
|
|
163
|
+
</div>
|
|
164
|
+
</div>
|
|
165
|
+
</template>
|
|
166
|
+
|
|
167
|
+
<script>
|
|
168
|
+
/**
|
|
169
|
+
* 组件: 矿床模型上传
|
|
170
|
+
*/
|
|
171
|
+
import axios from 'axios'
|
|
172
|
+
import { CircleCheck, Close } from '@element-plus/icons-vue'
|
|
173
|
+
|
|
174
|
+
export default {
|
|
175
|
+
mixins: [cx.mixin.IPlugBase, cx.mixin.IExpBase],
|
|
176
|
+
data()
|
|
177
|
+
{
|
|
178
|
+
return {
|
|
179
|
+
dateType: 'date',
|
|
180
|
+
dbObj: { datetime: 'YYYY-MM-DD HH:mm:ss', date: 'YYYY-MM-DD', month: 'YYYY-MM', year: 'YYYY' },
|
|
181
|
+
dateCols: ['publishdate', 'imp_date', 'abolishdate', 'uploaddate'],
|
|
182
|
+
typeObj: {},
|
|
183
|
+
selDType: [{ label: '时/分/秒', value: 'datetime' }, { label: '年/月/日', value: 'date' }, { label: '年/月', value: 'month' }, { label: '年', value: 'year' }],
|
|
184
|
+
rules: {
|
|
185
|
+
|
|
186
|
+
},
|
|
187
|
+
obj: {
|
|
188
|
+
|
|
189
|
+
},
|
|
190
|
+
CircleCheck,
|
|
191
|
+
Close,
|
|
192
|
+
// 表单数据
|
|
193
|
+
form: {
|
|
194
|
+
code: ['-', '-', '-', '']
|
|
195
|
+
},
|
|
196
|
+
formKeys: [],
|
|
197
|
+
cycleObj: [],
|
|
198
|
+
retId: 0,
|
|
199
|
+
// 上传
|
|
200
|
+
url: '',
|
|
201
|
+
url_: '',
|
|
202
|
+
url2: '',
|
|
203
|
+
url2_: '',
|
|
204
|
+
data: {
|
|
205
|
+
_auth: cx.config.initOpts.authorization,
|
|
206
|
+
cmd: 'upload',
|
|
207
|
+
major: '',
|
|
208
|
+
minor: '',
|
|
209
|
+
entityid: 0,
|
|
210
|
+
bustype: 1,
|
|
211
|
+
username: $g.user.name,
|
|
212
|
+
fid: 1,
|
|
213
|
+
sys: $g.user.sys,
|
|
214
|
+
glid: '0',
|
|
215
|
+
task: '',
|
|
216
|
+
dir: 'DocFile',
|
|
217
|
+
saveto: 'Doc'
|
|
218
|
+
},
|
|
219
|
+
lngLat: ['sta_lng', 'end_lng', 'sta_lat', 'end_lat'],
|
|
220
|
+
lngLatForm: { sta_lng: [0, 0, 0], end_lng: [0, 0, 0], sta_lat: [0, 0, 0], end_lat: [0, 0, 0] },
|
|
221
|
+
removeFile: [],
|
|
222
|
+
fileList2: [],
|
|
223
|
+
imgList: [],
|
|
224
|
+
imgList2: [],
|
|
225
|
+
// 封面类型
|
|
226
|
+
extFilter: '.jpg, .png, .gif, .bmp, .jpeg, .tif',
|
|
227
|
+
// 封面预览
|
|
228
|
+
dialogVisible: false,
|
|
229
|
+
dialogImageUrl: '',
|
|
230
|
+
// 封面、文件、帮助文档媒体表ID
|
|
231
|
+
mediaDocumentId: 0,
|
|
232
|
+
mediaImgId: 0,
|
|
233
|
+
mediaExcelId: 0,
|
|
234
|
+
mediaFileId: 0,
|
|
235
|
+
width: 595,
|
|
236
|
+
height: 842,
|
|
237
|
+
thumbnail: false,
|
|
238
|
+
baseflds: null,
|
|
239
|
+
values: [],
|
|
240
|
+
isUpdImg: false,
|
|
241
|
+
fileInfo: null,
|
|
242
|
+
isCancle: true,
|
|
243
|
+
fileSuffix: [],
|
|
244
|
+
imgIds: [],
|
|
245
|
+
attachmentTitle: [],
|
|
246
|
+
kcmxbFld: [],
|
|
247
|
+
kcmxbFldvalue: [],
|
|
248
|
+
literature: [], // 文献
|
|
249
|
+
exactDatas: [], // 图片+表格
|
|
250
|
+
deletedIds: [] // 删除的图片id
|
|
251
|
+
}
|
|
252
|
+
},
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
// 属性监听,处理属性变化后有大量操作
|
|
256
|
+
watch:
|
|
257
|
+
{
|
|
258
|
+
imgList:
|
|
259
|
+
{
|
|
260
|
+
handler(n, o)
|
|
261
|
+
{
|
|
262
|
+
if (document.querySelector('.el-upload--picture-card'))
|
|
263
|
+
document.querySelector('.el-upload--picture-card').style.visibility = (n.length ? 'hidden' : 'visible')
|
|
264
|
+
},
|
|
265
|
+
deep: true
|
|
266
|
+
}
|
|
267
|
+
},
|
|
268
|
+
|
|
269
|
+
// 初始化组件,data中数据变量赋值
|
|
270
|
+
async created()
|
|
271
|
+
{
|
|
272
|
+
const graTab = $g.entity.byMajMin(window.$app.TabConst.kcmxb.major, window.$app.TabConst.kcmxb.minor)
|
|
273
|
+
const { fldvalue, fld } = await $g.field.getFldValsDb(graTab.name)
|
|
274
|
+
this.kcmxbFld = fld
|
|
275
|
+
this.kcmxbFldvalue = fldvalue
|
|
276
|
+
this.getFld()
|
|
277
|
+
this.getUrl()
|
|
278
|
+
this.initImg()
|
|
279
|
+
},
|
|
280
|
+
|
|
281
|
+
// // 组件dom挂载成功
|
|
282
|
+
// mounted()
|
|
283
|
+
// {},
|
|
284
|
+
|
|
285
|
+
// 销毁前
|
|
286
|
+
beforeUnmount()
|
|
287
|
+
{
|
|
288
|
+
if (this.isCancle)
|
|
289
|
+
{
|
|
290
|
+
let ids = this.exactDatas.map(el => el.id)
|
|
291
|
+
if (this.mediaFileId)
|
|
292
|
+
ids.push(this.mediaFileId)
|
|
293
|
+
if (ids.length)
|
|
294
|
+
cx.svr.data.dels(cx.consts.SYSTAB, cx.consts.TAB_MEDIA, ids.toString())
|
|
295
|
+
}
|
|
296
|
+
},
|
|
297
|
+
|
|
298
|
+
// 按功能相关性组织函数块,函数名体现功能
|
|
299
|
+
methods:
|
|
300
|
+
{
|
|
301
|
+
/**
|
|
302
|
+
* 日期类型选择变化
|
|
303
|
+
* @param {String} colname - 字段名
|
|
304
|
+
*/
|
|
305
|
+
selChange(colname)
|
|
306
|
+
{
|
|
307
|
+
this.form[colname] = ''
|
|
308
|
+
},
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* 初始化图片
|
|
312
|
+
*/
|
|
313
|
+
initImg()
|
|
314
|
+
{
|
|
315
|
+
if (this.params.att.id)
|
|
316
|
+
{
|
|
317
|
+
cx.svr.data.query(cx.consts.SYSTAB, cx.consts.TAB_MEDIA,
|
|
318
|
+
{
|
|
319
|
+
args: [['entityid', '=', this.params.att.id, null],
|
|
320
|
+
['major', '=', this.params.major, 'and'],
|
|
321
|
+
['minor', '=', this.params.minor, 'and']]
|
|
322
|
+
}).then(ret =>
|
|
323
|
+
{
|
|
324
|
+
if (ret.length)
|
|
325
|
+
{
|
|
326
|
+
ret.forEach(item =>
|
|
327
|
+
{
|
|
328
|
+
if (cx.file.isImage(item.filename))
|
|
329
|
+
{
|
|
330
|
+
console.log(item)
|
|
331
|
+
this.mediaImgId = item.id
|
|
332
|
+
this.dialogImageUrl = cx.svr.doc.stream({ id: item.id })
|
|
333
|
+
this.imgList.push({ name: item.filename, url: cx.svr.doc.stream({ id: item.id }), uid: item.id, response: { data: [item] } })
|
|
334
|
+
}
|
|
335
|
+
if (cx.file.isDoc(item.filename))
|
|
336
|
+
{
|
|
337
|
+
this.mediaExcelId = item.id
|
|
338
|
+
this.imgList2.push({ name: item.title, url: cx.svr.doc.stream({ id: item.id }), uid: item.id, response: { data: [item] } })
|
|
339
|
+
}
|
|
340
|
+
})
|
|
341
|
+
}
|
|
342
|
+
})
|
|
343
|
+
}
|
|
344
|
+
},
|
|
345
|
+
|
|
346
|
+
/**
|
|
347
|
+
* 输入框变化事件
|
|
348
|
+
* @param {String} colname - 字段名
|
|
349
|
+
* @param {String} type - 转换类型
|
|
350
|
+
*/
|
|
351
|
+
changeInput(colname, type)
|
|
352
|
+
{
|
|
353
|
+
if (type === 'toDfm')
|
|
354
|
+
this.lngLatForm[colname] = this.transformDMS(this.form[colname])
|
|
355
|
+
else
|
|
356
|
+
this.form[colname] = this.toDeg(this.lngLatForm[colname])
|
|
357
|
+
},
|
|
358
|
+
|
|
359
|
+
// 经纬度转度分秒
|
|
360
|
+
transformDMS(degree)
|
|
361
|
+
{
|
|
362
|
+
let D = plusZeroAtHead(Math.floor(degree))
|
|
363
|
+
let M = plusZeroAtHead(Math.floor(this.precisionSub(degree, D) * 60))
|
|
364
|
+
let S = plusZeroAtHead(Number((this.precisionSub(this.precisionSub(degree, D) * 60, M) * 60).toFixed(2)))
|
|
365
|
+
|
|
366
|
+
// 如果是个位数, 则在首位加 0
|
|
367
|
+
function plusZeroAtHead(num)
|
|
368
|
+
{
|
|
369
|
+
if (num > -10 && num < 0)
|
|
370
|
+
|
|
371
|
+
num = '-0' + Math.abs(num)
|
|
372
|
+
|
|
373
|
+
if (num > 0 && num < 10)
|
|
374
|
+
|
|
375
|
+
return '0' + num
|
|
376
|
+
|
|
377
|
+
return num
|
|
378
|
+
}
|
|
379
|
+
return [D, M, S]
|
|
380
|
+
},
|
|
381
|
+
|
|
382
|
+
/**
|
|
383
|
+
* 处理小数运算丢失精度-减法
|
|
384
|
+
* @param {Number} arg1 参数一
|
|
385
|
+
* @param {Number} arg2 参数二
|
|
386
|
+
*/
|
|
387
|
+
precisionSub(arg1, arg2)
|
|
388
|
+
{
|
|
389
|
+
let r1, r2, m, n
|
|
390
|
+
try
|
|
391
|
+
{
|
|
392
|
+
r1 = arg1.toString().split('.')[1].length
|
|
393
|
+
}
|
|
394
|
+
catch (e)
|
|
395
|
+
{
|
|
396
|
+
r1 = 0
|
|
397
|
+
}
|
|
398
|
+
try
|
|
399
|
+
{
|
|
400
|
+
r2 = arg2.toString().split('.')[1].length
|
|
401
|
+
}
|
|
402
|
+
catch (e)
|
|
403
|
+
{
|
|
404
|
+
r2 = 0
|
|
405
|
+
}
|
|
406
|
+
m = Math.pow(10, Math.max(r1, r2) + 1)
|
|
407
|
+
// 动态控制精度长度
|
|
408
|
+
n = (r1 >= r2) ? r1 : r2
|
|
409
|
+
return ((arg1 * m - arg2 * m) / m).toFixed(n)
|
|
410
|
+
},
|
|
411
|
+
|
|
412
|
+
// 度分秒 转 经纬度
|
|
413
|
+
toDeg(val)
|
|
414
|
+
{
|
|
415
|
+
let flag = (val.filter(e => e < 0).length ? -1 : 1)
|
|
416
|
+
return (Math.abs(val[0]) + (Math.abs(val[1]) / 60 + Math.abs(val[2]) / 3600)) * flag
|
|
417
|
+
},
|
|
418
|
+
|
|
419
|
+
/**
|
|
420
|
+
* 获取字段值
|
|
421
|
+
* @param {String} colname - 字段名
|
|
422
|
+
* @param {Number} index - 索引
|
|
423
|
+
* @returns {Array} 字段值数组
|
|
424
|
+
*/
|
|
425
|
+
getFldValue(colname, index)
|
|
426
|
+
{
|
|
427
|
+
if (index === this.kcmxbFldvalue[colname].length - 1)
|
|
428
|
+
this.form[colname] = this.kcmxbFldvalue[colname][0].dbvalue
|
|
429
|
+
return this.kcmxbFldvalue[colname]
|
|
430
|
+
},
|
|
431
|
+
|
|
432
|
+
/**
|
|
433
|
+
* 获取字段配置
|
|
434
|
+
*/
|
|
435
|
+
getFld()
|
|
436
|
+
{
|
|
437
|
+
const nflds = []
|
|
438
|
+
console.log(this.kcmxbFld)
|
|
439
|
+
this.kcmxbFld.forEach(item =>
|
|
440
|
+
{
|
|
441
|
+
if (item.colname === 'literature')
|
|
442
|
+
item.disprows = 4
|
|
443
|
+
})
|
|
444
|
+
this.baseflds = this.kcmxbFld.filter(el => (!nflds.includes(el.colname) && el.disporder !== 0)).sort((a, b) => a.disporder - b.disporder)
|
|
445
|
+
this.baseflds.forEach(item =>
|
|
446
|
+
{
|
|
447
|
+
if (item.disptype === 2 && this.kcmxbFldvalue && this.kcmxbFldvalue[item.colname])
|
|
448
|
+
this.obj[item.colname] = this.kcmxbFldvalue[item.colname]
|
|
449
|
+
if (item.disptype === 3)
|
|
450
|
+
this.typeObj[item.colname] = 'date'
|
|
451
|
+
if (this.params.att && this.params.att[item.colname])
|
|
452
|
+
this.form[item.colname] = this.params.att[item.colname]
|
|
453
|
+
if (!item.nullable)
|
|
454
|
+
this.rules[item.colname] = [{ required: true, message: '请输入' + item.namec, trigger: 'blur' }]
|
|
455
|
+
})
|
|
456
|
+
if (this.params.att.glid)
|
|
457
|
+
this.form.glid = this.params.att.glid
|
|
458
|
+
this.gettpsj()
|
|
459
|
+
},
|
|
460
|
+
|
|
461
|
+
|
|
462
|
+
/**
|
|
463
|
+
* 获取知识图谱数据
|
|
464
|
+
*/
|
|
465
|
+
gettpsj()
|
|
466
|
+
{
|
|
467
|
+
cx.svr.data.query(window.$app.TabConst.model_graphdb.major, window.$app.TabConst.model_graphdb.minor, { args: [['id', '>', 0, null]] }).then(data =>
|
|
468
|
+
{
|
|
469
|
+
console.log(data)
|
|
470
|
+
let options = []
|
|
471
|
+
data.forEach(item =>
|
|
472
|
+
{
|
|
473
|
+
options.push({ dispc: item.name, dbvalue: item.name })
|
|
474
|
+
})
|
|
475
|
+
this.obj.gltp = options
|
|
476
|
+
})
|
|
477
|
+
},
|
|
478
|
+
|
|
479
|
+
/**
|
|
480
|
+
* 获取上传URL
|
|
481
|
+
*/
|
|
482
|
+
getUrl()
|
|
483
|
+
{
|
|
484
|
+
this.data.major = this.params.major
|
|
485
|
+
this.data.minor = this.params.minor
|
|
486
|
+
this.url_ = cx.svr.upload.url({ ...this.data, bustype: 2 }) // 封面
|
|
487
|
+
this.url2_ = cx.svr.upload.url({ ...this.data, bustype: 1 }) // 模式表
|
|
488
|
+
},
|
|
489
|
+
/**
|
|
490
|
+
* 图片变化事件
|
|
491
|
+
* @param {Object} baseFile - 文件对象
|
|
492
|
+
*/
|
|
493
|
+
imgChange(baseFile)
|
|
494
|
+
{
|
|
495
|
+
this.isUpdImg = true
|
|
496
|
+
if (baseFile.status === 'ready')
|
|
497
|
+
this.dialogImageUrl = baseFile.url
|
|
498
|
+
},
|
|
499
|
+
|
|
500
|
+
/**
|
|
501
|
+
* 图片上传成功回调
|
|
502
|
+
* @param {Object} response - 响应数据
|
|
503
|
+
* @param {Object} file - 文件对象
|
|
504
|
+
* @param {Array} fileList - 文件列表
|
|
505
|
+
*/
|
|
506
|
+
onSuccessImg(response, file, fileList)
|
|
507
|
+
{
|
|
508
|
+
if (response && response.data)
|
|
509
|
+
this.mediaImgId = response.data[0].id
|
|
510
|
+
},
|
|
511
|
+
|
|
512
|
+
/**
|
|
513
|
+
* Excel文件移除事件
|
|
514
|
+
* @param {Object} ret - 文件对象
|
|
515
|
+
*/
|
|
516
|
+
onRemove2(ret)
|
|
517
|
+
{
|
|
518
|
+
this.isUpdImg = false
|
|
519
|
+
this.mediaExcelId = 0
|
|
520
|
+
this.deletedIds.push(ret.response.data[0].id)
|
|
521
|
+
},
|
|
522
|
+
|
|
523
|
+
|
|
524
|
+
/**
|
|
525
|
+
* 文件上传成功回调
|
|
526
|
+
* @param {Object} res - 响应数据
|
|
527
|
+
*/
|
|
528
|
+
onUploadFile(res)
|
|
529
|
+
{
|
|
530
|
+
// 上传成功回调
|
|
531
|
+
let onUpload = (data) =>
|
|
532
|
+
{
|
|
533
|
+
console.log(data)
|
|
534
|
+
let fileSuffix = data.filename.split('.')
|
|
535
|
+
this.isUpdImg = true
|
|
536
|
+
this.mediaExcelId = data.id
|
|
537
|
+
this.imgIds.push(data.id)
|
|
538
|
+
this.fileSuffix.push(fileSuffix[fileSuffix.length - 1])
|
|
539
|
+
this.attachmentTitle.push(data.title)
|
|
540
|
+
cx.base.showMsg('上传成功!', 'success')
|
|
541
|
+
}
|
|
542
|
+
if (res.data && res.data.length)
|
|
543
|
+
onUpload(res.data[0])
|
|
544
|
+
},
|
|
545
|
+
|
|
546
|
+
/**
|
|
547
|
+
* 删除文件
|
|
548
|
+
*/
|
|
549
|
+
onRemoveFile()
|
|
550
|
+
{
|
|
551
|
+
let ids = this.exactDatas.map(el => el.id)
|
|
552
|
+
if (this.mediaFileId)
|
|
553
|
+
ids.push(this.mediaFileId)
|
|
554
|
+
if (ids.length)
|
|
555
|
+
cx.svr.data.dels(cx.consts.SYSTAB, cx.consts.TAB_MEDIA, ids.toString())
|
|
556
|
+
this.form.infoname = ''
|
|
557
|
+
this.form.infoupdtime = ''
|
|
558
|
+
this.form.updperson = ''
|
|
559
|
+
this.form.filesize = ''
|
|
560
|
+
this.form.file_sle = ''
|
|
561
|
+
this.form.page_num = ''
|
|
562
|
+
},
|
|
563
|
+
|
|
564
|
+
|
|
565
|
+
/**
|
|
566
|
+
* 图片移除事件
|
|
567
|
+
* @param {Object} ret - 文件对象
|
|
568
|
+
*/
|
|
569
|
+
onRemove(ret)
|
|
570
|
+
{
|
|
571
|
+
this.isUpdImg = false
|
|
572
|
+
this.mediaImgId = 0
|
|
573
|
+
if (ret.response && ret.response.data && ret.response.data.length)
|
|
574
|
+
this.deletedIds.push(ret.response.data[0].id)
|
|
575
|
+
},
|
|
576
|
+
|
|
577
|
+
/**
|
|
578
|
+
* 图片预览
|
|
579
|
+
*/
|
|
580
|
+
handlePictureCardPreview()
|
|
581
|
+
{
|
|
582
|
+
this.dialogVisible = true
|
|
583
|
+
},
|
|
584
|
+
|
|
585
|
+
|
|
586
|
+
/**
|
|
587
|
+
* Excel预览
|
|
588
|
+
* @param {Object} ret - 文件对象
|
|
589
|
+
*/
|
|
590
|
+
handlePictureCardPreview2(ret)
|
|
591
|
+
{
|
|
592
|
+
console.log(ret)
|
|
593
|
+
if (ret.name)
|
|
594
|
+
{
|
|
595
|
+
let fileSuffix = ret.name.split('.')
|
|
596
|
+
const data =
|
|
597
|
+
{
|
|
598
|
+
src: cx.svr.doc.stream({ id: (ret.response && ret.response.data[0].id) || ret.uid }),
|
|
599
|
+
filetype: fileSuffix[fileSuffix.length - 1]
|
|
600
|
+
}
|
|
601
|
+
cx.run.runPlug('FileView', { data })
|
|
602
|
+
}
|
|
603
|
+
},
|
|
604
|
+
|
|
605
|
+
|
|
606
|
+
/**
|
|
607
|
+
* 保存数据
|
|
608
|
+
*/
|
|
609
|
+
onSave()
|
|
610
|
+
{
|
|
611
|
+
this.$refs.ruleForm.validate(async(valid) =>
|
|
612
|
+
{
|
|
613
|
+
if (valid)
|
|
614
|
+
{
|
|
615
|
+
console.log(this.isUpdImg, this.mediaExcelId)
|
|
616
|
+
let search = await cx.svr.data.query(window.$app.TabConst.kcmxb.major, window.$app.TabConst.kcmxb.minor, { args: [['kc_name', '=', this.form.kc_name, null]] })
|
|
617
|
+
// 新增
|
|
618
|
+
if (search.length && (!this.params.att.id))
|
|
619
|
+
return this.$showMsg(`该矿床名称已存在`, 'warning')
|
|
620
|
+
this.isCancle = false
|
|
621
|
+
if (!this.mediaExcelId)
|
|
622
|
+
return this.$showMsg('请上传模式表', 'error')
|
|
623
|
+
if (this.mediaImgId && this.mediaExcelId)
|
|
624
|
+
this.getThumbnail(false)
|
|
625
|
+
// else if (!this.isUpdImg && this.params.att.id) // 编辑首次带入图片且不编辑图片
|
|
626
|
+
// this.getThumbnail(true)
|
|
627
|
+
else
|
|
628
|
+
this.$showMsg('请上传封面图片', 'error')
|
|
629
|
+
}
|
|
630
|
+
else
|
|
631
|
+
return false
|
|
632
|
+
})
|
|
633
|
+
},
|
|
634
|
+
|
|
635
|
+
/**
|
|
636
|
+
* 添加数据
|
|
637
|
+
*/
|
|
638
|
+
async addData()
|
|
639
|
+
{
|
|
640
|
+
let self = this
|
|
641
|
+
let addObj = {}
|
|
642
|
+
let ids = [self.mediaImgId, this.mediaExcelId]
|
|
643
|
+
$g.field.fld.kcmxb.forEach(item =>
|
|
644
|
+
{
|
|
645
|
+
for (let key in this.form)
|
|
646
|
+
{
|
|
647
|
+
if (key === item.colname)
|
|
648
|
+
addObj[key] = this.form[key]
|
|
649
|
+
}
|
|
650
|
+
})
|
|
651
|
+
cx.svr.data.add(this.params.major, this.params.minor, addObj, 1).then(async ret =>
|
|
652
|
+
{
|
|
653
|
+
let params =
|
|
654
|
+
{
|
|
655
|
+
id: ids.toString(),
|
|
656
|
+
entityid: ids.map(() => ret.id).toString()
|
|
657
|
+
}
|
|
658
|
+
await cx.svr.data.updates(cx.consts.SYSTAB, cx.consts.TAB_MEDIA, params).then(() =>
|
|
659
|
+
{
|
|
660
|
+
cx.base.showMsg('添加成功!', 'success')
|
|
661
|
+
this.close()
|
|
662
|
+
this.params.thethis.getsj()
|
|
663
|
+
}) // 更新entityid
|
|
664
|
+
}).catch(err =>
|
|
665
|
+
{
|
|
666
|
+
this.$notify({
|
|
667
|
+
title: '警告',
|
|
668
|
+
message: '请将带*内容填写完整,并且上传正确格式文件',
|
|
669
|
+
type: 'warning'
|
|
670
|
+
})
|
|
671
|
+
self.onError(err)
|
|
672
|
+
})
|
|
673
|
+
},
|
|
674
|
+
|
|
675
|
+
|
|
676
|
+
/**
|
|
677
|
+
* 获取缩略图
|
|
678
|
+
* @param {Boolean} show - 是否显示
|
|
679
|
+
*/
|
|
680
|
+
getThumbnail(show)
|
|
681
|
+
{
|
|
682
|
+
// 新增
|
|
683
|
+
if (!this.params.att.id)
|
|
684
|
+
this.addData()
|
|
685
|
+
else
|
|
686
|
+
this.onUpdate(show)
|
|
687
|
+
},
|
|
688
|
+
|
|
689
|
+
|
|
690
|
+
/**
|
|
691
|
+
* 更新数据
|
|
692
|
+
* @param {Boolean} show - 是否显示
|
|
693
|
+
*/
|
|
694
|
+
onUpdate(show)
|
|
695
|
+
{
|
|
696
|
+
let self = this
|
|
697
|
+
let ids = [self.mediaImgId, this.mediaExcelId]
|
|
698
|
+
cx.svr.data.update(this.params.major, this.params.minor, { id: this.params.att.id, ...this.form }).then(async() =>
|
|
699
|
+
{
|
|
700
|
+
let params =
|
|
701
|
+
{
|
|
702
|
+
id: ids.toString(),
|
|
703
|
+
entityid: ids.map(() => this.params.att.id).toString()
|
|
704
|
+
}
|
|
705
|
+
if (show) // 编辑弹窗,且不编辑图片(不编辑图片无法触发on-success,需要额外处理)
|
|
706
|
+
{
|
|
707
|
+
cx.base.showMsg('更新成功!', 'success')
|
|
708
|
+
this.close()
|
|
709
|
+
this.params.thethis.getsj()
|
|
710
|
+
return
|
|
711
|
+
}
|
|
712
|
+
if (this.deletedIds.length)
|
|
713
|
+
cx.svr.data.dels(cx.consts.SYSTAB, cx.consts.TAB_MEDIA, this.deletedIds.toString())
|
|
714
|
+
await cx.svr.data.updates(cx.consts.SYSTAB, cx.consts.TAB_MEDIA, params).then(() =>
|
|
715
|
+
{
|
|
716
|
+
cx.base.showMsg('更新成功!', 'success')
|
|
717
|
+
this.close()
|
|
718
|
+
this.params.thethis.getsj()
|
|
719
|
+
}) // 更新entityid
|
|
720
|
+
}).catch(err =>
|
|
721
|
+
{
|
|
722
|
+
this.$notify({
|
|
723
|
+
title: '警告',
|
|
724
|
+
message: '请将带*内容填写完整,并且上传正确格式文件',
|
|
725
|
+
type: 'warning'
|
|
726
|
+
})
|
|
727
|
+
self.onError(err)
|
|
728
|
+
})
|
|
729
|
+
},
|
|
730
|
+
|
|
731
|
+
/**
|
|
732
|
+
* 添加矿种点击事件
|
|
733
|
+
* @param {Object} item - 字段配置
|
|
734
|
+
*/
|
|
735
|
+
addClick(item)
|
|
736
|
+
{
|
|
737
|
+
const onOk = (att) =>
|
|
738
|
+
{
|
|
739
|
+
this.form[item.colname] = att.val
|
|
740
|
+
}
|
|
741
|
+
cx.run.runPlug('SelKz', { onOk, value: this.form[item.colname] }, { uicfg: { width: 400, modal: 1 }, container: 'Home' })
|
|
742
|
+
},
|
|
743
|
+
|
|
744
|
+
|
|
745
|
+
/**
|
|
746
|
+
* 关闭弹窗
|
|
747
|
+
*/
|
|
748
|
+
onClose()
|
|
749
|
+
{
|
|
750
|
+
this.close()
|
|
751
|
+
},
|
|
752
|
+
|
|
753
|
+
|
|
754
|
+
/**
|
|
755
|
+
* 模板下载
|
|
756
|
+
*/
|
|
757
|
+
onDownload()
|
|
758
|
+
{
|
|
759
|
+
axios('static/xlsx/' + '成矿模式表模板' + '.xlsx', {
|
|
760
|
+
responseType: 'blob' // 重要代码
|
|
761
|
+
}).then(res =>
|
|
762
|
+
{
|
|
763
|
+
const url = window.URL.createObjectURL(new Blob([res.data]))
|
|
764
|
+
const link = document.createElement('a')
|
|
765
|
+
link.href = url
|
|
766
|
+
let fileName = '成矿模式表模板' + '.xlsx' // 保存到本地的文件名称
|
|
767
|
+
link.setAttribute('download', fileName)
|
|
768
|
+
document.body.appendChild(link)
|
|
769
|
+
link.click()
|
|
770
|
+
})
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
}
|
|
774
|
+
</script>
|