访客邀约修改界面
This commit is contained in:
@@ -54,7 +54,7 @@
|
||||
},
|
||||
{
|
||||
icon: '/static/ic_mine_visitor.png',
|
||||
text: '我的访客'
|
||||
text: '我的访客1111'
|
||||
},
|
||||
{
|
||||
icon: '/static/ic_mine_check.png',
|
||||
|
@@ -6,58 +6,70 @@
|
||||
<!-- 访客信息 -->
|
||||
<view class="info">
|
||||
<view class="cv-section-title">访客信息</view>
|
||||
<view class="cv-avatar-upload" @click="chooseAvatar">
|
||||
<view v-if="!header" class="cv-avatar-placeholder">上传正脸照</view>
|
||||
<image v-else :src="header" class="cv-avatar-img" />
|
||||
</view>
|
||||
<input class="cv-input-name" placeholder="请输入姓名" v-model="form.visitorName" />
|
||||
<input class="cv-input-phone" placeholder="请输入来访人电话" v-model="form.visitorPhone" />
|
||||
<input class="cv-input" placeholder="请输入来访人身份证/军官证" v-model="form.idCard" />
|
||||
</view>
|
||||
<!-- 选择来访目的 -->
|
||||
<view class="cv-section">
|
||||
<view class="cv-section-title">选择来访目的</view>
|
||||
<view class="cv-purpose-list">
|
||||
<view v-for="(item, idx) in purposes" :key="idx"
|
||||
:class="['cv-purpose-btn', {active: form.visitingReason === item}]"
|
||||
@click="form.visitingReason = item">{{ item }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="cv-room-select" @click="chooseRoom">
|
||||
<text>{{ form.room || '请选择访问楼栋及房间号' }}</text>
|
||||
<image class="cv-arrow" src="/static/ic_right_arrow_g.png" />
|
||||
</view>
|
||||
<!-- <view class="cv-avatar-upload" @click="chooseAvatar">-->
|
||||
<!-- <view v-if="!header" class="cv-avatar-placeholder">上传正脸照</view>-->
|
||||
<!-- <image v-else :src="header" class="cv-avatar-img" />-->
|
||||
<!-- </view>-->
|
||||
<!-- <input class="cv-input-name" placeholder="请输入姓名" v-model="form.visitorName" />-->
|
||||
<!-- <input class="cv-input-phone" placeholder="请输入来访人电话" v-model="form.visitorPhone" />-->
|
||||
<!-- <input class="cv-input" placeholder="请输入来访人身份证/军官证" v-model="form.idCard" />-->
|
||||
<view class="cv-section-tag">姓名</view>
|
||||
<input class="cv-input" placeholder="请输入姓名" v-model="form.visitorName" />
|
||||
<view class="cv-section-tag">电话</view>
|
||||
<input class="cv-input" placeholder="请输入联系电话" v-model="form.visitorPhone" />
|
||||
</view>
|
||||
<!-- 选择来访目的 -->
|
||||
<view class="cv-section">
|
||||
<view class="cv-section-title">来访目的</view>
|
||||
<view class="cv-form-group">
|
||||
<view class="cv-select">
|
||||
<view class="cv-select-header" @click="togglePurposeDropdown" :class="{'dropdown-open': purposeDropdownOpen}">
|
||||
<span>{{ form.visitingReason || '请选择来访目的' }}</span>
|
||||
<view class="cv-select-arrow" :class="{open: purposeDropdownOpen}"></view>
|
||||
</view>
|
||||
<view class="cv-select-options" :class="{open: purposeDropdownOpen}">
|
||||
<view v-for="(purpose, index) in purposes"
|
||||
:key="index"
|
||||
class="cv-option"
|
||||
:class="{selected: form.visitingReason === purpose}"
|
||||
@click="selectPurpose(purpose)">
|
||||
{{ purpose }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 来访时间 -->
|
||||
<view class="cv-section">
|
||||
<view class="cv-section-title">来访时间</view>
|
||||
<view class="cv-time-list">
|
||||
<view v-for="(item, idx) in times" :key="idx"
|
||||
:class="['cv-time-btn', {active: form.visitingBeginTime === item}]"
|
||||
@click="form.visitingBeginTime = item">{{ item }}</view>
|
||||
</view>
|
||||
<view class="datetime-row">
|
||||
<uni-datetime-picker class="datetime-picker" type="datetime" hide-second="true" v-model="startTime" @change="changeLog" />
|
||||
<view class="separator-line"></view>
|
||||
<uni-datetime-picker class="datetime-picker" type="datetime" hide-second="true" v-model="endTime" @change="changeLog" />
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<!-- 是否预约车位 -->
|
||||
<view class="cv-section">
|
||||
<view class="cv-parking-row">
|
||||
<view class="cv-section-title">是否预约车位</view>
|
||||
<view class="cv-radio-label" @click="form.bookingParkingSpace = true">
|
||||
<view :class="['cv-radio-custom', {checked: form.bookingParkingSpace === true}]" />
|
||||
<text>是</text>
|
||||
</view>
|
||||
<view class="cv-radio-label" @click="form.bookingParkingSpace = false">
|
||||
<view :class="['cv-radio-custom', {checked: form.bookingParkingSpace === false}]" />
|
||||
<text>否</text>
|
||||
</view>
|
||||
<text class="cv-parking-count">
|
||||
<text class="cv-parking-num">50</text><text class="cv-parking-total">/100</text>
|
||||
</text>
|
||||
</view>
|
||||
<view class="cv-room-select" @click="chooseCarNumber">
|
||||
<text>{{ form.licensePlate || '请选择车牌号' }}</text>
|
||||
<image class="cv-arrow" src="/static/ic_right_arrow_g.png" />
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="cv-section">-->
|
||||
<!-- <view class="cv-parking-row">-->
|
||||
<!-- <view class="cv-section-title">是否预约车位</view>-->
|
||||
<!-- <view class="cv-radio-label" @click="form.bookingParkingSpace = true">-->
|
||||
<!-- <view :class="['cv-radio-custom', {checked: form.bookingParkingSpace === true}]" />-->
|
||||
<!-- <text>是</text>-->
|
||||
<!-- </view>-->
|
||||
<!-- <view class="cv-radio-label" @click="form.bookingParkingSpace = false">-->
|
||||
<!-- <view :class="['cv-radio-custom', {checked: form.bookingParkingSpace === false}]" />-->
|
||||
<!-- <text>否</text>-->
|
||||
<!-- </view>-->
|
||||
<!-- <text class="cv-parking-count">-->
|
||||
<!-- <text class="cv-parking-num">50</text><text class="cv-parking-total">/100</text>-->
|
||||
<!-- </text>-->
|
||||
<!-- </view>-->
|
||||
<!-- <view class="cv-room-select" @click="chooseCarNumber">-->
|
||||
<!-- <text>{{ form.licensePlate || '请选择车牌号' }}</text>-->
|
||||
<!-- <image class="cv-arrow" src="/static/ic_right_arrow_g.png" />-->
|
||||
<!-- </view>-->
|
||||
<!-- </view>-->
|
||||
<!-- 提交按钮 -->
|
||||
<button class="cv-submit-btn" @click="submit">提交</button>
|
||||
</view>
|
||||
@@ -81,13 +93,20 @@
|
||||
// idCard: '',
|
||||
facePictures: '',
|
||||
visitingReason: '',
|
||||
// room: '',
|
||||
// room: '',
|
||||
visitingBeginTime: '2025-07-29',
|
||||
bookingParkingSpace: false,
|
||||
licensePlate: ''
|
||||
},
|
||||
purposes: ['商务合作', '园区参观', '面试签到', '装修放行', '家政服务', '送货上门'],
|
||||
times: ['今天(2025-07-04)', '明天(2025-07-04)']
|
||||
times: ['今天(2025-07-04)', '明天(2025-07-04)'],
|
||||
purposeDropdownOpen: false,
|
||||
single: '',
|
||||
range: ['2021-02-1', '2021-3-28'],
|
||||
startTime: '',
|
||||
endTime: '',
|
||||
start: Date.now() - 1000000000,
|
||||
end: Date.now() + 1000000000
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
@@ -96,6 +115,13 @@
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
togglePurposeDropdown() {
|
||||
this.purposeDropdownOpen = !this.purposeDropdownOpen;
|
||||
},
|
||||
selectPurpose(purpose) {
|
||||
this.form.visitingReason = purpose;
|
||||
this.purposeDropdownOpen = false;
|
||||
},
|
||||
// 新增:处理图片上传
|
||||
async chooseAvatar() {
|
||||
try {
|
||||
@@ -152,18 +178,6 @@
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.cv-back {
|
||||
position: absolute;
|
||||
left: 37rpx;
|
||||
width: 15rpx;
|
||||
height: 33rpx;
|
||||
}
|
||||
|
||||
.cv-title {
|
||||
font-size: 36rpx;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.cv-scroll-content {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
@@ -185,7 +199,119 @@
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.cv-section-tag {
|
||||
font-size: 28rpx;
|
||||
color: #000;
|
||||
font-weight: 500;
|
||||
margin: 36rpx 0 16rpx 0;
|
||||
}
|
||||
|
||||
/* 下拉框样式 */
|
||||
.cv-select {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
}
|
||||
.cv-form-group {
|
||||
margin: 36rpx 0 16rpx 0;
|
||||
}
|
||||
.cv-select-header {
|
||||
padding: 14px 16px;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 10px;
|
||||
font-size: 28rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
background: white;
|
||||
cursor: pointer;
|
||||
z-index: 2; /* 确保选择框在下拉框上方 */
|
||||
position: relative; /* 添加定位 */
|
||||
}
|
||||
|
||||
.cv-select-arrow {
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-left: 6px solid transparent;
|
||||
border-right: 6px solid transparent;
|
||||
border-top: 8px solid #777;
|
||||
transition: transform 0.3s;
|
||||
}
|
||||
|
||||
.cv-select-arrow.open {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
|
||||
.cv-select-options {
|
||||
position: absolute;
|
||||
top: calc(100% - 1px);
|
||||
left: 0;
|
||||
width: 100%;
|
||||
background: white;
|
||||
border: 1px solid #ddd;
|
||||
border-top: none;
|
||||
border-radius: 0 0 10px 10px;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
||||
z-index: 1;
|
||||
max-height: 0;
|
||||
overflow: hidden;
|
||||
transition: max-height 0.3s ease-out;
|
||||
/* 修复隐藏时的黑线问题 */
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.cv-select-options.open {
|
||||
max-height: 300px;
|
||||
overflow-y: auto;
|
||||
/* 显示时恢复可见性 */
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.cv-option {
|
||||
padding: 14px 16px;
|
||||
font-size: 28rpx;
|
||||
cursor: pointer;
|
||||
transition: background 0.2s;
|
||||
}
|
||||
|
||||
.cv-option:hover {
|
||||
background: #f0f7ff;
|
||||
}
|
||||
/* 下拉框打开时持续显示阴影 */
|
||||
.cv-select-header.dropdown-open {
|
||||
border-color: #007cff;
|
||||
border-radius: 10px 10px 0 0; /* 打开时上圆角下直角 */
|
||||
border-bottom: 1px solid #007cff; /* 添加底部边框与下拉框衔接 */
|
||||
}
|
||||
|
||||
.cv-option.selected {
|
||||
background: #007cff;
|
||||
color: white;
|
||||
}
|
||||
.datetime-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
gap: 15rpx;
|
||||
margin: 36rpx 0 0 0;
|
||||
}
|
||||
.datetime-picker {
|
||||
flex: 1;
|
||||
max-width: 500rpx;
|
||||
position: relative;
|
||||
}
|
||||
::v-deep .uni-date__x-input {
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
}
|
||||
.separator-line {
|
||||
width: 10rpx;
|
||||
height: 2px;
|
||||
background: #bdc3c7;
|
||||
border-radius: 1px;
|
||||
}
|
||||
.cv-inputs {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
@@ -221,7 +347,6 @@
|
||||
}
|
||||
|
||||
.cv-input {
|
||||
width: 435rpx;
|
||||
height: 73rpx;
|
||||
background: #F7F7F7;
|
||||
border-radius: 10rpx;
|
||||
@@ -259,34 +384,7 @@
|
||||
border-radius: 12rpx;
|
||||
}
|
||||
|
||||
.cv-purpose-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 36rpx;
|
||||
/* 不设置gap的列间距,水平方向用margin控制 */
|
||||
}
|
||||
|
||||
.cv-purpose-btn {
|
||||
width: calc((100% - 58rpx) / 3);
|
||||
margin-right: 29rpx;
|
||||
margin-bottom: 29rpx;
|
||||
box-sizing: border-box;
|
||||
padding: 18rpx 0;
|
||||
text-align: center;
|
||||
background: #EBF5FF;
|
||||
border-radius: 10rpx;
|
||||
font-size: 24rpx;
|
||||
color: #0B0B0B;
|
||||
}
|
||||
|
||||
.cv-purpose-btn:nth-child(3n) {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.cv-purpose-btn.active {
|
||||
background: #007CFF;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.cv-room-select {
|
||||
width: 435rpx;
|
||||
@@ -307,33 +405,6 @@
|
||||
height: 21rpx;
|
||||
}
|
||||
|
||||
.cv-time-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 23rpx;
|
||||
margin-top: 32rpx;
|
||||
}
|
||||
|
||||
.cv-time-btn {
|
||||
width: 302rpx;
|
||||
height: 73rpx;
|
||||
text-align: center;
|
||||
background: #EBF5FF;
|
||||
border-radius: 12rpx;
|
||||
font-size: 24rpx;
|
||||
color: #0B0B0B;
|
||||
display: flex;
|
||||
/* 新增 */
|
||||
align-items: center;
|
||||
/* 垂直居中 */
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.cv-time-btn.active {
|
||||
background: #007CFF;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.cv-parking-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
@@ -43,13 +43,15 @@
|
||||
<view>{{ detailData.visitorName }} {{ detailData.visitorPhone }}</view>
|
||||
<view v-if="detailData.idCard">{{ detailData.idCard}}</view>
|
||||
<view v-if="detailData.carNumber">车牌号:{{ detailData.carNumber}}</view>
|
||||
<view>访问目的:{{ detailData.visitingReason}}</view>
|
||||
<view>来访时间:{{ detailData.visitingBeginTime }}</view>
|
||||
<view>访问地址:{{ detailData.visitorUnit}}</view>
|
||||
|
||||
<image
|
||||
:src="detailData.statusClass === 'orange' ? '/static/ic_my_visitor_01.png' : '/static/ic_my_visitor_02.png'"
|
||||
class="visitor-detail-status-img" />
|
||||
</view>
|
||||
<button class="visitor-detail-btn">修改</button>
|
||||
<!-- <button class="visitor-detail-btn">修改</button>-->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -59,10 +61,9 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
tabs: ['我的预约', '我的邀约', '全部记录'],
|
||||
tabs: ['我的预约', '我的邀约'],
|
||||
activeTab: 0,
|
||||
tabData: [
|
||||
[],
|
||||
[],
|
||||
[]
|
||||
], // 每个tab的数据
|
||||
|
Reference in New Issue
Block a user