gis空间查询 属性查询展示
Showing
11 changed files
with
381 additions
and
28 deletions
| ... | @@ -8,7 +8,7 @@ | ... | @@ -8,7 +8,7 @@ |
| 8 | "fillSymbol": { | 8 | "fillSymbol": { |
| 9 | "defaultSymbol": { | 9 | "defaultSymbol": { |
| 10 | "type": "simple-fill", | 10 | "type": "simple-fill", |
| 11 | "color": [ 0,233, 245, 0.8 ], | 11 | "color": [ 0,233, 245, 0.4 ], |
| 12 | "style": "solid", | 12 | "style": "solid", |
| 13 | "outline": { | 13 | "outline": { |
| 14 | "color": "#00e9f5", | 14 | "color": "#00e9f5", |
| ... | @@ -17,7 +17,7 @@ | ... | @@ -17,7 +17,7 @@ |
| 17 | }, | 17 | }, |
| 18 | "highlightSymbol": { | 18 | "highlightSymbol": { |
| 19 | "type": "simple-fill", | 19 | "type": "simple-fill", |
| 20 | "color": [ 245,3, 37, 0.8 ], | 20 | "color": [ 245,3, 37, 0.4 ], |
| 21 | "style": "solid", | 21 | "style": "solid", |
| 22 | "outline": { | 22 | "outline": { |
| 23 | "color": "#f50325", | 23 | "color": "#f50325", | ... | ... |
| 1 | [{ | 1 | [{ |
| 2 | "layerName": "ZDJBXX", | 2 | "layerName": "ZDJBXX", |
| 3 | "layerLabel": "宗地", | ||
| 3 | "layerUrl": "http://192.168.2.201:6080/arcgis/rest/services/%E4%BA%92%E8%81%94%E7%BD%91%E5%8A%A0%E4%B8%8D%E5%8A%A8%E4%BA%A7/XA_%E4%B8%8D%E5%8A%A8%E4%BA%A7/MapServer", | 4 | "layerUrl": "http://192.168.2.201:6080/arcgis/rest/services/%E4%BA%92%E8%81%94%E7%BD%91%E5%8A%A0%E4%B8%8D%E5%8A%A8%E4%BA%A7/XA_%E4%B8%8D%E5%8A%A8%E4%BA%A7/MapServer", |
| 4 | "id": "8" | 5 | "id":8, |
| 6 | "fieldAliases": { | ||
| 7 | "BSM": "标识码", | ||
| 8 | "YSDM": "要素代码", | ||
| 9 | "ZDDM": "宗地代码", | ||
| 10 | "BDCDYH": "不动产单元号", | ||
| 11 | "ZDTZM": "宗地特征码", | ||
| 12 | "ZL": "坐落", | ||
| 13 | "ZDMJ": "宗地面积", | ||
| 14 | "MJDW": "面积单位", | ||
| 15 | "YT": "用途", | ||
| 16 | "DJ": "等级", | ||
| 17 | "JG": "价格", | ||
| 18 | "QLLX": "权利类型", | ||
| 19 | "QLXZ": "权利性质", | ||
| 20 | "QLSDFS": "权利设定方式", | ||
| 21 | "RJL": "容积率", | ||
| 22 | "JZMD": "建筑密度", | ||
| 23 | "JZXG": "建筑限高", | ||
| 24 | "ZDSZD": "宗地四至-东", | ||
| 25 | "ZDSZN": "宗地四至-南", | ||
| 26 | "ZDSZX": "宗地四至-西", | ||
| 27 | "ZDSZB": "宗地四至-北", | ||
| 28 | "TFH": "图幅号", | ||
| 29 | "DJH": "地籍号", | ||
| 30 | "DAH": "档案号", | ||
| 31 | "BZ": "备注", | ||
| 32 | "ZT": "状态", | ||
| 33 | "YWZT": "业务状态", | ||
| 34 | "XMMC": "项目名称", | ||
| 35 | "BGRQ": "变更日期", | ||
| 36 | "TDZH": "土地证号" | ||
| 37 | } | ||
| 5 | }, | 38 | }, |
| 6 | { | 39 | { |
| 7 | "layerName": "ZRZ", | 40 | "layerName": "ZRZ", |
| 41 | "layerLabel": "自然幢", | ||
| 8 | "layerUrl": "http://192.168.2.201:6080/arcgis/rest/services/%E4%BA%92%E8%81%94%E7%BD%91%E5%8A%A0%E4%B8%8D%E5%8A%A8%E4%BA%A7/XA_%E4%B8%8D%E5%8A%A8%E4%BA%A7/MapServer", | 42 | "layerUrl": "http://192.168.2.201:6080/arcgis/rest/services/%E4%BA%92%E8%81%94%E7%BD%91%E5%8A%A0%E4%B8%8D%E5%8A%A8%E4%BA%A7/XA_%E4%B8%8D%E5%8A%A8%E4%BA%A7/MapServer", |
| 9 | "id": "10" | 43 | "id": 10, |
| 44 | "fieldAliases": { | ||
| 45 | "YSDM": "要素代码", | ||
| 46 | "BDCDYH": "不动产单元号", | ||
| 47 | "ZDDM": "宗地代码", | ||
| 48 | "ZRZH": "自然幢号", | ||
| 49 | "XMMC": "项目名称", | ||
| 50 | "JZWMC": "建筑物名称", | ||
| 51 | "JGRQ": "竣工日期", | ||
| 52 | "JZWGD": "建筑物高度", | ||
| 53 | "ZZDMJ": "幢占地面积", | ||
| 54 | "ZYDMJ": "幢用地面积", | ||
| 55 | "YCJZMJ": "预测建筑面积", | ||
| 56 | "SCJZMJ": "实测建筑面积", | ||
| 57 | "ZCS": "总层数", | ||
| 58 | "DSCS": "地上层数", | ||
| 59 | "DXCS": "地下层数", | ||
| 60 | "DXSD": "地下深度", | ||
| 61 | "GHYT": "规划用途", | ||
| 62 | "FWJG": "房屋结构", | ||
| 63 | "ZTS": "总套数", | ||
| 64 | "JZWJBYT": "建筑物基本用途", | ||
| 65 | "DAH": "档案号", | ||
| 66 | "BZ": "备注", | ||
| 67 | "ZT": "状态", | ||
| 68 | "YWZT": "业务状态", | ||
| 69 | "BSM": "标识码" | ||
| 70 | } | ||
| 10 | }, | 71 | }, |
| 11 | { | 72 | { |
| 12 | "layerName": "DJQ", | 73 | "layerName": "DJQ", |
| 74 | "layerLabel": "地籍区", | ||
| 13 | "layerUrl": "http://192.168.2.201:6080/arcgis/rest/services/%E4%BA%92%E8%81%94%E7%BD%91%E5%8A%A0%E4%B8%8D%E5%8A%A8%E4%BA%A7/XA_%E4%B8%8D%E5%8A%A8%E4%BA%A7/MapServer", | 75 | "layerUrl": "http://192.168.2.201:6080/arcgis/rest/services/%E4%BA%92%E8%81%94%E7%BD%91%E5%8A%A0%E4%B8%8D%E5%8A%A8%E4%BA%A7/XA_%E4%B8%8D%E5%8A%A8%E4%BA%A7/MapServer", |
| 14 | "id": "13" | 76 | "id": 13, |
| 77 | "fieldAliases": { | ||
| 78 | "BSM": "标识码", | ||
| 79 | "YSDM": "要素代码", | ||
| 80 | "DJQDM": "地籍区代码", | ||
| 81 | "DJQMC": "地籍区名称" | ||
| 82 | } | ||
| 15 | }, | 83 | }, |
| 16 | { | 84 | { |
| 17 | "layerName": "DJZQ", | 85 | "layerName": "DJZQ", |
| 86 | "layerLabel": "地籍子区", | ||
| 18 | "layerUrl": "http://192.168.2.201:6080/arcgis/rest/services/%E4%BA%92%E8%81%94%E7%BD%91%E5%8A%A0%E4%B8%8D%E5%8A%A8%E4%BA%A7/XA_%E4%B8%8D%E5%8A%A8%E4%BA%A7/MapServer", | 87 | "layerUrl": "http://192.168.2.201:6080/arcgis/rest/services/%E4%BA%92%E8%81%94%E7%BD%91%E5%8A%A0%E4%B8%8D%E5%8A%A8%E4%BA%A7/XA_%E4%B8%8D%E5%8A%A8%E4%BA%A7/MapServer", |
| 19 | "id": "14" | 88 | "id": 14, |
| 89 | "fieldAliases": { | ||
| 90 | "BSM": "标识码", | ||
| 91 | "YSDM": "要素代码", | ||
| 92 | "DJZQDM": "地籍子区代码", | ||
| 93 | "DJZQMC": "地籍子区名称" | ||
| 94 | } | ||
| 20 | }, | 95 | }, |
| 21 | { | 96 | { |
| 22 | "layerName": "XJZQ", | 97 | "layerName": "XJZQ", |
| 98 | "layerLabel": "行政区", | ||
| 23 | "layerUrl": "http://192.168.2.201:6080/arcgis/rest/services/%E4%BA%92%E8%81%94%E7%BD%91%E5%8A%A0%E4%B8%8D%E5%8A%A8%E4%BA%A7/XA_%E4%B8%8D%E5%8A%A8%E4%BA%A7/MapServer", | 99 | "layerUrl": "http://192.168.2.201:6080/arcgis/rest/services/%E4%BA%92%E8%81%94%E7%BD%91%E5%8A%A0%E4%B8%8D%E5%8A%A8%E4%BA%A7/XA_%E4%B8%8D%E5%8A%A8%E4%BA%A7/MapServer", |
| 24 | "id": "19" | 100 | "id": 19, |
| 101 | "fieldAliases": { | ||
| 102 | "BSM": "标识码", | ||
| 103 | "YSDM": "要素代码", | ||
| 104 | "XZQDM": "行政区代码", | ||
| 105 | "XZQMC": "行政区名称", | ||
| 106 | "XZQMJ": "行政区面积" | ||
| 107 | } | ||
| 108 | |||
| 25 | } | 109 | } |
| 26 | ] | 110 | ] |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -6,6 +6,7 @@ import layers from '@/assets/json/layers.json' | ... | @@ -6,6 +6,7 @@ import layers from '@/assets/json/layers.json' |
| 6 | import queryUtils from "@libs/map/queryUtils"; | 6 | import queryUtils from "@libs/map/queryUtils"; |
| 7 | import identifyUtils from '@/libs/map/IdentifyUtils' | 7 | import identifyUtils from '@/libs/map/IdentifyUtils' |
| 8 | import {loadModules} from "esri-loader" | 8 | import {loadModules} from "esri-loader" |
| 9 | import featureUpdate from "@libs/map/featureUpdate"; | ||
| 9 | import arcgisParser from 'terraformer-arcgis-parser' | 10 | import arcgisParser from 'terraformer-arcgis-parser' |
| 10 | import wktParse from 'terraformer-wkt-parser' | 11 | import wktParse from 'terraformer-wkt-parser' |
| 11 | 12 | ||
| ... | @@ -199,11 +200,38 @@ export default { | ... | @@ -199,11 +200,38 @@ export default { |
| 199 | if(callBacFunction && typeof callBacFunction == "function"){ | 200 | if(callBacFunction && typeof callBacFunction == "function"){ |
| 200 | callBacFunction(isJoint,message); | 201 | callBacFunction(isJoint,message); |
| 201 | } | 202 | } |
| 202 | }) | 203 | },true) |
| 203 | }).catch(err => { | 204 | }).catch(err => { |
| 204 | console.log(err); | 205 | console.log(err); |
| 205 | throw (err); | 206 | throw (err); |
| 206 | }) | 207 | }) |
| 208 | }, | ||
| 209 | //保存或者编辑属性信息 | ||
| 210 | updAttributes(bsm,type,attributes,callBackFunction){ | ||
| 211 | var layer = null; | ||
| 212 | if(type == 'zd'){ | ||
| 213 | layer = this.getLayerByName("ZDJBXX"); | ||
| 214 | }else{ | ||
| 215 | layer = this.getLayerByName("ZRZ"); | ||
| 216 | } | ||
| 217 | var featureUrl = layer.layerUrl.replace("MapServer","FeatureServer"); | ||
| 218 | featureUrl += "/"+layer.id; | ||
| 219 | this.queryGeoByBsm(bsm,type,function (features) { | ||
| 220 | if(features && features.length > 0){ | ||
| 221 | attributes.OBJECTID = features[0].attributes.OBJECTID; | ||
| 222 | features[0].attributes = attributes; | ||
| 223 | var wkt = "PROJCS[\"XADFZBX\",GEOGCS[\"GCS_WGS_1984\",DATUM[\"D_WGS_1984\",SPHEROID[\"WGS_1984\",6378137.0,298.257223563]],PRIMEM[\"Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"False_Easting\",0.0],PARAMETER[\"False_Northing\",0.0],PARAMETER[\"Central_Meridian\",0.0],PARAMETER[\"Scale_Factor\",1.0],PARAMETER[\"Latitude_Of_Origin\",0.0],UNIT[\"Meter\",1.0]]"; | ||
| 224 | features[0].geometry.spatialReference = { | ||
| 225 | wkt:wkt | ||
| 226 | } | ||
| 227 | featureUpdate.methods.updateGraphic(featureUrl,features[0],callBackFunction); | ||
| 228 | }else{ | ||
| 229 | var graphic = { | ||
| 230 | attributes:attributes | ||
| 231 | } | ||
| 232 | featureUpdate.methods.addGraphic(featureUrl,graphic,callBackFunction) ; | ||
| 233 | } | ||
| 234 | }); | ||
| 207 | } | 235 | } |
| 208 | 236 | ||
| 209 | } | 237 | } | ... | ... |
| ... | @@ -3,7 +3,7 @@ import {loadModules} from 'esri-loader' | ... | @@ -3,7 +3,7 @@ import {loadModules} from 'esri-loader' |
| 3 | export default { | 3 | export default { |
| 4 | methods: { | 4 | methods: { |
| 5 | 5 | ||
| 6 | identify(url,layerIds,geometry ,callBackFunction){ | 6 | identify(url,layerIds,geometry,callBackFunction,returnGeometry,layerOption,tolerance,mapExtent){ |
| 7 | var self = this; | 7 | var self = this; |
| 8 | loadModules([ | 8 | loadModules([ |
| 9 | "esri/tasks/IdentifyTask", | 9 | "esri/tasks/IdentifyTask", |
| ... | @@ -20,10 +20,11 @@ export default { | ... | @@ -20,10 +20,11 @@ export default { |
| 20 | if(layerIds){ | 20 | if(layerIds){ |
| 21 | identifyParameters.layerIds = layerIds; | 21 | identifyParameters.layerIds = layerIds; |
| 22 | } | 22 | } |
| 23 | identifyParameters.layerOption = "all"; | 23 | identifyParameters.layerOption = layerOption ? layerOption : "all"; |
| 24 | identifyParameters.tolerance = 3; | 24 | identifyParameters.tolerance = tolerance ? tolerance : 3; |
| 25 | identifyParameters.mapExtent = geometry.extent; | 25 | identifyParameters.mapExtent = mapExtent ? mapExtent : geometry.extent; |
| 26 | identifyParameters.returnGeometry = true; | 26 | identifyParameters.returnGeometry = returnGeometry ? returnGeometry : false; |
| 27 | //identifyParameters.returnFieldName = false; | ||
| 27 | identifyParameters.spatialReference = geometry.spatialReference; | 28 | identifyParameters.spatialReference = geometry.spatialReference; |
| 28 | identifyTask.execute(identifyParameters).then(result => { | 29 | identifyTask.execute(identifyParameters).then(result => { |
| 29 | if(callBackFunction && typeof callBackFunction == 'function'){ | 30 | if(callBackFunction && typeof callBackFunction == 'function'){ | ... | ... |
| ... | @@ -87,15 +87,36 @@ export default { | ... | @@ -87,15 +87,36 @@ export default { |
| 87 | }, | 87 | }, |
| 88 | delGraphic(url,graphic,callBackFunction){ | 88 | delGraphic(url,graphic,callBackFunction){ |
| 89 | loadModules([ | 89 | loadModules([ |
| 90 | "esri/layers/FeatureLayer" | 90 | "esri/layers/FeatureLayer", |
| 91 | "esri/Graphic", | ||
| 92 | "esri/geometry/Point", | ||
| 93 | "esri/geometry/Polygon", | ||
| 94 | "esri/geometry/Polyline" | ||
| 91 | ]).then(([ | 95 | ]).then(([ |
| 92 | FeatureLayer | 96 | FeatureLayer, |
| 97 | Graphic, | ||
| 98 | Point, | ||
| 99 | Polygon, | ||
| 100 | Polyline | ||
| 93 | ])=>{ | 101 | ])=>{ |
| 94 | var featureLayer = new FeatureLayer({ | 102 | var featureLayer = new FeatureLayer({ |
| 95 | url:url | 103 | url:url |
| 96 | }) | 104 | }) |
| 105 | var geo = null; | ||
| 106 | if(graphic.geometry.type == 'point'){ | ||
| 107 | geo = new Point(graphic.geometry); | ||
| 108 | }else if(graphic.geometry.type == 'polyline'){ | ||
| 109 | geo = new Polyline(graphic.geometry); | ||
| 110 | }else if(graphic.geometry.type == 'polygon'){ | ||
| 111 | geo = new Polygon(graphic.geometry); | ||
| 112 | } | ||
| 113 | var delGraphic = new Graphic({ | ||
| 114 | attributes:graphic.attributes, | ||
| 115 | geometry:geo | ||
| 116 | }); | ||
| 117 | |||
| 97 | featureLayer.applyEdits({ | 118 | featureLayer.applyEdits({ |
| 98 | deleteFeatures:[graphic] | 119 | deleteFeatures:[delGraphic] |
| 99 | }).then(function (res){ | 120 | }).then(function (res){ |
| 100 | if(callBackFunction && typeof callBackFunction == 'function'){ | 121 | if(callBackFunction && typeof callBackFunction == 'function'){ |
| 101 | callBackFunction(res); | 122 | callBackFunction(res); | ... | ... |
src/libs/map/findTask.js
0 → 100644
| 1 | import {loadModules} from 'esri-loader' | ||
| 2 | |||
| 3 | export default { | ||
| 4 | |||
| 5 | methods:{ | ||
| 6 | findByPro(url,layerIds,searchFields,searchText,returnGeometry,callBackFunction){ | ||
| 7 | loadModules([ | ||
| 8 | "esri/tasks/FindTask", | ||
| 9 | "esri/tasks/support/FindParameters" | ||
| 10 | ]).then(([ | ||
| 11 | FindTask, | ||
| 12 | FindParameters | ||
| 13 | ]) => { | ||
| 14 | var findTask = new FindTask({ | ||
| 15 | url:url | ||
| 16 | }), | ||
| 17 | findParameters = new FindParameters(); | ||
| 18 | findParameters.returnGeometry = returnGeometry ? returnGeometry : false; | ||
| 19 | findParameters.layerIds = layerIds; | ||
| 20 | findParameters.searchFields = searchFields; | ||
| 21 | findParameters.searchText = searchText; | ||
| 22 | findTask.execute(findParameters).then(function (result) { | ||
| 23 | if(callBackFunction){ | ||
| 24 | callBackFunction(result); | ||
| 25 | } | ||
| 26 | }); | ||
| 27 | }).catch(err => { | ||
| 28 | throw (err); | ||
| 29 | }) | ||
| 30 | |||
| 31 | } | ||
| 32 | |||
| 33 | } | ||
| 34 | } | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
This diff is collapsed.
Click to expand it.
| ... | @@ -50,7 +50,7 @@ export default { | ... | @@ -50,7 +50,7 @@ export default { |
| 50 | layer = new GraphicsLayer({ | 50 | layer = new GraphicsLayer({ |
| 51 | id:"highlightLayer" | 51 | id:"highlightLayer" |
| 52 | }) | 52 | }) |
| 53 | view.map.add(layer); | 53 | view.map.add(layer,5); |
| 54 | } | 54 | } |
| 55 | var symbol = graphicSymbol.fillSymbol.highlightSymbol; | 55 | var symbol = graphicSymbol.fillSymbol.highlightSymbol; |
| 56 | var graphic = features[0]; | 56 | var graphic = features[0]; |
| ... | @@ -66,6 +66,61 @@ export default { | ... | @@ -66,6 +66,61 @@ export default { |
| 66 | } | 66 | } |
| 67 | }); | 67 | }); |
| 68 | }, | 68 | }, |
| 69 | 69 | //将查询结果展示在地图上 | |
| 70 | addSearchResultToMap(searchResult,viewId){ | ||
| 71 | var view = maps[viewId], | ||
| 72 | self = this; | ||
| 73 | loadModules([ | ||
| 74 | "esri/layers/GraphicsLayer" | ||
| 75 | ]).then(([ | ||
| 76 | GraphicsLayer | ||
| 77 | ]) => { | ||
| 78 | if(!searchResult || searchResult.length == 0){ | ||
| 79 | return; | ||
| 80 | } | ||
| 81 | for(var i = 0;i < searchResult.length;i++){ | ||
| 82 | var layer = view.map.findLayerById("searchResult"+searchResult.layerName); | ||
| 83 | if(layer){ | ||
| 84 | layer.removeAll(); | ||
| 85 | }else{ | ||
| 86 | layer = new GraphicsLayer({ | ||
| 87 | id:"searchResult"+searchResult.layerName | ||
| 88 | }) | ||
| 89 | view.map.add(layer); | ||
| 90 | } | ||
| 91 | var symbol = graphicSymbol.fillSymbol.highlightSymbol; | ||
| 92 | var features = searchResult[i].features; | ||
| 93 | for(var j = 0;j < features.length;j++){ | ||
| 94 | features[j].symbol = symbol; | ||
| 95 | layer.add(features[j]); | ||
| 96 | } | ||
| 97 | } | ||
| 98 | }).catch(err=>{ | ||
| 99 | console.log(err); | ||
| 100 | }) | ||
| 101 | }, | ||
| 102 | //缩放至当前对象 | ||
| 103 | extentToGraphic(feature,highlightGraohic,viewId,callBackFunction){ | ||
| 104 | var symbol = graphicSymbol.fillSymbol.highlightSymbol; | ||
| 105 | var highlightSymbol = graphicSymbol.fillSymbol.defaultSymbol; | ||
| 106 | if(highlightGraohic){ | ||
| 107 | highlightGraohic.symbol = symbol; | ||
| 108 | } | ||
| 109 | feature.symbol = highlightSymbol; | ||
| 110 | var view = maps[viewId]; | ||
| 111 | view.center = feature.geometry.type == 'point' ? feature.geometry : feature.geometry.extent.center; | ||
| 112 | if(callBackFunction && typeof callBackFunction == 'function'){ | ||
| 113 | callBackFunction(); | ||
| 114 | } | ||
| 115 | }, | ||
| 116 | clearSearchLayer(viewId){ | ||
| 117 | var view = maps[viewId], | ||
| 118 | layers = view.map.allLayers; | ||
| 119 | layers.filter(function (item) { | ||
| 120 | if(item.id.indexOf("searchResult") != -1){ | ||
| 121 | item.removeAll(); | ||
| 122 | } | ||
| 123 | }); | ||
| 124 | } | ||
| 70 | } | 125 | } |
| 71 | } | 126 | } |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -29,7 +29,11 @@ export default { | ... | @@ -29,7 +29,11 @@ export default { |
| 29 | mixins:[draw,identifyUtils,measure], | 29 | mixins:[draw,identifyUtils,measure], |
| 30 | data(){ | 30 | data(){ |
| 31 | return{ | 31 | return{ |
| 32 | url:"" | 32 | url:"http://192.168.2.201:6080/arcgis/rest/services/%E4%BA%92%E8%81%94%E7%BD%91%E5%8A%A0%E4%B8%8D%E5%8A%A8%E4%BA%A7/XA_%E4%B8%8D%E5%8A%A8%E4%BA%A7/MapServer", |
| 33 | selectResLayerId:"", | ||
| 34 | features:[], | ||
| 35 | resultLayers:[], | ||
| 36 | results:[] | ||
| 33 | } | 37 | } |
| 34 | }, | 38 | }, |
| 35 | methods:{ | 39 | methods:{ |
| ... | @@ -51,11 +55,16 @@ export default { | ... | @@ -51,11 +55,16 @@ export default { |
| 51 | var view = maps[this.viewId]; | 55 | var view = maps[this.viewId]; |
| 52 | var self = this; | 56 | var self = this; |
| 53 | this.initDraw("point",this.viewId,null,function(geo){ | 57 | this.initDraw("point",this.viewId,null,function(geo){ |
| 54 | self.identify(self.url,[],geo,function(result){ | 58 | self.identify(self.url,[8,10],geo,function(res){ |
| 55 | debugger | 59 | var resultes = res.results; |
| 56 | }); | 60 | if(resultes && resultes.length > 0){ |
| 61 | self.$parent.delIdentifyData(resultes); | ||
| 62 | self.$parent.dialogVisible = true; | ||
| 63 | } | ||
| 64 | },true,'all',3,view.extent); | ||
| 57 | }); | 65 | }); |
| 58 | }, | 66 | }, |
| 67 | |||
| 59 | zoomOut(){ | 68 | zoomOut(){ |
| 60 | var view = maps[this.viewId]; | 69 | var view = maps[this.viewId]; |
| 61 | this.initDraw("rectangle",this.viewId,null,function(geo){ | 70 | this.initDraw("rectangle",this.viewId,null,function(geo){ | ... | ... |
| ... | @@ -108,7 +108,7 @@ | ... | @@ -108,7 +108,7 @@ |
| 108 | <td colspan="2">宗地代码<i class="requisite">*</i></td> | 108 | <td colspan="2">宗地代码<i class="requisite">*</i></td> |
| 109 | <td colspan="4" class="psr"> | 109 | <td colspan="4" class="psr"> |
| 110 | <input :disabled="formData.qszt!='0'" maxlength="19" | 110 | <input :disabled="formData.qszt!='0'" maxlength="19" |
| 111 | type="text" | 111 | type="text" |
| 112 | class="formInput percent80" | 112 | class="formInput percent80" |
| 113 | v-model="formData.zddm" | 113 | v-model="formData.zddm" |
| 114 | /> | 114 | /> |
| ... | @@ -141,7 +141,7 @@ | ... | @@ -141,7 +141,7 @@ |
| 141 | <td colspan="2">项目名称</td> | 141 | <td colspan="2">项目名称</td> |
| 142 | <td colspan="4" class="psr"> | 142 | <td colspan="4" class="psr"> |
| 143 | <input :disabled="formData.qszt!='0'" | 143 | <input :disabled="formData.qszt!='0'" |
| 144 | type="text" | 144 | type="text" |
| 145 | class="formInput " | 145 | class="formInput " |
| 146 | v-model="formData.xmmc" | 146 | v-model="formData.xmmc" |
| 147 | /> | 147 | /> |
| ... | @@ -225,14 +225,14 @@ | ... | @@ -225,14 +225,14 @@ |
| 225 | </td> | 225 | </td> |
| 226 | <td colspan="2"> | 226 | <td colspan="2"> |
| 227 | <input | 227 | <input |
| 228 | type="text" | 228 | type="text" |
| 229 | v-model="jzmd" :disabled="formData.qszt!='0'" | 229 | v-model="jzmd" :disabled="formData.qszt!='0'" |
| 230 | v-show="isInterval(formData.jyjzmd)" | 230 | v-show="isInterval(formData.jyjzmd)" |
| 231 | class="formInput percent47" | 231 | class="formInput percent47" |
| 232 | /> | 232 | /> |
| 233 | <span class="percent4" v-show="isInterval(formData.jyjzmd)">-</span> | 233 | <span class="percent4" v-show="isInterval(formData.jyjzmd)">-</span> |
| 234 | <input | 234 | <input |
| 235 | type="text" | 235 | type="text" |
| 236 | v-model="formData.jzmd" :disabled="formData.qszt!='0'" | 236 | v-model="formData.jzmd" :disabled="formData.qszt!='0'" |
| 237 | :class="isInterval(formData.jyjzmd) ? 'formInput percent47' : 'formInput'" | 237 | :class="isInterval(formData.jyjzmd) ? 'formInput percent47' : 'formInput'" |
| 238 | /> | 238 | /> |
| ... | @@ -349,6 +349,8 @@ | ... | @@ -349,6 +349,8 @@ |
| 349 | <script> | 349 | <script> |
| 350 | import Qlr from "../../../components/formMenu/qlr"; | 350 | import Qlr from "../../../components/formMenu/qlr"; |
| 351 | import Qlxz from "../../../components/formMenu/qlxz"; | 351 | import Qlxz from "../../../components/formMenu/qlxz"; |
| 352 | import {submit} from "../../../api/common" | ||
| 353 | import geoUtils from "@components/lineTree/tx/js/geoUtils"; | ||
| 352 | import { | 354 | import { |
| 353 | getAllList, | 355 | getAllList, |
| 354 | getDdicByMC, | 356 | getDdicByMC, |
| ... | @@ -410,9 +412,55 @@ export default { | ... | @@ -410,9 +412,55 @@ export default { |
| 410 | formData: {}, | 412 | formData: {}, |
| 411 | dpdm:'', //宗地底盘代码 | 413 | dpdm:'', //宗地底盘代码 |
| 412 | curZdbsm:'', | 414 | curZdbsm:'', |
| 415 | geoAttributes:{ | ||
| 416 | OBJECTID:"", | ||
| 417 | BSM:"", | ||
| 418 | YSDM:"", | ||
| 419 | ZDDM:"", | ||
| 420 | BDCDYH:"", | ||
| 421 | ZDTZM :"", | ||
| 422 | ZL:"", | ||
| 423 | ZDMJ:0, | ||
| 424 | MJDW:"", | ||
| 425 | YT:"", | ||
| 426 | DJ:"", | ||
| 427 | JG:0, | ||
| 428 | QLLX:"", | ||
| 429 | QLXZ:"", | ||
| 430 | QLSDFS:"", | ||
| 431 | RJL:0, | ||
| 432 | JZMD:0, | ||
| 433 | JZXG:0, | ||
| 434 | ZDSZD:"", | ||
| 435 | ZDSZN :"", | ||
| 436 | ZDSZX :"", | ||
| 437 | ZDSZB :"", | ||
| 438 | TFH:"", | ||
| 439 | DJH:"", | ||
| 440 | DAH:"", | ||
| 441 | BZ :"", | ||
| 442 | ZT:"", | ||
| 443 | YWZT:"", | ||
| 444 | BLID:"", | ||
| 445 | XMMC:"", | ||
| 446 | XMID:"", | ||
| 447 | BGRQ:"", | ||
| 448 | BGID:"", | ||
| 449 | BGZT:"", | ||
| 450 | TDZH:"", | ||
| 451 | QSZT:0, | ||
| 452 | BBLX:0, | ||
| 453 | SFDB:0, | ||
| 454 | QLR :"", | ||
| 455 | CUTID:"", | ||
| 456 | BHQKID:"", | ||
| 457 | DJZQDM :"", | ||
| 458 | SYQLXID:"", | ||
| 459 | } | ||
| 413 | }; | 460 | }; |
| 414 | }, | 461 | }, |
| 415 | created() { | 462 | mixins:[geoUtils], |
| 463 | created() { | ||
| 416 | this.curZdbsm = this.$route.query.bsm; | 464 | this.curZdbsm = this.$route.query.bsm; |
| 417 | }, | 465 | }, |
| 418 | mounted() { | 466 | mounted() { |
| ... | @@ -612,6 +660,26 @@ export default { | ... | @@ -612,6 +660,26 @@ export default { |
| 612 | } | 660 | } |
| 613 | }) | 661 | }) |
| 614 | .catch((error) => {}); | 662 | .catch((error) => {}); |
| 663 | //保存到空间库里面 | ||
| 664 | var self = this; | ||
| 665 | for(var key in this.geoAttributes){ | ||
| 666 | if(key == "BSM"){ | ||
| 667 | self.geoAttributes[key] = this.$store.state.zdbsm | ||
| 668 | }else if(key == 'QLSDFS'){ | ||
| 669 | var qlsdfsList = self.$store.state.qlsdfsList,value = self.formData.qlsdfs; | ||
| 670 | var qlsdfs = qlsdfsList.filter(item => { | ||
| 671 | return item.bsm == value; | ||
| 672 | }) | ||
| 673 | self.geoAttributes[key] = qlsdfs[0] ? qlsdfs[0].mc:""; | ||
| 674 | }else { | ||
| 675 | var formKay = key.toLowerCase(); | ||
| 676 | self.geoAttributes[key] = self.formData[formKay]; | ||
| 677 | } | ||
| 678 | } | ||
| 679 | self.updAttributes(this.$store.state.zdbsm,'zd',this.geoAttributes,function (res) { | ||
| 680 | console.log("属性保存完成!!"); | ||
| 681 | }); | ||
| 682 | |||
| 615 | } | 683 | } |
| 616 | 684 | ||
| 617 | 685 | ||
| ... | @@ -719,7 +787,7 @@ export default { | ... | @@ -719,7 +787,7 @@ export default { |
| 719 | this.$store.state.zddm = val; | 787 | this.$store.state.zddm = val; |
| 720 | }, | 788 | }, |
| 721 | zdbsm:function (val) { | 789 | zdbsm:function (val) { |
| 722 | this.getZdjbxxData(val) | 790 | this.getZdjbxxData(val) |
| 723 | this.curZdbsm = val; | 791 | this.curZdbsm = val; |
| 724 | } | 792 | } |
| 725 | }, | 793 | }, | ... | ... |
| ... | @@ -353,6 +353,45 @@ | ... | @@ -353,6 +353,45 @@ |
| 353 | fwjgTitleRowspan:1, //房屋结构的单元格垂直合并数量 | 353 | fwjgTitleRowspan:1, //房屋结构的单元格垂直合并数量 |
| 354 | loading:false, | 354 | loading:false, |
| 355 | source:'', | 355 | source:'', |
| 356 | geoAttributes:{ | ||
| 357 | OBJECTID:null, | ||
| 358 | YSDM:"", | ||
| 359 | BDCDYH:"", | ||
| 360 | ZDDM:"", | ||
| 361 | ZRZH:"", | ||
| 362 | XMMC:"", | ||
| 363 | JZWMC:"", | ||
| 364 | JGRQ:"", | ||
| 365 | JZWGD:"", | ||
| 366 | ZZDMJ:0, | ||
| 367 | ZYDMJ:0, | ||
| 368 | YCJZMJ:0, | ||
| 369 | SCJZMJ:0, | ||
| 370 | ZCS:0, | ||
| 371 | DSCS:0, | ||
| 372 | DXCS:0, | ||
| 373 | DXSD:0, | ||
| 374 | GHYT:"", | ||
| 375 | FWJG:"", | ||
| 376 | ZTS:0, | ||
| 377 | JZWJBYT:"", | ||
| 378 | DAH:"", | ||
| 379 | BZ:"", | ||
| 380 | ZT:"", | ||
| 381 | YWZT:"", | ||
| 382 | BLID:"", | ||
| 383 | XMID:"", | ||
| 384 | BGZT:"", | ||
| 385 | BGRQ:"", | ||
| 386 | BGID:"", | ||
| 387 | BBLX:"", | ||
| 388 | QSZT:"", | ||
| 389 | CUTID :"", | ||
| 390 | BHQKID:"", | ||
| 391 | DJZQDM:"", | ||
| 392 | ZDTZM:"", | ||
| 393 | BSM:"", | ||
| 394 | } | ||
| 356 | } | 395 | } |
| 357 | }, | 396 | }, |
| 358 | methods: { | 397 | methods: { |
| ... | @@ -421,6 +460,20 @@ | ... | @@ -421,6 +460,20 @@ |
| 421 | }) | 460 | }) |
| 422 | this.loading=false; | 461 | this.loading=false; |
| 423 | } | 462 | } |
| 463 | |||
| 464 | //保存到空间库里面 | ||
| 465 | var self = this; | ||
| 466 | for(var key in this.geoAttributes){ | ||
| 467 | if(key == "BSM"){ | ||
| 468 | self.geoAttributes[key] = this.bsm | ||
| 469 | }else{ | ||
| 470 | var formKay = key.toLowerCase(); | ||
| 471 | self.geoAttributes[key] = self.formData[formKay]; | ||
| 472 | } | ||
| 473 | } | ||
| 474 | self.updAttributes(this.bsm,'zrz',this.geoAttributes,function (res) { | ||
| 475 | console.log("属性保存完成!!"); | ||
| 476 | }); | ||
| 424 | } | 477 | } |
| 425 | 478 | ||
| 426 | }, | 479 | }, | ... | ... |
-
Please register or sign in to post a comment