factory_mp_old/pages/workSpace/visit/visitor.vue

154 lines
3.1 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<view class="clockInContainer">
<uni-nav-bar @clickLeft="goBack()" height="110rpx" leftWidth="200rpx" leftText="访客库" leftIcon="left" border
backgroundColor="#2cade8" color="#fff" fixed statusBar shadow></uni-nav-bar>
<!-- <view class="tabbar-title">
<view :class="{'text-title':true, 'active':activeIndex}" @click="changeList(1)">本月</view>
<view style="display: flex;">
<view>选择月份</view>
<picker mode="date" :value="date" fields="month" @change="bindDateChange">
<view class="uni-input">{{date}}</view>
</picker>
</view>
</view> -->
<view class="content">
<view class="item-wrap" v-for="(val,index) in lists" :key="val.id">
<view class="clock_in_-item">
<view class="center-info">
<view class="info-details">姓名:{{val.name}}</view>
<view class="info-details">手机号:{{val.phone}}</view>
<view class="info-details">创建时间:{{val.create_time}}</view>
</view>
<view class="bottom-btns">
<view class="shenhezhong shenhe-status" @click="visitorHandle(val,'edit')">
<image src="../../../static/my/my_apply/blue-time.png" mode=""></image>
编辑
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
name: 'visitor',
data() {
return {
totalNum: 0,
activeIndex:true,//本月
lists: [],
currentMonth:'',
currentYear:'',
date:'选择其他月',
}
},
onShow() {
let that = this;
that.getLists();
},
methods: {
getLists() {
let that = this;
that.$u.api.visitorList({'page':0}).then(res => {
that.lists = res
})
},
goBack() {
uni.navigateBack({
delta: 1
})
},
visitorHandle(val, type) {
if(type=='edit'){
uni.navigateTo({
url:`/pages/workSpace/newWork/addUser?id=${val.id}&type=edit`
})
}
}
}
}
</script>
<style scoped>
.empty-view {
height: 120rpx;
}
>>>.uni-navbar__header,
>>>.uni-status-bar,
.search-wrap {
background-image: linear-gradient(270deg,
#0ca7ee 0%,
#005aff 100%,
#2a8cff 100%,
#54bdff 100%),
linear-gradient(#e60012,
#e60012);
}
.tabbar-title{
display: flex;
justify-content: space-between;
}
.clockInContainer {
background-color: #f3fbff;
}
.clockInContainer>>>.uni-navbar-btn-text text {
font-size: 32rpx !important;
}
.content {
padding: 14rpx;
padding-top: 10upx;
}
.item-wrap {
margin-bottom: 14rpx;
}
.clock_in_-item {
width: 720rpx;
background-color: #ffffff;
border-radius: 10rpx;
margin: 0 auto;
padding: 24rpx 21rpx;
box-sizing: border-box;
}
.center-info {
padding-bottom: 30rpx;
border-bottom: 1rpx solid #eeeeee;
}
.info-details {
font-size: 28rpx;
line-height: 40rpx;
color: #5b5b5b;
}
.bottom-btns {
text-align: center;
font-family: PingFang-SC-Medium;
font-size: 28rpx;
line-height: 83rpx;
display: flex;
}
.shenhezhong {
flex: 1;
color: #2c6fd9;
}
.shenhezhong image {
width: 26rpx;
height: 26rpx;
margin-right: 10rpx;
vertical-align: middle;
}
</style>