bd291794 by jikai

jikai commit

1 parent 54d36ce9
......@@ -5,32 +5,28 @@
"alpha":100,
"children":[
{
"label":"西安市",
"label":"西安市阎良区",
"id":"1-1",
"type":"layerGroup",
"alpha":100,
"children":[{
"label":"行政区划",
"id":"1-1-1",
"name": "testLayer",
"type":"layerGroup",
"alpha":100,
"children":[
{
"label":"行政区界限",
"id":"1-1-1-1",
"type":"layer",
"alpha": 100,
"name": "testLayer",
"layerId":0,
"layerId":20,
"children":null
},
{
"label":"行政区",
"id":"1-1-1-2",
"type":"layer",
"alpha": 100,
"name": "testLayer",
"layerId":1,
"layerId":19,
"children":null
}
]
......@@ -38,25 +34,21 @@
{
"label":"地籍分区",
"id":"1-1-2",
"name": "djfqLayer",
"type":"layerGroup",
"alpha":100,
"children":[
{
"label":"地籍区",
"id":"1-1-2-1",
"type":"layer",
"alpha": 100,
"name": "djfqLayer",
"layerId":0,
"layerId":13,
"children":null
},
{
"label":"地籍子区",
"id":"1-1-2-2",
"type":"layer",
"alpha": 100,
"name": "djfqLayer",
"layerId":1,
"layerId":14,
"children":null
}
]
......@@ -64,96 +56,77 @@
{
"label":"不动产单元",
"id":"1-1-3",
"name": "bdcdyLayer",
"type":"layerGroup",
"alpha":100,
"children":[
{
"label":"线状定着物",
"id":"1-1-3-1",
"type":"layer",
"alpha": 100,
"name": "bdcdyLayer",
"layerId":0,
"layerId":7,
"children":null
},
{
"label":"宗海",
"id":"1-1-3-2",
"type":"layer",
"alpha": 100,
"name": "bdcdyLayer",
"layerId":1,
"layerId":9,
"children":null
},
{
"label":"宗地",
"id":"1-1-3-3",
"type":"layer",
"alpha": 100,
"name": "bdcdyLayer",
"layerId":2,
"layerId":8,
"children":null
},
{
"label":"林权",
"id":"1-1-3-4",
"type":"layer",
"alpha": 100,
"name": "bdcdyLayer",
"layerId":3,
"layerId":5,
"children":null
},
{
"label":"构筑物",
"id":"1-1-3-5",
"type":"layer",
"alpha": 100,
"name": "bdcdyLayer",
"layerId":4,
"layerId":2,
"children":null
},
{
"label":"面状定着物",
"id":"1-1-3-6",
"type":"layer",
"alpha": 100,
"name": "bdcdyLayer",
"layerId":5,
"layerId":6,
"children":null
},
{
"label":"界址线",
"id":"1-1-3-7",
"type":"layer",
"alpha": 100,
"name": "bdcdyLayer",
"layerId":6,
"layerId":4,
"children":null
},
{
"label":"点状定着物",
"id":"1-1-3-8",
"type":"layer",
"alpha": 100,
"name": "bdcdyLayer",
"layerId":7,
"layerId":1,
"children":null
},
{
"label":"自然幢",
"id":"1-1-3-9",
"type":"layer",
"alpha": 100,
"name": "bdcdyLayer",
"layerId":8,
"layerId":10,
"children":null
},
{
"label":"界址点",
"id":"1-1-3-10",
"type":"layer",
"name": "bdcdyLayer",
"layerId":9,
"layerId":4,
"children":null
}
]
......@@ -161,31 +134,28 @@
{
"label":"自然地理",
"id":"1-1-4",
"name": "zrdlLayer",
"type":"layerGroup",
"alpha":100,
"children":[
{
"label":"辅助面",
"id":"1-1-4-1",
"type":"layer",
"name": "zrdlLayer",
"layerId":0,
"layerId":15,
"children":null
},
{
"label":"植被",
"id":"1-1-4-2",
"type":"layer",
"name": "zrdlLayer",
"layerId":1,
"layerId":17,
"children":null
},
{
"label":"水系",
"id":"1-1-4-3",
"type":"layer",
"name": "zrdlLayer",
"layerId":2,
"layerId":16,
"children":null
}
]
......
[{
"layerName": "ZDJBXX",
"layerLabel": "宗地",
"layerUrl": "https://192.168.2.146:6443/arcgis/rest/services/qj/BDCDY/MapServer",
"id":2,
"layerUrl": "https://192.168.2.146:6443/arcgis/rest/services/qj/backupService/MapServer",
"id":8,
"fieldAliases": {
"BSM": "标识码",
"YSDM": "要素代码",
......@@ -39,8 +39,8 @@
{
"layerName": "ZRZ",
"layerLabel": "自然幢",
"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",
"id": 9,
"layerUrl": "https://192.168.2.146:6443/arcgis/rest/services/qj/backupService/MapServer",
"id": 10,
"fieldAliases": {
"YSDM": "要素代码",
"BDCDYH": "不动产单元号",
......@@ -72,8 +72,8 @@
{
"layerName": "DJQ",
"layerLabel": "地籍区",
"layerUrl": "https://192.168.2.146:6443/arcgis/rest/services/qj/DJFQ/MapServer",
"id": 1,
"layerUrl": "https://192.168.2.146:6443/arcgis/rest/services/qj/backupService/MapServer",
"id": 13,
"fieldAliases": {
"BSM": "标识码",
"YSDM": "要素代码",
......@@ -84,8 +84,8 @@
{
"layerName": "DJZQ",
"layerLabel": "地籍子区",
"layerUrl": "https://192.168.2.146:6443/arcgis/rest/services/qj/DJFQ/MapServer",
"id": 0,
"layerUrl": "https://192.168.2.146:6443/arcgis/rest/services/qj/backupService/MapServer",
"id": 14,
"fieldAliases": {
"BSM": "标识码",
"YSDM": "要素代码",
......@@ -96,8 +96,8 @@
{
"layerName": "XJZQ",
"layerLabel": "行政区",
"layerUrl": "https://192.168.2.146:6443/arcgis/rest/services/qj/XZQH/MapServer",
"id": 1,
"layerUrl": "https://192.168.2.146:6443/arcgis/rest/services/qj/backupService/MapServer",
"id": 19,
"fieldAliases": {
"BSM": "标识码",
"YSDM": "要素代码",
......@@ -109,13 +109,13 @@
{
"layerName":"JZD",
"layerLabel":"界址点",
"layerUrl":"https://192.168.2.146:6443/arcgis/rest/services/qj/BDCDY/MapServer",
"id":9
"layerUrl":"https://192.168.2.146:6443/arcgis/rest/services/qj/backupService/MapServer",
"id":3
},
{
"layerName":"JZX",
"layerLabel":"界址线",
"layerUrl":"https://192.168.2.146:6443/arcgis/rest/services/qj/BDCDY/MapServer",
"id":6
"layerUrl":"https://192.168.2.146:6443/arcgis/rest/services/qj/backupService/MapServer",
"id":4
}
]
\ No newline at end of file
......
......@@ -13,18 +13,11 @@
class="row-flex-start basic_banner"
:class="{
active_color: item.expand && item.children.length > 0,
lpb_basic_banner:islpb
}"
@click="itemClick(item)"
>
<div class="layer_text nowrap" @contextmenu.prevent="openMenu($event, item)">
<i v-if="!islpb" class="iconfont iconguoyou"></i>
<i v-if="islpb && !item.expand" class="iconfont iconxiala"></i>
<i v-if="islpb && item.expand" class="iconfont iconxialazhankai"></i>
{{ item.mc }}
</div>
<div
<div class="layer_text nowrap" @contextmenu.prevent="openMenu($event, item)"><i class="iconfont iconguoyou"></i> {{ item.mc }}</div><div
class="reTree_icon"
:style="{
height: 10 + 'px',
......@@ -32,8 +25,10 @@
}"
:class="{
reTree_default_icon: item.children.length === 0,
reTree_collapse_icon: item.expand && item.children.length > 0,
reTree_expand_icon: !item.expand && item.children.length > 0,
reTree_collapse_icon: !islpb && item.expand && item.children.length > 0,
reTree_expand_icon: !islpb && !item.expand && item.children.length > 0,
lpbTree_collapse_icon: islpb && item.expand && item.children.length > 0,
lpbTree_expand_icon: islpb && !item.expand && item.children.length > 0,
}"
></div>
</div>
......@@ -572,7 +567,6 @@ export default {
this.$message.warning("不是临时数据,不能导入图形!!!");
return;
}
console.log(this.zdData);
var type = this.zdData.type;
if(type == "zd"){
BSM = this.zdData.zdbsm;
......
......@@ -459,8 +459,7 @@ export default {
var self = this;
var points = null,lines = null,
layer = self.getLayerByName("ZDJBXX");
// var featureUrl = layer.layerUrl.replace("MapServer","FeatureServer");
var featureUrl = layer.layerUrl;
var featureUrl = layer.layerUrl.replace("MapServer","FeatureServer");
featureUrl += "/"+layer.id;
if(self.geoInfo){
//替换 生成图像 高亮
......@@ -504,8 +503,8 @@ export default {
graphic.attributes = attributes;
self.addGraphic(featureUrl,graphic,function (res) {
var addRresult = res.addFeatureResults[0];
// if(addRresult.objectId){
// var OBJECTID = addRresult.objectId;
if(addRresult.objectId){
var OBJECTID = addRresult.objectId;
if(graphic.geometry) {
points = self.craetJZPoint(graphic);
self.savejzd(points)
......@@ -517,7 +516,7 @@ export default {
}
self.$message.success("保存成功!!!");
self.goMap();
// }
}
});
}
},
......
......@@ -22,8 +22,6 @@ export default {
var featureLayer = new FeatureLayer({
url:url
})
console.log(featureLayer);
console.log(graphic);
var saveGraphics = [];
if(!Array.isArray(graphic)){
graphic = [graphic];
......@@ -45,10 +43,13 @@ export default {
});
saveGraphics.push(saveGraphic);
}
console.log(saveGraphic)
featureLayer.applyEdits({
addFeatures:saveGraphics
addFeatures:saveGraphics,
// updateFeatures
}).then(function (res){
if(callBackFunction && typeof callBackFunction == 'function'){
console.log(res);
callBackFunction(res);
}
})
......@@ -149,6 +150,7 @@ export default {
featureLayer.applyEdits({
deleteFeatures:delGraphics
}).then(function (res){
console.log(res);
if(callBackFunction && typeof callBackFunction == 'function'){
callBackFunction(res);
}
......
......@@ -2,6 +2,8 @@
import {loadCss,loadScript} from "esri-loader"
export function init(){
// loadScript({url:"http://192.168.2.38/4.16/init.js"});
// loadCss("http://192.168.2.38/4.16/esri/themes/light/main.css");
loadScript({ url:"http://192.168.2.146/arcgis_js_api/library/4.17/init.js"});
loadCss("http://192.168.2.146/arcgis_js_api/library/esri/css/main.css");
}
......
......@@ -177,11 +177,7 @@ export default {
data(){
return{
viewId:"testMap",
// 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",
layerUrl: 'https://192.168.2.146:6443/arcgis/rest/services/qj/XZQH/MapServer', // 行政区划
bdcdyUrl: 'https://192.168.2.146:6443/arcgis/rest/services/qj/BDCDY/MapServer', // 不动产单元
djfqUrl: 'https://192.168.2.146:6443/arcgis/rest/services/qj/DJFQ/MapServer', // 地籍分区
zrdlUrl: 'https://192.168.2.146:6443/arcgis/rest/services/qj/JCDL/MapServer', // 自然地理
layerUrl:"https://192.168.2.146:6443/arcgis/rest/services/qj/backupService/MapServer",
dialogVisible:false,
selectResLayerId:null,
features:[],
......@@ -223,37 +219,29 @@ export default {
view.ui.move(["zoom"], "bottom-right");
loadModules([
"esri/layers/MapImageLayer"
]).then(([ MapImageLayer ])=>{
]).then(([
MapImageLayer
])=>{
var mapImageLayer = new MapImageLayer({
url:self.layerUrl,
id:"testLayer",
spatialReference:view.spatialReference
});
view.map.add(mapImageLayer, 1);
let bdcdyLayer = new MapImageLayer({
url:self.bdcdyUrl,
id:"bdcdyLayer",
spatialReference:view.spatialReference
});
view.map.add(bdcdyLayer);
let djfqLayer = new MapImageLayer({
url:self.djfqUrl,
id:"djfqLayer",
visible: false,
spatialReference:view.spatialReference
});
view.map.add(djfqLayer);
let zrdlLayer = new MapImageLayer({
url:self.zrdlUrl,
id:"zrdlLayer",
visible: false,
spatialReference:view.spatialReference
spatialReference:view.spatialReference,
sublayers:[
{
id:19,
visible:true
},
{
id:8,
visible:true
},
{
id:10,
visible:true
}
]
});
view.map.add(zrdlLayer);
view.map.add(mapImageLayer,1);
var query = self.$route.query;
if(query && JSON.stringify(query) != "{}"){
self.addGeoByBsm(query.bsm,query.type,self.viewId);
......@@ -373,7 +361,6 @@ export default {
for(var i = 0;i < data.length;i++){
var layerId = data[i].layerId;
var layer = self.getLayerById(layerId);
var layerResult = self.results.filter(function (item) {
return item.layerId == layerId;
})
......