1.报事报修接口联调
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
</view>
|
||||
<view class="cv-room-select" @click="chooseRoom">
|
||||
<text>{{ form.room || '请选择访问楼栋及房间号' }}</text>
|
||||
<text class="cv-arrow">></text>
|
||||
<image class="cv-arrow" src="/static/ic_right_arrow_g.png" />
|
||||
</view>
|
||||
</view>
|
||||
<!-- 来访时间 -->
|
||||
@@ -55,7 +55,7 @@
|
||||
</view>
|
||||
<view class="cv-room-select" @click="chooseCarNumber">
|
||||
<text>{{ form.licensePlate || '请选择车牌号' }}</text>
|
||||
<text class="cv-arrow">></text>
|
||||
<image class="cv-arrow" src="/static/ic_right_arrow_g.png" />
|
||||
</view>
|
||||
</view>
|
||||
<!-- 提交按钮 -->
|
||||
@@ -73,8 +73,8 @@
|
||||
} from '@/common/upload.js';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
header:'',
|
||||
return {
|
||||
header: '',
|
||||
form: {
|
||||
visitorName: '',
|
||||
visitorPhone: '',
|
||||
@@ -89,11 +89,11 @@
|
||||
purposes: ['商务合作', '园区参观', '面试签到', '装修放行', '家政服务', '送货上门'],
|
||||
times: ['今天(2025-07-04)', '明天(2025-07-04)']
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
uni.$once('selectPlate', plate => {
|
||||
this.form.licensePlate = plate;
|
||||
});
|
||||
},
|
||||
onShow() {
|
||||
uni.$once('selectPlate', plate => {
|
||||
this.form.licensePlate = plate;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
// 新增:处理图片上传
|
||||
@@ -105,41 +105,41 @@
|
||||
count: 1 // 根据剩余数量选择
|
||||
});
|
||||
// 将选择的图片添加到selectedImages数组
|
||||
this.header = images[0].path
|
||||
|
||||
this.header = images[0].path
|
||||
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
},
|
||||
async submit(){
|
||||
let images = [''];
|
||||
let filePath = this.header.replace('file://', '');
|
||||
images[0] = filePath;
|
||||
console.log("t1",images)
|
||||
const result = await uploadFiles({
|
||||
files: images,
|
||||
url: this.vuex_config.baseUrl + '/resource/oss/upload',
|
||||
name: 'file',
|
||||
vm: this // 关键:用于注入 token 等
|
||||
});
|
||||
|
||||
if (result.code == '200') {
|
||||
data = result.data.url
|
||||
console.log("t1",result.data.url)
|
||||
}
|
||||
|
||||
this.form.facePictures = result.url
|
||||
},
|
||||
async submit() {
|
||||
let images = [''];
|
||||
let filePath = this.header.replace('file://', '');
|
||||
images[0] = filePath;
|
||||
console.log("t1", images)
|
||||
const result = await uploadFiles({
|
||||
files: images,
|
||||
url: this.vuex_config.baseUrl + '/resource/oss/upload',
|
||||
name: 'file',
|
||||
vm: this // 关键:用于注入 token 等
|
||||
});
|
||||
|
||||
if (result.code == '200') {
|
||||
data = result.data.url
|
||||
console.log("t1", result.data.url)
|
||||
}
|
||||
|
||||
this.form.facePictures = result.url
|
||||
},
|
||||
chooseRoom() {
|
||||
// 这里可弹出选择房间号
|
||||
uni.navigateTo({
|
||||
url: '/pages/sys/user/myVisitor/selectRoom'
|
||||
// 这里可弹出选择房间号
|
||||
uni.navigateTo({
|
||||
url: '/pages/sys/user/myVisitor/selectRoom'
|
||||
});
|
||||
},
|
||||
chooseCarNumber() {
|
||||
// 这里可弹出选择车牌号
|
||||
uni.navigateTo({
|
||||
url: '/pages/sys/user/myPayment/myCarCode'
|
||||
// 这里可弹出选择车牌号
|
||||
uni.navigateTo({
|
||||
url: '/pages/sys/user/myPayment/myCarCode'
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -305,8 +305,8 @@
|
||||
}
|
||||
|
||||
.cv-arrow {
|
||||
font-size: 32rpx;
|
||||
color: #bbb;
|
||||
width: 11rpx;
|
||||
height: 21rpx;
|
||||
}
|
||||
|
||||
.cv-time-list {
|
||||
|
356
pages/sys/user/myVisitor/creatVisitor2.vue
Normal file
356
pages/sys/user/myVisitor/creatVisitor2.vue
Normal file
@@ -0,0 +1,356 @@
|
||||
<template>
|
||||
<view class="cv-container">
|
||||
<!-- 可滚动内容区 -->
|
||||
<view class="cv-scroll-content">
|
||||
<!-- 访客信息 -->
|
||||
<view class="info">
|
||||
<view class="cv-section-title">访客信息</view>
|
||||
<input class="cv-input-name" placeholder="请输入姓名" v-model="form.visitorName" />
|
||||
<input class="cv-input-phone" placeholder="请输入11位手机号码" v-model="form.visitorPhone" />
|
||||
</view>
|
||||
|
||||
<!-- 邀约详情 -->
|
||||
<view class="info">
|
||||
<view class="cv-section-title">邀约详情</view>
|
||||
<input class="cv-input-reason" placeholder="请输入来访事由(6字以内)" v-model="form.visitingReason" />
|
||||
<input class="cv-input-unit" placeholder="请输入拜访单位" v-model="form.visitingUnit" />
|
||||
<view class="cv-time-picker">
|
||||
<picker mode="datetime" :value="form.startTime" @change="startTimeChange">
|
||||
<view class="cv-input-time">{{ form.startTime || '请选择开始时间' }}</view>
|
||||
</picker>
|
||||
<text>至</text>
|
||||
<picker mode="datetime" :value="form.endTime" @change="endTimeChange">
|
||||
<view class="cv-input-time">{{ form.endTime || '请选择结束时间' }}</view>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 提交按钮 -->
|
||||
<button class="cv-submit-btn" @click="submit">提交</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
visitorName: '',
|
||||
visitorPhone: '',
|
||||
visitingReason: '',
|
||||
visitingUnit: '',
|
||||
startTime: '',
|
||||
endTime: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
startTimeChange(e) {
|
||||
this.form.startTime = e.detail.value;
|
||||
},
|
||||
endTimeChange(e) {
|
||||
this.form.endTime = e.detail.value;
|
||||
},
|
||||
submit() {
|
||||
// 提交逻辑
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.cv-container {
|
||||
background: #fff;
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
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;
|
||||
padding-bottom: 120rpx;
|
||||
}
|
||||
|
||||
.cv-section {
|
||||
margin: 36rpx 56rpx 0 56rpx;
|
||||
}
|
||||
|
||||
.info {
|
||||
margin: 36rpx 56rpx 0 56rpx;
|
||||
}
|
||||
|
||||
.cv-section-title {
|
||||
font-size: 32rpx;
|
||||
color: #000;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
|
||||
.cv-inputs {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 18rpx;
|
||||
}
|
||||
|
||||
.cv-input-name {
|
||||
width: 233rpx;
|
||||
height: 73rpx;
|
||||
background: #F7F7F7;
|
||||
border-radius: 10rpx;
|
||||
font-size: 24rpx;
|
||||
color: #222;
|
||||
padding: 0 24rpx;
|
||||
margin-bottom: 29rpx;
|
||||
margin-top: 23rpx;
|
||||
border: none;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.cv-input-phone {
|
||||
width: 363rpx;
|
||||
height: 73rpx;
|
||||
background: #F7F7F7;
|
||||
border-radius: 10rpx;
|
||||
font-size: 24rpx;
|
||||
color: #222;
|
||||
padding: 0 24rpx;
|
||||
margin-bottom: 29rpx;
|
||||
border: none;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.cv-input {
|
||||
width: 435rpx;
|
||||
height: 73rpx;
|
||||
background: #F7F7F7;
|
||||
border-radius: 10rpx;
|
||||
font-size: 24rpx;
|
||||
color: #222;
|
||||
padding: 0 24rpx;
|
||||
margin-bottom: 29rpx;
|
||||
border: none;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.cv-avatar-upload {
|
||||
position: absolute;
|
||||
width: 163rpx;
|
||||
height: 183rpx;
|
||||
top: 50rpx;
|
||||
right: 0rpx;
|
||||
background: #F7F8FA;
|
||||
border-radius: 12rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-left: 24rpx;
|
||||
}
|
||||
|
||||
.cv-avatar-placeholder {
|
||||
color: #bbb;
|
||||
font-size: 24rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.cv-avatar-img {
|
||||
width: 163rpx;
|
||||
height: 183rpx;
|
||||
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;
|
||||
height: 73rpx;
|
||||
background: #F7F7F7;
|
||||
border-radius: 10rpx;
|
||||
font-size: 24rpx;
|
||||
color: #808080;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0 24rpx;
|
||||
margin-top: 12rpx;
|
||||
}
|
||||
|
||||
.cv-arrow {
|
||||
width: 11rpx;
|
||||
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;
|
||||
gap: 24rpx;
|
||||
margin-bottom: 18rpx;
|
||||
}
|
||||
|
||||
.cv-radio-label {
|
||||
font-size: 24rpx;
|
||||
color: #0B0B0B;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-left: 30rpx;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.cv-radio-label2 {
|
||||
font-size: 24rpx;
|
||||
color: #0B0B0B;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-left: 30rpx;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.cv-radio-custom {
|
||||
width: 22rpx;
|
||||
height: 22rpx;
|
||||
border-radius: 50%;
|
||||
border: 1rpx solid #007CFF;
|
||||
background: #fff;
|
||||
margin-right: 12rpx;
|
||||
box-sizing: border-box;
|
||||
transition: background 0.2s, border 0.2s;
|
||||
}
|
||||
|
||||
.cv-radio-custom.checked {
|
||||
background: #007CFF;
|
||||
border: 1rpx solid #007CFF;
|
||||
}
|
||||
|
||||
.cv-parking-count {
|
||||
margin-left: 24rpx;
|
||||
font-size: 24rpx;
|
||||
background: #EBF5FF;
|
||||
border-radius: 8rpx;
|
||||
padding: 0 18rpx;
|
||||
height: 54rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.cv-parking-num {
|
||||
color: #007CFF;
|
||||
}
|
||||
|
||||
.cv-parking-total {
|
||||
color: #0B0B0B;
|
||||
}
|
||||
|
||||
.cv-input-reason, .cv-input-unit {
|
||||
width: 435rpx;
|
||||
height: 73rpx;
|
||||
background: #F7F7F7;
|
||||
border-radius: 10rpx;
|
||||
font-size: 24rpx;
|
||||
color: #222;
|
||||
padding: 0 24rpx;
|
||||
margin-bottom: 29rpx;
|
||||
border: none;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.cv-time-picker {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 29rpx;
|
||||
}
|
||||
|
||||
.cv-input-time {
|
||||
width: 200rpx;
|
||||
height: 73rpx;
|
||||
background: #F7F7F7;
|
||||
border-radius: 10rpx;
|
||||
font-size: 24rpx;
|
||||
color: #808080;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.cv-submit-btn {
|
||||
width: 90vw;
|
||||
height: 90rpx;
|
||||
background: #0090FF;
|
||||
color: #fff;
|
||||
font-size: 36rpx;
|
||||
border: none;
|
||||
border-radius: 45rpx;
|
||||
margin: 80rpx auto 0 auto;
|
||||
display: block;
|
||||
font-weight: bold;
|
||||
box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.18);
|
||||
}
|
||||
</style>
|
@@ -49,7 +49,7 @@ export default {
|
||||
id: 1,
|
||||
latitude: 29.534,
|
||||
longitude: 106.565,
|
||||
iconPath: '/static/ic_map.png', // 设置背景图
|
||||
// iconPath: '/static/ic_map.png', // 设置背景图
|
||||
width: 20,
|
||||
height: 20
|
||||
}
|
||||
|
Reference in New Issue
Block a user