From cfcd9a35c74ce88da3647a0be3f1459fe5086ed1 Mon Sep 17 00:00:00 2001 From: lxl <lixuliang_hd@126.com> Date: 星期三, 19 十月 2022 14:46:59 +0800 Subject: [PATCH] 控制 --- src/views/Synthesis/analyse.vue | 80 ++++++++++++++++++++++++---------------- 1 files changed, 48 insertions(+), 32 deletions(-) diff --git a/src/views/Synthesis/analyse.vue b/src/views/Synthesis/analyse.vue index afba6fa..e676895 100644 --- a/src/views/Synthesis/analyse.vue +++ b/src/views/Synthesis/analyse.vue @@ -19,53 +19,69 @@ export default { data() { return { + isoline: null, + isolineFlag: false, itemsOne: [ { - id: "1", - name: "synthesis.contouranalysis", - class: "d1", + id: '1', + name: 'synthesis.contouranalysis', + class: 'd1', }, { - id: "2", - name: "synthesis.slopeanalysis", - class: "d2", + id: '2', + name: 'synthesis.slopeanalysis', + class: 'd2', }, { - id: "3", - name: "synthesis.pathanalysis", - class: "d3", + id: '3', + name: 'synthesis.pathanalysis', + class: 'd3', }, { - id: "4", - name: "synthesis.cuttinganalysis", - class: "d4", + id: '4', + name: 'synthesis.cuttinganalysis', + class: 'd4', }, { - id: "5", - name: "synthesis.floodanalysis", - class: "d5", + id: '5', + name: 'synthesis.floodanalysis', + class: 'd5', }, { - id: "6", - name: "synthesis.earthworkcalculation", - class: "d6", + id: '6', + name: 'synthesis.earthworkcalculation', + class: 'd6', }, { - id: "7", - name: "synthesis.crosssectionanalysis", - class: "d7", + id: '7', + name: 'synthesis.crosssectionanalysis', + class: 'd7', }, { - id: "8", - name: "synthesis.imagecontrast", - class: "d8", + id: '8', + name: 'synthesis.imagecontrast', + class: 'd8', }, ], }; }, + mounted() { + if (this.isoline == null) { + this.isoline = new SmartEarth.ElevationTool(sgworld); + } + }, methods: { changeAnalsy(res) { switch (res.id) { + case '1': + this.isolineFlag = !this.isolineFlag; + this.isoline.tf = this.isolineFlag; + this.isoline.render(); + break; + case '2': + elevationTool.type = 'slope'; + elevationTool.render(); + break; } }, }, @@ -92,33 +108,33 @@ margin: 0px; } .d1 { - background: url("../../assets/img/synthesis/妞渾 8 鎷疯礉 8.png") no-repeat + background: url('../../assets/img/synthesis/妞渾 8 鎷疯礉 8.png') no-repeat center; } .d2 { - background: url("../../assets/img/synthesis/鍦嗚鐭╁舰 12 鎷疯礉 5.png") no-repeat + background: url('../../assets/img/synthesis/鍦嗚鐭╁舰 12 鎷疯礉 5.png') no-repeat center; } .d3 { - background: url("../../assets/img/synthesis/鍦嗚鐭╁舰 10 鍓湰 3.png") no-repeat + background: url('../../assets/img/synthesis/鍦嗚鐭╁舰 10 鍓湰 3.png') no-repeat center; } .d4 { - background: url("../../assets/img/synthesis/鍥惧眰 74 鎷疯礉 3.png") no-repeat + background: url('../../assets/img/synthesis/鍥惧眰 74 鎷疯礉 3.png') no-repeat center; } .d5 { - background: url("../../assets/img/synthesis/鍥惧眰 20.png") no-repeat center; + background: url('../../assets/img/synthesis/鍥惧眰 20.png') no-repeat center; } .d6 { - background: url("../../assets/img/synthesis/鍥惧眰 14 鎷疯礉 3.png") no-repeat + background: url('../../assets/img/synthesis/鍥惧眰 14 鎷疯礉 3.png') no-repeat center; } .d7 { - background: url("../../assets/img/synthesis/鍥惧眰 18.png") no-repeat center; + background: url('../../assets/img/synthesis/鍥惧眰 18.png') no-repeat center; } .d8 { - background: url("../../assets/img/synthesis/鍦嗚鐭╁舰 12 鎷疯礉 6.png") no-repeat + background: url('../../assets/img/synthesis/鍦嗚鐭╁舰 12 鎷疯礉 6.png') no-repeat center; } .backimge4 { -- Gitblit v1.9.3