From 9ce29c536ba2a636416c618761985e2b9a711ee6 Mon Sep 17 00:00:00 2001 From: lxl <lixuliang_hd@126.com> Date: 星期四, 27 十月 2022 14:17:45 +0800 Subject: [PATCH] user --- src/views/Synthesis/viewport.vue | 113 +++++++++++++++++++++++++++++++++----------------------- 1 files changed, 67 insertions(+), 46 deletions(-) diff --git a/src/views/Synthesis/viewport.vue b/src/views/Synthesis/viewport.vue index 284721f..e74fa52 100644 --- a/src/views/Synthesis/viewport.vue +++ b/src/views/Synthesis/viewport.vue @@ -2,14 +2,14 @@ <div class="box"> <ul> <li - style="width: 66px" + style="margin-left: 10px; width: 110px" @click="changeview(item)" v-for="item in itemsOne" > <div class="divli"> <div :class="item.class" class="backimge2"></div> </div> - <div class="div_li">{{ item.name }}</div> + <div class="div_li">{{ $t(item.name) }}</div> </li> </ul> </div> @@ -20,77 +20,98 @@ data() { return { isRuler: false, + isNaviget: false, itemsOne: [ { - id: "1", - name: "鍒嗗睆", - class: "b1", + id: '1', + name: 'synthesis.split', + class: 'b1', }, { - id: "2", - name: "浜岀淮", - class: "b2", + id: '2', + name: 'synthesis.twod', + class: 'b2', }, { - id: "3", - name: "涓夌淮", - class: "b3", + id: '3', + name: 'synthesis.threed', + class: 'b3', }, { - id: "4", - name: "鍏ㄥ浘", - class: "b4", + id: '4', + name: 'synthesis.full', + class: 'b4', }, { - id: "5", - name: "鏀惧ぇ", - class: "b5", + id: '5', + name: 'synthesis.zommin', + class: 'b5', }, { - id: "6", - name: "缂╁皬", - class: "b6", + id: '6', + name: 'synthesis.zoomout', + class: 'b6', }, { - id: "7", - name: "姣斾緥灏�", - class: "b7", + id: '7', + name: 'synthesis.rule', + class: 'b7', }, { - id: "8", - name: "鎸囧寳閽�", - class: "b8", + id: '8', + name: 'synthesis.compass', + class: 'b8', }, ], }; }, + created() { + var cover_Id = this.$store.state.syntiesis.menu; + var cover_perms = this.$store.state.permsEntity; + + for (var i = 0; i < cover_perms.length; i++) { + if (cover_perms[i].pid == cover_Id) { + this.showViewMenu(cover_perms[i]); + } + } + }, methods: { + showViewMenu(res) { + if (res.cnName != '瑙嗗浘') return; + console.log('瑙嗗浘', res.tag); + }, changeview(res) { switch (res.id) { - case "1": - this.$bus.$emit("changemap", res.name); + case '1': + this.$bus.$emit('changemap', '鍒嗗睆'); break; - case "2": - this.$bus.$emit("changemap", res.name); + case '2': + this.$bus.$emit('changemap', '浜岀淮'); break; - case "3": - this.$bus.$emit("changemap", res.name); + case '3': + this.$bus.$emit('changemap', '涓夌淮'); break; - case "4": + case '4': window.sgworld.Navigate.jumpTo({ //璺宠浆瑙嗚 destination: new Cesium.Cartesian3.fromDegrees(110, 32, 8000000), }); break; - case "5": + case '5': window.sgworld.Navigate.zoomIn(); break; - case "6": + case '6': window.sgworld.Navigate.zoomOut(); break; - case "7": + case '7': this.isRuler = !this.isRuler; - window.sgworld.navControl("enableCompass", this.isRuler); + //姣斾緥灏� + window.sgworld.navControl('scale', this.isRuler); + break; + case '8': + this.isNaviget = !this.isNaviget; + //瀵艰埅鎺т欢 + window.sgworld.navControl('nav', this.isNaviget); break; } // this.$bus.$emit("changetool", res_val); @@ -119,42 +140,42 @@ margin: 0px; } .b1 { - background: url("../../assets/img/synthesis/鍦嗚鐭╁舰 12 鎷疯礉 3.png") no-repeat + background: url('../../assets/img/synthesis/鍦嗚鐭╁舰 12 鎷疯礉 3.png') no-repeat center; } .b2 { - background: url("../../assets/img/synthesis/鍥惧眰 10 鎷疯礉.png") no-repeat + background: url('../../assets/img/synthesis/鍥惧眰 10 鎷疯礉.png') no-repeat center; } .b3 { - background: url("../../assets/img/synthesis/鍥惧眰 11 鎷疯礉.png") no-repeat + background: url('../../assets/img/synthesis/鍥惧眰 11 鎷疯礉.png') no-repeat center; } .b4 { - background: url("../../assets/img/synthesis/鍥惧眰 12 鎷疯礉 2.png") no-repeat + background: url('../../assets/img/synthesis/鍥惧眰 12 鎷疯礉 2.png') no-repeat center; } .b5 { - background: url("../../assets/img/synthesis/鍦嗚鐭╁舰 5 鎷疯礉 2.png") no-repeat + background: url('../../assets/img/synthesis/鍦嗚鐭╁舰 5 鎷疯礉 2.png') no-repeat center; } .b6 { - background: url("../../assets/img/synthesis/鍦嗚鐭╁舰 5 鎷疯礉 3.png") no-repeat + background: url('../../assets/img/synthesis/鍦嗚鐭╁舰 5 鎷疯礉 3.png') no-repeat center; } .b7 { - background: url("../../assets/img/synthesis/鐭╁舰 9.png") no-repeat center; + background: url('../../assets/img/synthesis/鐭╁舰 9.png') no-repeat center; } .b8 { - background: url("../../assets/img/synthesis/妞渾 4.png") no-repeat center; + background: url('../../assets/img/synthesis/妞渾 4.png') no-repeat center; } .backimge2 { width: 30px; height: 30px; - margin-left: 20px; position: absolute; background-size: 100% 100%; + margin: 0 39%; } .divli { width: 100%; -- Gitblit v1.9.3