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.
Files changed (249) hide show
  1. package/README.md +3 -0
  2. package/package.json +90 -0
  3. package/src/plugins/app/com/CesiumTool.js +730 -0
  4. package/src/plugins/app/com/MapMethods.js +355 -0
  5. package/src/plugins/app/com/MapTool.vue +772 -0
  6. package/src/plugins/app/com/MenuRouter.vue +157 -0
  7. package/src/plugins/app/com/ParamsDes.vue +35 -0
  8. package/src/plugins/app/com/SelCoorSys.vue +235 -0
  9. package/src/plugins/app/com/WebProj4.js +32 -0
  10. package/src/plugins/app/com/measure.js +127 -0
  11. package/src/plugins/app/com/yx.js +238 -0
  12. package/src/plugins/app/modelmanagement/D3DrawGraph.js +708 -0
  13. package/src/plugins/app/modelmanagement/MineralGo.vue +241 -0
  14. package/src/plugins/app/modelmanagement/MineralModel.vue +1203 -0
  15. package/src/plugins/app/modelmanagement/ModelCloudmap.vue +69 -0
  16. package/src/plugins/app/modelmanagement/ModelMst.vue +60 -0
  17. package/src/plugins/app/modelmanagement/ModelSy.vue +173 -0
  18. package/src/plugins/app/modelmanagement/ModelTp.vue +51 -0
  19. package/src/plugins/app/modelmanagement/ModelUpload.vue +774 -0
  20. package/src/plugins/app/znycpjxt/Api.js +714 -0
  21. package/src/plugins/app/znycpjxt/Bf/AttFactory.js +25 -0
  22. package/src/plugins/app/znycpjxt/Bf/IAnomalyhandle.js +102 -0
  23. package/src/plugins/app/znycpjxt/Bf/IComposeanomaly.js +140 -0
  24. package/src/plugins/app/znycpjxt/Bf/IContinueanaly.js +138 -0
  25. package/src/plugins/app/znycpjxt/Bf/IContrastanaly.js +138 -0
  26. package/src/plugins/app/znycpjxt/Bf/ICustomNode.js +145 -0
  27. package/src/plugins/app/znycpjxt/Bf/IDerivanaly.js +139 -0
  28. package/src/plugins/app/znycpjxt/Bf/IFilterananly.js +141 -0
  29. package/src/plugins/app/znycpjxt/Bf/IMeananaly.js +137 -0
  30. package/src/plugins/app/znycpjxt/Bf/IModelNodeBase.js +135 -0
  31. package/src/plugins/app/znycpjxt/Bf/IMoveaverage.js +135 -0
  32. package/src/plugins/app/znycpjxt/Bf/IReducepole.js +141 -0
  33. package/src/plugins/app/znycpjxt/Bf/ISmoothanaly.js +135 -0
  34. package/src/plugins/app/znycpjxt/Bf/ITrendanaly.js +144 -0
  35. package/src/plugins/app/znycpjxt/Bf/IVector2grd.js +144 -0
  36. package/src/plugins/app/znycpjxt/Bf/IYcfj.js +84 -0
  37. package/src/plugins/app/znycpjxt/Bf/IYcxxjs.js +105 -0
  38. package/src/plugins/app/znycpjxt/Bf/IYgsbtq.js +112 -0
  39. package/src/plugins/app/znycpjxt/Bf/IYgtxrh.js +112 -0
  40. package/src/plugins/app/znycpjxt/Bf/Iinteranaly.js +135 -0
  41. package/src/plugins/app/znycpjxt/Bf/index.js +44 -0
  42. package/src/plugins/app/znycpjxt/Bf/input/InputData.js +21 -0
  43. package/src/plugins/app/znycpjxt/Bf/input/InputExcel.js +28 -0
  44. package/src/plugins/app/znycpjxt/Bf/input/InputKd.js +31 -0
  45. package/src/plugins/app/znycpjxt/Bqqd/Bqqd.vue +380 -0
  46. package/src/plugins/app/znycpjxt/Bqqd/BqqdMap.vue +1046 -0
  47. package/src/plugins/app/znycpjxt/Bqqd/SetOpacity.vue +101 -0
  48. package/src/plugins/app/znycpjxt/Bqqd/SjzxTree.vue +244 -0
  49. package/src/plugins/app/znycpjxt/Bqqd/YclsjjTree.vue +212 -0
  50. package/src/plugins/app/znycpjxt/Bqqd/api/DsjzxApi.js +37 -0
  51. package/src/plugins/app/znycpjxt/Ckycmx/Ckycmx.vue +161 -0
  52. package/src/plugins/app/znycpjxt/Ckycmx/Ckycmxgl/CfgGloalParams.vue +92 -0
  53. package/src/plugins/app/znycpjxt/Ckycmx/Ckycmxgl/CfgNodeFlds.vue +102 -0
  54. package/src/plugins/app/znycpjxt/Ckycmx/Ckycmxgl/CfgNodeParams.vue +277 -0
  55. package/src/plugins/app/znycpjxt/Ckycmx/Ckycmxgl/Ckycmxgl.vue +303 -0
  56. package/src/plugins/app/znycpjxt/Ckycmx/Ckycmxgl/SetLabelParam.vue +68 -0
  57. package/src/plugins/app/znycpjxt/Ckycmx/Ckycmxgl/SetModelParam.vue +69 -0
  58. package/src/plugins/app/znycpjxt/Ckycmx/Ckycmxtab/Ckycmxtab.vue +107 -0
  59. package/src/plugins/app/znycpjxt/Ckycmx/Ckycmxtab/Dtzzylwl.vue +156 -0
  60. package/src/plugins/app/znycpjxt/Ckycmx/Ckycmxtab/Jjsjwl.vue +230 -0
  61. package/src/plugins/app/znycpjxt/Ckycmx/Ckycmxtab/Sjsl.vue +126 -0
  62. package/src/plugins/app/znycpjxt/Ckycmx/Ckycmxtab/Zcxlj.vue +128 -0
  63. package/src/plugins/app/znycpjxt/Ckycmx/Ckycmxtab/Zjq.vue +123 -0
  64. package/src/plugins/app/znycpjxt/Ckycmx/Ckycmxtab/Zstp.vue +271 -0
  65. package/src/plugins/app/znycpjxt/Ckycmx/Ckycmxtab/Zzylwl.vue +149 -0
  66. package/src/plugins/app/znycpjxt/Ckycmx/Ckycmxtab/coms/ParamsData.vue +323 -0
  67. package/src/plugins/app/znycpjxt/Ckycmx/Ckycmxtab/coms/ParamsDataNew.vue +336 -0
  68. package/src/plugins/app/znycpjxt/Ckycmx/Ckycmxtab/coms/QqtEcharts.vue +137 -0
  69. package/src/plugins/app/znycpjxt/Ckycmx/Ckycrwgl/Ckycrwgl.vue +290 -0
  70. package/src/plugins/app/znycpjxt/CusTools/CodeApi.js +83 -0
  71. package/src/plugins/app/znycpjxt/CusTools/CodeEditor/CodeEditor.md +36 -0
  72. package/src/plugins/app/znycpjxt/CusTools/CodeEditor/CodeEditor.vue +227 -0
  73. package/src/plugins/app/znycpjxt/CusTools/CodeEditor/PlugCodeEditor.vue +78 -0
  74. package/src/plugins/app/znycpjxt/CusTools/CodeEditor/demo/basic.png +0 -0
  75. package/src/plugins/app/znycpjxt/CusTools/CodeEditor/demo/basic.vue +27 -0
  76. package/src/plugins/app/znycpjxt/CusTools/DmbjForm.vue +76 -0
  77. package/src/plugins/app/znycpjxt/CusTools/DmfbForm.vue +351 -0
  78. package/src/plugins/app/znycpjxt/CusTools/GjForm.vue +206 -0
  79. package/src/plugins/app/znycpjxt/CusTools/Gjbjyfb.vue +200 -0
  80. package/src/plugins/app/znycpjxt/CusTools/ParamSelect.vue +222 -0
  81. package/src/plugins/app/znycpjxt/CusTools/ParamSelect2.vue +204 -0
  82. package/src/plugins/app/znycpjxt/CusTools/Zngjj.vue +105 -0
  83. package/src/plugins/app/znycpjxt/DataAnlyModel/DataAnlyModel.vue +134 -0
  84. package/src/plugins/app/znycpjxt/DataAnlyModel/Hgfx/HgfxEcharts.vue +98 -0
  85. package/src/plugins/app/znycpjxt/DataAnlyModel/Hgfx/HgfxTab.vue +73 -0
  86. package/src/plugins/app/znycpjxt/DataAnlyModel/Hgfx.vue +101 -0
  87. package/src/plugins/app/znycpjxt/DataAnlyModel/Jctj/JctjjgTab.vue +70 -0
  88. package/src/plugins/app/znycpjxt/DataAnlyModel/Jctj/Plzft.vue +154 -0
  89. package/src/plugins/app/znycpjxt/DataAnlyModel/Jctj.vue +118 -0
  90. package/src/plugins/app/znycpjxt/DataAnlyModel/Jlfx/JlfxImg.vue +80 -0
  91. package/src/plugins/app/znycpjxt/DataAnlyModel/Jlfx.vue +91 -0
  92. package/src/plugins/app/znycpjxt/DataAnlyModel/PCAfx/PcaTab.vue +161 -0
  93. package/src/plugins/app/znycpjxt/DataAnlyModel/PCAfx.vue +101 -0
  94. package/src/plugins/app/znycpjxt/DataAnlyModel/Qqt/QqtEcharts.vue +202 -0
  95. package/src/plugins/app/znycpjxt/DataAnlyModel/Qqt.vue +88 -0
  96. package/src/plugins/app/znycpjxt/DataAnlyModel/Xgxfx/XgxfxImg.vue +80 -0
  97. package/src/plugins/app/znycpjxt/DataAnlyModel/Xgxfx.vue +96 -0
  98. package/src/plugins/app/znycpjxt/DatasetMan/CreateDataset.vue +296 -0
  99. package/src/plugins/app/znycpjxt/DatasetMan/DatasetMan.vue +141 -0
  100. package/src/plugins/app/znycpjxt/DatasetMan/PreData.js +91 -0
  101. package/src/plugins/app/znycpjxt/DatasetMan/PreData.vue +545 -0
  102. package/src/plugins/app/znycpjxt/DatasetMan/PreDataApi.js +101 -0
  103. package/src/plugins/app/znycpjxt/DatasetMan/SelData.vue +186 -0
  104. package/src/plugins/app/znycpjxt/DatasetMan/SjTree.vue +130 -0
  105. package/src/plugins/app/znycpjxt/DatasetMan/Sjj.vue +478 -0
  106. package/src/plugins/app/znycpjxt/DatasetMan/Yclsjj.vue +445 -0
  107. package/src/plugins/app/znycpjxt/DatasetMan/Yssjj.vue +389 -0
  108. package/src/plugins/app/znycpjxt/DocList/DocList.vue +496 -0
  109. package/src/plugins/app/znycpjxt/DocList/unit/DocItem.vue +137 -0
  110. package/src/plugins/app/znycpjxt/ExceptHandlModel/AnomalyExtraction/Dchj.vue +107 -0
  111. package/src/plugins/app/znycpjxt/ExceptHandlModel/AnomalyExtraction/GeophysicalAnomaly.vue +115 -0
  112. package/src/plugins/app/znycpjxt/ExceptHandlModel/AnomalyExtraction/Jxyt.vue +98 -0
  113. package/src/plugins/app/znycpjxt/ExceptHandlModel/AnomalyExtraction/Lbjs.vue +127 -0
  114. package/src/plugins/app/znycpjxt/ExceptHandlModel/AnomalyExtraction/Pjcjs.vue +103 -0
  115. package/src/plugins/app/znycpjxt/ExceptHandlModel/AnomalyExtraction/Qdjs.vue +103 -0
  116. package/src/plugins/app/znycpjxt/ExceptHandlModel/ExceptHandlModel.vue +163 -0
  117. package/src/plugins/app/znycpjxt/ExceptHandlModel/GeneralCalculation/Cdjs.vue +102 -0
  118. package/src/plugins/app/znycpjxt/ExceptHandlModel/GeneralCalculation/Czfx.vue +163 -0
  119. package/src/plugins/app/znycpjxt/ExceptHandlModel/GeneralCalculation/GetFormData.vue +343 -0
  120. package/src/plugins/app/znycpjxt/ExceptHandlModel/GeneralCalculation/Hdpj.vue +100 -0
  121. package/src/plugins/app/znycpjxt/ExceptHandlModel/GeneralCalculation/Pjtd.vue +90 -0
  122. package/src/plugins/app/znycpjxt/ExceptHandlModel/GeneralCalculation/Qsfx.vue +109 -0
  123. package/src/plugins/app/znycpjxt/ExceptHandlModel/GeneralCalculation/ResultOnlyData.vue +121 -0
  124. package/src/plugins/app/znycpjxt/ExceptHandlModel/GeneralCalculation/ResultTable.vue +231 -0
  125. package/src/plugins/app/znycpjxt/ExceptHandlModel/GeneralCalculation/UniversalComputing.vue +139 -0
  126. package/src/plugins/app/znycpjxt/ExceptHandlModel/GeneralCalculation/Xgxsjs.vue +93 -0
  127. package/src/plugins/app/znycpjxt/ExceptHandlModel/GeneralCalculation/Xxsjs.vue +90 -0
  128. package/src/plugins/app/znycpjxt/ExceptHandlModel/GeneralCalculation/Ycfj.vue +116 -0
  129. package/src/plugins/app/znycpjxt/ExceptHandlModel/GeneralCalculation/Yhcl.vue +100 -0
  130. package/src/plugins/app/znycpjxt/ExceptHandlModel/extgeoanomalies/AnomalsGard.vue +91 -0
  131. package/src/plugins/app/znycpjxt/ExceptHandlModel/extgeoanomalies/Dqhxycht.vue +113 -0
  132. package/src/plugins/app/znycpjxt/ExceptHandlModel/extgeoanomalies/GeocAnomalies.vue +99 -0
  133. package/src/plugins/app/znycpjxt/ExceptHandlModel/extgeoanomalies/JgTableList.vue +203 -0
  134. package/src/plugins/app/znycpjxt/ExceptHandlModel/extgeoanomalies/Lszcl.vue +110 -0
  135. package/src/plugins/app/znycpjxt/ExceptHandlModel/extgeoanomalies/Ycxxjs.vue +116 -0
  136. package/src/plugins/app/znycpjxt/ExceptHandlModel/geoAnomalyExtraction/GeoAnomalyExtraction.vue +108 -0
  137. package/src/plugins/app/znycpjxt/ExceptHandlModel/geoAnomalyExtraction/coms/AttWeight.vue +99 -0
  138. package/src/plugins/app/znycpjxt/ExceptHandlModel/geoAnomalyExtraction/coms/Ckdctq.vue +98 -0
  139. package/src/plugins/app/znycpjxt/ExceptHandlModel/geoAnomalyExtraction/coms/LeftForm.vue +266 -0
  140. package/src/plugins/app/znycpjxt/ExceptHandlModel/ygyctq/Ygsbtq.vue +150 -0
  141. package/src/plugins/app/znycpjxt/ExceptHandlModel/ygyctq/Ygtxrh.vue +107 -0
  142. package/src/plugins/app/znycpjxt/ExceptHandlModel/ygyctq/ygyctq.vue +98 -0
  143. package/src/plugins/app/znycpjxt/Index/DataCard.vue +45 -0
  144. package/src/plugins/app/znycpjxt/Index/Index.vue +123 -0
  145. package/src/plugins/app/znycpjxt/Rzgl/Rzgl.vue +156 -0
  146. package/src/plugins/app/znycpjxt/coms/CmapColor.vue +70 -0
  147. package/src/plugins/app/znycpjxt/coms/CustomFileView.vue +343 -0
  148. package/src/plugins/app/znycpjxt/coms/CustomForm.vue +220 -0
  149. package/src/plugins/app/znycpjxt/coms/GrdView.vue +355 -0
  150. package/src/plugins/app/znycpjxt/coms/LeftForm.vue +195 -0
  151. package/src/plugins/app/znycpjxt/coms/MakeData.js +472 -0
  152. package/src/plugins/app/znycpjxt/coms/PreView.js +55 -0
  153. package/src/plugins/app/znycpjxt/coms/RightContent.vue +71 -0
  154. package/src/plugins/app/znycpjxt/coms/TableEarth.vue +259 -0
  155. package/src/plugins/app/znycpjxt/intellPred/ModelList.vue +200 -0
  156. package/src/plugins/app/znycpjxt/intellPred/coms/D3DrawGraph.js +634 -0
  157. package/src/plugins/app/znycpjxt/intellPred/coms/MineralGo.vue +249 -0
  158. package/src/plugins/app/znycpjxt/intellPred/coms/ModelCard.vue +298 -0
  159. package/src/plugins/app/znycpjxt/intellPred/coms/ModelEdit.vue +292 -0
  160. package/src/plugins/app/znycpjxt/intellPred/coms/ModelSpecif.vue +46 -0
  161. package/src/plugins/app/znycpjxt/intellPred/intellPred.vue +71 -0
  162. package/src/plugins/bf/BfApi.js +92 -0
  163. package/src/plugins/bf/BfColAdd.vue +78 -0
  164. package/src/plugins/bf/BfColEdit.vue +68 -0
  165. package/src/plugins/bf/BfColFilter.vue +112 -0
  166. package/src/plugins/bf/BfDataGroup.vue +80 -0
  167. package/src/plugins/bf/BfDataPreview.vue +118 -0
  168. package/src/plugins/bf/BfDataStat.vue +81 -0
  169. package/src/plugins/bf/BfDuplicateDel.vue +82 -0
  170. package/src/plugins/bf/BfProcCall.vue +82 -0
  171. package/src/plugins/bf/BfRunHis.vue +289 -0
  172. package/src/plugins/bf/BfRunParams.vue +94 -0
  173. package/src/plugins/bf/BfSaveFlow.vue +186 -0
  174. package/src/plugins/bf/BfSelFlow.vue +123 -0
  175. package/src/plugins/bf/BfTabCombine.vue +127 -0
  176. package/src/plugins/bf/BfTabJoin.vue +108 -0
  177. package/src/plugins/bf/BfTabMerge.vue +68 -0
  178. package/src/plugins/bf/BfTabReader.vue +126 -0
  179. package/src/plugins/bf/BfValFormat.vue +68 -0
  180. package/src/plugins/bf/BfValNumber.vue +68 -0
  181. package/src/plugins/bf/BfValProc.vue +78 -0
  182. package/src/plugins/bf/BfValSort.vue +78 -0
  183. package/src/plugins/bf/BiFlow.vue +1177 -0
  184. package/src/plugins/bf/IBfPlug.js +205 -0
  185. package/src/plugins/bf/coms/ColAdd.vue +75 -0
  186. package/src/plugins/bf/coms/ColEdit.vue +52 -0
  187. package/src/plugins/bf/coms/ColList.vue +91 -0
  188. package/src/plugins/bf/coms/DataGroup.vue +90 -0
  189. package/src/plugins/bf/coms/DataStat.vue +67 -0
  190. package/src/plugins/bf/coms/EditTable.vue +161 -0
  191. package/src/plugins/bf/coms/NodeTree.vue +105 -0
  192. package/src/plugins/bf/coms/PlugCmd.vue +95 -0
  193. package/src/plugins/bf/coms/RunParams.vue +68 -0
  194. package/src/plugins/bf/coms/TabCombine.vue +60 -0
  195. package/src/plugins/bf/coms/TabJoin.vue +69 -0
  196. package/src/plugins/bf/coms/ValFormat.vue +53 -0
  197. package/src/plugins/bf/coms/ValProc.vue +77 -0
  198. package/src/plugins/bf/coms/ValSort.vue +89 -0
  199. package/src/plugins/bf/parts/Icon.vue +105 -0
  200. package/src/plugins/bf/parts/Rect.vue +98 -0
  201. package/src/plugins/bf/parts/index.js +11 -0
  202. package/src/plugins/cxMixin/IAttBase.js +78 -0
  203. package/src/plugins/cxMixin/IAttDlg.js +45 -0
  204. package/src/plugins/cxMixin/IAttProc.js +98 -0
  205. package/src/plugins/cxMixin/IComBase.js +42 -0
  206. package/src/plugins/cxMixin/IContextMenu.js +74 -0
  207. package/src/plugins/cxMixin/IDataAcce.js +1106 -0
  208. package/src/plugins/cxMixin/IDataList.js +775 -0
  209. package/src/plugins/cxMixin/IDataMan.js +1670 -0
  210. package/src/plugins/cxMixin/IDataMan2.js +2561 -0
  211. package/src/plugins/cxMixin/IDataProc.js +379 -0
  212. package/src/plugins/cxMixin/IDatagrid.js +234 -0
  213. package/src/plugins/cxMixin/IEditableDg.js +477 -0
  214. package/src/plugins/cxMixin/IExpBase.js +51 -0
  215. package/src/plugins/cxMixin/IFormBase.js +29 -0
  216. package/src/plugins/cxMixin/IGridBpm.js +732 -0
  217. package/src/plugins/cxMixin/IGridData.js +109 -0
  218. package/src/plugins/cxMixin/IOperMore.js +323 -0
  219. package/src/plugins/cxMixin/IPlugBase.js +341 -0
  220. package/src/plugins/cxMixin/ISendCode.js +86 -0
  221. package/src/plugins/cxMixin/ISinglePage.js +112 -0
  222. package/src/plugins/cxMixin/ITags.js +81 -0
  223. package/src/plugins/cxe/CxeMap.vue +61 -0
  224. package/src/plugins/home/HeadNav.vue +194 -0
  225. package/src/plugins/home/Home.vue +59 -0
  226. package/src/plugins/home/HomePage.vue +237 -0
  227. package/src/plugins/home/Login.vue +139 -0
  228. package/src/plugins/zbcxCesium/coms/GraDrawBarWgt.vue +176 -0
  229. package/src/plugins/zbcxCesium/coms/baseMapSwitch/BaseMap.scss +42 -0
  230. package/src/plugins/zbcxCesium/coms/baseMapSwitch/BaseMap.vue +59 -0
  231. package/src/plugins/zbcxCesium/coms/dataPreview/DataPreview.vue +526 -0
  232. package/src/plugins/zbcxCesium/coms/dataPreview/DataPreviewPlug.vue +79 -0
  233. package/src/plugins/zbcxCesium/coms/dataPreview/ReadShpFile.js +42 -0
  234. package/src/plugins/zbcxCesium/coms/legend/Legend.vue +78 -0
  235. package/src/plugins/zbcxCesium/coms/popup/dialog-left-bg.png +0 -0
  236. package/src/plugins/zbcxCesium/coms/popup/index.js +88 -0
  237. package/src/plugins/zbcxCesium/coms/popup/index.vue +93 -0
  238. package/src/plugins/zbcxCesium/pub/LoadGeojson.js +44 -0
  239. package/src/plugins/zbcxCesium/pub/LoadModel.js +128 -0
  240. package/src/plugins/zbcxCesium/pub/LoadOgc.js +226 -0
  241. package/src/plugins/zbcxCesium/pub/Opacity.vue +139 -0
  242. package/src/plugins/zbcxCesium/pub/PubCxe.js +97 -0
  243. package/src/plugins/zbcxCesium/pub/SceneSet.vue +178 -0
  244. package/src/plugins/zbcxCesium/pub/ShowEffect.vue +216 -0
  245. package/src/plugins/zbcxCesium/pub/TMeasure.vue +122 -0
  246. package/src/plugins/zbcxCesium/pub/ToDefView3.vue +109 -0
  247. package/src/plugins/zbcxCesium/pub/getWmsGetCapabilities.js +127 -0
  248. package/src/plugins/zbcxCesium/utils/ShpToGeoJson.js +24 -0
  249. package/src/plugins/zbcxCesium/utils/WebProj4.js +32 -0
@@ -0,0 +1,772 @@
1
+ <style lang='scss' scoped>
2
+ .map-tool {
3
+ --cx-color-bg-deep-1: var(--cx-colorBg5);
4
+ --cx-color-bg-hover: var(--cx-colorPrimary13);
5
+ --cx-color-bg-normal: var(--cx-colorBg5);
6
+ --cx-color-tint-text-active: var(--cx-colorPrimary4);
7
+ position: absolute; right: 0; top: 0;
8
+
9
+ .toolbar {
10
+ position: absolute; top: 0.05rem; right: 0.05rem; margin: 0; padding: 0;color: var(--cx-colorText5);
11
+
12
+ ::v-deep div.tool-grp:nth-of-type(2) {
13
+ div.tool-item:nth-of-type(1) + div.tool-children { right: 0 !important; left: unset !important;
14
+ .tool-item { background-color: var(--cx-colorBg5); }
15
+ }
16
+ }
17
+ }
18
+ .locate {
19
+ width: 2.8rem; background-color: var(--cx-colorBg2); position: absolute; top: 0.9rem; right: 0.05rem; margin: 0; padding: 0;color: var(--cx-colorText12);
20
+ li { line-height: 0.30rem; cursor: pointer;i { margin: 0 0.10rem; } }
21
+ .active { background-color: var(--cx-colorPrimary0); }
22
+ > li {display: flex; padding: 0.10rem;}
23
+ span {width: 0.8rem;color: var(--cx-colorText2);}
24
+ }
25
+ .locate-area{
26
+ width: 2.80rem; height: 0.4rem; background-color: var(--cx-colorBg2); position: absolute; top: 0.45rem; right: 4.3rem; margin: 0; padding: 0.025rem;color: var(--cx-colorText12);box-shadow: var(--cx-boxShadow5);
27
+ }
28
+ .yzfx {
29
+ width: 3rem; height: 3rem; background-color: var(--cx-colorBg2); position: absolute; top: 0.45rem; right: 0.05rem; margin: 0; padding: 0.025rem;box-shadow: var(--cx-boxShadow5);
30
+ }
31
+ }
32
+ ::v-deep .el-cascader {width: 2rem; height: 0.35rem; margin-right: 0.10rem}
33
+ ::v-deep .el-tree-select {width: 2rem;margin-right: 0.10rem}
34
+ ::v-deep .tool-item.is-active {background-color: var(--cx-colorPrimary13);}
35
+ ::v-deep .cx-tool-bar .tool-grp .tool-item.tool-cont-horizontal .tool-text {margin-left: 0.08rem;}
36
+ ::v-deep .cx-tool-bar.toolbar-horizontal .tool-grp .tool-item:not(:first-child) {border-left: 0.01rem dashed var(--cx-color-border-normal);}
37
+ ::v-deep .tool-children { bottom: -0.4rem !important; }
38
+
39
+ ::v-deep .ic-tucenghuizhi { color: rgb(26,189,200); }
40
+ ::v-deep .ic-dixing { color: rgb(165,57,31); }
41
+ ::v-deep .ic-celiang { color: rgb(101,106,206); }
42
+ ::v-deep .ic-zhixianceliang { color: rgb(26,189,200); }
43
+ ::v-deep .ic-mianjiceliang { color: rgb(255,177,46); }
44
+ ::v-deep .ic-shanchu { color: rgb(203,48,10); }
45
+ ::v-deep .ic-dingwei { color: rgb(79,119,226); }
46
+ ::v-deep .ic-dimingdingwei { color: rgb(101,106,206); }
47
+ ::v-deep .ic-zuobiaodingwei { color: rgb(203,48,10); }
48
+ ::v-deep .ic-shitucaozuo { color: rgb(26,189,200); }
49
+ ::v-deep .ic-fuwei { color: rgb(26,189,200); }
50
+ ::v-deep .ic-fangda { color: rgb(0,111,255); }
51
+ ::v-deep .ic-suoxiao { color: rgb(203,48,10); }
52
+ ::v-deep .ic-dianhuizhi { color: rgb(79,119,226); }
53
+ ::v-deep .ic-ziyouhuixian { color: rgb(26,189,200); }
54
+ ::v-deep .ic-mianhuizhi { color: rgb(79,119,226); }
55
+ ::v-deep .ic-canshuhuixian { color: rgb(26,189,200); }
56
+ ::v-deep .ic-mianjiceliang { color: rgb(0,111,255); }
57
+ ::v-deep .ic-shanchu { color: rgb(203,48,10); }
58
+ ::v-deep .ic-shitucaozuo { color: rgb(101,106,206); }
59
+
60
+ </style>
61
+
62
+ <template>
63
+ <div class="map-tool" :style="toolStyle">
64
+ <cx-tool-bar
65
+ ref="toolbar"
66
+ class="toolbar"
67
+ :tools="newtools.length > 0 ? newtools : tools"
68
+ :toolWidth="120"
69
+ @tool-active="onActiveTool"
70
+ @tool-inactive="onInactiveTool"
71
+ >
72
+ </cx-tool-bar>
73
+ <ul class="locate" v-if="showPos">
74
+ <li>
75
+ <span>坐标类型:</span>
76
+ <el-select v-model="coorType" @change="selectChange" style="width:1.8rem;">
77
+ <el-option label="系统坐标" value="sysCoor"/>
78
+ <el-option label="经纬度" value="lonLat"/>
79
+ </el-select>
80
+ </li>
81
+ <li>
82
+ <el-input v-model="lon" :placeholder="lonHint"></el-input>
83
+ </li>
84
+ <li>
85
+ <el-input v-model="lat" :placeholder="latHint"></el-input>
86
+ </li>
87
+
88
+ <li>
89
+ <el-button style="width: 100%" @click="locatePos"> 定位 </el-button>
90
+ </li>
91
+ </ul>
92
+ <!-- <div class="locate-area" v-if="showArea">
93
+ <el-cascader
94
+ ref="cascader"
95
+ v-model="areaValue"
96
+ :options="areaOptions"
97
+ :props = "{checkStrictly:true, children: 'children', label: 'name', value: 'bm'}"
98
+ :show-all-levels="false"
99
+ filterable
100
+ clearable
101
+ @change="handleChange">
102
+ <template v-slot="{data}">
103
+ <span v-text="data.name" :title="data.name"></span>
104
+ </template>
105
+ </el-cascader>
106
+ <el-button @click="locatePosArea" style="width: 0.6rem; height: 0.35rem"> 定位 </el-button>
107
+ </div> -->
108
+ </div>
109
+ </template>
110
+
111
+ <script>
112
+ /**
113
+ * 组件名称: 地图工具条
114
+ * 功能说明:
115
+ *
116
+ * 参数说明:
117
+ * @prop 类型 参数名 参数说明
118
+ *
119
+ * 事件说明:
120
+ * @event 事件名 参数解构 事件和参数说明
121
+ *
122
+ * 插槽说明:
123
+ * @slot 插槽名 插槽prop解构 插槽和prop说明
124
+ */
125
+
126
+ /**
127
+ * 维护历史:
128
+ * 修改时间 人员 说明
129
+ * 2023/11/23 郭康伦 立项分析添加点线面之前必须先选择一个版本,保证要素命名时能取到当前版本已有的名字,避免重复命名
130
+ */
131
+
132
+ import mapmethods from '@/plugins/app/com/MapMethods.js'
133
+ import yx from '@/plugins/app/com/yx'
134
+ import ReadShpFile from '@/plugins/zbcxCesium/coms/dataPreview/ReadShpFile.js'
135
+ import shpToGeoJson from '@/plugins/zbcxCesium/utils/ShpToGeoJson'
136
+ import LoadGeojson from '@/plugins/zbcxCesium/pub/LoadGeojson.js'
137
+ export default
138
+ {
139
+ mixins: [mapmethods, yx],
140
+ components: { },
141
+ props:
142
+ {
143
+ toolStyle: { type: Object, default: _ => ({ top: 0, right: 0 }) },
144
+ att: { type: Object, default: _ => ({}) },
145
+ newtools: { type: Array, default: _ => ([]) }
146
+ },
147
+ data()
148
+ {
149
+ return {
150
+ coorType: 'sysCoor',
151
+ showPos: false,
152
+ showArea: false,
153
+ onViewStatus: true,
154
+ areaOptions: [],
155
+ showTerrain: false,
156
+ showXzjx: false,
157
+ showBztf: false,
158
+ areaValue: '',
159
+ activeIndex: '',
160
+ lon: '',
161
+ lat: '',
162
+ lonHint: 'x坐标',
163
+ latHint: 'y坐标',
164
+ tools: [[
165
+ // { name: 'mapswitch', title: '项目图层', icon: 'cx-fi ic-tucenghuizhi', children: [], plugin: 1, click: (evt) => this.controlLayer(evt) },
166
+ { name: 'xzjx', title: '行政界线', icon: 'cx-fi ic-tucenghuizhi', children: [], plugin: 1, click: (evt) => this.controlXzjx(evt) },
167
+ // { name: 'bztf', title: '标准图幅', icon: 'cx-fi ic-tucenghuizhi', children: [], plugin: 1, click: (evt) => this.controlBztf(evt) },
168
+ { name: 'dixing', title: '地形', icon: 'cx-fi ic-dixing', children: [], plugin: 1, click: (evt) => this.controlTerrain(evt) },
169
+ {
170
+ name: 'measure',
171
+ title: '测量',
172
+ icon: 'cx-fi ic-celiang',
173
+ children: [
174
+ { name: 'measLin', title: '直线测量', icon: 'cx-fi ic-zhixianceliang', plugin: 2, click: (evt) => this.mesureLine(evt) },
175
+ { name: 'measArea', title: '面积测量', icon: 'cx-fi ic-mianjiceliang', plugin: 2, click: (evt) => this.mesureArea(evt) },
176
+ { name: 'measureAngle', title: '角度测量', icon: 'cx-fi ic-jiaoduceliang', plugin: 2, click: (evt) => this.mesureAngle(evt) },
177
+ { name: 'measDel', title: '清除', icon: 'cx-fi ic-shanchu', children: [], plugin: 2, click: (evt) => this.delVector(evt) }
178
+ ]
179
+ },
180
+ {
181
+ name: 'locate',
182
+ title: '定位',
183
+ icon: 'cx-fi ic-dingwei',
184
+ children: [
185
+ // { name: 'dmdw', title: '地名定位', icon: 'cx-fi ic-dimingdingwei', children: [], plugin: 1, click: (evt) => this.locateAreaStatus(evt) },
186
+ { name: 'zbdw', title: '坐标定位', icon: 'cx-fi ic-zuobiaodingwei', children: [], plugin: 1, click: (evt) => this.locatePosStatus(evt) }
187
+ ]
188
+ },
189
+ {
190
+ name: 'view',
191
+ title: '视图操作',
192
+ icon: 'cx-fi ic-shitucaozuo',
193
+ children: [
194
+ { name: 'vertical', title: '垂直视角', icon: 'cx-fi ic-fuwei', children: [], plugin: 1, click: (evt) => this.verticalView(evt) },
195
+ { name: 'fuwi', title: '复位', icon: 'cx-fi ic-fuwei', children: [], plugin: 1, click: (evt) => this.resetEarth($g.syscfg.posBqqd) },
196
+ { name: 'zoomin', title: '放大', icon: 'cx-fi ic-fangda', children: [], plugin: 1, click: (evt) => this.reduceHeight(evt) },
197
+ { name: 'zoomout', title: '缩小', icon: 'cx-fi ic-suoxiao', children: [], plugin: 1, click: (evt) => this.addHeight(evt) }
198
+ ]
199
+ }
200
+ ]],
201
+ parentTool: []
202
+ }
203
+ },
204
+
205
+ watch:
206
+ {
207
+ areaValue: 'clearLayer1'
208
+ },
209
+
210
+ created()
211
+ {
212
+ this.initToolData()
213
+ // this.regionData()
214
+ },
215
+
216
+ mounted()
217
+ {
218
+ cx.base.watch(_ => window.Viewer, _ =>
219
+ {
220
+ // 默认点击 行政界线
221
+ const tool = this.tools[0].find(item => item.name === 'xzjx')
222
+ this.$refs.toolbar.clickTool(tool)
223
+ })
224
+ },
225
+
226
+ methods:
227
+ {
228
+ /**
229
+ * 初始化工具数据
230
+ */
231
+ initToolData()
232
+ {
233
+ const tool = [
234
+ {
235
+ name: 'draw',
236
+ title: '缓冲区分析',
237
+ icon: 'cx-fi ic-huitu',
238
+ children: [
239
+ { name: 'drawPnt', title: '点绘制', icon: 'cx-fi ic-dianhuizhi', children: [], plugin: 2, click: (evt) => this.drawPointFunc(evt) },
240
+ { name: 'drawLin', title: '自由绘线', icon: 'cx-fi ic-ziyouhuixian', children: [], plugin: 2, click: (evt) => this.drawLineFunc(evt) },
241
+ { name: 'drawLinClosed', title: '闭合绘线', icon: 'cx-fi ic-mianhuizhi', children: [], plugin: 2, click: (evt) => this.drawLineClosed(evt) },
242
+ // { name: 'drawArgs', title: '参数绘线', icon: 'cx-fi ic-canshuhuixian', children: [], plugin: 2, click: (evt) => this.drawParamLine(evt) },
243
+ { name: 'drawPol', title: '面绘制', icon: 'cx-fi ic-mianjiceliang', children: [], plugin: 2, click: (evt) => this.drawPolFunc(evt) },
244
+ { name: 'drawDel', title: '清除', icon: 'cx-fi ic-shanchu', children: [], plugin: 2, click: (evt) => this.delVector(evt) }
245
+ ]
246
+ }
247
+ ]
248
+ const toolProject = [
249
+ { name: '框选', title: '框选', icon: 'cx-fi ic-shitucaozuo', children: [], plugin: 2, click: (evt) => this.areaSelect(evt) },
250
+ { name: '属性查看', title: '属性查看', icon: 'cx-fi ic-check1', children: [], plugin: 2, click: (evt) => this.onViewAtt(evt) },
251
+ { name: '压占分析', title: '压占分析', icon: 'cx-fi ic-huitu', children: [], plugin: 2, click: (evt) => this.analyseYz(evt) }
252
+ ]
253
+
254
+ const toolBqqd = [
255
+ {
256
+ name: 'draw',
257
+ title: '绘制',
258
+ icon: 'cx-fi ic-huitu',
259
+ children: [
260
+ { name: 'drawBq', title: '靶区绘制', icon: 'cx-fi ic-mianhuizhi', children: [], plugin: 2, click: (evt) => this.drawBq(evt) },
261
+ { name: 'exportShp', title: '靶区下载', icon: 'cx-fi ic-check1', children: [], plugin: 2, click: (evt) => this.exportShp(evt) },
262
+ { name: 'saveShp', title: '保存靶区', icon: 'cx-fi ic-save', children: [], plugin: 2, click: (evt) => this.saveShp(evt) },
263
+ { name: 'clearDrawBq', title: '清除靶区', icon: 'cx-fi ic-shanchu', children: [], plugin: 2, click: (evt) => this.clearDrawBq(evt) }
264
+ ]
265
+ }
266
+ ]
267
+
268
+ if (this.$route.name === 'Bqqd')
269
+ this.tools.push(toolBqqd)
270
+ // 构造互斥的工具名序列
271
+ this.mutexToolNames = []
272
+ const getActToolNames = (ret, list) =>
273
+ {
274
+ list.forEach(tool =>
275
+ {
276
+ if (tool.plugin === 2)
277
+ ret.push(tool.name)
278
+
279
+ getActToolNames(ret, tool.children || [])
280
+ })
281
+ }
282
+ this.tools.forEach(list =>
283
+ {
284
+ getActToolNames(this.mutexToolNames, list)
285
+ })
286
+ },
287
+
288
+ /**
289
+ * 工具激活事件
290
+ * @param {Object} evt 事件对象
291
+ */
292
+ onActiveTool(evt)
293
+ {
294
+ // 当前激活互斥工具,取消其他互斥工具的激活状态
295
+ if (this.mutexToolNames.includes(evt.tool.name))
296
+ {
297
+ const names = this.mutexToolNames.filter(name => name !== evt.tool.name)
298
+ this.inactiveTool(names)
299
+ }
300
+ // 运行新工具
301
+ if (evt.tool.click)
302
+ evt.tool.click(evt)
303
+ },
304
+ /**
305
+ * 工具失活事件
306
+ * @param {Object} evt 事件对象
307
+ */
308
+ onInactiveTool(evt)
309
+ {
310
+ if (evt.tool.name === 'drawArgs') return
311
+ if (evt.tool.click)
312
+ evt.tool.click(evt)
313
+ },
314
+
315
+ /**
316
+ * 图层控制显示隐藏
317
+ * @param {Object} evt 事件对象
318
+ */
319
+ controlLayer(evt)
320
+ {
321
+ this.$emit('controlLayer')
322
+ },
323
+
324
+ /**
325
+ * 垂直视角
326
+ * @param {Object} evt 事件对象
327
+ */
328
+ verticalView(evt)
329
+ {
330
+ window.tool.verticalView()
331
+ },
332
+
333
+ /**
334
+ * 压占分析
335
+ * @param {Object} evt 事件对象
336
+ */
337
+ analyseYz(evt)
338
+ {
339
+ cx.run.runPlug('AnalyseYz', {}, { uicfg: { width: 550, height: 500 } })
340
+ },
341
+
342
+ /**
343
+ * 标准图幅控制
344
+ * @param {Object} evt 事件对象
345
+ */
346
+ controlBztf(evt)
347
+ {
348
+ this.showBztf = !this.showBztf
349
+ if (!this.showBztf)
350
+ {
351
+ window.Viewer.imageryLayers._layers.filter(i => i.type === '标准图幅').forEach(j =>
352
+ {
353
+ window.Viewer.imageryLayers.remove(j)
354
+ })
355
+ }
356
+ else
357
+ this.loadYnsImagerLayer('/ynsMapserver', 'YUNNAN', '标准图幅')
358
+ },
359
+
360
+ /**
361
+ * 行政界线显隐控制
362
+ */
363
+ controlXzjx()
364
+ {
365
+ // this.showXzjx = !this.showXzjx
366
+
367
+ if (window.Viewer.layers._layerCache.geojson && window.Viewer.layers._layerCache.geojson['省界0'])
368
+ {
369
+ for (let i in window.Viewer.layers._layerCache.geojson)
370
+ {
371
+ if (i.indexOf('省界') !== -1)
372
+ window.Viewer.layers._layerCache.geojson[i].show = !window.Viewer.layers._layerCache.geojson[i].show
373
+ }
374
+ }
375
+ else
376
+ this.loadShp(window.Viewer, { url: 'shp:static/model/省界.shp;dbf:static/model/省界.dbf' }, { id: '省界' })
377
+ },
378
+
379
+ /**
380
+ * 加载shp文件
381
+ * @param {Object} viewer 视图对象
382
+ * @param {Object} services 服务配置
383
+ * @param {Object} opts 选项
384
+ */
385
+ loadShp(viewer, services, opts)
386
+ {
387
+ let res = ReadShpFile.parseUrl(services)
388
+ let promise = shpToGeoJson(res.shp, res.dbf)
389
+ promise.then(res =>
390
+ {
391
+ res.forEach((item, index) =>
392
+ {
393
+ this.laodGeojson(viewer, { url: item }, { id: '省界' + index, noFly: true })
394
+ })
395
+ })
396
+ },
397
+
398
+ /**
399
+ * 加载geojson数据
400
+ * @param {Object} viewer 视图对象
401
+ * @param {Object} services 服务配置
402
+ * @param {Object} opts 选项
403
+ */
404
+ async laodGeojson(viewer, services, opts)
405
+ {
406
+ this.layer = await LoadGeojson.loadGeojson(viewer, { ...opts, ...services, url: services.url })
407
+ },
408
+
409
+ /**
410
+ * 坐标定位状态
411
+ * @param {Object} evt 事件对象
412
+ */
413
+ locatePosStatus(evt)
414
+ {
415
+ this.showPos = !this.showPos
416
+ },
417
+
418
+ /**
419
+ * 清除图层
420
+ * @param {Object} evt 事件对象
421
+ */
422
+ clearLayer(evt)
423
+ {
424
+ this.removeTempVector()
425
+ },
426
+
427
+ /**
428
+ * 地名定位状态
429
+ * @param {Object} evt 事件对象
430
+ */
431
+ locateAreaStatus(evt)
432
+ {
433
+ this.showArea = !this.showArea
434
+ if (!this.showArea)
435
+ this.clearLayer()
436
+ },
437
+
438
+ /**
439
+ * 清空地名定位图层
440
+ * @param {*} val 值
441
+ */
442
+ clearLayer1(val)
443
+ {
444
+ if (!val)
445
+ this.clearLayer()
446
+ },
447
+
448
+ /**
449
+ * 框选区域
450
+ * @param {Object} evt 事件对象
451
+ */
452
+ areaSelect(evt)
453
+ {
454
+ this.$emit('areaSelect')
455
+ },
456
+
457
+ /**
458
+ * 查看属性
459
+ * @param {Object} evt 事件对象
460
+ */
461
+ onViewAtt(evt)
462
+ {
463
+ this.onViewStatus = !this.onViewStatus
464
+ if (this.onViewStatus)
465
+ this.activeIndex = 999
466
+ this.$emit('onViewAtt')
467
+ },
468
+
469
+ /**
470
+ * 绘制点功能
471
+ * @param {Object} evt 事件对象
472
+ */
473
+ drawPointFunc(evt)
474
+ {
475
+ if (!this.att.vers && this.$route.name === 'ProjectApprovalAnalyse') return this.$notify({ message: '请先选择一个版本', type: 'warning' })
476
+ this.$emit('drawPointFunc', { toolName: evt.tool.name })
477
+ },
478
+
479
+ /**
480
+ * 绘制线功能
481
+ * @param {Object} evt 事件对象
482
+ */
483
+ drawLineFunc(evt)
484
+ {
485
+ if (!this.att.vers && this.$route.name === 'ProjectApprovalAnalyse') return this.$notify({ message: '请先选择一个版本', type: 'warning' })
486
+ this.$emit('drawLineFunc', { toolName: evt.tool.name })
487
+ },
488
+
489
+ /**
490
+ * 闭合绘线
491
+ * @param {Object} evt 事件对象
492
+ */
493
+ drawLineClosed(evt)
494
+ {
495
+ if (!this.att.vers && this.$route.name === 'ProjectApprovalAnalyse') return this.$notify({ message: '请先选择一个版本', type: 'warning' })
496
+ this.$emit('drawLineFuncClosed', { toolName: evt.tool.name })
497
+ },
498
+
499
+ /**
500
+ * 参数绘线
501
+ * @param {Object} evt 事件对象
502
+ */
503
+ drawParamLine(evt)
504
+ {
505
+ if (!this.att.vers && this.$route.name === 'ProjectApprovalAnalyse') return this.$notify({ message: '请先选择一个版本', type: 'warning' })
506
+ this.delVector()
507
+ this.$emit('drawParamLine', { toolName: evt.tool.name })
508
+ },
509
+
510
+ /**
511
+ * 绘制面功能
512
+ * @param {Object} evt 事件对象
513
+ */
514
+ drawPolFunc(evt)
515
+ {
516
+ if (!this.att.vers && this.$route.name === 'ProjectApprovalAnalyse') return this.$notify({ message: '请先选择一个版本', type: 'warning' })
517
+ this.$emit('drawPolFunc', { toolName: evt.tool.name })
518
+ },
519
+
520
+ /**
521
+ * 激活工具选中状态
522
+ * @param {Array} toolNames 工具名称数组
523
+ */
524
+ activeToolClick(toolNames)
525
+ {
526
+ this.$refs.toolbar.activeSelect(toolNames)
527
+ },
528
+
529
+ /**
530
+ * 取消工具激活状态
531
+ * @param {Array} toolNames 工具名称数组
532
+ */
533
+ inactiveTool(toolNames)
534
+ {
535
+ this.$refs.toolbar.inactiveSelect(toolNames)
536
+ },
537
+
538
+ /**
539
+ * 删除矢量
540
+ * @param {Object} evt 事件对象
541
+ */
542
+ delVector(evt)
543
+ {
544
+ // 取消全部工具的激活状态
545
+ // this.inactiveTool(this.mutexToolNames)
546
+ window.mesure.clearMeasure()
547
+ this.clearLayer()
548
+ this.$emit('delVector')
549
+ },
550
+
551
+ /**
552
+ * 测量直线
553
+ * @param {Object} evt 事件对象
554
+ */
555
+ mesureLine(evt)
556
+ {
557
+ if (window.mesure.measureDrawLine)
558
+ {
559
+ window.mesure.measureDrawLine.destroy()
560
+ window.mesure.measureDrawLine = null
561
+ return
562
+ }
563
+ window.mesure.measureLine('line')
564
+ },
565
+
566
+ /**
567
+ * 测量面积
568
+ * @param {Object} evt 事件对象
569
+ */
570
+ mesureArea(evt)
571
+ {
572
+ if (window.mesure.measureDrawArea)
573
+ {
574
+ window.mesure.measureDrawArea.destroy()
575
+ window.mesure.measureDrawArea = null
576
+ return
577
+ }
578
+ window.mesure.measureArea('area')
579
+ },
580
+
581
+ /**
582
+ * 测量角度
583
+ * @param {Object} evt 事件对象
584
+ */
585
+ mesureAngle(evt)
586
+ {
587
+ if (window.mesure.measureDrawAngle)
588
+ {
589
+ window.mesure.measureDrawAngle.destroy()
590
+ window.mesure.measureDrawAngle = null
591
+ return
592
+ }
593
+ window.mesure.meaureAngle('angle')
594
+ },
595
+
596
+ /**
597
+ * 当前激活项
598
+ * @param {*} id id
599
+ */
600
+ clickLi(id)
601
+ {
602
+ this.activeIndex = id
603
+ },
604
+
605
+ /**
606
+ * 地形控制
607
+ * @param {Object} evt 事件对象
608
+ */
609
+ controlTerrain(evt)
610
+ {
611
+ this.showTerrain = !this.showTerrain
612
+ if (this.showTerrain)
613
+ window.tool.loadTerrian()
614
+ else
615
+ window.tool.clearTreeian()
616
+ },
617
+
618
+ /**
619
+ * 坐标系切换
620
+ * @param {String} val 值
621
+ */
622
+ selectChange(val)
623
+ {
624
+ if (val === 'sysCoor')
625
+ {
626
+ this.lonHint = 'x坐标'
627
+ this.latHint = 'y坐标'
628
+ }
629
+ else if (val === 'lonLat')
630
+ {
631
+ this.lonHint = '经度'
632
+ this.latHint = '纬度'
633
+ }
634
+ },
635
+
636
+ /**
637
+ * 坐标定位
638
+ * @param {Object} evt 事件对象
639
+ */
640
+ locatePos(evt)
641
+ {
642
+ if (!this.lon || !this.lat)
643
+ {
644
+ this.clearLayer()
645
+ this.$notify({ message: '请输入经纬度', type: 'warning' })
646
+ }
647
+ else
648
+ {
649
+ let lon = this.lon
650
+ let lat = this.lat
651
+ // 输入系统坐标转为经纬度
652
+ if (this.coorType === 'sysCoor')
653
+ [lon, lat] = this.transformCoor([lon * 1, lat * 1], false)
654
+ window.Viewer.flyToPos({ lng: Number(lon * 1), lat: Number(lat * 1), alt: 336.5 })
655
+ // this.clearLayer()
656
+ // window.tool.addVector([{ lng: lon, lat: lat, mark: 'temp' }], 1, false, false)
657
+ // window.tool.flyToPos({ lng: lon, lat: lat, alt: window.Viewer.camera.positionCartographic.height })
658
+ }
659
+ },
660
+
661
+ /**
662
+ * 地名定位
663
+ * @param {Object} evt 事件对象
664
+ */
665
+ async locatePosArea(evt)
666
+ {
667
+ let node = this.$refs.cascader.getCheckedNodes()
668
+ let geom = []
669
+ if (node.length)
670
+ {
671
+ if (node[0].level === 1)
672
+ geom = await cx.svr.data.query($app.TabConst.yns_sjxzqsjb.major, $app.TabConst.yns_sjxzqsjb.minor, { args: [['bm', '=', node[0].value, null]], geometry: 1 })
673
+ else if (node[0].level === 2)
674
+ geom = await cx.svr.data.query($app.TabConst.yns_zsjxzqsjb.major, $app.TabConst.yns_zsjxzqsjb.minor, { args: [['bm', '=', node[0].value, null]], geometry: 1 })
675
+ else if (node[0].level === 3)
676
+ geom = await cx.svr.data.query($app.TabConst.yns_xjxzqsjb.major, $app.TabConst.yns_xjxzqsjb.minor, { args: [['bm', '=', node[0].value, null]], geometry: 1 })
677
+ else if (node[0].level === 4)
678
+ geom = await cx.svr.data.query($app.TabConst.yns_xzjxzqsjb.major, $app.TabConst.yns_xzjxzqsjb.minor, { args: [['bm', '=', node[0].value, null]], geometry: 1 })
679
+ else if (node[0].level === 5)
680
+ geom = await cx.svr.data.query($app.TabConst.yns_cjdcqsjb.major, $app.TabConst.yns_cjdcqsjb.minor, { args: [['bm', '=', node[0].value, null]], geometry: 1 })
681
+ this.locateArea(geom[0])
682
+ }
683
+ },
684
+
685
+ /**
686
+ * 定位到指定区域
687
+ * @param {Object} obj 区域对象
688
+ */
689
+ locateArea(obj)
690
+ {
691
+ window.Viewer.flyToPos({ lng: obj.centerx * 1, lat: obj.centery * 1, alt: 336.5 })
692
+ // this.clearLayer()
693
+ // let coors = obj.geom.coordinates[0][0]
694
+ // let jwd = ''
695
+ // coors.forEach(i =>
696
+ // {
697
+ // jwd += i.join(',') + ';'
698
+ // })
699
+ // window.tool.addVector([{ jwd, mark: 'temp' }], 2, false, true)
700
+ // window.tool.addLabel([{ lng: obj.centerx, lat: obj.centery, label: obj.name, mark: 'temp' }])
701
+ },
702
+
703
+ /**
704
+ * 级联选择器children构造
705
+ * @param {Array} arr1 父节点数组
706
+ * @param {Array} arr2 子节点数组
707
+ */
708
+ structCascaderChildren(arr1, arr2)
709
+ {
710
+ arr1.forEach(i =>
711
+ {
712
+ i.children = arr2.filter(j => j.id0 === i.bm)
713
+ })
714
+ },
715
+
716
+ /**
717
+ * 生成tree结构
718
+ * @param {Object} evt 事件对象
719
+ */
720
+ async regionData(evt)
721
+ {
722
+ let province = await cx.svr.data.query($app.TabConst.yns_sjxzqsjb.major, $app.TabConst.yns_sjxzqsjb.minor, { args: [['id', '>', '0', null]] })
723
+ let state = await cx.svr.data.query($app.TabConst.yns_zsjxzqsjb.major, $app.TabConst.yns_zsjxzqsjb.minor, { args: [['id', '>', '0', null]] })
724
+ let county = await cx.svr.data.query($app.TabConst.yns_xjxzqsjb.major, $app.TabConst.yns_xjxzqsjb.minor, { args: [['id', '>', '0', null]] })
725
+ let township = await cx.svr.data.query($app.TabConst.yns_xzjxzqsjb.major, $app.TabConst.yns_xzjxzqsjb.minor, { args: [['id', '>', '0', null]] })
726
+ let village = await cx.svr.data.query($app.TabConst.yns_cjdcqsjb.major, $app.TabConst.yns_cjdcqsjb.minor, { args: [['id', '>', '0', null]] })
727
+
728
+ this.structCascaderChildren(township, village)
729
+ this.structCascaderChildren(county, township)
730
+ this.structCascaderChildren(state, county)
731
+ this.structCascaderChildren(province, state)
732
+ this.areaOptions = province
733
+ },
734
+
735
+ /**
736
+ * 绘制靶区
737
+ * @param {Object} evt 事件对象
738
+ */
739
+ drawBq(evt)
740
+ {
741
+ this.$emit('drawBq')
742
+ },
743
+
744
+ /**
745
+ * 清除靶区
746
+ * @param {Object} evt 事件对象
747
+ */
748
+ clearDrawBq(evt)
749
+ {
750
+ this.$emit('clearDrawBq')
751
+ },
752
+
753
+ /**
754
+ * 导出shp
755
+ * @param {Object} evt 事件对象
756
+ */
757
+ exportShp(evt)
758
+ {
759
+ this.$emit('exportShp')
760
+ },
761
+
762
+ /**
763
+ * 保存shp
764
+ * @param {Object} evt 事件对象
765
+ */
766
+ saveShp(evt)
767
+ {
768
+ this.$emit('saveShp')
769
+ }
770
+ }
771
+ }
772
+ </script>