2025-06-09 17:33:50 +08:00
|
|
|
<template>
|
|
|
|
<div class="container">
|
|
|
|
<u-modal v-model="show" :content="content"></u-modal>
|
|
|
|
|
|
|
|
<view class="white-content">
|
|
|
|
<view class="white-message">
|
|
|
|
<view>
|
|
|
|
<view class="one">
|
|
|
|
<view class="one-left">机构位置</view>
|
2025-06-11 17:33:34 +08:00
|
|
|
<view class="special">
|
|
|
|
<view class="one-right"
|
|
|
|
style="width: 170rpx;justify-content: flex-start;"
|
|
|
|
@click="openLook(jigouweizhi)">
|
|
|
|
{{ jigouweizhi ? jigouweizhi : `请选择机构位置` }}
|
|
|
|
</view>
|
|
|
|
<image class="one-img" src="@/static/index/norelmap.png" @click="jumpToMap" />
|
2025-06-09 17:33:50 +08:00
|
|
|
</view>
|
2025-06-11 17:33:34 +08:00
|
|
|
|
2025-06-09 17:33:50 +08:00
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view>
|
|
|
|
<view class="one">
|
|
|
|
<view class="one-left">机构负责人</view>
|
|
|
|
<input class="one-right" type="text" placeholder="请输入机构负责人姓名" v-model="form.orgLeader" />
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view>
|
|
|
|
<view class="one">
|
|
|
|
<view class="one-left">机构负责人电话</view>
|
2025-06-11 17:33:34 +08:00
|
|
|
<input class="one-right" type="number" placeholder="请输入机构负责人电话" v-model="form.orgLeaderPhone" />
|
2025-06-09 17:33:50 +08:00
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view>
|
|
|
|
<view class="one">
|
|
|
|
<view class="one-left">楼宇牌号</view>
|
|
|
|
<input class="one-right" type="text" placeholder="请输入楼宇牌号" v-model="form.orgBuildingNumber" />
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view>
|
|
|
|
<view class="one">
|
|
|
|
<view class="one-left">房屋性质</view>
|
|
|
|
<input class="one-right" type="text" placeholder="请输入房屋性质" v-model="form.orgPropertyType" />
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view style="margin-bottom: 20rpx;">
|
|
|
|
<view class="one" style="position: relative;">
|
|
|
|
<view class="one-left">建筑面积</view>
|
|
|
|
<input class="one-right" type="number" placeholder="请输入建筑面积" v-model="form.orgBuildingArea" />
|
2025-06-11 17:33:34 +08:00
|
|
|
<!-- <view class="pingfangmi">
|
2025-06-09 17:33:50 +08:00
|
|
|
平方米
|
2025-06-11 17:33:34 +08:00
|
|
|
</view> -->
|
2025-06-09 17:33:50 +08:00
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
2025-06-11 17:33:34 +08:00
|
|
|
<view style="display: flex;width: 100%;">
|
|
|
|
<view class="finish-button" @click="goBack">
|
|
|
|
上一步
|
|
|
|
</view>
|
|
|
|
<view class="finish-button" @click="next">
|
|
|
|
确认并提交
|
|
|
|
</view>
|
2025-06-09 17:33:50 +08:00
|
|
|
</view>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
|
|
|
import {
|
|
|
|
ref,
|
2025-06-11 17:33:34 +08:00
|
|
|
reactive,
|
2025-06-09 17:33:50 +08:00
|
|
|
} from 'vue'
|
|
|
|
import {
|
2025-06-11 17:33:34 +08:00
|
|
|
onLoad,
|
|
|
|
onShow
|
2025-06-09 17:33:50 +08:00
|
|
|
} from '@dcloudio/uni-app';
|
2025-06-11 17:33:34 +08:00
|
|
|
|
2025-06-09 17:33:50 +08:00
|
|
|
import {
|
|
|
|
base_url
|
|
|
|
} from '@/request/index.js'
|
|
|
|
|
2025-06-11 17:33:34 +08:00
|
|
|
import {
|
|
|
|
changemessage
|
|
|
|
} from './api/addjigou.js'
|
|
|
|
|
2025-06-09 17:33:50 +08:00
|
|
|
const show = ref(false);
|
|
|
|
const content = ref("");
|
2025-06-11 17:33:34 +08:00
|
|
|
const jigouweizhi = ref("");
|
2025-06-09 17:33:50 +08:00
|
|
|
const form = reactive({
|
2025-06-11 17:33:34 +08:00
|
|
|
orgLeader: "",
|
|
|
|
orgLeaderPhone: "",
|
|
|
|
orgBuildingNumber: "",
|
|
|
|
orgPropertyType: "",
|
|
|
|
orgBuildingArea: "",
|
|
|
|
orgAddress: "",
|
|
|
|
orgCoordinateLo: "",
|
|
|
|
orgCoordinateLa: "",
|
|
|
|
id: uni.getStorageSync('specicalid') || "",
|
|
|
|
tel: uni.getStorageSync('tel'),
|
2025-06-09 17:33:50 +08:00
|
|
|
})
|
|
|
|
// 本地保存的临时文件路径
|
|
|
|
const tempImagePath = ref('')
|
|
|
|
|
|
|
|
const headImge = ref("");
|
|
|
|
const backImge = ref("");
|
|
|
|
|
|
|
|
const openLook = (res) => {
|
|
|
|
if (res) {
|
|
|
|
content.value = res;
|
|
|
|
show.value = true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
const next = () => {
|
2025-06-11 17:33:34 +08:00
|
|
|
|
|
|
|
const allNonEmpty = form.orgLeader && form.orgLeaderPhone && form.orgBuildingNumber && form.orgPropertyType &&
|
|
|
|
form.orgBuildingArea && form.orgAddress && form.orgCoordinateLo && form.orgCoordinateLa
|
|
|
|
if (allNonEmpty) {
|
|
|
|
changemessage(form).then(res => {
|
|
|
|
if (res.success) {
|
|
|
|
if (res.message == `保存成功!`) {
|
|
|
|
uni.setStorageSync('specicalid', "");
|
|
|
|
uni.reLaunch({
|
|
|
|
url: `/pages/login/workjoin?type=1`
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
uni.setStorageSync('specicalid', res.result.id);
|
|
|
|
uni.reLaunch({
|
|
|
|
url: `/pages/login/workjoin?type=1`
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
uni.showToast({
|
|
|
|
title: res.message,
|
|
|
|
icon: 'error'
|
|
|
|
})
|
|
|
|
}
|
|
|
|
})
|
|
|
|
} else {
|
|
|
|
uni.showToast({
|
|
|
|
title: '请完善信息',
|
|
|
|
icon: 'error'
|
|
|
|
})
|
|
|
|
}
|
2025-06-09 17:33:50 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
const goBack = () => {
|
|
|
|
uni.navigateBack()
|
|
|
|
}
|
|
|
|
const jumpToMap = () => {
|
|
|
|
uni.navigateTo({
|
|
|
|
url: "/pages/map/index"
|
|
|
|
});
|
|
|
|
}
|
2025-06-11 17:33:34 +08:00
|
|
|
onShow(() => {
|
|
|
|
// 读取并立即清除,避免下次重复拿到
|
|
|
|
const data = uni.getStorageSync('dingwei')
|
|
|
|
if (data) {
|
|
|
|
console.log("data", data)
|
|
|
|
jigouweizhi.value = data.name
|
|
|
|
form.orgAddress = data.name
|
|
|
|
form.orgCoordinateLo = data.lng
|
|
|
|
form.orgCoordinateLa = data.lat
|
|
|
|
uni.removeStorageSync('dingwei')
|
|
|
|
}
|
|
|
|
})
|
2025-06-09 17:33:50 +08:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.container {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
min-height: 100vh;
|
|
|
|
width: 100%;
|
|
|
|
background-color: rgb(239, 241, 252);
|
|
|
|
position: relative;
|
|
|
|
box-shadow: 2rpx 2rpx 4rpx rgba(0, 0, 0, 0.1);
|
|
|
|
|
|
|
|
.white-content {
|
|
|
|
width: 90%;
|
|
|
|
margin-left: 5%;
|
|
|
|
margin-top: 30rpx;
|
|
|
|
// height: 1200rpx;
|
|
|
|
border-radius: 35rpx;
|
|
|
|
background-color: rgb(245, 251, 254);
|
|
|
|
|
|
|
|
.content-title {
|
|
|
|
display: flex;
|
|
|
|
// align-items: center;
|
|
|
|
height: 100rpx;
|
|
|
|
position: relative;
|
|
|
|
|
|
|
|
.content-weight {
|
|
|
|
// font-size: 35rpx;
|
|
|
|
font-weight: 600;
|
|
|
|
margin-left: 40rpx;
|
|
|
|
margin-top: 20rpx;
|
|
|
|
}
|
|
|
|
|
|
|
|
.content-img {
|
|
|
|
position: absolute;
|
|
|
|
right: 0;
|
|
|
|
top: 0;
|
|
|
|
width: 400rpx;
|
|
|
|
height: 100%;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.white-photo {
|
|
|
|
width: 90%;
|
|
|
|
margin-left: 5%;
|
|
|
|
// margin-top: 30rpx;
|
|
|
|
height: 300rpx;
|
|
|
|
border-radius: 35rpx;
|
|
|
|
background-color: #fff;
|
|
|
|
box-shadow: 4rpx 4rpx 8rpx rgba(0, 0, 0, 0.1);
|
|
|
|
justify-content: space-around;
|
|
|
|
align-items: center;
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
.photo {
|
|
|
|
width: 300rpx;
|
|
|
|
height: 200rpx;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.white-message {
|
|
|
|
width: 90%;
|
|
|
|
margin-left: 5%;
|
|
|
|
margin-top: 30rpx;
|
|
|
|
margin-bottom: 30rpx;
|
|
|
|
// height: 800rpx;
|
|
|
|
border-radius: 35rpx;
|
|
|
|
background-color: #fff;
|
|
|
|
box-shadow: 4rpx 4rpx 8rpx rgba(0, 0, 0, 0.1);
|
|
|
|
justify-content: space-around;
|
|
|
|
// align-items: center;
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
|
|
.message-title {
|
|
|
|
width: 100%;
|
|
|
|
height: 100rpx;
|
|
|
|
align-items: center;
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
.shu {
|
|
|
|
width: 10rpx;
|
|
|
|
height: 30rpx;
|
|
|
|
background-color: #0097FF;
|
|
|
|
border-radius: 10rpx;
|
|
|
|
margin: 0 20rpx 0 30rpx;
|
|
|
|
}
|
|
|
|
|
|
|
|
.message-weight {
|
|
|
|
font-size: 30rpx;
|
|
|
|
// font-weight: 600;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.one {
|
|
|
|
width: 90%;
|
|
|
|
margin-left: 5%;
|
|
|
|
border-bottom: 1rpx solid #d7d7d7;
|
|
|
|
height: 90rpx;
|
|
|
|
display: flex;
|
|
|
|
justify-content: space-between;
|
|
|
|
align-items: center;
|
|
|
|
margin-bottom: 10rpx;
|
|
|
|
|
|
|
|
.one-left {
|
|
|
|
margin-left: 10rpx;
|
|
|
|
}
|
|
|
|
|
|
|
|
.one-right {
|
|
|
|
// margin-right: 10rpx;
|
|
|
|
color: #999999;
|
|
|
|
overflow: hidden;
|
|
|
|
/* 隐藏超出内容 */
|
|
|
|
white-space: nowrap;
|
|
|
|
/* 不换行 */
|
|
|
|
font-size: 25rpx;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
max-width: 300rpx;
|
|
|
|
display: flex;
|
|
|
|
justify-content: flex-end;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.photo-left {
|
|
|
|
.photo-weight {
|
|
|
|
font-size: 26rpx;
|
|
|
|
font-weight: 600;
|
|
|
|
}
|
|
|
|
|
|
|
|
.photo-font {
|
|
|
|
font-size: 23rpx;
|
|
|
|
margin-top: 10rpx;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.finish-button {
|
|
|
|
display: flex;
|
|
|
|
justify-content: center;
|
|
|
|
align-items: center;
|
|
|
|
width: 45%;
|
|
|
|
height: 100rpx;
|
|
|
|
margin: 0rpx auto;
|
|
|
|
margin-bottom: 80rpx;
|
|
|
|
color: #fff;
|
|
|
|
background: linear-gradient(to right, #00C9FF, #0076FF);
|
|
|
|
border-radius: 50rpx;
|
|
|
|
font-size: 35rpx;
|
|
|
|
}
|
2025-06-11 17:33:34 +08:00
|
|
|
|
|
|
|
.one-img {
|
|
|
|
position: absolute;
|
|
|
|
top: 50%;
|
|
|
|
transform: translateY(-50%);
|
|
|
|
right: 10rpx;
|
2025-06-09 17:33:50 +08:00
|
|
|
width: 60rpx;
|
|
|
|
height: 50rpx;
|
2025-06-11 17:33:34 +08:00
|
|
|
// margin-right: 10rpx;
|
|
|
|
// margin-left: 35rpx;
|
2025-06-09 17:33:50 +08:00
|
|
|
}
|
2025-06-11 17:33:34 +08:00
|
|
|
|
|
|
|
.pingfangmi {
|
2025-06-09 17:33:50 +08:00
|
|
|
position: absolute;
|
|
|
|
top: 50%;
|
|
|
|
right: 5rpx;
|
|
|
|
transform: translateY(-50%);
|
|
|
|
}
|
2025-06-11 17:33:34 +08:00
|
|
|
|
|
|
|
.special {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
width: 280rpx;
|
|
|
|
position: relative;
|
|
|
|
}
|
2025-06-09 17:33:50 +08:00
|
|
|
</style>
|