From 154afb480c7499b61db5807dac1d5fc11de5185a Mon Sep 17 00:00:00 2001 From: yaoyuhao Date: Thu, 29 Aug 2024 17:26:49 +0800 Subject: [PATCH] gx --- src/view/dialog/dialogMapDp.vue | 2 +- src/view/sy_map.vue | 92 +++++++++++++++++++++++++++++---- 2 files changed, 82 insertions(+), 12 deletions(-) diff --git a/src/view/dialog/dialogMapDp.vue b/src/view/dialog/dialogMapDp.vue index 6d8147b..5ce9109 100644 --- a/src/view/dialog/dialogMapDp.vue +++ b/src/view/dialog/dialogMapDp.vue @@ -45,7 +45,7 @@ :data="data.tableData" height="100%" :header-cell-style="{ background: '#008FCD' }" - :row-style="{height: '20px'}" + :row-style="{height: '26px'}" :key="tableKey" @row-click="handleRowClick" class="custom-table-font" diff --git a/src/view/sy_map.vue b/src/view/sy_map.vue index 4487aa9..e86edc6 100644 --- a/src/view/sy_map.vue +++ b/src/view/sy_map.vue @@ -225,7 +225,10 @@ 退出 - +
+ 地图权限(123456): +

{{ bjtitle }}

+
+ + + + + + + @@ -422,6 +440,7 @@ const input2 = ref([]); const dialogVisible = ref(false); const dialogVisible2 = ref(false); const dialogVisible3 = ref(false); +const qx = ref(false); //加载 const loadingss = ref(false); const loadTable = ref(false); @@ -1025,6 +1044,43 @@ const getCssj = async () => { /** * 地块编辑 */ +//解锁 +const jsqx = ref(false); +const qxkey = "123456"; +const qxvalue = ref(""); +const bjtitle = computed(() => { + if (jsqx.value) { + return "已解锁"; + } else { + return "锁定"; + } +}); +const openqx = () => { + console.log(1111); + + if (jsqx.value) { + ElMessageBox.confirm("确定要取消权限吗?") + .then(() => { + qxvalue.value='' + jsqx.value = false; + }) + .catch(() => { + + }); + } else { + qx.value = true; + } +}; +const saveqx = () => { + if (qxvalue.value == qxkey) { + jsqx.value = true; + qx.value = false; + qxvalue.value='' + ElMessage.success("解锁成功"); + } else { + ElMessage.error("解锁密码错误"); + } +}; //移动模式 const movemode = () => { drawing.value = true; @@ -3755,16 +3811,16 @@ const DGcreateCs = (polygon, indexx) => { }); map.addOverlay(cs_dd_arr.value[indexx]); cs_dd_arr.value[indexx].addEventListener("click", () => { - if (showEdit.value) { - changeCsqkId.value = polygon.id; - } else { - console.log(polygon.id); - changeCsqkId.value = polygon.id; - showEdit.value = !showEdit.value; - // let a = document.documentElement.getElementsByClassName("left")[0]; - // a.style.opacity = "0"; - // let b = document.documentElement.getElementsByClassName("right")[0]; - // b.style.opacity = "0"; + if (jsqx.value) { + if (showEdit.value) { + changeCsqkId.value = polygon.id; + } else { + console.log(polygon.id); + changeCsqkId.value = polygon.id; + showEdit.value = !showEdit.value; + } + }else{ + } }); }; @@ -4469,6 +4525,20 @@ onMounted(async () => { border-radius: 0 3px 3px 0; } } +.btnBj { + cursor: pointer; + z-index: 999; + position: absolute; + color: #ffffff; + top: 12%; + right: 28%; + background: #7aceff; + padding: 5px; + border-radius: 5px; + display: flex; + align-items: center; + opacity: 0.8; +} .title { background-image: url(@/assets/images/map/map_title_bg.png); background-repeat: no-repeat;