Browse Source

[完善]地图相关修改为株洲市中心点

zhuzhou
邵佳豪 4 years ago
parent
commit
1bc637f97c
  1. 24
      src/app/data-collection/fire-force/fire-force.component.ts
  2. 4
      src/app/data-collection/linkage-forces/linkage-forces.component.ts
  3. 4
      src/app/data-collection/water-collection/water-collection.component.ts
  4. 4
      src/app/gis-management/gis-labeling/gis-labeling.component.ts
  5. 4
      src/app/key-unit/router-gis/router-gis.component.ts
  6. 2
      src/app/key-unit/water-road/water-road.component.ts
  7. 2
      src/app/plan-audit/fireforce-audit/fireforce-audit.component.ts
  8. 2
      src/app/plan-audit/linkageforces-audit/linkageforces-audit.component.ts
  9. 2
      src/app/plan-audit/water-audit/water-audit.component.ts
  10. 8
      src/app/statistic-analysis/home/home.component.ts

24
src/app/data-collection/fire-force/fire-force.component.ts

@ -230,13 +230,13 @@ export class FireForceComponent implements OnInit {
} }
this.http.get('/api/CustomFireForce', { params: params }).subscribe((data: any) => { this.http.get('/api/CustomFireForce', { params: params }).subscribe((data: any) => {
this.allFireForceList = data this.allFireForceList = data
   this.dataSource.data = this.tree.toTree(data) this.dataSource.data = this.tree.toTree(data)
this.treeControl.expand(this.treeControl.dataNodes[0]); this.treeControl.expand(this.treeControl.dataNodes[0]);
}) })
} }
upDateAllFireForce = (): void => { upDateAllFireForce = (): void => {
this.http.get('/api/CustomFireForce').subscribe((data: any) => { this.http.get('/api/CustomFireForce').subscribe((data: any) => {
   this.newdata = this.tree.toTree(data) this.newdata = this.tree.toTree(data)
const nodes = this.treeControl.dataNodes; const nodes = this.treeControl.dataNodes;
const expandNodes = []; const expandNodes = [];
nodes.forEach((item) => { nodes.forEach((item) => {
@ -325,7 +325,7 @@ export class FireForceComponent implements OnInit {
// 将 markers 添加到地图 // 将 markers 添加到地图
this.map.add(this.newPositionMarker); this.map.add(this.newPositionMarker);
} else { } else {
this.map.setCity('上海市'); this.map.setCity('株洲市');
} }
//相关资料 //相关资料
data.relevantInfomationData ? this.AttachmentArr = JSON.parse(data.relevantInfomationData) : null data.relevantInfomationData ? this.AttachmentArr = JSON.parse(data.relevantInfomationData) : null
@ -349,7 +349,7 @@ export class FireForceComponent implements OnInit {
}) })
} else { } else {
this.map.setCity('上海市'); this.map.setCity('株洲市');
} }
//寻找管辖单位 //寻找管辖单位
@ -384,8 +384,7 @@ export class FireForceComponent implements OnInit {
} }
//js乘法 //js乘法
accMul(arg1, arg2, fix) { accMul(arg1, arg2, fix) {
if(!parseInt(fix)==fix) if (!parseInt(fix) == fix) {
{
return; return;
} }
var m = 0, s1 = arg1.toString(), s2 = arg2.toString(); var m = 0, s1 = arg1.toString(), s2 = arg2.toString();
@ -620,7 +619,7 @@ export class FireForceComponent implements OnInit {
// this.newPositionMarker ? this.map.remove(this.newPositionMarker) : null // this.newPositionMarker ? this.map.remove(this.newPositionMarker) : null
// this.positionLngLat.x = 0 // this.positionLngLat.x = 0
// this.positionLngLat.y = 0 // this.positionLngLat.y = 0
// this.map.setCity('上海市'); // this.map.setCity('株洲市');
this.selectedFireForce.contentVerify = null this.selectedFireForce.contentVerify = null
this.clearData() this.clearData()
} }
@ -811,7 +810,7 @@ export class FireForceComponent implements OnInit {
this.map = new AMap.Map('container', { this.map = new AMap.Map('container', {
zoom: 12 zoom: 12
}) })
this.map.setCity('上海市'); this.map.setCity('株洲市');
//输入提示 //输入提示
var autoOptions = { var autoOptions = {
input: "tipinput" input: "tipinput"
@ -989,7 +988,8 @@ export class FireForceComponent implements OnInit {
this.http.post(`/api/MultipartUpload/PlanPlatform/${this.objectName}?uploadId=${this.uploadId}&partNumber=${i + 1}`, formData).subscribe((data: any) => { this.http.post(`/api/MultipartUpload/PlanPlatform/${this.objectName}?uploadId=${this.uploadId}&partNumber=${i + 1}`, formData).subscribe((data: any) => {
let msg = { let msg = {
"partNumber": data.partNumber || null, "partNumber": data.partNumber || null,
"eTag": data.eTag || null} "eTag": data.eTag || null
}
resolve(msg) // 调用 promise 内置方法处理成功 resolve(msg) // 调用 promise 内置方法处理成功
}) })
}); });
@ -998,7 +998,8 @@ export class FireForceComponent implements OnInit {
this.progressBarValue = this.accMul(Number((i / allSlice).toFixed(2)) * 100, 1, 0) this.progressBarValue = this.accMul(Number((i / allSlice).toFixed(2)) * 100, 1, 0)
if (this.PartNumberETag.length === allSlice) { if (this.PartNumberETag.length === allSlice) {
this.progressBarValue = 100 this.progressBarValue = 100
this.endUploading()} this.endUploading()
}
}//for循环 }//for循环
} }
@ -1077,7 +1078,8 @@ export class FireForceComponent implements OnInit {
let result = await new Promise((result, reject) => { let result = await new Promise((result, reject) => {
this.http.get(`/api/Objects/PlanPlatform/${e.objectName}`, { headers: { 'range': `bytes= ${start}-${end}` }, responseType: 'blob' }).subscribe(data => { this.http.get(`/api/Objects/PlanPlatform/${e.objectName}`, { headers: { 'range': `bytes= ${start}-${end}` }, responseType: 'blob' }).subscribe(data => {
result(data) }) result(data)
})
}) })
allFile.push(result) allFile.push(result)
// this.progressBarValue = Number((i/allSlice).toFixed(2))*100 //文件进度数 // this.progressBarValue = Number((i/allSlice).toFixed(2))*100 //文件进度数

4
src/app/data-collection/linkage-forces/linkage-forces.component.ts

@ -414,7 +414,7 @@ export class LinkageForcesComponent implements OnInit {
this.clearData() this.clearData()
this.LinkageForceDetailInfo.linkageForceType = data this.LinkageForceDetailInfo.linkageForceType = data
this.newPositionMarker ? this.map.remove(this.newPositionMarker) : null this.newPositionMarker ? this.map.remove(this.newPositionMarker) : null
this.map.setCity('上海市'); this.map.setCity('株洲市');
this.LinkageForceDetailInfo.contentVerify = null this.LinkageForceDetailInfo.contentVerify = null
} }
} }
@ -530,7 +530,7 @@ export class LinkageForcesComponent implements OnInit {
this.map = new AMap.Map('container', { this.map = new AMap.Map('container', {
zoom:12 zoom:12
}) })
this.map.setCity('上海市'); this.map.setCity('株洲市');
//输入提示 //输入提示
var autoOptions = { var autoOptions = {
input: "tipinput" input: "tipinput"

4
src/app/data-collection/water-collection/water-collection.component.ts

@ -423,7 +423,7 @@ export class WaterCollectionComponent implements OnInit {
this.newPositionMarker ? this.map.remove(this.newPositionMarker) : null this.newPositionMarker ? this.map.remove(this.newPositionMarker) : null
this.positionLngLat.x = 0 this.positionLngLat.x = 0
this.positionLngLat.y = 0 this.positionLngLat.y = 0
this.map.setCity('上海市'); this.map.setCity('株洲市');
this.clearData() this.clearData()
this.waterData.contentVerify = null this.waterData.contentVerify = null
} }
@ -536,7 +536,7 @@ export class WaterCollectionComponent implements OnInit {
this.map = new AMap.Map('container', { this.map = new AMap.Map('container', {
zoom:12 zoom:12
}) })
this.map.setCity('上海市'); this.map.setCity('株洲市');
//输入提示 //输入提示
var autoOptions = { var autoOptions = {
input: "tipinput" input: "tipinput"

4
src/app/gis-management/gis-labeling/gis-labeling.component.ts

@ -976,7 +976,7 @@ export class GisLabelingComponent implements OnInit {
features: ['bg', 'road', 'point','building'], features: ['bg', 'road', 'point','building'],
mapStyle: 'amap://styles/light', mapStyle: 'amap://styles/light',
}); });
this.map.setCity('上海市'); this.map.setCity('株洲市');
} }
this.satelliteModel = false this.satelliteModel = false
this.loadModel = false this.loadModel = false
@ -996,7 +996,7 @@ export class GisLabelingComponent implements OnInit {
layers:[layer], //当只想显示标准图层时layers属性可缺省, layers:[layer], //当只想显示标准图层时layers属性可缺省,
}); });
that.map.setCity('上海市'); that.map.setCity('株洲市');;
AMap.plugin(["AMap.RangingTool", "AMap.MouseTool"],function () { AMap.plugin(["AMap.RangingTool", "AMap.MouseTool"],function () {
that.mouseTool=new AMap.MouseTool(that.map); that.mouseTool=new AMap.MouseTool(that.map);
}); });

4
src/app/key-unit/router-gis/router-gis.component.ts

@ -98,7 +98,7 @@ export class RouterGISComponent implements OnInit {
that.map = new AMap.Map('map',{ that.map = new AMap.Map('map',{
layers:[layer], //当只想显示标准图层时layers属性可缺省, layers:[layer], //当只想显示标准图层时layers属性可缺省,
}); });
that.map.setCity('上海市'); that.map.setCity('株洲市');;
AMap.plugin('AMap.Driving', function() { AMap.plugin('AMap.Driving', function() {
that.startCoordinate && that.endCoordinate? that.queryGISRoute() : null that.startCoordinate && that.endCoordinate? that.queryGISRoute() : null
}) })
@ -179,7 +179,7 @@ export class RouterGISComponent implements OnInit {
this.endCoordinate = null this.endCoordinate = null
this.routeGIS? this.routeGIS.clear() : null this.routeGIS? this.routeGIS.clear() : null
this.routes = { distance: 0, time: 0, steps: [], } this.routes = { distance: 0, time: 0, steps: [], }
this.map.setCity('上海市'); //设置地图中心点 this.map.setCity('株洲市'); //设置地图中心点
} }
//交换起始点 //交换起始点

2
src/app/key-unit/water-road/water-road.component.ts

@ -312,7 +312,7 @@ export class WaterRoadComponent implements OnInit {
this.map.add(this.unitMarker); this.map.add(this.unitMarker);
this.waterSubmit(1) this.waterSubmit(1)
}else{ }else{
this.map.setCity('上海市'); this.map.setCity('株洲市');
let config = new MatSnackBarConfig(); let config = new MatSnackBarConfig();
config.verticalPosition = 'top'; config.verticalPosition = 'top';
config.duration = 3000 config.duration = 3000

2
src/app/plan-audit/fireforce-audit/fireforce-audit.component.ts

@ -51,7 +51,7 @@ export class FireforceAuditComponent implements OnInit {
// 将 markers 添加到地图 // 将 markers 添加到地图
this.map.add(this.newPositionMarker); this.map.add(this.newPositionMarker);
}else{ }else{
this.map.setCity('上海市'); this.map.setCity('株洲市');
} }
}, 0); }, 0);

2
src/app/plan-audit/linkageforces-audit/linkageforces-audit.component.ts

@ -57,7 +57,7 @@ export class LinkageforcesAuditComponent implements OnInit {
// 将 markers 添加到地图 // 将 markers 添加到地图
this.map.add(this.newPositionMarker); this.map.add(this.newPositionMarker);
}else{ }else{
this.map.setCity('上海市'); this.map.setCity('株洲市');
} }
}, 0); }, 0);

2
src/app/plan-audit/water-audit/water-audit.component.ts

@ -36,7 +36,7 @@ export class WaterAuditComponent implements OnInit {
// 将 markers 添加到地图 // 将 markers 添加到地图
this.map.add(this.newPositionMarker); this.map.add(this.newPositionMarker);
}else{ }else{
this.map.setCity('上海市'); this.map.setCity('株洲市');
} }
}, 0); }, 0);

8
src/app/statistic-analysis/home/home.component.ts

@ -130,9 +130,9 @@ export class HomeComponent implements OnInit {
// let adcode = this.adcode; //行政编码 // let adcode = this.adcode; //行政编码
let adcode let adcode
if(sessionStorage.getItem("realName") == "上海总队"){ if(sessionStorage.getItem("realName") == "上海总队"){
adcode = 310000 adcode = 430200
}else{ }else{
adcode = 310000 adcode = 430200
} }
districtExplorer.loadAreaNode(adcode, (error, areaNode)=> { districtExplorer.loadAreaNode(adcode, (error, areaNode)=> {
@ -263,9 +263,9 @@ export class HomeComponent implements OnInit {
// console.log('区域外点击'); // console.log('区域外点击');
let adcode let adcode
if(sessionStorage.getItem("realName") == "上海总队"){ if(sessionStorage.getItem("realName") == "上海总队"){
adcode = 310000 adcode = 430200
}else{ }else{
adcode = 310000 adcode = 430200
} }
districtExplorer.loadAreaNode(adcode, (error, areaNode)=> { districtExplorer.loadAreaNode(adcode, (error, areaNode)=> {
//更新地图视野 //更新地图视野

Loading…
Cancel
Save