|
@@ -13,27 +13,27 @@ import { BusinessesHelper } from 'src/app/util/helper-classes/businesses-helper'
|
|
|
styleUrls: ['field-visualization.page.scss']
|
|
|
})
|
|
|
export class FieldVisualizationPage {
|
|
|
- mapCovering:MapCovering=new MapCovering()
|
|
|
+ mapCovering: MapCovering = new MapCovering()
|
|
|
showFooter: boolean = false;
|
|
|
- taskAdrees:any=[];
|
|
|
- toolsLength:any
|
|
|
+ taskAdrees: any = [];
|
|
|
+ toolsLength: any
|
|
|
constructor(
|
|
|
private gaoDeLocation: GaoDeLocation, //高德地图
|
|
|
- private networkService:NetworkService,
|
|
|
- private router:Router,
|
|
|
- private businesses:BusinessesHelper,
|
|
|
+ private networkService: NetworkService,
|
|
|
+ private router: Router,
|
|
|
+ private businesses: BusinessesHelper,
|
|
|
) { }
|
|
|
|
|
|
- ngOnInit() {
|
|
|
+ ngOnInit() {
|
|
|
}
|
|
|
ionViewWillEnter() {
|
|
|
- let api = 'appVisual/runTask';
|
|
|
- this.networkService.ajaxGet(api).then((res) => {
|
|
|
- this.taskAdrees=res;
|
|
|
- }, (error) => {
|
|
|
- console.log(error)
|
|
|
- })
|
|
|
-
|
|
|
+ // let api = 'appVisual/runTask';
|
|
|
+ // this.networkService.ajaxGet(api).then((res) => {
|
|
|
+ // this.taskAdrees=res;
|
|
|
+ // }, (error) => {
|
|
|
+ // console.log(error)
|
|
|
+ // })
|
|
|
+
|
|
|
}
|
|
|
|
|
|
//获取当前定位
|
|
@@ -53,37 +53,37 @@ export class FieldVisualizationPage {
|
|
|
onMapClick(data: any) {
|
|
|
console.log(data)
|
|
|
this.showFooter = true;
|
|
|
- var api='appVisual/taskInfo?id='+data.id;
|
|
|
- this.networkService.ajaxGet(api).then((res:any) => {
|
|
|
- this.mapCovering=res;
|
|
|
- this.toolsLength=res.taskEq.length;
|
|
|
- }, (error) => {
|
|
|
- console.log(error)
|
|
|
- })
|
|
|
+ var api = 'appVisual/taskInfo?id=' + data.id;
|
|
|
+ this.networkService.ajaxGet(api).then((res: any) => {
|
|
|
+ this.mapCovering = res;
|
|
|
+ this.toolsLength = res.taskEq.length;
|
|
|
+ }, (error) => {
|
|
|
+ console.log(error)
|
|
|
+ })
|
|
|
}
|
|
|
clickConfirm() {
|
|
|
this.showFooter = false;
|
|
|
}
|
|
|
- selectionGoPage(){
|
|
|
- if(this.mapCovering.userSignIn==='1'){
|
|
|
+ selectionGoPage() {
|
|
|
+ if (this.mapCovering.userSignIn === '1') {
|
|
|
this.businesses.tip('已经签过到')
|
|
|
return
|
|
|
- }else if(this.showFooter){
|
|
|
+ } else if (this.showFooter) {
|
|
|
alert(this.mapCovering.user)
|
|
|
- this.router.navigate(['/signin'] , { queryParams: { 'id': this.mapCovering.id,'user':this.mapCovering.user } })
|
|
|
+ this.router.navigate(['/signin'], { queryParams: { 'id': this.mapCovering.id, 'user': this.mapCovering.user } })
|
|
|
return
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
this.businesses.tip('请先选择任务地点')
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
|
|
|
- formatSignIn(params:any){
|
|
|
- if(params==='0'){
|
|
|
- return '未签到';
|
|
|
- }else{
|
|
|
- return '已签到';
|
|
|
- }
|
|
|
+ formatSignIn(params: any) {
|
|
|
+ if (params === '0') {
|
|
|
+ return '未签到';
|
|
|
+ } else {
|
|
|
+ return '已签到';
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
|