From ab746e04a079ba979f7caaa2535ffb57ffc9766f Mon Sep 17 00:00:00 2001 From: Junjie <fallin.jie@qq.com> Date: 星期五, 26 五月 2023 15:53:03 +0800 Subject: [PATCH] 地图切换楼层 --- src/main/webapp/views/home/map.html | 64 +++++++++++++++++++++----------- 1 files changed, 42 insertions(+), 22 deletions(-) diff --git a/src/main/webapp/views/home/map.html b/src/main/webapp/views/home/map.html index 79345ee..8e4e6fc 100644 --- a/src/main/webapp/views/home/map.html +++ b/src/main/webapp/views/home/map.html @@ -6,11 +6,13 @@ <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all"> <link rel="stylesheet" href="../../static/css/admin.css?v=318" media="all"> <link rel="stylesheet" href="../../static/css/cool.css" media="all"> + <link rel="stylesheet" href="../../static/css/element.css"> <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> <script type="text/javascript" src="../../static/layui/layui.js"></script> <script type="text/javascript" src="../../static/js/handlebars/handlebars-v4.5.3.js"></script> <script type="text/javascript" src="../../static/js/common.js"></script> <script type="text/javascript" src="../../static/js/vue.min.js"></script> + <script type="text/javascript" src="../../static/js/element.js"></script> <style> .pointContainer { display: flex; @@ -194,7 +196,7 @@ /*婊戝姩鍗$墖start*/ .hoverCard { - width: 160px; + width: 150px; height: 224px; border-radius: 20px; background: #f5f5f5; @@ -402,7 +404,7 @@ </head> <body> <div id="app" style="display: flex;justify-content: space-around;margin-top: 50px;flex-wrap: wrap;" @click="bgClick()"> - <div style="flex: 12;"> + <div style="flex: 12;display: flex;" :style="{scale:showScale/100.0,marginTop:(showScale-100)*5 + 'px'}"> <div> <div class="pointContainer" v-for="(x,index) in map" :key="index"> <div v-if="index != 0 && (index != map.length-1)" v-for="(y,idx) in x" :key="idx"> @@ -448,8 +450,16 @@ </div> </div> + + <div> + <div style="margin-top: 20px;"><button class="layui-btn" @click="currentLev = 1" :style="{background: currentLev==1?'red':''}">1F</button></div> + <div style="margin-top: 20px;"><button class="layui-btn" @click="currentLev = 2" :style="{background: currentLev==2?'red':''}">2F</button></div> + <div style="margin-top: 20px;"><button class="layui-btn" @click="currentLev = 3" :style="{background: currentLev==3?'red':''}">3F</button></div> + <div style="margin-top: 20px;"><button class="layui-btn" @click="currentLev = 4" :style="{background: currentLev==4?'red':''}">4F</button></div> + </div> </div> - <div style="padding: 20px;flex: 5;margin-top: -70px;"> + <div style="padding: 40px 20px 10px 10px;flex: 5;margin-top: -70px;"> + <el-slider v-model="showScale" :marks="showScaleMarks"></el-slider> <div style="display: flex;justify-content: space-between;flex-wrap: wrap;"> <div class="hoverCard" style="width: 100%;"> <div class="card-details" style="place-content: normal;height: auto;"> @@ -525,24 +535,24 @@ <button class="card-button">搴撲綅鐘舵��</button> </div> - <div class="hoverCard"> - <div class="card-details"> - <p class="text-title" style="text-align: center;">妤煎眰 {{currentLev}}F</p> - <div class="text-body" style="display: flex;"> - <div class="floorSelect"> - <label for="01">1F</label> - <input id="01" type="radio" name="r" v-model="currentLev" value="1" checked=""> - <label for="02">2F</label> - <input id="02" type="radio" v-model="currentLev" name="r" value="2"> - <label for="03">3F</label> - <input id="03" type="radio" v-model="currentLev" name="r" value="3"> - <label for="04">4F</label> - <input id="04" type="radio" v-model="currentLev" name="r" value="4"> - </div> - </div> - </div> - <button class="card-button">妤煎眰 {{currentLev}}F</button> - </div> +<!-- <div class="hoverCard">--> +<!-- <div class="card-details">--> +<!-- <p class="text-title" style="text-align: center;">妤煎眰 {{currentLev}}F</p>--> +<!-- <div class="text-body" style="display: flex;">--> +<!-- <div class="floorSelect">--> +<!-- <label for="01">1F</label>--> +<!-- <input id="01" type="radio" name="r" v-model="currentLev" value="1" checked="">--> +<!-- <label for="02">2F</label>--> +<!-- <input id="02" type="radio" v-model="currentLev" name="r" value="2">--> +<!-- <label for="03">3F</label>--> +<!-- <input id="03" type="radio" v-model="currentLev" name="r" value="3">--> +<!-- <label for="04">4F</label>--> +<!-- <input id="04" type="radio" v-model="currentLev" name="r" value="4">--> +<!-- </div>--> +<!-- </div>--> +<!-- </div>--> +<!-- <button class="card-button">妤煎眰 {{currentLev}}F</button>--> +<!-- </div>--> </div> </div> @@ -642,6 +652,17 @@ searchLocNo: "", outSite: null, outSites: null, + showScale: 77, //鎺у埗鍦板浘鏄剧ず澶у皬姣斾緥 + showScaleMarks: {//姣斾緥婊戝姩鏉℃樉绀烘爣璁� + 0: "0%", + 50: { + style: { + color: '#1989FA' + }, + label: "50%" + }, + 100: "100%", + } }, created(){ this.init() @@ -705,7 +726,6 @@ let data = this.map let rowData = data[x] for (var i = 1; i < rowData.length; i++) { - console.log(rowData[i],rowData[i].locNo,rowData[i].locNo != undefined) if (rowData[i].locNo != undefined) { let locNo = rowData[i].locNo; return "#" + parseInt(locNo.substr(0, 2)); -- Gitblit v1.9.1