9f16b523 by 焦泽平
2 parents aee9af55 f326cbb9
No preview for this file type
1 [属性描述]
2 格式版本号=1.0
3 数据产生单位=国土资源信息中心
4 数据产生日期=2013-06-06
5 坐标系=80国家大地坐标系
6 几度分带=3
7 投影类型=高斯克吕格
8 计量单位=米
9 带号=36
10 精度=0.01
11 转换参数=0,0,0,0,0,0,0
12 [地块坐标]
13 24,0.2208,1,南州村0076地块,面,,土地开垦,,@
14 J1,1,2463703.8585,36531532.3508
15 J2,1,2463702.9272,36531526.0600
16 J3,1,2463703.0435,36531520.8176
17 J4,1,2463705.0225,36531515.5752
18 J5,1,2463711.3086,36531507.3037
19 J6,1,2463721.4852,36531497.3517
20 J7,1,2463734.8724,36531483.0222
21 J8,1,2463742.5555,36531476.2652
22 J9,1,2463753.2985,36531471.8972
23 J10,1,2463761.7966,36531467.0041
24 J11,1,2463762.1610,36531466.5756
25 J12,1,2463761.8898,36531473.4882
26 J13,1,2463758.4897,36531483.3309
27 J14,1,2463754.5525,36531495.4999
28 J15,1,2463753.2146,36531498.4235
29 J16,1,2463738.9903,36531524.8811
30 J17,1,2463732.0653,36531534.9303
31 J18,1,2463730.6173,36531539.4498
32 J19,1,2463725.3825,36531545.7865
33 J20,1,2463723.4140,36531550.0816
34 J21,1,2463722.7101,36531553.4604
35 J22,1,2463721.4368,36531552.6210
36 J23,1,2463710.3776,36531540.9715
37 J24,1,2463703.8585,36531532.3508
38 12,0.0190,2,南洲林场0003地块,面,,土地开垦,,@
39 J1,1,2463808.0212,36532005.7911
40 J2,1,2463804.6898,36532002.0500
41 J3,1,2463806.2514,36531991.6196
42 J4,1,2463805.5426,36531984.8565
43 J5,1,2463807.0018,36531981.6012
44 J6,1,2463809.2139,36531978.2832
45 J7,1,2463813.1225,36531974.6382
46 J8,1,2463813.1224,36531990.7858
47 J9,1,2463812.7449,36532000.9968
48 J10,1,2463812.3011,36532002.5509
49 J11,1,2463810.1033,36532005.2700
50 J12,1,2463808.0212,36532005.7911
...\ No newline at end of file ...\ No newline at end of file
...@@ -217,6 +217,13 @@ export function exportShp(data) { ...@@ -217,6 +217,13 @@ export function exportShp(data) {
217 }) 217 })
218 } 218 }
219 219
220 export function exportExcel(data) {
221 return request({
222 url:"/tx/excelGeo/exportExcelp",
223 method:"post",
224 params:data
225 })
226 }
220 227
221 /** 228 /**
222 * 获取该宗地上的所有自然幢 229 * 获取该宗地上的所有自然幢
...@@ -241,3 +248,4 @@ export function ZdHb(data) { ...@@ -241,3 +248,4 @@ export function ZdHb(data) {
241 data:data 248 data:data
242 }) 249 })
243 } 250 }
251
......
1 {
2 "exprotTextAttr": "[属性描述]\n格式版本号=1.0\n数据产生单位=国土资源信息中心\n数据产生日期=2013-06-06\n坐标系=80国家大地坐标系\n几度分带=3\n投影类型=高斯克吕格\n计量单位=米\n带号=36\n精度=0.01\n转换参数=0,0,0,0,0,0,0\n"
3 }
...\ No newline at end of file ...\ No newline at end of file
...@@ -58,13 +58,13 @@ ...@@ -58,13 +58,13 @@
58 > 58 >
59 <li @click="postionToMap">定位</li> 59 <li @click="postionToMap">定位</li>
60 <li @click="importGeo">导入图形</li> 60 <li @click="importGeo">导入图形</li>
61 <li @click="exportToShp"> 61 <li>
62 导出图形 62 导出图形
63 <ul class="contextmenu childUl"> 63 <ul class="contextmenu childUl">
64 <li>文本</li> 64 <li @click="exportText">文本</li>
65 <li>CAD</li> 65 <li @click="exportCad">CAD</li>
66 <li>Excel</li> 66 <li @click="exportExcel">Excel</li>
67 <li>ESRI Shape</li> 67 <li @click="exportToShp">ESRI Shape</li>
68 </ul> 68 </ul>
69 </li> 69 </li>
70 <li v-show="isZD">导入属性</li> 70 <li v-show="isZD">导入属性</li>
...@@ -112,12 +112,13 @@ ...@@ -112,12 +112,13 @@
112 </template> 112 </template>
113 <script> 113 <script>
114 import lineItem from "./lineItem.vue"; 114 import lineItem from "./lineItem.vue";
115 import {deleteZdInfoByBsm,exportShp} from "../../api/zd"; 115 import {deleteZdInfoByBsm,exportShp,exportExcel} from "../../api/zd";
116 import Create from "../../views/panel/create/index"; 116 import Create from "../../views/panel/create/index";
117 import ImportGeo from './tx/importGeo' 117 import ImportGeo from './tx/importGeo'
118 import geoUtils from "@components/lineTree/tx/js/geoUtils"; 118 import geoUtils from "@components/lineTree/tx/js/geoUtils";
119 import featureUpdate from "@libs/map/featureUpdate"; 119 import featureUpdate from "@libs/map/featureUpdate";
120 import {deleteLjz,deleteZdy} from "./../../api/lpb" 120 import {deleteLjz,deleteZdy} from "./../../api/lpb"
121 import exportTemJson from '@/assets/json/exportTemplate.json'
121 export default { 122 export default {
122 inheritAttrs: false, 123 inheritAttrs: false,
123 props: { 124 props: {
...@@ -456,27 +457,106 @@ export default { ...@@ -456,27 +457,106 @@ export default {
456 } 457 }
457 }); 458 });
458 }, 459 },
459 //导出 460 //导出文本文件
461 exportText(){
462 var self = this;
463 var type = this.zdData.type;
464 var BSM = type == 'zdt'? this.zdData.zdbsm : this.zdData.bsm;
465 this.queryGeoByBsm(BSM,type,function (features){
466 if(features && features.length > 0){
467 var data = features[0];
468 var jzdInfo = self.craetJZPoint(data);
469 var textCotent = "";
470 textCotent += exportTemJson.exprotTextAttr;
471 textCotent += "[地块坐标]\n";
472 var dkMc = "",dkYt = "";
473 if(type == 'zd'){
474 dkMc = data.attributes.ZL;
475 dkYt = data.attributes.YT;
476 }else {
477 dkMc = data.attributes.XMMC + data.attributes.JZWMC ;
478 dkYt = "建设用地";
479 }
480 textCotent += ",,,"+dkMc+",面,,"+dkYt+",,@\n";
481 for(var i = 0;i < jzdInfo.length;i++){
482 textCotent += jzdInfo[i].jzdh +","+jzdInfo[i].sxh+"," +
483 jzdInfo[i].x+","+jzdInfo[i].y+"\n"
484 }
485 self.downloadTxt(textCotent,"outPut.txt");
486 }
487 });
488 },
489 //导出shp文件
460 exportToShp(){ 490 exportToShp(){
461 var self = this; 491 var self = this;
462 var BSM = this.zdData.zdbsm;
463 var type = this.zdData.type; 492 var type = this.zdData.type;
493 var BSM = type == 'zdt'? this.zdData.zdbsm : this.zdData.bsm;
464 this.queryGeoByBsm(BSM,type,function (features){ 494 this.queryGeoByBsm(BSM,type,function (features){
465 var data = JSON.stringify(features[0]);
466 if(features && features.length > 0){ 495 if(features && features.length > 0){
496 var data = JSON.stringify(features[0]);
467 window.location.href = "/api/tx/shpUtils/writeShp?strObj="+encodeURI(data) 497 window.location.href = "/api/tx/shpUtils/writeShp?strObj="+encodeURI(data)
468 /*exportShp({ 498 /* exportShp({
469 "strObj":encodeURI(data) 499 "strObj":encodeURI(data)
470 }).then(res => { 500 }).then(res => {
471 debugger 501 debugger
472 });*/ 502 });*/
503
473 }else{ 504 }else{
474 self.$message.warning("暂无空间信息!!!!"); 505 self.$message.warning("暂无空间信息!!!!");
475 } 506 }
476 }); 507 });
477 }, 508 },
509 //导出excel
510 exportExcel(){
511 var self = this;
512 var type = this.zdData.type;
513 var BSM = type == 'zdt'? this.zdData.zdbsm : this.zdData.bsm;
514 this.queryGeoByBsm(BSM,type,function (features) {
515 if (features && features.length > 0) {
516 var data = features[0];
517 var jzdInfo = self.craetJZPoint(data);
518 var submitData = [];
519 for (var i = 0; i < jzdInfo.length; i++) {
520 var obj = {
521 jzdHao: jzdInfo[i].jzdh,
522 x: jzdInfo[i].x,
523 y: jzdInfo[i].y,
524 diKuaiQuanHao: jzdInfo.sxh
525 }
526 submitData.push(obj);
527 }
528 exportExcel(submitData).then((res) => {
529 if (res.status == 200) {
530 var path = res.data.result;
531 window.location.href = "/api/tx/excelGeo/download?filePath=" + encodeURI(path);
532 }
533 });
534 }else {
535 self.$message.warning("还没有空间信息!!!!")
536 }
537 })
538 },
539 //导出CAD
540 exportCad(){
541 //TODO
542 },
543 downloadTxt(text, fileName){
544 let element = document.createElement('a')
545 element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text))
546 element.setAttribute('download', fileName)
547 element.style.display = 'none'
548 element.click()
549 },
478 //图形定位 550 //图形定位
479 postionToMap(){ 551 postionToMap(){
552 var type = this.zdData.type;
553 var BSM = type == 'zdt'? this.zdData.zdbsm : this.zdData.bsm;
554 if(this.$route.path == "/viewMap"){
555 //定位到当前空间位置
556 // TODO 这个方法只是为了支撑功能
557 this.postionToThisGeo(BSM,type);
558 return;
559 }
480 var curretRouterInfo = { 560 var curretRouterInfo = {
481 path:this.$route.path, 561 path:this.$route.path,
482 query:this.$route.query 562 query:this.$route.query
...@@ -485,8 +565,8 @@ export default { ...@@ -485,8 +565,8 @@ export default {
485 this.$router.push({ 565 this.$router.push({
486 path: "/viewMap", 566 path: "/viewMap",
487 query: { 567 query: {
488 bsm: this.zdData.zdbsm, 568 bsm: BSM,
489 type: this.zdData.type ? 'zd' : 'zrz' 569 type: type
490 } 570 }
491 }); 571 });
492 }, 572 },
......
1 <template> 1 <template>
2 <div > 2 <div >
3 <div v-if="!resultDialog" class="importDiv"> 3 <div v-if="!resultDialog && !txtResultDialog" class="importDiv">
4 <el-upload 4 <el-upload
5 class="upload-demo" 5 class="upload-demo"
6 action="#" 6 action="#"
7 accept=".txt" 7 accept=".txt"
8 :auto-upload="false"
8 :show-file-list="false" 9 :show-file-list="false"
9 :on-change="txtFileChange" 10 :on-change="txtFileChange"
10 > 11 >
11 <!-- <el-button size="small" type="primary">点击上传</el-button>--> 12 <!-- <el-button size="small" type="primary">点击上传</el-button>-->
12 <div class="fileUpload"> 13 <div class="fileUpload">
13 <div slot="trigger" class="uploadLeft"> 14 <div slot="trigger" class="uploadLeft">
14 <i class="iconfont iconwenbenwendang"></i> 15 <i class="iconfont icontxt"></i>
15 </div> 16 </div>
16 <div solt="tip" class="uploadRight"> 17 <div solt="tip" class="uploadRight">
17 <div solt="tip" class="title">TXT文本格式</div> 18 <div solt="tip" class="title">TXT文本格式</div>
18 <div slot="tip" class="el-upload__tip">支持TXT文本格式,点击查看详情<a href="">文本详情</a></div> 19 <div class="el-upload__tip" slot="tip">支持TXT文本格式,点击查看详情<a class="down" href="#" @click.stop="downloadFile('./fileTemplate/txttemplet.txt','txttemplet.txt')" >文本详情</a></div>
19 </div> 20 </div>
20 </div> 21 </div>
21 </el-upload> 22 </el-upload>
...@@ -29,7 +30,7 @@ ...@@ -29,7 +30,7 @@
29 <!--<el-button size="small" type="primary">点击上传</el-button>--> 30 <!--<el-button size="small" type="primary">点击上传</el-button>-->
30 <div class="fileUpload"> 31 <div class="fileUpload">
31 <div slot="trigger" class="uploadLeft"> 32 <div slot="trigger" class="uploadLeft">
32 <i class="iconfont iconuploadicon03"></i> 33 <i class="iconfont iconzip"></i>
33 </div> 34 </div>
34 <div solt="tip" class="uploadRight"> 35 <div solt="tip" class="uploadRight">
35 <div solt="tip" class="title">ESRI Shape文件格式</div> 36 <div solt="tip" class="title">ESRI Shape文件格式</div>
...@@ -47,7 +48,7 @@ ...@@ -47,7 +48,7 @@
47 <!-- <el-button size="small" type="primary">点击上传</el-button>--> 48 <!-- <el-button size="small" type="primary">点击上传</el-button>-->
48 <div solt="tip" class="fileUpload"> 49 <div solt="tip" class="fileUpload">
49 <div slot="trigger" class="uploadLeft"> 50 <div slot="trigger" class="uploadLeft">
50 <i class="iconfont icontubiao_daoruCAD"></i> 51 <i class="iconfont icondaoruCAD"></i>
51 </div> 52 </div>
52 <div solt="tip" class="uploadRight"> 53 <div solt="tip" class="uploadRight">
53 <div solt="tip" class="title">CAD文件</div> 54 <div solt="tip" class="title">CAD文件</div>
...@@ -69,7 +70,7 @@ ...@@ -69,7 +70,7 @@
69 </div> 70 </div>
70 <div solt="tip" class="uploadRight"> 71 <div solt="tip" class="uploadRight">
71 <div slot="tip" class="title">Excel文件格式</div> 72 <div slot="tip" class="title">Excel文件格式</div>
72 <div slot="tip" class="el-upload__tip">.xls、.xlsx版本,点击查看详情<a href="">Excel格式</a></div> 73 <div class="el-upload__tip" slot="tip">.xls、.xlsx版本,点击查看详情<a class="downloadFile" @click.stop="downloadFile('./fileTemplate/exceltemplet.xlsx','exceltemplet.xlsx')" href="#">Excel格式</a></div>
73 </div> 74 </div>
74 </div> 75 </div>
75 </el-upload> 76 </el-upload>
...@@ -98,6 +99,30 @@ ...@@ -98,6 +99,30 @@
98 </el-form-item> 99 </el-form-item>
99 </el-form> 100 </el-form>
100 </div> 101 </div>
102 <div v-if="txtResultDialog">
103 <el-form :model="txtZd" ref="txtZdForm" label-width="100px" size="small" @submit.native.prevent class="demo-ruleForm">
104 <el-form-item
105 label="地块名称"
106 prop="name"
107 :rules="[
108 { required: true, message: '请选择地块', trigger: 'change' },
109 ]"
110 >
111 <el-select v-model="txtZd.name" filterable placeholder="请选择">
112 <el-option
113 v-for="(item,index) in txtResult"
114 :key="index"
115 :label="item.attributes.name"
116 :value="item.attributes.name">
117 </el-option>
118 </el-select>
119 </el-form-item>
120 <el-form-item>
121 <el-button type="primary" @click="submitTxtForm('txtZdForm')">导入</el-button>
122 <el-button @click="cancelTxtForm('txtZdForm')">取消</el-button>
123 </el-form-item>
124 </el-form>
125 </div>
101 </div> 126 </div>
102 </template> 127 </template>
103 <script> 128 <script>
...@@ -123,7 +148,12 @@ export default { ...@@ -123,7 +148,12 @@ export default {
123 zdForm:{ 148 zdForm:{
124 zdBsm: "" 149 zdBsm: ""
125 }, 150 },
126 currentClickZd:null 151 currentClickZd:null,
152 txtResult:[],
153 txtResultDialog:null,
154 txtZd:{
155 name:""
156 }
127 } 157 }
128 }, 158 },
129 methods:{ 159 methods:{
...@@ -133,9 +163,63 @@ export default { ...@@ -133,9 +163,63 @@ export default {
133 fileReader.readAsText(file.raw); 163 fileReader.readAsText(file.raw);
134 fileReader.onload = function (res){ 164 fileReader.onload = function (res){
135 var content = this.result; 165 var content = this.result;
136 self.$emit("closeImportDialog"); 166 if(!content || content.length == 0){
167 self.$message.warning("文件内容为空!!!");
168 return;
169 }
170 self.analysisTextFile(content);
137 } 171 }
138 }, 172 },
173 analysisTextFile(content){
174 var index = content.indexOf("[地块坐标]"),
175 geoInfos = content.substr(index),
176 geoList = geoInfos.split("\n");
177 if(geoList.length < 1){
178 this.$message.warning("文本内容格式有误,请效验文本内容格式!!!");
179 return;
180 }
181 //this.$emit("closeImportDialog");
182 var features = [],attributes = {},points = [];
183 for(var i =1;i < geoList.length;i++){
184 var rowData = geoList[i];
185 if(rowData.indexOf("J") != -1 && rowData.indexOf("J") == 0){
186 //解析坐标点信息
187 var pointInfo = rowData.split(",");
188 var point = [parseFloat(pointInfo[2]),parseFloat(pointInfo[3])];
189 points.push(point);
190 }else {
191 if(points.length > 0){
192 var graphic = {
193 attributes:JSON.parse(JSON.stringify(attributes)),
194 geometry:{
195 rings:[[points.concat()]]
196 }
197 }
198 features.push(graphic);
199 }
200 //新建一个信息 坐标名称 类型
201 attributes = {};
202 points = []
203 var info = rowData.split(",");
204 attributes.name = info[3];
205 }
206 }
207 if(points.length > 0){
208 var graphic = {
209 attributes:JSON.parse(JSON.stringify(attributes)),
210 geometry:{
211 rings:[[points.concat()]]
212 }
213 }
214 features.push(graphic);
215 }
216 //新建一个信息 坐标名称 类型
217 attributes = {};
218 points = []
219 this.txtResult = features;
220 this.txtZd.name = "";
221 this.txtResultDialog = true;
222 },
139 shpFileSuccess(response, file, fileList){ 223 shpFileSuccess(response, file, fileList){
140 var self = this; 224 var self = this;
141 if(response.success){ 225 if(response.success){
...@@ -180,6 +264,49 @@ export default { ...@@ -180,6 +264,49 @@ export default {
180 this.$message.warning(response.message); 264 this.$message.warning(response.message);
181 } 265 }
182 }, 266 },
267 //文本文档导入
268 submitTxtForm(formName){
269 var self = this;
270 this.$refs[formName].validate((valid) => {
271 if(valid){
272 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]]";
273 var graphics = self.txtResult.filter(item => {
274 return item.attributes.name == self.txtZd.name;
275 })
276 var graphic = graphics[0];
277 graphic.geometry.type = "polygon";
278 graphic.geometry.spatialReference = {
279 wkt:wkt
280 }
281 //校验完整性 直接调用空间方法 提交空间表
282 self.geoJoint(geometry,function (isJoint,message) {
283 if(isJoint){
284 self.$message.warning(message)
285 return;
286 }else {
287 if(self.propertyInfo.type == "zd"){
288 self.saveZd(graphic);
289 }else{
290 self.saveZRZ(graphic);
291 }
292 }
293 });
294 }else{
295 console.log('error submit!!');
296 return false;
297 }
298 })
299 },
300 //下载文档模板
301 downloadFile(url,fileName){
302 let link = document.createElement("a");
303 link.style.display = "none";
304 link.href = url;
305 link.setAttribute("download", fileName);
306 document.body.appendChild(link);
307 link.click();
308 document.body.removeChild(link);
309 },
183 //导入 310 //导入
184 submitForm(formName){ 311 submitForm(formName){
185 //校验完整性 直接调用空间方法 提交空间表 312 //校验完整性 直接调用空间方法 提交空间表
...@@ -370,13 +497,18 @@ export default { ...@@ -370,13 +497,18 @@ export default {
370 cancel(){ 497 cancel(){
371 this.zdForm.zdBsm = ""; 498 this.zdForm.zdBsm = "";
372 this.currentClickZd = null; 499 this.currentClickZd = null;
500 this.resultDialog = false;
501 },
502 //取消文本选择的弹出框
503 cancelTxtForm(){
504 this.txtZd.name = "";
505 this.txtResultDialog = false;
373 }, 506 },
374 //宗地选择发生改变 507 //宗地选择发生改变
375 zdChange(value){ 508 zdChange(value){
376 this.zdForm.zdBsm = value.XMMC; 509 this.zdForm.zdBsm = value.XMMC;
377 this.currentClickZd = value; 510 this.currentClickZd = value;
378 } 511 }
379
380 } 512 }
381 } 513 }
382 </script> 514 </script>
......
1 
2 export default {
3 methods:{
4 downloadTxt(text, fileName){
5 let element = document.createElement('a')
6 element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text))
7 element.setAttribute('download', fileName)
8 element.style.display = 'none'
9 element.click()
10 },
11 createTextContent(jzdInfo){
12 var textContent = "";
13 for(var i = 0;i < jzdInfo.length;i++){
14 textContent += jzdInfo[i].jzdh +","+jzdInfo[i].sxh+"," +
15 jzdInfo[i].x+","+jzdInfo[i].y+"\n"
16 }
17 return textContent;
18 },
19
20 }
21 }
...\ No newline at end of file ...\ No newline at end of file
...@@ -9,7 +9,7 @@ import {loadModules} from "esri-loader" ...@@ -9,7 +9,7 @@ import {loadModules} from "esri-loader"
9 import featureUpdate from "@libs/map/featureUpdate"; 9 import featureUpdate from "@libs/map/featureUpdate";
10 import arcgisParser from 'terraformer-arcgis-parser' 10 import arcgisParser from 'terraformer-arcgis-parser'
11 import wktParse from 'terraformer-wkt-parser' 11 import wktParse from 'terraformer-wkt-parser'
12 12 import {maps} from '@/libs/map/mapUtils'
13 13
14 export default { 14 export default {
15 data(){ 15 data(){
...@@ -158,6 +158,18 @@ export default { ...@@ -158,6 +158,18 @@ export default {
158 }*/ 158 }*/
159 return arcgisParser.convert(primitive) 159 return arcgisParser.convert(primitive)
160 }, 160 },
161 postionToThisGeo(bsm,type){
162 var view = maps["testMap"];
163 var layer = view.map.findLayerById("highlightLayer");
164 if(layer){
165 var graphics = layer.graphics;
166 if(graphics.length > 0 && graphics.items[0].attributes.BSM == bsm){
167 view.extent = graphics.items[0].geometry.extent;
168 }
169 }else {
170 this.$message.warning("暂无图形信息!!!");
171 }
172 },
161 //导入空间图形是 先判断数据是否跨界 173 //导入空间图形是 先判断数据是否跨界
162 geoJoint(geometry,callBacFunction){ 174 geoJoint(geometry,callBacFunction){
163 var self = this; 175 var self = this;
......
...@@ -68,7 +68,8 @@ export default { ...@@ -68,7 +68,8 @@ export default {
68 }, 68 },
69 provide(){ 69 provide(){
70 return{ 70 return{
71 getRightTree: this.getRightTree 71 getRightTree: this.getRightTree,
72 getRightTreeByZrzbsm:this.getRightTreeByZrzbsm
72 } 73 }
73 }, 74 },
74 data() { 75 data() {
......
...@@ -56,6 +56,7 @@ import layers from '@/assets/json/layers.json' ...@@ -56,6 +56,7 @@ import layers from '@/assets/json/layers.json'
56 import findTask from '@/libs/map/findTask' 56 import findTask from '@/libs/map/findTask'
57 57
58 export default { 58 export default {
59 inject:['getRightTree','getRightTreeByZrzbsm'],
59 components:{ 60 components:{
60 EsriMap, 61 EsriMap,
61 MapTools 62 MapTools
...@@ -77,8 +78,14 @@ export default { ...@@ -77,8 +78,14 @@ export default {
77 mounted(){ 78 mounted(){
78 var query = this.$route.query; 79 var query = this.$route.query;
79 if(query && JSON.stringify(query) != "{}"){ 80 if(query && JSON.stringify(query) != "{}"){
80 this.addGeoByBsm(query.bsm,query.type,this.viewId); 81 //self.addGeoByBsm(query.bsm,query.type,self.viewId);
82 if(query.type == 'zd'){
83 this.getRightTree(query.bsm)
84 }else if(query.type == 'zrz'){
85 this.getRightTreeByZrzbsm(query.bsm);
81 } 86 }
87 }
88
82 }, 89 },
83 methods:{ 90 methods:{
84 addLayer(){ 91 addLayer(){
...@@ -108,6 +115,10 @@ export default { ...@@ -108,6 +115,10 @@ export default {
108 }] 115 }]
109 }); 116 });
110 view.map.add(mapImageLayer,1); 117 view.map.add(mapImageLayer,1);
118 var query = self.$route.query;
119 if(query && JSON.stringify(query) != "{}"){
120 self.addGeoByBsm(query.bsm,query.type,self.viewId);
121 }
111 }).catch(err => { 122 }).catch(err => {
112 throw(err); 123 throw(err);
113 }) 124 })
...@@ -115,9 +126,14 @@ export default { ...@@ -115,9 +126,14 @@ export default {
115 //缩放至 126 //缩放至
116 toMap(attr){ 127 toMap(attr){
117 var self = this; 128 var self = this;
129 if(attr.geometry){
118 this.extentToGraphic(attr,this.heighGraphic,this.viewId,function () { 130 this.extentToGraphic(attr,this.heighGraphic,this.viewId,function () {
119 self.heighGraphic = attr; 131 self.heighGraphic = attr;
120 }); 132 });
133 }else {
134 this.$message.warning("没有图形信息!!")
135 }
136
121 }, 137 },
122 //图层选择事件 138 //图层选择事件
123 selectLayerChange(){ 139 selectLayerChange(){
...@@ -133,8 +149,9 @@ export default { ...@@ -133,8 +149,9 @@ export default {
133 doSearch(){ 149 doSearch(){
134 var self = this; 150 var self = this;
135 if(!this.inputBsm){ 151 if(!this.inputBsm){
152 this.$message.warning(" 请输入标识码!!!");
136 return; 153 return;
137 }else if(this.inputBsm.length != 19){ 154 }else if(this.inputBsm.length != 32){
138 this.$message.warning("标识码格式输入有误!!!"); 155 this.$message.warning("标识码格式输入有误!!!");
139 return; 156 return;
140 } 157 }
...@@ -185,7 +202,7 @@ export default { ...@@ -185,7 +202,7 @@ export default {
185 delete feature.attributes[key] 202 delete feature.attributes[key]
186 } 203 }
187 } 204 }
188 layerResult.features.push(feature); 205 layerResult[0].features.push(feature);
189 }else{ 206 }else{
190 if(layer){ 207 if(layer){
191 this.resultLayers.push({ 208 this.resultLayers.push({
...@@ -242,7 +259,7 @@ export default { ...@@ -242,7 +259,7 @@ export default {
242 position: absolute; 259 position: absolute;
243 top: 12px; 260 top: 12px;
244 left: 7px; 261 left: 7px;
245 width: 35%; 262 width: 30%;
246 max-height: 100%; 263 max-height: 100%;
247 /deep/ .el-input-group__append{ 264 /deep/ .el-input-group__append{
248 background-color: #409eff; 265 background-color: #409eff;
......
...@@ -56,7 +56,7 @@ export default { ...@@ -56,7 +56,7 @@ export default {
56 var graphic = features[0]; 56 var graphic = features[0];
57 graphic.symbol = symbol; 57 graphic.symbol = symbol;
58 layer.add(graphic); 58 layer.add(graphic);
59 view.center = graphic.geometry.extent.center; 59 view.extent = graphic.geometry.extent;
60 }).catch( err => { 60 }).catch( err => {
61 thow(err); 61 thow(err);
62 }) 62 })
...@@ -91,9 +91,12 @@ export default { ...@@ -91,9 +91,12 @@ export default {
91 var symbol = graphicSymbol.fillSymbol.highlightSymbol; 91 var symbol = graphicSymbol.fillSymbol.highlightSymbol;
92 var features = searchResult[i].features; 92 var features = searchResult[i].features;
93 for(var j = 0;j < features.length;j++){ 93 for(var j = 0;j < features.length;j++){
94 if(features[j].geometry){
94 features[j].symbol = symbol; 95 features[j].symbol = symbol;
95 layer.add(features[j]); 96 layer.add(features[j]);
96 } 97 }
98
99 }
97 } 100 }
98 }).catch(err=>{ 101 }).catch(err=>{
99 console.log(err); 102 console.log(err);
...@@ -108,7 +111,7 @@ export default { ...@@ -108,7 +111,7 @@ export default {
108 } 111 }
109 feature.symbol = highlightSymbol; 112 feature.symbol = highlightSymbol;
110 var view = maps[viewId]; 113 var view = maps[viewId];
111 view.center = feature.geometry.type == 'point' ? feature.geometry : feature.geometry.extent.center; 114 feature.geometry.type == 'point' ?view.center = feature.geometry :view.extent = feature.geometry.extent;
112 if(callBackFunction && typeof callBackFunction == 'function'){ 115 if(callBackFunction && typeof callBackFunction == 'function'){
113 callBackFunction(); 116 callBackFunction();
114 } 117 }
......
1 <template> 1 <template>
2 <div class="tools"> 2 <div class="tools">
3 <el-button-group> 3 <el-button-group>
4 <el-button type="primary" title="全图" icon="iconfont icondiqiu" @click="fullMap"></el-button> 4 <el-button type="primary" title="全图" icon="iconfont iconquantu" @click="fullMap"></el-button>
5 <el-button type="primary" title="测面" icon="iconfont iconmianceliang" @click="measureMent('area')"></el-button> 5 <el-button type="primary" title="测面" icon="iconfont iconcemianji" @click="measureMent('area')"></el-button>
6 <el-button type="primary" title="测距" icon="iconfont iconceju" @click="measureMent('distance')"></el-button> 6 <el-button type="primary" title="测距" icon="iconfont iconceju" @click="measureMent('distance')"></el-button>
7 <el-button type="primary" title="放大" icon="iconfont iconfangda" @click="zoomOut"></el-button> 7 <el-button type="primary" title="放大" icon="iconfont iconlakuangfangda" @click="zoomOut"></el-button>
8 <el-button type="primary" title="缩小" icon="iconfont iconsuoxiao" @click="zoomIn"></el-button> 8 <el-button type="primary" title="缩小" icon="iconfont iconlakuangsuoxiao" @click="zoomIn"></el-button>
9 <el-button type="primary" title="点选" icon="iconfont iconshuxing" @click="info"></el-button> 9 <el-button type="primary" title="点选" icon="iconfont iconchaxunshuxing" @click="info"></el-button>
10 <el-button type="primary" title="清除" icon="el-icon-delete" @click="clear"></el-button> 10 <el-button type="primary" title="清除" icon="iconfont iconqingchu" @click="clear"></el-button>
11 </el-button-group> 11 </el-button-group>
12 12
13 </div> 13 </div>
......
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
10 :on-error="uploadError" 10 :on-error="uploadError"
11 :show-file-list="false" 11 :show-file-list="false"
12 multiple 12 multiple
13 :limit="3"
14 :on-exceed="handleExceed" 13 :on-exceed="handleExceed"
15 > 14 >
16 <el-button size="small" type="primary">上传</el-button> 15 <el-button size="small" type="primary">上传</el-button>
...@@ -157,7 +156,8 @@ ...@@ -157,7 +156,8 @@
157 }, 156 },
158 handleExceed(files, fileList) { 157 handleExceed(files, fileList) {
159 console.log(fileList) 158 console.log(fileList)
160 this.$message.warning(`当前限制选择 3 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`); 159 // this.$message.warning(`当前限制选择 3 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`);
160 this.$message.warning("上传失败")
161 }, 161 },
162 beforeRemove(file, fileList) { 162 beforeRemove(file, fileList) {
163 return this.$confirm(`确定移除 ${ file.name }?`); 163 return this.$confirm(`确定移除 ${ file.name }?`);
......
...@@ -590,8 +590,13 @@ ...@@ -590,8 +590,13 @@
590 if(res.code===200){ 590 if(res.code===200){
591 this.form = res.result; 591 this.form = res.result;
592 if(res.result.qszt !== '0'){ 592 if(res.result.qszt !== '0'){
593 console.log(JSON.stringify(res)+":res")
594 console.log(JSON.stringify(res.result)+":res.result")
595 console.log(res.result.qszt+":res.result.qszt")
596 console.log(res.result.qszt !== '0'+":res.result.qszt!==0")
593 this.disableFlag = true; 597 this.disableFlag = true;
594 } 598 }
599 console.log(this.disableFlag)
595 if(this.form.scyclx==='0'){ 600 if(this.form.scyclx==='0'){
596 this.$set(this.form,"ycjzmj", this.form.jzmj) 601 this.$set(this.form,"ycjzmj", this.form.jzmj)
597 this.$set(this.form,"yctnjzmj", this.form.tnjzmj) 602 this.$set(this.form,"yctnjzmj", this.form.tnjzmj)
......
...@@ -57,6 +57,7 @@ ...@@ -57,6 +57,7 @@
57 <td 57 <td
58 v-for="(hs, hsIndex) in cs.hs" 58 v-for="(hs, hsIndex) in cs.hs"
59 :rowspan="hs.sjcs" 59 :rowspan="hs.sjcs"
60 :colspan="hs.sjhs"
60 :data-bsm="hs.bsm" 61 :data-bsm="hs.bsm"
61 ref="hBsm" 62 ref="hBsm"
62 :key="hsIndex" 63 :key="hsIndex"
...@@ -111,6 +112,7 @@ ...@@ -111,6 +112,7 @@
111 <td 112 <td
112 v-for="(hs, hsIndex) in cs.hs" 113 v-for="(hs, hsIndex) in cs.hs"
113 :rowspan="hs.sjcs" 114 :rowspan="hs.sjcs"
115 :colspan="hs.sjhs"
114 :data-bsm="hs.bsm" 116 :data-bsm="hs.bsm"
115 ref="hBsm" 117 ref="hBsm"
116 :key="hsIndex" 118 :key="hsIndex"
...@@ -170,6 +172,7 @@ ...@@ -170,6 +172,7 @@
170 <td 172 <td
171 v-for="(hs, hsIndex) in cs.hs" 173 v-for="(hs, hsIndex) in cs.hs"
172 :rowspan="hs.sjcs" 174 :rowspan="hs.sjcs"
175 :colspan="hs.sjhs"
173 :data-bsm="hs.bsm" 176 :data-bsm="hs.bsm"
174 ref="hBsm" 177 ref="hBsm"
175 :key="hsIndex" 178 :key="hsIndex"
...@@ -214,6 +217,7 @@ ...@@ -214,6 +217,7 @@
214 <td 217 <td
215 v-for="(hs, hsIndex) in cs.hs" 218 v-for="(hs, hsIndex) in cs.hs"
216 :rowspan="hs.sjcs" 219 :rowspan="hs.sjcs"
220 :colspan="hs.sjhs"
217 :data-bsm="hs.bsm" 221 :data-bsm="hs.bsm"
218 ref="hBsm" 222 ref="hBsm"
219 :key="hsIndex" 223 :key="hsIndex"
......