2aac5d3d by 杨威
2 parents e8a7d7e8 f142be6b
...@@ -608,7 +608,7 @@ export default { ...@@ -608,7 +608,7 @@ export default {
608 exportText(){ 608 exportText(){
609 var self = this; 609 var self = this;
610 var type = this.zdData.type; 610 var type = this.zdData.type;
611 var BSM = type == 'zdt'? this.zdData.zdbsm : this.zdData.bsm; 611 var BSM = type == 'zd'? this.zdData.zdbsm : this.zdData.bsm;
612 this.queryGeoByBsm(BSM,type,function (features){ 612 this.queryGeoByBsm(BSM,type,function (features){
613 if(features && features.length > 0 && features[0].geometry.rings.length > 0){ 613 if(features && features.length > 0 && features[0].geometry.rings.length > 0){
614 var data = features[0]; 614 var data = features[0];
...@@ -637,7 +637,7 @@ export default { ...@@ -637,7 +637,7 @@ export default {
637 exportToShp(){ 637 exportToShp(){
638 var self = this; 638 var self = this;
639 var type = this.zdData.type; 639 var type = this.zdData.type;
640 var BSM = type == 'zdt'? this.zdData.zdbsm : this.zdData.bsm; 640 var BSM = type == 'zd'? this.zdData.zdbsm : this.zdData.bsm;
641 this.queryGeoByBsm(BSM,type,function (features){ 641 this.queryGeoByBsm(BSM,type,function (features){
642 if(features && features.length > 0 && features[0].geometry.rings.length > 0) { 642 if(features && features.length > 0 && features[0].geometry.rings.length > 0) {
643 var data = JSON.stringify(features[0]); 643 var data = JSON.stringify(features[0]);
...@@ -656,7 +656,7 @@ export default { ...@@ -656,7 +656,7 @@ export default {
656 exportExcel(){ 656 exportExcel(){
657 var self = this; 657 var self = this;
658 var type = this.zdData.type; 658 var type = this.zdData.type;
659 var BSM = type == 'zdt'? this.zdData.zdbsm : this.zdData.bsm; 659 var BSM = type == 'zd'? this.zdData.zdbsm : this.zdData.bsm;
660 this.queryGeoByBsm(BSM,type,function (features) { 660 this.queryGeoByBsm(BSM,type,function (features) {
661 if (features && features.length > 0 && features[0].geometry.rings.length > 0) { 661 if (features && features.length > 0 && features[0].geometry.rings.length > 0) {
662 var data = features[0]; 662 var data = features[0];
...@@ -696,7 +696,7 @@ export default { ...@@ -696,7 +696,7 @@ export default {
696 //图形定位 696 //图形定位
697 postionToMap(){ 697 postionToMap(){
698 var type = this.zdData.type; 698 var type = this.zdData.type;
699 var BSM = type == 'zdt'? this.zdData.zdbsm : this.zdData.bsm; 699 var BSM = type == 'zd'? this.zdData.zdbsm : this.zdData.bsm;
700 if(this.$route.path == "/viewMap"){ 700 if(this.$route.path == "/viewMap"){
701 //定位到当前空间位置 701 //定位到当前空间位置
702 // TODO 这个方法只是为了支撑功能 702 // TODO 这个方法只是为了支撑功能
......
...@@ -223,7 +223,7 @@ export default { ...@@ -223,7 +223,7 @@ export default {
223 }) 223 })
224 }, 224 },
225 //保存或者编辑属性信息 225 //保存或者编辑属性信息
226 updAttributes(bsm,type,attributes,callBackFunction){ 226 updAttributes(bsm,type,attributes,callBackFunction,ydybsm){
227 var layer = null; 227 var layer = null;
228 if(type == 'zd'){ 228 if(type == 'zd'){
229 layer = this.getLayerByName("ZDJBXX"); 229 layer = this.getLayerByName("ZDJBXX");
...@@ -232,7 +232,7 @@ export default { ...@@ -232,7 +232,7 @@ export default {
232 } 232 }
233 var featureUrl = layer.layerUrl.replace("MapServer","FeatureServer"); 233 var featureUrl = layer.layerUrl.replace("MapServer","FeatureServer");
234 featureUrl += "/"+layer.id; 234 featureUrl += "/"+layer.id;
235 this.queryGeoByBsm(bsm,type,function (features) { 235 this.queryGeoByBsm(ydybsm ? ydybsm:bsm,type,function (features) {
236 if(features && features.length > 0){ 236 if(features && features.length > 0){
237 attributes.OBJECTID = features[0].attributes.OBJECTID; 237 attributes.OBJECTID = features[0].attributes.OBJECTID;
238 features[0].attributes = attributes; 238 features[0].attributes = attributes;
...@@ -240,6 +240,9 @@ export default { ...@@ -240,6 +240,9 @@ export default {
240 features[0].geometry.spatialReference = { 240 features[0].geometry.spatialReference = {
241 wkt:wkt 241 wkt:wkt
242 }*/ 242 }*/
243 if(ydybsm){
244 features[0].attributes.BSM = ydybsm;
245 }
243 featureUpdate.methods.updateGraphic(featureUrl,features[0],callBackFunction); 246 featureUpdate.methods.updateGraphic(featureUrl,features[0],callBackFunction);
244 }else{ 247 }else{
245 var graphic = { 248 var graphic = {
......
...@@ -183,25 +183,25 @@ ...@@ -183,25 +183,25 @@
183 switch (row.dylx) { 183 switch (row.dylx) {
184 case "zd": 184 case "zd":
185 this.$store.state.zdbsm = row.glbsm; 185 this.$store.state.zdbsm = row.glbsm;
186 this.getRightTree(row.glbsm,'1'); 186 this.getRightTree(row.glbsm,'0,1,2');
187 break; 187 break;
188 case "zrz": 188 case "zrz":
189 this.$store.state.zrzbsm = row.glbsm; 189 this.$store.state.zrzbsm = row.glbsm;
190 this.getTreeByBsm(row.glbsm,row.dylx,'1'); 190 this.getTreeByBsm(row.glbsm,row.dylx,'0,1,2');
191 break; 191 break;
192 case "h": 192 case "h":
193 case "h0": 193 case "h0":
194 case "h1": 194 case "h1":
195 this.$store.state.hbsm = row.glbsm; 195 this.$store.state.hbsm = row.glbsm;
196 this.getTreeByBsm(row.glbsm,'h','1'); 196 this.getTreeByBsm(row.glbsm,'h','0,1,2');
197 break; 197 break;
198 case "dz": 198 case "dz":
199 this.$store.state.dzbsm = row.glbsm; 199 this.$store.state.dzbsm = row.glbsm;
200 this.getTreeByBsm(row.glbsm,row.dylx,'1'); 200 this.getTreeByBsm(row.glbsm,row.dylx,'0,1,2');
201 break; 201 break;
202 case "gzw": 202 case "gzw":
203 this.$store.state.dzbsm = row.glbsm; 203 this.$store.state.dzbsm = row.glbsm;
204 this.getTreeByBsm(row.glbsm,row.dylx,'1'); 204 this.getTreeByBsm(row.glbsm,row.dylx,'0,1,2');
205 break; 205 break;
206 206
207 default: 207 default:
......
...@@ -556,6 +556,9 @@ ...@@ -556,6 +556,9 @@
556 //权利性质数据传给子组件 556 //权利性质数据传给子组件
557 this.$refs.qlxzModule.countList = res.result.list; 557 this.$refs.qlxzModule.countList = res.result.list;
558 }) 558 })
559 if(res.result.ydybsm){
560 this.saveZdGraphicAtrributes(res.result.ydybsm);
561 }
559 } else { 562 } else {
560 this.$nextTick(() => { 563 this.$nextTick(() => {
561 //权利性质数据传给子组件 564 //权利性质数据传给子组件
...@@ -790,8 +793,27 @@ ...@@ -790,8 +793,27 @@
790 vm.loadingHide(); 793 vm.loadingHide();
791 console.log(error); 794 console.log(error);
792 }); 795 });
796 this.saveZdGraphicAtrributes();
797 }
798 }
799 } else {
800 this.$message({
801 // message: item.name+'不能为空',
802 message: '请完善表单后再继续操作',
803 type: "warning",
804 });
805 }
806 })
807
808 },
809 //保存空间图形
810 saveZdGraphicAtrributes(ybsm){
793 //保存到空间库里面 811 //保存到空间库里面
794 var self = this; 812 var self = this;
813 /* var ybsm = null;
814 if(this.ydybsm){
815 ybsm = this.ydybsm;
816 } */
795 for (var key in this.geoAttributes) { 817 for (var key in this.geoAttributes) {
796 if (key == "BSM") { 818 if (key == "BSM") {
797 self.geoAttributes[key] = this.$store.state.zdbsm 819 self.geoAttributes[key] = this.$store.state.zdbsm
...@@ -819,18 +841,7 @@ ...@@ -819,18 +841,7 @@
819 } 841 }
820 self.updAttributes(this.$store.state.zdbsm, 'zd', this.geoAttributes, function (res) { 842 self.updAttributes(this.$store.state.zdbsm, 'zd', this.geoAttributes, function (res) {
821 843
822 }); 844 },ybsm);
823 }
824 }
825 } else {
826 this.$message({
827 // message: item.name+'不能为空',
828 message: '请完善表单后再继续操作',
829 type: "warning",
830 });
831 }
832 })
833
834 }, 845 },
835 inputBlur(e) { 846 inputBlur(e) {
836 if (e.target.value != '') { 847 if (e.target.value != '') {
......
...@@ -567,7 +567,18 @@ ...@@ -567,7 +567,18 @@
567 this.loading=false; 567 this.loading=false;
568 }) 568 })
569 this.loading=false; 569 this.loading=false;
570 570 this.saveGraphicAttributes(); }
571 }else{
572 this.$message({
573 // message: item.name+'不能为空',
574 message: '请完善表单后再继续操作',
575 type: "warning",
576 });
577 }
578 })
579 },
580 //保存空间信息
581 saveGraphicAttributes(ybsm){
571 //保存到空间库里面 582 //保存到空间库里面
572 var self = this; 583 var self = this;
573 for(var key in this.geoAttributes){ 584 for(var key in this.geoAttributes){
...@@ -583,16 +594,7 @@ ...@@ -583,16 +594,7 @@
583 } 594 }
584 self.updAttributes(this.bsm,'zrz',this.geoAttributes,function (res) { 595 self.updAttributes(this.bsm,'zrz',this.geoAttributes,function (res) {
585 console.log("属性保存完成!!"); 596 console.log("属性保存完成!!");
586 }); 597 },ybsm);
587 }
588 }else{
589 this.$message({
590 // message: item.name+'不能为空',
591 message: '请完善表单后再继续操作',
592 type: "warning",
593 });
594 }
595 })
596 }, 598 },
597 onSubmit(){ 599 onSubmit(){
598 let data={ 600 let data={
...@@ -664,6 +666,9 @@ ...@@ -664,6 +666,9 @@
664 getZrzDetailByBsm(data).then((res)=>{ 666 getZrzDetailByBsm(data).then((res)=>{
665 if(res.code===200){ 667 if(res.code===200){
666 this.form=res.result; 668 this.form=res.result;
669 if(res.result.ydybsm){
670 this.saveGraphicAttributes(res.result.ydybsm);
671 }
667 if(res.result.gygyqlrqk!=null){ 672 if(res.result.gygyqlrqk!=null){
668 this.$refs.qlrxxModule.changeGyfs(res.result.gygyqlrqk); 673 this.$refs.qlrxxModule.changeGyfs(res.result.gygyqlrqk);
669 } 674 }
......