考勤静态页面

This commit is contained in:
yanran200730
2022-03-08 17:02:42 +08:00
parent b768efcb5d
commit 7faac31464
8 changed files with 1126 additions and 2 deletions

View File

@@ -0,0 +1,253 @@
<template>
<div class="Attendance-address">
<map @tap="onClick"></map>
<u-popup v-model="isShow" :closeable="false" border-radius="32" height="70%" mode="bottom">
<div class="wrapper">
<div class="top">
<span @click="isShow = false">取消</span>
<span>确定</span>
</div>
<div class="address-search">
<div class="address-search__wrapper">
<image src="./images/search.png" />
<input placeholder-style="color: #98A6B6" placeholder="搜索地点" v-model="address">
</div>
</div>
<scroll-view scroll-y>
<div class="address-item" v-for="(item, index) in 20" :key="index">
<div class="left">
<h2>苗栗路-地铁站</h2>
<p>50m内 | 江汉区轨道交通6号线</p>
</div>
<div class="right" :class="[currIndex === index ? 'active' : '']"></div>
</div>
</scroll-view>
<div class="address-btn">
<span>打卡有效范围</span>
<div class="right" @click="isShowScope = true">
<i>200</i>
<image src="./images/w-right.png" />
</div>
</div>
</div>
</u-popup>
<u-popup v-model="isShowScope" :closeable="false" :z-index="11111" border-radius="16" mode="bottom">
<div class="ActionSheet">
<div class="ActionSheet-list">
<div :class="[chooseIndex === 0 ? 'active' : '']">100</div>
<div :class="[chooseIndex === 1 ? 'active' : '']">200</div>
<div :class="[chooseIndex === 2 ? 'active' : '']">300</div>
<div :class="[chooseIndex === 3 ? 'active' : '']">400</div>
<div :class="[chooseIndex === 4 ? 'active' : '']">500</div>
</div>
<div class="cancel-btn" @click="isShowScope = false">取消</div>
</div>
</u-popup>
</div>
</template>
<script>
export default {
name: 'ChooseAddess',
appName: '选择打卡点',
data () {
return {
latitude: '',
longitude: '',
isShow: false,
address: '',
currIndex: 0,
chooseIndex: 1,
isShowScope: false
}
},
onLoad () {
uni.getLocation({
type: 'wgs84',
success: res => {
console.log(res)
this.longitude = res.longitude
this.latitude = res.latitude
}
})
},
methods: {
onClick (e) {
console.log(e)
this.isShow = true
}
}
}
</script>
<style lang="scss" scoped>
.Attendance-address {
width: 100%;
height: 100vh;
.ActionSheet {
background: #F5F6F6;
.ActionSheet-list {
margin-bottom: 8px;
background: #fff;
div {
height: 112px;
line-height: 112px;
text-align: center;
color: #333333;
font-size: 32px;
border-bottom: 1px solid #D8DDE6;
&.active {
color: #1365DD;
font-weight: 600;
}
&:last-child {
border: none;
}
}
}
.cancel-btn {
height: 112px;
line-height: 112px;
color: #333;
font-size: 32px;
text-align: center;
font-weight: 600;
background: #fff;
}
}
* {
box-sizing: border-box;
line-height: 1;
font-style: normal;
}
.wrapper {
height: 100%;
overflow: hidden;
scroll-view {
height: calc(100% - 308px);
padding: 0 32px;
.address-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 32px 0;
border-bottom: 1px solid #EEEEEE;
&:last-child {
border: none;
}
.right {
width: 32px;
height: 32px;
border-radius: 50%;
border: 4px solid #CCCCCC;
transition: all ease 0.3s;
&.active {
border: 10px solid #1365DD;
}
}
h2 {
margin-bottom: 20px;
color: #222222;
font-weight: 600;
font-size: 34px;
}
p {
color: #999999;
font-size: 28px;
}
}
}
.address-search {
display: flex;
align-items: center;
height: 100px;
padding: 0 32px;
.address-search__wrapper {
display: flex;
align-items: center;
width: 100%;
height: 72px;
padding: 0 32px;
background: #F6F7F9;
border-radius: 36px;
image {
width: 48px;
height: 48px;
}
input {
flex: 1;
font-size: 26px;
color: #333;
}
}
}
.address-btn {
display: flex;
align-items: center;
justify-content: space-between;
height: 112px;
line-height: 112px;
padding: 0 32px;
text-align: center;
color: #FFFFFF;
font-size: 32px;
background: #1365DD;
image {
width: 32px;
height: 32px;
margin-left: 4px;
}
.right {
display: flex;
align-items: center;
}
}
.top {
display: flex;
align-items: center;
justify-content: space-between;
height: 96px;
padding: 0 32px;
font-size: 32px;
color: #999;
font-weight: 600;
span:last-child {
color: #222;
}
}
}
map {
width: 100%;
height: 100%;
}
}
</style>