|
@@ -247,6 +247,7 @@ export default {
|
247
|
247
|
}),
|
248
|
248
|
...mapCaseState({
|
249
|
249
|
caseTotal: x => x.caseTotal,
|
|
250
|
+ choosedCase: x => x.choosedCase
|
250
|
251
|
}),
|
251
|
252
|
...mapCardState({
|
252
|
253
|
cardList: x => x.cardList
|
|
@@ -365,6 +366,7 @@ export default {
|
365
|
366
|
...mapCaseActions([
|
366
|
367
|
'getCaseTotal',
|
367
|
368
|
'getCaseConf',
|
|
369
|
+ 'changeChoosedCase'
|
368
|
370
|
]),
|
369
|
371
|
...mapCardActions(['getCardList']),
|
370
|
372
|
checkCanDo () {
|
|
@@ -413,6 +415,7 @@ export default {
|
413
|
415
|
caseid: this.topCaseInfoData.caseId
|
414
|
416
|
})
|
415
|
417
|
this.showSelect = false
|
|
418
|
+ this.changeChoosedCase({ CaseName: val.CaseName, CaseId: val.CaseId })
|
416
|
419
|
},
|
417
|
420
|
cutNav (index) { // 切换nav
|
418
|
421
|
this.navActive = index
|
|
@@ -498,41 +501,55 @@ export default {
|
498
|
501
|
})
|
499
|
502
|
}
|
500
|
503
|
} else {
|
501
|
|
- wxsdk({ url: encodeURIComponent(window.location.href.split('#')[0]) }, {
|
502
|
|
- title: '城的空间',
|
503
|
|
- desc: '城的空间',
|
504
|
|
- link: `${window.location.origin}${window.location.pathname}#/mainPage/indexPage`,
|
505
|
|
- thu_image: `https://spaceofcheng.oss-cn-beijing.aliyuncs.com/indexlogo.jpg?x-oss-process=style/wxicon`
|
506
|
|
- }).then(() => {
|
507
|
|
- wx.getLocation({
|
508
|
|
- type: 'gcj02', // 默认为wgs84的gps坐标,如果要返回直接给openLocation用的火星坐标,可传入'gcj02'
|
509
|
|
- success: function (res) {
|
510
|
|
- let latitude1 = res.latitude // 纬度,浮点数,范围为90 ~ -90
|
511
|
|
- let longitude1 = res.longitude // 经度,浮点数,范围为180 ~ -180。
|
512
|
|
- for (let i = 0; i < that.CaseList.length; i++) {
|
513
|
|
- let result = that.CaseList[i].Coordinate.split(",")
|
514
|
|
- let latitude2 = parseFloat(result[0])
|
515
|
|
- let longitude2 = parseFloat(result[1])
|
516
|
|
- if (that.toolClass.getGreatCircleDistance(latitude1, longitude1, latitude2, longitude2) < 500) {
|
517
|
|
- that.topCaseInfoData.caseName = that.CaseList[i].CaseName
|
518
|
|
- that.topCaseInfoData.caseId = that.CaseList[i].CaseId
|
519
|
|
- that.getCaseTableList({
|
520
|
|
- caseid: that.topCaseInfoData.caseId
|
521
|
|
- })
|
522
|
|
- if (this.userInfo.customer.MapUser !== '') {
|
523
|
|
- that.getCaseTotal({
|
|
504
|
+ // console.log(this.choosedCase)
|
|
505
|
+ if (this.choosedCase.CaseId) {
|
|
506
|
+ that.topCaseInfoData.caseName = this.choosedCase.CaseName
|
|
507
|
+ that.topCaseInfoData.caseId = this.choosedCase.CaseId
|
|
508
|
+ // that.getCaseTableList({
|
|
509
|
+ // caseid: that.topCaseInfoData.caseId
|
|
510
|
+ // })
|
|
511
|
+ // if (this.userInfo.customer.MapUser !== '') {
|
|
512
|
+ // that.getCaseTotal({
|
|
513
|
+ // caseid: that.topCaseInfoData.caseId
|
|
514
|
+ // })
|
|
515
|
+ // }
|
|
516
|
+ } else {
|
|
517
|
+ wxsdk({ url: encodeURIComponent(window.location.href.split('#')[0]) }, {
|
|
518
|
+ title: '城的空间',
|
|
519
|
+ desc: '城的空间',
|
|
520
|
+ link: `${window.location.origin}${window.location.pathname}#/mainPage/indexPage`,
|
|
521
|
+ thu_image: `https://spaceofcheng.oss-cn-beijing.aliyuncs.com/indexlogo.jpg?x-oss-process=style/wxicon`
|
|
522
|
+ }).then(() => {
|
|
523
|
+ wx.getLocation({
|
|
524
|
+ type: 'gcj02', // 默认为wgs84的gps坐标,如果要返回直接给openLocation用的火星坐标,可传入'gcj02'
|
|
525
|
+ success: function (res) {
|
|
526
|
+ let latitude1 = res.latitude // 纬度,浮点数,范围为90 ~ -90
|
|
527
|
+ let longitude1 = res.longitude // 经度,浮点数,范围为180 ~ -180。
|
|
528
|
+ for (let i = 0; i < that.CaseList.length; i++) {
|
|
529
|
+ let result = that.CaseList[i].Coordinate.split(",")
|
|
530
|
+ let latitude2 = parseFloat(result[0])
|
|
531
|
+ let longitude2 = parseFloat(result[1])
|
|
532
|
+ if (that.toolClass.getGreatCircleDistance(latitude1, longitude1, latitude2, longitude2) < 500) {
|
|
533
|
+ that.topCaseInfoData.caseName = that.CaseList[i].CaseName
|
|
534
|
+ that.topCaseInfoData.caseId = that.CaseList[i].CaseId
|
|
535
|
+ that.getCaseTableList({
|
524
|
536
|
caseid: that.topCaseInfoData.caseId
|
525
|
537
|
})
|
|
538
|
+ if (this.userInfo.customer.MapUser !== '') {
|
|
539
|
+ that.getCaseTotal({
|
|
540
|
+ caseid: that.topCaseInfoData.caseId
|
|
541
|
+ })
|
|
542
|
+ }
|
526
|
543
|
}
|
527
|
544
|
}
|
|
545
|
+ if (!that.topCaseInfoData.caseId || !that.topCaseInfoData.caseName) {
|
|
546
|
+ that.$toast('当前位置无案场')
|
|
547
|
+ that.topCaseInfoData.caseName = '当前位置无案场'
|
|
548
|
+ }
|
528
|
549
|
}
|
529
|
|
- if (!that.topCaseInfoData.caseId || !that.topCaseInfoData.caseName) {
|
530
|
|
- that.$toast('当前位置无案场')
|
531
|
|
- that.topCaseInfoData.caseName = '当前位置无案场'
|
532
|
|
- }
|
533
|
|
- }
|
|
550
|
+ })
|
534
|
551
|
})
|
535
|
|
- })
|
|
552
|
+ }
|
536
|
553
|
}
|
537
|
554
|
},
|
538
|
555
|
beforeClose (action, done) {
|