Browse Source

[新增]三维预案网址

zhuzhou
邵佳豪 4 years ago
parent
commit
a35b485add
  1. 2
      proxy.config.json
  2. 18
      src/app/external-links-plan/external-links-plan.component.ts
  3. 8
      src/index.html

2
proxy.config.json

@ -1,6 +1,6 @@
{
"/api": {
"target": "http://39.106.78.171:8000",
"target": "http://10.81.73.39:8000",
"secure": false,
"changeOrigin": true
}

18
src/app/external-links-plan/external-links-plan.component.ts

@ -48,7 +48,7 @@ export class ExternalLinksPlanComponent implements OnInit {
}
} else {
// 二维三维预案
this.handleData()
this.handleData(data.url)
}
})
})
@ -110,8 +110,9 @@ export class ExternalLinksPlanComponent implements OnInit {
companyData//当前公司信息
thirdPartyURL
threedUrl: any
handleData() {
handleData(url?:string) {
let data = this.planData
// console.log('ddddd',data)
if (this.planData.planMode == 2) { //预案planMode=2时, 跳查看页面组件
this.http.get(`/api/Plans/${data.companyId}`).subscribe((data: any) => {
@ -126,12 +127,13 @@ export class ExternalLinksPlanComponent implements OnInit {
// this.threedUrl = this.sanitizer.bypassSecurityTrustResourceUrl(`/keyUnit/viewunitinfoplans?id=${data.companyId}`)
})
} else if (this.planData.planMode == 3) { //预案planMode=3时, 第三方网址'
this.http.get(`/api/Plans/${data.companyId}`).subscribe((data: any) => {
data && data.company ? this.companyData = data.company : null
this.threedUrl = this.sanitizer.bypassSecurityTrustResourceUrl(data.url)
this.showType = 2
})
// this.http.get(`/api/Plans/${data.companyId}`).subscribe((data: any) => {
// console.log('xxxx',data)
// data && data.company ? this.companyData = data.company : null
// this.threedUrl = this.sanitizer.bypassSecurityTrustResourceUrl(url)
// this.showType = 2
// })
window.location.href = `${url}?unitId=${data.company.id}&unitName=${data.company.name}&editMode=false`
}
}
}

8
src/index.html

@ -22,9 +22,9 @@
<app-root></app-root>
</body>
<!-- <script src="http://10.81.73.39:8000/webapi/maps?v=2.0&key=e4b359dc7b03f9418b7497f807131346&plugin=AMap.Driving,AMap.MouseTool,AMap.RangingTool"></script>
<script src="http://10.81.73.39:8000/webapi/ui/1.1/main.js"></script> -->
<script src="https://webapi.amap.com/maps?v=2.0&key=e4b359dc7b03f9418b7497f807131346&plugin=AMap.Driving,AMap.MouseTool,AMap.RangingTool"></script>
<script src="https://webapi.amap.com/ui/1.1/main.js"></script>
<script src="http://10.81.73.39:8000/webapi/maps?v=2.0&key=e4b359dc7b03f9418b7497f807131346&plugin=AMap.Driving,AMap.MouseTool,AMap.RangingTool"></script>
<script src="http://10.81.73.39:8000/webapi/ui/1.1/main.js"></script>
<!-- <script src="https://webapi.amap.com/maps?v=2.0&key=e4b359dc7b03f9418b7497f807131346&plugin=AMap.Driving,AMap.MouseTool,AMap.RangingTool"></script>
<script src="https://webapi.amap.com/ui/1.1/main.js"></script> -->
</html>

Loading…
Cancel
Save